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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1913679893 | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
db = SQLAlchemy()
def create_app():
app = Flask(__name__)
app.config['SECRET_KEY'] = 'secret'
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///db.sqlite3'
app.config['SQLALCHEMY_TRACK_MODIFICATION... | sh3956/image-searching-app | __init__.py | __init__.py | py | 943 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "flask_sqlalchemy.SQLAlchemy",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask_login.LoginManager",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "models... |
21416394998 | #!/usr/bin/env python3
import sys
import argparse as ap
import chemprop
# to make chemprop work with --proparg_combinat/--proparg_stereo,
# patch ${CONDA_PREFIX}/lib/python3.8/site-packages/chemprop/rdkit.py
# with cgr_proparg_patch.txt
def argparse():
parser = ap.ArgumentParser()
g1 = parser.add_mutually_e... | lcmd-epfl/benchmark-barrier-learning | src/cgr.py | cgr.py | py | 3,329 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "chemprop.args.TrainArgs",
"line_number": 79,
"usage_type": "call"
},
{
"api_name": "chemprop.args",
"line_number": 79,
"usage_type": "attribute"
},
{
"api_name": "ch... |
37144077105 | #!/usr/bin/env python
# WS client example 172.30.9.50:3000
import asyncio
import random
import sys
import websockets
import json
import datetime
# status / token / need recovery connect/ allcarsum
from clusterize import get_regions
from desicion import decision
from networkx_util import routes_to_graph, points_map,... | RakhimBek/krosch | scoket_client.py | scoket_client.py | py | 8,164 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "datetime.datetime.now",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime.now",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "da... |
37511396605 | #!/usr/bin/env python
# encoding: utf-8
r"""
Module containing all Pyclaw solution objects
"""
import os
import logging
from .geometry import Patch, Dimension, Domain
# ============================================================================
# Solution Class
# ===================================================... | clawpack/pyclaw | src/pyclaw/solution.py | solution.py | py | 16,693 | python | en | code | 148 | github-code | 18 | [
{
"api_name": "sys.modules",
"line_number": 122,
"usage_type": "attribute"
},
{
"api_name": "sys.modules",
"line_number": 123,
"usage_type": "attribute"
},
{
"api_name": "sys.modules",
"line_number": 127,
"usage_type": "attribute"
},
{
"api_name": "sys.modules",
... |
18430365878 | import cv2
import numpy as np
img = cv2.imread('e:\\1394506194911.jpg')
# 默认是浅拷贝
img2 = img
# 深拷贝
img3 = img.copy()
img[10:100,10:100] = [0,0,255]
cv2.imshow('img',img)
cv2.imshow('img2',img2)
cv2.imshow('img3',img3)
cv2.waitKey(0)
| NewPracticer/OpenCvRoute | basic/usermat.py | usermat.py | py | 254 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "cv2.imread",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line_number": 14,
... |
360395883 | from datetime import datetime
from django.http import HttpResponse
from ridesharing_fcm.tasks import send_message_helper, update_token
def update_firebase_token(request):
"""
Update Firebase ID for device with device_id
:param request: POST {'id', 'token'}, 'token' is new token
"""
new_token, u... | alekseik1/ridesharing-fcm | ridesharing_fcm/views.py | views.py | py | 1,259 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "ridesharing_fcm.tasks.update_token.delay",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "ridesharing_fcm.tasks.update_token",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "django.http.HttpResponse",
"line_number": 16,
"usage_type": "... |
15603423453 | #!/usr/bin/env python
# coding: utf-8
# In[1]:
from PyQt5 import QtCore, QtGui, QtWidgets, Qt
import datetime
from clsOneOfFour import *
from clsClearTranslator import *
class Ui_FormTestSetup(object):
def setupUi(self, FormTestSetup):
FormTestSetup.setObjectName("FormTestSetup")
FormTestSetup.... | Ieriho/Dictionary_pyqt5 | scripts/clsTestSetup.py | clsTestSetup.py | py | 6,226 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "PyQt5.QtWidgets.QSpinBox",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtCore.QRect",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtC... |
35976649383 | from django.urls import path,include
from .views import paginaprincipal, listarProducto, modificarProducto, agregarProducto, eliminarProducto,administracion,lista,muestraProducto,categoria,carrito,offline,listarCategorias,modificarCategoria,eliminarCategoria,tiendas
from django.conf import settings
from django.conf.url... | crhyss/paginaWed | pagbase/urls.py | urls.py | py | 1,381 | python | es | code | 0 | github-code | 18 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "views.paginaprincipal",
"line_number": 7,
"usage_type": "argument"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "views.listar... |
74687201001 | import json
#import os
import pygame as pg
from . import constants
from . import settings
CAPTION = "MissilyMissileCommand"
pg.init()
pg.display.set_caption(CAPTION)
pg.display.set_mode(constants.SCREEN_SIZE)
pg.mouse.set_visible(False)
def load_highscores():
try:
with open(str(constants.HIGHSCORE_PATH... | arthev/GameCraft | missilecommand/data/setup.py | setup.py | py | 946 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pygame.init",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_caption",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "pygame.disp... |
36437260768 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
from functools import wraps
import sys
import math
import inspect
from bxemu.core import PortfolioManager
from bxemu.basic import Tick, Order, Trade
from bxemu.strategy import StrategyTemplate
from bxe... | phonegapX/bxemu | bxemu/bitmexaccount.py | bitmexaccount.py | py | 4,367 | python | en | code | 5 | github-code | 18 | [
{
"api_name": "bxemu.core.PortfolioManager",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "inspect.stack",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "inspect.getmro",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "bxemu.strate... |
21190623226 | # ------------------------------------------------ main script ---------------------------------------------------------
# import the necessary packages
from reader import extract_digit
from reader import find_puzzle
from keras.utils import img_to_array
from keras.models import load_model
from solver import solve
impor... | TJCrocker1/sudoku_solver | solve_sudoku.py | solve_sudoku.py | py | 2,464 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "keras.models.load_model",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "imutils.re... |
869187772 | import yaml
import torch.optim as op
from torch.nn import modules
import goodDataML.learning.horizontal.torch_model.process_data as processes
from typing import Callable
def convert_loss_name_to_func(loss):
# type: (str) -> modules.module
return getattr(modules.loss, loss)
def convert_optimizer_to_func(opt... | good-data-foundation/federated-learning-sdk | goodDataML/learning/utils/pytorch_utils.py | pytorch_utils.py | py | 2,044 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "torch.nn.modules.loss",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.modules",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "torch.optim",
"line_number": 16,
"usage_type": "argument"
},
{
"api_name": "goodDataM... |
10061412729 | """Containers module."""
from typing import Optional
from dependency_injector import containers, providers
from kafkaescli import constants
from kafkaescli.core.config.services import ConfigFileService, ConfigService
from kafkaescli.core.consumer.services import ConsumeService
from kafkaescli.core.middleware.models ... | jonykalavera/kafkaescli | kafkaescli/infra/containers.py | containers.py | py | 1,990 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "dependency_injector.containers.DeclarativeContainer",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "dependency_injector.containers",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "dependency_injector.providers.Object",
"line_number":... |
23784770524 | # Querying an SQL Database in Python
# Import packages
from sqlalchemy import create_engine
import pandas as pd
# Create engine and store in variable: engine
engine = create_engine('sqlite:///Chinook.sqlite')
# Open the engine connection as variable con using the method connect() on the engine.
con = engine.connect(... | PeterL64/UCDDataAnalytics | 3_Intro_To_Importing_Data_Python/3_Working_With_Relational_Databases_In_Python/3_ SQL_Queries_Basics.py | 3_ SQL_Queries_Basics.py | py | 617 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "sqlalchemy.create_engine",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 17,
"usage_type": "call"
}
] |
24932714503 | import itertools as itertool
import random as my_random
from pylab import *
from sklearn.model_selection import KFold
class DataSet:
params = None
initialized = False
train_list = None
test_list = None
def __init__(self, params):
self.params = params
self.initialized = False
... | jeyhan/spatial_stat | utils/data_utils.py | data_utils.py | py | 2,272 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "random.seed",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.KFold",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "itertools.product",
"line_number": 55,
"usage_type": "call"
}
] |
14839858885 | import psycopg2
#establishing the connection
conn = psycopg2.connect(
database="mydb", user='postgres', password='password', host='127.0.0.1', port= '5432'
)
#Setting auto commit false
conn.autocommit = True
#Creating a cursor object using the cursor() method
cursor = conn.cursor()
#Doping EMPLOYEE table if alre... | demo-mode/demo-github-sync | Mode/demo/spaces/Test Space/Support-- Create Postgres table using python.0f8d42acbea9/notebook/cell-number-2.8e33cd379ef7.py | cell-number-2.8e33cd379ef7.py | py | 1,171 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "psycopg2.connect",
"line_number": 4,
"usage_type": "call"
}
] |
17945071145 | from django.shortcuts import render, redirect
from person.forms import PersonForm
from person.models import Person
from index.models import User
from django.views.generic.edit import CreateView, UpdateView, DeleteView
import datetime
from dateutil.relativedelta import relativedelta
def create_person(request):
# ... | chriskingsborough/rememberMe | rememberMe/person/views.py | views.py | py | 3,294 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "django.shortcuts.redirect",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "person.forms.PersonForm",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "index.models.User.objects.get",
"line_number": 24,
"usage_type": "call"
},
{
"a... |
15922984593 | from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
import undetected_chromedriver as uc
import googleapiclient.discovery
import requests
from urlli... | ZestyCat/stealth-drive | src/stealth_drive/lurk.py | lurk.py | py | 10,902 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "undetected_chromedriver.ChromeOptions",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "undetected_chromedriver.Chrome",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.common.by.By.ID",
"line_number": 31,
"usage_type"... |
73252418920 | from dataset.reddit_user_dataset import RedditUserDataset
from dataset.reddit_user_dataset import convert_timeframes_to_model_input
from utils.feature_computing import Embedder
import pickle as pkl
import random
import gzip
import time
import os
from os import listdir
from utils.file_sort import path_sort
from argparse... | caisa-lab/FACTOID-dataset | src/model_dataloader.py | model_dataloader.py | py | 12,486 | python | en | code | 13 | github-code | 18 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "dataset.reddit_user_dataset.RedditUserDataset.load_from_file",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "dataset.reddit_user_dataset.RedditUserDataset",
"line_nu... |
3671476359 | from typing import List
class Solution:
def findCenter(self, edges: List[List[int]]) -> int:
a = edges[0]
b = edges[1]
for i in a:
for j in b:
if(i==j):
return i
edges = [[1,2],[2,3],[4,2]]
print(Solution.findCenter(Solution, ... | KReilly/leetcode | 1791 Find Center of Star Graph.py | 1791 Find Center of Star Graph.py | py | 327 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "typing.List",
"line_number": 4,
"usage_type": "name"
}
] |
16568221451 | import aleatorioEstado
import datetime as dt
import csv
hoje = dt.date.today()
listaEstados=[]
repeticao = 2
def T_RHSTU_ESTADO(id_estado,sg_estado,nm_estado,dt_cadastro,nm_usuario):
paciente = {}
paciente['ID_ESTADO'] = id_estado #PK
paciente['SG_ESTADO'] = sg_estado
paciente['NM_ESTADO'] = nm_estado
... | MironMarins/geradorDeD | primarios/T_RHSTU_ESTADO/T_RHSTU_ESTADO.py | T_RHSTU_ESTADO.py | py | 2,785 | python | es | code | 0 | github-code | 18 | [
{
"api_name": "datetime.date.today",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "aleatorioEstado.estados",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "ale... |
26893261989 | from rest_framework import serializers , status
from library.api_response import ApiResponse
ID = 5
def input_validation(value):
if float(value) >= 0 and float(value) <= 20:
return True
api_response = ApiResponse()
response = api_response.set_data("errors", "Invalid PH Sensor Value"... | BadrTarek/SGH-Backend | django_project/monitoring/sensors/ph_sensor.py | ph_sensor.py | py | 382 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "library.api_response.ApiResponse",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "rest_framework.serializers.ValidationError",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "rest_framework.serializers",
"line_number": 14,
"usage_type":... |
24772481960 | from sqlalchemy import orm
from ..core.qt import QtGui
from ..admin.action.list_action import ListActionGuiContext
class MockModelContext( object ):
"""Model Context to be used in unit tests
:param session: the session attributed to this model context, if `None` is
given, the session of the objec... | Platanen/camelot | camelot/test/action.py | action.py | py | 1,374 | python | en | code | null | github-code | 18 | [
{
"api_name": "sqlalchemy.orm.object_session",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.orm",
"line_number": 40,
"usage_type": "name"
},
{
"api_name": "admin.action.list_action.ListActionGuiContext",
"line_number": 42,
"usage_type": "name"
},... |
11474838259 | import json
## Step 1:- Implementing Object formation Snack
#-----------------------------------------------------------------------
class Snack:
def __init__(self,snack_id,name,price,availability) -> None:
self.snack_id=snack_id
self.name=name
self.price=price
self.availability=av... | Adesh856/GA101_Masai | Sprint2/day1/Mumbai_Munchies/snack.py | snack.py | py | 5,084 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "json.load",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 103,
... |
43860157065 | import io
import os
import re
import sys
import argparse
# if re.match("^\d+?\.\d+?$", element) is None:
# print "Not float"
class word():
"""docstring for word"""
def __init__(self, description, vertices):# lower_left, lower_right, upper_right, upper_left):
self.description = description
s... | auszhang/Rec-eipt | ocr.py | ocr.py | py | 4,534 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "google.cloud.vision.ImageAnnotatorClient",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "google.cloud.vision",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "io.open",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "... |
39041888318 | import sys
if sys.version_info < (3, 0):
sys.stderr.write("""\
ERROR: ScratchABit requires Python 3.3 or higher. You are running it with
following Python version:
---
%s
---
Try running it as 'python3 %s' and/or install suitable version.
""" % (sys.version, sys.argv[0]))
sys.exit(1)
import os
import os.path
i... | pfalcon/ScratchABit | ScratchABit.py | ScratchABit.py | py | 39,522 | python | en | code | 391 | github-code | 18 | [
{
"api_name": "sys.version_info",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "sys.stderr.write",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "sys.stderr",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "sys.version",
... |
10307370114 | #!/usr/bin/env python
# Adapted from ascii.py of Mahesh Venkitachalam
# Python code to convert an image to ASCII image.
import sys, random, argparse
import array, fcntl, termios
import numpy as np
import math
from PIL import Image, ImageDraw, ImageFont, ImageFilter, ImageColor
try:
import curses
except ImportEr... | DeathKing/lab | indicator/indicator.py | indicator.py | py | 4,448 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "curses.COLOR_BLACK",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "curses.COLOR_BLUE",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "curses.COLOR_CYAN",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": ... |
20108960850 | from bs4 import BeautifulSoup as bs
try:
import cld3
except:
pass
# from googletrans import Translator
# from google_trans_new import google_translator
from .dictWords import *
def find_els_contains_word(web_comp , word: str): # changing //*[contains(text(),"Cookies")] to //*[text()[contains(.... | bannerclick/bannerclick | bannerclick/utility/textMethods.py | textMethods.py | py | 3,448 | python | en | code | 5 | github-code | 18 | [
{
"api_name": "bs4.BeautifulSoup",
"line_number": 88,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 101,
"usage_type": "call"
},
{
"api_name": "cld3.get_language",
"line_number": 107,
"usage_type": "call"
}
] |
7247702242 | import ast
import re
import numpy as np
import scipy.linalg
from src.calculate import Calculate
__author__ = "Khashayar Ghamati"
__email__ = "khashayarghamati@gmail.com"
class GaussLU(object):
def getEquation(self):
n = int(input("insert number of row: "))
m = int(input("insert number of colum... | khashayarghamati/LUDecomposition | src/gaussLU.py | gaussLU.py | py | 2,552 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "numpy.array",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "numpy.vstack",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "src.calculate.Calculate",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "scipy.linalg.linalg.... |
2715388659 | import re
from datetime import datetime
import flask
def check_dates(startDate, endDate):
start_date = None
end_date = None
if startDate:
start_date = datetime.strptime(startDate, '%Y-%m-%d')
if endDate:
end_date = datetime.strptime(endDate, '%Y-%m-%d')
if start_date and end_date... | ACinesi/covid-api | commons/utils.py | utils.py | py | 741 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "datetime.datetime.strptime",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 13,
"usage_type": "call"
},
{
"api_name"... |
42018911242 | import numpy as np
import pygame
from random import randint
class Apple(pygame.sprite.Sprite):
def __init__(self, h = 20, w = 20):
super().__init__()
self.w = w
self.h = h
self.pos = pygame.math.Vector2(randint(self.w, 1000 - self.w),randint(self.h, 1000 - self.h))
self.im... | washaq00/Ants_AI | Apple.py | Apple.py | py | 663 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pygame.sprite",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "pygame.math.Vector2",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pygame.math",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "random.randint... |
32938571523 | import json
class RocchioClassifier:
def __init__(self):
self.classes = {}
self.similarities = {}
def calculateCentroids(self, classes, beta, gamma):
self.classes = classes
for className in self.classes:
totalDocs = self.classes[className]["totalDocs... | JOQUINYD/RIT_TP3 | RocchioClassifier.py | RocchioClassifier.py | py | 1,965 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "json.dump",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 39,
"usage_type": "call"
}
] |
9211943011 | #!/usr/bin/python
import networkx as nx
from networkx.algorithms import clique, bipartite
def planar(input_struct):
G = nx.Graph()
G.add_nodes_from(input_struct.get("nodes"))
G.add_weighted_edges_from(input_struct.get("edges"))
G_first_set = nx.Graph()
G.add_nodes_from(input_struct.get("first_se... | romeorizzi/eduexams | Applet/graph/exercise_graph/verifier/v_1.py | v_1.py | py | 2,288 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "networkx.Graph",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "networkx.Graph",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "networkx.check_planarity",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "networkx.algori... |
11684550586 | import distro, math, numpy
def _solver(stats):
(mu,) = distro.extractStats(stats, [distro.Stat.Mu])
return (round(mu),)
distro.register(
name = 'Chi_Squared',
domain = distro.Domain.Continuous,
params = ('k',),
paramSolver = _solver,
cdf = lambda x, k : 0, #not ... | jscheiny/oepd | src/chi_squared.py | chi_squared.py | py | 558 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "distro.extractStats",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "distro.Stat",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "distro.register",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "distro.Domain",
... |
8208236760 | # from django.http import HttpResponse
# from .views import *
# from django.views.decorators.csrf import csrf_exempt
# import time
# from pytz import timezone
import json
from datetime import datetime, timedelta
from django.utils import timezone
import requests
import os
from bitrix24.bitrix24 import Bitrix24
from .mo... | Marat2010/djherok | bitr24/tg_utils.py | tg_utils.py | py | 76,843 | python | ru | code | 0 | github-code | 18 | [
{
"api_name": "os.environ",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "boto3.resource",
... |
30624041727 | import argparse
import torch
import torch.nn as nn
import matplotlib.pyplot as plt
import torch.nn.functional as F
from torchvision.utils import make_grid
import numpy as np
from scipy.stats import norm
from datasets.bmnist import bmnist
class Encoder(nn.Module):
def __init__(self, hidden_dim=500, z_dim=20):
... | OscarLigthart/Deep-Learning | assignment_3/code/a3_vae_template.py | a3_vae_template.py | py | 7,275 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "torch.nn.Module",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "torch.nn.Linear",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_nu... |
23869123472 | import torch
import torchvision
import torchvision.transforms as transforms
import matplotlib.pyplot as plt
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
device = 'cuda:0' if torch.cuda.is_available() else 'cpu'
batch_size = 2571
img_size = 28, 28
... | hipass7/pytorch | 220114/prediction2.py | prediction2.py | py | 2,911 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "torch.cuda.is_available",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "torchvision.transforms.Compose",
"line_number": 15,
"usage_type": "call"
},
{
"api_name":... |
34022466598 | import logging
from functools import cached_property
from django.db.models import Q
from langchain.callbacks.manager import CallbackManager
from ix.agents.models import Agent
from ix.chat.models import Chat
from ix.task_log.models import Task
logger = logging.getLogger(__name__)
class IxCallbackManager(CallbackMan... | kreneskyp/ix | ix/agents/callback_manager.py | callback_manager.py | py | 1,746 | python | en | code | 809 | github-code | 18 | [
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "langchain.callbacks.manager.CallbackManager",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "ix.task_log.models.Task",
"line_number": 20,
"usage_type": "name"
},
{
... |
34247017209 | from flask import Flask, render_template, request
from flask_socketio import SocketIO, emit, join_room
#from qa_service import query_document
app = Flask(__name__)
socketio = SocketIO(app)
# Store user and admin rooms
user_room = "user_room"
admin_room = "admin_room"
# Initialize bot_enabled flag
bot_enabled = False... | Nishantsingh45/flask-socket | app.py | app.py | py | 1,992 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "flask.Flask",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "flask_socketio.SocketIO",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "flask.render_... |
38972333085 | import hkvfewspy as hkv
import datetime
def test_runtask_params():
pi = hkv.Pi(protocol="rest")
pi.setUrl(
"https://oms-ijmuiden.hkvservices.nl/FewsWebServices/rest/fewspiservice/v1/"
)
pi.runTask(
startTime=datetime.date(2021, 10, 30),
endTime=datetime.date(2021, 11, 1),
... | HKV-products-services/hkvfewspy | tests/test_runtask.py | test_runtask.py | py | 385 | python | en | code | 4 | github-code | 18 | [
{
"api_name": "hkvfewspy.Pi",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 13,
"usage_type": "call"
}
] |
5809431949 | # -*- coding: utf-8 -*-
import logging
import os
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext.webapp import template
import amayadori
import timeutil
import areamanager
import png
import giflib
import jmalib
class IndexPage(webapp.Reques... | nayutaya/amayadori | image_handler.py | image_handler.py | py | 3,246 | python | en | code | 4 | github-code | 18 | [
{
"api_name": "google.appengine.ext.webapp.RequestHandler",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "google.appengine.ext.webapp",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "amayadori.get_radar_time",
"line_number": 20,
"usage_type": "... |
16719603814 | #!python3
from threading import Thread, Event
import multiprocessing
import logging
import time
import datetime
from collections import deque
from ping_senders.pinger import Pinger
class SendAsyncStrategy(Thread):
MAX_PINGS_TO_SEND = 100
WAIT_BEFORE_RETRY = 10
def __init__(self, server, chronoId):
super... | fabricepipart/teknichrono | src/main/client/ping_senders/send_async.py | send_async.py | py | 1,614 | python | en | code | 3 | github-code | 18 | [
{
"api_name": "threading.Thread",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "logging.getLogger",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "ping_senders.pinger.Pinger",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "collect... |
19730136218 | def main():
import pyttsx3
import speech_recognition as sr
import datetime
import wikipedia
import webbrowser
import os
import smtplib
import subprocess
import time
from covid import Covid
import speedtest
from googletrans import Translator
import pyshorteners
im... | gaiborjosue/Andromeda-AI | main.py | main.py | py | 24,096 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "speech_recognition.Recognizer",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "covid.Covid",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "imdb.IMDb",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "freebible.read_we... |
11277803832 | import os
import sys
import time
import logging as log
# importのサーチパスを追加
sys.path.insert(0,os.path.join(os.path.dirname(__file__),"../common"))
import numpy as np
from openvino.inference_engine import IECore
# ユーザ定義モジュール
from frame_processor import FrameProcessor
from yolo_detector import YoloDetector
class YoloFr... | ippei8jp/ov_image | yolo/yolo_frame_processor.py | yolo_frame_processor.py | py | 2,369 | python | ja | code | 0 | github-code | 18 | [
{
"api_name": "sys.path.insert",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": ... |
21107860164 | import argparse
import json
import os
import pathlib
import shutil
import subprocess
import sys
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
REPO_DIR = os.path.normpath(os.path.join(SCRIPT_DIR, "..", "..", "..", ".."))
BUILD_PY = os.path.join(REPO_DIR, "tools", "ci_build", "build.py")
JAVA_ROOT = os.path.j... | microsoft/onnxruntime | tools/ci_build/github/android/build_aar_package.py | build_aar_package.py | py | 8,916 | python | en | code | 9,700 | github-code | 18 | [
{
"api_name": "os.path.dirname",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.path.realpath",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.normpath",
"li... |
21031991228 | import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.decomposition import PCA
from sklearn.neighbors import KNeighborsClassifier
from sklearn.metrics import confusion_matrix, accuracy_score
# Veri setini yükle
data = pd.read_csv('data1.csv', sep=';')
# Ondalık ayracı düzelt
data = dat... | yusufyasinkaya/csvler | soru1.py | soru1.py | py | 1,146 | python | tr | code | 0 | github-code | 18 | [
{
"api_name": "pandas.read_csv",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "sklearn.decomposition.PCA",
"line_number": 21,
"usage_type": "call"
},
{
... |
71770562920 | from __future__ import print_function
import numpy as np
from matplotlib import pyplot as plot
from scipy.io import loadmat
from sklearn.svm import libsvm
def plot_data(X, y, show=True):
pos = y.nonzero()[0]
neg = (y == 0).nonzero()[0]
plot.plot(X[pos, 0], X[pos, 1], 'k+', markersize=7, linewidth=2)
... | zsiciarz/ml-coursera | python/ex6/ex6.py | ex6.py | py | 4,515 | python | en | code | 114 | github-code | 18 | [
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "matpl... |
72838299879 | import random
import numpy as np
import cv2
import time
from math import sqrt
num_rows = 36 # int(input("Rows: ")) # number of rows
num_cols = 36 # int(input("Columns: ")) # number of columns
size = (1000, 1000)
maze = np.zeros((num_rows, num_cols, 5), dtype=np.uint8)
range_of_color = (104, 255)
cv2.namedWindow("I... | jaronoff97/mirrorpi | maze_test1.py | maze_test1.py | py | 6,431 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "numpy.zeros",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.uint8",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "cv2.namedWindow",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "cv2.WND_PROP_FULLSCREEN"... |
2163249850 | #!/usr/bin/env python
import os
import random
import subprocess
from itertools import product
def main():
edgelist_dir = os.path.join(
os.path.dirname(os.path.abspath(__file__)), '..', 'data', 'artificial')
edgelist_list = [
os.path.join(edgelist_dir, fn)
for fn in os.listdir(edgelist_... | y-satotani/dynamic-betweenness | src/exp/run-artificial-experiments.py | run-artificial-experiments.py | py | 1,417 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "os.path.join",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": ... |
72961560041 | #
# programmed by Chris, 02/17/2023
#
import json
import base64
import logging
import os.path
import requests
from bs4 import BeautifulSoup
from google.auth.transport.requests import Request
from google.oauth2.credentials import Credentials
from google_auth_oauthlib.flow import InstalledAppFlow
from googleapiclient.d... | chrisalexman/sales-web-scraper | main.py | main.py | py | 9,015 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "logging.basicConfig",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 38,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "logging.ERROR... |
73811743400 | import logging
import os
import signal
import time
from abc import ABCMeta
from uuid import uuid4
import psutil
from toil.job import Job
from toil.exceptions import FailedJobsException
from toil.lib.threading import cpu_count
from toil.test import ToilTest, slow
logger = logging.getLogger(__name__)
class DeferredF... | DataBiosphere/toil | src/toil/test/src/deferredFunctionTest.py | deferredFunctionTest.py | py | 12,715 | python | en | code | 856 | github-code | 18 | [
{
"api_name": "logging.getLogger",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "toil.test.ToilTest",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "abc.ABCMeta",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "uuid.uuid4",
"li... |
43024107752 | # -*- coding: utf-8 -*-
import os
import shutil
from datetime import datetime
from vilya.libs.signals import (
gist_created_signal, gist_forked_signal, gist_updated_signal)
from vilya.libs.store import store
from vilya.libs import gyt
from vilya.libs.permdir import get_repo_root
from vilya.models.git import GitRe... | douban/code | vilya/models/gist.py | gist.py | py | 16,861 | python | en | code | 1,812 | github-code | 18 | [
{
"api_name": "vilya.config.DOMAIN",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 34,
"usage_type": "attribute"
},
{
"api_name": "vilya.libs.permdir.get_... |
38123105461 | """
Tumbnail Render
Author: Brandon Bower
Renders images of all fbx files within a root folder.
Saves the images within the same folder as the fbx file rendered
"""
import maya.cmds as cmds
import os
WIDTH = 250 # constant for width of window
def openRenderDelete(path, fbxFile):
'''
(string, ... | Brandon-Bower/Maya_Tools | Thumbnail_Render.py | Thumbnail_Render.py | py | 3,334 | python | en | code | 3 | github-code | 18 | [
{
"api_name": "maya.cmds.file",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "maya.cmds",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "maya.cmds.render",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "maya.cmds",
"line_numbe... |
16188885644 | __author__ = 'roehrig'
# ftp://ftp.dwd.de/pub/data/gpcc/full_data/full_data_v7_05.nc.gz
import os
import numpy as np
import pandas as pd
from netCDF4 import Dataset, num2date
import ogr
import osr
class FullDataV0705(object):
def __init__(self, filename,
min_lon=-180.0, max_lon=180.0, min_lat=-... | JRoehrig/warsa | warsa/precipitation/reanalysis/dwd/dwd_reanalysis.py | dwd_reanalysis.py | py | 5,138 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "netCDF4.Dataset",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "netCDF4.num2date",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "numpy.squeeze",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "numpy.where",
"lin... |
21154294850 | import argparse
import zipfile
import re
import collections
import numpy as np
from gensim.models import KeyedVectors
from six.moves import xrange
import random
import torch
import gensim
import matplotlib.pyplot as plt
from sklearn.manifold import TSNE
from torch.autograd import Variable
from models import SkipGramMod... | LeoFuchs/Masters | Code/Trash/word2vec-master/word2vec.py | word2vec.py | py | 10,274 | python | pt | code | 1 | github-code | 18 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "zipfile.ZipFile",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 64,
"usage_type": "call"
},
{
"api_name": "collections.Counte... |
29700704531 | import json
import logging.config
from environs import Env
from flask import Flask, request, jsonify
from flask_smorest import Api
from .config import Config
def create_flask_app(config: Config) -> Flask:
# Create the Flask App
app = Flask(__name__)
app.logger = logging.getLogger('console')
""" Log... | VictorCyprien/MFE-Python-Flask | api/app.py | app.py | py | 1,760 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "config.Config",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "flask.Flask",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "logging.config.getLogger",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "logging.config",
... |
33425725071 |
import discord
from discord.ext import commands
import requests
class InfoRetrieval(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command(name='info', help='Retrieves information from the internet.')
async def info(self, ctx, *, query: str):
response = requests.get(f"ht... | shadowaxe99/dsicord | src/bot/commands/info_retrieval.py | info_retrieval.py | py | 451 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "discord.ext.commands.Cog",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "discord... |
22703277476 | from nltk.tokenize import word_tokenize
import nltk
from textblob import TextBlob
def AdjectivePolarity(sample):
sam=word_tokenize(sample)
tags=nltk.pos_tag(sam)
adjpol=[]
TagValue=['RB','RBR','RBS','JJS','JJ','JJR']
for i in tags:
if i[1] not in TagValue:
print(i)
analysis=TextBlob(i[0])
sentemp=analys... | saiteja75/CallAnalysis | pos.py | pos.py | py | 509 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "nltk.tokenize.word_tokenize",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "nltk.pos_tag",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "textblob.TextBlob",
"line_number": 12,
"usage_type": "call"
}
] |
34843435776 |
'''
Take thee again another scroll, and write in it all the former words that
were in the first scroll, which Jehoiakim the king of Judah hath burned.
Jeremiah 36:28
'''
import sys
from PyQt5.QtWidgets import QApplication
from main_window import MainWindow
class Khartes():
def __init__(self, app):
wind... | KhartesViewer/khartes | khartes.py | khartes.py | py | 496 | python | en | code | 8 | github-code | 18 | [
{
"api_name": "main_window.MainWindow",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets.QApplication",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 20,
"usage_type": "attribute"
}
] |
26850426434 | from zope.component import adapts
from zope.interface import implements
from Products.ZenRelations.RelSchema import ToOne, ToMany, ToManyCont
from Products.Zuul.decorators import info
from Products.Zuul.form import schema
from Products.Zuul.infos import ProxyProperty
from Products.Zuul.infos.component import Componen... | ssvsergeyev/ZenPacks.zenoss.AWS | ZenPacks/zenoss/AWS/EC2Image.py | EC2Image.py | py | 4,617 | python | en | code | null | github-code | 18 | [
{
"api_name": "ZenPacks.zenoss.AWS.AWSComponent.AWSComponent",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "ZenPacks.zenoss.AWS.AWSComponent.AWSComponent._properties",
"line_number": 40,
"usage_type": "attribute"
},
{
"api_name": "ZenPacks.zenoss.AWS.AWSComponent.AWS... |
334265130 | from bson.errors import InvalidId
from requests.article import retrieve_article
from requests.files import retrieve_file
from schema.user import User
async def validate_files(file_ids: list, user: User):
for file_id in file_ids:
try:
file = await retrieve_file(file_id)
if not file... | mrhumster/personal-article-library | backend/app/utils/validators.py | validators.py | py | 1,163 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "schema.user.User",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "requests.files.retrieve_file",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "bson.errors.InvalidId",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "sc... |
37890915254 | import json
from django.http import JsonResponse, HttpResponseNotFound, HttpResponseBadRequest, HttpResponse, HttpResponseForbidden
from django.core.exceptions import ObjectDoesNotExist, ValidationError
from django.forms.models import model_to_dict
from skelbiameAPI.models import Advert, Comment, User, Tag
from .genera... | Faustels/Saitynai | skelbiameAPI/Views/comments.py | comments.py | py | 4,139 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "skelbiameAPI.models.Comment.objects.all",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "skelbiameAPI.models.Comment.objects",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "skelbiameAPI.models.Comment",
"line_number": 12,
"usage_... |
12915725999 | from PyQt5.QtCore import Qt
from PyQt5.QtGui import QFont, QPixmap
from PyQt5.QtWidgets import QGraphicsTextItem, QGraphicsPixmapItem
from client.constants import IMAGES_DIR
from client.models.abstract.info_scene import InfoScene
from client.models.enums.button_state import ButtonState
from client.models.menu_objects.... | dvsku/donkey-kong-drs-projekat | client/models/scenes/match_end.py | match_end.py | py | 3,941 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "client.models.abstract.info_scene.InfoScene",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtGui.QFont",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets.QGraphicsTextItem",
"line_number": 22,
"usage_type": "call"... |
71914524200 | from django.db import models
from django.urls import reverse
from django.conf import settings
from django.utils.html import format_html
from django.templatetags.static import static
from model_utils.models import TimeStampedModel
from autoslug import AutoSlugField
class PostQuerySet(models.QuerySet):
def publish... | cansadadeserfeliz/desparchado | blog/models.py | models.py | py | 2,468 | python | en | code | 8 | github-code | 18 | [
{
"api_name": "django.db.models.QuerySet",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "model_utils.models.TimeStampedModel",
"line_number": 19,
"usage_type": "name"
},
{
... |
44297150248 | import sys
import random
import secrets
from character import Character
from monster import Dragon
from monster import Goblin
from monster import Troll
class Game:
def setup(self):
self.player = Character()
self.monsters = [
Goblin(),
Troll(),
Dragon()
... | michanN/Hack-N-Slash-Game | game.py | game.py | py | 2,964 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "character.Character",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "monster.Goblin",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "monster.Troll",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "monster.Dragon",
... |
29873093352 | from collections import deque
def check(r, c):
global ret
qu = deque([[r, c, MAP[r][c]]])
while qu:
y, x, num = qu.popleft()
if len(num) == 7:
ret.add(num)
continue
for i in range(4):
ny, nx = y + dy[i], x + dx[i]
if 0 <= ny < 4 and 0... | essk13/Algorithm | 01_problem/python/2021/10/1007/격자판.py | 격자판.py | py | 649 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "collections.deque",
"line_number": 6,
"usage_type": "call"
}
] |
11999148844 | import network
import ure as re
import ubinascii
import uhashlib
from mimes import mime_content_type
import utils
if __name__ == "__main__":
picoweb = utils.import_or_install("picoweb", "picoweb")
logging = utils.import_or_install("micropython-ulogging", "ulogging")
from app_esp import config_service, user_ser... | waltercassiano/micropython-spa-react | backend/main.py | main.py | py | 5,186 | python | en | code | 3 | github-code | 18 | [
{
"api_name": "utils.import_or_install",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "utils.import_or_install",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "app_esp.user_service.add_user",
"line_number": 14,
"usage_type": "call"
},
{
"api_n... |
26028383857 | from flask import Flask
from base64 import b64encode
from dotenv import load_dotenv, find_dotenv
from flask_cors import CORS
load_dotenv(find_dotenv())
import requests, os, random
SPOTIFY_URL_REFRESH_TOKEN = "https://accounts.spotify.com/api/token"
SPOTIFY_URL_NOW_PLAYING = "https://api.spotify.com/v1/me/player/curr... | Niweera/niwtify | api/index.py | index.py | py | 2,511 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "dotenv.find_dotenv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.environ",
"... |
39524872436 | from ase.optimize import BFGS
from asap3 import EMT
import numpy as np
import sklearn.gaussian_process as gp
class EnergyCalculator:
def __init__(self):
self.energy_key = None
pass
def compute_energy(self, particle):
raise NotImplementedError
def get_energy_key(self):
re... | Themistoflix/MLaGA | Code/EnergyCalculator.py | EnergyCalculator.py | py | 3,314 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "numpy.array",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "asap3.EMT",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "ase.optimize.BFGS",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "sklearn.gaussian_process.kern... |
40333793099 | """Controller file for writing db queries"""
import sys
sys.path.append('/Users/anirudh.chawla/python_fast_api_projects/hospital-management-fastapi')
from typing import Optional
from sqlalchemy.orm import Session
from hospital.app.models.schemas import HospitalBase, HospitalCreate
from hospital.app.models.models import... | RxMobile-Dummy/fastapi-HMS | hospital/app/api/controller.py | controller.py | py | 8,067 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "sys.path.append",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "sqlalchemy.orm.Session",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "hospital.app.model... |
70735558121 |
from ipdb import set_trace as b
import boto3
import pandas as pd
import s3fs
import os
import shutil
def write_html_to_s3(local_file, object_key, creds):
if creds.get('env') == 'dev':
dev_file_loc = local_file.replace('/tmp/', './dev_html/')
shutil.copyfile(local_file, dev_file_loc)
print(... | gfcannon12/covid | s3_ops.py | s3_ops.py | py | 1,326 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "shutil.copyfile",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "boto3.client",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "s3fs.S3FileSystem",
"line_number": 26,
"usage_type": "call"
}
] |
24305393132 | """create models database
Revision ID: 295401065ea8
Revises:
Create Date: 2022-08-11 20:17:22.144511
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '295401065ea8'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands ... | ska034/first_api_project | migrations/versions/295401065ea8_create_models_database.py | 295401065ea8_create_models_database.py | py | 2,101 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "alembic.op.create_table",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integ... |
26181009169 | import platform
import socket
from os import system
from pathlib import Path
from sys import stderr
from pyautogui import hotkey, write
import time
HOME = str(Path.home())
PATH = rf'{HOME}\PycharmProjects\GBScoutingServer'
APP = 'run.py'
ENV = 'development'
HOST = socket.gethostbyname(socket.gethostname())
VARIABLE_KE... | GreenBlitz/GBScoutingServer | utils/sharatz.py | sharatz.py | py | 1,314 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pathlib.Path.home",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "socket.gethostbyname",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "socket.gethostname"... |
43328702000 | import os
import time
from discord.ext import commands
import discord
from pyscreenshot import grab
TOKEN = ''
# import json
# import requests
# URL = 'https://discordapp.com/oauth2/authorize?&client_id=816481315913859112&scope=bot&permissions=2048'
bot = commands.Bot(command_prefix='')
@bot.event
async def on_rea... | dim5x/Screen2Discord | SBot4Discord.py | SBot4Discord.py | py | 2,168 | python | ru | code | 0 | github-code | 18 | [
{
"api_name": "discord.ext.commands.Bot",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "discord.ext.commands",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "time.sleep",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "os.remove",
... |
12144976439 | from django.shortcuts import render
from tracker.forms import *
import phonenumbers as phn
from phonenumbers import timezone, geocoder, carrier
# HomePage
def home(request):
number = []
timeZone = []
Carrier = []
Region = []
if request.method == "POST":
form = TrackerForm(request.POST, requ... | sinhakomal40/mobile-number-tracker | mobile_tracker/tracker/views.py | views.py | py | 842 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "phonenumbers.parse",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "phonenumbers.timezone.time_zones_for_number",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "phonenumbers.timezone",
"line_number": 16,
"usage_type": "name"
},
{
... |
29076414788 | import telegram
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import io
import pandas as pd
import pandahouse
import requests
from datetime import datetime, timedelta
from airflow.decorators import dag, task
from airflow.operators.python import get_current_context
def ch_get_df... | Strelnikova548/Airflow | send_report_2-Strelnikova.py | send_report_2-Strelnikova.py | py | 6,609 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "requests.post",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "io.StringIO",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "telegram.Bot",
"line_nu... |
9483511958 | from django.views.generic import TemplateView
class IndexView(TemplateView):
template_name = "index.html"
def get_context_data(self):
ctxt = super().get_context_data() #ctxtは任意だがよく使われる
ctxt["username"] = "kazuki"
return ctxt
class AboutView(TemplateView):
template_name = ... | Kazuki-Iida/django-practice | website/views.py | views.py | py | 652 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "django.views.generic.TemplateView",
"line_number": 3,
"usage_type": "name"
},
{
"api_name": "django.views.generic.TemplateView",
"line_number": 12,
"usage_type": "name"
}
] |
28720985015 | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | OscarEngelbrektson/SyntheticControlMethods | SyntheticControlMethods/optimize.py | optimize.py | py | 14,585 | python | en | code | 142 | github-code | 18 | [
{
"api_name": "numpy.full",
"line_number": 83,
"usage_type": "call"
},
{
"api_name": "numpy.append",
"line_number": 86,
"usage_type": "call"
},
{
"api_name": "numpy.ones",
"line_number": 89,
"usage_type": "call"
},
{
"api_name": "numpy.append",
"line_number": ... |
73192870441 |
# Define imports
from kerastuner.engine import base_tuner
import kerastuner as kt
from tensorflow import keras
from typing import NamedTuple, Dict, Text, Any, List
from tfx.components.trainer.fn_args_utils import FnArgs, DataAccessor
import tensorflow as tf
import tensorflow_transform as tft
# import same constants f... | mail2mhossain/practical_data_science | tfx/tuner.py | tuner.py | py | 4,659 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "census_constants.NUMERIC_FEATURE_KEYS",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "census_constants.VOCAB_FEATURE_DICT",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "census_constants.BUCKET_FEATURE_DICT",
"line_number": 17,... |
38340365833 | from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path
from drf_yasg import openapi
from drf_yasg.views import get_schema_view
from rest_framework.permissions import AllowAny
schema_view = get_schema_view(
openapi.Info(
... | starboy78/launchpad | launchpad/launchpad/urls.py | urls.py | py | 1,034 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "drf_yasg.views.get_schema_view",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "drf_yasg.openapi.Info",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "drf_yasg.openapi",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": ... |
32978808543 |
from django.db import models
from datetime import datetime, timedelta
import datetime
from booking_manager_api.models import EntityWorkingDays, TimeSlot
from booking_manager_api.models.base_model import BaseModel
from intel_api.models import UserEntity
class EntityBookingSchedule(BaseModel):
entity_working_day... | mutemip/testing-project | booking_manager_api/models/entity_booking_schedule.py | entity_booking_schedule.py | py | 1,648 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "booking_manager_api.models.base_model.BaseModel",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "django.db.models.ForeignKey",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "booking_manager_api.models.EntityWorkingDays",
"line_number": 13,... |
12475510192 | import sys
import os
import datetime
from datetime import timedelta
import pymysql.cursors
PDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(os.path.abspath(PDIR))
from settings import SmartAlphaPath, debug, get_portf_suffix
SETT = SmartAlphaPath()
sys.path.append(os.path.abspath(SETT.g... | taatuco/sa_data_collection | core/get_instr_perf_summ.py | get_instr_perf_summ.py | py | 8,101 | python | en | code | 5 | github-code | 18 | [
{
"api_name": "os.path.dirname",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sys.path.append",
"line... |
36082293755 | #! /usr/bin/env python3
# ####################################################################################
# #
# actione: action evaluation #
# given the xml <code>nn... | mctinker/Map-Tasker | maptasker/src/actione.py | actione.py | py | 11,940 | python | en | code | 6 | github-code | 18 | [
{
"api_name": "maptasker.src.actionc.action_codes",
"line_number": 73,
"usage_type": "name"
},
{
"api_name": "maptasker.src.actionc.action_codes",
"line_number": 74,
"usage_type": "name"
},
{
"api_name": "maptasker.src.error.error_handler",
"line_number": 78,
"usage_type"... |
36803536626 |
# Import Dependencies
import pandas as pd
import alpaca_trade_api as tradeapi
import datetime as dt
import nest_asyncio
nest_asyncio.apply()
import json
import requests
import time
starttime = time.time()
from alpaca_trade_api import REST
import os
from sqlalchemy import create_engine
import urllib
i... | KlaudiaGgg/crypto_project_alpaca_new | CRYPTO_POSITIONS_FINAL.PY | CRYPTO_POSITIONS_FINAL.PY | py | 4,294 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "nest_asyncio.apply",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pyodbc.connect",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.chdir",
"line_numbe... |
75266981159 | from functools import wraps, partial
# using convoluted name to really avoid namespace pollution
__rec_depth_kwargs_names = {
'depth': '__rec_depth_current_depth',
'default_return': '__rec_depth_default_return'
}
def rec_depth_limit(depth, default_return=0):
"""Decorator factory that limits the depth of ... | Joald/pyrec | pyrec.py | pyrec.py | py | 2,686 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "functools.wraps",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "functools.partial",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "functools.partial",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "functools.wraps",... |
6862437830 | __author__ = 'Louis-Pan'
import pytest
@pytest.mark.parametrize("x,y",[(3+5,8),(3+2,7),(3*8,20),])
def test_add(x,y): # 此处已经写死,必须是x,y与parametrize
assert x == y
if __name__=="__main__":
pytest.main(['-s','test_8_fixture_high_parameterize.py']) | panluluy/PythonBase | Louis/PytestFramework/PytestAdvance/test_8_fixture_high_parameterize.py | test_8_fixture_high_parameterize.py | py | 279 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pytest.mark.parametrize",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pytest.mark",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "pytest.main",
"line_number": 10,
"usage_type": "call"
}
] |
74647450278 | from flask import Flask, session, jsonify, request
import pandas as pd
import numpy as np
import pickle
from diagnostics import (
model_predictions, dataframe_summary, missing_data, execution_time,
outdated_packages_list
)
from scoring import score_model
import json
import os
# Set up variables for use in our... | ympaik87/a_dynamic_risk_assessment_system | app.py | app.py | py | 1,777 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "flask.Flask",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 21,
... |
12177824119 | # https://leetcode.com/problems/calculate-amount-paid-in-taxes/
from typing import List
def calculateTax(brackets: List[List[int]], income: int) -> float:
ans = prev = 0
for hi, pct in brackets:
hi = min(hi, income)
ans += (hi - prev)*pct/100
prev = hi
return ans
calculateTax()
| mathurk29/leetcode | contest.py | contest.py | py | 320 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "typing.List",
"line_number": 6,
"usage_type": "name"
}
] |
73193947881 | #!/usr/bin/env python3
import config, csv, glob, re, psycopg2, pytz
from datetime import datetime, timezone, time
from dateutil import parser
ticket = 0
pay_station = 1
stall = 2
license_plate = 3
purchased_date = 4
expiry_date = 5
payment_type = 6
transaction_type = 7
coupon_code = 8
excess_payment = 9
change_issued ... | teampavement/pavement | ap_importer.py | ap_importer.py | py | 9,677 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "datetime.time",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "datetime.timezone.utc",
"line_number": 45,
"usage_type": "attribute"
},
{
"api_name": "datetime.timezone",
"line_number": 45,
"usage_type": "name"
},
{
"api_name": "datetime.t... |
5047473231 | from datetime import datetime
#getting current time
now = datetime.now()
#getting time in Hr:Min:Sec format
current_time = now.strftime("%H:%M:%S")
#spliting Hour-Minute-Seconds into diffrent variables
current_timeH, current_timeM, current_timeS = current_time.split(":")
#making time name function
def time_name(x):
... | AstroCyber/ERA-2.0 | time_get.py | time_get.py | py | 1,256 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "datetime.datetime.now",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 4,
"usage_type": "name"
}
] |
74568379241 | from .models import EmployeeModel
from employer.models import Employer
from core.models import Address
from form_application.models import ApplicationModel
from django.core.exceptions import ValidationError
def process_data(request, data):
# Process Employer
try:
employer = Employer.objects.get(name=da... | anandharshini/cms-benefits | healthquestionaire/process_submitted_data.py | process_submitted_data.py | py | 2,390 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "employer.models",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "employer.models.Employer.objects.get",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "employer.models.Employer.objects",
"line_number": 10,
"usage_type": "attribute"
},... |
14619940448 | import asyncio
import logging
import discord
from discord.ext import commands
from kickflip_steps import KICKFLIP_STEPS
_logger = logging.getLogger(__name__)
class Kickflip(commands.Cog):
def __init__(self, bot: commands.Bot):
self.bot = bot
@commands.command()
@commands.max_concurrency(1, comm... | HumbleToS/Generic-Extensions | kickflip/kickflip.py | kickflip.py | py | 977 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "logging.getLogger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "discord.ext.commands.Cog",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "d... |
24088302152 | import openpyxl
import pycountry_convert as pc
import requests
import json
from datetime import datetime, timedelta
def FindXlCell(search_str, range=None):
"""
Iterate over a given 'range' match 'cell.value' with 'search_str'
:param search_str: String to find
:param range: Range to iterate, defaults t... | sharmaD91/InsuranceCheck | actions/validateCountry.py | validateCountry.py | py | 3,360 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pycountry_convert.country_alpha2_to_continent_code",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 60,
"usage_type": "call"
},
{
"api_na... |
43753603469 | import numpy as np
import pytest
import nengo
from nengo import spa
def test_basic():
class Basic(spa.SPA):
def __init__(self):
self.buffer = spa.Buffer(dimensions=16)
model = Basic()
input = model.get_module_input('buffer')
output = model.get_module_output('buffer')
assert ... | pblouw/blouw-etal-2016 | nengo-version/nengo/spa/tests/test_buffer.py | test_buffer.py | py | 2,363 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "nengo.spa.SPA",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "nengo.spa",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "nengo.spa.Buffer",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "nengo.spa",
"line_num... |
1630223738 | #!/usr/bin/python3
from flask import request, flash, render_template, url_for, redirect
from app.app import app
from models import storage, Level
@app.route('/admin/levels', methods=['POST'])
def admin_create_level():
"""Creates a Level program."""
level = request.form.get('level', None)
if not level:
... | sequainoo/lecturer_assessment | app/views/admin/level.py | level.py | py | 669 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "flask.request.form.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask.request.form",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "flask.fl... |
29828673380 | from selenium import webdriver
import time
from selenium.webdriver.common.keys import Keys
### Input Username ###
def input(identity, username):
driver.find_element_by_id(identity).send_keys(username)
time.sleep(2)
### Klik Button ###
def click(tags, ids):
driver.find_element_by_xpath(f"//{tags}[@class='{i... | fmaulana240699/Selenium-Python | Connect.py | Connect.py | py | 884 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "time.sleep",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Remote",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
... |
18692049080 | r"""
This module contains PyTorch dataset classes used during training and inference to load nanopolish-preprocessed data
"""
import os
import pandas as pd
import numpy as np
import torch
import json
import joblib
from ast import literal_eval
from .norm_utils import annotate_kmer_information, create_kmer_mapping_df, cr... | GoekeLab/m6anet | m6anet/utils/data_utils.py | data_utils.py | py | 27,787 | python | en | code | 86 | github-code | 18 | [
{
"api_name": "torch.utils.data.Dataset",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 45,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 46,
"usage_type": "name"
},
{
"api_name": "typing.Optio... |
36627831128 | from flask import Flask
import os
import shutil
if os.path.exists('./uploads/'):
shutil.rmtree('./uploads')
os.mkdir('./uploads')
UPLOAD_FOLDER = './uploads'
app = Flask(__name__)
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
app.secret_key = str(os.environ.get('DB_SK'))
| oliver-southon/CSVToSQL | app.py | app.py | py | 279 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "os.path.exists",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "shutil.rmtree",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.mkdir",
"line_number": ... |
9462890421 | import argparse
import os.path
import re
import pandas as pd
def get_total_networks_pruned_by_equivalence(log_file_path: str):
''' Returns the total count of networks pruned by the equivalence check. It is done by simply reading the debug log. '''
pruned_cells_count = 0
with open(log_file_path, 'r') as ... | AndreaFalanti/popnas | src/scripts/get_additional_info.py | get_additional_info.py | py | 2,212 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "re.search",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_... |
31513229222 | from selenium import webdriver
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.action_chains import ActionChains
from webscraper_utils import GeneralUtils
from tqdm import tqdm
import time, os, json
import csv
import argparse
import requests
import concurrent.futures
from urllib.request... | wookjinjang95/carconomic | data_scraper/carfax_selenium.py | carfax_selenium.py | py | 17,242 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "time.sleep",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "json.dumps",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.