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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
74121692853 | import time
import random
import argparse
import logging
blackboard = {
"BATTERY_LEVEL": int,
"SPOT": bool,
"GENERAL": bool,
"DUSTY_SPOT": bool,
"HOME_PATH": "",
"DOCKED": False
}
battery_consumption = {
"find_home": 1,
"go_home": 3,
"dock": 1,
"clean_spot": 2,
"done_spot":... | Frama-99/Behavior-Tree | bt.py | bt.py | py | 10,898 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.debug",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "logging.debug",
"line_number": 63,
"usage_type": "call"
},
{
"api_name": "logging.debug",
"line_number": 72,
"usage_type": "call"
},
{
"api_name": "random.randrange",
"lin... |
24055365748 | from citas.forms import FormularioEvento
from django.shortcuts import render
from django.views.generic import ListView,FormView,TemplateView
from citas.models import Evento
# Create your views here.
class Vista(FormView,TemplateView):
model = Evento
template_name='citas/calendario.html'
form_class = Formu... | PipeNaranjo/PlataformaOdontologica | citas/views.py | views.py | py | 1,637 | python | es | code | 0 | github-code | 21 | [
{
"api_name": "django.views.generic.FormView",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.views.generic.TemplateView",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "citas.models.Evento",
"line_number": 9,
"usage_type": "name"
},
{
"... |
39450168587 | import discord
import os
from discord.ext import commands
from utils import *
class Fun(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command(brief="Find some cute birb pictures", aliases=["bird"])
async def birb(self, ctx):
x, str = get_form_api_v2('htt... | Tomkyy96/discordBot-slash_commands | cogs/_fun.py | _fun.py | py | 3,408 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "discord.ext.commands.Cog",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "discord.Embed",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "discor... |
73034975093 | """
.. _tut_artifacts_detect:
Introduction to artifacts and artifact detection
================================================
Since MNE supports the data of many different acquisition systems, the
particular artifacts in your data might behave very differently from the
artifacts you can observe in our tutorials and... | LiuFang816/SALSTM_py_data | python/mne-tools_mne-python/mne-python-master/tutorials/plot_artifacts_detection.py | plot_artifacts_detection.py | py | 5,377 | python | en | code | 9 | github-code | 21 | [
{
"api_name": "mne.datasets.sample.data_path",
"line_number": 73,
"usage_type": "call"
},
{
"api_name": "mne.datasets.sample",
"line_number": 73,
"usage_type": "name"
},
{
"api_name": "mne.io.read_raw_fif",
"line_number": 76,
"usage_type": "call"
},
{
"api_name": ... |
23090989902 | from django.shortcuts import render,get_object_or_404
from django.http import HttpResponse,Http404,HttpResponseRedirect
from django.template import loader
from django.urls import reverse
from sumy.parsers.html import HtmlParser
from sumy.nlp.tokenizers import Tokenizer
from sumy.summarizers.text_rank import TextRankSum... | nsht/sumrize | summarizer/views.py | views.py | py | 1,479 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.shortcuts.render",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "django.http.HttpResponseRedirect",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "sumy.parsers.html.HtmlParser.from_url",
"line_number": 27,
"usage_type": "call"
... |
34870093712 | """
https://leetcode.com/problems/permutations
"""
from typing import List
def permutation(nums: List[int], r: int):
result = []
used = [False] * len(nums)
def dfs(chosen: List[int], used: List[bool]):
if len(chosen) == r:
result.append(chosen[:])
return
for i in ... | dippingconda/python_algorithm_interview | permutations.py | permutations.py | py | 1,125 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "typing.List",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 3... |
73441321653 |
import cv2 as cv
import numpy as np
from skimage.metrics import structural_similarity
import os
import pandas as pd
import random
import warnings
## convert cos functions
def xcycwh2xywh(bboxc): # where x y is top left corner acc. to opencv cos
bbox = bboxc.copy()
if bbox.ndim == 1:
bbox[0] = bbox[0] -... | xQsM3/product_pricelabel_detector | cv_utils.py | cv_utils.py | py | 16,065 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "skimage.metrics.structural_similarity",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "numpy.flip",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "numpy.mean",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "numpy.arr... |
6793471742 | import torch
def ade(predict_trace, future_trace):
return (torch.sum(torch.square(predict_trace - future_trace)) / predict_trace.shape[0])
def fde(predict_trace, future_trace):
return torch.sum(torch.square(predict_trace[-1,:] - future_trace[-1,:]))
def perturbation_cost(perturbation):
return torch.sum... | zqzqz/AdvTrajectoryPrediction | prediction/attack/loss.py | loss.py | py | 5,117 | python | en | code | 75 | github-code | 21 | [
{
"api_name": "torch.sum",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "torch.square",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "torch.sum",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "torch.square",
"line_number": 8,
... |
74097098934 | # import Flask and jsonify
from flask import Flask, jsonify, request
# import Resource, Api and reqparser
from flask_restful import Resource, Api, reqparse
import pandas as pd
import numpy as np
import pickle
#standard flask init
app = Flask(__name__)
api = Api(app)
#our model needs access to our custom functions
fro... | fynnweaver/Loan_Classification_Pipeline | loan_flask.py | loan_flask.py | py | 2,420 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Flask",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask_restful.Api",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "flask_restful.Resource",
... |
27860462205 | #########################
# Class: voters
# Creates utilities, defines functions to analyze
#########################
import random as rand
import numpy as np
import math
from itertools import combinations
class Voters:
def __init__(self, n, m, util_method, util_import = [], utils = [-2,-1,1,2], util_probs = [0.2... | MattJonesMath/MultiIssueBundles | voters_class.py | voters_class.py | py | 24,710 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "random.choices",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "random.random",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "random.random",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "random.random",
"line_... |
25291326508 | import re
import csv
from html import unescape
import requests
from lxml import html
def get_page_content(url):
response = requests.get(url)
return response.text
class Scraper(object):
"""
regex_fields will take following items -
fields_name: '<regex pattern>'
"""
regex_fields = {}... | dearopen/django-easy-scraper | django_easy_scraper/scraper.py | scraper.py | py | 1,801 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "requests.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "lxml.html.fromstring",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "lxml.html",
"line_nu... |
15934427821 | import hashlib
import os
from textwrap import dedent
from ..cache import BaseCache
from ..controller import CacheController
try:
FileNotFoundError
except NameError:
FileNotFoundError = (IOError, OSError)
def _secure_open_write(filename, fmode):
flags = os.O_WRONLY
flags |= os.O_CREAT | os.O_EXCL
if ... | Mockingbird01001/NLG-code-generator-LSTM | work/data/data_model/batch_1/388.py.transformed.py.transformed.py | 388.py.transformed.py.transformed.py | py | 2,637 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.O_WRONLY",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.O_CREAT",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "os.O_EXCL",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "os.O_NOFOLLOW",
"... |
23650604131 | import torch
from torchvision import transforms
from .models.crnn import CRNN, LabelTransformer
from .loader.load_eval import FixHeightResize, DataLoader
def correct(img) -> bool:
letters = '1234567890-=+.×÷'
labeltransformer = LabelTransformer(letters)
# 图片缩放 + 转化为灰度图 + 转化为张量
transform = ... | fioepq9/simple-expression-corrector | server/trainer/__init__.py | __init__.py | py | 1,647 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "models.crnn.LabelTransformer",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "loader.load_eval.FixHeightResize",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torchvision.transforms.Grayscale",
"line_number": 13,
"usage_type": "call"
... |
15933989351 | from __future__ import absolute_import
import errno
import logging
import socket
import sys
import warnings
from socket import error as SocketError
from socket import timeout as SocketTimeout
from .connection import (
BaseSSLError,
BrokenPipeError,
DummyConnection,
HTTPConnection,
HTTPException,
... | Mockingbird01001/NLG-code-generator-LSTM | work/data/data_model/batch_1/202.py.transformed.py.transformed.py | 202.py.transformed.py.transformed.py | py | 19,616 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "packages.six.moves",
"line_number": 49,
"usage_type": "attribute"
},
{
"api_name": "packages.six",
"line_number": 49,
"usage_type": "name"
},
{
"api_name": "logging.getLogger",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "util.queue.Lif... |
19437959140 | import math
import os
import matplotlib
import matplotlib.pyplot as plt
from models.encoder import Encoder
from models.stylegan2.model import Generator
matplotlib.use('Agg')
from models.latent_codes_pool import LatentCodesPool
from models.discriminator import LatentCodesDiscriminator
import torch
from torch import nn... | caopulan/GANInverter | training/encoder_trainer.py | encoder_trainer.py | py | 25,442 | python | en | code | 55 | github-code | 21 | [
{
"api_name": "matplotlib.use",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "criteria.id_loss",
"line_number": 39,
"usage_type": "name"
},
{
"api_name": "criteria.moco_loss",
"line_number": 41,
"usage_type": "name"
},
{
"api_name": "math.log",
"lin... |
22268648918 | import inspect
import logging
import os
from abc import ABC
from pathlib import Path
from typing import Any, List, Optional
import pytest
from playwright.sync_api import ConsoleMessage, Page, Request, Response
logger = logging.getLogger(__name__)
def _function_has_argument(function: Any, argument: str) -> bool:
... | NotLan/PokemonBattle | PokemonTrainingBattle/plugins/playwright.py | playwright.py | py | 4,086 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "typing.Any",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "inspect.signature",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "abc.ABC",
"line_nu... |
35370264411 | """Module for training model to learn from noisy labels"""
import argparse
import os
import datetime
import torch
import torch.utils.data as torchdata
import torchvision.transforms as transforms
import torch.utils.tensorboard as tb
import datasets
import utils
import networks_noisy
import models_noisy
OUT_DIR = "../... | aivaslab/toybox_da | src/dual_learning_trial_2.py | dual_learning_trial_2.py | py | 10,861 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.makedirs",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 65,
"usage_type": "call"
},
{
"api_name": "datetime.da... |
26590679983 | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from scipy import stats
from scipy.stats import ttest_1samp
from tensorflow.keras import backend as K
from utils.predict import get_rank_predictions
def chi_goodness_of_fit_test(data, col_data, col_name, significance_leve... | henryhyunwookim/Voice-Cloning-and-Fake-Audio-Detection | utils/statistics.py | statistics.py | py | 7,930 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "scipy.stats.chisquare",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "scipy.stats",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "pandas.concat",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
... |
2588649262 | from io import BytesIO
import base64
import os
from PIL import Image, ImageDraw
from sgfmill import sgf, boards
# **** NOTE This is unused code, but here just in case for testing or if something horrible happened, I don't think this code actually
# Works right now because I deleted the /backend/uploads folder, which i... | ScriabinOp8No12/Go-puzzles-website | thumbnail_python_scripts/sgf2img_with_file_input.py | sgf2img_with_file_input.py | py | 9,207 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "sgfmill.boards.Board",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "sgfmill.boards",
"line_number": 38,
"usage_type": "name"
},
{
"api_name": "os.path.dirname",
"line_number": 92,
"usage_type": "call"
},
{
"api_name": "os.path",
"li... |
2907279684 | from types import new_class
from pandas.core.indexing import IndexingError
import torch
import numpy as np
import pandas as pd
import argparse
import utils
import metrics
import time
import os
import jsonlines
from utils import str2bool, Report
from transformers import AutoModelForSeq2SeqLM, AutoModelWithLMHead, AutoMo... | peterbhase/SLAG-Belief-Updating | graph_utils.py | graph_utils.py | py | 16,888 | python | en | code | 25 | github-code | 21 | [
{
"api_name": "utils.select_point_from_kwargs",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "metrics.compute_acc_sum",
"line_number": 71,
"usage_type": "call"
},
{
"api_name": "metrics.compute_acc_sum",
"line_number": 73,
"usage_type": "call"
},
{
"ap... |
74173865332 | from django.urls import path
from .views import webcam_view
from . import views
app_name = 'imageupload'
urlpatterns = [
#path('', views.ImageUploadView.as_view(), name='upload'),
path('upload/', views.image_upload, name='upload'),
path('index', views.index, name='index'),
path('registro/', views.regi... | dahermar/TMI_Project | mysite/imageupload/urls.py | urls.py | py | 873 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "views.image_upload",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "django.urls.path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "views.index",... |
17475475193 | # -*- coding: utf-8 -*-
"""
Desc:
Created on 13.01.23 16:01
@author: malle
"""
import numpy as np
import matplotlib.pyplot as plt
from pathlib import Path
import xarray as xr
import cartopy.crs as ccrs
import cartopy.feature as cf
import matplotlib
from mpl_toolkits.axes_grid1.inset_locator import inset_axes
import pl... | johanna-malle/CLM5_CH | clm5_analysis/figures/fig_5_spatial_evapo.py | fig_5_spatial_evapo.py | py | 8,470 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "matplotlib.rcParams",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.rcParams",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "platform.system",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "pat... |
20887503295 | from collections import deque
direction = [(-1, 0), (1, 0), (0, -1), (0, 1)]
test_case = int(input())
def bfs(array, a, b):
queue = deque()
queue.append((a,b))
array[a][b] = 0
while queue:
x, y = queue.popleft()
for dx, dy in direction:
nx = x + dx
ny = y + dy
... | kimgahyeon/algorithm | 백준/1012.py | 1012.py | py | 1,414 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "collections.deque",
"line_number": 6,
"usage_type": "call"
}
] |
17952511548 | import subprocess
import os
import os.path
import itertools
import math
import bllipparser
tagger_jar = "/home/dfried/lib/stanford-postagger-full-2017-06-09/stanford-postagger.jar"
def replace_tags_and_words(tree_string, replacement_tag_seq, replacement_word_seq=None):
tree = bllipparser.Tree("(S1 " + tree_string... | dpfried/parse-analysis | scripts/predict_tags.py | predict_tags.py | py | 11,790 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "bllipparser.Tree",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "subprocess.call",
"line_number": 80,
"usage_type": "call"
},
{
"api_name": "subprocess.STDOUT",
"line_number": 80,
"usage_type": "attribute"
},
{
"api_name": "subprocess.ca... |
38792982660 | # loading packages
import pandas as pd
import streamlit as st
from transformers import T5ForConditionalGeneration,T5Tokenizer
import transformers
import nltk
#nltk.download('punkt')
from nltk import sent_tokenize
import pandas as pd
import numpy as np
########### imp code snippet ##################
@st.cache(max_entr... | statisticalplumber/fun_nlp | app.py | app.py | py | 4,573 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "streamlit.cache",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "streamlit.cache",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "streamlit.cache",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "nltk.sent_tokenize",
... |
37531187050 | import sqlite3 as sql
import pandas as pd
sales = pd.read_csv('../raw_data/sales_train.csv')
sales = sales[sales['item_cnt_day'] != -1]
sales['date'] = pd.to_datetime(sales['date'], dayfirst=True)
sales['year'] = sales['date'].dt.year
sales['month'] = sales['date'].dt.month
sales['date_year_month'] = sales['date'].dt.... | ennioferreirab/dash_predict_demand_stock | database/transform.py | transform.py | py | 541 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "pandas.to_datetime",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect",
"line_number": 17,
"usage_type": "call"
}
] |
6772968476 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Train the model.
Created on Fri Sep 20 21:26:44 2019
@author: Juan Beleño
"""
from .config import MeliClassifierConfig
from .data_generator import DataGenerator
from .dataset import load_category_map
from .files import MeliClassifierFiles
from .model import meli_model... | juanbeleno/meli-category-classifier | meli_category_classifier/train.py | train.py | py | 1,992 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "typing.Union",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "config.MeliClassifierConfig",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "config.MeliClassifierConfig.from_yaml",
"line_number": 26,
"usage_type": "call"
},
{
"ap... |
11607737667 | import os
import json
import argparse
import cv2
import torch
import dataloaders
import models
from pathlib import Path
from tqdm import tqdm
import matplotlib.pylab as plt
import numpy as np
from torchvision.utils import make_grid
from torchvision import transforms
from models.cenet_origin import CE_Net_
from utils im... | WeizhenLiuBioinform/Pork_Marbling_Segmentation | predict.py | predict.py | py | 6,310 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "torch.cuda.Event",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "numpy.zeros",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "numpy.spacing",
"lin... |
30348669160 | #!/usr/bin/env python2
from pty import slave_open
import rospy
from bebopbase import Bebopbase
from std_msgs.msg import Int64
from std_msgs.msg import Float32
from nav_msgs.msg import Odometry
from std_msgs.msg import Bool
from mpl_toolkits.mplot3d.axes3d import get_test_data
import matplotlib.pyplot as plt
import nu... | SkyRats/IMAV2022Indoor | scripts/status.py | status.py | py | 8,829 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "rospy.Subscriber",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "std_msgs.msg.Int64",
"line_number": 34,
"usage_type": "argument"
},
{
"api_name": "rospy.Subscriber",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "std_msgs.msg... |
43993761329 | import argparse
import json
import os
import glob
import datetime
import pprint
import shutil
import gpxpy
def find_start(gpx):
for track in gpx.tracks:
for segment in track.segments:
points = segment.points
if len(points) > 0:
return points[0]
raise RuntimeErr... | martin-ueding/gpx-tools | src/gpx_record_analysis/duplicates.py | duplicates.py | py | 2,034 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.isfile",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 34,
"usage_type": "attribute"
},
{
"api_name": "json.load",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "os.walk",
"line_number": 40... |
39048632197 | # Fine-tune a pretrained ResNet50 model for image classification
#
#
# Usage:
# python ml_script.py --data_dir /home/user/data --model_dir /home/user/model
# Imports
import os
import sys
import argparse
import numpy as np
import matplotlib.pyplot as plt
import torch
import torch.nn as nn
import torch.n... | tmabraham/github-copilot-test | ml_script.py | ml_script.py | py | 4,640 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 42,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.Module",
"line_number": 45,
"usage_type": "attribute"
},
{
"api_name": "torch.nn... |
73412273333 | import csv
import datetime
import time
import pymysql
def quantity_process(quantity):
"""处理quantity数据"""
ans = []
for data in quantity:
if data == " ":
continue
else:
ans.append(data)
# print("quantity_length is: {}".format(len(ans)))
return ans
def from_t... | Alexshaneeee/Etherscan_data_crawler | pipelines.py | pipelines.py | py | 4,312 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "time.strptime",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "time.mktime",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 63,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
... |
18926845777 |
"""
Module defining the core elements of breathpy
"""
__author__ = 'philmaweb, aaron_ruben'
from abc import ABCMeta, abstractmethod
import warnings
import functools
import multiprocessing
import subprocess
from collections import OrderedDict, defaultdict
import decimal
import glob
from functools import wraps
from pat... | philmaweb/breathpy | breathpy/model/BreathCore.py | BreathCore.py | py | 295,491 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "ProcessingMethods.PeakAlignmentMethod.PROBE_CLUSTERING",
"line_number": 81,
"usage_type": "attribute"
},
{
"api_name": "ProcessingMethods.PeakAlignmentMethod",
"line_number": 81,
"usage_type": "name"
},
{
"api_name": "functools.wraps",
"line_number": 97,
"u... |
43087239481 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Jan 9 00:12:29 2021
@author: aycaburcu
"""
from keras import layers
from keras import models
from keras import optimizers
import json
from keras.preprocessing.image import ImageDataGenerator
from keras import optimizers
import os
import matplotlib.pyp... | aycabingul/VGG16-PretrainedModel | src/VGG16-cats-and-dogs.py | VGG16-cats-and-dogs.py | py | 3,380 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.join",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 2... |
17907085524 | # import sys
# sys.stdin = open('input.txt', 'r')
# sys.stdout = open('output.txt', 'w')
from collections import defaultdict
def h():
return 0
t = int(input())
for _ in range(t):
s = list(input())
d = defaultdict(h)
for i in range(len(s)):
d[s[i]] += 1
i = 0
while 1:
if i =... | rifatblack/CodeForce | B. Prefix Removals.py | B. Prefix Removals.py | py | 520 | python | en | code | 13 | github-code | 21 | [
{
"api_name": "collections.defaultdict",
"line_number": 16,
"usage_type": "call"
}
] |
29603867434 | import MySQLdb
from datetime import datetime
import calendar
def getConnection():
return MySQLdb.connect(host="example.com", # your host, usually localhost
user="user", # your username
passwd="password", # your password
db="database") # name of ... | stephegn/rss | db.py | db.py | py | 1,581 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "MySQLdb.connect",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.utcnow",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "calendar.ti... |
29316443535 | # You are given an array A of non-negative numbers and a target sum S.
# Write an efficient function that finds one continuous sub-sequence of elements which sum up to precisely S.
# The return value should be a pair of array indices or null.
# Examples:
# A = [ 1, 2, 3 ], S = 5. Result = [ 1, 2 ] => brute-force O(n^2... | yyunikov/coding-python | src/problems/subarray_sum_indexes.py | subarray_sum_indexes.py | py | 1,717 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "typing.List",
"line_number": 26,
"usage_type": "name"
}
] |
11631130083 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Nov 20 21:15:01 2020
@author: efgar1
"""
import random
import itertools
import numpy as np
#create deck
deck = ["2 of Hearts", "2 of Spades", "2 of Diamonds", "2 of Clubs",
"3 of Hearts", "3 of Spades", "3 of Diamonds", "3 of Clubs",
... | efgarcia97/Monte-Carlo-Sims | BlackJack.py | BlackJack.py | py | 8,914 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "itertools.combinations",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "random.shuffle",
"line_number": 111,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 129,
"usage_type": "call"
}
] |
1545609922 | from flask import render_template, abort, request, send_file
from flask_login import current_user, login_required
from pressclub import app
from pressclub.custom_functions import *
from pressclub.models import Events
@app.route('/reports', methods=['GET', 'POST'])
def reports():
events = Events.objects.order_by(... | saipraveenkondapalli/Student-Club-Portal | pressclub/report_views.py | report_views.py | py | 3,056 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pressclub.models.Events.objects.order_by",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pressclub.models.Events.objects",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "pressclub.models.Events",
"line_number": 11,
"usage_type": ... |
11613408274 | import argparse
import asyncio
import requests
import subprocess
import time
import re
from pathlib import Path
from typing import Dict, List
async def main():
args = getArgs()
userFiles = setupFiles(args)
isSuccessful = backupFiles(args, userFiles)
if isSuccessful:
userInput: str = input(
... | DirectlyMe/command_line_tools | backup_company.py | backup_company.py | py | 4,114 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "time.asctime",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "time.localtime",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number... |
2970892882 | import socket
import subprocess
import shlex
import datetime
import time
# Bağlanılacak adres ve port
host = "192.168.1.109"
port = 142
def tarih_olustur(tarih):
f = open("tarih.txt","w")
f.write("date -s '")
f.write(tarih)
f.write("'")
f.close()
degis=open("tarih.txt")
subprocess.call(sh... | nyucel/blm304 | final/170401069/client.py | client.py | py | 1,574 | python | tr | code | 8 | github-code | 21 | [
{
"api_name": "subprocess.call",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "shlex.split",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "subprocess.call",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "shlex.split",
"line_n... |
29790938101 | from django.shortcuts import render, redirect
from django.core.mail import send_mail, BadHeaderError
from django.http import HttpResponse
# Create your views here.
def contact_info(request):
if request.method == 'POST':
mess_age = request.POST['mess_age']
name = request.POST['name']
email = ... | MdRoniAhamed/Furniture-Bazar | contact/views.py | views.py | py | 927 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.core.mail.send_mail",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 26,
"usage_type": "call"
}
] |
12713701583 | # -*- coding: utf-8 -*-
"""
Global enums defined here.
"""
from django.utils.translation import ugettext_lazy as _
def to_choices(d):
return map(lambda x: (x[1], x[0]), d.items())
STORE_STATUS_BASE = (
('new', 0, _(u'Stopped')),
('disabled', 5, _(u'Disabled')),
('stopped', 10, _(u'Stopped')),
('running', 15... | LinkedInAttic/sin | app/utils/enum.py | enum.py | py | 745 | python | en | code | 24 | github-code | 21 | [
{
"api_name": "django.utils.translation.ugettext_lazy",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.utils.translation.ugettext_lazy",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "django.utils.translation.ugettext_lazy",
"line_number": 13,
... |
17583142446 | import pandas as pd
import numpy as np
import streamlit as st
import matplotlib.pyplot as plt
import folium
from streamlit_folium import st_folium
import plotly.express as px
import seaborn as sns
from folium import plugins
def intro():
st.title('Análisis de los alojamientos turísticos en Madrid')
st.su... | axel8verde/EDA-Alojamientos-turisticos | functions.py | functions.py | py | 15,892 | python | es | code | 0 | github-code | 21 | [
{
"api_name": "streamlit.title",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "streamlit.subheader",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "streamlit.expander",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "streamlit.writ... |
23858508943 | from enum import Enum
import torch
from torch.utils.data import Dataset
import chess
import chess.engine
from chess.engine import Cp
import helperfuncs
import bitboards
import net
import autoencoder
import alphabeta
import mctsAZ
import mcts_custom
engine = chess.engine.SimpleEngine.popen_uci("/bin/stockfish")
SearchT... | MateuszPuto/chessengine | dset.py | dset.py | py | 6,426 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "chess.engine.SimpleEngine.popen_uci",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "chess.engine",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "enum.Enum",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "enum.... |
15948198016 | import statistics
def display_main_menu():
print("Enter some numbers separated by commas(e.g. 5, 67, 32)")
def get_user_input():
print('Enter values:')
x = input()
y = x.split(", ")
temp = []
for item in y:
temp.append(float(item))
return temp
def calc_average_temperature(y):
... | BryanKongSY/Lab2 | Lab2.py | Lab2.py | py | 756 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "statistics.median",
"line_number": 28,
"usage_type": "call"
}
] |
73556820533 | # https://python-binance.readthedocs.io/en/latest/overview.html?highlight=async%20client#async-api-calls
from decimal import Decimal
import asyncio
import datetime
import aiosqlite
import json
from model.statistix import Statistix
from binance.exceptions import BinanceAPIException
from basic_tools import (CONFIGURAT... | DavJ/binance-trading | src/my_bot/model/asset.py | asset.py | py | 7,824 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "basic_tools.CONFIGURATION.MAIN_CURRENCY",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "basic_tools.CONFIGURATION",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "decimal.Decimal",
"line_number": 21,
"usage_type": "call"
},
{... |
18101577904 | import argparse
import logging
import os
import time
from datetime import datetime
from pathlib import Path
import pandas as pd
from pandas.errors import EmptyDataError
from converter.exception.ReadDataException import ReadDataException
from converter.exception.UnsupportedFormat import UnsupportedFormatException, Dir... | ngnnath/data-prepare | converter/csvtoparquet.py | csvtoparquet.py | py | 7,307 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "converter.exception.UnsupportedFormat.UnsupportedFormatException",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "os.path.isdir",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 36,
"usage_type": "attribute"
}... |
35394735172 | """Pins the replied message
Syntax: .cpin [LOUD]"""
from telethon.tl import functions
from telebot import CMD_HELP
from telebot.utils import admin_cmd
@telebot.on(admin_cmd(pattern="cpin ?(.*)"))
@telebot.on(sudo_cmd(pattern="cpin ?(.*)", allow_sudo=True))
async def _(event):
if event.fwd_from:
return
... | xditya/TeleBot | telebot/plugins/pin_message.py | pin_message.py | py | 1,001 | python | en | code | 197 | github-code | 21 | [
{
"api_name": "telethon.tl.functions.messages.UpdatePinnedMessageRequest",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "telethon.tl.functions.messages",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "telethon.tl.functions",
"line_number": 22,
... |
10425568754 | # ---------------------------------------Interface part-------------------------------------------
import gradio as gr
def lab_to_rgb(L, ab):
L = (L + 1.) * 50.
ab = ab * 110.
Lab = torch.cat([L, ab], dim=1).permute(0, 2, 3, 1).cpu().numpy()
rgb_imgs = []
for img in Lab:
img_rgb = lab2... | CO18321/DMA-Project | interface.py | interface.py | py | 1,147 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "gradio.inputs.Image",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "gradio.inputs",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "gradio.outputs.Image",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "gradio.ou... |
74095098932 | '''
@note: York-Maastricht Project (YMP)
@organization: University of York, University of Maastricht
@author: Alfa Yohannis
'''
import inspect
import os.path
import json
import numbers
import tensorflow.compat.v1 as tf
import matplotlib
import matplotlib.pyplot as plot
import pandas as pd
import numpy as n... | York-and-Maastricht-Data-Science-Group/fairml | generator/org.eclipse.epsilon.fairml.generator/generator/fairml.py | fairml.py | py | 37,486 | python | en | code | 4 | github-code | 21 | [
{
"api_name": "numpy.random.seed",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "IPython.get_ipython",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "IPython.displ... |
43454833278 | from __future__ import annotations
import uuid
from enum import Enum, Flag
from typing import (Callable, Dict, Iterable, Iterator, List, Optional, Set,
Tuple, Union)
from stexls import vscode
from stexls.stex.exceptions import (CompilerError, DuplicateSymbolDefinedError,
... | slatex/stexls | stexls/stex/symbols.py | symbols.py | py | 23,095 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "typing.Tuple",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "enum.Flag",
"line_number": 77,
"usage_type": "name"
},
{
"api_name": "enum.Enum",
"line_number": 83,
"usage_type": "name"
},
{
"api_name": "enum.Enum",
"line_number": 89,
... |
10116199918 | from scipy.optimize import curve_fit
import numpy as np
def curvefit(function, datax, datay, returnCov=False, **kwargs):
"""Curve fitting
This function is almost exactly as `scipy.optimize.curve_fit`,
except that it estimates the error of the fitting parameters.
Parameters:
-----------
... | fengwangPhysics/pubplot | curvefit.py | curvefit.py | py | 1,536 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "scipy.optimize.curve_fit",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "numpy.sqrt",
"line_number": 38,
"usage_type": "call"
}
] |
1001925783 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import contextlib
import copy
import threading
import numpy as np
_portpicker_import_error = None
try:
import portpicker # pylint: disable=g-import-not-at-top
except ImportError as _error: # pylint: disabl... | kendryte/kendryte-tensorflow | tensorflow/contrib/distribute/python/multi_worker_test_base.py | multi_worker_test_base.py | py | 9,864 | python | en | code | 58 | github-code | 21 | [
{
"api_name": "threading.Lock",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "portpicker.pick_unused_port",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "tensorflow.python.platform.tf_logging.info",
"line_number": 41,
"usage_type": "call"
},
{
... |
37808552958 | import torch
from torch import nn
from torch.nn import functional as F
class ConvBlock(nn.Module):
def __init__(self, cin, cout):
super().__init__()
self.conv1 = nn.Conv2d(cin, cout, (3, 3), padding=1, stride=2)
self.conv2 = nn.Conv2d(cout, cout, (3, 3), padding=1)
self.bn1 = nn.Ba... | amoshyc/cvlab-2019w-project | exp2/model.py | model.py | py | 2,068 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "torch.nn.Module",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "torch.nn.Conv2d",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_numbe... |
27944624320 | #!/usr/bin/env python3
import sys
from functools import reduce
from itertools import permutations
class Mountain:
def __init__(self, lines):
self.lines = [line.strip() for line in lines]
self._height = len(lines)
self._width = len(self.lines[0])
self.x = 0
self.y = 0
... | janosgyerik/advent-of-code | 2020/day03/part1.py | part1.py | py | 1,230 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sys.stdin.readlines",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "sys.stdin",
"line_number": 49,
"usage_type": "attribute"
},
{
"api_name": "functools.reduce",
"line_number": 59,
"usage_type": "call"
}
] |
34901402619 | from time import sleep
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import os
from selenium.webdriver.chrome.options import Options
chrome_bin = os.environ.get('GOOGLE_... | andrew3009/Webscraper | selenium_scraper.py | selenium_scraper.py | py | 2,750 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.environ.get",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "selenium.webdriver.ChromeOptions",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "seleniu... |
6160245658 | from django.conf.urls import url
from . import views
urlpatterns = [
# url(r'^$', 'index'),
url(r'^$', views.ResourcesetListView.as_view(), name='resourceset_list'),
url(r'^list/$', views.index_list),
url(r'^biblio/(?P<short_name>\S+)/$', views.biblio, name='resourceset_biblio'),
url(r'^ideas/(?P<s... | DigitalGizmo/mse21 | mse/resources/urls.py | urls.py | py | 458 | 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": 8,
"usage_type": "call"
},
{
"api_name": "django.co... |
13070723844 | import requests
import re
import asyncio
import timeit
from sys import stdin
from time import sleep
from lxml import html
from collections import defaultdict
INVALID_PLAYER_NAME = "Invalid Tag"
INVALID_CLUB = "Invalid"
NOT_FOUND_PLAYER_NAME = "Unknown Player"
NOT_FOUND_CLUB = "Unknown"
def _is_valid_gametag(gametag)... | lorycontixd/qlashbot | offline_scripts/brawlstats-counter/count-participants.py | count-participants.py | py | 3,339 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "re.search",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "lxml.html.fromstring",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "lxml.html",
"line_number": 57,
"usage_type": "name"
},
{
"api_name": "collections.defaultdict",
... |
32137145346 | from django.test import TestCase, Client
from django.urls import reverse
from main.models import Comment,Product,Person,Seller,Customer,mail_verification
import json
from django.contrib.auth.models import User,auth
class TestMainViews (TestCase):
def setUp(self):
self.client=Client()
self.url_home... | AntwanEmil/ta3refa | main/test/test_integration.py | test_integration.py | py | 3,489 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.test.TestCase",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.test.Client",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.urls.reverse",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.url... |
73366180212 | import os
import torch.utils.data
from torch.autograd import Variable
from torch.utils.data import DataLoader
from config import *
import utils.imgs as img_utils
class MixDataLoader():
"""
Combines batches from two data loaders.
Useful for pseudolabeling.
"""
def __init__(self, dl1, dl2):
... | bfortuner/VOCdetect | datasets/data_loaders.py | data_loaders.py | py | 2,374 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "torch.utils.data.cat",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "torch.utils.data",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "torch.utils.data.DataLoader",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "tor... |
74394771574 | #!/usr/bin/arch -i386 python2.7
#
# Author: Kevin Klues <klueska@cs.berkeley.edu>
import os
import re
import glob
import json
import matplotlib
import matplotlib as mpl
matplotlib.use('Agg')
from pylab import *
from collections import OrderedDict
import numpy as np
import pprint
import matplotlib.ticker as ticker
cla... | klueska/parlib-benchmarks | nas-npb/python/nas_graphs.py | nas_graphs.py | py | 11,039 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "matplotlib.use",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.path.basename",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number"... |
21302817955 | from random_word import RandomWords
r = RandomWords()
def x1():
x1.var="steam"
x1()
#cosi stampa le parole cercate che hanno generato anagrammi
#METTE IN UN DIZIONARIO LE PAROLE CHE GENERANO ANAGRAMMI ASSOCIATE AGLI ANAGRAMMI CHE HANNO GENERATO(sembra che il dizioanrio giä per definiziione rimuova i duplicati)
listap... | paolocassina2/file_python2 | file_python/game/giochi/anagramma29.py | anagramma29.py | py | 11,475 | python | it | code | 0 | github-code | 21 | [
{
"api_name": "random_word.RandomWords",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "enchant.Dict",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "itertools.permutations",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "enchant.Di... |
33896499323 | import datetime
from typing import Any, Dict, List, Type, TypeVar
import attr
from dateutil.parser import isoparse
from ..models.content_badge import ContentBadge
from ..models.content_status import ContentStatus
T = TypeVar("T", bound="ContentMetadata")
@attr.s(auto_attribs=True)
class ContentMetadata:
r"""Th... | milyord/sp-api | sp/aplus_content_2020_11_01/models/content_metadata.py | content_metadata.py | py | 3,225 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "typing.TypeVar",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "models.content_status.ContentStatus",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "models... |
10844727244 | from collections import deque
import sys
input = sys.stdin.readline
n, m = map(int, input().rstrip().split())
data = [[[i, 0, -1] for i in map(int, input().rstrip().split())] for _ in range(n)]
dxy = ((0, 1), (0, -1), (1, 0), (-1, 0))
def bfs(x, y, visited_code, code):
q = deque()
q.append((x, y))
data[x][... | K1A2/algorithm_python | baekjoon/bfs_dfs/2573_빙산.py | 2573_빙산.py | py | 1,532 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sys.stdin",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "collections.deque",
"line_number": 9,
"usage_type": "call"
}
] |
13178442295 |
import torch
from torch import nn
from d2l import torch as d2l
# 哈德玛积:矩阵对应位置元素相乘,又称基本积,符号是一个圆圈里面一个点
# 批标准化,batchnormalize,对一个小批量里面的样本做归一化使其均值0,方差为1,
# 在算方差的时候一般会在后面加个eps很小的一个正数,来保证标准差始终大于0,这样归一化不会出现除以0的情况
# 训练模式下的batchnormalization和预测模式下是有一些区别的,训练的时候使用实际算出来的均值和标准差
# 预测的时候常用的一种方法是:通过移动平均估算整个训练数据集的样本均值和⽅差,并在预测时使⽤它们得到确... | Rogerlv51/DeepLearning_Repo | BatchNorm_LeNet.py | BatchNorm_LeNet.py | py | 5,141 | python | zh | code | 1 | github-code | 21 | [
{
"api_name": "torch.is_grad_enabled",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "torch.sqrt",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "torch.sqrt",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "torch.nn.Module",
"li... |
7832753071 | import sys
try:
import pyautogui
except ModuleNotFoundError:
print('Unable to start, Pls install pyautogui module, then restart')
input('press enter to exit')
sys.exit()
number = pyautogui.prompt(text='Enter your mesage to send',
title='Enter your message', default='')
if not ... | the-vv/zoom-auto-attendance-python | attandance.py | attandance.py | py | 2,024 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sys.exit",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pyautogui.prompt",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pyautogui.confirm",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sys.exit",
"line_number... |
11564442116 | from datetime import datetime
import requests
from adapt.intent import IntentBuilder
from lingua_franca.format import nice_date, nice_date_time, nice_time
from mycroft import MycroftSkill, intent_handler
class HelloWorldSkill(MycroftSkill):
def __init__(self):
super().__init__()
self.learning = T... | JTson8/bus-mycroft-skill | __init__.py | __init__.py | py | 2,715 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "mycroft.MycroftSkill",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "mycroft.intent_handler",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "adapt.intent.IntentBuilder",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": ... |
7666263763 | import requests
def get_city_code(city_name, token):
"""
The city name function returns its ID from Boxberry API
@param city_name - The name of the city with a capital letter
@param token - token for access to Boxberry API
@return code of the selected city from the Boxberry system
"... | KupeRr/API_Yandex_Market | boxberry/loader.py | loader.py | py | 1,381 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "requests.request",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "requests.request",
"line_number": 44,
"usage_type": "call"
}
] |
45962448764 | from pyscf.lo import PM
from pyscf.lib import logger
import numpy
import scipy
import time
import common
def get_lmp2_residuals(mp2_t2, oovv, fock_occ, fock_virt, ovlp, sparsity_desc, kind="ft-first"):
"""
Calculates LMP2 residuals.
Args:
mp2_t2 (dict): sparse LMP2 amplitudes;
oovv (dic... | pulkin/local-pyscf | lmp2.py | lmp2.py | py | 18,612 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "numpy.einsum",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "numpy.einsum",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "numpy.einsum",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number... |
4049192750 | # Create your models here.
from auditlog.registry import auditlog
from django.db import models
from django_fsm import FSMField
from django_fsm import transition
IMPACT_AREA = [
("Global", "Global"),
("National", "National"),
("State", "State"),
("Columbus", "Columbus"),
("Cleveland", "Cleveland"),
... | rzwink/ohioready-api | api/models/event.py | event.py | py | 2,381 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "django.db.models.Model",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "django.db.models.TextField",
"line_number": 28,
"usage_type": "call"
},
{
"api_name"... |
10083941529 | '''
修改自model_3dUNet_v2.py:
基于nnunet的改进3d unet
XueZhimeng, 2020.7
新增深度监督
XueZhimeng, 2021.6
'''
from copy import deepcopy
from torch import nn
import torch
import numpy as np
import torch.nn.functional
from copy import deepcopy
from torch import nn
import torch
import numpy as np
import torch.nn.fun... | JiangShanGuangHeSi/LiverVesselSegmentationNetwork | model_3dUNet_v2ds.py | model_3dUNet_v2ds.py | py | 6,538 | python | en | code | 14 | github-code | 21 | [
{
"api_name": "torch.nn.Conv3d",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "torch.nn.Conv2d",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.ConvTrans... |
35733129272 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
###########
# ANN
###########
import matplotlib
#matplotlib.use('Agg') # Don't display plots in console
import matplotlib.pyplot as plt
import numpy as np
from DataHandler import DataHandler
from keras.models import Sequential, load_model
from keras.layers import Dense... | lytcherino/deep-learning-testing-framework | Code/NNTestingFramework.py | NNTestingFramework.py | py | 39,702 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numpy.random.seed",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "collections.defaultdict",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "collectio... |
15992445917 | import sys
from pathlib import Path
import argparse
from typing import Tuple, List, Any, Dict
import nbformat as nbf
import questionary
from rich.console import Console
src_dir = Path(__file__).parent
sys.path.insert(0, str(src_dir))
sys.path.insert(0, str(src_dir / "nbpreview"))
from nbpreview.notebook import Noteb... | pgbarletta/workshopper | workshopper/cli.py | cli.py | py | 3,657 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pathlib.Path",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sys.path.insert",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "sys.path.insert",
"lin... |
22888276961 | """
Inspect the parsing of a sql file containing two bare st.
../docs/snippets/script/a-few-st.py
"""
# Setup -----------------------------------------------------------------------
from pathlib import Path
paths = {p.name: p for p in Path.cwd().glob('**/*.sql')}
path = paths['a-few-st.sql']
import snowmobi... | gem7318/snowmobile | docs/snippets/script/a-few-statements.py | a-few-statements.py | py | 632 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "pathlib.Path.cwd",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "snowmobile.connect",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "snowmobile.Script",
... |
11741573417 | import re
from collections import defaultdict
from app_names import ScenarioNames, DEFAULT_RANGES
from profile_range import ProfileRange
from calculator_service import CalculatorService
from company_anonymization import CompanyAnonymization
from metric_report_repository import MetricReportRepository
from base_metrics_... | kpinetwork/backend | src/service/by_metric_report/by_metric_report.py | by_metric_report.py | py | 17,279 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "calculator_service.CalculatorService",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "metric_report_repository.MetricReportRepository",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "profile_range.ProfileRange",
"line_number": 19,
"usa... |
35371176325 | import random
import string
import time
import urllib, sys
import ssl
import json
import base64
import os
from threading import Timer
from flask import Flask, jsonify, request
from flask_cors import CORS
from old_api.db import Database, generate_password
from werkzeug.utils import secure_filename
app = Flask(__name__)... | guateam/LabGuide | old_api/api.py | api.py | py | 31,034 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "flask.Flask",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "flask_cors.CORS",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "flask.jsonify",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "random.sample",
"line_n... |
35986540630 | from flask import Flask, render_template, redirect, url_for
from flask_pymongo import PyMongo
import scrape_mars
app = Flask(__name__)
# use flask pymongo to set up connection to db
app.config["MONGO_URI"] = "mongodb://localhost:27017/mars_data_db"
mongo = PyMongo(app)
@app.route("/")
def index():
#access info fr... | aowinfrey1/web-scraping-challenge | app.py | app.py | py | 859 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Flask",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "flask_pymongo.PyMongo",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "scrape_mars.scr... |
32740773277 | import csv
import numpy as np
from hyperopt import fmin, tpe, space_eval, hp
def is_close(a, b, rel_tol=1e-09, abs_tol=0.0):
return abs(a-b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol)
def is_close_zero(a):
return is_close(a, 0.0)
class Simulation(object):
def __init__(self, data_file, credit... | pawelpeksa/forexSim | main.py | main.py | py | 4,263 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "csv.reader",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "hyperopt.fmin",
"line_number": 107,
"usage_type": "call"
},
{
"api_name": "hyperopt.tpe.suggest",
"lin... |
18588874091 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests that relate to evaluating models with quantity parameters
"""
import numpy as np
import pytest
from numpy.testing import assert_allclose
from astropy import units as u
from astropy.modeling.core import Model
from astropy.modeling.models import ... | astropy/astropy | astropy/modeling/tests/test_quantities_evaluation.py | test_quantities_evaluation.py | py | 12,459 | python | en | code | 4,015 | github-code | 21 | [
{
"api_name": "astropy.modeling.models.Gaussian1D",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "astropy.modeling.models.Gaussian1D",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "astropy.units.J",
"line_number": 37,
"usage_type": "attribute"
},... |
23668742893 | from fastapi import APIRouter, Depends, HTTPException, status
from app.schemas import Vote
from app.tables import db, votes_table, posts_table
from app.jwt_token import get_current_user
router = APIRouter(
prefix='/vote',
tags=['Votes'])
@router.post('/', status_code=status.HTTP_201_CREATED)
@db.transaction(... | dgstanoev/basic-api-with-fastapi | app/routers/vote.py | vote.py | py | 1,580 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "fastapi.APIRouter",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "app.schemas.Vote",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "fastapi.Depends",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "app.jwt_token.get_c... |
21617254568 | from gmm import GMM2
from utils import plot_confusion_mat
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
classes = ["coast", "insidecity", "mountain", "opencountry", "street"]
# classes = ["coast", "insidecity"]
classifier_dict = dict()
Q = 2
for label in classes:
train = pd.read_csv("D... | amw-18/ML-Implementations | KNN, Bayes classifier, GMM/2b.py | 2b.py | py | 1,374 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "gmm.GMM2",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "gmm.fit",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number":... |
9809408192 | import torch
from transformers import BertForQuestionAnswering, BertTokenizer
model = BertForQuestionAnswering.from_pretrained('bert-large-uncased-whole-word-masking-finetuned-squad')
tokenizer = BertTokenizer.from_pretrained('bert-large-uncased-whole-word-masking-finetuned-squad')
answerText = ''
# Take string as fi... | OverDriveGain/spkAI | core.py | core.py | py | 1,382 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "transformers.BertForQuestionAnswering.from_pretrained",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "transformers.BertForQuestionAnswering",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "transformers.BertTokenizer.from_pretrained",
"line_... |
8525401346 | import numpy as np
from sklearn.datasets import fetch_california_housing
import tensorflow as tf
from sklearn.preprocessing import StandardScaler
from datetime import datetime
now = datetime.utcnow().strftime("%Y%m%d%H%M%S")
root_logdir = "tf_logs"
logdir = "{}/run-{}/".format(root_logdir, now)
# Ejemplo de implement... | ailopera/tensor_project | tutorials/examples/gradient_descent_training.py | gradient_descent_training.py | py | 4,506 | python | es | code | 0 | github-code | 21 | [
{
"api_name": "datetime.datetime.utcnow",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "sklearn.datasets.fetch_california_housing",
"line_number": 13,
"usage_type": "call"
},
{
... |
74542239093 | import pathlib
import sys
import platform
import os
import zipfile
import argparse
def get_platform():
#return 'Macos'
platforms = {
'linux' : 'Linux',
'linux1' : 'Linux',
'linux2' : 'Linux',
'darwin' : 'Macos',
'win32' : 'Windows'
}
if sys.platform not in platfo... | Booritas/slideio | src/py-bind/install_py_dists.py | install_py_dists.py | py | 2,718 | python | en | code | 33 | github-code | 21 | [
{
"api_name": "sys.platform",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "sys.platform",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "sys.platform",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "platform.proces... |
33608494466 | from PIL import Image
import numpy as np
import pandas as pd
import cv2 as cv
import os
import sys
import shutil
import time
import itertools
import random
from tqdm import tqdm
from classes.ga.ga import GA
from classes.pso.pso import PSO
from classes.operators import selection, replacement, crossover, velocity_update... | materight/evolutionary-image-vectorization | benchmark.py | benchmark.py | py | 5,405 | python | en | code | 13 | github-code | 21 | [
{
"api_name": "random.seed",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "classes.pso.pso.PSO",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "classes.ga.ga.GA",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "classes.ga.ga.GA",
... |
70551737333 | from datetime import date
from datetime import datetime
import pandas as pd
import numpy as np
import dash as dash
from dash import dcc
from dash import html
import plotly.express as px
from dash.dependencies import Input, Output, State
import dash_bootstrap_components as dbc
import plotly.graph_objects as go
########... | YixiLiang/6401_Visualization | FTP_test/city.py | city.py | py | 5,387 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.where",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "pandas.to_datetime",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "numpy.unique",
"li... |
2536912493 | import logging
import stevedore
logger = logging.getLogger(__name__)
class ModelBuilderNotFoundException(Exception):
pass
class ModelBuilderManager(stevedore.extension.ExtensionManager):
def __init__(self):
self.model_builders = {}
super(ModelBuilderManager, self).__init__(
'e... | xiaodongwang991481/energy_saving | energy_saving/models/model_builder_manager.py | model_builder_manager.py | py | 1,229 | python | en | code | 4 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "stevedore.extension",
"line_number": 12,
"usage_type": "attribute"
}
] |
13515547622 | import re
from typing import Iterator, Sequence
from robot.errors import VariableError
from robot.utils import is_string
def search_variable(string: str, identifiers: Sequence[str] = '$@&%*',
ignore_errors: bool = False) -> 'VariableMatch':
if not (is_string(string) and '{' in string):
... | robotframework/robotframework | src/robot/variables/search.py | search.py | py | 9,177 | python | en | code | 8,521 | github-code | 21 | [
{
"api_name": "typing.Sequence",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "robot.utils.is_string",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "typing.Sequence",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "typing.Sequence"... |
1878239097 | #-*-coding:utf-8-*-
from sklearn import datasets
from sklearn.naive_bayes import MultinomialNB
from sklearn.naive_bayes import GaussianNB
from sklearn.metrics import confusion_matrix
from time import time
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics import classification_report
impor... | EzioTong/Spam_Classifier_Based_On_Naive_Bayes | Bayes.py | Bayes.py | py | 10,681 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "time.time",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sklearn.datasets.load_files",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "sklearn.datasets",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "time.time",
... |
14069284129 | import os
import tensorflow.keras as keras
import numpy as np
from sklearn.metrics import roc_curve, auc
import matplotlib.pyplot as plt
import uproot
import utils
import yaml
import torch
import h5py
import tables
import keras
import awkward as ak
class Data_Fetcher():
def __init__(self):
self.data_train... | danprim/phys239_project | Prototypes/data_loader_3.py | data_loader_3.py | py | 3,776 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "yaml.load",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "yaml.FullLoader",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "tables.open_file",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"li... |
7929461341 | import tkinter as tk
import matplotlib
matplotlib.use("TkAgg")
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
from matplotlib.figure import Figure
import GlobalStates
import PlotItems
class W_MonitorWindow:
def __init__(self, underlying_window, root, _plot_type, _host):
self.plot_type = _p... | wvannoordt/bc-tcp-monitor | py/W_monitor.py | W_monitor.py | py | 2,671 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "matplotlib.use",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "PlotItems.PlotCurveTimeSeries",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "matplotlib.figure.Figure",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "... |
39200259420 | """
File: static_analyzer.py
Description: Main module that statically analyzes exe files.
Author: Savannah Alfaro, sea2985
"""
# Standard Imports
import argparse
import logging
# Third-Party Imports
from colorama import init
from termcolor import colored
# Local Imports
import functions
def get_file_properties(fil... | sea7321/malware-static-analyzer | src/main/static_analyzer.py | static_analyzer.py | py | 6,185 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "functions.get_file_creation_date",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "functions.get_file_modification_date",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "functions.get_file_size",
"line_number": 29,
"usage_type": "call"
... |
18091918285 | import argparse
from entry import quick_add
def main():
parser = argparse.ArgumentParser(
description="Quickly add an entry to Omnifocus")
parser.add_argument('raw_entry', type=str)
args = parser.parse_args()
quick_add(args.raw_entry)
if __name__ == '__main__':
main()
| dlartigue/add_focus | add_focus.py | add_focus.py | py | 301 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "entry.quick_add",
"line_number": 10,
"usage_type": "call"
}
] |
14113682492 | from googlesearch.googlesearch import GoogleSearch
import urllib
import json
class DownloadNews():
def run(self, tag, num_results=1):
urls = []
response = GoogleSearch().search(tag, num_results=num_results)
for result in response.results:
urls.append(result.url)
return ... | cperiz/trending_hashtags | lib/download_news.py | download_news.py | py | 425 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "googlesearch.googlesearch.GoogleSearch",
"line_number": 9,
"usage_type": "call"
}
] |
14301837315 | from mixer.backend.django import mixer
from django.test import TestCase
from feed.models import Post
from contact.models import Contact
class TestModels(TestCase):
def setUp(self):
self.user = Contact.objects.create_user(
email='test@case.test1',
first_name='Test',
las... | ScrollPage/Test-Chat | backend/feed/tests/test_models.py | test_models.py | py | 849 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.test.TestCase",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "contact.models.Contact.objects.create_user",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "contact.models.Contact.objects",
"line_number": 10,
"usage_type": "attribu... |
71325404213 | import plotly
import plotly.graph_objects as go
from cleaning_data import data_loans, new_data_loans
import json
import plotly.express as px
def graph1():
ff = data_loans()
fig = px.scatter(ff, x="Annual Income", y="Monthly Debt", color="Monthly Debt", hover_data=['Current Loan Amount'], size='Monthly ... | goldy35mm/JCDSBDG02-Final-Project | plots.py | plots.py | py | 1,483 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "cleaning_data.data_loans",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "plotly.express.scatter",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "plotly.express",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "json.dump... |
74090766134 | """Public API module.
.. module:: api
:platform: Unix
:synopsis: Here there are all the handlers for the public APIs
.. moduleauthor:: Alessandro Aleotti <71196@studenti.unimore.it>
"""
from __future__ import unicode_literals
import logging
import bleach
from flask import Blueprint, make_response
from fla... | aaleotti-unimore/ComicsScraper | handlers/api.py | api.py | py | 3,742 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "flask.Blueprint",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "flask.make_response",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "flask.jsonify",... |
15171578963 | from asyncio import futures
from asyncio.windows_events import NULL
from FTX_api import FtxClient
from functools import reduce
import pandas as pd
import numpy as np
import re
import time
from datetime import date
import json
class FTX_fundingRates_data:
"""Returns: {'coin':{'perp':perp, 'exPerp':exPerp_dict, 'spo... | ACrousi/FTX-Funding-Rate-Collector | funding_rates.py | funding_rates.py | py | 7,957 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "FTX_api.FtxClient",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "time.time",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "re.escape",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "re.search",
"line_number": ... |
37704154056 | import requests
from gpiozero import LED
from time import sleep
import threading
URL = "http://132.148.146.12/RestApiOOps/token"
PAYLOAD = "grant_type=password&UserName=&Password="
HEADERS = {'content-type': "application/x-www-form-urlencoded"}
URL_PUERTA = "http://132.148.146.12/RestApiOOps/api/Taquilla/PuertasAbier... | riverajefer/box | main.py | main.py | py | 1,611 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "gpiozero.LED",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "requests.request",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "requests.request",
"line... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.