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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
336961799 | import glob
import math
from helper.find_field_csv import Find_field_csv
from helper import common_os_helper
class Write_log:
# ํ๋ ์ ๋ณด๋ฅผ ์ฝ์ด๋ค์ฌ์ ์ ์๊ฐ ํ๋ ์์์๋์ง ๋ฐ๊นฅ์ ์๋์ง checkํด์ ์์์์ผ๋ฉด true, ๋ฐ๊นฅ์ ์์ผ๋ฉด False
def check_in_field(self, longitude, latitude, data):
try:
data[11] = data[11].replace("]", ... | null | module/write_log/write_log_module.py | write_log_module.py | py | 25,093 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "helper.find_field_csv.Find_field_csv",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "helper.common_os_helper.check_slash",
"line_number": 72,
"usage_type": "call"
},
{
"api_name": "helper.common_os_helper",
"line_number": 72,
"usage_type": "name... |
535753593 | import pygame
import sys
clock = pygame.time.Clock()
from pygame.locals import *
pygame.init()
pygame.display.set_caption('MY GAME')
WINDOW_SIZE = (400, 400)
screen = pygame.display.set_mode(WINDOW_SIZE, 0, 32)
player_image = pygame.image.load('./black.png')
moving_right = False
moving_left = False
player_location... | null | test.py | test.py | py | 1,710 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pygame.time.Clock",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "pygame.time",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "pygame.init",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_captio... |
105756123 | import io
import os
import csv
import sys
import base64
import shutil
import asyncio
import hashlib
import logging
import unittest.mock as mock
import tornado.httputil as t_httputil
import aiohttp.client_exceptions as a_exc
import synapse.exc as s_exc
import synapse.axon as s_axon
import synapse.common as s_common
im... | null | synapse/tests/test_axon.py | test_axon.py | py | 46,797 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.getLogger",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "base64.b64decode",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "hashlib.sha256",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "hashlib.sha256",
... |
276007607 | import torch
from torch.autograd import Variable
from PIL import Image
from PIL import ImageDraw
import numpy as np
import utils
import net
from torchvision import transforms
import time
class Detector:
def __init__(self, pnet_param="E:/save_path/12/param/pnet_epoch_99.pt", rnet_param="E:/save_path/24/param/p... | null | src/detect.py | detect.py | py | 7,141 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "net.PNet",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "net.RNet",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "net.ONet",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "torch.load",
"line_number": 31,
"u... |
211887393 | #! /usr/bin/env python3
# -*- coding:utf-8 -*-
__author__ = 'wenjiapeng'
import sys
import time
import argparse
import zmq
import json
import threading
from kvmsg import KVMsg
class ZmqSub(threading.Thread):
"""
sub zmq thread
sub zmq message from subtitle, multiple message
"""
def __init__(self, sub_url, subt... | null | zmq_sub.py | zmq_sub.py | py | 1,974 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "threading.Thread",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "threading.Thread.__init__",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "threading.Thread",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": ... |
536389415 | import nltk
import docx
try:
#reading document filr
doc = docx.Document('./try.docx')
fullText = []
#Extracting text from file and storing them in one string varibale
for para in doc.paragraphs:
fullText.append(para.text)
fullText = ''.join(fullText)
#Removing unwanted characters ... | null | nounextracter.py | nounextracter.py | py | 908 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "docx.Document",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "nltk.word_tokenize",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "nltk.pos_tag",
"line_number": 26,
"usage_type": "call"
}
] |
99920098 | from rest_framework import permissions
from django.conf import settings as django_settings
from django.contrib.auth import get_user_model
from rest_framework import serializers
from rest_framework.views import APIView
from rest_framework import status
from ..utils import *
from . import constants, utils
User = get_u... | null | app/api/v1/auth/resend.py | resend.py | py | 1,451 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.contrib.auth.get_user_model",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "rest_framework.views.APIView",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "rest_framework.permissions.AllowAny",
"line_number": 19,
"usage_type": "a... |
429887339 | from ..models import Comment
from ..models import User
from . import main
from my_log import log
from flask import abort
from flask import jsonify
@main.route('/user/delete/<user_id>')
def user_delete(user_id):
u = User.query.filter_by(id=user_id).first()
log('u.id', u)
if u is None:
print('่ฟ้ๆไธช... | null | app/api/user.py | user.py | py | 527 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "models.User.query.filter_by",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "models.User.query",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "models.User",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "my_log... |
1903417 | import numpy as np
import random
from PIL import Image
import os
import serial
def limit127(input):
if (input >= 127):
return 127
else:
return input
ser = serial.Serial(
port='COM4',
baudrate=9600,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIG... | null | input/pngdecode.py | pngdecode.py | py | 1,244 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "serial.Serial",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "serial.PARITY_NONE",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "serial.STOPBITS_ONE",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "serial... |
181192290 | from typing import Any, Dict, List, Optional, Tuple, Set, Union
import re
import numpy as np
from allennlp.data.fields import (
Field,
ListField,
TextField,
SpanField,
ArrayField,
MetadataField,
SequenceLabelField,
)
from allennlp.data.instance import Instance
from allennlp.data.tokenizers... | null | allennlp_models/coref/util.py | util.py | py | 18,880 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "typing.List",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "typing.Dict",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "allennlp.data.token_indexers.TokenIndexer",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "typ... |
598070946 | #!/usr/bin/env python3
# tkpng - example of using tkinter and pypng to display pngs (albeit reduced quality)
# in nothing but pure python. Can use RGBA images, but the alpha is stripped.
# v0.4 - optimised to use single .put() instead of row by row
from array import *
from tkinter import *
import png
class PngImageTk... | null | old/tkpng4.py | tkpng4.py | py | 3,271 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "png.Reader",
"line_number": 14,
"usage_type": "call"
}
] |
195452979 | """%reload_ext autoreload
%autoreload 2"""
import numpy as np
from scipy.fftpack import fft
import sys, os, math
sys.path.insert(0, '/home/pvardanis/sms-tools/software/models/')
import utilFunctions as UF
M = 501
hM1 = int(math.floor((M+1)/2))
hM2 = int(math.floor(M/2))
(fs, x) = UF.wavread('/home/pvardanis/sms-t... | null | A3/fourier2.py | fourier2.py | py | 548 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sys.path.insert",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "math.floor",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "math.floor",
"line_number"... |
462816251 | #!/usr/bin/env python3
from carcano.foolist import *
import os
import logging
import logging.config
log_config_paths = [
os.path.dirname(os.path.realpath(__file__))+'/logging.conf',
'/etc/fooapp/logging.conf']
log_enabled = False
for log_config_file in log_config_paths:
if os.path.isfile(log_config_file... | null | full-featured-project/src/bin/fooapp.py | fooapp.py | py | 1,200 | python | en | code | null | code-starcoder2 | 76 | [
{
"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_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.isfile",
"line... |
93485761 | import unittest
import datetime as dt
import utils.data_utils.yahoo_finance as yf
class TestYahooFinance(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.symbol = 'GOOG'
cls.symbol2 = 'AAPL'
cls.start_date = dt.datetime(year=2016, month=1, day=1)
cls.end_date = dt.dat... | null | utils/test/test_yahoo_finance.py | test_yahoo_finance.py | py | 1,501 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "unittest.TestCase",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "datetime.da... |
472405578 | import matplotlib.pyplot as plt
import numpy as np
import itertools
files = ['/Users/poulin/Documents/Labo/ProgrammeDarkAges/class_public-2.4.2/test/test_halo_master_thermodynamics.dat', '/Users/poulin/Documents/Labo/ProgrammeDarkAges/class_public-2.4.2/test/test_halo_master_beyond_thermodynamics.dat', '/Users/poulin/... | null | test/test_halo_master_thermodynamics.py | test_halo_master_thermodynamics.py | py | 1,191 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.loadtxt",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "itertools.p... |
293121839 | """
Module: test_customer
"""
import sys
sys.path.append("../")
import unittest #pylint: disable=wrong-import-position
import mercadopago #pylint: disable=wrong-import-position
class TestCustomer(unittest.TestCase):
"""
Test Module: Customer
"""
sdk = mercadopago.SDK(
"APP_USR-558881221729... | null | tests/test_customer.py | test_customer.py | py | 1,679 | 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": "unittest.TestCase",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "mercadopago.SDK",
... |
505630001 | import tools
def get_halbjahr():
print()
halbjahr = tools.read_int('1. oder 2. Halbjahr? ', 1, 2)
if halbjahr == 2:
print('...Vorjahresnote wird beruecksichtigt...')
return halbjahr
def get_schuljahr():
print('')
schuljahr = tools.read_int('Welches Schuljahr? ', 3, 4)
return schu... | null | deutschNoten.py | deutschNoten.py | py | 5,531 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "tools.read_int",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "tools.read_int",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "tools.read_int",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "tools.read_double",
"... |
181132624 | # -*- coding:utf-8 -*-
# @Desc :
# @Author : Administrator
# @Date : 2019-07-19 8:55
import requests
from lxml import etree
import time
class BaiduImageSpider:
def __init__(self):
self.headers = {"User-Agent":"Mozilla/5.0"}
self.baseurl = "http://tieba.baidu.com"
self.pageurl = "http://ti... | null | [14]Python-็ฝ็ป็ฌ่ซ้จๅ/13lxmlไธxpath-็คบไพ.py | 13lxmlไธxpath-็คบไพ.py | py | 2,206 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "requests.get",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "lxml.etree.HTML",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "lxml.etree",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_numb... |
317426451 | import numpy as np
import matplotlib.pyplot as plt
def Gauss(A,B) :
n = A.shape[0] # row:0 col:1
l = np.zeros(n,dtype=np.int) # index vector
s = np.zeros(n) # scale vector
X = np.matrix(np.zeros(n))
X = X.T # transpose
# taking it as basic row vector
for i in ra... | null | lab09_FD.py | lab09_FD.py | py | 1,802 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.zeros",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numpy.int",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "numpy.zeros",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.matrix",
"line_number":... |
60227388 | import json
TAXONOMY = None
def ensure_taxonomy_loaded(fn):
def with_taxonomy(*args, **kwargs):
global TAXONOMY
if TAXONOMY is None:
with open('../src/taxonomy.json') as f:
TAXONOMY = json.load(f)
return fn(*args, **kwargs)
return with_taxonomy
@ensure_t... | null | pipeline/taxonomy.py | taxonomy.py | py | 624 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "json.load",
"line_number": 12,
"usage_type": "call"
}
] |
578422220 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('courses', '0002_course'),
('members', '0002_auto_20151009_2237'),
('assignments', '0002_assignmentsubmission_courseassignment... | null | server/api/assignments/migrations/0003_auto_20151009_2237.py | 0003_auto_20151009_2237.py | py | 1,725 | 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.AddField",
"line_number": 16,
"usage_type": "call"
},
{
... |
292470023 | #!/usr/bin/python
#coding:utf-8
from flask import Flask,jsonify,Response,request
import os
import logging
import pandas as pd
import pymysql
from sklearn.preprocessing import StandardScaler
from sklearn.externals import joblib
from tornado.wsgi import WSGIContainer
from tornado.httpserver import HTTPServer
from tornad... | null | ๅฟซ้ๅๅฎขๆท่กไธบๅๆไธๆตๅคฑ้ข่ญฆ/APICode/main.py | main.py | py | 2,906 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "flask.Flask",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "os.getcwd",
"line_number": ... |
319147048 | import os
from git import Repo
cur_path= os.path.split(os.path.realpath(__file__))[0]
code_path = "code_tmp"
def update_code(suite):
repo_name = suite.get("name")
url = suite.get("url")
local_path=os.path.join(cur_path,code_path,repo_name)
#ๅฆๆๆไปถๅคนไธๅญๅจๅฐฑๅๅปบ
if os.path.exists(local_path):
try:
... | null | taskManager/utils/scripts_version_control.py | scripts_version_control.py | py | 725 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.path.split",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "os.path.realpath",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_num... |
547883654 | from AndroidRunner.Device import Device
from AndroidRunner.Experiment import Experiment
from typing import Dict
import time
import logging
LOGGER = logging.getLogger()
# Generally, after every action, we need to wait for the display to update.
# The time to update varies.
def tap(device: Device, x: int, y: int, slee... | null | examples/monkeyplayer/Scripts/interaction.py | interaction.py | py | 1,047 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.getLogger",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "AndroidRunner.Device.Device",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "time.sleep",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "AndroidRunner... |
179153863 | import requests
import jesse.helpers as jh
from jesse import exceptions
from .interface import CandleExchange
class Kraken(CandleExchange):
"""
Kraken endpoint for candle data works with timestamps in seconds
while jesse works with milliseconds
"""
def __init__(self):
super().__init__('K... | null | jesse/modes/import_candles_mode/drivers/kraken.py | kraken.py | py | 2,356 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "interface.CandleExchange",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "jesse.helpers.gener... |
152119283 | import sys
sys.path.insert(1, '../UnsupervisedLearning-JigsawPuzzle')
import torch
import torch.nn as nn
import torchvision
import os
import cv2
from torch.autograd import Variable
from dataset_factory.data_loader import AnimalDataset
from dataset_factory.data_utils import get_all_imgs
from models.AlexNet import Alex... | null | train/train_classifier.py | train_classifier.py | py | 4,795 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sys.path.insert",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "tqdm.tqdm",
"... |
92197957 | from nornir import InitNornir
from nornir_utils.plugins.functions import print_result
from nornir_netmiko import netmiko_send_config
# from easysnmp import snmp_get, snmp_set
from easysnmp import Session
from datetime import datetime
import time
def get_interface_stats(task, interface_dict):
f = open(f'{task.host... | null | nornir_app.py | nornir_app.py | py | 2,543 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "easysnmp.Session",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "nornir.InitN... |
241896277 | from django.shortcuts import render,get_object_or_404,redirect
from .models import *
from .forms import *
from django.contrib import messages,auth
from products.choices import state_choices
# Create your views here.
def carpentery(request):
mycarpenter = Carpenter.objects.order_by('-date')
context = {
... | null | skillTradeHub/views.py | views.py | py | 17,230 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "products.choices.state_choices",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "django.shortcuts.render",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.get_object_or_404",
"line_number": 19,
"usage_type": "call"
},
... |
143348560 | # IMPORTS (YOU CAN ADD MORE IF NEEDED)
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from scipy.optimize import fsolve, minimize, curve_fit
from scipy.integrate import odeint
import pint
import scipy.constants as cnst
from molmass import Formula
# ASSIGNMENT 6 (Week 6, Solving Equations)
# ===... | null | module_examples/HW/HW6/HW6.py | HW6.py | py | 11,534 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "matplotlib.pyplot.rcParams.update",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.rcParams",
"line_number": 39,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 39,
"usage_type": "name"
},
{
... |
429315850 | import keras
from keras.models import Sequential
from keras.layers import Dense
from keras.preprocessing.text import Tokenizer
import keras_metrics
import pickle
from itertools import chain
import numpy as np
from collections import Counter
import gensim as gs
import gensim.downloader as api
classif_A = {'NOT': np.arr... | null | code/neural_nets.py | neural_nets.py | py | 3,366 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.array",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": ... |
343977212 | import MySQLdb as mdb
import config
def get_db():
db = mdb.connect(host="localhost",
user=config.db_user,
passwd=config.db_password,
db=config.db_name)
return db
def get_course(course_id):
db = get_db()
cur = db.cursor(mdb.cursors.DictCu... | null | lib/db.py | db.py | py | 2,449 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "MySQLdb.connect",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "config.db_user",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "config.db_password",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "config.db_na... |
364837713 | import os
import numpy as np
import struct
import matplotlib.pyplot as plt
import sys
import gzip
def load_mnist(path, kind='train'):
labels_path = os.path.join(path, '%s-labels-idx1-ubyte.gz' % kind)
images_path = os.path.join(path, '%s-images-idx3-ubyte.gz' % kind)
with gzip.open(labels_p... | null | ANN.py | ANN.py | py | 7,205 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.path.join",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 1... |
242171676 | import sys
import os
sys.path.append(os.path.abspath(os.path.join('..' ,'..', 'src')))
import pickle
import importlib
import matplotlib.pyplot as plt
from list_best_performers import options, init
from hyperopt import space_eval
import utils
openF = "non_greedy_3"#sys.argv[1]
xaxe = "units1"#sys.argv[2]
module = imp... | null | src/read_trials/grid_loss_plot.py | grid_loss_plot.py | py | 2,436 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sys.path.append",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number... |
177906464 | from flask import Flask, render_template, request
import requests
import json
import sys
import os
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))))
from stockToKakao.commonModule im... | null | stockToKakao/p1_get_token/getToken.py | getToken.py | py | 3,231 | 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": "os.path.dirname",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number... |
488004582 | import typing
import os
import shutil
import pickle
import cv2 # type:ignore
import numpy as np # type:ignore
Calibration = typing.NewType('Calibration', typing.Tuple[object, object, object, object, object])
def _find_chessboard_corners(in_path: str, nx: int, ny: int) -> typing.Tuple[bool, np.array, object]:
#... | null | p2/calibrate.py | calibrate.py | py | 3,819 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "typing.NewType",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "typing.Tuple",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "cv2.imread",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_nu... |
368561955 | from setuptools import setup
full_description = "To be written."
setup(
name='MotoBot',
version='0.5',
description='A framework for developing IRC bots.',
long_description=full_description,
url='https://github.com/Motoko11/MotoBot',
author='Robert Swaine',
license='MIT',
keywords='IRC... | null | setup.py | setup.py | py | 354 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "setuptools.setup",
"line_number": 6,
"usage_type": "call"
}
] |
409601433 | #! /usr/bin/env python
from __future__ import absolute_import, print_function
import datetime
import os
import time
import abc
from optparse import OptionParser
from joinmarket import Maker, IRCMessageChannel, MessageChannelCollection
from joinmarket import BlockrInterface
from joinmarket import jm_single, get_networ... | null | joinmarket/yieldgenerator.py | yieldgenerator.py | py | 6,681 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "joinmarket.get_log",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "joinmarket.Maker",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "abc.ABCMeta",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
... |
542629262 | import cv2
import numpy as np
import matplotlib.pyplot as plt
import math
def NCC(a, b, I, T):
#calculate region average
regionAverage = 0
for i in range(-t_height//2, t_height//2 + 1):
for j in range(-t_width//2, t_width//2 + 1):
regionAverage += I[i + a][j + b]
regionAv... | null | CVPython/PythonFiles/NCC_grey.py | NCC_grey.py | py | 2,602 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "math.pow",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "math.pow",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 40,
... |
496131529 | #!/anaconda3/envs/vision/bin/python
# -*- coding: utf-8 -*-
# keras_cifar10.py
import argparse
import numpy as np
import matplotlib.pyplot as plt
from keras.datasets import cifar10
from keras.optimizers import SGD
from keras.layers.core import Dense
from keras.models import Sequential
from sklearn.metrics import clas... | null | pyimagesearch/10/keras_cifar10.py | keras_cifar10.py | py | 2,826 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "keras.datasets.cifar10.load_data",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "keras.datasets.cifar10",
"line_number": 27,
"usage_type": "name"
},
{
"a... |
266804556 | import sqlite3
from contextlib import closing
import os
import logging
logging.basicConfig(filename='db_log.txt', level=logging.DEBUG,
format='%(asctime)s %(levelname)s %(name)s %(message)s')
logger = logging.getLogger(__name__)
sql_command_dict = {
'first_sql': "CREATE TABLE IF NOT EXISTS fi... | null | database.py | database.py | py | 4,078 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.basicConfig",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect... |
342186960 | from tile import Tile
from board import Board
from player import Player, AI
import xml.etree.ElementTree as ET
from encrypt_decrypt import *
import platform
class XMLUtility:
"""
This class is used in order to generate a XML representation of a Domino game in order to save and restore games.
"""
@stat... | null | xml_utility.py | xml_utility.py | py | 6,932 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "xml.etree.ElementTree.Element",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "xml.etree.ElementTree.Element",
"line_number": 29,
"usage_type": "call"
},
{
... |
334513836 |
from typing import List, Iterable, IO, TYPE_CHECKING, Union
import requests
import github
from git import Repo
from .metadata import Netkan
from .repos import NetkanRepo, CkanMetaRepo
if TYPE_CHECKING:
from mypy_boto3_sqs.service_resource import Message
from mypy_boto3_sqs.type_defs import (
DeleteM... | null | netkan/netkan/common.py | common.py | py | 2,086 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "mypy_boto3_sqs.service_resource.Message",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "mypy_boto3_sqs.type_defs.DeleteMessageBatchRequestEntryTypeDef",
"line_number": ... |
453527929 | import torch
import numpy as np
from torch import randperm
def mixup_data(x, y, alpha=1.0, is_cuda=True):
lam = np.random.beta(alpha, alpha) if alpha > 0. else 1.
batch_size = x.size()[0]
index = randperm(batch_size).cuda() if is_cuda else randperm(batch_size)
mixed_x = lam * x + (1 - lam) * x[index, ... | null | workers/arch_space/util/transforms.py | transforms.py | py | 1,674 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.random.beta",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "torch.randperm",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.ones",
"lin... |
131605600 | import time
from io import BytesIO
from PIL import Image
from flask import Flask, jsonify, request, render_template, g, url_for, session, redirect, send_file, flash, abort, \
jsonify, send_from_directory
from werkzeug.utils import secure_filename
from flask_restful import Api, Resource
from pymongo import Mo... | null | app.py | app.py | py | 8,616 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.path.exists",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "os.makedirs",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_numbe... |
576532425 | from django.urls import path
from . import views
urlpatterns = [
path('', views.MoviesList.as_view()),
path('filter/', views.FilterMovieView.as_view(), name='filter'),
path('search/', views.Search.as_view(), name='search'),
path('<slug:slug>/', views.MovieDetailView.as_view(), name='movie_detail'),
... | null | movies/urls.py | urls.py | py | 401 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
153287648 | import pandas as pd
import numpy as np
import config
ofiledir = config.ofiledir
ofilename = config.ofilename
ofileheader = config.ofileheader
start_time_am = config.str_trading_start_am
end_time_am = config.str_trading_end_am
start_time_pm = config.str_trading_start_pm
end_time_pm = config.str_trading_end_pm
xx_range ... | null | data_select_day.py | data_select_day.py | py | 3,462 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "config.ofiledir",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "config.ofilename",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "config.ofileheader",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "confi... |
377759108 | from typing import Optional
from ts2vg.graph._natural import _compute_graph
from ts2vg.graph.base import BaseVG
class NaturalVG(BaseVG):
r"""
Natural Visibility Graph.
Transform a time series to a Natural Visibility Graph.
Parameters
----------
directed : str, None
If ``None`` make ... | null | ts2vg/graph/natural.py | natural.py | py | 4,303 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "ts2vg.graph.base.BaseVG",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 130,
"usage_type": "name"
},
{
"api_name": "ts2vg.graph._natural._compute_graph",
"line_number": 134,
"usage_type": "call"
}
] |
266816565 | from setuptools import setup
with open('README.md') as f:
long_description = f.read()
setup(
name='jparser',
version='0.0.0.0',
description='',
license='',
long_description=long_description,
author='Jordan Koelbl',
author_email='',
url='',
packages=['jparser'], #same as name
... | null | setup.py | setup.py | py | 396 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "setuptools.setup",
"line_number": 6,
"usage_type": "call"
}
] |
358035406 | import sys
import os
sys.path.append(os.pardir)
from common.functions import sigmoid, softmax, cross_entropy_error
from common.gradient import numerical_gradient
from typing import Dict, Callable, NoReturn
import numpy as np
class TwoLayerNet:
"""
Two Layer Neural Network
"""
def __init__(self, input... | null | chapter4/two_layer_net.py | two_layer_net.py | py | 2,270 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sys.path.append",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "os.pardir",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "typing.Dict",
"line_num... |
303930829 | import asyncio
import base64
import io
import os
from pathlib import Path
import threading
from flask import Flask, send_file
from flask_restful import reqparse, Api, Resource, abort
import httpx
import numpy as np
import torch
from geobacter.inference.geotypes import Point
from geobacter.inference.util import buffer... | null | geobacter/inference/api.py | api.py | py | 3,620 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pathlib.Path",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "geobacter.inference.networks.resnet.ResNetEmbedding",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "torch.load",
"line_number": 23,
"usage_type": "call"
},
{
"api_n... |
591812018 | import logging as log
import time
from logic import requestHandler
from google.appengine.ext import webapp
from google.appengine.ext.webapp import util
from google.appengine.ext.webapp import template
class MainHandler(webapp.RequestHandler):
def get(self):
templateVars = {}
action = self.request... | null | main.py | main.py | py | 1,595 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "google.appengine.ext.webapp.RequestHandler",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "google.appengine.ext.webapp",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "logic.requestHandler.saveWord",
"line_number": 15,
"usage_type"... |
425977954 | from django.urls import path
from . import views
urlpatterns = [
path('', views.post_list, name='post_list'),
path('post/<int:pk>/', views.post_detail, name='post_detail'),
#int:pk> It means that Django expects an integer value and will transfer it to a view as a variable called pk.
#if you enter http... | null | blog/urls.py | urls.py | py | 630 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.urls.path",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
71882155 | # encoding=utf-8
"""
ๅ
ป่ฝฆๆ ๅฟงๆฐๆฎๅค็, ๅธธ็จๅทฅๅ
ท
fim = field_index_mapper
"""
from utils.FileUtils import FileUtils
from utils.StringUtils import StringUtils
__author__ = 'lyj'
class CommonUtils(object):
brand_mapper = {
u'ๅๆฑฝๅจๆบ': u'ๅจๆบ',
u'ๅๆฑฝ็ป
ๅฎ': u'็ป
ๅฎ',
u'ๅๆฑฝๅถ้ ': u'ๅๆฑฝ',
u'ๅฆ่': u'RUF',
u'... | null | yangche51/Yangche51Common.py | Yangche51Common.py | py | 2,929 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "utils.FileUtils.FileUtils.read_file",
"line_number": 69,
"usage_type": "call"
},
{
"api_name": "utils.FileUtils.FileUtils",
"line_number": 69,
"usage_type": "name"
},
{
"api_name": "utils.FileUtils.FileUtils.read_file",
"line_number": 86,
"usage_type": "cal... |
649406330 | from archetypes.schemaextender.interfaces import IOrderableSchemaExtender
from archetypes.schemaextender.interfaces import ISchemaModifier
from ace.lims import aceMessageFactory as _
from bika.lims.fields import ExtReferenceField, ExtStringField
from bika.lims.browser.widgets import ReferenceWidget as bikaReferenceWidg... | null | ace/lims/extenders/sample.py | sample.py | py | 4,028 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "zope.component.adapts",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "bika.lims.interfaces.ISample",
"line_number": 15,
"usage_type": "argument"
},
{
"api_name": "zope.interface.implements",
"line_number": 16,
"usage_type": "call"
},
{
"... |
133630255 | from django.shortcuts import render
from django.http import HttpResponse
from django.template import loader
from django.urls import reverse, reverse_lazy
from django.views import generic
from .models import ProductosMenu, CategoriaMenu, ProductosMenuStock
from .forms import ProductosMenuForm
from stock.models import ... | null | restalli/menu/views.py | views.py | py | 8,131 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.views.generic.edit",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "django.views.generic",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "models.ProductosMenu",
"line_number": 15,
"usage_type": "name"
},
{
"api_name... |
577577512 | #!/usr/bin/env python
import argparse
import json
import conan.conanrepo.conanrepo as conanrepo
from subprocess import call
def decorated_print(string):
print("*" * 60)
print('* ' + string)
print("*" * 60)
def get_login_credentials(config_file, section):
try:
conan_repo_config = conanrep... | null | build-tools/build_conan_dependencies.py | build_conan_dependencies.py | py | 2,859 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "conan.conanrepo.conanrepo.Config",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "conan.conanrepo.conanrepo",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "conan.conanrepo.conanrepo.ConanRepoException",
"line_number": 21,
"usage_type"... |
526297122 | from django import forms
from django.contrib import admin
from gobotany.plantshare import models
class QuestionAdminForm(forms.ModelForm):
question = forms.CharField(
widget=forms.Textarea(attrs={'rows':3, 'cols':80})
)
answer = forms.CharField(
widget=forms.Textarea(attrs={'rows':7, 'cols... | null | gobotany/plantshare/admin.py | admin.py | py | 1,142 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.forms.ModelForm",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "django.forms.CharField",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.f... |
552814044 | import os
import collections
import hashlib
class CollectionGenerator(object):
def __init__(self):
self.files = []
self.structure = collections.defaultdict(str)
def find_files(self,catalog):
"""
ะคัะฝะบัะธั ะธัะตั ะฒัะต ัะฐะนะปั ั ัะฐััะธัะตะฝะธะตะผ .mobi ะฒะพ ะฒัะตั
ะฟะพะดะบะฐัะฐะปะพะณะฐั
ะบะฐัะฐะปะพะณะฐ cat... | null | main.py | main.py | py | 1,267 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "collections.defaultdict",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.walk",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_numbe... |
416688187 | from matplotlib import pyplot as plt
import numpy as np
import cv2 as cv
import math
# Compute information entropy for the fusion images]
def Info_cros(img):
tmp = []
for i in range(256):
tmp.append(0)
val = 0
k = 0
res = 0
img = cv.cvtColor(img, cv.COLOR_BGR2GRAY)
im = np.array(i... | null | ComputeVision/ImgStich/ImgStich.py | ImgStich.py | py | 5,602 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "cv2.cvtColor",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "numpy.array",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "math.log",
"line... |
654376746 | import tensorflow as tf
import tensorflow.keras.backend as K
import os, json, sys, math
import pandas as pd, numpy as np
from sklearn.preprocessing import MinMaxScaler
from sklearn.metrics import r2_score
from itertools import chain
from glob import glob
from scipy.signal import savgol_filter
sys.path.append("./utils")... | null | utils/paper_capital_cities.py | paper_capital_cities.py | py | 4,824 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sys.path.append",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "sys.path.append",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_nu... |
321983206 | #-*- coding: utf-8 -*-
# TensorFlow and tf.keras
import tensorflow as tf
from tensorflow.python.framework import ops
import math
from tensorflow import keras
# Helper libraries
import numpy as np
import matplotlib.pyplot as plt
print(tf.__version__)
import ssl
print('begin.....')
print('begin.....')
keep_prob ... | null | basic_cnn/mnist_onehot.py | mnist_onehot.py | py | 13,935 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "tensorflow.__version__",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "ssl._create_unverified_context",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "ssl._create_default_https_context",
"line_number": 28,
"usage_type": "att... |
537730538 | from datetime import datetime
import flask_login as login
from flask import Blueprint, Flask, Markup, redirect, request, url_for
from flask_admin import Admin, AdminIndexView, expose, helpers
from flask_admin.contrib.sqla import ModelView
from werkzeug.security import generate_password_hash
from wtforms import fields,... | null | redata/ui_admin/app.py | app.py | py | 8,866 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "flask.Blueprint",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "flask_login.LoginManager",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "redata.db_operations.metrics_session.expire_all",
"line_number": 28,
"usage_type": "call"
},
... |
144426500 | # -*- coding: utf-8 -*-
# @Time: 2021/7/10 21:21
# @Author: jacksonYuu
# @Software: PyCharm
import os
import threading
from base64 import b64encode
from os import listdir
from os.path import join
from flask import request, render_template, Blueprint, redirect, url_for, make_response
import app.mod_oldperson.controlle... | null | test_project/app/mod_oldperson/views.py | views.py | py | 5,447 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "flask.Blueprint",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "flask.request.args",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "flask.request.a... |
580511231 | import wx
from src.wizard.controller.frmRequiredComboValidator \
import RequiredComboValidator
from src.wizard.controller.frmRequiredValidator \
import RequiredValidator
from src.wizard.controller.frmDigitOnly \
import DigitValidator
from ObjectListView import ObjectListView, ColumnDefn
import wx.lib.maske... | null | src/wizard/view/clsAddNewActionsPanel.py | clsAddNewActionsPanel.py | py | 12,531 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "ObjectListView.ObjectListView",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "ObjectListView.ObjectListView.__init__",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "ObjectListView.ObjectListView",
"line_number": 22,
"usage_type": "na... |
345937174 | #!/lindorffgrp-isilon/maghoi/_conda_env/envs/DSSP/bin/python
#Tuple Index Value
#0 DSSP index
#1 Amino acid
#2 Secondary structure
#3 Relative ASA
#4 Phi
#5 Psi
#6 NH-->O_1_relidx
#7 NH-->O_1_energy
#8 O-->NH_1_relidx
#9 O-->NH_1_energy
#10 NH-->O_2_relidx
#11 NH-->O_2_energy
#12 O-->NH_2_relidx
#13 O-->NH_2_energy
#h... | null | 2021/ML-variants-Hoie-et-al/src/utilities/pdb_to_DSSP_to_prism.py | pdb_to_DSSP_to_prism.py | py | 4,909 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "prism_analysis.prism_folder",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "PrismData.PrismParser",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "os.p... |
154894246 | from flask_restful import fields
from flask_restful.reqparse import RequestParser
from sqlalchemy import or_, func as sql_func
from cebulany.models import db, Transaction, Payment
from cebulany.resources.model import ModelListResource, ModelResource
from cebulany.resources.types import dt_type
resource_fields = {
... | null | cebulany/resources/payment.py | payment.py | py | 3,816 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "flask_restful.fields.Integer",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask_restful.fields",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "flask_restful.fields.Integer",
"line_number": 11,
"usage_type": "call"
},
{
"ap... |
283141646 | """
* Implement an algorithm to determine if a string has all unique
* characters. What if you cannot use additional datastructes?
*
"""
import cProfile
def using_sets(string):
if(len(string) != len(set(string))):
print("Not Unique")
else:
print("Its Unique!")
def using_Counter(string):
import collect... | null | Python/0_CtCI/1.1-IsUnique.py | 1.1-IsUnique.py | py | 1,144 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "collections.Counter",
"line_number": 17,
"usage_type": "call"
}
] |
577927323 | from django.shortcuts import render
# Create your views here.
from dateapp.forms import UserForm
def home_page(request):
form = UserForm()
my_dict={'form':form}
return render(request=request, template_name='dateapp/homepage.html', context=my_dict)
def collect_cookie(request):
name=request.GET['name']
my_dict={... | null | DjangoProjects/project36/dateapp/views.py | views.py | py | 714 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "dateapp.forms.UserForm",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "... |
293341309 | ###################################################################################################################
### ThingSPIN Edge AI SDK Sample
###################################################################################################################
import thingspin.ai.session as session
import thingspin... | null | data/thingspin/ml/sdk/samples/birdclassfication/algorithm/main.py | main.py | py | 3,786 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "tflearn.data_preprocessing.ImagePreprocessing",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "tflearn.data_augmentation.ImageAugmentation",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "tflearn.layers.core.input_data",
"line_number": 30,... |
606073655 | import collections
import numpy as np
from agents.agent import Agent
from agents.core import *
import sys
import torch.optim as optim
eps = 1e-7
class ValueSimOnline(Agent):
def __init__(self, conf, sims, tau=None, backend='pytorch', env=None, env_args=None, backup_alpha=0.01, n_actions=7, memory_size=250000, ben... | null | agents/ValueSimOnline.py | ValueSimOnline.py | py | 8,119 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "agents.agent.Agent",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "numpy.zeros",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "numpy.float32",
"line_number": 66,
"usage_type": "attribute"
},
{
"api_name": "collections.Counter"... |
227831609 | #! /usr/bin/python
# Qt example for VLC Python bindings
import sys
import os.path
import weakref
import vlc
import ctypes
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
sys.path.append("D:\\tongji\\NatureDriving\\src") # just for IDE test
from res.images import *
class MyWidget... | null | VC/RotateWidget.py | RotateWidget.py | py | 12,042 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sys.path.append",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "vlc.Instance",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "weakref.proxy",
"line_... |
301736394 | import tweepy
import os
import pandas as pd
from background_services.config import *
import time
from tqdm import tqdm
from django.db import transaction
from django.conf import settings
from django.utils.timezone import make_aware
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "CMI_Service.settings")
import django
dj... | null | background_services/twitter_services.py | twitter_services.py | py | 13,159 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.environ.setdefault",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "django.setup",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "tweepy.OAuthHandle... |
415974896 | # -*- coding: utf-8 -*-
import config
import logging
class CurrencyPairAdapter(logging.LoggerAdapter):
"""
This adapter prepends the source & dest currency codes to each log message
"""
def process(self, msg, kwargs):
return '[%s/%s] %s' % (self.extra['source'], self.extra['dest'], msg), kwargs... | null | config_logging.py | config_logging.py | py | 803 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.LoggerAdapter",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "config.logging",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "config.logging",
"line_number": 30,
"usage_type": "attribute"
}
] |
150187115 | # Data Set & Epochs & Regression Train steps & Estimated Epochs & Estimation Point & Acc Gap & Loss Gap \\
# MNIST & 21 & 2 & 3 & 15 & ? & ? \\
import tensorflow as tf
from tensorflow.keras import datasets, layers, models
import sys
import os
os.environ['CUDA_VISIBLE_DEVICES'] = "2"
sys.path.append(os.getcwd())
from... | null | Experiments/Conv/Exp89/Exp9/code/Exp9.py | Exp9.py | py | 4,339 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.environ",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "sys.path.append",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.getcwd",
"line_numb... |
621431213 | #!/usr/bin/env python3
from flask import Flask, request, jsonify
app = Flask(__name__)
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
TRIG = 24
ECHO = 23
GPIO.setup(TRIG, GPIO.OUT)
GPIO.setup(ECHO, GPIO.IN)
GPIO.output(TRIG, 0)
#print("Waiting for sensor to settle...")
time.sleep(2)
def measure():
... | null | Projects/IoT/lab3/dashboard.py | dashboard.py | py | 954 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "flask.Flask",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "RPi.GPIO.setmode",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "RPi.GPIO",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "RPi.GPIO.BCM",
"line_number": ... |
187906660 | import Constants
import curses
from curses import ascii
import traceback
from curses import textpad
import math
import functools
import json
import copy
"""
edit.py provides the data structures and associated
functions to edit
Essentially functions as a mini text editor
Meant to be used as a plug in addition to the f... | null | edit2.py | edit2.py | py | 59,973 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "curses.color_pair",
"line_number": 74,
"usage_type": "call"
},
{
"api_name": "curses.color_pair",
"line_number": 75,
"usage_type": "call"
},
{
"api_name": "curses.color_pair",
"line_number": 107,
"usage_type": "call"
},
{
"api_name": "curses.color_p... |
527867016 | #
#
#
#
#
#
import datetime
import time
import json
from urllib.request import urlopen
import math
from .calculate_eto_py3 import Calculate_ETO
DAY = 24*3600
class Wunder_Personal( object ):
def __init__(self,data,eto_sources,rain_sources):
self.access_key = data["access_key"]
s... | null | code/eto_py3/wunderground_personal_weather_station_py3.py | wunderground_personal_weather_station_py3.py | py | 4,796 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "calculate_eto_py3.Calculate_ETO",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 34,
"usage_type": "attribute"
},
{
"api_... |
438069133 | import requests
from bs4 import BeautifulSoup
url = "http://127.0.0.1:9999/video/new"
# with requests.Session() as br:
# res = br.get(url)
browser = requests.Session()
res = browser.get(url)
query = '์์ด์ '
yturl = "https://www.youtube.com/results?search_query=" + query
doc = requests.get(yturl).text # get ... | null | video/crawling.py | crawling.py | py | 766 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "requests.Session",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 16,
"usage_type": "call"
}
] |
126392103 | #!/usr/bin/env python
"""
Examples:
#run it on hpc-cmb cluster
mpiexec ~/script/variation/src/MpiBWA.py -t 8 -i ...
#test parallel run on desktop
mpirun -np 5 -machinefile ~/hostfile /usr/bin/mpipython ~/script/vervet-web/src/MpiBWA.py
-t 6 -f /Network/Data/NCBI/hs_genome.fasta -y2
-i /Network/Data/vervet/ref... | null | src/alignment/MpiBWA.py | MpiBWA.py | py | 13,954 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sys.path.insert",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 39,
"usage_type": "attribute"
},
{
"api_name": "os.path.expanduser",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_... |
472291257 | #coding=utf-8
from django.http import HttpResponse
from django.template import loader
import datetime
def home(request):
return HttpResponse("<h1>my first html<h1>")
def current_datetime(requset):
now = datetime.datetime.now()
html = "<html><body>It is now %s.<body><html>"%now
return HttpResponse(ht... | null | website/website/views.py | views.py | py | 968 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.http.HttpResponse",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "... |
493189102 | from django import template
from django.template.defaultfilters import stringfilter
register = template.Library()
@register.filter(is_safe=True)
@stringfilter
def glyphicon(name):
icon_code = ' <i class="glyphicon glyphicon-'+name+'"></i> '
return icon_code
@register.filter(is_safe=True)
@stringfilter
def mdi(nam... | null | website/templatetags/icons.py | icons.py | py | 412 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.template.Library",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "django.template",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "django.template.defaultfilters.stringfilter",
"line_number": 8,
"usage_type": "name"
},
{
"... |
177224054 | #!/usr/bin/env python
#coding:utf-8
# Author: mozman
# Purpose: svg examples
# Created: 07.11.2010
# Copyright (C) 2010, Manfred Moitzi
# License: MIT License
try:
import svgwrite
except ImportError:
# if svgwrite is not 'installed' append parent dir of __file__ to sys.path
import sys, os
sys.path.ins... | null | createKit.py | createKit.py | py | 3,912 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sys.path.insert",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_num... |
211053665 | # -*- coding: utf-8 -*-
__author__ = 'Ahmed Bedde'
__author__ = ''
import pymysql
from qLibrary import isWordsContinued,tagger,isTotal,replacement,isFirstWord,isLastWord,flatQuery #,normalizeSpaces
##################################################################################################################
# qPe... | null | qPeople.py | qPeople.py | py | 27,094 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "qLibrary.isTotal",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "qLibrary.isFirstWord",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "qLibrary.isLastWord",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "qLibrary.is... |
161338153 | import os
from .exceptions import NpmInstallArgumentsError, NpmInstallError
from .settings import PATH_TO_NPM, NPM_INSTALL_PATH_TO_PYTHON, NPM_INSTALL_COMMAND
from .utils import (
NPM_NAME, npm_installed, npm_version, npm_version_raw, raise_if_dependency_missing,
raise_if_dependency_version_less_than, run_comma... | null | django_node/npm.py | npm.py | py | 3,845 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "utils.npm_installed",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "utils.npm_version",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "utils.npm_version_raw",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "utils.rais... |
143308457 | import datetime
import json
import requests
import logging
import threading
# ่พๅ
ฅ็ฝๅ๏ผๅๅๆต่ฏไพๅญ
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__)
reponse_time = []
OK = []
errorCount = []
class runScript():
def API(self, ... | null | x_test_2019/pressureTest_python.py | pressureTest_python.py | py | 3,263 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.basicConfig",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "requests.get",... |
278324599 | # Written by Kirill 'Kolyat' Kiselnikov
"""Open Reading Frames"""
import regex
from rosalind import patterns
from rosalind import tools
dna1 = 'AGCCATGTAGCTAACTCAGGTTACATGGGGATGACCCCGCGACTTGGATTAGAGTCTCTTTTGGAATA' \
'AGCCTGAATGATCCGAGTAGCATCTCAG'
dna2 = tools.replicate(dna1)
variants = list()
for v in (dna1... | null | rosalind/ORF.py | ORF.py | py | 895 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "rosalind.tools.replicate",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "rosalind.tools",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "rosalind.tools.slice_chain",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "ro... |
43675077 | import os
import sys
import asyncio
from aiohttp.test_utils import AioHTTPTestCase
path_to_application = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), './../../'))
sys.path.insert(0, path_to_application)
from app.app import create_app
from app.utils import get_test_config, migrate, drop_t... | null | tests/functional/__init__.py | __init__.py | py | 1,133 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.path.abspath",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_nu... |
21272664 | import os, glob, json
import numpy as np
import json
from PIL import Image
data_dir = "D:/data/fashion/image_retrieval/street2shop/meta/json"
output_data_dir = "D:/data/fashion/image_retrieval/street2shop/meta/json_new"
image_dir = "D:/data/fashion/image_retrieval/street2shop/images_resize"
if not os.path.isdir(outp... | null | dataset/script/street2shop_clean_labels.py | street2shop_clean_labels.py | py | 2,015 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.path.isdir",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.makedirs",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number":... |
172404374 | from setuptools import setup, find_packages
f=open('README.txt', encoding='UTF-8')
a=f.read()
f.close()
setup(name="triz2sce",
author="Pedro Fernรกndez",
author_email="rockersuke@gmail.com",
version="1.0.8.post1",
license="MIT",
url="http://www.zonafi.rockersuke.com/triz2sce/index.html",
description="Convierte m... | null | pypi_install_script/triz2sce-1.0.8.post1/setup.py | setup.py | py | 499 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "setuptools.setup",
"line_number": 7,
"usage_type": "call"
}
] |
344320043 | import logging
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from apps.core.models import AHAField
from scraper.aha.base import AHABase
logger = logging.getLogger('aha_import')
class AHAImporter(... | null | src/scraper/aha/importer.py | importer.py | py | 6,505 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "scraper.aha.base.AHABase",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "apps.core.models.AHAField",
"line_number": 79,
"usage_type": "call"
},
{
"api_name": "... |
139920160 | """Agent that learns how to play a SNES game by using RLLib algorithms"""
import retro
import argparse
import ray
from ray.rllib.agents import ppo, impala, dqn
from ray.rllib.agents import agent as rllibagent
from ray.tune import register_env
from ray.tune.logger import pretty_print
import envs
import models
import ti... | null | rllib.py | rllib.py | py | 11,549 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "retro.make",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "envs.ButtonsRemapper",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "envs.NoopResetEnv",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "envs.RewardScaler",... |
306207734 | """
Django settings for drivetracker project, example.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import dj_database_url
from drivetracker.settings.base impo... | null | drivetracker/settings/heroku.py | heroku.py | py | 977 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "dj_database_url.config",
"line_number": 38,
"usage_type": "call"
}
] |
453500531 | from django.shortcuts import render,render_to_response, redirect
from django.http import HttpResponseRedirect
from django.conf import settings
from .oauth_client import OAuth_GITHUB,OAuth_QQ,OAuth_WEIBO
from .models import OAuth_ex
from django.contrib.auth import login as auth_login
from django.contrib.auth.models impo... | null | oauth/views.py | views.py | py | 12,484 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.shortcuts.render_to_response",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "oauth_client.OAuth_GITHUB",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "django.conf.settings.GITHUB_APP_ID",
"line_number": 25,
"usage_type": "attr... |
312013867 | #Standard
import os
import sys
import datetime
import subprocess
import traceback
#Third Party
import psutil
#Hydra
from hydra.logging_setup import logger
from hydra import threads
import hydra.hydra_sql as sql
import hydra.single_instance as single_instance
import hydra.hydra_utils as hydra_utils
import networking.s... | null | RenderNode.py | RenderNode.py | py | 14,927 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "networking.servers.TCPServer",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "networking.servers",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "hydra.hydra_sql.get_this_node",
"line_number": 32,
"usage_type": "call"
},
{
... |
432471928 | import copy
import torch
import torch.nn as nn
import torch.nn.functional as F
from torchvision.models.resnet import resnet50, Bottleneck
# change this depend on your dataset
class DualMGN(nn.Module):
def __init__(self,num_classes):
super(DualMGN, self).__init__()
feats = 256
resnet = r... | null | network/dualmgn.py | dualmgn.py | py | 8,207 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "torch.nn.Module",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "torchvision.models.resnet.resnet50",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "torch.... |
169677878 | import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
print("Tensorflow version",tf.VERSION)
from decimal import *
from datagenerator import check_yes_no
import json
import re
import os.path
import time
'''
INSTALL TENSORFLOW:
pip3 install -r requirements.txt
'''
#plt.ion()
#plt.show()
in... | null | lab1/part2.2.py | part2.2.py | py | 11,643 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "tensorflow.VERSION",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.placeholder",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "tensorflow.placeholder",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "... |
49735388 | import bpy
splint_cutter_color = [0.0, 0.6, 0.8, 1.0]
#Popup message box function :
def ShowMessageBox(message="", title="INFO", icon="INFO"):
def draw(self, context):
self.layout.label(text=message)
bpy.context.window_manager.popup_menu(draw, title=title, icon=icon)
##############################... | null | Operators/splint_2.py | splint_2.py | py | 19,035 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "bpy.context.window_manager.popup_menu",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "bpy.context",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "bpy.ops.transform.select_orientation",
"line_number": 22,
"usage_type": "call"
}... |
33807498 | import datetime
from webob import Response
from webob.exc import HTTPFound
import formish
import schemaish
import validatish
from validatish import validator
from sqlalchemy import desc
from sqlalchemy.orm.util import class_mapper
from repoze.bfg.url import route_url
from repoze.bfg.chameleon_zpt import get_templat... | null | seantisinvoice/views/invoice.py | invoice.py | py | 11,438 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "validatish.validator.Validator",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "validatish.validator",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "validatish.Invalid",
"line_number": 36,
"usage_type": "call"
},
{
"api_n... |
226978030 | # -*- coding: utf-8 -*-
# ยฉ <2019> <Omar Torres (otorres@proogeeks.com)>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
from odoo import fields, models, api
from odoo.tests.common import Form
_logger = logging.getLogger(__name__)
class pg_import_base(models.TransientModel):
... | null | pg_import_tools/models/pg_import_base.py | pg_import_base.py | py | 4,250 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.getLogger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "odoo.models.TransientModel",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "odoo.models",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "odoo.te... |
408398967 |
from MobileCrawler import *
from itemPlot import *
from tkinter import *
from tkinter import ttk
import io
from urllib.request import urlopen
from PIL import Image, ImageTk
# from pandastable import Table, TableModel
import matplotlib
matplotlib.use('TkAgg')
from matplotlib.backends.backend_tkagg import FigureCanvasTk... | null | MAIN.py | MAIN.py | py | 7,295 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "matplotlib.use",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "urllib.request.urlopen",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "io.BytesIO",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.