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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
18955072035 | #!/usr/bin/env python
import os
import sys
import django
from django.conf import settings
from django.test.utils import get_runner
def main():
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
django.setup()
if sys.argv[0] == 'runtests.py' and len(sys.argv) == 2:
suite = ['' + sys.argv[1]... | thejpanganiban/django-pursed | runtests.py | runtests.py | py | 574 | python | en | code | 37 | github-code | 21 | [
{
"api_name": "os.environ",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "django.setup",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_numbe... |
8498181056 | # coding=utf-8
"""Training Enc-Dec"""
import os
import torch
import json
import numpy as np
from arguments import get_args
from data_utils.T0Datasets import T0Dataset
from data_utils.data_config import (
DATA_GROUP_CONFIG,
DATA_NO_EVAL,
DATA_NO_VALID,
DATA_NO_TRAIN,
DATA_EVAL_GEN,
DATA_RETRI... | OpenMatch/Augmentation-Adapted-Retriever | src/LM/Flan-T5/train_t0.py | train_t0.py | py | 36,843 | python | en | code | 29 | github-code | 21 | [
{
"api_name": "mpu.vocab_parallel_cross_entropy",
"line_number": 91,
"usage_type": "call"
},
{
"api_name": "mpu.clip_grad_norm",
"line_number": 123,
"usage_type": "call"
},
{
"api_name": "tokenization_t5.EncDecTokenizer",
"line_number": 131,
"usage_type": "name"
},
{
... |
35938911413 | import matplotlib.pyplot as plt
import numpy as np
from scipy.optimize import curve_fit
def func(x, a, b, c):
return a - b * np.exp(c * x)
time = np.array([2.888, 4.463, 8.255, 15.503, 17.817, 35.448, 38.72, 47.926])
avg = np.array([79.64, 43.4, 32.33, 17.99, 15.37, 10.1, 9.8, 9.7])
initialGuess = [5, 5, -.01]
gues... | vivek3141/MachineLearning | Python/Test/nonlinear_regression.py | nonlinear_regression.py | py | 850 | python | en | code | 5 | github-code | 21 | [
{
"api_name": "numpy.exp",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "scipy.optimize.curve_fit",
"line_n... |
2982898445 | import cv2
from tkinter import messagebox
import os
class DatasetFaces:
def __init__(self):
self.check_existence_directory()
self.cam = cv2.VideoCapture(0)
self.cam.set(3, 640)
self.cam.set(4, 480)
self.face_detector = cv2.CascadeClassifier('Recognition_files//haarcascade_f... | Josafath/attendance-management | src/Recognition_files/datasetFaces.py | datasetFaces.py | py | 1,889 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "cv2.CascadeClassifier",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "tkinter.messagebox.showinfo",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "tki... |
41093513791 | #!/usr/bin/env python
from Bio import SeqIO
import argparse
import pathlib
def get_arguments():
parser = argparse.ArgumentParser(description='Extract CDS from a genbank to output a fasta',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('input', type=str,
help='Path to input... | sivico26/Bioinfo_errands | Scripts/extract_cds.py | extract_cds.py | py | 2,719 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentDefaultsHelpFormatter",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "Bio.SeqIO.parse",
"line_number": 51,
"usage_type": "call"
},
{
... |
40980283533 | from sec_edgar_downloader import Downloader
import pandas as pd
import os
#from bs4 import BeatifulSoup
#import datetime
def download_cik(filing, CIK):
"""
Downloads files to machine in save_path
filing = 13F-HR for quarterly filings
CIK - CIK number of fund of interest
Data gets saved in dat... | wcarruthers/sec-filings | data_acq/13F_web_scraping.py | 13F_web_scraping.py | py | 934 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "sec_edgar_downloader.Downloader",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "os.path"... |
41590327203 | from pycoingecko import CoinGeckoAPI
cg = CoinGeckoAPI()
cryptocurrencies = cg.get_coins_markets("usd")
n=int(input())
def market_cap_sort():
list = []
i = 0
while i < n:
list.append(cryptocurrencies[i]['name'])
i = i + 1
return list
print(market_cap_sort()) | gabidenaitu23/Python1 | main.py | main.py | py | 292 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pycoingecko.CoinGeckoAPI",
"line_number": 3,
"usage_type": "call"
}
] |
8234496584 | from django.db import models
# Create your models here.
class Category(models.Model):
name = models.CharField(max_length = 500, default = None,
blank = True, null = True)
priority = models.IntegerField(default = 0,)
def __str__(self):
if self.name:
return self.name
else:
... | worlddeleteRin/lenaphoto | main/models.py | models.py | py | 540 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.db.models.Model",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "... |
21257128303 | from flask import Flask
from flask_restx import Api
from models import Images, User
from ext import db
from flask_migrate import Migrate
from flask_jwt_extended import JWTManager
from config import ProdConfig
from images import images_ns
from auth import auth_ns
from flask_cors import CORS
def create_app():
app = F... | chrisshino/shopify-de-internship | backend/main.py | main.py | py | 805 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Flask",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "config.ProdConfig",
"line_number": 15,
"usage_type": "argument"
},
{
"api_name": "flask_cors.CORS",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "ext.db.init_app",
... |
1677669922 | import numpy as np
import math
import torch
import os
import shutil
import cv2
import random
from PIL import Image
from ..dataset.data import ROOT
from matplotlib import pyplot as plt
def save_checkpoint(state, epoch, is_best, checkpoint='checkpoint', filename='checkpoint'):
filepath = os.path.join(checkpoint, fi... | yujun0-0/MMA-Net | libs/utils/utility.py | utility.py | py | 3,945 | python | en | code | 91 | github-code | 21 | [
{
"api_name": "os.path.join",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "torch.save",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number"... |
71594098292 | from lasagne.layers import *
from lasagne.objectives import *
from lasagne.nonlinearities import *
import numpy as np
import theano
import sys
sys.path.append('../common/')
from data import segmentation_iterator
#FCN used softmax w/ xent, but they also tried sigmoid w/ xent and
# did pretty well
def downsample_mask... | eracah/climate-dl | experiments/common/coarse_segmenter.py | coarse_segmenter.py | py | 1,863 | python | en | code | 4 | github-code | 21 | [
{
"api_name": "sys.path.append",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "theano.tensor.tensor4",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "theano.tensor",
... |
42012877787 | #!/usr/bin/python3
from python_terraform import *
import sys
import os
import argparse
import json
import boto3
import ansible_runner
import pandas as pd
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.base import MIMEBase
from email.mime.text import MIMEText
from email import encoders
... | devananda880/deva | python/final.py | final.py | py | 6,121 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "email.mime.multipart.MIMEMultipart",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "email.mime.text.MIMEText",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "smtplib.SMTP",
"line_number": 51,
"usage_type": "call"
},
{
"api_name... |
72472290612 | import os
import unittest
from pathlib import Path
from rec_to_nwb.processing.header.xml_extractor import XMLExtractor
path = Path(__file__).parent.parent
path.resolve()
@unittest.skip("Need rec files")
class TestHeaderGenerations(unittest.TestCase):
def setUp(self):
self.xml_extractor = XMLExtractor(
... | NovelaNeuro/rec_to_nwb | rec_to_nwb/test/e2etests/test_xmlExtraction.py | test_xmlExtraction.py | py | 781 | python | en | code | 8 | github-code | 21 | [
{
"api_name": "pathlib.Path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "unittest.TestCase",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "rec_to_nwb.processing.header.xml_extractor.XMLExtractor",
"line_number": 15,
"usage_type": "call"
},... |
25483147895 | import sqlite3
## 변수 선언 부분 ##
con, cur = None, None
data1, data2, data3, data4 = "", "", "", ""
row = None
## 메인 코드 부분 ##
con = sqlite3.connect("C:/CookAnalysis/naverDB")
cur = con.cursor()
cur.execute("SELECT * FROM userTable")
print("사용자ID 사용자이름 이메일 출생연도")
print("---------------------------------... | hanga185/PyTest | PyTest230817-main/8.22/code8/Code08-02.py | Code08-02.py | py | 746 | python | ko | code | 0 | github-code | 21 | [
{
"api_name": "sqlite3.connect",
"line_number": 9,
"usage_type": "call"
}
] |
14961702295 | #!/usr/bin/env python3
import argparse
parser = argparse.ArgumentParser()
parser.add_argument(
'--input',
required=True,
help='Name of the binary file to read.'
)
parser.add_argument(
'--output',
required=True,
help='Name of the header file to write.'
)
parser.add_argument(
'--variable'... | WhoBrokeTheBuild/Kiwi | Scripts/generate-asset-include.py | generate-asset-include.py | py | 1,082 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 5,
"usage_type": "call"
}
] |
19266964083 | # -*- coding: utf-8 -*-
import scrapy
from bookSpider.items import NovelItem, ChapterItem
class NovelSpider(scrapy.Spider):
name = 'novel'
allowed_domains = ['www.quanshuwang.com']
sort_dict = {
1: '玄幻魔法',
2: '武侠修真',
3: '纯爱耽美',
4: '都市言情',
5: '职场校园',
6: '穿越重生'... | Zhangshuai19871009/bookSpider | bookSpider/spiders/novel.py | novel.py | py | 4,609 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "scrapy.Spider",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "scrapy.Request",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "scrapy.Request",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "scrapy.Request",
... |
23151348202 | import sys
if sys.getdefaultencoding() != 'utf-8':
reload(sys)
sys.setdefaultencoding('utf-8')
from io import open
key_file = '/media/NewSSD/workspace/text_renderer-dev/data/chars/med.txt'
new_key_file = '/media/NewSSD/workspace/text_renderer-dev/data/chars/med2.txt'
corpus_file = '/media/NewSSD/workspace/tex... | liangshuang1993/SheetDetection | scripts/generate_key.py | generate_key.py | py | 916 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "sys.getdefaultencoding",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "sys.setdefaultencoding",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "io.open",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "io.open",
"li... |
27438960638 | # -*- coding: utf-8 -*-
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
from mlxtend.plotting import plot_decision_regions
class Adaline(object):
"""
" Param {float} alpha (Learning rate)
" Param {int} epoch (Iterations)
" p... | raoyasir/ML_Codes | adaline/adaline.py | adaline.py | py | 4,984 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numpy.random.RandomState",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "numpy.dot",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "numpy.where",
... |
4569237174 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import mysql.connector
import time
import datetime
import logging
from mysql.connector import errorcode
from datetime import timedelta
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
from utils import mean,stdev,Global_config
#from plag_summary import cla... | joseph-zxy/wikiglass-send_mail | send_mail-pkps_rebuilding.py | send_mail-pkps_rebuilding.py | py | 23,128 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sys.setdefaultencoding",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "logging.basicConfig",
"line_number": 90,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 90,
"usage_type": "attribute"
},
{
"api_name": "mysql.c... |
71746054453 | '''
This module computes the most important keywords (a keyword can be between
1-3 words) from a file and can rank these keywords in other files contents.
'''
import nltk
def get_top_keywords(tokens):
'''
Takes a list of tokens (keywords) and returns a list of keywords ranked
from the most important (by ... | Dedalum/sme_datascience_chall | chall/analyze.py | analyze.py | py | 1,247 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "nltk.FreqDist",
"line_number": 18,
"usage_type": "call"
}
] |
31130536410 | import sys
from collections import deque
input = sys.stdin.readline
N = int(input())
deque = deque(enumerate(map(int,input().split())))
# enumerate 함수 -> (인덱스,요소) ex) deque = [(0,3), (1,2), (2,1), (3,-3), (4,-1)]
for i in range(N):
p = deque.popleft() # p = (0,3)
print(p[0]+1,end=' ') # p[0] = 0(인덱스), p[1] ... | yjhss/Algorithm-PS | 자료구조/2346_풍선 터뜨리기.py | 2346_풍선 터뜨리기.py | py | 448 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sys.stdin",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "collections.deque",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "collections.deque.popleft",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "collections.... |
73870578613 | from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from rest_framework import viewsets
from rest_framework.views import APIView
from rest_framework.pagination import PageNumberPagination
from rest_framework_simplejwt.authentication import JWTAuthentication
from django.db... | NorthOC/book-dashboard | api/views.py | views.py | py | 6,049 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "rest_framework.views.APIView",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "rest_framework_simplejwt.authentication.JWTAuthentication",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "rest_framework.permissions.IsAuthenticated",
"line_num... |
6872611372 | import asyncio
import datetime
import json
import time
from channels.consumer import AsyncConsumer
from channels.generic.websocket import AsyncWebsocketConsumer
from promotion.models import *
from asgiref.sync import sync_to_async
from datetime import datetime, timedelta
from .consumers import *
from django.db.models.s... | robel59/control_chat | myapp/klp.py | klp.py | py | 4,974 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "json.dumps",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "channels.generic.websocket.AsyncWebsocketConsumer",
"line_number": 93,
"usage_type": "name"
},
{
"api_name": "asgiref.sync.sync_to_async",
"line_number": 102,
"usage_type": "call"
},
... |
23234299826 | import yaml
import random
from random import choice, choices, randint
from math import floor, ceil
from itertools import repeat
from chargen import expand, roll, yaml_importer
alignments = [
"Lawful Good",
"Lawful Evil",
"Lawful Neutral",
"Neutral Good",
"Neutral Evil",
"True Neutral",
"Ch... | refrshrs/CharGen | DungeonsAndDragons3.5E/char_dnd_3.5e.py | char_dnd_3.5e.py | py | 5,818 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "chargen.yaml_importer",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "chargen.roll",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "random.choice",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "random.choice",
... |
73894079093 | # -*- coding: utf-8 -*-
# @Time : 2020/5/11 19:17
# @Author : Wu Tianyu
# 图像基础操作
import numpy as np
from matplotlib import pyplot as plt
import cv2
# 修改像素值
def change_p():
print(img[100, 100])
img[100, 100] = [255, 255, 255]
print(img[100, 100])
print(img.item(10, 10, 2))
img.itemset((10, 10, ... | CynicalHeart/PyLearn | CV_Learn/Core_Learn01.py | Core_Learn01.py | py | 2,122 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "cv2.imshow",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "cv2.waitKey",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "cv2.destroyAllWindows",
"line_n... |
15478946264 | import pyxnat as xnat
import pandas as pd
import argparse
import requests
import urllib3
urllib3.disable_warnings()
def getinterface(url, user, passwd):
"""
Create and test a connection to XNAT and returns the a pyxnat interface
object
:param url: xnat url as a string
:param user: xnat username a... | KCL-BMEIS/xnat_python_scripts | extract_scanners_info.py | extract_scanners_info.py | py | 5,169 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "urllib3.disable_warnings",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pyxnat.Interface",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "requ... |
4238082031 | import streamlit as st
import segyio
import segysak
import pandas as pd
import xarray as xr
import itertools
import numpy as np
import matplotlib.pyplot as plt
import hvplot.xarray
import panel as pn
#from matplotlib import figure
from holoviews import opts
from bokeh.models import HoverTool
from segysak.segy import s... | Doctarik/Devoteam_Africa_Projects-GPR_Segy_Heroku | segy_webapp.py | segy_webapp.py | py | 5,664 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "streamlit.title",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "streamlit.sidebar.file_uploader",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "streamlit.sidebar",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name":... |
2200869543 | # -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.11.2)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x10\xcf\
\xff\
\xd8\xff\xe0\x00\x10\x4a\x46\x49\x46\x00\x01\x01\x01\x00\x60\x00\
... | TransUrban-UAH/Cadastral_Classifier | resources.py | resources.py | py | 174,145 | python | ja | code | 3 | github-code | 21 | [
{
"api_name": "PyQt5.QtCore.qVersion",
"line_number": 2634,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtCore",
"line_number": 2634,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtCore.qRegisterResourceData",
"line_number": 2643,
"usage_type": "call"
},
{
"api_n... |
26755474765 | ######################################################
# Sales Prediction with Linear Regression
######################################################
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.linear_model import LinearRegression
from sklearn.metrics imp... | enesdogansanli/Machine_Learning_All_In | Machine_Learning/Linear_Regression/Linear_Regression.py | Linear_Regression.py | py | 7,439 | python | tr | code | 0 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "sklearn.linear_model.LinearRegression",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "seaborn.regplot",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": ... |
30358985313 | import pygame
import os
pygame.init()
# Definições da tela
WIDTH = 800
HEIGHT = int(WIDTH * 0.8)
screen = pygame.display.set_mode((WIDTH, HEIGHT))
pygame.display.set_caption('Scrolling Platformer')
# Definir frame rate
clock = pygame.time.Clock()
FPS = 60
# Definir váriaveis do game
GRAVITY = 0.75
# Variáveis de a... | the-akira/CC33Z | Cursos/Desenvolvimento de Games 2D/Games/Scrolling Platformer/03_Sprite Animation/main.py | main.py | py | 5,431 | python | pt | code | 57 | github-code | 21 | [
{
"api_name": "pygame.init",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "pygame.display.s... |
45017174691 | import requests
import json
API_URL = "http://127.0.0.1:8001/"
endpoints = {
"applications": "applications/",
"submit": "applications/progress/submitted/",
"goods": "goods/",
"admin": "admin/",
"admin_goods": "admin/goods/",
... | BenAAndrew/django-app | app/app/apiRequest.py | apiRequest.py | py | 2,374 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "json.loads",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "requests.delete",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_num... |
9160911063 | """
Created on Mon July 10 10:45:00 2021
@author: Abhijeet Sahu
This code we formulate the graph based on the voltage profile, power flows as the adjacency matrix and use NSGA-2 with
the proposed graph partition algorithm
"""
import numpy as np
from pymoo.factory import get_algorithm, get_crossover, get_mutation, get_... | Abhijeet1990/GA-DistNWSegmentation | extract_info.py | extract_info.py | py | 5,281 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "win32com.client.client.Dispatch",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "win32com.client.client",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "win32com.client",
"line_number": 25,
"usage_type": "name"
},
{
"api_n... |
20359569363 | import streamlit as st
import time
from bs4 import BeautifulSoup
import requests
import pandas as pd
from time import sleep
import os
import base64
st.title('アイミツ Webスクレイピング')
st.write('・取得する都道府県を選択して下さい。')
prefecture = []
col1, col2, col3, col4, col5, col6, col7= st.columns(7)
with col1:
pre_1 = st.checkbox('北海道'... | hinata333/test | s.py | s.py | py | 8,266 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "streamlit.title",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "streamlit.write",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "streamlit.columns",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "streamlit.checkbox"... |
10368366071 | #!usr/bin/env python
import csv
import json
import requests
import pandas as pd
api_url = "https://www.googleapis.com/youtube/v3/search?channelId=UCJFp8uSYCjXOMnkUyb3CQ3Q&part=snippet&key=AIzaSyBuOmxQ0lvVUr71Crh5e_YI7vOlpSiUd-A"
api_response = requests.get(api_url)
videos = json.loads(api_response.text)
with open("... | Silin-Den/Learning_analitcs | youtube_script.py | youtube_script.py | py | 1,443 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "requests.get",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "csv.writer",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": ... |
1430090471 | import csv
import scipy.optimize as op
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
from decimal import Decimal
import matplotlib.pyplot as plt
import pandas as pd
from pandas.core.frame import DataFrame
import numpy as np
# file name
csv_file = '../files/ex2data2.txt'
# read file
def read_data... | nexusme/machine_learning_coursera | machine_learning_andrew_ng/codes/ml_ex2_regularized_logistic_regression.py | ml_ex2_regularized_logistic_regression.py | py | 3,538 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "csv.reader",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot"... |
7872159050 | from django.shortcuts import render
from .models import *
from django.db.models import Q
# Create your views here.
def player_search_view(request):
if request.method == 'GET':
return render(request, 'Search/player_search.html')
elif request.method == 'POST':
name = request.POST['name']
... | Youngphone/SoccerPlayerDB | Search/views.py | views.py | py | 2,749 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "django.shortcuts.render",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.db.models.Q",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "django.db.models.Q",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "django.... |
35365271775 | import boto3
import botocore
#############################
# USER DEFINED FUNCTIONS HERE
############################
# just pass the instantiated bucket object
def list_bucket_contents(bucket):
try:
for object in bucket.objects.all():
print('OBJECT KEY', object.key)
# print(objec... | gubbas/identity-federation | src/originalWebFeb.py | originalWebFeb.py | py | 2,798 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "botocore.exceptions",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "botocore.exceptions",
"line_number": 41,
"usage_type": "attribute"
},
{
"api_name": "boto3.client",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "boto3.... |
21976652016 | # -*- coding:utf-8 -*-
import logging
from .is_misc import is_number
def sample_rows(nrows, fraction=0.1):
'''
Return a boolean array uniformly sampled to a certain 'fraction'
'fraction' accounts for the number of 'True' elements in an array of size
'nrows * fraction' if 'fraction < 1'. Otherwise, if... | EmptySpace/atable | atable/utils/data.py | data.py | py | 2,799 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.warning",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.asarray",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "is_misc.is_number",
... |
7172820837 | """
Hierarchal configurations and factories for any `jumpscale.core.base.meta.Base` type/class.
It is implemented using:
- `Factory`: the base for all factories, implements an in-memory factory for any type.
- `StoredFactory`: a factory which stores and load configuration according to the current configured store bac... | threefoldtech/js-ng | jumpscale/core/base/factory.py | factory.py | py | 18,129 | python | en | code | 5 | github-code | 21 | [
{
"api_name": "store.filesystem.FileSystemStore",
"line_number": 45,
"usage_type": "name"
},
{
"api_name": "store.redis.RedisStore",
"line_number": 45,
"usage_type": "name"
},
{
"api_name": "store.whooshfts.WhooshStore",
"line_number": 45,
"usage_type": "name"
},
{
... |
73993294134 | # import librosa module
import librosa
# function to load audio files
def load(uploaded_files):
# prepare empty list to store audio
audio_librosa = []
# load the audio data from uploaded files then append it to the list
for uploaded_file in uploaded_files:
audio, _ = librosa.load(uploaded_file,... | tudemaha/speech-emotion-classification | model/load_audio.py | load_audio.py | py | 416 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "librosa.load",
"line_number": 10,
"usage_type": "call"
}
] |
39053143243 | #!/usr/bin/env python
import socket, subprocess, json, os, base64, sys, shutil
class Backdoor:
def __init__(self, ip, port):
self.persistence()
self.connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.connection.connect((ip, port))
def persistence(self):
payload_locatio... | Springerstine/reverse_backdoor | reverse_backdoor.py | reverse_backdoor.py | py | 2,524 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "socket.socket",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "socket.AF_INET",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "socket.SOCK_STREAM",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
... |
20973421987 | from hyponic.optimizers.base_optimizer import BaseOptimizer
import numpy as np
import numexpr as ne
class GA(BaseOptimizer):
"""
Genetic Algorithm(GA)
Example
~~~~~~~
>>> from hyponic.optimizers.genetic_based.GA import GA
>>> import numpy as np
>>>
>>> def sphere(x):
... | slewie/HypONIC | hyponic/optimizers/genetic_based/GA.py | GA.py | py | 5,113 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "hyponic.optimizers.base_optimizer.BaseOptimizer",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "numpy.random.uniform",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 62,
"usage_type": "attribute"
},
{
... |
12584829237 | #-*- coding:utf-8 -*-
from bs4 import BeautifulSoup
from urllib.request import Request, urlopen
from datetime import date, timedelta
import urllib
from selenium import webdriver
import os
def getText(link, driver):
driver.get(link)
result = driver.page_source
soup = BeautifulSoup(result, 'html.parser')
header= s... | ilgwonPark2/SystemAnalysisDesign | tmp/example.py | example.py | py | 2,069 | python | en | code | 6 | github-code | 21 | [
{
"api_name": "bs4.BeautifulSoup",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 51,
"usage_type": "name"
},
{
"api_name": "datetime.date",
"line_number": 74,
"usage_type": "name"
},
{
"api_name": "os.getcwd",
"line_n... |
20001530367 | from sklearn.metrics import classification_report, confusion_matrix
import tensorflow
import keras
import numpy as np
from keras import backend as K
from keras.preprocessing.image import ImageDataGenerator, array_to_img, img_to_array, load_img
from keras.models import load_model
def save_augmented_images(generator, im... | debanik1997/gesture_recognition | eval.py | eval.py | py | 2,617 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "keras.preprocessing.image.load_img",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "keras.preprocessing.image.img_to_array",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "keras.preprocessing.image.ImageDataGenerator",
"line_number": 29,
... |
41308673265 | from nltk.sentiment.vader import SentimentIntensityAnalyzer
from tweets_data import get_tweets
import pandas as pd
import matplotlib.pyplot as plt
class SentimentAnalysis:
def __init__(self,ds_tweets = get_tweets()):
self.sid = SentimentIntensityAnalyzer()
self.dates = pd.to_datetime(ds_tweets['cre... | kaustav202/RealTime-TwitterDataAnalysis | app/sentiment_analysis.py | sentiment_analysis.py | py | 2,224 | python | en | code | 22 | github-code | 21 | [
{
"api_name": "tweets_data.get_tweets",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "nltk.sentiment.vader.SentimentIntensityAnalyzer",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pandas.to_datetime",
"line_number": 9,
"usage_type": "call"
},
{... |
34271716657 | import argparse
import logging
import os
import random
import uuid
from datetime import datetime
from time import sleep
import json
import sys
from hpitclient import Tutor
class LoadTestingTutor(Tutor):
"""
This tutor runs an integration test agains the following plugins:
- problem generator
-... | rcarlson-cli/hpit_services | hpit/tutors/load_testing.py | load_testing.py | py | 11,039 | python | en | code | null | github-code | 21 | [
{
"api_name": "hpitclient.Tutor",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "random.choice",
"line_number": 64,
"usage_type": "call"
},
{
"api_name": "random.choice",
"line_number": 74,
"usage_type": "call"
},
{
"api_name": "random.choice",
"lin... |
2825229388 | import numpy as np
import pandas as pd
from keras.models import Model
from keras.layers import Input, Dense
from keras.layers import *
#from keras.optimizer import *
from keras import optimizers
from keras.optimizers import Adam,Nadam,Adamax
import keras
from sklearn import decomposition
def get_model(n_users,n_i... | ss900405twtw/ML2018SPRING | hw6/draw.py | draw.py | py | 6,808 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "keras.layers.Input",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "keras.layers.Input",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "keras.models.Model",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "keras.models... |
14736901694 | #%%
import numpy as np
import pandas as pd
import bokeh.plotting
import bokeh.io
import bokeh.models
import growth.model
import growth.viz
const = growth.model.load_constants()
colors, palette = growth.viz.bokeh_style()
mapper = growth.viz.load_markercolors()
bokeh.io.output_file('../../figures/interactive/interac... | cremerlab/flux_parity | code/js/interactive_ecoli_data.py | interactive_ecoli_data.py | py | 8,464 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "growth.model.model.load_constants",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "growth.model.model",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "growth.model",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "g... |
43176246293 | ''' Homework 2 programming portion '''
# %% imports
import pandas as pd
import numpy as np
import math as mth
# from dfply import *
# from itertools import starmap
import scipy as scipy
import time as time
from scipy.sparse import csr_matrix
import scipy.sparse as sps
import itertools as iter
# python3 has zip already
... | LushS-io/Item-to-Item-Collaborative-Filtering | item-item_11429784.py | item-item_11429784.py | py | 5,648 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numpy.array",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": ... |
11671081877 | # -*- coding: utf-8 -*-
import urllib.request as rq
import json
# Load all stops from public API by Chaps.
# There is a maximum of 100 stops that can be loaded by 1 request.
# Public API documentation can be found here https://crws.docs.apiary.io/
skip_count = 0
max_count = 100
all_stops = [];
while True:
resp... | uberales/idos-time | stops.py | stops.py | py | 956 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "urllib.request.urlopen",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "urllib.request",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "json.loads",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "json.dump",
"lin... |
41491988782 | # -*- coding: utf-8 -*-
import json
import config
from datetime import datetime
def get_workout_data_json():
return json.load(open(config.JSON_PATH, 'r'))
def get_sum_for_key(key):
my_sum = 0
json_data = get_workout_data_json()
for day_key in json_data.keys():
day_data = json_data[day_key]
... | dancoderpack/WorkoutBot | workout_data.py | workout_data.py | py | 1,617 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "json.load",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "config.JSON_PATH",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime.now",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "datetime.datetime... |
13200384625 | """Misc helpers."""
import asyncio
import inspect
from typing import Optional, Union
def execute_callback(cb, arg):
if inspect.iscoroutinefunction(cb):
cb = cb(arg)
else:
loop = asyncio.get_running_loop()
cb = loop.run_in_executor(None, cb, arg)
asyncio.ensure_future(cb)
class Di... | Hellowlol/tesla_api | tesla_api/misc.py | misc.py | py | 2,832 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "inspect.iscoroutinefunction",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "asyncio.get_running_loop",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "asyncio.ensure_future",
"line_number": 13,
"usage_type": "call"
},
{
"api_nam... |
13122334097 | # -*- coding: utf-8 -*-
"""
This python file can be used to perform empirical analysis.
Please goto the last time and uncomment the function based on the (empirical) analysis that has to performed.
"""
import pathlib
import random
import statistics
import sys
import time
from itertools import accumulate
from operat... | Idsl-group/MINTS | Miscellaneous/timed_trie_empirical_analysis.py | timed_trie_empirical_analysis.py | py | 15,325 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "random.randint",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "itertools.accumulate",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "operator.add",
"line_number": 33,
"usage_type": "argument"
},
{
"api_name": "rstr.xeger",
... |
17704071301 | """
"""
__author__ = "Xun Li <xunli@asu.edu>"
__all__ = ['CreateGridDlg','TransparentDlg', 'GradientDlg',
'choose_field_name', 'choose_box_hinge_value', 'select_k',
'choose_sample_percent', 'choose_user_defined_bins',
'choose_local_g_settings']
import os
import pysal
import wx
from... | GeoDaCenter/CAST | stars/visualization/dialogs/MapDialogs.py | MapDialogs.py | py | 13,335 | python | en | code | 21 | github-code | 21 | [
{
"api_name": "wx.xrc.XRCCTRL",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "wx.xrc",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "wx.xrc.XRCCTRL",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "wx.xrc",
"line_number": 22,
... |
24308050897 | import cv2
faceCascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
# Загружаем каскады для глаз.
eyeCascade = cv2.CascadeClassifier('haarcascade_eye.xml')
img = cv2.imread('C:/Users/rusta/Desktop/photo/7.jpg')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
faces = faceCascade.detectMultiScale(
... | rustamwho/EyeDetectionOnVideo | OpenCV/DetectWithOpenCV.py | DetectWithOpenCV.py | py | 1,524 | python | ru | code | 0 | github-code | 21 | [
{
"api_name": "cv2.CascadeClassifier",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "cv2.CascadeClassifier",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
... |
36215524196 | """Convenient generic type definitions (used in multiple places)."""
import pathlib
from typing import cast, NewType, Sequence, Union, Dict, List
import numpy as np # pytype: disable=import-error
import pandas as pd # pytype: disable=import-error
Pathlike = Union[pathlib.Path, str] # Represents input paths
# Repr... | BoevaLab/CanSig | src/cansig/types.py | types.py | py | 1,606 | python | en | code | 11 | github-code | 21 | [
{
"api_name": "typing.Union",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "typing.NewType",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"l... |
32725187321 | import httplib2
import apiclient.discovery
from oauth2client.service_account import ServiceAccountCredentials
CREDENTIALS_FILE = 'My Project -6839db28dd6e.json' # имя файла с закрытым ключом
credentials = ServiceAccountCredentials.from_json_keyfile_name(CREDENTIALS_FILE, ['https://www.googleapis.com/auth/spreadsheets... | anastasts/Calculator | test_sheets.py | test_sheets.py | py | 1,939 | python | ru | code | 0 | github-code | 21 | [
{
"api_name": "oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_name",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "oauth2client.service_account.ServiceAccountCredentials",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "httplib2.Http"... |
36879798092 | #!/usr/bin/env python
# coding: utf-8
import sys, json
def read_in():
lines = sys.stdin.readlines()
# Since our input would only be having one line, parse our JSON data from that
return json.loads(lines[0])
def main():
#get our data as an array from read_in()
lines = read_in()
hs = open('/et... | florianporada/thing_for_the_internet | thing/py/wifi_config.py | wifi_config.py | py | 595 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sys.stdin.readlines",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "sys.stdin",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "json.loads",
"line_number": 9,
"usage_type": "call"
}
] |
22519902985 | from sqlalchemy import create_engine, MetaData, insert, update, and_
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import sessionmaker
import os
from dotenv import load_dotenv
from pathlib import Path
import json
# project_folder = os.path.expanduser('~/code/api_v3_docker/code/api')
# ... | SkinnyPigeon/serums_api_v3_docker | code/api/functions/handle_rules.py | handle_rules.py | py | 4,456 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "os.path.expanduser",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "dotenv.load_dotenv",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path.join",
... |
18615749962 | #!/usr/bin/python3
import tkinter
from tkinter import ttk
from datetime import *
import calendar
root = tkinter.Tk()
root.geometry('300x240')
root.title('Progress')
root.attributes('-type', 'dialog')
root.grid()
bar_size = 280
label_font_size=10
default_font = "TkDefaultFont"
def number_of_days_in_month(year, m... | maxgdn/progress | main.py | main.py | py | 2,246 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "tkinter.Tk",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "calendar.monthrange",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "datetime.now",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "calendar.isleap",
"li... |
38796294054 | import copy
import os
import torch
import numpy as np
from tqdm.autonotebook import tqdm
from torch.optim.lr_scheduler import _LRScheduler
import matplotlib.pyplot as plt
from torch.utils.data import DataLoader
from packaging import version
PYTORCH_VERSION = version.parse(torch.__version__)
try:
from apex import... | lmaheshds/EVA6-Assignment9-RHRF | Allfiles/learningratefinder.py | learningratefinder.py | py | 16,711 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "packaging.version.parse",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "packaging.version",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "torch.__version__",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "torc... |
72534760694 | from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
def test_eight_components():
options = Options()
options.binary_location = "/opt/google/chrome-linux64/chrome" # "/usr/bin/chrome"
options.add_experimental_option("detach", Tru... | VennittiAndrea/TV_indicator_scraping | scripts/test.py | test.py | py | 490 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "selenium.webdriver.chrome.options.Options",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 10,
"usage_type": "name"
}
] |
31717887235 | """
Clase controlador, obtiene el input, lo procesa, y manda los mensajes
a los modelos.
"""
from modelos import Snake
import glfw
import sys
from typing import Union
class Controller(object):
model: Union['Snake', None] # Con esto queremos decir que el tipo de modelo es 'Snake' (nuestra clase) ó None
def ... | Gonxolo/tarea1Snake | controller.py | controller.py | py | 1,272 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "typing.Union",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "glfw.PRESS",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "glfw.RELEASE",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "glfw.KEY_ESCAPE",
... |
6160221448 | from resources.models import Resourceset, Idea
from django.contrib import admin
class IdeaInline(admin.TabularInline):
model = Idea
extra = 2
class ResourcesetAdmin(admin.ModelAdmin):
fieldsets = [
(None, {'fields': ['title', 'subtitle', 'short_name', 'narrative']}),
('Co... | DigitalGizmo/mse21 | mse/resources/admin.py | admin.py | py | 1,211 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.contrib.admin.TabularInline",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "resources.models.Idea",
"line_number": 6,
"usage_type": "name"
},
{
"a... |
6484659653 | # 1.18 将名称映射到序列的元素中
# 1.18.1 问题
# 我们的代码是通过位置(即索引,或下标) 来访问列表或元组的,但有时候这会使得代码难以阅读。
# 我们希望可以通过名称来访问元素,以此减少结构中对位置的依赖性
# 1.18.2 解决方案
# 相比普通的元组,collections.namedtuple()(命名元组) 只增加了极少的开销就提供了这些便利。实际上collections.namedtuple()
# 是一个工厂方法,它返回的是Python中标准元组类型的子类。我们提供给它一个类型名称以及相应的字典,它就返回
# 一个可实例化的类,为你已经定义好的字典转入值等 如
from collec... | mojoru2023/Recoding_Python | Python_Cook(练习)/1.数据结构和算法/file.18.py | file.18.py | py | 4,264 | python | zh | code | 0 | github-code | 21 | [
{
"api_name": "collections.namedtuple",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "collections.namedtuple",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "collections.namedtuple",
"line_number": 79,
"usage_type": "call"
}
] |
403285193 | from typing import List
import cv2
from cv2 import VideoCapture
from livia.input.DeviceFrameInput import Device
from livia_ui.gui.views.utils.DeviceProvider import DeviceProvider
class DefaultDeviceProvider(DeviceProvider):
def list(self) -> List[Device]:
capture = VideoCapture()
capture.setExc... | sing-group/livia-ui | livia_ui/gui/views/utils/DefaultDeviceProvider.py | DefaultDeviceProvider.py | py | 678 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "livia_ui.gui.views.utils.DeviceProvider.DeviceProvider",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "cv2.CAP_VFW",
"line_number": 20,
"usage_type": "attribute"
},
... |
35883449161 | """
This example shows how to filter and modify tags and write the results back.
It changes all tag values 'yes/no' to '1/0'.
"""
import osmium as o
import sys
class BoolNormalizer(o.SimpleHandler):
def __init__(self, writer):
super(BoolNormalizer, self).__init__()
self.writer = writer
def n... | osmcode/pyosmium | examples/normalize_boolean.py | normalize_boolean.py | py | 1,985 | python | en | code | 274 | github-code | 21 | [
{
"api_name": "osmium.SimpleHandler",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "osmium.tags",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "osmium.tags",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "osmium.rep... |
30603890898 | import boto3
import re
if __name__ == "__main__":
bucket='bucket1io'
photo='scan2.png'
pattern='ZEA[0-9]+'
client=boto3.client('rekognition')
response=client.detect_text(Image={'S3Object':{'Bucket':bucket,'Name':photo}})
textDetections=response['TextDetections']
... | RevanthR/SHC | reckognition.py | reckognition.py | py | 715 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "boto3.client",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_number": 23,
"usage_type": "call"
}
] |
71246470453 | import calendar
import datetime
from datetime import date
from typing import NamedTuple, Optional, List, TypedDict, Union
import requests
from telebot import TeleBot
from telebot.types import Message
URL = "https://maksimburtsev.pythonanywhere.com/"
class NoteDict(TypedDict):
pk: int
name: str
descrip... | Maksim-Burtsev/tgbot_api | telegram_bot/services.py | services.py | py | 6,286 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "typing.TypedDict",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "datetime.date",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
... |
28438400725 | import json
import os
import urllib.parse
import urllib.request
import zipfile
basicFilePlace = "F:\\" + "code_data1\\"
# 本代码要在F盘创建code_data1才能运行
def file_name(file_dir):
L = []
for root, dirs, files in os.walk(file_dir):
for file in files:
L.append(os.path.join(root, file))
return... | huangmengbin/UserCase-Oriented-Detection | Resources/downloadFiles.py | downloadFiles.py | py | 4,113 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.walk",
"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": "zipfile.is_zipfile",
"line_numb... |
19290208199 | from Investment_Prediction.entity import config_entity
from Investment_Prediction.entity import artifact_entity
from Investment_Prediction.exception import InvestmentPredictionException
from Investment_Prediction.logger import logging
from sklearn.pipeline import Pipeline
import os,sys
import pandas as pd
import numpy ... | Mohitchatterjee/Investment_Prediction | Investment_Prediction/components/DataTransformation.py | DataTransformation.py | py | 6,063 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "Investment_Prediction.entity.config_entity.DataTransformationConfig",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "Investment_Prediction.entity.config_entity",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "Investment_Prediction.entity.... |
3894410321 | from django.shortcuts import render
from posts.models import Category, Post
def index(request):
last_ten = Post.objects.filter(is_published=True,deleted_at=None,status='published')[:5]
posts = reversed(last_ten)
return render(request,'post/home.html',{
'posts' : posts,
'categories' : Cat... | SeymaAkdogan/Django-Blog-App | posts/views.py | views.py | py | 1,198 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "posts.models.Post.objects.filter",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "posts.models.Post.objects",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "posts.models.Post",
"line_number": 7,
"usage_type": "name"
},
{
"ap... |
30550066860 | from django.contrib import admin
from .models import Customuser
from django.contrib.auth.admin import UserAdmin
# Register your models here.
class CustomUserAdmin(UserAdmin):
model = Customuser()
fieldsets = UserAdmin.fieldsets + (
('Extra Fields',
{'fields':
(
... | senseicudjoe/Nanny_Connect | authApp/admin.py | admin.py | py | 511 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.contrib.auth.admin.UserAdmin",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "models.Customuser",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.admin.UserAdmin.fieldsets",
"line_number": 11,
"usage_type": "at... |
13130191585 | import numpy as np
import matplotlib.pyplot as plt
from sklearn.linear_model import LinearRegression
import numpy.linalg as la
import scipy.stats as stats
import math
import scipy.io
#runCPCAstep1
#RunCPCA 1st cell
#### may need to turns NaN into nan, which could be identified by matlab
def runCpcaStep1(Z, G, H): ... | CNoS-Lab/CPCA_Python | splitHalfCrossValidCpca.py | splitHalfCrossValidCpca.py | py | 5,986 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "numpy.size",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "sklearn.linear_model.LinearRegression",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.transpose",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "nump... |
16057358304 | from django.contrib.auth.tokens import default_token_generator
from rest_framework import status
from rest_framework.decorators import action, api_view, permission_classes
from rest_framework.generics import get_object_or_404
from rest_framework.permissions import AllowAny, IsAuthenticated
from rest_framework.response ... | Lookin44/api_portfolio_company | users/views.py | views.py | py | 2,809 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "serializers.UsernameSerializer",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "users.models.User.objects.filter",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "users.models.User.objects",
"line_number": 23,
"usage_type": "attribute"
... |
14602832170 | import tensorflow as tf
from tensorflow.python.keras import Model
from typing import Dict
from custom_tf_models.basic.AE import AE
from misc_utils.math_utils import reduce_mean_from
# AEP : Autoencoder-Predictor
class AEP(AE):
def __init__(self,
encoder: Model,
decoder: Model,
... | Zelgunn/custom_tf_models | basic/AEP.py | AEP.py | py | 4,071 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "custom_tf_models.basic.AE.AE",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "tensorflow.python.keras.Model",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "tensorflow.python.keras.Model",
"line_number": 13,
"usage_type": "name"
},
... |
38708672680 | from rest_framework.permissions import IsAdminUser, IsAuthenticated
from rest_framework.views import APIView
from h_utils.errors import ErrBaseNotData, ErrBaseParams, ErrBaseIllegalPermission
from h_utils.response_extra import success_request, error_request
from h_utils.success import array_success, dict_success
from ... | midas66/django_project | msg/views.py | views.py | py | 1,707 | python | en | code | null | github-code | 21 | [
{
"api_name": "rest_framework.views.APIView",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "rest_framework.permissions.IsAuthenticated",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "rest_framework.permissions.IsAdminUser",
"line_number": 13,
"usag... |
74249434931 | from elasticsearch import Elasticsearch
from datetime import datetime
es = Elasticsearch()
def get_by_msg_id(msg_id):
res = es.search(index="test_for_logreader_2", body={"query": {"match": {"MsgId":msg_id}}})
print("Got %d Hits:" % res['hits']['total']['value'])
for hit in res['hits']['hits']:
pri... | AVTarasov2000/ELKLogReader | app/put_in_elastic.py | put_in_elastic.py | py | 1,245 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "elasticsearch.Elasticsearch",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 14,
"usage_type": "name"
}
] |
26110821560 | # by jam007 some changes by BR-RVD
from os.path import isfile
if not isfile('ufo-model-export.xml'):
input('UFO File not Found. Enter to exit')
exit()
import lxml.etree as etree
file = open('object-line.stg','w')
tree = etree.parse('ufo-model-export.xml')
root = tree.getroot()
l=[]
for amodel in root.iter('mod... | RenanMsV/FGFSTools | UfoExport2Stg.py | UfoExport2Stg.py | py | 621 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "os.path.isfile",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "lxml.etree.parse",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "lxml.etree",
"line_number": 12,
"usage_type": "name"
}
] |
4034814876 | import datetime
import os
import traceback
import discord
from discord import app_commands
from dotenv import load_dotenv
from modules import checker
from modules.client import CustomClient
from settings import DEFEND_SCROLL_ID, bcolors
dotenv_path = os.path.join(os.path.dirname(__file__), '.env')
if os.path.exists(... | Neznak0mec/Just-RPG | main.py | main.py | py | 5,696 | python | ru | code | 0 | github-code | 21 | [
{
"api_name": "os.path.join",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_... |
38528122571 | from collections import defaultdict
import numpy as np
class CMulticastUpdater:
def __init__(self):
self._updaters = []
self._index = 0
return
def update(self, values):
for updater, From, Size in self._updaters:
updater.update(values[From:From+Size])
return
def addUpdater(self, up... | GreenWizard2015/Hungry-Geese | ExperienceBuffers/CMulticastUpdater.py | CMulticastUpdater.py | py | 1,144 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "collections.defaultdict",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 39,
"usage_type": "call"
}
] |
12496505686 | # +---------------+
# | LIBRARY |
# +---------------+
import discord
import logging
import os
from dotenv import load_dotenv
from discord.ext import commands
# +---------------+
# | LOGGING |
# +---------------+
logger = logging.getLogger('discord')
logger.setLevel(logging.DEBUG)
handler = logging.File... | FlorianGianni/MaintenanceBot | main.py | main.py | py | 1,214 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "logging.FileHandler",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "logging.Form... |
31786463491 | #!/usr/bin/python3 -u
# -*- coding: utf-8 -*-
import json
import argparse
import csv
import string
import os
import sys
import random
import re
import collections
#from bs4 import UnicodeDammit
from sentence_splitter import SentenceSplitter, split_text_into_sentences
def main(args):
## command line arguments
... | orai-nlp/covid-19-IR | src/filter_dataset_with_kwords.py | filter_dataset_with_kwords.py | py | 11,481 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sentence_splitter.SentenceSplitter",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "collections.OrderedDict",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "re.match",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "r... |
73982625333 | import requests
def find_bitcoin():
# Faz uma chamada HTTP à API da CoinMarketCap para obter a cotação atual do bitcoin
response = requests.get('https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest', headers={'X-CMC_PRO_API_KEY': '57c5e4f0-33f9-4a48-976b-c3f610ea5ffe'})
# Verifica se a cha... | AlexandreFCosta/Web-Automation | Bitcoin.py | Bitcoin.py | py | 1,017 | python | pt | code | 0 | github-code | 21 | [
{
"api_name": "requests.get",
"line_number": 6,
"usage_type": "call"
}
] |
11566820084 | import cv2
# Load the JPEG image
image_jpeg = cv2.imread('image.jpg')
# Load the PNG image with alpha channel (RGBA)
image_png = cv2.imread('image.png', cv2.IMREAD_UNCHANGED)
# Extract the alpha channel from the PNG image
alpha_channel = image_png[:, :, 3]
# Resize the PNG image to match the dimensions of the JPEG ... | ianrcsd/camera_flask | photos/import cv2.py | import cv2.py | py | 966 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "cv2.imread",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "cv2.IMREAD_UNCHANGED",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "cv2.resize",
"line_n... |
20392610724 | import torch.nn as nn
import torch
import torch.distributions as distributions
### Our main convolutional network
class conv_network(torch.nn.Module):
def __init__(self):
# Various initializations
super(conv_network, self).__init__()
device = torch.device('cuda' if torch.cuda... | PotSergione/MLDL23-FL-project | models/cnn.py | cnn.py | py | 1,871 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "torch.nn",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "torch.device",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"l... |
18834662168 | import os
import webbrowser
from qtpy.QtWidgets import QAction, QLabel, QPushButton, QMainWindow, QMessageBox, \
QTextEdit, QWidget, QStatusBar
import requests
import qtmodern
from settings import Settings
from mode import Mode
import IO
import about
class main_ui(object):
"""The m... | CaptainDario/PySide2-template | src/main_ui.py | main_ui.py | py | 4,808 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "qtpy.QtWidgets.QMainWindow",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "settings.Settings",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "qtpy.QtWidgets.QAction",
"line_number": 47,
"usage_type": "argument"
},
{
"api_name"... |
19071637718 | # https://leetcode.com/problems/concatenation-of-array/
# NeetCode solution
from typing import List
class Solution:
def getConcatenation(self, nums: List[int]) -> List[int]:
# iterate through every value in the input array
# take each of those values, and append it to the original array
ans... | BoydBLever/Algorithms | NeetCode/1929.ConcatenationofArray.py | 1929.ConcatenationofArray.py | py | 561 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "typing.List",
"line_number": 6,
"usage_type": "name"
}
] |
19271897452 | """updated table to change name to tablemodel
Revision ID: 21e901f6327f
Revises: 93b588025df5
Create Date: 2019-04-29 14:21:40.197111
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '21e901f6327f'
down_revision = '93b588025df5'
branch_labels = None
depends_on =... | FrankApiyo/waitercaller | migrations/versions/21e901f6327f_updated_table_to_change_name_to_.py | 21e901f6327f_updated_table_to_change_name_to_.py | py | 1,370 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "alembic.op.create_table",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integ... |
39691082119 | import voice as voice
import wikipedia
import webbrowser
def search(search_text):
value = wikipedia_search(search_text)
print(value)
if value == 0:
search_fail()
if value == 1:
print("value == 1")
voice.system_say("You are welcome. Feel free to ask me for anything else.")
def wikipedia_search(search_text):
... | jllopes/Alfred | search.py | search.py | py | 1,261 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "voice.system_say",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "wikipedia.search",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "wikipedia.page",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "voice.audio_recognit... |
25473552493 | from app import app
from flask import request, jsonify, g
from db import db
from auth import auth
protected_endpoints = [
"/leaderboard/entry",
"/me"
]
@app.before_request
def before_request():
if request.path in protected_endpoints:
token = request.headers.get("Authorization")
if token is... | idrizp/jacobshack-repo | backend/middleware/auth_middleware.py | auth_middleware.py | py | 537 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "flask.request.path",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "flask.request.headers.get",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "flask... |
73034829173 | """
===========================
Reading an inverse operator
===========================
The inverse operator's source space is shown in 3D.
"""
# Author: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
#
# License: BSD (3-clause)
from mne.datasets import sample
from mne.minimum_norm import read_inverse_o... | LiuFang816/SALSTM_py_data | python/mne-tools_mne-python/mne-python-master/examples/inverse/plot_read_inverse.py | plot_read_inverse.py | py | 1,384 | python | en | code | 9 | github-code | 21 | [
{
"api_name": "mne.datasets.sample.data_path",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "mne.datasets.sample",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "mne.minimum_norm.read_inverse_operator",
"line_number": 21,
"usage_type": "call"
},
... |
21745777562 | #!/usr/bin/env python
from setuptools import setup, find_packages
version = '1.0.0'
with open("./README.md", encoding="utf-8") as f:
readme = f.read()
setup(
name="PyPgORM",
version=version,
url='https://github.com/oldjun/PyPgORM',
author='JP Chen',
author_email='oldjun@sina.com',
descrip... | oldjun/PyPgORM | setup.py | setup.py | py | 762 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "setuptools.setup",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",
"line_number": 23,
"usage_type": "call"
}
] |
11876899066 | __author = 'Robin'
from selenium import webdriver
import unittest
import time
import traceback
from selenium.common.exceptions import WebDriverException
class TestDemo(unittest.TestCase):
def setUp(self):
self.driver = webdriver.Chrome()
def test_executeScript(self):
url = 'http://www.baidu.... | johnsonliu33/SeleniumAuto | 三、WebDriver高级应用/1、使用 JavaScript 操作页面元素.py | 1、使用 JavaScript 操作页面元素.py | py | 1,140 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "unittest.TestCase",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "t... |
25993869 | #!/bin/env python3
# -*- coding: utf-8 -*-
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program... | RomainP5/BioInfo | debruijn-tp/debruijn/debruijn.py | debruijn.py | py | 9,179 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "random.seed",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.path.isfile",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 40,
"usage_type": "attribute"
},
{
"api_name": "os.path.isdir",
"line_num... |
2588517452 | import time
startTime = time.time()
import os
import json
import subprocess
from katago.parse_katago_largest_point_mistakes_NOT_SHOWING_PV import find_mistakes_and_correct_moves
# Set the path to the jsonDictionaryOutput folder
json_folder_path = 'katago/json_Dict_ALL_TURNS'
# Set the command to run KataGo
katago_co... | ScriabinOp8No12/Go-puzzles-website | katago/unusedCode/one_line_json_to_katago_largest_mistakes.py | one_line_json_to_katago_largest_mistakes.py | py | 4,879 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "time.time",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 23,
... |
19675892333 | """
Author: Andreas Rössler
"""
import os
import argparse
import torch
import torch.nn as nn
import torch.nn.functional as F
from network.xception import xception
from network.hrnet import get_cls_net
import math
import torchvision
def return_pytorch04_xception(pretrained=False):
# Raises warning "src not br... | H-Kcloud/m_task | model/models.py | models.py | py | 7,742 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "network.xception.xception",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "torch.load",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "network.hrnet.get_cls_net",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "torch.... |
4409749592 | import uuid
from datetime import datetime
from django.test import TestCase
from moto import mock_dynamodb
from ..models import KeywordModel, VideoModel
class VideoModelTests(TestCase):
@mock_dynamodb
def test_create_and_get(self):
VideoModel.create_table(wait=True)
video1 = VideoModel(
... | aditbisa/bezen | video/tests/test_models.py | test_models.py | py | 2,588 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.test.TestCase",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "models.VideoModel.create_table",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "models.VideoModel",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": ... |
10751537565 | import json
element = input('Enter element name: ')
element = element.capitalize()
print(f'What do you want to know about {element}?')
print('''
1. Atomic Number
2. Symbol
3. Atomic Mass
4. Electron Configuration
5. Group Number
6. Density
7. Melting Point
8. Boiling Point
9. Discoverer
10. The Nomenclature
11. Appea... | amrito258/Periodic-Table | main.py | main.py | py | 1,718 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "json.loads",
"line_number": 22,
"usage_type": "call"
}
] |
13132515833 | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.opening_page, name='greeting'),
url(r'^loginform', views.login_form, name='login_name'),
url(r'^registration', views.registration, name='register_form'),
url(r'^register', views.register, name='register'),
url(... | dankeller101/GleeWebsite | alumni/urls.py | urls.py | py | 1,310 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.conf.urls.url",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.