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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
619286867 | import numpy as np
import matplotlib.pyplot as plt
import sys
import h5py
def pltresponse(el, ns_set, set_id_set, resptyp, pcA):
plt.figure(num=33, figsize=[10, 7])
# colormat = np.random.rand(len(set_id_set), 3)
colormat = np.array([[.3, .3, 1.],
[.3, 1., .3],
... | null | fip_collab/2016_04_13_ad_hoc_fip_predict/plot_response.py | plot_response.py | py | 1,510 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "numpy.array",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "h5py.File",
... |
237509589 | from django import forms
class ExportForm(forms.Form):
archivo = forms.FileField(
required=False,
widget=forms.ClearableFileInput(
attrs={'class':"custom-file-input",'multiple': False}))
DESTINO_SANTANDER_WEB = 1
destinos = [
(DESTINO_SANTANDER_WEB,'Santander Web')
... | null | web/export/forms.py | forms.py | py | 466 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.forms.Form",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 3,
"usage_type": "name"
},
{
"api_name": "django.forms.FileField",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.forms"... |
256020848 | from django.contrib.auth import get_user_model
from django.db import migrations
from djangocms_blog.models import Post, PostContent
User = get_user_model()
def move_plugins_to_blog_content(apps, schema_editor):
""" Adds instances for the new model.
ATTENTION: All fields of the model must have a valid defaul... | null | djangocms_blog/migrations/0044_copy_plugins.py | 0044_copy_plugins.py | py | 3,077 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.contrib.auth.get_user_model",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "djangocms_blog.models.Post.objects.all",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "djangocms_blog.models.Post.objects",
"line_number": 19,
"usage_t... |
344899226 | #coding=utf-8
import tensorflow as tf
import config
import scipy.misc
import random
def convert2int(image):
""" Transfrom from float tensor ([-1.,1.]) to int image ([0,255])
"""
return tf.image.convert_image_dtype((image+1.0)/2.0, tf.uint8)
def convert2float(image):
""" Transfrom from int image ([0,25... | null | utils.py | utils.py | py | 5,165 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "tensorflow.image.convert_image_dtype",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "tensorflow.image",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.uint8",
"line_number": 10,
"usage_type": "attribute"
},
{
"... |
637482190 | #!/usr/bin/python
import sys
import math
import getpass
import time,random
# import the python renderman library
import prman
from vector import Vector
from Camera import *
def Scene(ri) :
ri.AttributeBegin()
random.seed(25)
face=[-0.1,-1,-3, 0.1,-1,-3,-0.1,-1,3, 0.1,-1,3]
plank=-5.0
while (plank <=5.0) :
... | null | Lecture2Lighting/Camera/testCamera.py | testCamera.py | py | 2,010 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "random.seed",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "random.uniform",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "random.uniform",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "random.uniform",
"line_... |
141455567 | #coding=utf-8
import os
import time
from selenium import webdriver
from appium import webdriver
from appium.webdriver.common.touch_action import TouchAction
#配置设备和应用信息
desired_caps = {}
desired_caps['platformName'] = 'Android'
desired_caps['platformVersion'] = '4.4.2'
desired_caps['deviceName'] = 'Android Emulator'
de... | null | HW_Login.py | HW_Login.py | py | 1,453 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "appium.webdriver.Remote",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "appium.webdriver",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "time.sleep",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "time.sleep",
... |
296800724 | import re
from decimal import Decimal
import lxml
import lxml.html
import gmail
unread_statements_query = 'mbank has:attachment filename:htm subject:"powiadomienie e-mail"'
def get_unread_transactions():
return get_transactions(unread_statements_query)
def get_transactions(query):
transac... | null | budget.py | budget.py | py | 4,099 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "gmail.get_messages",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "gmail.get_attachments",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "lxml.html.fromstring",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "lxml.ht... |
368885207 | from leviosaPaperSubmission import app,paperSubUtils,paperSubUtilsFile,paperSubUtilsAttach
import sqlite3,os, datetime
from flask import request, session, g, redirect, url_for, abort, render_template, flash,send_from_directory
from werkzeug import secure_filename
import os,copy
@app.route('/submit_review_comments/<int... | null | leviosaPaperSubmission/submitReviewComments.py | submitReviewComments.py | py | 3,318 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "leviosaPaperSubmission.paperSubUtils.display_strings",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "leviosaPaperSubmission.paperSubUtils",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "leviosaPaperSubmission.paperSubUtils.get_paper_info_wit... |
591684289 | __author__ = 'sebastijan.dumancic'
from collections import OrderedDict
import numpy as np
from src.Exceptions import Exceptions
class Factor():
"""
Base class for Factor unit
__________________________
Public methods:
"""
def __init__(self, variables, cardinality, values, sco... | null | src/Factor/Factor.py | Factor.py | py | 10,126 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "numpy.prod",
"line_number": 64,
"usage_type": "call"
},
{
"api_name": "src.Exceptions.Exceptions.SizeError",
"line_number": 65,
"usage_type": "call"
},
{
"api_name": "src.Exceptions.Exceptions",
"line_number": 65,
"usage_type": "name"
},
{
"api_name... |
217357065 | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | null | main.py | main.py | py | 1,276 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "webapp2.WSGIApplication",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "webapp2.WSGIApplication",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "webapp2.RequestHandler",
"line_number": 26,
"usage_type": "attribute"
},
{
... |
487519100 | '''
전처리 과정
1. concat / 완료
2. null, 중복 값 제거 / 완료
3. 행태소 분리, 불용어 처리
4. 데이터셋 생성
'''
from konlpy.tag import Okt
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelEncoder
from tensorflow.keras.utils import to_categorical
from tensorflow.keras.preprocessing.text import *
from tens... | null | pj3/py_file/pre_processing.py | pre_processing.py | py | 2,477 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line... |
356759243 | import sqlite3
CO_PROJECT_DIRECTORS = '[Co Project Director]'
class Reports:
def __init__(self, db_path: str):
self.db_path = db_path
def participants_by_state(self, state: str) -> [str]:
result = set()
con = sqlite3.connect(self.db_path)
cur = con.cursor()
query_res... | null | main/src/reports.py | reports.py | py | 1,976 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sqlite3.connect",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect",
"line_number": 48,
"usage_type": "call"
}
] |
208383290 | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import json
import numpy as np
import random
# In[2]:
def Convey_data_dict(data_dict):
keys = list(data_dict.keys())
all_sentences = []
all_label = np.zeros([1, len(keys)])
for label, key in enumerate(keys):
sample_label = np.zeros(len(keys)... | null | emotionLoader.py | emotionLoader.py | py | 3,255 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "numpy.zeros",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "numpy.append",
"line_number":... |
112699621 | # -*- coding: utf-8 -*-
import os
import random
import string
import win32gui
import win32con
from TEST.bucket.login import *
from selenium import webdriver
from time import sleep
'''
脚本作用 : 景安站
新建多个空间,每个空间都有图片
新建一个空间,然后上传几张图片。循环……
循环里的参数,需要根据实际情况修改
file_dir 上传文件所在文件夹路径
pt 上传文件绝对路径
'''
login = "luokeke"
password = ... | null | selenium_doc/TEST/bucket/upload_bk.py | upload_bk.py | py | 3,332 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "selenium.webdriver.Firefox",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "time.sleep",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "time.sleep",... |
283763395 | """
from http://scipy-lectures.github.com/
"""
from __future__ import print_function
import numpy as np
import matplotlib
matplotlib.use('Agg')
import pylab as pl
import matplotlib.cm as cm
from scipy import ndimage
from datetime import datetime
import os
import sys
parameter_file, img_file = sys.argv[1:3]
paramete... | null | glass_sem_analysis.py | glass_sem_analysis.py | py | 2,876 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "matplotlib.use",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.path.splitext",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_numb... |
434074692 | from django.contrib.auth.decorators import login_required
from django.contrib.auth import login, authenticate
from django.contrib.auth.forms import UserCreationForm
from django.shortcuts import render, redirect
from .models import CSTEST,CTEST,CPPTEST,JAVATEST,PYTHONTEST,result
import datetime
from django.core.paginato... | null | core/views.py | views.py | py | 5,526 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.shortcuts.render",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.decorators.login_required",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "django.contrib.auth.forms.UserCreationForm",
"line_number": 21,
"us... |
459917134 | from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register
from wagtail.contrib.modeladmin import views as modeladmin_views
from admin_list_controls.views import AdminListControlsMixin
from admin_list_controls.options import Filter, FilterGroup, FilterOptions, SortOptions, Sort, BOOLEAN_FILTER, \
... | null | admin_list_controls/tests/test_app/wagtail_hooks.py | wagtail_hooks.py | py | 3,246 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "admin_list_controls.views.AdminListControlsMixin",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "wagtail.contrib.modeladmin.views.IndexView",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "wagtail.contrib.modeladmin.views",
"line_numbe... |
407648467 | import datetime
from helpers import *
from modules import Module
from PIL import Image
import os
class FPS(Module):
"""
Displays FPS on the screen
"""
def __init__(self, screen, fontfile = "numbers_font.bmp"):
super(FPS, self).__init__(screen)
self.fontfile = fontfile
# Gets the parent directory of the m... | null | modules/FPS_test.py | FPS_test.py | py | 1,924 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "modules.Module",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_n... |
146235407 | import numpy as np
import matplotlib.pyplot as plt
import time
props = np.array([[0.4000, 0.4439], [0.2439, 0.1463], [0.1707, 0.2293], [0.2293, 0.7610], [0.5171, 0.9414], [0.8732, 0.6536], [0.6878, 0.5219], [0.8488, 0.3609], [0.6683, 0.2536], [0.6195, 0.2634]])
# init values
weights = np.random.rand(10, 2)
nEpochs =... | null | lab-2/cyclic.py | cyclic.py | py | 2,233 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "numpy.array",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.random.rand",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "numpy.sqrt",
"line_n... |
225528274 | import pandas as pd
import yaml
import os
def normalize_indicator_id(inid):
return inid.strip('.').replace('.', '-')
translation_files = [
os.path.join('translations', 'en', 'global_indicators.yml'),
os.path.join('translations', 'en', 'national_indicators.yml'),
os.path.join('translations', 'ru', 'global_indi... | null | scripts/add_new_indicators.py | add_new_indicators.py | py | 2,929 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.path.join",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 10,... |
101688161 | import os
import sys
import yaml
"""
Usage:
python3 model_deploy_pipeline.py ./pickle_model ../path/to/project/ ../credentials.yaml
"""
PROJ_PATH = os.path.abspath(sys.argv[1])
META_PATH = PROJ_PATH + "/metadata.yaml"
with open(META_PATH) as stream:
try:
metadata = yaml.safe_load(stream)
... | null | src/scripts/Pipelines/git_release_pipeline.py | git_release_pipeline.py | py | 450 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.path.abspath",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "yaml.safe_load",
"line... |
49639166 |
import re
from six import PY2
from six.moves import zip_longest
from procmon_parser.consts import Column, ColumnToOriginalName, RegistryOperation, NetworkOperation, ProcessOperation
SUPPORTED_COLUMNS = [
Column.TIME_OF_DAY,
Column.PID,
Column.PROCESS_NAME,
Column.OPERATION,
Column.PATH,
Colum... | null | tests/test_logs_format.py | test_logs_format.py | py | 6,036 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "procmon_parser.consts.Column.TIME_OF_DAY",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "procmon_parser.consts.Column",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "procmon_parser.consts.Column.PID",
"line_number": 10,
"usage_typ... |
504387195 | from w import akey , skey
from datetime import datetime
import time
from binance.client import Client
import pandas as pd
import numpy as np
import copy
import math
def floatPrecision(f, n):
n = int(math.log10(1 / float(n)))
f = math.floor(float(f) * 10 ** n) / 10 ** n
f = "{:0.0{}f}".format(float(f), n)
return... | null | qwe3.py | qwe3.py | py | 4,816 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "math.log10",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "math.floor",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "w.akey",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "w.skey",
"line_number": 27,
"usa... |
58353765 | """
Crawl info for further use
"""
import time
import random
import threading
from fake_useragent import UserAgent
from bs4 import BeautifulSoup
import redis
import urllib3
import requests
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
ua = UserAgent()
db = redis.StrictRedis(host='127.0.0.1'... | null | reference/DWAssignments/Assignment2/crawl_info.py | crawl_info.py | py | 3,806 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "urllib3.disable_warnings",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "urllib3.exceptions",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "fake_useragent.UserAgent",
"line_number": 16,
"usage_type": "call"
},
{
"api_nam... |
324112356 | # !/usr/bin/env python
# -*- coding: utf-8 -*-
"""
..
/////////////////////////////////////////////////////////////////////////
//
// (c) Copyright University of Southampton IT Innovation, 2015
//
// Copyright in this software belongs to IT Innovation Centre of
// Gamma House, Enterprise Road, Southampton SO16 7... | null | geoparsepy/common_parse_lib.py | common_parse_lib.py | py | 73,166 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "re.compile",
"line_number": 76,
"usage_type": "call"
},
{
"api_name": "re.IGNORECASE",
"line_number": 76,
"usage_type": "attribute"
},
{
"api_name": "re.UNICODE",
"line_number": 76,
"usage_type": "attribute"
},
{
"api_name": "re.DOTALL",
"line_n... |
244937611 | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import glob
import os
import nibabel as nib
import numpy as np
from scipy.ndimage.interpolation import zoom
from scipy import ndimage
import pickle
import nibabel as nib
import random
from torchvision import transforms
import torch.optim as optim
import torch.nn as nn
... | null | mutant_cla-align.py | mutant_cla-align.py | py | 12,088 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.path.join",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 52,
"usage_type": "attribute"
},
{
"api_name": "os.getcwd",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": ... |
157650538 | """
Overview:
Applies joint-space PD controllers
Note:
1) Free joints have 7 numbers: 3D position followed by 4D unit quaternion.
2) Setting too high gains for the whole-body PID -> large desired accelerations ->
higher foot forces -> chattering feet
TODO:
1) change horizontal force limits into torque limits
2) pe... | null | SimulateWoofer.py | SimulateWoofer.py | py | 6,686 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "numpy.set_printoptions",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "WooferXMLParser.Parse",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "mujoco_py.load_model_from_path",
"line_number": 63,
"usage_type": "call"
},
{
"api_n... |
455282721 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import shutil
import time
import os
import tempfile
def show_file_info(filename):
stat_info = os.stat(filename)
_fmt = " {:10}: {}"
print(_fmt.format("Mode", oct(stat_info.st_mode)))
print(_fmt.format("Created", time.ctime(stat_info.st_ctime)))
print(... | null | standard/030.shutil/shutil_copy2.py | shutil_copy2.py | py | 784 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.stat",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "time.ctime",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "time.ctime",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "time.ctime",
"line_number": 15,
... |
554025767 | #!/usr/bin/python3
from collections import namedtuple
import csv
from matplotlib import pyplot as plt
# "Poll" is a class representing the data of a single polling station.
Poll = namedtuple('Poll', ('province_code', 'province',
'territory_code', 'territory',
'regi... | null | catalonia.py | catalonia.py | py | 1,074 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "collections.namedtuple",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.hist",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "matplotlib.py... |
399369369 | """
Module to run tests on BiasFrame class
Requires files in Development suite and an Environmental variable
"""
from pathlib import Path
import os
from IPython import embed
import pytest
import glob
import numpy as np
from pypeit.pypmsgs import PypeItError
from pypeit.images import buildimage
from pypeit.images imp... | null | unit_tests/test_biasframe.py | test_biasframe.py | py | 4,236 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pypeit.spectrographs.util.load_spectrograph",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pypeit.tests.tstutils.data_path",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 34,
"usage_type": "call"
},
... |
108964779 | from django.shortcuts import render_to_response as r
from s13sitecore.helpers import ContextHelpers as ch
from s13sitecore.helpers import FSHelpers as fh
from s13sitecore.models.ContentModels import SiteSection as Section, \
Article, User
def index(request):
"""Shows the Home Article of the Home Section."""
... | null | s13sitecore/views/Public.py | Public.py | py | 6,281 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "s13sitecore.helpers.ContextHelpers.create_context",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "s13sitecore.helpers.ContextHelpers",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "s13sitecore.models.ContentModels.SiteSection.objects.all",
... |
400027684 | from django.utils.translation import gettext as _
from zerver.lib.exceptions import ResourceNotFoundError
from zerver.models import ScheduledMessage, UserProfile
def access_scheduled_message(
user_profile: UserProfile, scheduled_message_id: int
) -> ScheduledMessage:
try:
return ScheduledMessage.obje... | null | zerver/lib/scheduled_messages.py | scheduled_messages.py | py | 491 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "zerver.models.UserProfile",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "zerver.models.ScheduledMessage.objects.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "zerver.models.ScheduledMessage.objects",
"line_number": 11,
"usage_ty... |
333909217 | #!/usr/bin/env python
# coding: utf-8
# In[1]:
from sklearn.preprocessing import LabelEncoder,MinMaxScaler
import numpy as np
import mahotas
import cv2
import os
import h5py
# In[2]:
# path to training data
train_path="train"
#bns for histogram
bins=30
#特徵描述符1-Hu Moments
def fd_hu_moments(image):
image=cv2... | null | feature_train.py | feature_train.py | py | 3,244 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "cv2.cvtColor",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "cv2.HuMoments",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "cv2.moments",
... |
82389398 | # simu - Robot simulation. {{{
#
# Copyright (C) 2011 Nicolas Schodet
#
# APBTeam:
# Web: http://apbteam.org/
# Email: team AT apbteam DOT org
#
# 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 F... | null | host/simu/model/rectangular_obstacle.py | rectangular_obstacle.py | py | 2,595 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "utils.observable.Observable",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "utils.observable.Observable.__init__",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "utils.observable.Observable",
"line_number": 33,
"usage_type": "name"
... |
243803476 | # Python script for visualization of FV solution computed with MUSCL scheme
import sys
import matplotlib.pyplot as plt
import numpy as np
# Read filenames
if len(sys.argv) != 3:
print ("Usage: " + sys.argv[0] + " <infile> <outfile>")
else:
input_file = str(sys.argv[1])
output_file = str(sys.argv[2])
# ... | null | homeworks/ExtendedMUSCL/mastersolution/plot_musclsolution.py | plot_musclsolution.py | py | 1,030 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sys.argv",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number":... |
266998722 | import bpy
import bmesh
import math
import mathutils
import copy
from mathutils import Vector
from random import random, seed
from mathutils.bvhtree import BVHTree
from bpy_extras import view3d_utils
from bpy_extras.object_utils import world_to_camera_view
from bpy.props import (StringProperty,
BoolProperty,
... | null | blender/addon_experiments/old/meshSelectTools2_v02.py | meshSelectTools2_v02.py | py | 14,841 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "bpy.context",
"line_number": 45,
"usage_type": "attribute"
},
{
"api_name": "bpy.context",
"line_number": 51,
"usage_type": "attribute"
},
{
"api_name": "bpy.context",
"line_number": 54,
"usage_type": "attribute"
},
{
"api_name": "bpy.context",
... |
317713289 | import json
import os
import shutil
import dhash
from PIL import Image
from tqdm import tqdm
from .models import AnoTest
from .parser import parse_date, guess_ano_folder, guess_img_folder, XMLParser
from tempfile import mkdtemp
from threading import Thread
from Search.models import Tags
from Download.tasks import send_... | null | src/Upload/unpack.py | unpack.py | py | 8,053 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "parser.parse_date",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "shutil.unpack_archive",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "shutil.unpack_archive",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "os.walk... |
39194220 | #!/usr/bin/python
from optparse import OptionParser
#These are the modules that are needed for this script
# module load numpy
# module use /net/gmi.oeaw.ac.at/software/shared/nordborg_common/modulefiles/
# module load pygwas
import logging
import numpy
import numpy.ma
import pandas
from pygwas.core import genotype
imp... | null | 15_crosses_Jan202016/03_CalcHammingDist_fromVCF.py | 03_CalcHammingDist_fromVCF.py | py | 7,844 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "math.factorial",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "math.log",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "scipy.log",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "scipy.log",
"line_number":... |
163714084 | # built in libraries
import traceback
import threading
import time
import sys
import itertools
# tamcolors libraries
from tamcolors.tests import all_tests
from tamcolors.tam_io.tam_buffer import TAMBuffer
from tamcolors.tam_io import any_tam
"""
TAMLoop
Handlers FPS, Key input, drawing, updating and TAMFrame stack
... | null | tamcolors/tam/tam_loop.py | tam_loop.py | py | 11,095 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "tamcolors.tests.all_tests.stability_check",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "tamcolors.tests.all_tests",
"line_number": 51,
"usage_type": "name"
},
{
"api_name": "tamcolors.tests.all_tests.stability_check",
"line_number": 52,
"usage... |
512618574 | # -*- coding: utf-8 -*-
"""
profiling.stats
~~~~~~~~~~~~~~~
Stat classes.
"""
from __future__ import absolute_import, division
from collections import defaultdict
import inspect
import time
from six import itervalues
from six.moves import map
from .sortkeys import by_total_time
__all__ = ['Stat', 'Sta... | null | profiling/stats.py | stats.py | py | 9,694 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sortkeys.by_total_time",
"line_number": 93,
"usage_type": "name"
},
{
"api_name": "inspect.getmodule",
"line_number": 200,
"usage_type": "call"
},
{
"api_name": "six.itervalues",
"line_number": 240,
"usage_type": "call"
},
{
"api_name": "time.time",... |
208826018 | import os
import pandas as pd
from functools import cache
from .api import session as s
from .core import clean_4, write_db, insert_db
league_id = os.environ["LEAGUE_ID"]
ranking_url = f"https://api.laligafantasymarca.com/api/v4/leagues/{league_id}/ranking"
@cache
def ranking():
ranking = s().get(ranking_url).j... | null | src/ranking.py | ranking.py | py | 751 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.environ",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "api.session",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "core.clean_4",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "functools.cache",
"line_n... |
619306152 | import re
import feedparser
import time
import asyncio
import requests
from .models import *
from .serializers import HazardWarningsWSSerializer
from django.conf import settings
import aiosmtplib
import nltk
import json
import dateutil.parser
from email.message import EmailMessage
from bs4 import BeautifulSoup
from dja... | null | hazard_feed/utils.py | utils.py | py | 10,206 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "re.search",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "django.db.utils.OperationalError",
"line_number": 40,
"usage_type": "name"
},
{
"api_name": "config.WEATHER_FEED_URL",
"line_number": 48,
"usage_type": "argument"
},
{
"api_name":... |
352223786 | #!/usr/bin/python
from mininet.net import Mininet
from mininet.node import Controller, RemoteController, OVSController
from mininet.node import CPULimitedHost, Host, Node
from mininet.node import OVSKernelSwitch, UserSwitch
from mininet.node import IVSSwitch
from mininet.cli import CLI
from mininet.log import setLogLe... | null | host_cache_server.py | host_cache_server.py | py | 8,052 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.listdir",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 49,
"usage_type": "attribute"
},
{
"api_name": "os.path.islink",
"line_numbe... |
577375737 | # python
import os
import numpy as np
from sklearn.metrics import auc
########################################################
# plotting
import matplotlib as mpl
# mpl.use('Agg', warn=False)
# mpl.rcParams['font.family'] = ['HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue', 'Helvetica', 'Arial', 'Lucid... | null | plotting.py | plotting.py | py | 6,063 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "matplotlib.rcParams",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.rcParams",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.rcParams",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_na... |
137684176 | import matplotlib.pyplot as plt
import numpy as np
import torch
from torch import nn
from torch import optim
import torch.nn.functional as F
from torchvision import datasets, transforms, models
from collections import OrderedDict
import PIL
from PIL import Image
import argparse
parser = argparse.ArgumentParser()
par... | null | utilities (1).py | utilities (1).py | py | 6,290 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "torchvision.transforms.Compose",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "torchvision.transforms",
"line_number": 39,
"usage_type": "name"
},
{
"api... |
590619623 | # -*- coding: utf-8 -*-
import scrapy
from boj.items import BojItem
class SpiderSpider(scrapy.Spider):
name = 'spider'
allowed_domains = ['acmicpc.net']
start_urls = ['https://www.acmicpc.net/ranklist']
page_num = 1
def parse(self, response):
all_users = response.css('#ranklist a[href^=\/... | null | boj/boj/spiders/spider.py | spider.py | py | 934 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "scrapy.Spider",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "scrapy.Request",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "scrapy.Request",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "boj.items.BojItem",
... |
212025594 | from datetime import datetime
import pytz
from django.test import TestCase
from casexml.apps.case.mock import CaseFactory, CaseStructure
from casexml.apps.case.tests.util import delete_all_xforms, delete_all_cases
from casexml.apps.case.util import get_datetime_case_property_changed
from corehq.form_processor.interfac... | null | corehq/ex-submodules/casexml/apps/case/tests/test_property_changed_date.py | test_property_changed_date.py | py | 3,028 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.test.TestCase",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "casexml.apps.case.mock.CaseFactory",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "casexml.apps.case.tests.util.delete_all_xforms",
"line_number": 18,
"usage_type":... |
430668515 | #!/usr/bin/env python
# coding=utf-8
# --------------------------------------------------------
# Tensorflow Faster R-CNN
# Licensed under The MIT License [see LICENSE for details]
# Written by Xinlei Chen, based on code from Ross Girshick
# --------------------------------------------------------
"""
Demo script show... | null | tools/demo.py | demo.py | py | 13,863 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "numpy.where",
"line_number": 113,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 118,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 118,
"usage_type": "name"
},
{
"api_name": "matplotli... |
242472590 | from django.shortcuts import redirect, render
from . import models
# Create your views here.
def index(req):
if req.POST:
models.Makan.objects.create(
item=req.POST['item'],
jenis=req.POST['jenis'],
harga=req.POST['harga'],
)
return redirect('/')
mak... | null | 2-3/food/makanan/views.py | views.py | py | 421 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.shortcuts.redirect",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 15,
"usage_type": "call"
}
] |
423547784 | import json
import boto3
import os
import time
import base64
from decimal import Decimal
def create_oidc_application(sso_oidc_client):
print("Creating temporary AWS SSO OIDC application")
client = sso_oidc_client.register_client(
clientName='default',
clientType='public'
)
client_id =... | null | functions/createDeviceUrl/handler.py | handler.py | py | 2,444 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "boto3.resource",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "decimal.Decimal",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "base64.b64decode",
"line... |
332518300 | # coding:utf-8
from django import forms
"""
借此实现博客的评论功能
"""
class CommentForm(forms.Form):
"""
评论 表单 用于发表博客的评论。评论表单的类并根据需求定义了三个字段:称呼、邮箱和评论内容。这样我们就能利用它来快速生成表单并验证用户的输入。
"""
name = forms.CharField(label='称呼',max_length=16,error_messages={
'required':'请填写您的称呼',
'max_length':'称呼太... | null | Blog/forms.py | forms.py | py | 1,625 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.forms.Form",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.forms.CharField",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.forms... |
331155196 | from PyQt5.QtWidgets import*
from matplotlib.backends.backend_qt5agg import FigureCanvas
from matplotlib.figure import Figure
import matplotlib.animation as animation
from config import *
from fouriertransform import FourierTransform
import numpy as np
from math import pi
import threading
import time
class Matpl... | null | matplotlibwidget.py | matplotlibwidget.py | py | 5,569 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "matplotlib.backends.backend_qt5agg.FigureCanvas",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "matplotlib.figure.Figure",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "numpy.empty",
"line_number": 50,
"usage_type": "call"
},
{
... |
83494424 | # -*- coding: utf8 -*-
import json, ijson
import re
from pprint import pprint
# pip install namu-wiki-extractor
from namuwiki.extractor import extract_text
try:
# python 3
from urllib.parse import unquote_plus
except:
# python 2
from urllib import unquote_plus
filename = '/home/pipaek/data/corpus/hangul/namuwiki/... | null | clean_namuwiki3.py | clean_namuwiki3.py | py | 997 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "ijson.items",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "namuwiki.extractor.extract_text",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "namuwiki.extractor.extract_text",
"line_number": 37,
"usage_type": "call"
}
] |
314716292 | # Copyright 2019, Jorj McKie, mailto:<jorj.x.mckie@outlook.de>
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in co... | null | hinted-compilation/hinted-mods.py | hinted-mods.py | py | 11,785 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "nuitka.plugins.PluginBase.NuitkaPluginBase",
"line_number": 66,
"usage_type": "name"
},
{
"api_name": "nuitka.utils.Timing.StopWatch",
"line_number": 74,
"usage_type": "call"
},
{
"api_name": "nuitka.Options.options",
"line_number": 79,
"usage_type": "attri... |
503086565 | from blcks import blcks
import json
import redis
FAAS_METHOD_NAME = "detectredis"
logger = blcks.logger
@blcks
def main(event, context):
pass
@blcks.script(FAAS_METHOD_NAME)
def process(tag_name):
result = {
"fail_hosts_count": 0,
"fail_hosts": []
}
host_service = blcks.createServic... | null | example/host.detect.redis/src/blcks/detectredis/handler/handler.py | handler.py | py | 1,259 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "blcks.blcks.logger",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "blcks.blcks",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "blcks.blcks",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "blcks.blcks.createServic... |
526219320 | import os
import re
from enum import Enum
from itertools import groupby
from nltk.tag import StanfordNERTagger
from nltk.tokenize import word_tokenize
from spacy.en import English
SPLIT_WORDS_REGEX = r"((?:[^\d\W]{2,}))"
BIGRAM_WORDS_REGEX = r"((?:[^\d\W]{2,}))\s((?:[^\d\W]{2,}))"
HASHTAG_REGEX = r'(#\w+)'
AT_MENTIO... | null | src/content_extraction_methods.py | content_extraction_methods.py | py | 3,281 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "spacy.en.English",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "nltk.tag.StanfordNERTagger",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "enum.Enum... |
81574163 | import discord
import discord.ext.commands as commands
import requests
import os
class Inspirobot(commands.Cog):
def __init__(self, bot, timeouts, generic_responses):
self.bot = bot
self.timeouts = timeouts
self.generic_responses = generic_responses
@commands.command()
async def i... | null | commands/inspirobot.py | inspirobot.py | py | 1,188 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "discord.ext.commands.Cog",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "request... |
21270520 | import json
from django.views.generic import TemplateView
from .widgets import _py_datetime_format_to_js
OPTION_KEYS = ('format', 'datepicker', 'timepicker', 'language')
def _options_valid(options):
return True
class OptionParser:
@staticmethod
def _to_bool(value):
if 'true' == value.lower(... | null | datetimepicker/views.py | views.py | py | 1,540 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "widgets._py_datetime_format_to_js",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "django.views.generic.TemplateView",
"line_number": 37,
"usage_type": "name"
},
{
"api_name": "json.dumps",
"line_number": 61,
"usage_type": "call"
}
] |
256100000 |
import os, shutil, json, datetime
from openpyxl import *
def copy_handover_sheets(site_list):
with open("Reference Files\\config.json") as config:
global config_info
config_info = json.load(config)
if config_info["remove old handover sheets?"] == True:
for file in os.lis... | null | stock/move_handover_sheets.py | move_handover_sheets.py | py | 2,392 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "json.load",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 14,
... |
408571974 | import json
import logging
from config import *
def parse_port_channel():
path = opj(PARSED_CLI_PATH, 'main')
results = {}
for fn in os.listdir(path):
hostname = fn[:-5]
with open(opj(path, fn)) as f:
data = json.load(f)
pc = data.get('show port-channel summary')
... | null | advanced/20_topo.py | 20_topo.py | py | 667 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "json.load",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "logging.info",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 27,
"usage_type": "call"
}
] |
234668392 |
import datetime
import csv, io
from django.contrib import messages
from django.contrib.auth.decorators import permission_required
from django.shortcuts import render, redirect, HttpResponse
from django.views.generic.base import TemplateView
from app.core.transform_to_rozetka_xml import from_csv_to_rozetka_xml
from .m... | null | app/core/views.py | views.py | py | 8,345 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.views.generic.base.TemplateView",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "models.MetaTag.objects.filter",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "models.MetaTag.objects",
"line_number": 35,
"usage_type": "attribute... |
602098815 | import numpy as np
import matplotlib.pyplot as plt
from PTAfast.hellingsdowns import HellingsDowns as HD
from PTAfast.tensor import Tensor
# setup reference HD
lMax = 30
Zta = np.linspace(0, np.pi, lMax + 1) # angle space with 30 divisions
hd = HD(lm = lMax) # default lm = 30 multipoles
# make plot
hdorf = hd.get_ORF... | null | ex2_halfluminaltensor.py | ex2_halfluminaltensor.py | py | 1,471 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "numpy.linspace",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.pi",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "PTAfast.hellingsdowns.HellingsDowns",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.s... |
376275847 | # Author: Shao Zhang, Phil Saltzman, and Eddie Canaan
# Last Updated: 4/19/2005
#
# This tutorial will demonstrate some uses for intervals in Panda
# to move objects in your panda world.
# Intervals are tools that change a value of something, like position, rotation
# or anything else, linearly, over a set period of ti... | null | Scripts/reference/Panda/Glove3D.py | Glove3D.py | py | 4,741 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "direct.showbase.ShowBase.ShowBase",
"line_number": 34,
"usage_type": "name"
},
{
"api_name": "direct.showbase.ShowBase.ShowBase.__init__",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "direct.showbase.ShowBase.ShowBase",
"line_number": 36,
"usag... |
559932261 | """
@author: Shiyu Huang
@contact: huangsy13@gmail.com
@file: model.py
"""
import pickle
import tensorflow as tf
import numpy as np
from .utils import check_dir, del_dir, create_dir
import os
# from tensorflow.python.ops.rnn import dynamic_rnn
def get_step(model_path):
with open(model_path, 'rb') as f:
m... | null | TART/model.py | model.py | py | 18,123 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pickle.load",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "tensorflow.get_collection",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "tensorflow.GraphKeys",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "tenso... |
402962893 | import subprocess
from os.path import isfile,join
from os import listdir,environ
from stat import S_ISREG, ST_CTIME, ST_MODE
import time
import os
from psutil import disk_partitions
import glob
import sys
import argparse
import fnmatch
import re
import signal
#TODO
#exceptions
#replace sys.stdout. with print
#
def te... | null | scripts/advanced_log_cleaner/log_cleaner.py | log_cleaner.py | py | 17,525 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sys.stderr.write",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sys.stderr",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "sys.exit",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "sys.stderr.write",
"lin... |
564118741 | import angr
import sys
import os
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
#import logging
#logging.getLogger('angr').setLevel('DEBUG')
#build_location = os.path.join(os.getcwd(),'..','build')
def bindiff(binary_path_1, binary_path_2, outputDir):
#binary_path_1 = os.path.join(build_locatio... | null | src/test_bindiff.py | test_bindiff.py | py | 5,221 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "angr.Project",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "angr.Project",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 99,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentDe... |
615391393 |
# --*-- coding : utf-8 --*--
# Project : python22
# Current file : test_03_recharge_充值.py
# Author : 大壮
# Create time : 2019-10-24 21:18
# IDE : PyCharm
# TODO 成长很苦,进步很甜,加油!
import json
import os
import unittest
from lemon_25_191023_充值接口_用例关联.test_practice_01_25.libs.ddt import ddt, data
# 导入自己写的方... | null | lemon/python22/lemon_25_191023_充值接口_用例关联/test_practice_01_25/test_case/test_03_recharge_充值.py | test_03_recharge_充值.py | py | 4,854 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "unittest.TestCase",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "lemon_25_191023_充值接口_用例关联.test_practice_01_25.common.config_handler_peizhiwenjian.config.read",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "lemon_25_191023_充值接口_用例关联.te... |
519302197 | #Copyright (c) 2015 Shiran Dudy.
#All rights reserved.
#Redistribution and use in source and binary forms are permitted
#provided that the above copyright notice and this paragraph are
#duplicated in all such forms and that any documentation,
#advertising materials, and other materials related to such
#distribution an... | null | training1/userCred.py | userCred.py | py | 1,566 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "xml.etree.ElementTree.parse",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "json.l... |
480921325 | #!/usr/bin/python3
# -*- encoding: utf-8 -*-
"""
@文件 : 网络设备端口状态采集程序
@时间 : 2021-2-16 4:50
@作者 : lansetianhuo
@版本 : 1.0
@联系方式 : 24279100@qq.com
@功能 :
"""
# Start typing your code from here
import time
from netmiko import ConnectHandler, NetmikoTimeoutException, NetmikoAuthenticationException... | null | 网络设备端口状态采集程序-华为、中兴.py | 网络设备端口状态采集程序-华为、中兴.py | py | 10,075 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "re.compile",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "re.split",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "re.split",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 61,
"... |
113154541 | #!/usr/bin/env python
'''
GOAL:
This code will remove cosmic rays.
EXAMPLE:
In the directory containing all flattened objects with incorrect headers type in the command line:
from within ipython
%run ~/github/HalphaImaging/uat_zipcosmic.py --filestring tr
INPUT/OUPUT:
Input --> all tr*.fits -- ... | null | python3/uat_zapcosmicrays.py | uat_zapcosmicrays.py | py | 2,052 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "astropy.io.fits.open",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "astropy.io.fit... |
506429892 | from __future__ import print_function, division
import torch
from torch.utils.data import DataLoader
from torchvision import models
from data import *
from model import *
from utils import *
def test_model(null_split):
use_cuda = torch.cuda.is_available()
torch.manual_seed(1)
device = torch.device("cuda" ... | null | HAM10000_Null_Space_Tuning/ham10000_null_space/test.py | test.py | py | 1,842 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "torch.cuda.is_available",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "torch.manual_seed",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.devic... |
625557740 | #!/usr/bin/env python
#import packages
import numpy as np
import pandas as pd
#import visualization tool
import seaborn as sns
import matplotlib.pyplot as plt
#import Socrata for API use
from sodapy import Socrata
#get data through API with sodacra
client = Socrata("data.lacity.org", None)
results = client.get("r4k... | null | panda_analysis.py | panda_analysis.py | py | 1,325 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sodapy.Socrata",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame.from_records",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "se... |
624259778 | #!/usr/bin/env python
#===============================================================================
# GetRouterOpenPortsAll
#
# Description:
# Script to open all processed files (*pVA.txt) of router configuration
# information and calculate used/unused ports (1G, 10G, 100G). User selects
# a raw Device Con... | null | archive/GetRouterOpenPortsAll.py | GetRouterOpenPortsAll.py | py | 3,259 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "archive.FindListofRouters.createRouterListDevs",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "src.WriteFileRtrAssign.writeLogMessage",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "archive.SetRouterType.RouterLookup",
"line_number": 59,... |
40717633 | import pandas as pd
import numpy as np
import sys
import nltk
import re
import filters
import preprocess
input_filename = './' + sys.argv[1]
output_filename = "./" + sys.argv[2]
def reverse(sentence):
answer = ''
temp = ''
for char in sentence:
if char != ' ':
temp += char
el... | null | rawCheckDrug.py | rawCheckDrug.py | py | 1,344 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sys.argv",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "nltk.word_tokenize",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "preprocess.lowercaseAnd... |
194200721 | #!/usr/local/bin/python
# -*- coding: utf-8 -*-
###/usr/bin/python
# upload.py
import pysftp
import threading
import time
up_lock = threading.RLock()
class Uploader(object):
def __init__(self):
self.HOST = '172.21.42.152'
self.PORT = 22
self.USER = 'iwatalab'
self.PRIVATE_KEY_FILE... | null | kumamon/uploader.py | uploader.py | py | 957 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "threading.RLock",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pysftp.Connection",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_num... |
349979797 | from flask import request, render_template, Response
from flask_restx import Resource
from ..api import api
from .. import APP, LOG
@api.route('/index')
class Index(Resource):
@api.doc('get_index', responses={404: "Not Found", 200: "OK"})
def get(self):
try:
data = render_template('pages/i... | null | portal/routes/index.py | index.py | py | 1,250 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "flask_restx.Resource",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "flask.render_template",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "flask.Response",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "api.api.doc"... |
448808334 | from django.shortcuts import render
from django.template.loader import render_to_string
from django.conf import settings
from django.http import HttpResponseForbidden, HttpResponseBadRequest, JsonResponse
from django.views.generic import View
from django.views.decorators.csrf import csrf_exempt
from django.utils.decora... | null | datebot/views.py | views.py | py | 2,717 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "telepot.Bot",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "django.conf.settings.TELEGRAM_TOKEN",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "django.conf.settings",
"line_number": 16,
"usage_type": "name"
},
{
"api_nam... |
474604895 | # =============================================================================
# Standard imports
# =============================================================================
import os
import logging
import datetime
# =============================================================================
# External imports ... | null | 03 scripts/00 Superceded/04 Model Logistic r00.py | 04 Model Logistic r00.py | py | 8,439 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "numpy.random.seed",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "warnings.filterwarnings",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "warnings.... |
469688709 | from os import path
import sys
import pygame as py
from Action import Action
class Player(py.sprite.Sprite):
"""
Player Sprite
"""
def resource_path(self, relative_path):
""" Get absolute path to resource, works for dev and for PyInstaller """
try:
# PyInstal... | null | Players.py | Players.py | py | 11,907 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pygame.sprite",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "sys._MEIPASS",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path",
"li... |
346221776 | import json
import os
import traceback
from pathlib import Path
import requests
def get_request(url):
"""
发起get 请求
:param url:
:return:
"""
response = requests.request("GET", url)
return response.text
def post_request(url, payload):
"""
发起 post 请求
:param url:
:param payl... | null | util/http_client.py | http_client.py | py | 2,651 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "requests.request",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "requests.request",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "requests.request",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "requests.request",... |
514364623 | import json, os
from nxpservice import *
class kafka(nxpservice):
def __init__(self, id):
self.id = id
with open("%s.json" % __file__.split('.')[0]) as f:
node = json.load(f)
self.properties = node["properties"]
def get_hw_requirement(self):
return self.properties... | null | topology_builder/nodes/apache/kafka.py | kafka.py | py | 872 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "json.load",
"line_number": 9,
"usage_type": "call"
}
] |
89655652 |
import time
from collections import deque
import numpy as np
import tensorflow as tf
import tensorflow.keras as keras
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import InputLayer, Dense
class DQN:
'''
Baseline Deep Q-Network with experience replay
'''
def __init__(se... | null | homework_5/agents/DQN.py | DQN.py | py | 9,060 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "tensorflow.keras.optimizers.Adam",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras.optimizers",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.keras",
"line_number": 31,
"usage_type": "name"
},
{
... |
153848113 | from Structs import *
import random
from random import randint
import copy
import shapely
from shapely.ops import *
from shapely.geometry import mapping
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches as patches
class Env:
def __init__(self, random_seed = None):
self.state = St... | null | EnvAPI.py | EnvAPI.py | py | 6,915 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "numpy.random.seed",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "numpy.random.rand",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "numpy.random",
... |
44872281 | import os
from pythia.dataset_utils import text_processing
from pythia.train_model import model_factory
import torch
from collections import OrderedDict
import numpy as np
import PIL
from pythia.train_model.Engineer import one_stage_run_model, masked_unk_softmax
def load_vocab_dict(path):
return text_processi... | null | tools/demo_utils.py | demo_utils.py | py | 4,321 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pythia.dataset_utils.text_processing.VocabDict",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pythia.dataset_utils.text_processing",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"line_number": 20,
"usage_type": "call... |
530472888 | '''
Created on 2017年6月20日
@author: Administrator
'''
from multiprocessing import Pool, cpu_count
import time
#计算平方和
def fn(n):
time.sleep(1)#必须设置休眠时间,模拟运算操作,否则看不出来效果
return n*n
if __name__ == '__main__':
count=cpu_count()
print("cup内核数",count)
testFl=[1,2,3,4,5]
print("顺序执行")... | null | src/process/processPool.py | processPool.py | py | 1,124 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "time.sleep",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "multiprocessing.cpu_count",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_... |
73025462 | import asyncio, sys
import playground
import escape_room_006 as er
from autograder_ex8_packets import AutogradeStartTest, AutogradeTestStatus, AutogradeResultRequest, AutogradeResultResponse
#from gamepacket import GameCommandPacket, GameResponsePacket
from gamepacket import *
import playground.common.logging as pgLog
... | null | 8/ex7server.py | ex7server.py | py | 5,021 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.path.join",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "CipherUtil.loadCertFromFile",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "playground.comm... |
582211200 | from typing import List
"""
Union Find Data Structure
https://github.com/williamfiset/data-structures/blob/master/com/williamfiset/datastructures/unionfind/UnionFind.java
"""
class UnionFind:
numComponents = 0
size = 0
sizes: List[int] = []
ids: List[int] = []
def __init__(self, size: int):
... | null | python/graphs/UnionFind.py | UnionFind.py | py | 1,503 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "typing.List",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 11,
"usage_type": "name"
}
] |
400973395 | import json
import discord
from discord.ext import commands
from utils import logger
from utils import globals as GG
log = logger.logger
CHECKS = [' ', ',', '.', '!', '?', None, '"', '\'', '(', ')', '{', '}', '[', ']', '_', '-', ':', '|', '*', '~']
class Blacklist(commands.Cog):
def __init__(self, bot):
... | null | cogs/blacklist.py | blacklist.py | py | 10,484 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "utils.logger.logger",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "utils.logger",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "discord.ext.commands.Cog",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "dis... |
34157163 | import numpy as np
from keras.models import Sequential
from keras.layers import Dense, LSTM
from sklearn.model_selection import train_test_split
from keras.callbacks import EarlyStopping
from sklearn.metrics import mean_squared_error, r2_score
a = np.array(range(1, 101))
size = 8
def split_8(seq, size):
list = [... | null | keras/keras35_lstm_mlp2.py | keras35_lstm_mlp2.py | py | 1,552 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "numpy.array",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.reshape",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_te... |
446044333 | #!/usr/bin/env python
'''
Write the cloudwatch logs configuration file
'''
import logging
import os
import sys
import boto3
import hashlib
import re
import yaml
import jinja2
import requests
LOG = logging.getLogger(__name__)
EC2_METADATA_SERVICE_ENDPOINT = "http://169.254.169.254/latest"
def get_instance_identity(... | null | files/configure_cloudwatch_logs.py | configure_cloudwatch_logs.py | py | 7,508 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "logging.getLogger",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "boto3.client",
"line_... |
52334514 | from django.shortcuts import render
from django.http import HttpResponseRedirect, HttpResponse
from share.forms import UserCreationForm, UserAuthenticationForm, ShipmentForm
from django.contrib.auth import login, authenticate
from django.contrib.auth.decorators import login_required
from share.models import Shipment
fr... | null | share/views.py | views.py | py | 2,773 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.shortcuts.render",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "share.forms.UserCreationForm",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "django.http.HttpResponse",
"line_number": 22,
"usage_type": "call"
},
{
"api... |
591346157 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jul 2 14:29:39 2018
@author: ross
"""
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
dataset = pd.read_csv('50_Startups.csv')
x = dataset.iloc[:, :-1].values
y = dataset.iloc[:, 4].values
# Encoding categorical data
from skl... | null | Part 2 - Regression/Section 5 - Multiple Linear Regression/mlr.py | mlr.py | py | 1,870 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pandas.read_csv",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.LabelEncoder",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.OneHotEncoder",
"line_number": 22,
"usage_type": "call"
},
{... |
534070186 | import datetime
import os
api_key_dev = os.getenv('API_KEY_DEV', '')
api_key_prod = os.getenv('API_KEY_PROD', '')
url_dev = os.getenv('URL_DEV')
url_prod = os.getenv('URL_PROD', 'https://jobsearch.api.jobtechdev.se/')
DEV = (url_dev, api_key_dev, 'DEV')
PROD = (url_prod, api_key_prod, 'PROD')
TARGETS = [DEV, PROD]
O... | null | tests/compare/settings_for_compare.py | settings_for_compare.py | py | 437 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.getenv",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 8,
"usa... |
581387738 | import requests
import json
import time
from requests.auth import HTTPBasicAuth
url1 = 'https://sandboxdnac2.cisco.com/dna/system/api/v1/auth/token'
url2 = 'https://sandboxdnac2.cisco.com/dna/intent/api/v1/network-device'
url3 = 'https://sandboxdnac2.cisco.com/dna/intent/api/v1/network-health'
url4 = 'https://sandbox... | null | python-server/cisco.py | cisco.py | py | 8,014 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "requests.post",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "requests.auth.HTTPBasicAuth",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "requests.request",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "time.time"... |
54050431 | #!/usr/bin/env python
# -----------------------------------------------------
# Written by Zhu Lingfeng on 2020/2/21.
# -----------------------------------------------------
import sys
sys.path.insert(0, sys.path[0] + '/..')
from pycocotools.coco import COCO
from pycocotools.cocoeval import COCOeval
annType = ['segm... | null | PythonAPI/test/eval.py | eval.py | py | 2,201 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sys.path.insert",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "pycocotools.coco.COCO",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pycocotools.cocoeva... |
101455265 | from configparser import ConfigParser
from os import path
from _todo.models.ObjTask import ObjTask as Task
# собирает все задачи из файла с задачами и оформляет в массив
class ReadTXT:
TODOfile = "TODO.txt"
conf = None
def __init__(self):
self.conf = ConfigParser()
def getData(self):
... | null | _todo/models/model_readtxt.py | model_readtxt.py | py | 1,476 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "configparser.ConfigParser",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "_todo.models.ObjTask... |
637759878 | # uncompyle6 version 3.7.4
# Python bytecode 2.6 (62161)
# Decompiled from: Python 3.6.9 (default, Apr 18 2020, 01:56:04)
# [GCC 8.4.0]
# Embedded file name: build/bdist.linux-x86_64/egg/compoundfield/field.py
# Compiled at: 2010-03-08 18:36:45
from collections import namedtuple
from django.db import models
from djang... | null | pycfiles/django_compound_field-0.1-py2.6/field.py | field.py | py | 3,527 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.db.models.Field",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "django.utils.datastructures.SortedDict",
"line_number": 21,
"usage_type": "call"
},
{
... |
324098369 | from __future__ import print_function
import atexit
from pyVim import connect
from pyVmomi import vim
from tools import cli
from tools import tasks
def setup_args():
"""Adds additional ARGS to allow the vm name or uuid to
be set.
"""
parser = cli.build_arg_parser()
# using j... | null | VirtualMachinesManagement/destroy_vm.py | destroy_vm.py | py | 3,116 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "tools.cli.build_arg_parser",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "tools.cli",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "tools.cli.prompt_for_password",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "to... |
422398036 | from django.urls import path
from rest_framework_jwt.views import obtain_jwt_token
from user import views
urlpatterns = [
path("login/", obtain_jwt_token),
path("captcha/", views.CaptchaAPIView.as_view()),
path("register/", views.UserAPIView.as_view()),
path("phone/", views.MobileCheckAPIView.as_view(... | null | xml_api/apps/user/urls.py | urls.py | py | 499 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "rest_framework_jwt.views.obtain_jwt_token",
"line_number": 7,
"usage_type": "argument"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_... |
620954723 | import argparse, re, os
from dotenv import load_dotenv
from googleapiclient.discovery import build
import httplib2
from oauth2client import client
from oauth2client import file
from oauth2client import tools
SCOPES = ['https://www.googleapis.com/auth/analytics.readonly']
DISCOVERY_URI = ('https://analyticsreporting.g... | null | ga.py | ga.py | py | 3,419 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "argparse.ArgumentPa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.