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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3539038 | import os
from tags import grammems, unacceptable, analogies
import pymorphy2
import nltk
from telegram.ext import Updater, CommandHandler, MessageHandler
"""Telegram Bot for linguistics morphology analysis. Reply with
morphemes of sent words and can suggest morphemes for unknown words.
Works only with russian languag... | null | bot.py | bot.py | py | 2,830 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "nltk.download",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pymorphy2.MorphAnalyzer",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "tags.analogies",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "tags.grammems.it... |
214847651 | import logging
import re
from sretoolbox.utils import threaded
import e2e_tests.test_base as tb
from reconcile.utils.defer import defer
QONTRACT_E2E_TEST = "default-project-labels"
def test_cluster(cluster, oc_map, pattern):
oc = oc_map.get(cluster)
if not oc:
logging.log(level=oc.log_level, msg=oc... | null | e2e_tests/default_project_labels.py | default_project_labels.py | py | 1,537 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.log",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "logging.info",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "re.search",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "logging.info",
"line_number": ... |
588931407 | import datetime
import json
from sqlalchemy.sql import text, func
from app import db
from models import *
from mail import admin_email
from models import User
from stats_html_helper import *
from configs import production_config as config
from stats_queries import *
def weekly_macro_metrics():
questions_asked =... | null | franklyapi/analytics/stats.py | stats.py | py | 14,198 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "datetime.datetime.now",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime.now",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "da... |
572890314 | import pandas as pd
import pandasql as pdsql
# Exercises - http://www.itversity.com/topic/exercises-python-collections-and-pandas/
#
# def getOrderRevenue(orderItems, orderId):
# orderRevenue = orderItems.loc[orderItems['order_item_order_id'] == 2].sum()
# #orderRevenue = orderItems.loc[orderItems['order_ite... | null | PandaSQLDemo.py | PandaSQLDemo.py | py | 3,994 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pandas.read_csv",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "pandasql.sqldf",
"line_number": 64,
"usage_type": "call"
}
] |
583120965 | # Base file for taking interop data output and converting to QGC files. Files for the UGV and UAV are outputted.
import math
import json
from pyproj import Proj
import os
# Navigate to Mision File Directory and Load Mission from File
os.chdir(os.path.dirname(os.path.realpath(__file__)))
os.chdir('..')
missi... | null | Mission_Creator_QGC/mission_to_files.py | mission_to_files.py | py | 14,466 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.chdir",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.path.realpath",
"line_numbe... |
325831513 | # -*- coding: utf-8 -*-
import base64
import os.path
def base64_encode(input_filename):
with open(input_filename, "rb") as input_file:
encoded_string = base64.b64encode(input_file.read())
return encoded_string
def prepare_file(output_file):
output_file.write("// Auto-generated file\n\n");
output_file.write("... | null | external/generate_script.py | generate_script.py | py | 1,509 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "base64.b64encode",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path.listdir",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "os.path.path.join",
"line... |
283689397 | import math
from easygui import msgbox,integerbox
#cour 2 exo 1
'''entre = float(input("Votre chiffre ?"))
if entre >= 0:
print(math.sqrt(entre))
else:
print("Erreur ton chiffre est négatif")'''
#cour 2 exo 2
'''mot1 = input('premier mot ? ')
mot2 = input('deuxieme mot ? ')
if mot1 < mot2:
print(mot1)
e... | null | Exo2.py | Exo2.py | py | 2,454 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "easygui.integerbox",
"line_number": 100,
"usage_type": "call"
},
{
"api_name": "easygui.msgbox",
"line_number": 108,
"usage_type": "call"
},
{
"api_name": "easygui.msgbox",
"line_number": 111,
"usage_type": "call"
},
{
"api_name": "easygui.integerbo... |
58929056 | from django.conf.urls import url, patterns
from contingent_report.views.uploads import LCRegisterUpdateView
from .views import (UploadContingentReportView,
TIPostingStatusUploadView,
LCRegisterUploadView,
EarningsReportFormView,
TIFlexDateP... | null | contingent_report/urls.py | urls.py | py | 2,948 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.conf.urls.patterns",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "views.UploadContingentReportView.as_view",
"line_number": 24,
"usage_type": "call"
},
... |
34539626 |
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from orm_setup import Base, Caso
engine = create_engine("postgres://vagrant:laCumbre1@/law")
Base.metadata.bind = engine
DBSession = sessionmaker(bind=engine)
session = DBSession()
# Penal
caso1 = Caso(categoria="penal", creado='2018/2/19'... | null | database_setup.py | database_setup.py | py | 5,602 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sqlalchemy.create_engine",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "orm_setup.Base.metadata",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "orm_setup.Base",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "sql... |
359315873 | """Tests for citrine.informatics.descriptors."""
import json
import pytest
from citrine.informatics.descriptors import *
from citrine.informatics.descriptors import InorganicDescriptor
@pytest.fixture(params=[
RealDescriptor('alpha', 0, 100),
ChemicalFormulaDescriptor('formula'),
MolecularStructureDescr... | null | tests/informatics/test_descriptors.py | test_descriptors.py | py | 2,325 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pytest.fixture",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "citrine.informatics.descriptors.InorganicDescriptor",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "pytest.raises",
"line_number": 62,
"usage_type": "call"
},
{
"... |
284260790 | # author: Sabyasachee
import numpy as np
import torch
from torch import nn
from transformers import BertModel, BertConfig
from torchcrf import CRF
import config
class OpinionRoleLabeller(nn.Module):
def __init__(self, pretrained_model_name):
super().__init__()
self.encoder = BertModel.from_pretra... | null | 05-opinion-mining/models/OpinionMinerV1.py | OpinionMinerV1.py | py | 17,853 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "torch.nn.Module",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "transformers.BertModel.from_pretrained",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "... |
468000283 | from analysis.common import *
from data.cdn.sof_cdn import QuestionsCDN, TagsCDN, CoreTagClfCache, TagRelatedCache
import numpy as np
from data.models.sof_models import Tag, QuestionTags
class TagClassifier(object):
def __init__(self, min_question_num=100, min_weight=0.1,
update=False, from_db=T... | null | analysis/classify_tag_v2.py | classify_tag_v2.py | py | 5,969 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "data.cdn.sof_cdn.CoreTagClfCache.get",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "data.cdn.sof_cdn.CoreTagClfCache",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "data.cdn.sof_cdn.QuestionsCDN.get_tag_questions_cached",
"line_number":... |
605329980 | from .base import DataSourceMixin
class ZarrSource(DataSourceMixin):
"""Open a xarray dataset.
Parameters
----------
urlpath: str
Path to source. This can be a local directory or a remote data
service (i.e., with a protocol specifier like ``'s3://``).
storage_options: dict
... | null | intake_xarray/xzarr.py | xzarr.py | py | 1,576 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "base.DataSourceMixin",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "fsspec.__version__",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "fsspec.utils.infer_storage_options",
"line_number": 33,
"usage_type": "call"
},
{
"ap... |
637970199 | import math
from datetime import datetime, timedelta
# Only if needed
#from dateutil.parser import parse as parse_iso8601
#from kombu.utils import partition
############## str.partition/str.rpartition #################################
def _compat_rl_partition(S, sep, direction=None, reverse=False):
items = dir... | null | docker/app/app/backend/apps/stats/archive/timeutils.py | timeutils.py | py | 5,503 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "datetime.timedelta",
"line_number": 79,
"usage_type": "argument"
},
{
"api_name": "math.ceil",
"line_number": 81,
"usage_type": "call"
},
{
"api_name": "math.ceil",
"line_number": 82,
"usage_type": "call"
},
{
"api_name": "math.ceil",
"line_numb... |
115178505 | import log
import colors
log = log.logger
class Unit:
def __init__(self, data):
self.name = data["name"]
self.y = data["y"]
self.x = data["x"]
self.max_health = data["max_health"]
self.current_health = data["current_health"]
self.controller = data["controller"]
... | null | terminal/unit.py | unit.py | py | 1,982 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "log.logger",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "state.State",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "state.get_state",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "state.get_state",
"lin... |
160774453 | import time
import Adafruit_GPIO.SPI as SPI
import Adafruit_SSD1306
from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont
import subprocess
RST = None
DC = 23
SPI_PORT = 0
SPI_DEVICE = 0
disp = Adafruit_SSD1306.SSD1306_128_32(rst=RST)
# Initialize library.
disp.begin()
# Clear display.
disp.cl... | null | node/oled.py | oled.py | py | 1,893 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "Adafruit_SSD1306.SSD1306_128_32",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "PIL.Image.new",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "PIL.ImageDraw... |
723171 | # coding=UTF-8
import networkx as nx
import matplotlib.pyplot as plt
import math
import re as re
from matplotlib.patches import FancyArrowPatch, Circle
import numpy as np
import matplotlib.patches as mpatches
import db_helper
import statistic_analysis
class GraphSql(object):
def __init__(self):
self._sql... | null | Virtual_Analysis_0.3.3/social_network_graphs.py | social_network_graphs.py | py | 3,488 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "db_helper.create_table",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "db_helper.clear_table",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "statistic_analysis.get_ip_connect_dict",
"line_number": 26,
"usage_type": "call"
},
{
... |
345051420 | import matplotlib.pyplot as plt
import numpy as np
#ATRIBUIÇÃO DE CONSTANTES
if True:
#glucose
mium_gluc = 0.66
qpm_gluc = 2
Ks_gluc = 0.565
Kp_gluc = 1.34
Kis_gluc = 284
Kip_gluc = 4890
Pm_sub_gluc = 95
Pm_prod_gluc = 103
b_gluc = 1.29
g_gluc = 1.42
ms_gluc = 0.097
... | null | old/quimiostato.py | quimiostato.py | py | 6,755 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.linspace",
"line_number": 64,
"usage_type": "call"
},
{
"api_name": "numpy.linspace",
"line_number": 65,
"usage_type": "call"
},
{
"api_name": "numpy.linspace",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure... |
484439453 | import telebot
import random
import time, re
import time
import pyowm
import requests
from mqtt import *
import datetime
import reader
import os
from dotenv import load_dotenv
import codecs
token=load_dotenv()
token = os.getenv('TOKEN')
print(token)
f = codecs.open( 'taxinumbers.txt', "r", "utf_8_sig... | null | bot.py | bot.py | py | 14,494 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "codecs.open",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "telebot.types.ReplyKeyboardM... |
333292816 | # -*- coding: utf-8 -*-
import csv
import os
import re
import urllib
import pdfkit
import requests
import time
from PyPDF2 import PdfFileReader
from bs4 import BeautifulSoup
from fpdf import FPDF
choices = ['Реестр изобретений', 'Реестр заявок на выдачу патента на изобретение',
'Реестр полезных моделей']
... | null | loadPatents.py | loadPatents.py | py | 4,395 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "requests.get",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_nu... |
119998916 | from config import *
import discord, datetime, re, asyncio, typing
from discord.ext import commands
from discord import app_commands
import logging
# logging.basicConfig(level=logging.INFO)
class CanvasBot(commands.Bot):
async def is_owner(self, user: discord.User):
if user.id in self.allowedusers: # Imp... | null | main.py | main.py | py | 12,027 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "discord.ext.commands.Bot",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "discord.User",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "di... |
357834859 | from prefect import Flow
from prefect.tasks.shell import ShellTask
pwd_task = ShellTask(name="Onde estou?", command="pwd", stream_output=True)
whoami_task = ShellTask(name="Quem sou eu?", command="whoami", stream_output=True)
with Flow("biblioteca_tarefas") as flow:
pwd = pwd_task()
whoami = whoami_task()
if... | null | exemplos/conceitos/biblioteca_tarefas.py | biblioteca_tarefas.py | py | 389 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "prefect.tasks.shell.ShellTask",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "prefect.tasks.shell.ShellTask",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "prefect.Flow",
"line_number": 7,
"usage_type": "call"
}
] |
20492324 | import cv2
cap=cv2.VideoCapture(0)
while (cap.isOpened()):
ret,img=cap.read()
img=cv2.flip(img,1)
cv2.rectangle(img,(30,30),(280,280),(255,255,1),3)
cv2.imshow("frame",img)
img1=img[30:280,30:280]
imcopy=img1.copy()
cv2.imshow("frame2",img1)
white=cv2.cvtColor(img1,cv2.COLOR_... | null | camera2.py | camera2.py | py | 846 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "cv2.flip",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cv2.rectangle",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line_number": ... |
284694874 | # -*- coding: utf-8 -*-
import cv2
from nefi2.model.algorithms._alg import *
__authors__ = {"Sebastian Schattner": "s9sescat@stud.uni-saarland.de"}
class AlgBody(Algorithm):
"""Color enhancement algorithm implementation"""
def __init__(self):
Algorithm.__init__(self)
self.name = "Color enhanc... | null | Sebastian_Algorithms_untested/color_enchance.py | color_enchance.py | py | 2,418 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "cv2.split",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "cv2.merge",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "cv2.calcHist",
"line_number": 38,
"usage_type": "call"
}
] |
417568716 | import sys
import requests
from bs4 import BeautifulSoup
def get_google_spelling(phrase):
page = get_page(phrase)
spell_tag = get_spell_tag(page)
if spell_tag is None or spell_tag.text == "":
return phrase
else:
return spell_tag.text
def get_spell_tag(page):
soup = Beautifu... | null | Scripts/google_spell_check.py | google_spell_check.py | py | 836 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "bs4.BeautifulSoup",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 33,
"usage_type": "call"
}
] |
141687600 | from settings.base import *
import dj_database_url
import os
GDAL_LIBRARY_PATH = os.getenv('GDAL_LIBRARY_PATH')
# GEOS_LIBRARY_PATH = os.getenv('GEOS_LIBRARY_PATH')
SECRET_KEY = os.environ.get("TP_SECRET_KEY", "youshouldntusethisoneinprod")
GOOGLE_MAPS_API_KEY = os.environ.get("TP_GOOGLE_MAPS_API_KEY")
GOOGLE_CLIENT_... | null | settings/prod.py | prod.py | py | 690 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.getenv",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.environ.get",
"line_numb... |
209420395 | from flask import Flask
from app2 import RSAcode2
from cryptography.hazmat.primitives import serialization
import random
import hashlib
app = Flask(__name__)
@app.route('/returnSign/<int:aadhaar_no>',methods={'GET'})
def returnSign(aadhaar_no):
obj = RSAcode2.RSA()
priv,pub = obj.gen_key_pair()
global pem
pem =... | null | mockAadharServer3.py | mockAadharServer3.py | py | 1,342 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "flask.Flask",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "app2.RSAcode2.RSA",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "app2.RSAcode2",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "cryptography.hazmat.primit... |
542769054 | #Import relevant libraries - may get deprecated warnings - these libraries are only used to tune hyperparatmeters and code will still run regardless
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
import pandas as pd
from sklearn.cross_validation import StratifiedKFold
from sklearn.grid_search i... | null | Code/randomforest.py | randomforest.py | py | 7,768 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pandas.read_csv",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pandas.get_dummies",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "pandas.concat",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "pandas.get_dummies",... |
645476882 | import json
from datetime import datetime
import parsing
from constantes import base_url, separator
def get_json_data_dict(filename):
file = open(f'{filename}.json')
json_data_dict = json.load(file)
file.close()
return json_data_dict
def get_daily_schedule(group_id, week_day):
html = parsing.ge... | null | functions.py | functions.py | py | 2,559 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "json.load",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "parsing.get_html",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "constantes.base_url",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "parsing.get_data_dict"... |
107490915 | import tinydb
import config
import log
credit_does_not_exist_text = "Sorry %s,\nbut this credit doesn't exist."
credit_does_not_belong_to_you_text = "Sorry %s,\nbut this credit doesn't belong to you. Ask %s to undo it for you."
db_credits = tinydb.TinyDB(config.config['db.credits.path'])
def add_credit_if_missing... | null | database.py | database.py | py | 2,185 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "tinydb.TinyDB",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "config.config",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "tinydb.Query",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "log.logging.warning",
... |
10517972 | from openerp import models, fields, api, exceptions, _
import xml.etree.ElementTree as xee
class RegisterReport(models.TransientModel):
_name = 'contribution.register.report'
_description = "Contribution Register Report"
employee_id = fields.Many2one('hr.employee',string="Employee")
pay_from_... | null | register_report_branch/model/register_report.py | register_report.py | py | 7,622 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "openerp.models.TransientModel",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "openerp.models",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "openerp.fields.Many2one",
"line_number": 9,
"usage_type": "call"
},
{
"api_name":... |
109512134 | # -*- coding: utf-8 -*-
from distutils.version import LooseVersion
from unittest import skipIf, skipUnless
from django.core.exceptions import ValidationError
from django.utils.encoding import force_text
from cms import __version__
from cms.api import add_plugin, create_page
from cms.models import Placeholder, StaticP... | null | tests/test_model.py | test_model.py | py | 6,328 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "distutils.version.LooseVersion",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "cms.__version__",
"line_number": 17,
"usage_type": "argument"
},
{
"api_name": "djangocms_helper.base_test.BaseTestCase",
"line_number": 20,
"usage_type": "name"
},... |
26577535 | # -*- coding: utf-8 -*-
# Begin of __future__ module
# End of __future__ module
# Begin of external module
# End of external module
import datetime
from shipane_sdk.client import Client
class RiceQuantExecutor(object):
def __init__(self, **kwargs):
self._logger = self._create_logger()
self... | null | shipane_sdk/ricequant/manager.py | manager.py | py | 2,607 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "shipane_sdk.client.Client",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.combine",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_na... |
274511780 | import numpy as np
from collections import Counter
import matplotlib # interactive
matplotlib.use('Qt5Agg') # interactive
import matplotlib.pyplot as plt
def example_1():
samples = 10000
x1 = np.random.rand(samples)
x2 = np.random.rand(samples)
y1 = np.random.randn(samples)
y2 = np.random.randn(... | null | packages/numpy/random_ex.py | random_ex.py | py | 1,298 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "matplotlib.use",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "numpy.random.rand",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "numpy.random.rand",... |
568788201 | # uncompyle6 version 3.7.4
# Python bytecode 3.6 (3379)
# Decompiled from: Python 3.6.9 (default, Apr 18 2020, 01:56:04)
# [GCC 8.4.0]
# Embedded file name: build\bdist.win-amd64\egg\lquery\expr\emitter.py
# Compiled at: 2018-08-03 20:00:20
# Size of source mod 2**32: 4152 bytes
from bytecode.cfg import ControlFlowGra... | null | pycfiles/lquery-0.1.1-py3.6/emitter.cpython-36.py | emitter.cpython-36.py | py | 3,970 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "bytecode.cfg.ControlFlowGraph",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "bytecode.Instr",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "bytecode.Instr",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "bytecode.... |
272616111 | import os
import torch
import numpy as np
import sys
sys.path.append(r'..')
import local_config
import braille_utils.label_tools as label_tools
def create_model_retinanet(params, phase, device):
sys.path.append(local_config.global_3rd_party)
from pytorch_retinanet.loss import FocalLoss
from pytorch_retina... | null | NN/RetinaNet/create_model_retinanet.py | create_model_retinanet.py | py | 3,946 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sys.path.append",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "sys.path.append",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_numb... |
280675633 | import numpy as np
from scipy import special
import matplotlib.pyplot as plt
import itertools
# Time series
T = [0.001, 0.05, 0.1, 0.5]
# Size
h = 0.03125
r1 = 3.0*h
# plot
plt.figure(figsize=(10, 8))
ax = plt.gca()
# marker tools
marker = itertools.cycle(('o', 'v', '^', '<', '>', 's', '8', 'p'))
for time in T:
... | null | diffusion_reaction_porous_left_right/plot_graph.py | plot_graph.py | py | 940 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.gca",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "matp... |
474951139 | #!/usr/bin/env python
import socket, logging, sys, re, argparse, configparser
def help(irc, name, topic=''):
# set default help message to blank.
message = ''
# if no help topic is specified, send general help message about the bot.
if topic == '':
message = "Hi! I am an irc bot"
# if a h... | null | IRC_BOT/bot.py | bot.py | py | 13,350 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.info",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "re.escape",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 72,
"usage_type": "call"
},
{
"api_name": "re.escape",
"line_number": 75,
... |
371662719 | import argparse
import ConfigParser as configparser
import sys
from collections import OrderedDict
from tofu.util import positive_int, tupleize
NAME = "reco.conf"
SECTIONS = OrderedDict()
SECTIONS['general'] = {
'config': {
'default': NAME,
'type': str,
'help': "File name of configuration... | null | tofu/config.py | config.py | py | 11,090 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "collections.OrderedDict",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "tofu.util.positive_int",
"line_number": 38,
"usage_type": "name"
},
{
"api_name": "tofu.util.positive_int",
"line_number": 42,
"usage_type": "name"
},
{
"api_name": "... |
350171761 | #Julian, you have to change the inputs and the number of epochs/iterations
#
from torch.autograd import Variable
import torch
import torch.nn as nn
import torch.nn.functional as F
torch.manual_seed(58)
# Example: An LSTM for Part-of-Speech Tagging
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# The model is as follows... | null | preprocess/lstm/conv_model_simple.py | conv_model_simple.py | py | 3,461 | 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": 33,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 33,
"usage_type": "name"
},
{
"api_name": "torch.nn.Linear",
... |
276724431 | """syphon.core.init.py
Copyright Keithley Instruments, LLC.
Licensed under MIT (https://github.com/tektronix/syphon/blob/master/LICENSE)
"""
from sortedcontainers import SortedDict
def init(
new_schema: SortedDict,
schema_filepath: str,
overwrite: bool = False,
verbose: bool = False,
):
""... | null | syphon/core/init.py | init.py | py | 929 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sortedcontainers.SortedDict",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "syphon.schema.save",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "syphon.schema",
"line_number": 30,
"usage_type": "name"
}
] |
95160207 | import numpy as np
import matplotlib.pyplot as plt
import sklearn
import importlib, layers
importlib.reload(layers)
from layers import *
from adam import *
from sklearn.metrics import accuracy_score, f1_score
# define model
class deep_feedforward_network(object):
def __init__(self, n0, hidden_list, activation = '... | null | 7_Adam/model.py | model.py | py | 5,308 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "importlib.reload",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.tanh",
"line_number": 63,
"usage_type": "call"
},
{
"api_name": "numpy.tanh",
"line_number": 78,
"usage_type": "call"
},
{
"api_name": "numpy.multiply",
"line_numb... |
391751044 | import tkinter as tk
import variablesTK as varTK
import accueil
import sauv_charge
from PIL import ImageTk, Image
Selection_elem = tk.IntVar()
Obj_conec = tk.IntVar()
IDObj_conec = []
def remise_edit(frame_ext):
"""appel exterieur pour afficher la vue"""
frame_ext.pack_forget()
# edit_map a jamais etait ... | null | scripts/createur_circuit.py | createur_circuit.py | py | 38,570 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "tkinter.IntVar",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "tkinter.IntVar",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "variablesTK.frame_id.keys",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "variablesTK.fra... |
377634356 | import urllib.request
from bs4 import BeautifulSoup
url_cve="http://cve.mitre.org/data/refs/refmap/source-BUGTRAQ.html"
req=urllib.request.urlopen(url_cve)
html=req.read()
soup=BeautifulSoup(html,'html.parser')
table=soup.find_all('table')
table=table[3]
trlist=table.find_all('tr')
for tr in trlist[:-28]:
try:
if... | null | poc_crawling_code/bugtraq/update/bugupdate.py | bugupdate.py | py | 452 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "urllib.request.request.urlopen",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "urllib.request.request",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "urllib.request",
"line_number": 6,
"usage_type": "name"
},
{
"api_name":... |
623885635 | # import gevent
# from gevent.queue import Queue
# from gevent import monkey
# monkey.patch_all()
# 教学系统的浏览器设置方法
import time
# 本地Chrome浏览器的静默默模式设置:
from selenium import webdriver #从selenium库中调用webdriver模块
from selenium.webdriver.chrome.options import Options # 从options模块中调用Options类
import urllib.request,csv,os
import ... | null | 作业/comic_download.py | comic_download.py | py | 4,357 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "ssl._create_default_https_context",
"line_number": 17,
"usage_type": "attribute"
},
{
... |
162561627 | import sys
sys.path.append('.')
import json
from interprets import COMMAND_QUEUE
from actuators.base_class.base_actuator import EXECUTOR_INFO
from actuators import logger
from actuators.result_handler.handle import *
from actuators.oes_client.oesclient_acuator import OesAcuator # 这里导入是为了先执行里面函数, 注册执行器
from actuators.... | null | actuators/actuators_control.py | actuators_control.py | py | 6,343 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sys.path.append",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "actuators.oes_client.oesclient_acuator.OesAcuator.register",
"line_number": 12,
"usage_type": "call"
},
{... |
46241557 | '''
Copyright
Jelen forráskód a Budapesti Műszaki és Gazdaságtudományi Egyetemen tartott
"Deep Learning a gyakorlatban Python és LUA alapon" tantárgy segédanyagaként készült.
A tantárgy honlapja: http://smartlab.tmit.bme.hu/oktatas-deep-learning
Deep Learning kutatás: http://smartlab.tmit.bme.hu/deep-learning
A forr... | null | 2017/09-AutoEncoder/04_Variational_AE_mnist_final.py | 04_Variational_AE_mnist_final.py | py | 4,941 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "tensorflow.ConfigProto",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "keras.backend.tensorflow_backend.set_session",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "tensorflow.Session",
"line_number": 38,
"usage_type": "call"
},
{... |
581397745 | from __future__ import print_function
import twitter
#from twython import TwythonStreamer
from models.tables import LOCATIONS_TABLE
import json
from pprint import pprint as PP
### TODO refactor this part
def countdown(t): # in seconds
import time
for i in range(t,0,-1):
print ("tasks done, now sleeping for %d... | null | crawlers/Twitter.py | Twitter.py | py | 5,476 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "time.sleep",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "twitter.Api",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "twitter.Api",
"line_number": 46,
"usage_type": "call"
}
] |
405921935 | # Copyright 2020 DeepMind Technologies Limited. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | null | launchpad/nodes/dereference.py | dereference.py | py | 3,216 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "typing.TypeVar",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "typing.Generic",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "abc.ABC",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "abc.abstractmethod",
"... |
18482702 | import plotly
import numpy as np
import plotly.graph_objs as go
import pandas as pd
import gspread
from oauth2client.service_account import ServiceAccountCredentials
from bs4 import BeautifulSoup
from urllib.request import Request, urlopen
import lxml.html as lh
def color_negative_red(value):
"""
Colors elements i... | null | fcgo_prototype/helper.py | helper.py | py | 8,819 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "plotly.graph_objs.Bar",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "plotly.graph_objs",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "plotly.graph_objs.Layout",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "plot... |
403164044 | import os
import json
import requests
import base64
import tensorflow as tf
import numpy as np
import pickle
from utils import load_model,load_and_prep_image,index_to_word, output_captions
from google.cloud import storage
SEQ_LENGTH = 25
max_decoded_sentence_length = SEQ_LENGTH - 1
storage_client = storage.Client()
... | null | cloud_function/gcf_b64/main.py | main.py | py | 2,639 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "google.cloud.storage.Client",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "google.cloud.storage",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "base64.b64decode",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "uti... |
276866142 | import vampytest
from ....user import User, GuildProfile
from ...interaction_event import InteractionEvent
from ..fields import put_users_into
def test__put_users_into():
"""
Tests whether ``put_users_into`` works as intended.
"""
user_id = 202211050023
guild_id = 202211050024
user_name = '... | null | hata/discord/interaction/resolved/tests/test__put_users_into.py | test__put_users_into.py | py | 1,719 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "user.User.precreate",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "user.User",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "user.GuildProfile",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "user.guild_profiles",... |
577679180 | from django.views import generic
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib import messages
from django.shortcuts import redirect
from django.urls import reverse
from .forms import CustomUserChangeForm
from .models import CustomUser
from pages.models import Data
from listings.models i... | null | users/views.py | views.py | py | 3,439 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.contrib.auth.mixins.LoginRequiredMixin",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "django.views.generic.edit",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "django.views.generic",
"line_number": 12,
"usage_type": "nam... |
103490221 | import io
import os
from pathlib import Path
import pandas as pd
import requests
from pydub import AudioSegment
from pydub.exceptions import CouldntDecodeError
from tqdm import tqdm
CALLS_API = 'https://www.xeno-canto.org/{call_id}/download'
DATA_DIR = Path(os.environ['DATA_DIR'])
DATA_DIR.mkdir(parents=True, exist... | null | scripts/xeno_canto/load_calls.py | load_calls.py | py | 2,199 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pathlib.Path",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_nu... |
405255886 | from django.shortcuts import render,redirect
# Create your views here.
from timetrack.models import *
from timetrack.forms import *
from django.views import View
from django.contrib import messages
from django.contrib.auth import authenticate,login,logout
from django.contrib.auth.decorators import login_required
# f... | null | Time/time_entry/timetrack/views.py | views.py | py | 2,732 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.shortcuts.render",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.redirect",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 65,
"usage_type": "call"
},
{
"api_nam... |
103643644 | # -*- coding: utf-8 -*-
import requests
import time
from bs4 import BeautifulSoup
blog_ID_list = []
article_length =[]
url_root = 'https://digigw.hypotheses.org/'
for x in range(1,19):
url = url_root + 'page/' + str(x)
response = requests.get(url)
response = response.text
soup = BeautifulSoup(respo... | null | web-scraper-ag-blog_V2.py | web-scraper-ag-blog_V2.py | py | 1,796 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "requests.get",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_nu... |
243942684 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('umibukela', '0037_auto_20181106_0934'),
]
operations = [
migrations.CreateModel(
name='ProgrammeStoryImage',
... | null | umibukela/migrations/0038_auto_20181106_1251.py | 0038_auto_20181106_1251.py | py | 886 | 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"
},
... |
164703938 | # -*-* coding:utf-8 -*-*
"""
Name: 蝉鸣-信息轰炸工具
Author: Doimet
Data: 2020-03-15
"""
import os
import sys
import click
from conf import setting
import requests.packages.urllib3
os.system('')
sys.dont_write_bytecode = True
requests.packages.urllib3.disable_warnings()
def show_version(ctx, param, value):
""" 显示程序版本 ""... | null | Cli.py | Cli.py | py | 1,672 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.system",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "sys.dont_write_bytecode",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "requests.packages.urllib3.packages.urllib3.disable_warnings",
"line_number": 15,
"usage_type": "ca... |
434592752 | import numpy as np
from typing import Union
import scipy.linalg as lg
from scipy.sparse import csr_matrix
from .hierarchy import Hierarchy
def _lamb_estimate(x: np.ndarray) -> float:
"""Estimate :math`\\lambda` used in :ref:`shrinkage` estimator of mint method.
:param x: in-sample 1-step-ahead forecast error... | null | pyhts/reconciliation.py | reconciliation.py | py | 4,138 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.ndarray",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "numpy.sqrt",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.diag",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.fill_diagonal",
"li... |
448765735 | __author__ = 'KTH'
from PIL import Image
'''
im1 = Image.new('RGB',(240,338),('yellow'))
im1.save('C:\\Users\\KTH\Desktop\\img_py1.jpg')
im2 = Image.new('RGB',(240,338),(255,255,255))
im2.save('C:\\Users\\KTH\Desktop\\img_py2.jpg')
im3 = Image.new('RGB',(240,338),(0,0,0))
im3.save('C:\\Users\\KTH\Deskto... | null | imagePixels/imageProcessing.py | imageProcessing.py | py | 1,447 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "PIL.Image.open",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 26,
"usage_type": "name"
}
] |
248801095 | import numpy as np
from scipy.integrate import odeint
import matplotlib.pyplot as plt
class Epidemy:
def __init__(self, N, I0, R0, S0, t, params):
self.N = N
self.S0 = S0
self.I0 = I0
self.R0 = R0
self.t = np.linspace(0, t, t)
for param in params: # on extrait les paramétres et on les ajoutent en attribus... | null | all.py | all.py | py | 3,368 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.linspace",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "scipy.integrate.odeint",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "scipy.integrate.odeint",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "matplotl... |
278440309 | import logging
from colorlog import ColoredFormatter
def setup_logger():
"""Return a logger with a default ColoredFormatter."""
formatter = ColoredFormatter(
'%(lineno)5d %(log_color)s%(levelname)-10s: %(name)-6s: %(reset)s %(blue)s %(asctime)5s.%(msecs)03d |'
' (%(threadName)-2s) >>> %(reset... | null | zTestFile/test01_colorer.py | test01_colorer.py | py | 1,094 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "colorlog.ColoredFormatter",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "logging.StreamHandler",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "logg... |
148202572 | from config import Config
import tensorflow as tf
from tensorflow.python.training import moving_averages
from tensorflow.python.ops import control_flow_ops
MOVING_AVERAGE_DECAY = 0.99
BN_DECAY = MOVING_AVERAGE_DECAY
BN_EPSILON = 0.001
CONV_WEIGHT_DECAY = 0.00001
CONV_WEIGHT_STDDEV = 0.05
GC_VARIABLES = 'gc_v... | null | StereoSfMLearner_master/gcnet.py | gcnet.py | py | 14,352 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "tensorflow.nn.softmax",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "tensorflow.nn",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.range",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "tensorflow.... |
459856951 | import cv2
import numpy as np
# Load images
img1 = cv2.imread('image.jpg')
img2 = cv2.imread('logo.png')
# Create ROI to put logo on top-left corner
rows, cols, channel = img2.shape
roi = img1[0:rows, 0:cols]
# Create mask and inverse mask for logo
img2gray = cv2.cvtColor(img2, cv2.COLOR_BGR2GRAY)
ret, mask = cv2.th... | null | Masking/masking.py | masking.py | py | 734 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "cv2.imread",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY",
"line_numbe... |
98767716 | # coding=utf8
"""
youtube.py - Willie YouTube Module
Copyright 2012, Dimitri Molenaars, Tyrope.nl.
Copyright © 2012-2014, Elad Alfassa, <elad@fedoraproject.org>
Copyright 2012, Edward Powell, embolalia.net
Copyright 2015, Max Gurela
Licensed under the Eiffel Forum License 2.
http://willie.dfbta.net
This module will r... | null | youtube.py | youtube.py | py | 5,347 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sys.version_info",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "re.compile",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "willie.tools.WillieMemory... |
467155023 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from gmail import Gmail
import os
import time
import re
import mechanize
import private
def get_delivery_point_urls(content):
# extract delivery point hyperlink from the email content
link_pattern = 'href="(https+://www.funshop.co.kr/member/login[^"]+)"'
link_... | null | get_funshop_point.py | get_funshop_point.py | py | 1,751 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "re.compile",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "mechanize.Browser",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "private.FUNSHOP_PASSWORD",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "os.path.di... |
295233096 | from selenium import webdriver
#你要去安装这个
from selenium.webdriver.support.ui import Select
import time
import mysql.connector
import random
mydb=mysql.connector.connect(
host="3.16.54.143",
user="root",
password="12345678",
database="Capstone3000"
)
mydatabase = mydb.cursor()... | null | ITcrawler.py | ITcrawler.py | py | 6,432 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "mysql.connector.connector.connect",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "mysql.connector.connector",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "mysql.connector",
"line_number": 10,
"usage_type": "name"
},
{
"... |
126708937 | #------------------------------------------------------------------------------
# Author: Nelso G. Jost (nelsojost@gmail.com)
# License: GPLv2
# Purpose: Provide SolidSprite class for drawing simple colored rectangles.
#------------------------------------------------------------------------------
import pyglet
fro... | null | goglet/solidsprite.py | solidsprite.py | py | 1,638 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pyglet.sprite",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "utils.Rect",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "pyglet.image.SolidColorImagePattern",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "pyg... |
96886443 | # 读取wav文件
import wave
import os
import glob
import numpy as np
import matplotlib.pyplot as plt
# 得到路径下某后缀文件列表
file_path="/home"
wav_file=glob.glob(os.path.join(file_path,"gaoxiang","*.wav"))
# 打开文件,读取文件属性,声道数,量化位数,采样频率,采样点数,单通道:
for wav in wav_file:
f=wave.open(wav,'rb')
params=f.getparams()
n_channels... | null | reMonaural.py | reMonaural.py | py | 988 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "glob.glob",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "wave.open",
"line_number": 14... |
411800032 | """task database operations."""
import logging
import six
from orca.models import exception
from orca.models import models
from orca.models.handlers import application
from orca.models.handlers import service
from orca.models.handlers import util as db_util
from orca.utils import setting_util
from orca.utils import s... | null | orca/models/handlers/task.py | task.py | py | 5,459 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "orca.models.handlers.util.model_query",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "orca.models.handlers.util",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "orca.models.models.Task",
"line_number": 18,
"usage_type": "attribute"
... |
180998440 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cadastro', '0001_initial'),
]
operations = [
migrations.AlterModelManagers(
name='cliente',
managers... | null | cadastro/migrations/0002_auto_20160428_1406.py | 0002_auto_20160428_1406.py | py | 1,454 | 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.AlterModelManagers",
"line_number": 14,
"usage_type": "call"
... |
173794518 | # -*- coding: utf-8 -*-
# train.py
# env: python=3.6
# author: lm
import tensorflow as tf
import os
import numpy as np
import time
import math
from tqdm import tqdm
import cv2 as cv
import random
import logging # for save train log
from tfrecords import tf_records
from network.data_aug import seq_aug
from netw... | null | train_mbv3.py | train_mbv3.py | py | 11,227 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "network.train_options.parser.parse_args",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "network.train_options.parser",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "network.train_options",
"line_number": 25,
"usage_type": "name"... |
38159180 | """
Name: Snowdon Module
Description: The Snowdon Module is the Back-end system for the Connex Social Network
Author: _TheJMC_ (James McCarthy)
Date Started: 10/08/2019
--- FUNCTIONALITY DOCUMENTED IN SNOWDON DOCS.md ---
"""
import sqlite3
from sqlite3 import Error
# Snowdon SQL Table Setup Statements
sndn_posts... | null | src/prototypes/Snowdon_PROTOTYPE.py | Snowdon_PROTOTYPE.py | py | 2,613 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sqlite3.connect",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "sqlite3.Error",
"line_number": 42,
"usage_type": "name"
},
{
"api_name": "sqlite3.connect",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "sqlite3.Error",
"li... |
193224365 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('products', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Artwork',
fields=[
... | null | src/products/migrations/0002_auto_20170217_1842.py | 0002_auto_20170217_1842.py | py | 984 | 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"
},
... |
20698910 | # Copyright 2017 Bracket Computing, Inc. 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.
# A copy of the License is located at
#
# https://github.com/brkt/brkt-cli/blob/master/LICENSE
#
# or in the "license" file... | null | brkt_cli/instance_config_args.py | instance_config_args.py | py | 11,842 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.getLogger",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "brkt_cli.instance_config.INSTANCE_CREATOR_MODE",
"line_number": 43,
"usage_type": "name"
},
{
"api_name": "argparse.SUPPRESS",
"line_number": 87,
"usage_type": "attribute"
},
... |
492997196 | from links_spider import *
import requests
import time
from bs4 import BeautifulSoup
for i in links.find():
headers = {
'Cookie': 'ASP.NET_SessionId=gzbukne5wj10cytfgwmu3ith; USPLOGINUSERCOOKIENAME=6DAF33843AA68B1F118F876F5F96EEB0'
}
html_url = 'http://www.apabi.com/nlc/'+i['link']
# print(ht... | null | 项目3Henan RI(河南地域形象)🏠/操作处理🔨📂/数据获取🕷/extract_html_conten.py | extract_html_conten.py | py | 1,092 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "requests.get",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 18,
"usage_type": "call"
}
] |
565788472 | #!/usr/bin/env python
# coding: utf-8
"""
PanelResolver class
Copyright 2017 MicaSense, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in the
Software without restriction, including without limita... | null | Micasense/imageprocessing/micasense/panel.py | panel.py | py | 7,866 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.zeros",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "cv2.convertScaleAbs",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "pyzbar.pyzbar.decode",
... |
441486104 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: mehdisenoussi
"""
import matplotlib as mpl
mpl.use('Qt5Agg')
from matplotlib import cm
import matplotlib.pyplot as pl
import numpy as np
# you can use any of these two functions, to use one just comment the other and
# run the script.
def func(x):
return... | null | AY 2019 - 2020/Lesson 02/Practical session/solutions/ch1_gradient_descent_unknown_solution.py | ch1_gradient_descent_unknown_solution.py | py | 2,752 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "matplotlib.use",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.exp",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "matplotlib.colors.Normalize",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "matplotlib.colors... |
560656427 | import scrapy
from scrapy.loader import ItemLoader
from criminals.items import CriminalsItem
from itemloaders.processors import TakeFirst
class Site16Spider(scrapy.Spider):
name = 'site16'
allowed_domains = ['treasury.gov']
start_urls = ['https://www.treasury.gov/ofac/downloads/sdn.xml']
custom_set... | null | criminals/spiders/site16.py | site16.py | py | 1,645 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "scrapy.Spider",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "scrapy.loader.ItemLoader",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "criminals.items.CriminalsItem",
"line_number": 23,
"usage_type": "call"
},
{
"api_name... |
105423626 | # -*- coding: utf-8 -*-
"""
Created on Wed Aug 30 11:55:50 2017
@author: ckoenigs
"""
from py2neo import Graph, authenticate
import datetime
import MySQLdb as mdb
import sys
sys.path.append('../aeolus/')
import get_drugbank_information
class DrugHetionet:
"""
identifier:string (Drugbank ID)
inchikey: s... | null | mapping_and_merging_into_hetionet/ctd/map_CTD_drug_to_hetionet_final.py | map_CTD_drug_to_hetionet_final.py | py | 46,101 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sys.path.append",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "py2neo.authenticate",
"line_number": 80,
"usage_type": "call"
},
{
"api_name": "py2neo.Graph",
... |
534573745 | from django.db import IntegrityError
from django.test import TestCase
from django.urls import reverse
from rest_framework import status
from rest_framework.test import APIClient
from Matches.models import Match
from Teams.models import Team
def sample_team(team_name):
"""Create sample team"""
return Team.obje... | null | Matches/tests/test_match_api.py | test_match_api.py | py | 1,143 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "Teams.models.Team.objects.create",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "Teams.models.Team.objects",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "Teams.models.Team",
"line_number": 12,
"usage_type": "name"
},
{
... |
234162754 | import os
import json
from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTClient
from time import sleep
from random import randint
"""
Sample code from:
https://github.com/aws/aws-iot-device-sdk-python
"""
# Read settings from environment variables
AWS_HOST = os.getenv("AWS_HOST")
AWS_PORT = int(os.getenv("AWS_PORT"))
AWS... | null | aws-iot/connect.py | connect.py | py | 1,205 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.getenv",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 17,
... |
482203882 | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
#
# Processing the USPS Data. It is assumed that the data is already
# downloaded.
import subprocess
import os
import numpy as np
from sklearn.datasets import load_svmlight_file
import sys
from helpermethods import preprocess... | null | examples/pytorch/ProtoNN/process_usps.py | process_usps.py | py | 1,647 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sklearn.datasets.load_svmlight_file",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.pa... |
541337847 | # "Out: Cells" tab
import os
from ipywidgets import Layout, Label, Text, Checkbox, Button, HBox, VBox, Box, \
FloatText, BoundedIntText, BoundedFloatText, HTMLMath, Dropdown, interactive, Output
from collections import deque
import xml.etree.ElementTree as ET
import matplotlib.pyplot as plt
#from matplotlib.patches... | null | bin/mcds_cells.py | mcds_cells.py | py | 19,095 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "platform.system",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "ipywidgets.interactive",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "ipywidgets.BoundedIntText",
"line_number": 81,
"usage_type": "call"
},
{
"api_name": "ipyw... |
452899837 | import random
import asyncio
import sys
import json
import inspect
import discord
import validators
from discord.ext.menus import MenuPages
from ..utils import db, embeds, misc, text, strings
from ..models import menus, handlers
from discord.ext import commands
root_directory = f"{sys.path[0]}/LobsteroBOT/".replace(... | null | lobstero/cogs/customization.py | customization.py | py | 33,195 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sys.path",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands.Cog",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "asyn... |
584311535 | 'Given steps, predict distance walked'
import numpy as np
import argparse
# Internals
from utils import load_train
from steps import get_labeled_preds
from analyze import eval_preds
def predict_dist(limit):
labeled_preds = get_labeled_preds(limit)
avg_step_length = 1.7
labeled_preds['PRED'] *= avg_step_l... | null | dist.py | dist.py | py | 1,795 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "steps.get_labeled_preds",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "analyze.eval_preds",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "utils.load_train",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "analyze.e... |
600798565 | from .models import Day, Room, TimeInterval, Slot, Schedule
from django.db.models.signals import post_save, m2m_changed
from django.dispatch import receiver
@receiver(m2m_changed, sender=Day.time_intervals.through, dispatch_uid='slot_day_identifier')
def create_slot_per_day(sender, instance, action, model, **kwargs):
... | null | manager/signals.py | signals.py | py | 2,362 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "models.Room.objects.all",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "models.Room.objects",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "models.Room",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "models.Slot... |
102123934 | import cv2
from PIL import Image
import numpy as np
from matplotlib import pyplot as plt
import os,glob
def cv2pil(img):
return Image.fromarray(cv2.cvtColor(img,cv2.COLOR_BGR2RGB))
def ocr_single_image(img_path):
# 读取图片
imagePath = img_path
img = cv2.imread(imagePath)
# 灰度化
gray = cv2.cv... | null | experiment/ocr.py | ocr.py | py | 3,437 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "PIL.Image.fromarray",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "cv2.cvtColor",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2RGB",
"line... |
441815402 | import logging
from sqlalchemy import (
Table,
MetaData,
Column,
Integer,
String,
DateTime,
ForeignKey,
)
from sqlalchemy.orm import mapper, relationship
from apps.api.domain import model
logger = logging.getLogger(__name__)
metadata = MetaData()
books = Table(
'books',
metadata,... | null | apps/api/adapters/orm.py | orm.py | py | 1,128 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.getLogger",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.MetaData",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Table",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Col... |
103349984 | import fcntl
import logging
import os
import subprocess
import signal
import shutil
import sys
import tempfile
import time
import yaml
from datetime import datetime
from traceback import format_tb
from teuthology import setup_log_file
from . import beanstalk
from . import report
from . import safepath
from .config im... | null | teuthology/worker.py | worker.py | py | 13,755 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.getLogger",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.utcnow",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "os.path.... |
358072325 | from django.shortcuts import render, redirect
from .models import Enquiry
from rooms.models import Room
from user.models import User
from enquiry.forms import EnquiryForm
from django.contrib.auth.decorators import login_required
from django.shortcuts import render, HttpResponse
from user.decorators import unauthenticat... | null | DjangoProjects/DjangoProjects11RentAccount/rento/enquiry/views.py | views.py | py | 1,712 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "models.Enquiry.objects.filter",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "models.Enquiry.objects",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "models.Enquiry",
"line_number": 15,
"usage_type": "name"
},
{
"api_name... |
26284932 | from django.shortcuts import render,HttpResponseRedirect
from .forms import SignupForm,LoginForm,PostForm
from django.contrib import messages
from django.contrib.auth import authenticate,login,logout
from .models import Post
from django.contrib.auth.models import Group
# Create your views here.
#HOME
def home(request)... | null | miniblog/views.py | views.py | py | 3,871 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "models.Post.objects.all",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "models.Post.objects",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "models.Post",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "django.s... |
479783064 | import numpy as np
import cv2 as cv
import matplotlib.pyplot as plt
img1 = cv.imread('D:\Projects\Oh\data\images\\trainim_LL_0428\\trainim_LL_0428\\image178_laxsquadT_lBlue_LL_0427.jpg',0) # queryImage
img2 = cv.imread('D:\Projects\Oh\data\images\silhouette\silhouette\image178\\image178_nk1.jpg',0) # trainIma... | null | src/test_feature_detection.py | test_feature_detection.py | py | 1,625 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "cv2.imread",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cv2.resize",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "cv2.ORB_create",
"line_number": 9,
... |
595796845 | import sys
from PyQt5.QtWidgets import QMainWindow, QApplication, QPushButton, QWidget, QAction, QTabWidget, QVBoxLayout, QSizePolicy
from PyQt5.QtGui import QIcon
from PyQt5.QtCore import pyqtSlot
from PyQt5.QtWidgets import QMessageBox
from gui.calSelectTab import CalSelectTab
from gui.canvasTab import CanvasTab
fro... | null | main.py | main.py | py | 6,384 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "PyQt5.QtWidgets.QMainWindow",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtCore.pyqtSlot",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets.QMessageBox.question",
"line_number": 53,
"usage_type": "call"
},
{... |
627500212 | from prompt_toolkit.shortcuts import print_tokens
from prompt_toolkit.styles import style_from_dict
from pygments.token import Token
import time
from threading import Semaphore
screen_lock = Semaphore(value=1)
style = style_from_dict({
Token.WARNING: '#b8cc00', #Orange
Token.SUCCESS: '#00cc14', #green
To... | null | package/message.py | message.py | py | 4,357 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "threading.Semaphore",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "prompt_toolkit.styles.style_from_dict",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pygments.token.Token.WARNING",
"line_number": 10,
"usage_type": "attribute"
},
... |
205316610 | import json
import logging
import os
from threading import Timer
from requestlogger import WSGILogger, ApacheFormatter
from logging.handlers import TimedRotatingFileHandler
import bottle
from bottle_sqlite import SQLitePlugin
from bottle import run, request
from bitcoinrpc.authproxy import AuthServiceProxy
import time
... | null | pool_server.py | pool_server.py | py | 14,889 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "bottle.Bottle",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "bottle.debug",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.path.isdir",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number":... |
128642516 | #
# Copyright (C) 2017 Atelier Cartographique <contact@atelier-cartographique.be>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed... | null | api/models/metadata.py | metadata.py | py | 7,255 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.db.models.Model",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "django.db.models.UUIDField",
"line_number": 27,
"usage_type": "call"
},
{
"api_name"... |
375219943 | from setuptools import setup, find_packages
import platform
is_windows = any(platform.win32_ver())
required_packages = []
if is_windows:
required_packages = ['pypiwin32>=219']
setup(name='pywinservicemanager',
version='1.0.3',
author='Team Belvedere, LLC',
author_email='opensource@belvederetra... | null | setup.py | setup.py | py | 693 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "platform.win32_ver",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "setuptools.setup",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",
"line_number": 16,
"usage_type": "call"
}
] |
101269498 | import cv2
import numpy as np
import random
### FUTTATASI PARAMETEREK
kep1 = 'kepek/park1s.jpg'
kep2 = 'kepek/park2s.jpg'
kimenet = 'kepek/out/park_pano1.jpg'
gaussian_zaj = True
so_bors_zaj = False
### ATMERETEZES
def resized(image, scale):
width = int(image.shape[1] * scale)
height = int(image.shape[0] * ... | null | pano.py | pano.py | py | 7,281 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "cv2.resize",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "cv2.INTER_AREA",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "numpy.float32",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "numpy.float32",
"lin... |
88441223 | # Copyright (c) 2014 CodiLime
__author__ = 'Piotr Niedzwiedz <piotr@codilime.com>'
import argparse
def process_cli_arguments():
parser = argparse.ArgumentParser(description='Image converter.')
parser.add_argument('-a',
'--action',
metavar='action_type',
... | null | ch24/optimization_manager/cli_args.py | cli_args.py | py | 3,536 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 8,
"usage_type": "call"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.