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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
478416387 |
from lxml import etree
from lxml.builder import ElementMaker
XSI_NS = 'http://www.w3.org/2001/XMLSchema-instance'
class OAIDC(object):
"""The standard OAI Dublin Core metadata format.
Every OAI feed should at least provide this format.
It is registered under the name 'oai_dc'
"""
def... | null | moai/metadata/oaidc.py | oaidc.py | py | 5,107 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "lxml.etree.register_namespace",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "lxml.etree",
"line_number": 34,
"usage_type": "name"
},
{
"api_name": "lxml.builder.ElementMaker",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "lx... |
536771287 | import requests
#coding:utf8
'''
https其他方法,安装
pyOpenSSL
pyasn
ndg-httpsclient
'''
#处理因ssl出现的连接错误
a=requests.get('https://wx.qq.com',verify=False)
a.text
#get
#get(url, **kwargs)
r=requests.get("http://httpbin.org/get")
r.text
#post
#post(url, data=None, json=None, **kwargs)
payload = dict(key1='value1', key2='value... | null | demo/http/https_demo.py | https_demo.py | py | 533 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "requests.get",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "requests.put",
"line_numb... |
300498811 | """
Main pyBuilder module
Contains all of the required classes to make use of pybWidgets
"""
from pybCheckBox import pybCheckBox
from pybLineEdit import pybLineEdit
from pybList import pybList
from xml.etree.ElementTree import ElementTree as ET
from xml.etree.ElementTree import Element as EE
class pybWidgets(... | null | src/pybController/pybMain.py | pybMain.py | py | 1,360 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pybLineEdit.pybLineEdit",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "pybCheckBox.pybCheckBox",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "pybList.pybList",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "xml.e... |
77290333 | import datetime
from time import ctime
import ntplib
import os
servidorT = "time-a-g.nist.gov"
t1 = datetime.datetime.now()
print("T1 : %s" % t1)
clienteNTP = ntplib.NTPClient()
respuesta = clienteNTP.request(servidorT)
hora_ser = datetime.datetime.strptime(ctime(respuesta.tx_time), "%a %b %d %H:%M:%S %Y")
print(... | null | practica4.py | practica4.py | py | 853 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "datetime.datetime.now",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "ntplib.NTPClient",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "datetime.... |
368437129 | from AgentOperators import Agent
from Environment import *
from Policies import *
from Q_Learning import *
from Q_Table import *
import time
import io
from PIL import Image
world = World()
policy = Policy()
agent = Agent(world)
q_learning = Q_learning(0.3,0.5)
q_table_visual_not_block = Q_Table("Q tabl... | null | Project2/Experiment2.py | Experiment2.py | py | 3,767 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "AgentOperators.Agent",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_n... |
500423382 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import datetime
class Migration(migrations.Migration):
dependencies = [
('events', '0012_eventideas_sub_event_idea'),
]
operations = [
migrations.AddField(
model_name='ev... | null | myproject/events/migrations/0013_eventideas_estimated_date.py | 0013_eventideas_estimated_date.py | py | 471 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.AddField",
"line_number": 15,
"usage_type": "call"
},
{
... |
311570810 | # Copyright 2014 Confluent 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 writing, s... | null | ducktape/cluster/json.py | json.py | py | 5,114 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "cluster.Cluster",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "ducktape.command_line.defaults.ConsoleDefaults.CLUSTER_FILE",
"line_number": 77,
"usage_type": "attribute"
},
{
"api_name": "ducktape.command_line.defaults.ConsoleDefaults",
"line_numbe... |
1772752 | """
Using matplotlib, this module plots everithing to visualize the universe
"""
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from .bodies import CelestialBody, Ship
class POV(object):
"""Just like a Java enum"""
above = 0
side = 1
class View(object):
... | null | astruslib/plotting.py | plotting.py | py | 5,230 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "matplotlib.pyplot.ioff",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "bodies.Ship",
"line_number": 56,
"usage_type": "argument"
},
{
"api_name": "bodies.Celes... |
325959273 | # -*- coding: utf-8 -*-
"""
Created on Tue Jan 21 23:08:30 2020
@author: vlahane
"""
from matplotlib import pyplot as plt
import pandas as pd
data = {
'year': [2008,2012,2016],
'attendees':[112,321,729],
'average age': [24,23,31]
}
df = pd.DataFrame(data)
print(df)
p... | null | ch1_2_pandas_matplotlib.py | ch1_2_pandas_matplotlib.py | py | 655 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pandas.DataFrame",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "matplotlib.... |
400066314 | import ROOT
ROOT.gROOT.SetBatch(True)
import optparse
import os,sys
import json
import re
from collections import OrderedDict
from math import sqrt
from array import *
import random
import numpy
import copy
import pickle
debug = True
"""
steer the script
"""
def main():
cmsLabel='#bf{CMS} #it{Simulation}'
... | null | TopAnalysis/test/TopJSAnalysis/doCovarianceAndChi2.py | doCovarianceAndChi2.py | py | 28,157 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "ROOT.gROOT.SetBatch",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "ROOT.gROOT",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "optparse.OptionParser",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "collections.O... |
326429447 | import requests
from datetime import datetime
from bs4 import BeautifulSoup
import smtplib
from email.mime.text import MIMEText
from email.header import Header
import re
sender = 'lsc@server1.com'
receivers = ['568497207@qq.com']
def mail(i,j,k):
# 三个参数:第一个为文本内容,第二个 plain 设置文本格式,第三个 utf-8 设置编码
message = MIM... | null | chooseCourse.py | chooseCourse.py | py | 1,483 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "email.mime.text.MIMEText",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "email.header.Header",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "email.header.Header",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "emai... |
84084852 | # -*- coding: utf-8 -*-
"""
Created on Thu Mar 14 14:54:35 2013
Stores for EPAC
@author: edouard.duchesnay@cea.fr
"""
import os
import shutil
import sys
import joblib
import json
import inspect
import numpy as np
from abc import abstractmethod
from epac.configuration import conf
from epac.map_reduce.results import R... | null | epac/stores.py | stores.py | py | 19,535 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.urandom",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "numpy.ndarray",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "numpy.matrix",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "numpy.memmap",
"l... |
507528256 | ######################################################
# #
# A program by COCO DE VIENNE. #
# This software is licensed under the GNU GPL V3.0. #
# You can view a copy of the license here: #
# https://www.gnu.org/licenses/gpl-3.0.d... | null | env/lib/python3.5/site-packages/curl/__main__.py | __main__.py | py | 2,813 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sys.argv",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number"... |
203195760 | import pytest
import numpy as np
import matplotlib.pyplot as plt
import met1
default_student = 0
@pytest.mark.parametrize("student", [default_student])
def test_met1(student):
print(f'running met1 test for student #{student}')
N = student
A = np.array([[4, 1, 1],
[1... | null | 2sem-met1/py/test_met1.py | test_met1.py | py | 1,107 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.array",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"l... |
574530175 | """
Copyright (c) 2016 Keith Sterling
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute,... | null | src/programy/parser/template/nodes/interval.py | interval.py | py | 5,134 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "programy.parser.template.nodes.base.TemplateNode",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "programy.parser.template.nodes.base.TemplateNode.__init__",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "programy.parser.template.nodes.base.Te... |
284508532 | import pandas as pd
import json
import gzip
import os
import glob
from elastic import elastic
import yamale
import yaml
import datetime
import re
import math
def validator_yaml(yaml_file, schema_file):
"""Cette fonction permet de v
alider un fichier yaml
Keyword arguments: cfg : le yaml, schema: le v... | null | backend/ressources/scp-cdr/parsing/cdr_scp.py | cdr_scp.py | py | 9,053 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "yamale.make_data",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "yamale.make_schema",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "yamale.validate",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "yaml.load",
"... |
316246667 | # Importa a classe pygame
import pygame
import math
# Importa somente o metodo randint()
from random import randint
# Classe base para todos os sprites da tela
class BaseClass(pygame.sprite.Sprite):
# Lista com todos os sprites da tela
allSprites = pygame.sprite.Group()
# Construtor da classe
def __... | null | classes.py | classes.py | py | 3,627 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pygame.sprite",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "pygame.sprite.Group",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pygame.sprite",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "pygame.sprit... |
320093576 | from django.conf.urls import url,include
from .views import *
from blog import views
urlpatterns =[
url(r'^$',Backend, name= 'backend'),
url(r'^Inventory',Inventory, name= 'inventory'),
url(r'^edit/(?P<id>[\w.@+-]+)/$',edit_car, name= 'edit_car'),
url(r'^edit/(?P<id>[\w.@+-]+)/(?P<username>[\w.@+-]+)/$',edit... | null | dashboard/urls.py | urls.py | py | 1,910 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.conf.urls.url",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.co... |
190860935 | import requests, os
from kafka import KafkaProducer
from pyspark.sql import SparkSession, Row
def kafka_prod():
producer = KafkaProducer(bootstrap_servers='localhost:9092')
response = requests.get("https://raw.githubusercontent.com/platformps/Healthcare-Insurance-Data/master/ServiceArea.csv")
dat... | null | Data Engineering/ServiceArea.py | ServiceArea.py | py | 3,599 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "kafka.KafkaProducer",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "pyspark.sql.SparkSessi... |
623596412 | from django.contrib import admin
from .models import *
from django.utils.html import format_html_join, format_html
from django.contrib.postgres.fields import JSONField
from prettyjson import PrettyJSONWidget
@admin.register(PrinterProfile)
class PrinterProfileAdmin(admin.ModelAdmin):
list_display = ('name', 'base_... | null | slaicer/admin.py | admin.py | py | 4,892 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.contrib.admin.ModelAdmin",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.contrib.postgres.fields.JSONField",
"line_number": 11,
"usage_type": "name... |
24168231 | from collections import Counter
num_of_shoes = int(input())
shoes = list(map(int, input().split()))
k = int(input())
total_money = 0
shoe_count = dict(Counter(shoes))
for _ in range(k):
order = list(map(int, input().split()))
required_num = order[0]
money = order[1]
if required_num in ... | null | 53. collections.Counter().py | 53. collections.Counter().py | py | 471 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "collections.Counter",
"line_number": 9,
"usage_type": "call"
}
] |
443159762 | # coding:utf-8
import json
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from ..operation.inflexion import inflexion
@csrf_exempt
def get_inflexion(request):
rd = json.loads(request.body.decode('utf-8'))
stock = rd.get('stock_code', '000001')
strategy = rd.get('... | null | bigdata/apis/inflexion.py | inflexion.py | py | 799 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "json.loads",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "operation.inflexion.inflexion.get_inflexion",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "operation.inflexion.inflexion",
"line_number": 14,
"usage_type": "name"
},
{
... |
406578415 | from __future__ import unicode_literals
from six.moves import reduce
from ebb_lint.checkers.registration import register_checker
from ebb_lint.errors import Errors
def is_comprehension(pysyms, t):
if t == pysyms.comp_for:
return True
elif t == getattr(pysyms, 'list_for', None):
return True
... | null | ebb_lint/checkers/check_trailing_commas.py | check_trailing_commas.py | py | 1,514 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "six.moves.reduce",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "ebb_lint.errors.Errors.no_trailing_comma_in_literal",
"line_number": 48,
"usage_type": "attribute"
},
{
"api_name": "ebb_lint.errors.Errors",
"line_number": 48,
"usage_type": "name... |
285815118 | #!/usr/bin/python3
"""Tk_SOLUZION_Client.py
This file implements a simple "SOLUZION" client that
permits a user ("problem solver") to explore a search tree
for a suitably-formulated problem. The user only has to
input single-character commands to control the search.
Output is purely textual, and thus the complexi... | null | Tk_SOLUZION_Client.py | Tk_SOLUZION_Client.py | py | 8,496 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sys.argv",
"line_number": 180,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 190,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 193,
"usage_type": "attribute"
},
{
"api_name": "importlib.util.util.spec... |
397876080 | from math import pi, sin, cos
from panda3d.core import *
from direct.showbase.ShowBase import ShowBase
from direct.showbase import DirectObject
from direct.task import Task
import numpy as np
import sys
loadPrcFileData("",
"""sync-video #t
fullscreen #t
win-origin 0 0
... | null | handmapping_gabor.py | handmapping_gabor.py | py | 4,668 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "direct.showbase.ShowBase.ShowBase",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "direct.showbase.ShowBase.ShowBase.__init__",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "direct.showbase.ShowBase.ShowBase",
"line_number": 18,
"usag... |
299191639 | import os
import pytest
import shutil
from random import randint as rint
from tempfile import mkdtemp
import numpy as np
from .. npz import save_npz, lazynpz_from_dir, npz_from_dir, lazynpz_generator
from .. utils import get_hdfs
from . utils import create_spark_data
@pytest.fixture
def data():
return create_sp... | null | sparkeras/tests/test_npz.py | test_npz.py | py | 3,162 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "utils.create_spark_data",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pytest.fixture",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "pytest.fix... |
589042808 | import urllib.request
from xml.dom import minidom
from sqlalchemy import Column, Integer, String, Date, Float
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from datetime import date, datetime, timedelta
FIRST_DATE_KU... | null | scripts/kurses.py | kurses.py | py | 2,724 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "datetime.date",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.ext.declarative.declarative_base",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 17,
"usage_type": "call"
},
{
"api_na... |
325009585 | from ibis import Node,Problem_Resolving_Structure,RealTime_IBIS
from calc_sim import Calc_Sim_Doc2vec
#複数同時質問型に改良
'''
present_ibis -> refered_ibises
また、ibisが網羅され+ある程度の停滞を検出したら別のやつを提案する機能
新規かどうかは他のibisと比較してから判断
refered_ibisは idea木前提 -> 他の ibisを参照する必要なし?
'''
#これはあくまでrefered_ibisを更新するだけ 質問は他で
def update_refered_ibis(pr... | null | check_coverage.py | check_coverage.py | py | 5,133 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "ibis.all_already_discussed",
"line_number": 47,
"usage_type": "attribute"
},
{
"api_name": "ibis.get_root_node",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "ibis.get_phase_nodes",
"line_number": 52,
"usage_type": "call"
},
{
"api_name"... |
565210703 | """
Provides useful stuff, generally!
"""
from datetime import datetime
from collections import OrderedDict
from typing import Callable
from typing import Optional
import json
from pytz import timezone
class LimitedSizeDict(OrderedDict):
"""
LimitedSizeDict pops items from the first if the size of dictionary... | null | IGitt/Utils/__init__.py | __init__.py | py | 9,663 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "collections.OrderedDict",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "typing.Callable",
"line_number": 61,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.now",
"line_number": 107,
"usage_type": "call"
},
{
"api_name": "dateti... |
438169487 | import sys
import pickle
from sklearn.decomposition import PCA
import numpy as np
from scipy.interpolate import interp1d
from shapely.geometry import LineString
import scipy.io
def moving_average(a, n=3) :
ret = np.cumsum(a, dtype=float)
ret[n:] = ret[n:] - ret[:-n]
return ret[n - 1:] / n
def scarpOnPr... | null | scarpOnProfilePred.py | scarpOnProfilePred.py | py | 6,561 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.cumsum",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "sklearn.decomposition.PCA",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
... |
581554138 | import datetime
START_YEAR = 1974
START_DATE = datetime.datetime(year=1973, month=7, day=1)
MONTH_ABBRS = {
'Jan': 1, 'Feb': 2, 'Mar': 3, 'Apr': 4, 'May': 5, 'Jun': 6,
'Jul': 7, 'Aug': 8, 'Sep': 9, 'Oct': 10, 'Nov': 11, 'Dec': 12}
def target_years(current_date=datetime.datetime.now()):
"""Get a list of ... | null | util/time.py | time.py | py | 1,045 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "datetime.datetime",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 11,
"usage_type": "attribute"
}
] |
349817190 | """
Pytorch datasets for MNIST and CIFAR10, with splitting over several "workers".
User interface is provided with get_data_loaders_per_machine function.
"""
import numpy as np
import torch
from torch.utils.data import Dataset, DataLoader, Subset
import torchvision
import torchvision.transforms as transforms
from torc... | null | datasets.py | datasets.py | py | 2,434 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.arange",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.random.shuffle",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "torch.utils.data.... |
57733756 | """creditupi URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-bas... | null | creditupi/urls.py | urls.py | py | 1,461 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "rest_framework.routers.DefaultRouter",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "rest_framework.routers",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "creditupi.quickstart.views.UserViewSet",
"line_number": 23,
"usage_type": "at... |
253255879 | from scipy.interpolate import griddata
from scipy import optimize as sciopt
import numpy as np
import math
import subprocess
import pdb
import random
import os
import sys
import pickle
import json
import datetime
import sys
home_dir = os.getenv("HOME")
sys.path.insert(0, home_dir + '/phd-code/codes/')
import utilities... | null | EulerAerofoil/aerofoil_read_HM.py | aerofoil_read_HM.py | py | 8,130 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.getenv",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sys.path.insert",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime.now",
"... |
643404494 | import math
import os
import random
import torch
import torch.utils.data
import numpy as np
from librosa.util import normalize
from scipy.io.wavfile import read
from librosa.filters import mel as librosa_mel_fn
import soundfile as sf
class AudioProcessor2():
def __init__(self, params, device=torch.device("cpu")):... | null | msa_tts/utils/ap2.py | ap2.py | py | 3,066 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "torch.device",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "librosa.filters.mel",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "torch.from_numpy",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "torch.hann_window",... |
151615505 | from bs4 import BeautifulSoup
import requests
import re
import time
from shapely.geometry import Point, Polygon
import json
class FangTianXia:
def __init__(self, output_file):
self.url = 'http://newhouse.wuxi.fang.com/house/s/list/'
self.headers = {
'Accept': 'application/json, text/jav... | null | helpers/fangtianxia.py | fangtianxia.py | py | 4,288 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "requests.get",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "shapely.geometry.Polygon",
"line_number": 88,
"usage_type": "call"
},
{
"api_name": "shapely.geometry.Point",
"line_number": 89,
"usage_type": "call"
},
{
"api_name": "bs4.Beau... |
630615764 | import numpy as np
import math
import nltk
import pandas as pd
import random
from nltk.corpus import movie_reviews
class NaiveBayesClassifierBinary:
def __init__(self):
self.log_prior = {}
self.pos_words = {}
self.neg_words = {}
self.log_likelihood_pos = {}
self.log_likelih... | null | naive_bayes_binary_SA.py | naive_bayes_binary_SA.py | py | 5,711 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "math.log2",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "math.log2",
"line_number": 64,
"usage_type": "call"
},
{
"api_name": "math.log2",
"line_number": 67,
"usage_type": "call"
},
{
"api_name": "math.log2",
"line_number": 68,
... |
255948714 | import itertools
import os
import warnings
from intermol.forces import *
from intermol.gromacs.gromacs_parser import GromacsParser, default_gromacs_include_dir
from foyer.orderedset import OrderedSet
from foyer.atomtyper import find_atomtypes
def apply_forcefield(intermol_system, forcefield, debug=True):
"""App... | null | foyer/forcefield.py | forcefield.py | py | 13,604 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "foyer.atomtyper.find_atomtypes",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "foyer.orderedset.OrderedSet",
"line_number": 75,
"usage_type": "call"
},
{
"api_name": "foyer.orderedset.OrderedSet",
"line_number": 76,
"usage_type": "call"
},
{... |
303099386 | #!/usr/bin/python3
"""New view for City objects that handles all default RestFul API actions
"""
from api.v1.views import app_views
from flask import jsonify, abort, request
from models import storage
from models.state import State
from models.city import City
@app_views.route('/states/<state_id>/cities', methods=['... | null | api/v1/views/cities.py | cities.py | py | 2,733 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "models.storage.all",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "models.city.City",
"line_number": 16,
"usage_type": "argument"
},
{
"api_name": "models.storage",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "models.storage... |
210715297 | import sys
import os
import shutil
from config import Config, make_path
import subprocess
from src.commons.utils.file_manager import convert_xlsx2html
from src.controllers.device_controller import get_devices_schema_from_hostnamelist
from src.repositories.entity import Session
def run_script(script):
status = "Fa... | null | web/src/services/script_service.py | script_service.py | py | 3,753 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "config.Config.SCRIPTS_PATH",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "config.Config",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "src.repositories.entity.Session",
"line_number": 22,
"usage_type": "call"
},
{
"api... |
427782382 | #!/usr/bin/env python3
import pandas as pd
import numpy as np
import glob
import os.path
import argparse
import logging
import subprocess
def process_data(nci_path, output_path):
pd.set_option('display.max_columns', 500)
integrations = pd.DataFrame(columns = ['name']
+ ['i... | null | docker/data_prep_nci_integrations.py | data_prep_nci_integrations.py | py | 1,671 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pandas.set_option",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "logging.debug",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"lin... |
242433619 | import sys
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
from bs4 import BeautifulSoup
from MaltegoTransform import *
import config
MALTEGO = MaltegoTransform()
def output_to_maltego(name):
last_name = name.split(' ',1)[-1].strip()
first_name = name.replace(last_name, ... | null | SteamProfileRealName.py | SteamProfileRealName.py | py | 1,517 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "bs4.BeautifulSoup",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.firefox.options.Options",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "config.FIREFOX_BINARY_PATH",
"line_number": 32,
"usage_type": "attribute"
... |
103270396 | from setuptools import find_packages
from setuptools import setup
MAJOR_VERSION = '0'
MINOR_VERSION = '0'
MICRO_VERSION = '10'
VERSION = "{}.{}.{}".format(MAJOR_VERSION, MINOR_VERSION, MICRO_VERSION)
setup(name='access_points',
version=VERSION,
description="Scan your WiFi and get access point information ... | null | setup.py | setup.py | py | 677 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "setuptools.setup",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",
"line_number": 19,
"usage_type": "call"
}
] |
158774542 | import pytest
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '../..'))
from test_utils import TempDir
from bookkeeper.io import fs_manager
from bookkeeper.error.bkerror import BKError
@pytest.fixture(scope="module")
def tempd():
return TempDir("fs_manager")
class TestFsManager:
... | null | test/bookkeeper/io/test_fs_manager.py | test_fs_manager.py | py | 13,735 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sys.path.append",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": ... |
449158184 | # -*- coding: utf-8 -*-
from django import template
from evenements.lib.eventAddLink import getLinkList, getEventsLinkList, getSaisonLinkList
register = template.Library()
import datetime
from datetime import timedelta
@register.filter(is_safe=True)
def calendaraddlinklist(evenement):
text = u"<ul class=\"linklis... | null | evenements/templatetags/eventfilters.py | eventfilters.py | py | 1,511 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.template.Library",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.template",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "evenements.lib.eventAddLink.getLinkList",
"line_number": 12,
"usage_type": "call"
},
{
"api... |
484616048 | import math
from operator import mul
from functools import reduce
from funcy import ilen, any
def odd(n):
return (n % 2) == 1
def even(n):
return (n % 2) == 0
def gcd(a, b):
"Calculates the greatest common divisor of two numbers"
if (a, b) == (0, 0):
raise Exception('Gcd of 0 and 0 is unde... | null | int_utils.py | int_utils.py | py | 2,382 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "funcy.any",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "funcy.ilen",
"line_number": 73,
"usage_type": "call"
},
{
"api_name": "functools.reduce",
"line_number": ... |
623442618 | from geometry_msgs.msg import Pose
from collections import defaultdict
@nrp.MapRobotPublisher("neck_pitch", Topic('/robot/neck_pitch/pos', std_msgs.msg.Float64))
@nrp.MapRobotPublisher("neck_yaw", Topic('/robot/neck_yaw/pos', std_msgs.msg.Float64))
@nrp.MapRobotPublisher("neck_roll", Topic('/robot/neck_roll/pos', std... | null | TransferFunctions/GazeStabilization/move_head.py | move_head.py | py | 3,126 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "tf.transformations",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "geometry_msgs.msg.Pose",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": ... |
72041197 | import json
from django.db.utils import IntegrityError
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render, redirect
from django.views.decorators.csrf import csrf_exempt
from api.models import *
from api.utils.exception import UnAvailableException
from .backend.security impo... | null | api/views.py | views.py | py | 11,281 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.http.HttpResponse",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "django.http.HttpResponse",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "json.dum... |
106316207 | from __future__ import print_function, unicode_literals
import sys
import plac
from future.builtins import str
from snips_nlu_parsers import (
get_builtin_entity_shortname, get_supported_gazetteer_entities)
from snips_nlu import __about__
from snips_nlu.cli.download import download_from_resource_name
from snips... | null | snips_nlu/cli/download_entity.py | download_entity.py | py | 4,904 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "snips_nlu.cli.download.download_from_resource_name",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "snips_nlu.cli.utils.get_json",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "snips_nlu.__about__.__shortcuts__",
"line_number": 34,
"u... |
345236363 | from sklearn.datasets import make_blobs
import numpy as np
import random
from collections import Counter
import matplotlib.pyplot as plt
X,y = make_blobs(n_samples=150,
n_features=2,
centers=3,
cluster_std=0.5,
shuffle=True,
... | null | 320180941370-liujunjiao/Kmeans.py | Kmeans.py | py | 2,715 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sklearn.datasets.make_blobs",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.sqrt",
"... |
63014212 | from .models import *
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException
import time
import logging
try: # Pyth... | null | gumtree_bot/app/bot_post.py | bot_post.py | py | 2,165 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.Handler",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "django.conf.settings.STATICFILES_DIRS",
"line_number": 31,
"usage_type": "attribute"
},
{
... |
635072758 | #!/usr/bin/python2.7
# __*__ coding: utf-8 __*__
from django.shortcuts import render
# Create your views here.
#import os, json, shutil, time, datetime, re, xlwt, StringIO
from django.shortcuts import render, render_to_response, get_object_or_404, redirect
from django.core.urlresolvers import reverse
from django.ht... | null | auditlog/views.py | views.py | py | 2,634 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "users.models.User.objects.get",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "users.models.User.objects",
"line_number": 41,
"usage_type": "attribute"
},
{
"api_name": "users.models.User",
"line_number": 41,
"usage_type": "name"
},
{
"ap... |
38281756 | import cv2
import picamera
import picamera.array
import time
import numpy
#from fractions import Fraction
class cv_control:
def __init__(self):
self.lower = []
self.upper = []
# set lower and upper filter.
def set_filter(self,base_hvalue):
self.lower = numpy.array([base_hvalue... | null | 01-image-processing/opencv04.py | opencv04.py | py | 2,748 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.array",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.copy",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": ... |
219559840 | from tkinter import *
import tkinter as tk
from PIL import ImageTk,Image
import os
root = Tk()
root.title("NYPA Trasformation")
title = Label(root, text= "NYPA Transformation and Modelica Mass Simulation Tool", font=("Arial Bold", 17))
title.pack()
created = Label(root, text= "Created by: ALSET Laboratory, 2019-202... | null | packtrial.py | packtrial.py | py | 1,879 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "PIL.ImageTk.PhotoImage",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "PIL.ImageTk",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "PIL.Image.open",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"li... |
511872086 | import datetime
import time
from email.utils import formatdate, parsedate
from xml.sax.saxutils import escape, quoteattr
from django.conf import settings
from django.http import Http404, HttpResponse, HttpResponseNotAllowed, HttpResponseNotModified, StreamingHttpResponse
from django.shortcuts import redirect
from djan... | null | podcasts/views.py | views.py | py | 18,321 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pinecast.helpers.get_object_or_404",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "models.PodcastEpisode",
"line_number": 29,
"usage_type": "argument"
},
{
"api_name": "analytics.log.get_listen_obj",
"line_number": 33,
"usage_type": "call"
},
... |
472390316 | from PIL import Image, ImageDraw
from matplotlib import image as mpimg
import os
import pandas as pd
path = os.path.expanduser('~/Downloads/object-detection-crowdai/')
data = pd.read_csv(os.path.expanduser('~/Downloads/object-detection-crowdai/labels2.csv'))
sample = data.sample(frac=0.01, random_state=100)
rec = s... | null | draw_box.py | draw_box.py | py | 874 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.path.expanduser",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "pandas.read_csv",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path.expanduser",
... |
562457945 | # --------------------------------------------------------------------------------------------
# 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/service_hooks/v4_1/models/subscription.py | subscription.py | py | 4,427 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "msrest.serialization.Model",
"line_number": 12,
"usage_type": "name"
}
] |
481346101 | #!/usr/bin/env python
""" Use Astropy and get the current coordinates of Castor and print in cartesian form """
__author__ = "Yeb Havinga"
__license__ = "MIT"
from model.radec import *
from astropy import units as u
from astropy.coordinates import SkyCoord, cartesian_to_spherical, spherical_to_cartesian, EarthLocati... | null | experiments/starlookup.py | starlookup.py | py | 1,204 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "astropy.coordinates.EarthLocation",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "astropy.units.deg",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "astropy.units",
"line_number": 13,
"usage_type": "name"
},
{
"api_name":... |
98625052 | # coding: utf-8
def buttonhandle(sender):
#print sender.name
exec(sender.name+'()')
def showsidebar():
import ui
v=ui.load_view('editmenu')
v.present('sidebar')
def indent():
# """indent selected lines
import editor
import re
INDENTSTR='\t' #two spaces
i=editor.get_line_selection()
t=editor.get_text()
... | null | editmenu.py | editmenu.py | py | 1,033 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "ui.load_view",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "editor.get_line_selection",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "editor.get_text",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "editor.replace... |
186667366 | import numpy as np
from sklearn import svm
from sklearn.svm import SVC
from sklearn.metrics import accuracy_score
import csv
fields = []
rows = []
with open('data.csv', 'r') as csvfile:
csvreader = csv.reader(csvfile)
fields = next(csvreader)
for row in csvreader:
rows.append(row)
X = np.array([(... | null | clf_1dim.py | clf_1dim.py | py | 988 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "csv.reader",
"line_number": 11,
"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": "sklearn.svm.LinearSVC",
"line_... |
453080099 | # -*- coding: utf-8 -*-
import os
import sys
import random
import string
import datetime
import radar
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "thirdchance.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)... | null | first/thirdchance/2334.py | 2334.py | py | 4,139 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.environ.setdefault",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "django.core.management.execute_from_command_line",
"line_number": 14,
"usage_type": "call"
},
{... |
44981026 | #!/usr/bin/python3
#-----------------------------------------------------------------------------
# project: tkinterlite
# authors: 1966bc
# mailto: [giuseppe.costanzi@gmail.com]
# modify: 10/04/2017
# version: 0.1
#-----------------------------------------------------------------------------
import sys
... | null | dbms.py | dbms.py | py | 4,753 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sqlite3.connect",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "inspect.stack",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "sys.exc_info",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "sys.exc_info",
"line_n... |
208232028 | """
===========================================
Sparse coding with a precomputed dictionary
===========================================
Transform a signal as a sparse combination of Ricker wavelets. This example
visually compares different sparse coding methods using the
:class:`sklearn.decomposition.SparseCoder` esti... | null | examples/Extended Application/sklearn/examples/decomposition/plot_sparse_coding.py | plot_sparse_coding.py | py | 4,824 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "matplotlib.pyplot.cla",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 33,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.clf",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "matplot... |
574346936 | from __future__ import division #neccesary for cv2
import numpy as np #neccesary for cv2
import cv2
import camera_m as camera
from camera_m import removearray as remove_a #because of a bug we need a function for sorting through arrays
import geogebra_m as geo
camera0 = camera.setup(320,240) #width,height
slid... | null | sub_prot_rasp_main.py | sub_prot_rasp_main.py | py | 1,563 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "camera_m.setup",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "camera_m.setup_sliders",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "camera_m.read_sliders",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "camera_m.s... |
176918940 | #!/usr/bin/python
# -*- utf: coding-8 -*-
"""
Plays the best jams and/or intro music
"""
# IMPORT STANDARD LIBRARIES
import os.path, sys
import random
# IMPORT LOCAL LIBRARIES
import pygame.mixer, pygame.time
MIXER = pygame.mixer
TIME = pygame.time
def play_sound(sound):
#choose a desired audio format
MI... | null | Pipeline/the_LATEST/sys_PY/py_MODULES/playsound.py | playsound.py | py | 1,711 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pygame.mixer.mixer",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "pygame.mixer",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "pygame.mixer.time",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "pygame.mi... |
325255298 | #########
# Copyright (c) 2017 GigaSpaces Technologies Ltd. All rights reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | null | cfy_manager/utils/files.py | files.py | py | 4,618 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logger.get_logger",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "jinja2.Environment",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "jinja2.FileSystemLoader",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "logger.d... |
211727364 | #coding=utf-8
import multiprocessing, Queue
from multiprocessing import Process
from time import sleep
from datetime import datetime
class MultiProcess(multiprocessing.Process):
def __init__(self,process_id,param,queue,func):
multiprocessing.Process.__init__(self)
self.process_id ... | null | hadoop_mysql2hive/107_hdw_report/report_log/src/mult/__init__.py | __init__.py | py | 1,653 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "multiprocessing.Process",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "multiprocessing.Process.__init__",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "multiprocessing.Process",
"line_number": 15,
"usage_type": "attribute"
},
... |
599585549 | #!/usr/bin/env python3
# Copyright 2021 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | null | scripts/verify-docs.py | verify-docs.py | py | 12,252 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.path.join",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 42,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 65,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 6... |
456956129 | # -*- coding: utf-8 -*-
#
# File: bungeniremotesettings.py
#
# Copyright (c) 2008 by []
# Generator: ArchGenXML Version 2.1
# http://plone.org/products/archgenxml
#
# GNU General Public License (GPL)
#
__author__ = """unknown <unknown>"""
__docformat__ = 'plaintext'
from AccessControl import ClassSecurityI... | null | plone.products/bungeniremotecontent/trunk/bungeniremotesettings.py | bungeniremotesettings.py | py | 3,325 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "Products.CMFCore.utils.UniqueObject",
"line_number": 83,
"usage_type": "name"
},
{
"api_name": "Products.CMFDynamicViewFTI.browserdefault.BrowserDefaultMixin",
"line_number": 83,
"usage_type": "name"
},
{
"api_name": "AccessControl.ClassSecurityInfo",
"line_num... |
178146645 | from io import StringIO
import logging
from typing import Dict, Callable, List, Optional, Sequence
from functools import partial
import numpy as np
from qcodes import VisaInstrument, validators as vals
from qcodes import InstrumentChannel, ChannelList, Instrument
from qcodes import ArrayParameter, ParameterWithSetpoi... | null | qcodes/instrument_drivers/Keysight/InfiniiVision.py | InfiniiVision.py | py | 28,317 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.getLogger",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "qcodes.ArrayParameter",
"line_number": 135,
"usage_type": "name"
},
{
"api_name": "typing.Sequence",
"line_number": 170,
"usage_type": "name"
},
{
"api_name": "typing.Sequ... |
441637857 | import socket
import json
import time
import sys
from pynput import keyboard
class PiRobot:
def __init__(self,rid,ip):
self.ip = ip
self.rid = rid
# self.ip = '192.168.3.2'
self.in_port = 4999 #into the robot
self.out_port = 4999 #outof the robot
def send_message(self,d... | null | interface.py | interface.py | py | 3,792 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "json.dumps",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "socket.socket",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "socket.AF_INET",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "socket.SOCK_DGRAM",
... |
244335557 | import tkinter as tk
from tkinter import messagebox
import json
import csv
import random
from itertools import combinations
from .baseframe import BaseFrame
class NasaTLX(BaseFrame):
def __init__(self, master, path='./data/nasa_tlx/', fname=None):
super().__init__(master)
self.path = path
... | null | tasks/frames/nasa_tlx.py | nasa_tlx.py | py | 7,718 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "baseframe.BaseFrame",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "tkinter.IntVar",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "tkinter.StringVar",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "tkinter.Label",
... |
95129474 | #!/usr/bin/python3
'''
Abstract:
This is a program for plotting the corner plot of given band index.
Usage:
plot_corner.py [band index code] [sed table] [cls table]
e.g. $plot_corner.py 678 sed_table.txt cls_table.txt
A corner plot of band 6, 7, and 8 will be returned.
Output:
1. The figure of corn... | null | plot_corner.py | plot_corner.py | py | 6,996 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "convert_lib.mJy_to_mag_noerr",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "convert_lib.mJy_to_mag_noerr",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "convert_lib.mJy_to_mag_noerr",
"line_number": 51,
"usage_type": "call"
},
{... |
229695329 | import flask
from flask import request, make_response
import tensorflow as tf
from keras.models import load_model
from google.cloud import translate
import numpy as np
from sklearn.feature_extraction.text import TfidfVectorizer
from stemming.porter2 import stem
import string
import re
import pickle
from tens... | null | Assignment 4/Code/API/app.py | app.py | py | 2,573 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pickle.load",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "keras.models.load_model",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "tensorflow.keras.mode... |
316618014 | from io import StringIO
import unittest
import html_render
class HtmlRenderTest(unittest.TestCase):
def test_basic_tags(self):
tags = ('Body', 'Head', 'Ul', 'Li')
for t in tags:
expected = '<{tag}>\n\n</{tag}>'.format(tag=t.lower())
page = eval('html_render.{tag}()'.format... | null | students/HarveyHerela/lesson07/html_render_test.py | html_render_test.py | py | 3,362 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "unittest.TestCase",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "io.StringIO",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "html_render.Html",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "io.StringIO",
... |
216912378 | # -*- coding: utf-8 -*-
"""
Workflow and workflow proxy base class definitions.
"""
__all__ = ["BaseWorkflow", "workflow_property", "cached_workflow_property"]
import sys
import functools
import logging
from collections import OrderedDict
from abc import abstractmethod
import luigi
import six
from law.task.base ... | null | law/workflow/base.py | base.py | py | 21,704 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.getLogger",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "law.task.base.ProxyTask",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "collections.OrderedDict",
"line_number": 82,
"usage_type": "call"
},
{
"api_name": "law... |
49350978 | import os
import sys
import json
import time
import filecmp
DEFAULT_PATH = 'C:\\'
def find_same_names(files, starting_point=DEFAULT_PATH):
""" Finds and groups files in directory that have same names
Args:
files: List representing files and its directories
starting_point: Pat... | null | sameFilesScan.py | sameFilesScan.py | py | 5,587 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.stat",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.stat",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "os.walk",
"line_number": 92,
"usage... |
200324426 | #!/usr/bin/env python
from src.pipeline.stack import Stack
from glob import glob
import argparse
from astropy.io import fits
import os
import sys
class MyParser(argparse.ArgumentParser):
def error(self, message):
sys.stderr.write('error: %s\n' % message)
self.print_help()
sys.exit(2)
if... | null | run_stack.py | run_stack.py | py | 770 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "sys.stderr.write",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "sys.stderr",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "sys.exi... |
584020699 | import discord
import asyncio
import logging
from plugin_manager import PluginManager
log = logging.getLogger('discord')
class Ene(discord.Client):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.prefix = 'ene!' if kwargs.get('prefix') is None else kwargs.get('prefix')
... | null | ene.py | ene.py | py | 3,796 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.getLogger",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "discord.Client",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "plugin_manager.PluginManager",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "disc... |
238691390 | from setuptools import setup
import os
"""
Publish by building the package:
python setup.py sdist
and then uploading:
twine upload dist/<NAME>-<version>.tar.gz
"""
NAME = "pyapputil"
setup(
name = NAME,
version = "1.0.26",
author = "Carl Seelye",
author_email = "cseelye@gmail.com",
descrip... | null | pypi_install_script/pyapputil-1.0.26.tar/setup.py | setup.py | py | 735 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "setuptools.setup",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"lin... |
461891377 | from flask import Flask, request, render_template, redirect, url_for
import hashlib
app = Flask(__name__)
@app.route("/", methods=["GET", "POST"])
def index():
if request.method != "POST" or "text" not in request.form:
return render_template('index.html')
digests = []
for algo in hashlib.algorithms:
h = hash... | null | hashme.py | hashme.py | py | 529 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "flask.Flask",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "flask.request.method",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "flask.request.form",... |
595041657 | import re
from tornado import web
from imbi.endpoints import base
class RequestHandler(base.ValidatingRequestHandler):
NAME = 'activity-feed'
SQL = re.sub(r'\s+', ' ', """\
SELECT "when", namespace_id, namespace, project_id, project_name,
project_type, who, display_name, email_addr... | null | imbi/endpoints/activity_feed.py | activity_feed.py | py | 790 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "imbi.endpoints.base.ValidatingRequestHandler",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "imbi.endpoints.base",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "re.sub",
"line_number": 12,
"usage_type": "call"
},
{
"api_na... |
608836690 | # -*- coding: utf-8 -*-
# @Time : 1/15/18 9:03 AM
# @Author : LeeYun
# @File : main_0111_gru.py
'''Description :
'''
import os,numba,string,pickle,re,nltk,time,time_utils,logging_utils,gc
from vanila_conv1d_utils import vanila_conv1d_Regressor
from vanila_GRU_utils import vanila_GRU_Regressor
from vanila_FTRL_u... | null | main_0119_FTRL-Copy1.py | main_0119_FTRL-Copy1.py | py | 23,056 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pickle.dump",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "fastcache.clru_cache",
"line_number": 98,
"usage_type": "call"
},
{
"api_name": "fastcache.clru_cache",
... |
609497924 | import sys
import json
from pprint import pprint
import re
import os
def newKML(place):
kml = [
'<?xml version="1.0" encoding="UTF-8"?>',
'<kml xmlns="http://www.opengis.net/kml/2.2"><Document>',
place,
'</Document></kml>'
]
return "\n".join(kml)
def newPlace(name, coord)... | null | cmd/exportSPtoKML.py | exportSPtoKML.py | py | 1,184 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "json.load",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "os.path.splitext",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 47... |
257384953 | from datacube_wms.product_ranges import update_all_ranges, update_range
from datacube import Datacube
import click
@click.command()
@click.option("--product", default=None)
def main(product):
dc = Datacube(app="wms_update_ranges")
if (product is not None):
print("Updating range for: ", product)
... | null | docker/auxiliary/index/assets/update_ranges.py | update_ranges.py | py | 861 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "datacube.Datacube",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "datacube_wms.product_ranges.update_range",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "datacube_wms.product_ranges.update_all_ranges",
"line_number": 14,
"usage_type"... |
75422990 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
from subprocess import Popen
import time
import os, sys
class Checker:
def __init__(self, rev1, rev2):
self.__rev1 = rev1
self.__rev2 = rev2
self.dir = os.getcwd()
def create_work_dir(self):
dir_name = 'SimplifySettingsCheckers'... | null | SimplifySettingsChecker_P4_GetMapList.py | SimplifySettingsChecker_P4_GetMapList.py | py | 7,553 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.getcwd",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "os.mkdir",
"line_number": 20,... |
157381230 | import json
from django.conf import settings
from nose.tools import eq_
from sumo.tests import post, LocalizingClient, TestCase
from upload.forms import MSG_IMAGE_LONG
from upload.models import ImageAttachment
class UploadImageTestCase(TestCase):
fixtures = ['users.json', 'questions.json']
def setUp(self)... | null | apps/upload/tests/test_views.py | test_views.py | py | 5,786 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sumo.tests.TestCase",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "sumo.tests.LocalizingClient",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "upload.models.ImageAttachment.objects.all",
"line_number": 21,
"usage_type": "call"
},
... |
272342595 | import pathlib
from typing import TYPE_CHECKING, List, Optional, Union
import numpy as np
from ray.data.datasource.binary_datasource import BinaryDatasource
from ray.data.datasource.datasource import Reader
from ray.data.datasource.file_based_datasource import (
_resolve_paths_and_filesystem,
FileExtensionFilt... | null | python/ray/data/datasource/image_folder_datasource.py | image_folder_datasource.py | py | 5,020 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "ray.data.datasource.binary_datasource.BinaryDatasource",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "typing.Union",
"line_number": 80,
"usage_type": "name"
},
... |
111625224 | """
DIRBS package for logging and metrics.
Copyright (c) 2018 Qualcomm Technologies, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the
limitations in the disclaimer below) provided that the following conditions are met:
* ... | null | src/dirbs/logging/__init__.py | __init__.py | py | 9,087 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.Formatter",
"line_number": 54,
"usage_type": "attribute"
},
{
"api_name": "re.compile",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "logging.Filter",
"line_number": 74,
"usage_type": "attribute"
},
{
"api_name": "logging.INFO",
... |
507842371 | import sys
import numpy as np,io
from sklearn.ensemble import GradientBoostingClassifier
from feature_engineering import refuting_features, polarity_features, hand_features, gen_or_load_feats
from feature_engineering import word_overlap_features
from utils.dataset import DataSet
from utils.generate_test_splits import ... | null | fnc_kfold.py | fnc_kfold.py | py | 3,864 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "keras.models.Sequential",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "keras.layers.Dense",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "keras.layers.Activation",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "ke... |
324391254 | import requests
class BuscaCep:
def __init__(self, cep):
cep = str(cep)
if (self.valida(cep)):
self.cep = cep
else:
raise ValueError("CEP inválido!")
def __str__(self):
return self.format_cep()
def valida(self, cep):
if (len(cep) == 8):
return True
else:
return False
def format_cep(self... | null | acessoCep.py | acessoCep.py | py | 599 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "requests.get",
"line_number": 26,
"usage_type": "call"
}
] |
397272010 | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | null | official/nlp/modeling/models/xlnet.py | xlnet.py | py | 3,434 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "tensorflow.keras",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "typing.Union",
"line_number": 45,
"usage_type": "name"
},
{
"api_name": "tensorflow.keras",
"line_number": 45,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.k... |
335022069 | from collections import OrderedDict
from ._base import Base
class IsSensor(Base):
def __init__(self, yaq_client, *, name=None):
super().__init__(yaq_client, name=name)
self.trigger() # need to run once to get channel information
self._yaq_channel_names = self.yaq_client.get_channel_names... | null | yaqc_bluesky/_is_sensor.py | _is_sensor.py | py | 1,376 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "_base.Base",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "collections.OrderedDict",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "collections.OrderedDict",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "collections... |
422861248 | # Matt Robinson, matthew.robinson@postera.ai
# Compile all of the shipped mols from `shipments_data/` into `all_received_mols.csv`
# general imports
import numpy as np
import pandas as pd
from rdkit import Chem
from rdkit.Chem import Descriptors
from rdkit.Chem import AllChem
from chembl_structure_pipeline import st... | null | shipments_data/get_all_received_mols.py | get_all_received_mols.py | py | 2,846 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pathlib.Path",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "rdkit.Chem.MolToSmiles",... |
535820547 | import discord as dsc
import mysql.connector as sql
import configparser as cfg
configuration = cfg.ConfigParser()
configuration.read("discord.ini")
database = sql.connect(user=configuration.get("login","username"), password=configuration.get("login","password"), host=configuration.get("login","host"), database=config... | null | Discord.py | Discord.py | py | 3,025 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "configparser.ConfigParser",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "mysql.connector.connect",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "mysql.connector",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "discor... |
329036846 | '''
Created on May 26, 2017
@author: Koko
'''
import os
from xml.dom import minidom
import scrapy
class SubCardDatabaseSpider(scrapy.Spider):
name = "database_sub"
allowed_domains = ["wiki.dengekionline.com"]
custom_settings = {
'FEED_FORMAT': 'csv',
'FEED_URI': 'results/card_database.cs... | null | hoshimori/hoshimori/spiders/card_database_sub_spider.py | card_database_sub_spider.py | py | 4,451 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "scrapy.Spider",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "xml.dom.minidom.parse",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "xml.dom.minidom",
"line_number": 34,
"usage_type": "name"
},
{
"api_name": "scrapy.Reque... |
328077805 | import sys
import os.path
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'external'))
import arcpy
from collections import OrderedDict
from gistools.utils.collection import MemCollection
from gistools.tools.dwp_tools import get_leggerprofiel
from utils.addresulttodisplay import add_result_to... | null | 4_a2_getleggerpunten.py | 4_a2_getleggerpunten.py | py | 6,718 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sys.path.append",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "os.path.path.join",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "os.path.path",
"line... |
445925043 | import os
from conans import tools, ConanFile
available_versions = ["3.9.0", "3.8.2", "3.8.1", "3.8.0",
"3.7.2", "3.7.1", "3.7.0", "3.6.3",
"3.6.2", "3.6.1", "3.6.0", "3.5.2",
"3.4.3", "3.3.2", "3.2.3", "3.1.3",
"3.0.2", "2.8.12"]
... | null | conanfile.py | conanfile.py | py | 3,029 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "conans.ConanFile",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "conans.tools.download",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "conans.tools",
"line_number": 50,
"usage_type": "name"
},
{
"api_name": "conans.tools.unzi... |
107057319 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | null | fromMNIST/changefromminist.py | changefromminist.py | py | 7,477 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.random.randint",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "numpy.... |
596934328 | import igraph
from api import get_friends, get_name
from igraph import Graph, plot
def get_network(users_ids, as_edgelist=True):
""" Нахождение связей для произвольного списка пользователей """
vertices = []
vert_names = []
for user_id in users_ids:
if user_id not in vertices:
u... | null | homework04/network.py | network.py | py | 3,270 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "api.get_name",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "api.get_friends",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "api.get_friends",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "api.get_friends",
"l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.