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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
32231566990 | '''
The "look and say" sequence is defined as follows: beginning with the term 1,
each subsequent term visually describes the digits appearing in the previous term.
The first few terms are as follows:
1
11
21
1211
111221
As an example, the fourth term is 1211, since the third term consists of one 2 and one 1.
Given a... | herman-ai/allinone | look_and_say/solution.py | solution.py | py | 1,158 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 19,
"usage_type": "call"
}
] |
3962945937 | import urllib2
import re
import requests
import HTMLParser
from bs4 import BeautifulSoup
from core import base
from core.db import Base, session_scope
from core.auth import Auth
from core.utils import Whitelist, split_address
from sqlalchemy import Column, Integer, String
class TitleRegex(Base):
__tablename__ = 't... | DempDemp/nautilus | modules/titles.py | titles.py | py | 4,873 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "core.db.Base",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integer",
"line_number": 15,
"usage_type": "argument"
},
{
"api_name": "sqlalchemy.Colu... |
17338303983 | # neuralnet.py
# ---------------
# Licensing Information: You are free to use or extend this projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to the University of Illinois at Urbana-Champaign
#
# Crea... | SamAhnert/AIProjects-CS440 | MP3/neuralnet_part1.py | neuralnet_part1.py | py | 4,838 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "torch.nn.Module",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "torch.nn.Sequential",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"lin... |
71969090599 | import os
from typing import List, Optional
import dataclasses
from official.core import config_definitions as cfg
from official.core import exp_factory
from official.modeling import hyperparams
from official.modeling import optimization
from official.vision.beta.configs import backbones
from official.vision.beta.confi... | nicknochnack/RealTimeSignLanguageDetectionwithTFJS | Tensorflow/models/official/vision/beta/configs/retinanet.py | retinanet.py | py | 9,736 | python | en | code | 91 | github-code | 18 | [
{
"api_name": "official.modeling.hyperparams.Config",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "official.modeling.hyperparams",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "dataclasses.dataclass",
"line_number": 14,
"usage_type": "attribu... |
42054882093 | import numpy as np
import pandas as pd
import time
import warnings
import numpy as np
import re
import pandas as pd
from itertools import chain
from collections import defaultdict
from recourse.defaults import *
from recourse.defaults import _SOLVER_TYPE_CBC, _SOLVER_TYPE_CPX
from recourse.helper_functions import pars... | visual-ds/cfmining | cfmining/mip_builder.py | mip_builder.py | py | 44,569 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "recourse.helper_functions.parse_classifier_args",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "cfmining.action_set.ActionSet",
"line_number": 69,
"usage_type": "argument"
},
{
"api_name": "numpy.array",
"line_number": 183,
"usage_type": "call"
... |
3625122454 | import os
import numpy as np
from collections import defaultdict
from PIL import Image
import cv2
import pickle
import torch
from simulators import get_simulator
from .transforms import (
augment_color,
get_mask,
letterbox,
gettransform_numpygrayscale,
gettransforms_post
)
"""
Dataset that
--> ... | thomasreolon/svs_detection | datasets/mot_dataset_svs.py | mot_dataset_svs.py | py | 9,385 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "torch.utils",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "transforms.gettransforms_post",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "simulators.get_simulator",
"line_number": 57,
"usage_type": "call"
},
{
"api_name"... |
21158714518 | import torch
import torch.nn as nn
from logging import getLogger
from libcity.model import loss
from libcity.model.abstract_traffic_state_model import AbstractTrafficStateModel
class AutoEncoder(AbstractTrafficStateModel):
def __init__(self, config, data_feature):
super().__init__(config, data_feature)
... | LibCity/Bigscity-LibCity | libcity/model/traffic_speed_prediction/AutoEncoder.py | AutoEncoder.py | py | 2,085 | python | en | code | 644 | github-code | 18 | [
{
"api_name": "libcity.model.abstract_traffic_state_model.AbstractTrafficStateModel",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "torch.device",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 19,
"usage_type": "ca... |
33482672371 | import time
import schedule
from func import *
def send_message(context):
connect = sqlite3.connect('users.sqlite')
cur = connect.cursor()
current_dt = datetime.now().strftime("%d.%m.%Y %H:%M")
c_date, c_time = current_dt.split()
date = cur.execute(select_MAINDATA.format(adct[0])).fetc... | Ravshan8201/MARKETING | script.py | script.py | py | 1,353 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "schedule.every",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "schedule.every",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "schedule.run_pending",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"... |
37291561736 | import matplotlib.pyplot as plt
dias=[1,2,3,4,5,5,7]
dormir= [8,7,9,7,6,9,8]
comer= [2,1,1,1,2,3,2]
trabajar=[8,9,9,9,6,1,1]
jugar= [1,0,1,0,1,1,1]
'''for x in range(7):
jugar.append(24 - (dormir[x] + comer[x] + trabajar[x]))'''
#como es un ploligono no se pueden poner legend
#para ello creamos plots vacios
p... | pedraki/curso_edx | edx/graficos/stplot01.py | stplot01.py | py | 630 | python | es | code | 0 | github-code | 18 | [
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "matpl... |
15536100650 | #!/usr/bin/env python3
import argparse
import asyncio
import datetime
import logging
import paramiko
import socket
import sys
import time
import yaml
from apscheduler.schedulers.asyncio import AsyncIOScheduler
from influxdb import InfluxDBClient
default_config_file = "/config/config.yaml"
# Set up logger
logger = lo... | wonkyto/ubnt-switch-collector | app/ubnt-switch-collector.py | ubnt-switch-collector.py | py | 6,623 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "logging.getLogger",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "logging.StreamHandler",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "logging.DEB... |
9052404586 | #!/usr/bin/env python
__author__ = 'micha'
# ============================================
# IMPORTS
# ============================================
from Tkinter import *
from collections import OrderedDict
ew = 10
# ============================================
# CLASS DEFINITION
# ==================================... | michareichmann/flux_caculator | RateCalculator.py | RateCalculator.py | py | 5,213 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "collections.OrderedDict",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "collections.OrderedDict",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "collections.OrderedDict",
"line_number": 77,
"usage_type": "call"
},
{
"api_name"... |
534282866 | from xii import *
import numpy as np
np.set_printoptions(precision=2)
np.set_printoptions(suppress=True)
import matplotlib.pyplot as plt
from fenics import *
set_log_level(LogLevel.ERROR)
import fems as solvers
from quadrature_utils import refine_mesh
def run_conv_test(u_a, f, phi):
'''
Script for runnin... | IngeborgGjerde/GFEM | src/gfem_example_1d.py | gfem_example_1d.py | py | 4,946 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "numpy.set_printoptions",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "numpy.set_printoptions",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "quadrature_utils.refine_mesh",
"line_number": 36,
"usage_type": "call"
},
{
"api_name... |
25575559939 | import sys
sys.setrecursionlimit(1 << 25)
readline = sys.stdin.buffer.readline
read = sys.stdin.readline # 文字列読み込む時はこっち
ra = range
enu = enumerate
def exit(*argv, **kwarg):
print(*argv, **kwarg)
sys.exit()
def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))
# 受け渡されたすべての要素からsubだけ引く.リストを*をつけて展開... | masakiaota/kyoupuro | contests/abc176/d/d2.py | d2.py | py | 5,523 | python | ja | code | 1 | github-code | 18 | [
{
"api_name": "sys.setrecursionlimit",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "sys.stdin",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "sys.stdin",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "sys.exit",
"line... |
38779414261 | import torch
from ..builder import BBOX_SAMPLERS
from .base_sampler import BaseSampler
from .sampling_result import SamplingResult
@BBOX_SAMPLERS.register_module()
class PseudoSampler(BaseSampler):
"""A pseudo sampler that does not do sampling actually."""
def __init__(self, add_gt_as_proposals=True, **kwar... | hding2455/DSC | mmdet/core/bbox/samplers/pseudo_sampler.py | pseudo_sampler.py | py | 2,632 | python | en | code | 15 | github-code | 18 | [
{
"api_name": "base_sampler.BaseSampler",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "torch.nonzero",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "torch.nonzero",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "torch.uint8",
... |
70175033322 | import os, datetime
from django.db import models
#from adminsortable.models import Sortable
def logo_filename(instance, filename):
ext = filename.split('.')[-1]
token = datetime.datetime.utcnow().strftime('%Y%m%d%H%M%S%f')
filename = "%s.%s.%s" % (instance.chan_id, token, ext)
return os.path.join('logo... | five59/M3U8-Creator | src/core/models.py | models.py | py | 5,150 | python | en | code | 11 | github-code | 18 | [
{
"api_name": "datetime.datetime.utcnow",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
... |
40608670845 | from functions import *
import pandas as pd
import datetime
import os
def obtain_index_results():
days = obtain_days_of_the_year(2019)
index = []
for day in range(days):
date = conseday_to_date(day, 2019)
date = str(date)[5:10]
index.append(date)
return index
def obtain_heade... | giovannilopez9808/SEDEMA_2000_2019 | Scripts/Read_aeronet_data.py | Read_aeronet_data.py | py | 2,554 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pandas.to_datetime",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line... |
12199405989 | try:
import numpy as np
from pathlib import Path
import pickle
import os
import os.path as osp
import sys
import importlib
importlib.reload(Config)
except NameError: # It hasn't been imported yet
import config.config_flags as Config
def get_alpha_weights_path():
train_path =... | uzborg950/COMP6248-CW-MetaLearning-SP | utils/helper.py | helper.py | py | 1,528 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "importlib.reload",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.basename",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "os.path.basename",
"line... |
35062186643 | from django.test import TestCase
from django.test.client import RequestFactory
from mobiledetect.detection import Detection
# user_agents_desktop = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36'
user_agents_android = 'Mozilla/5.0 (Linux; Andr... | Botir/Django-Mobile-Detector | mobiledetect/tests.py | tests.py | py | 1,381 | python | en | code | 6 | github-code | 18 | [
{
"api_name": "django.test.TestCase",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "django.test.client.RequestFactory",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "mobiledetect.detection.Detection",
"line_number": 15,
"usage_type": "call"
},
... |
34755316752 | # -*- coding: utf-8 -*-
"""
http://dev.seeclickfix.com
Created on Mon Dec 13 22:15:08 2021
@author: Scott
"""
import requests
import pandas as pd
# import pickle
import utils.utilFuncs as utils
scfURL = 'https://seeclickfix.com/api/v2/'
baseOpen311URL = 'https://seeclickfix.com/open311/v2/requests.json?organizati... | sckilcoyne/Bike_Data | dataSources/see_click_fix.py | see_click_fix.py | py | 2,279 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "requests.get",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "utils.utilFuncs.pickle_dict",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "utils.utilFuncs",
"line_number": 37,
"usage_type": "name"
},
{
"api_name": "utils.utilFu... |
1809794779 | import time
from google.oauth2 import service_account
from googleapiclient.discovery import build
class GoogleAuthentication:
def __init__(self):
self.scopes = ['https://www.googleapis.com/auth/spreadsheets']
self.credentials = service_account.Credentials.from_service_account_file(
r'... | coding-gene/BUSINESS_INTELLIGENCE-PythonGoogleSheetsTableauPublic | gsapi/google.py | google.py | py | 1,069 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "google.oauth2.service_account.Credentials.from_service_account_file",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "google.oauth2.service_account.Credentials",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "google.oauth2.service_account"... |
12036607021 | import glob
from pathlib import Path
import shutil
import warnings
import argparse
import os
import re
import ando.AnDOChecker
try:
import pandas as pd
HAVE_PANDAS = True
except ImportError:
HAVE_PANDAS = False
from ando.AnDOChecker import build_rule_regexp
from ando.rulesStructured import RULES_SET
from ... | Remi-Gau/BEP032tools | ando/tools/generator/AnDOGenerator.py | AnDOGenerator.py | py | 12,088 | python | en | code | null | github-code | 18 | [
{
"api_name": "ando.rulesStructured.RULES_SET",
"line_number": 23,
"usage_type": "argument"
},
{
"api_name": "ando.AnDOChecker.build_rule_regexp",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 92,
"usage_type": "call"
},
{
... |
41399826741 | """
Abstractions and utilities for working with projects to run ecosystem checks on.
"""
from __future__ import annotations
from asyncio import create_subprocess_exec
from dataclasses import dataclass, field
from enum import Enum
from pathlib import Path
from subprocess import PIPE
from typing import Self
from ruff_... | Harmon758/ruff | python/ruff-ecosystem/ruff_ecosystem/projects.py | projects.py | py | 4,721 | python | en | code | null | github-code | 18 | [
{
"api_name": "ruff_ecosystem.types.Serializable",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "ruff_ecosystem.check.CheckOptions",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "dataclasses.field",
"line_number": 27,
"usage_type": "call"
},
{
... |
29676782360 | from rest_framework.decorators import api_view
from rest_framework.permissions import BasePermission
from rest_framework.authentication import BaseAuthentication
import jwt
from rest_framework.exceptions import AuthenticationFailed
from models import *
JWT_SECRET = 'Shop'
class CustomIsAuthenticated(BasePermission):... | KrishnaGrid/Authentication | auth/mnnit/authentication.py | authentication.py | py | 1,614 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "rest_framework.permissions.BasePermission",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "jwt.decode",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "jwt.exceptions",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name... |
38083196449 | # import libraries
from yahooquery import Ticker
import yahoo_fin.stock_info as yf
def report(data):
# create empty list for balance sheet
balance_sheet = []
# create empty list for income statement
income_statement = []
# create empty list for cashflow statement
cashflow_stateme... | Martwuene/FundamentalAnalysis-Project | data.py | data.py | py | 2,364 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "yahooquery.Ticker",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "yahooquery.Ticker",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "yahooquery.Ticker",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "yahooquery.Tick... |
40320539464 | import requests
from account_management_api.models import UsageReports
from common.consts import AUTHORIZATION, FILE, ACCESS_TOKEN
from common.dates.consts import TODAY
from common.utils.utils import marker_wrapper_printer
from data.ETLs.Base.BaseLoader import BaseLoader
from data.Resources import URLs, get_zoura_auth... | yovelcohen/sc | {{cookiecutter.project_name}}/data/ETLs/Flows/Zoura/Loader.py | Loader.py | py | 3,228 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "data.ETLs.Base.BaseLoader.BaseLoader",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "common.dates.consts.TODAY.year",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "common.dates.consts.TODAY",
"line_number": 12,
"usage_type": "na... |
73443109800 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 11 20:31:11 2021
@author: toor
"""
from tkinter import *
import tkinter.messagebox
from tkinter import *
import psycopg2
import tkinter.messagebox
import tkinter.messagebox
from datetime import date
import time
DATABASE = "kali_db2" #nom de l... | Dalois-30/Eleonor1 | Eleonor/codes/infoclientOO.py | infoclientOO.py | py | 2,776 | python | fr | code | 0 | github-code | 18 | [
{
"api_name": "psycopg2.connect",
"line_number": 25,
"usage_type": "call"
}
] |
14755384638 | import pygame
import settings as settings
from math import sqrt, atan2, sin ,cos
class Player:
def __init__(self, init_x, init_y):
self.image = pygame.image.load("assets/einstein.png")
self.proper_height = 150
self.proper_width = 150
self.mass = 1
self.height = self.proper... | Palfore/Relativity-Man | Player.py | Player.py | py | 3,557 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pygame.image.load",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pygame.image",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "math.sqrt",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_num... |
13500521239 | from flask import Flask, render_template
app = Flask(__name__)
@app.route("/")
def index():
# For the sake of example, use static information to inflate the template.
# This will be replaced with real information in later steps.
print("Hello World!")
return render_template("index.html")
| KwokHangMing/appEngineProject | main.py | main.py | py | 307 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "flask.Flask",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 11,
"usage_type": "call"
}
] |
75055306919 | import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0, 5, 11)
y = x ** 2
print(y)
fig = plt.figure()
ax = fig.add_axes([0.1, 0.1, 0.8, 0.9])
# ax.plot(x, y, color='#333333', linewidth=1, linestyle=':',
# marker='o', markersize=15,
# markerfacecolor='blue') # or color names, alpha - про... | dkasarov/data-science-and-machine-learning | Matplotlib/part_three.py | part_three.py | py | 524 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "numpy.linspace",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyp... |
43421302467 | import speech_recognition as sr
from pydub import AudioSegment
import math
import os
#convert mp3 to wav
def mp3_to_wav(mp3_file, wav_file):
sound = AudioSegment.from_mp3(mp3_file)
sound.export(wav_file, format="wav")
class SplitWavAudioMubin():
def __init__(self, folder, filename):
self.folder =... | rouxmi/TranscriptGoogleAPi | mp3totxt.py | mp3totxt.py | py | 2,579 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pydub.AudioSegment.from_mp3",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pydub.AudioSegment",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "pydub.AudioSegment.from_wav",
"line_number": 18,
"usage_type": "call"
},
{
"api_name... |
1080820751 | # -*- coding: utf-8 -*-
from odoo import models, fields, api, _
import StringIO
import xlsxwriter
import pytz
from odoo.exceptions import UserError, ValidationError
from datetime import datetime
from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT
class account_voucher_ihr(models.Model):
_inherit = 'account.vou... | QuangThuanLQT/Code_Odoo | vieterp/odoo/addons/local/tts_account_voucher/models/account_voucher.py | account_voucher.py | py | 13,682 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "odoo.models.Model",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "odoo.models",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "odoo.fields.Float",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "odoo.fields",
... |
73182789800 | from collections import deque
def solution(maps):
graph = []
start = False
lebber = False
for y in range(len(maps)):
for x in range(len(maps[0])):
if maps[y][x] == "S":
start = [y,x]
elif maps[y][x] == "L":
lebber = [y,x]
... | JSeungHyun/Algorithm | 프로그래머스/unrated/159993. 미로 탈출/미로 탈출.py | 미로 탈출.py | py | 1,282 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "collections.deque",
"line_number": 18,
"usage_type": "call"
}
] |
25697828516 | '''
File to the the ActivLin1D class.
Author: Sebastiano Taddei.
Date: 29/11/2022.
'''
###########
# Imports #
###########
import numpy as np
import matplotlib.pyplot as plt
#############
# Funcitons #
def activ_lin_1d(act_in, chan_id, chan_arr):
'''
Copy of the ActivLin1D class as Python function using ... | FransMara/Longitudinal_Controller_NN | NN_Python/test/test_activ_lin_1D.py | test_activ_lin_1D.py | py | 2,472 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "numpy.minimum",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "numpy.maximum",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "numpy.minimum",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "numpy.maximum",
"line_n... |
40548371633 | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
import mysql.connector
from mysql.connector import Error
import json
# TABLE_CATEGORY = 'test_categories'
TABLE_CATEGORY = 'c... | carollynn2253/icook_srapy_practice | icook/pipelines.py | pipelines.py | py | 4,033 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "mysql.connector.connector.connect",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "mysql.connector.connector",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "mysql.connector",
"line_number": 20,
"usage_type": "name"
},
{
"... |
71427113960 | # This Python 3 environment comes with many helpful analytics libraries installed
# It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python
# For example, here's several helpful packages to load in
import numpy as np # linear algebra
import pandas as pd # data processing, CSV fil... | aorursy/new-nb-3 | hemantnyadav_randomforestregressor-without-oil-csv.py | hemantnyadav_randomforestregressor-without-oil-csv.py | py | 5,079 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "subprocess.check_output",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "pandas.read_c... |
12149420243 | from rest_framework.decorators import api_view
from rest_framework.response import Response
import stripe
import os
from dotenv import load_dotenv
import functools
import datetime
from account_manager.views import send_mail
from hotels.serializers import Booking
# Set your Stripe secret key
load_dotenv()
stripe.api... | OzoneBht1/Hotel_Booking_System | backend/payments/views.py | views.py | py | 3,770 | python | en | code | 12 | github-code | 18 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "stripe.api_key",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.getenv",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.st... |
27118654307 | import os
import cv2
import torch
import random
import pathlib
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib as mpl
mpl.rcParams.update({'figure.max_open_warning': 0})
def mask_step(x, step):
"""
Create a mask to only contain the step-th element... | vita-epfl/motion-style-transfer | utils/data_utils.py | data_utils.py | py | 39,255 | python | en | code | 13 | github-code | 18 | [
{
"api_name": "matplotlib.rcParams.update",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "matplotlib.rcParams",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "numpy.zeros_like",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "... |
43187961110 | import datetime
from ipaddress import IPv4Address, IPv4Interface
from pathlib import Path
from typing import List, Optional
import netaddr
from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound
from cnaas_nms.db.device import Device, DeviceType
from cnaas_nms.db.mgmtdomain import Mgmtdomain
def canonica... | SUNET/cnaas-nms | src/cnaas_nms/db/helper.py | helper.py | py | 6,344 | python | en | code | 66 | github-code | 18 | [
{
"api_name": "netaddr.EUI",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "netaddr.mac_bare",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "typing.List",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"... |
9576515941 | import os
import sys
import numpy as np
from classifiers.probabilisticDecisionTree import ProbabilisticDecisionTree
from classifiers.probabilisticNN_basic import ProbabilisticNN
from classifiers.probabilisticSVM import ProbabilisticSVM
from discretizationSolver import DiscretizationSolver
from doubleOracle import Dou... | oskoumal/GameTheoryNeuralNet | main.py | main.py | py | 8,164 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "matplotlib.use",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.linspace",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "numpy.meshgrid",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "numpy.concatenate",
... |
43181419030 | import requests as rq
import json
import sys
import properties_nifi_deploy as prop
import update_nifi_params
import update_jolt_params
import logging
logging.basicConfig(level=logging.DEBUG)
# Get nifi root processor group ID
def get_nifi_root_pg():
""" Fetch nifi root processor group ID"""
res = rq.get(
... | Sunbird-cQube/cQube_Workflow | development/datasource/python/deploy_nifi.py | deploy_nifi.py | py | 14,415 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "logging.basicConfig",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "properties_nifi_dep... |
15214484332 |
import numpy as np
import skimage
import cv2
def abstractify(img: np.array, sigma_color=5.5, sigma_space=3.9,
Nq=15,
tau=0.99, phi=0.75) -> np.array:
# change to Lab color space
lab = skimage.color.rgb2lab(img)
# Bilateral filtering
bf = lab
for i in range(7):
... | JKU-ICG/cv_lab_2021 | 2_packages/abstractify.py | abstractify.py | py | 1,057 | python | en | code | 4 | github-code | 18 | [
{
"api_name": "numpy.array",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "skimage.color.rgb2lab",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "skimage.color",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "cv2.bilatera... |
13369647456 | """
~ CML // Creative Machine Learning ~
tasks.py : Simple helper functions for Panel styling
For the interactive GUI aspects, we rely on the Panel library
Author : Philippe Esling
<esling@ircam.fr>
"""
import jax.numpy as jnp
import inspect
import numpy as np
import para... | acids-ircam/creative_ml | cml/tasks/regression.py | regression.py | py | 6,124 | python | en | code | 153 | github-code | 18 | [
{
"api_name": "cml.tasks.task.MLTask",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "cml.randomness.Random",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "cml.plot.scatter",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "numpy.ar... |
70906576360 | import os
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Configurazione(object):
def setupUi(self, Configurazione):
Configurazione.setObjectName("Configurazione")
Configurazione.resize(510, 400)
self.verticalLayout_3 = QtWidgets.QVBoxLayout(Configurazione)
self.verticalLayout... | cardanz/SOFTWARE-ENGINEERING | src/configurazione_ui.py | configurazione_ui.py | py | 12,638 | python | it | code | 0 | github-code | 18 | [
{
"api_name": "PyQt5.QtWidgets.QVBoxLayout",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtWidgets.QVBoxLayout",
"line_number": 12,
"usage_type": "call"
},
{
"api_name"... |
71950848361 | from django.contrib import admin
from .models import *
# Register your models here.
admin.site.site_title = 'eBook House'
admin.site.site_header = 'eBook House'
mymodels = (UserRole,Master,Profile,Category,Book)
for model in mymodels:
admin.site.register(model)
| man4771/ebook | ebook_app/admin.py | admin.py | py | 268 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "django.contrib.admin.site",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "django.contrib.admin.site",
"line_number": 5,
"usage_type": "attribute"
},
{
"a... |
20027962181 | import datetime
class Card:
def __init__(self, repetitions=0, interval=1.0, ease_factor=2.5, due_time=None):
self.repetitions = repetitions
self.interval = interval
self.ease_factor = ease_factor
if due_time is not None:
self.due_time = due_time
def update(self, gra... | srbiotik/spaced_repetition | spaced_repetition/card.py | card.py | py | 1,064 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "datetime.datetime.now",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "datetime.timedelta",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "datet... |
26437944520 | from django.core.exceptions import ValidationError
from django.db import models
from safedelete.models import SafeDeleteModel
from absolutum.mixins import CoreMixin, DisplayMixin
class Invite(SafeDeleteModel, CoreMixin, DisplayMixin):
"""
МЛМ-приглашение
"""
INVITE_STATUS = (
('wait', 'Ожи... | tayursky/med-crm | mlm/models/invite.py | invite.py | py | 3,430 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "safedelete.models.SafeDeleteModel",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "absolutum.mixins.CoreMixin",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "absolutum.mixins.DisplayMixin",
"line_number": 7,
"usage_type": "name"
},
... |
31915457021 | from ast import Return
from django.shortcuts import render,redirect
from todoapp.models import todolist
from todoapp.forms import TodoForm
from django.contrib import messages
from django.core.paginator import Paginator
from django.contrib.auth.decorators import login_required
# Create your views here.
def index(reque... | anil639/todo | todoapp/views.py | views.py | py | 2,297 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "django.shortcuts.render",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 18,
"usage_type": "call"
},
{
"api_name"... |
28166861325 | import pytest
import torch
from hypothesis import assume, given
from hypothesis.strategies import text
from transformers import Wav2Vec2CTCTokenizer
from tests.utils import mark_slow
from thunder.huggingface.compatibility import _tok_to_transform
@pytest.fixture(scope="session")
def hf_tokenizer():
return Wav2V... | scart97/thunder-speech | tests/huggingface/test_tokenizer_huggingface.py | test_tokenizer_huggingface.py | py | 1,101 | python | en | code | 24 | github-code | 18 | [
{
"api_name": "transformers.Wav2Vec2CTCTokenizer.from_pretrained",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "transformers.Wav2Vec2CTCTokenizer",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "pytest.fixture",
"line_number": 12,
"usage_type": "ca... |
13821274245 | import os
import uuid
import trimesh
import numpy as np
MANIFOLD_SOFTWARE_DIR = "Manifold/build"
def remesh(
vertices: np.ndarray,
faces: np.ndarray,
num_faces=2000,
):
# Write the original mesh as OBJ.
original_file = random_file_name("obj")
with open(original_file, "w") as f:
mesh =... | dcharatan/point2mesh-reimplementation | source/mesh/remesh.py | remesh.py | py | 1,326 | python | en | code | 28 | github-code | 18 | [
{
"api_name": "numpy.ndarray",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "numpy.ndarray",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "trimesh.Trimesh",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "trimesh.exchang... |
23856475094 | # Import system modules
import sys, zipfile, arcpy, os, traceback, datetime, time
from zipfile import ZipFile
#receive parameter from tool
infile = arcpy.GetParameterAsText(0)
#create timestamped folder to receive files from zip archive
fname = os.path.basename(infile).split('.')[0]
parentdir = r"C:\geodata\... | Nateo73/ArcGIS-Pro-2.9.3 | Python/Unzip_CD_Shapefile.py | Unzip_CD_Shapefile.py | py | 3,322 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "arcpy.GetParameterAsText",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path.basename",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "time.ctime",
... |
18522253515 | import requests
"""
# Set the API endpoint and the API key
endpoint = "https://api.openai.com/v1/text-davinci/completions"
api_key = "key"
# Set the input text and other request parameters
prompt = "The quick brown fox jumps over the lazy dog."
model = "text-davinci-002"
max_tokens = 256
# Make the reque... | kalabquake/Projects | Python/HAI/sample.py | sample.py | py | 1,214 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "openai.api_key",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "openai.Engine.list",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "openai.Engine",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "openai.Comp... |
9766438186 | import requests,re,os
from bs4 import BeautifulSoup
'''下载一章'''
def downdoad_one_music(one_book_title,one_page_url,one_title):
ture_api = ('https://www.ximalaya.com/revision/play/v1/audio?id=' + one_page_url + '&ptype=1')
header = {'User-Agent': 'Mozilla/5.0'}
r = requests.get(ture_api,headers=header)
... | bhcqzf/baiming | 喜马拉雅.py | 喜马拉雅.py | py | 3,033 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "requests.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_nu... |
3273170921 | from bench.samples.long_tail.random_sampler.assign_result import AssignResult
import torch
from abc import ABCMeta, abstractmethod
from bench.core.executer import Executer
class BaseSampler(metaclass=ABCMeta):
"""Base class of samplers."""
def __init__(self,
num,
pos_fraction... | DeepLink-org/DLOP-Bench | bench/samples/long_tail/random_sampler/torch_impl.py | torch_impl.py | py | 7,721 | python | en | code | 38 | github-code | 18 | [
{
"api_name": "abc.ABCMeta",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "abc.abstractmethod",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "abc.abstractmethod",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "torch.uint8",
"l... |
71426536360 | # This Python 3 environment comes with many helpful analytics libraries installed
# It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python
# For example, here's several helpful packages to load in
import numpy as np # linear algebra
import pandas as pd # data processing, CSV fil... | aorursy/new-nb-3 | f20150031_kernele536877bc8.py | f20150031_kernele536877bc8.py | py | 3,645 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "os.listdir",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"lin... |
21577754650 | import pygame
# import random
# from player_class import *
from random import randint
from player_class import *
from opposition_class import *
from hometeam_class import *
from ball_stub import *
from level_class import *
from os import path
img_dir = path.join(path.dirname(__file__), 'img')
snd_dir = path.join(path.... | tchaikousky/dodgeball-game | scene_final.py | scene_final.py | py | 10,836 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "os.path.join",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "os.path.dirname",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number"... |
71427017960 | # This Python 3 environment comes with many helpful analytics libraries installed
# It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python
# For example, here's several helpful packages to load in
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O... | aorursy/new-nb-3 | hamishdickson_bidirectional-lstm-in-keras-with-glove-embeddings.py | hamishdickson_bidirectional-lstm-in-keras-with-glove-embeddings.py | py | 7,465 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "os.listdir",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "pandas.set_option",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_numbe... |
18218436840 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cms', '0013_urlconfrevision'),
]
operations = [
migrations.CreateModel(
name='FancyTitlePluginModel',
... | massawho/dancart-cms | canvas/migrations/0001_initial.py | 0001_initial.py | py | 1,631 | python | en | code | 7 | github-code | 18 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.CreateModel",
"line_number": 14,
"usage_type": "call"
},
... |
25961577629 | import asyncio
from asyncio import streams, StreamReader, StreamWriter
import logging
import sys
import traceback
import time
import os
import json
import random
logging.basicConfig(level=logging.DEBUG)
log = logging.getLogger(__name__)
class MQTTException(Exception):
pass
async def read_packet(reader: StreamR... | raushanraja/tg_mqtt_at | mqttc/rough_reader.py | rough_reader.py | py | 2,348 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "logging.basicConfig",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "asyncio.Stre... |
70779071719 | #coding=utf-8
import sys
import urllib2
import re
from bs4 import BeautifulSoup
def parseIMG(content):
imgset = set()
soup=BeautifulSoup(content,'html.parser')
for i1 in soup.findAll('img'):
i2=i1.get('src')
imgset.add(str(i2))
return imgset
def write_outputs(imgs, filename):
wit... | Zsi-r/EE208 | lab1/ex1-2.py | ex1-2.py | py | 747 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "bs4.BeautifulSoup",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "urllib2.urlopen",
"... |
28679150135 | import torch
import numpy as np
import math
import fps_utils
import cuda.fps_stack_cuda as origin_fps
def rand_sample(size, npoint):
B, N, _ = size
arr = np.array(range(N))
np.random.shuffle(arr)
arr = torch.from_numpy(arr[:npoint]).to("cuda").repeat([B, 1])
return arr
def farthest_point_sample... | hanm2019/tinyFPS | script/sampling.py | sampling.py | py | 2,719 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "numpy.array",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.random.shuffle",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "torch.from_numpy",
... |
20291219108 | # -*- coding: utf-8 -*-
import scrapy
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.options import Options
def getlist(name):
with open(name + '.txt', 'r') as f:
list = []
for line in f.readlines():
item = line... | Ihtml/Python | find2/find2/spiders/find2_spider.py | find2_spider.py | py | 7,195 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "scrapy.Spider",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "selenium.webdriver.chrome.options.Options",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 41,
"usage_type": "call"
},
{... |
35564684024 | from sqlalchemy import Column, Integer, String, DateTime
from base import Base
class FanSpeed(Base):
""" Fan Speed """
__tablename__ = "fan_speed"
id = Column(Integer, primary_key=True)
ming_rig_id = Column(String(250), nullable=False)
ming_card_id = Column(String(250), nullable=False)
time... | digao666/Rich-Miner | storage/fan_speed.py | fan_speed.py | py | 1,473 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "base.Base",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integer",
"line_number": 11,
"usage_type": "argument"
},
{
"api_name": "sqlalchemy.Column",... |
10366692679 | # coding: utf-8
"""
Synthesis waveform for testset
usage: separation.py [options] <checkpoint0> <checkpoint1>
options:
--hparams=<parmas> Hyper parameters [default: ].
--preset=<json> Path of preset parameters (json).
-h, --help Show help message.
"""
from docopt impo... | vivjay30/pnf-sampling | pnf-wavenet/separation.py | separation.py | py | 7,910 | python | en | code | 19 | github-code | 18 | [
{
"api_name": "torch.cuda.is_available",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "torch.device",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "train.build_mode... |
18096294870 | import bpy
import os
import sys
sys.path.append('./scripts')
from helper import set_prop_val
# output properties
bpy.data.scenes['Scene'].render.resolution_x = 1280 # 1920
bpy.data.scenes['Scene'].render.resolution_y = 720 # 1080
bpy.data.scenes['Scene'].render.resolution_percentage = 100
bpy.data.scenes['Scene'].rend... | imkaywu/3d-data-generator | scripts/train/ps.py | ps.py | py | 1,921 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "sys.path.append",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "bpy.data",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "bpy.data",
"line_number"... |
36642545601 | import torch.nn as nn
import torch.nn.functional as F
class ExampleModel(nn.Module):
def __init__(self):
super().__init__()
self.layers = nn.ModuleList([nn.Linear(512, 100), nn.Linear(100, 10)])
self.softmax = nn.Softmax(dim=1)
def forward(self, x, target=None):
for i in ran... | jake-seunghyukoh/research-template | src/packages/models/example_model.py | example_model.py | py | 779 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "torch.nn.Module",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "torch.nn.ModuleList",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_n... |
10519681052 | import requests
import json
import os
def sendOtpText(message, contact):
url = "https://www.fast2sms.com/dev/bulk"
querystring = {"authorization": "cLN4VEhwvyFYDSarJsk7jIWbq35HtmofnUGiXZROQxd1TlMp92g1WOL0o4lsM26rhe5YqZvKQfz8kaDH", "sender_id": "FSTSMS", "message": message,
"language": "eng... | Rakesh-roy/RSM_Django_Project | Resume_Management_System/Application/utils.py | utils.py | py | 592 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "requests.request",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 19,
"usage_type": "call"
}
] |
42194960977 | from django.conf import ImproperlyConfigured
from django.test import SimpleTestCase
from permissions_auditor import core
from permissions_auditor.core import ViewDetails
from permissions_auditor.tests.fixtures import views
class ViewParserTest(SimpleTestCase):
def setUp(self):
self.parser = core.ViewPar... | AACEngineering/django-permissions-auditor | permissions_auditor/tests/test_core.py | test_core.py | py | 5,199 | python | en | code | 16 | github-code | 18 | [
{
"api_name": "django.test.SimpleTestCase",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "permissions_auditor.core.ViewParser",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "permissions_auditor.core",
"line_number": 12,
"usage_type": "name"
},
{... |
19486745112 | """
Profiles App - Forms
----------------
Forms for Profiles App.
"""
from django.forms import ModelForm
from django import forms
from phonenumber_field.formfields import PhoneNumberField
from datetime import date
from .models import UserProfile
class UserProfileForm(ModelForm):
default_phone_number = PhoneNumber... | useriasminna/the-guilty-grape-wine-shop | profiles/forms.py | forms.py | py | 3,370 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "django.forms.ModelForm",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "phonenumber_field.formfields.PhoneNumberField",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "models.UserProfile",
"line_number": 17,
"usage_type": "name"
},
... |
71620706600 | import speech_recognition as sr
import streamlit as st
import pyperclip
def on_copy_click(text):
pyperclip.copy(text)
st.toast(f"Скопировано в буфер обмена: {text}", icon='✅')
def command():
recognizer = sr.Recognizer()
recognizer.dynamic_energy_threshold = False
with sr.Microphone() as source:
st.write(f"Сл... | Tuniaka/software_engineering | app/web.py | web.py | py | 1,176 | python | ru | code | 0 | github-code | 18 | [
{
"api_name": "pyperclip.copy",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "streamlit.toast",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "speech_recognition.Recognizer",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "speech_rec... |
6214841847 | import attr
from typing import Any
from typing import Dict
from typing import Generator
from typing import Optional
import logging
from voluptuous import All
from voluptuous import Length
from voluptuous import Required
from voluptuous import Schema
from packaging.specifiers import SpecifierSet
from .schema import PA... | thoth-station/adviser | thoth/adviser/prescription/v1/group.py | group.py | py | 3,570 | python | en | code | 33 | github-code | 18 | [
{
"api_name": "logging.getLogger",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "step.StepPrescription",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "voluptuous.Schema",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "voluptuous.... |
23708444565 | from tkinter import *
from tkinter import ttk as tk
from datetime import date
import tkinter.messagebox as tmsg
import tkcalendar
import cx_Oracle
import ctypes
class Attendence:
def __init__(self, root):
self.root = root
self.root.geometry('1335x500+15+110')
self.root.resizable(False, Fal... | SyedHamzaGilani/Al-Sadat-School | AttendenceWindow.py | AttendenceWindow.py | py | 12,087 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "ctypes.windll",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "datetime.date.today",
"line_number": 28,
"usage_type": "... |
37503186797 | """ Example: plotting an Accola atom group.
We approximate the Accola atom group (Maskit, VIII.F.7). In the limit (as n->\infty),
the quotient Ω(G)/G has four components. Two of these components are discs: they are the projections of the discs 0<|z|<1
and 2<|z| in Ω(G) which both have trivial stabiliser in... | aelzenaar/bella | examples/atom.py | atom.py | py | 6,831 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "holoviews.extension",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "bella.cayley.GroupCache",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "bella.cayley",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "mpmath.... |
33089910854 | from __future__ import absolute_import
from django.core.urlresolvers import reverse
from mock import patch
from sentry.models import AuthIdentity, AuthProvider, OrganizationMember
from sentry.testutils import AuthProviderTestCase, PermissionTestCase
class OrganizationAuthSettingsPermissionTest(PermissionTestCase):
... | fictional-tribble-2/getsentry--sentry | tests/sentry/web/frontend/test_organization_auth_settings.py | test_organization_auth_settings.py | py | 5,444 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "sentry.testutils.PermissionTestCase",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "sentry.models.AuthProvider.objects.create",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "sentry.models.AuthProvider.objects",
"line_number": 13,
"us... |
13064117086 | from neutron._i18n import _
from oslo_config import cfg
from quark.drivers.registry import DriverRegistryBase
from quark.drivers import unicorn_driver as unicorn
CONF = cfg.CONF
quark_router_opts = [
cfg.StrOpt('default_floating_ip_driver',
default='Unicorn',
help=_('Driver for floa... | MichaelPorras/quark | quark/drivers/floating_ip_registry.py | floating_ip_registry.py | py | 896 | python | en | code | null | github-code | 18 | [
{
"api_name": "oslo_config.cfg.CONF",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "oslo_config.cfg",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "oslo_config.cfg.StrOpt",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "oslo_c... |
27300154081 | import sys
import matplotlib
from PyQt5.QtCore import QThreadPool
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QAction, QFileDialog, QDockWidget, QApplication
# from glidar_analyst.gui.thermal_3d_view import Thermal3DView
from glidar_analyst.para.data_loader import load_and_segment
from glidar_analyst.gu... | glidar-project/glidar-analyst | glidar_analyst/main.py | main.py | py | 7,021 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "matplotlib.use",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets.QMainWindow",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "PyQt5.QtWidgets",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "PyQt5... |
2546717426 | #!/usr/bin/env python
#Last edited by Hunter Cheng 10/04/2022
#Changes were facilitated to allow program functionality in python3
'''
==========================================================
This program uses SSearch36 for mass shuffles,
as this happens to be much quicker than
EMBOSS::Water When calculating a z-score... | SaierLaboratory/TCDBtools | bin/ssearch.py | ssearch.py | py | 7,313 | python | en | code | 4 | github-code | 18 | [
{
"api_name": "Bio.SeqIO.parse",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "Bio.SeqIO",
"line_number": 46,
"usage_type": "name"
},
{
"api_name": "Bio.SeqIO.parse",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "Bio.SeqIO",
"line_numbe... |
73736912999 | import mysql.connector
import subprocess
import time
from eth_keys import keys
from eth_hash.auto import keccak
import requests
import os
import random
from eth_account import Account
import threading
Account.enable_unaudited_hdwallet_features()
script_dir = os.path.dirname(os.path.abspath(__file__))
file_path = os.pa... | aididalam/eth-test | app.py | app.py | py | 10,752 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "eth_account.Account.enable_unaudited_hdwallet_features",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "eth_account.Account",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "os.path.dirname",
"line_number": 13,
"usage_type": "call"
},... |
22617797344 | """ This file defines the main object that runs experiments. """
import matplotlib as mpl
mpl.use('Qt4Agg')
import logging
import imp
import os
import os.path
import sys
import copy
import argparse
import threading
import time
import traceback
# Add gps/python to path so that imports work.
sys.path.append('/'.join(s... | cbfinn/gps | python/gps/gps_main.py | gps_main.py | py | 16,096 | python | en | code | 588 | github-code | 18 | [
{
"api_name": "matplotlib.use",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "sys.path.append",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "gps.utility.data_logger.D... |
21160220921 | import math
import matplotlib.pyplot as plt
class Circle():
def get_shape(self, r=1., n=100):
return [(math.cos(2 * math.pi / n * x) * r, math.sin(2 * math.pi/ n * x) * r) for x in range(0, n+1)]
class Square():
def get_shape(self, width=10):
return [(0,0), (width, 0), (width, width), (0, widt... | zhichengMLE/python-design-pattern | Creational Patterns/Factory/factory_2_plot_shape.py | factory_2_plot_shape.py | py | 1,459 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "math.cos",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "math.pi",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "math.sin",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_numb... |
28340713236 | from scrapy import signals
from scrapy.downloadermiddlewares.useragent import UserAgentMiddleware
import random
import pyppeteer
import asyncio
import os
from scrapy.http import HtmlResponse
pyppeteer.DEBUG = False
class FundscrapyDownloaderMiddleware(object):
# Not all methods need to be defined. If a method is... | csy9730/pyScrawler | code/scrapy/scrapy_sample/scrapy_sample/pypuppeteerDownloadMiddleware.py | pypuppeteerDownloadMiddleware.py | py | 3,154 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "pyppeteer.DEBUG",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "os.environ.get",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.environ",
"... |
17479832780 | import os
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
# from torch.testing._internal.distributed.rpc.examples.parameter_server_test import batch_size
from torchvision import transforms
from torchvision.datasets import ImageFolder
import matplotlib.pyplot as plt
# os.... | Courteous121/sensor_task | 任务三/main.py | main.py | py | 3,641 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "torch.nn.Module",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "torch.nn.Linear",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_nu... |
5716928226 | from PIL import Image
import os
import numpy as np
import cv2
from .tune_mask_with_trained_non_experts import binary_imread
def get_boxes(mom, scale):
np_mom = np.array(mom)
bg = np.any(np_mom != [235,235,235], axis=-1)
bg = bg.astype(np.uint8)
small_bg = cv2.resize(bg, (bg.shape[1]//scale, bg.shape[0]... | wuusn/oral_epi_segmentation | utils/extract_anno.py | extract_anno.py | py | 4,264 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "numpy.array",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.any",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.uint8",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "cv2.resize",
"line_number": ... |
34854341103 | from __future__ import print_function
from scapy.all import PcapReader, TCP, NoPayload, IP, sniff
import re
from socket import gethostbyaddr
from helpers import memoize, do
from concurrent.futures import ThreadPoolExecutor, TimeoutError
from threading import Thread
from gtk import ListStore
from datetime import datetim... | panmari/moco-project | RP/RP/reader.py | reader.py | py | 5,809 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "logging.getLogger",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "concurrent.futures.ThreadPoolExecutor",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "so... |
41948592125 | import sys
import json
from Training import *
class Journal( object ):
"""Journal is a collection of trainings"""
def __init__( self, trainings_list, journal_description_dict ):
self.trainings = trainings_list
self.description = journal_description_dict
def add_training( self, training ):... | noooway/exj | Journal.py | Journal.py | py | 3,084 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "json.dump",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "Training.init_from_json",
"line_number": 48,
"usage_type": "call"
}
] |
72484670120 | from flask import Flask, render_template, request, redirect, session
import csv
import os
import prediction
from time import sleep
app = Flask(__name__)
app.secret_key = '112nvroe23'
def check_existing_user(email):
with open("user_data.csv", "r", newline="") as file:
reader = csv.reader(file)
... | tanuj437/HealthOptimized | app.py | app.py | py | 6,114 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "flask.Flask",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "csv.writer",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "csv.writer",
"line_number": 25,
... |
26189870030 | import numpy as np
import time
import PyraLNet as pyral
import matplotlib.pyplot as plt
import Dataset
import fcntl
from pathlib import Path
import mnist
dtype = pyral.dtype
class Layer(pyral.Layer):
def update(self, r_in, u_next, dir_up):
'''
compute pyramidial and interneuron potentials by mea... | phll/Neuro-Backprop | backprop/SteadNet.py | SteadNet.py | py | 37,095 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "PyraLNet.dtype",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "PyraLNet.Layer",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "numpy.zeros",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
... |
75279239399 | import json
from Products.Five.browser import BrowserView
from zope.i18n import translate
from collective.whathappened.browser.notifications import getHotNotifications
from collective.whathappened.browser.notifications import getUnseenCount
class NotificationAjax(BrowserView):
def updateResponse(self):
... | collective/collective.rcse | collective/rcse/page/controller/notifications_ajax.py | notifications_ajax.py | py | 981 | python | en | code | 3 | github-code | 18 | [
{
"api_name": "Products.Five.browser.BrowserView",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "collective.whathappened.browser.notifications.getHotNotifications",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "zope.i18n.translate",
"line_number": 21,
... |
31244148599 | from rest_framework import viewsets, mixins
from rest_framework.decorators import list_route
from rest_framework.response import Response
from apps.admins.models import *
from apps.admins.serializers import *
from util.errors import ParameterException
# 用户视图
class WhAdminViewSet(viewsets.GenericViewSet, mi... | WHSC-2-0/backg_system | py_whsc/apps/admins/views.py | views.py | py | 3,242 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "rest_framework.viewsets.GenericViewSet",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.viewsets",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "rest_framework.mixins.ListModelMixin",
"line_number": 11,
"usage_type... |
71701649959 | import sys
import logging
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(message)s', filename='logfile.txt')
def print_maturity(age):
if age >= 18:
logging.info('Adult!')
else:
logging.info('Not adult!!!')
if __name__ == '__main__':
logging.debug('The program was called wit... | getthatapp/kodilla_py | MODUL 4/logi.py | logi.py | py | 473 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "logging.basicConfig",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "logging.info",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "logging.info",
"... |
7476683187 | import os
import logging
import pandas as pd
import click
from sklearn.model_selection import train_test_split
@click.command('data_split')
@click.option('--input-path')
@click.option('--output-path')
@click.option('--train-size', type=float)
@click.option('--shuffle', type=bool)
def data_split(input_path: str, outpu... | made-ml-in-prod-2021/sergey-msu | airflow_ml_dags/images/airflow-data-utils/data_split.py | data_split.py | py | 1,269 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "os.path.exists",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number":... |
10843586718 | import scrapy
from scrapy.loader import ItemLoader
from leroy.items import LeroyParserItem
class LeroyMerlinSpider(scrapy.Spider):
name = 'leroymerlin'
allowed_domains = ['leroymerlin.ru']
url = 'https://leroymerlin.ru'
def __init__(self, searchInput):
super(LeroyMerlinSpider, self).__init__... | Nick-Nch/Methods_of_collecting_and_processing_data- | Lesson_7/leroy/spiders/leroymerlin.py | leroymerlin.py | py | 1,681 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "scrapy.Spider",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "scrapy.loader.ItemLoader",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "leroy.items.LeroyParserItem",
"line_number": 30,
"usage_type": "call"
}
] |
20467314675 | import boto3
from botocore import UNSIGNED
from botocore.config import Config
from enum import Enum
import os
class OpenImageDataType(Enum):
TRAIN = "train"
TEST = "test"
VALIDATION = "validation"
class OpenImageWrapper:
def __init__(self, root_dst_folder="image"):
self.__bucket_name = "open... | sakamomo554101/openimage_wrapper | openimage_wrapper/wrapper.py | wrapper.py | py | 2,252 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "enum.Enum",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "os.makedirs",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "boto3.client",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "botocore.config.Config",
"line_... |
22987051032 | from dataclasses import dataclass
from starknet_py.contract import SentTransaction
from starknet_py.utils.sync import add_sync_methods
@add_sync_methods
@dataclass(frozen=True)
class AccountDeploymentResult(SentTransaction):
"""
Result of the :meth:`Account.deploy_account <starknet_py.net.account.account.Acc... | software-mansion/starknet.py | starknet_py/net/account/account_deployment_result.py | account_deployment_result.py | py | 652 | python | en | code | 231 | github-code | 18 | [
{
"api_name": "starknet_py.contract.SentTransaction",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "starknet_py.utils.sync.add_sync_methods",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "dataclasses.dataclass",
"line_number": 8,
"usage_type": "call"... |
35918193065 | import string
import json
import uuid
import pytest
import autoit
import getpass
import uuid
from playwright.async_api import Page, Playwright, Browser
def test_newtemplatepage(playwright: Playwright, pageurl: string)-> Page:
browser = playwright.chromium.launch(headless=False)
context = browser.new_context(st... | LinghuaMa/VS-CodeSpace-Test-Code | Test Case/testcase/DailyCodespaceCases/test_commonmethod.py | test_commonmethod.py | py | 6,746 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "playwright.async_api.Playwright",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "playwright.async_api.chromium.launch",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "playwright.async_api.chromium",
"line_number": 11,
"usage_type": "at... |
8442291066 | import datetime
import urllib.parse
import urllib.request
import zlib
#Functions to retrieve schedules
class HubCacheRetriever:
def __init__(self, appgwUrl, slot):
self.appgwUrl = appgwUrl
self.slot = slot
def getCache(self, timestamp, channelMapId, popularityOrder = False):
cacheUrl = self._buil... | mashikag/MFCatchupAvailabilityTester | CachesRetriever.py | CachesRetriever.py | py | 4,178 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "urllib.parse.request.urlopen",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "urllib.parse.request",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "urllib.parse",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "z... |
37913581271 | # Using Mobilenet_V2
# -----------------------------------------------------------------------
# Liên kết danh sách ảnh trong bộ dữ liệu, sau đó khởi tạo
# danh sách dữ liệu và nhãn
from imutils import paths
import config
imagePaths = list(paths.list_images(config.BASE_PATH))
# print("\n".join(imagePaths))
... | Xunino/Transfer_learning_improvement | fine_tune_and_training.py | fine_tune_and_training.py | py | 6,167 | python | vi | code | 0 | github-code | 18 | [
{
"api_name": "imutils.paths.list_images",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "imutils.paths",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "config.BASE_PATH",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.path",
... |
24978293937 | import numpy as np
import cv2
import glob
from collections import deque
import os
whiteLower = np.array([0,0,0])
whiteUpper = np.array([255,255,255])
darkblueLower = np.array([101,136,125])
darkblueUpper = np.array([121,184,201])
# greenLower = np.array([56,66,51])
# greenUpper = np.array([85,150,130])
greenLower =... | Jayesh23/Tenure_Event | coloring/image_paint_opencv.py | image_paint_opencv.py | py | 14,564 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "numpy.array",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 11... |
32900637245 | import pandas as pd
import pickle
import matplotlib.pyplot as plt
import numpy as np
from scipy.signal import find_peaks
from scipy.fft import fft, fftfreq
from sklearn.preprocessing import StandardScaler
from sklearn.decomposition import PCA
def fourier_classify(U, threshold=2, plot=False, title = 'plot'):
... | martinaoliver/TuringGrowthAtlas | resultsProcessing/PCA.py | PCA.py | py | 3,583 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "numpy.array",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.format_float_positional",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "scipy.fft.fft",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "scipy.fft.fft... |
10796231883 | #!/usr/bin/python
from selenium import webdriver
from selenium.webdriver.support.ui import Select
import requests
from bs4 import BeautifulSoup as bs
url = "http://www.delhimetrorail.com/metro-fares.aspx"
response = requests.get(url)
webpage = response.content
soup = bs(webpage, "html.parser")
stations = soup.select... | ashish-khulbey/DMRC-Route-and-Fare-Finder | DMRC_Scrap.py | DMRC_Scrap.py | py | 961 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "requests.get",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Firefox",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "selenium.we... |
19089044751 | # -*- coding: utf-8 -*-
"""
Created on Thu Jul 19 15:02:12 2018
@author: Sara
"""
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import dash
from dash.dependencies import Output, Event
import dash_core_components as dcc
import dash_html_components as html
import plotly.graph_objs as go
from col... | Heba1/Foresee | codes/city_trending_jobs.py | city_trending_jobs.py | py | 2,239 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pandas.read_csv",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.bar",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.