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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4971763392 | #!/usr/bin/env python3
import sqlite3
import math
from flask import render_template, redirect, request
from flask import url_for
from os import path
from datetime import datetime
# import global config
from ..config import conf
# set blueprint object
from flask import Blueprint
blueprint = Blueprint('query', __name_... | medema-group/bigfamdb | flask_app/app/controllers/query.py | query.py | py | 31,883 | python | en | code | 5 | github-code | 21 | [
{
"api_name": "flask.Blueprint",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "config.conf",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "os.path.exists",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number... |
37411404044 | import sys
from PyQt5.QtWidgets import *
from PyQt5 import uic
form_class = uic.loadUiType('./PyQt_workspace/PyQt/pushbuttonTest2.ui')[0]
when_clicked_class = uic.loadUiType('./PyQt_workspace/PyQt/react_clicked.ui')[0]
class WindowClass(QMainWindow, form_class):
def __init__(self):
super().__init__()
... | GBDO/iot-jupyter_IoT_Edu | PyQt_workspace/PyQt/W_to_W_Test.py | W_to_W_Test.py | py | 907 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "PyQt5.uic.loadUiType",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "PyQt5.uic",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "PyQt5.uic.loadUiType",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "PyQt5.uic",
"lin... |
3313214217 | from selenium.webdriver import Chrome, ChromeOptions
from selenium.webdriver.common.keys import Keys
from json import dumps, load
from os.path import join, dirname
from time import sleep
def linkedin_login():
options = ChromeOptions()
options.add_experimental_option('excludeSwitches', ['enable-loggi... | Saransh-Tiwari-2002/LinkedIn-Job-Scrape | main.py | main.py | py | 8,234 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "selenium.webdriver.ChromeOptions",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "o... |
73385717812 | from unittest import TestCase
import torch
import torch.nn as nn
from models.tree_embedding_based_proba import TreeEmbeddingBasedProba
from models.vanilla_lstm import VanillaLSTM
from inference_loops.tree_per_tree_loop import TreePerTreeLoop
from evaluation.eval import eval
from evaluation.list_ops_no_batch_accuracy im... | avena554/listops_sandbox | vanilla.py | vanilla.py | py | 2,480 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "list_ops_processing.listops.ListOpsDataPoint",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "torch.tensor",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "torch.nn.Module",
"line_number": 18,
"usage_type": "attribute"
},
{
"ap... |
10217212199 | #!/usr/bin/env python3
import smtplib
from email import encoders
from email.mime.audio import MIMEAudio
from email.mime.base import MIMEBase
from email.mime.image import MIMEImage
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import mimetypes
import sys
__all__ = ["send_email"]
... | pkmcfarland/TSTools | python/src/tstools/util/nutils/nemail.py | nemail.py | py | 1,639 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "mimetypes.guess_type",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "email.mime.text.MIMEText",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "email.mime.image.MIMEImage",
"line_number": 29,
"usage_type": "call"
},
{
"api_name... |
7609744087 | import pandas as pd
import os
from sqlalchemy import create_engine
from config import *
def postgres_connect(user='db_admin',passwd='db_admin',db='movie_database'):
"""
postgres connection using psycopg2 module
:param user: str :usename
passwd : str : password
db : str : database
... | rajeshkbathula/movies_performance_report | script/postgres_feed_data.py | postgres_feed_data.py | py | 3,467 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sqlalchemy.create_engine",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.create_engine",
"line_number": 65,
"usage_type": "call"
}
] |
9141107198 | #!/usr/bin/env python3
import pickle
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
from trace import TraceStep
trace = pickle.load(open('trace.pick', 'rb'))
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
app = ... | lochbrunner/dash-introspector | introspector.py | introspector.py | py | 1,173 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pickle.load",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "dash.Dash",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "dash_html_components.Div",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "dash_html_components.H... |
30627137875 | import os
import torch
import numpy as np
import cv2
from PIL import Image
from torchvision import transforms
from torch.functional import F
from .model import *
torch.set_grad_enabled(False)
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
trans_forward = transforms.ToTensor()
tra... | zhaoyuzhi/Auto-Crop-Videos-and-Blur-Modelling | SuperSloMo/__init__.py | __init__.py | py | 7,333 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "torch.set_grad_enabled",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "torch.device",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.cud... |
71649575413 | import time
import requests
import os
#pylint: disable=import-error
if os.environ.get('SERVER_SOFTWARE','').startswith('Google'):
import requests_toolbelt.adapters.appengine
requests_toolbelt.adapters.appengine.monkeypatch()
#pylint: enable=import-error
def send(full_url, body, headers, config, method, raise... | PerimeterX/perimeterx-python-wsgi | perimeterx/px_httpc.py | px_httpc.py | py | 1,641 | python | en | code | 14 | github-code | 21 | [
{
"api_name": "os.environ.get",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "requests_toolbelt.adapters.appengine.adapters.appengine.monkeypatch",
"line_number": 9,
"usage_type": "call"... |
11989774246 | import torch
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as mp
import torchvision
import torch.nn.functional as F
#数据集
#模型选择
#损失函数
#训练循环
#train_set = torchvision.datasets.MNIST(root='E:\pytorch\线性回归\data',train=True,download=True)
#test_set = torc... | guessuppp/-Pytorchtrains- | 处理多维特征的输入.py | 处理多维特征的输入.py | py | 2,249 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "numpy.transpose",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "torch.Tensor",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "torch.Tensor",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number... |
33713821591 | import os.path
import sqlite3
def execute_query(query):
db_path = os.path.join(os.getcwd(), 'example.sqlite3')
connection = sqlite3.connect(db_path)
cursor = connection.cursor()
cursor.execute(query)
connection.commit()
records = cursor.fetchall()
return records
def top_tracks(count):
... | ZemiosLemon/HillelPythonAdvanced | leson_07/utils.py | utils.py | py | 991 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.path.join",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path.path",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "os.path",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "os.path.getcwd",
"line_n... |
13518759398 | from __future__ import division
from models import *
from utils.utils import *
from utils.datasets import *
from utils.parse_config import *
import os
from shutil import copyfile
from pathlib import Path
import sys
import time
import datetime
import argparse
import tqdm
import torch
from torch.utils.data import ... | osaukh/pollenpub | code/test.py | test.py | py | 31,046 | python | en | code | 10 | github-code | 21 | [
{
"api_name": "matplotlib.get_backend",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "matplotlib.use",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "torch.utils.data.Sampler",
"line_number": 48,
"usage_type": "name"
},
{
"api_name": "pandas... |
33853402833 | import pygame, time, math, random, sys
from pygame.locals import *
pygame.init()
screen = pygame.display.set_mode((1280 , 800)) # 設定介面大小
background = pygame.Surface((1280, 800)) # 設定畫布大小
background.fill(( 0 , 0 , 120 )) # 填入顏色
FPS = 60
clock = pygame.time.Clock()
class Superdonut():
def __init__(self)... | bkwmt/PBC109-1RunningGame | final project.py | final project.py | py | 1,977 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pygame.init",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "pygame.Surface",... |
22381443397 | # Пути для HTTP
from datetime import datetime
from django.urls import path, re_path
from django.contrib import admin
from django.contrib.auth.views import LoginView, LogoutView
from app import forms, views
urlpatterns = [
# Киоск
path('kiosk/', views.kiosk, name='kiosk'),
path('kiosk/kioskbtn', views.kiosk... | DmitryOgorodnikov/VKR | VKR/VKR/urls.py | urls.py | py | 3,938 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.urls.path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "app.views.kiosk",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "app.views",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "django.urls.path",
... |
24225675022 | from pydantic import BaseSettings
from typing import Optional
class MongoSettings(BaseSettings):
connection_string: Optional[str]=None
collection: str = "puzzles_dev"
class Config:
env_prefix = "MONGO_"
env_file = ".env"
env_file_encoding = "utf-8"
class AuthSettings... | mikiva/lemodikrysset-api | settings.py | settings.py | py | 656 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pydantic.BaseSettings",
"line_number": 3,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "pydantic.BaseSettings",
"line_number": 15,
"usage_type": "name"
}
] |
149750003 | import pika
import uuid
import json
CLIENTNAME = str(uuid.uuid1())
JOINEDSERVERS = []
class DiscordClient(object):
def __init__(self):
self.connection = pika.BlockingConnection(
pika.ConnectionParameters(host="localhost"))
self.channel = self.connection.channel()
result = sel... | meetakshi253/DSCD-Winter-2023 | 28_a1/rabbitmq/client_2.py | client_2.py | py | 6,911 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "uuid.uuid1",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pika.BlockingConnection",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pika.ConnectionParameters",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "uuid.uuid... |
13361227791 | # Actions to take
from datetime import datetime
from util.ektools import warn, error
def checkdate():
zeros = 0
suspicious = 0
def check(obj):
nonlocal zeros
nonlocal suspicious
if obj is None:
if zeros + suspicious > 0:
warn(f'There were {zeros + suspici... | ketil-malde/ektools | util/actions.py | actions.py | py | 5,041 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "util.ektools.warn",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "util.ektools.warn",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "util.ektools.warn",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "util.ektools.wa... |
22276584500 | from tkinter import *
from tkinter import messagebox
from PIL import ImageTk, Image
import emoji
import sqlite3
root = Tk()
root.title("Database")
root.geometry("350x450")
# Creating a database
conn = sqlite3.connect("address_book.db")
# Creating a cursor
c = conn.cursor()
# Creating a table
'''
c.execute("""CREATE... | NNikoGG/tkinter-gui | database.py | database.py | py | 6,634 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sqlite3.connect",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect",
"line_number": 67,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect",
... |
74322883892 | #!/usr/bin/env python
import urllib, socket
import xml.etree.ElementTree as ET
host_name = ".".join(socket.gethostname().split(".")[:-1])
url = "https://beamapp.ci.cloudbees.com/computer/api/xml?depth=1"
data = urllib.urlopen(url)
computerSet = ET.parse(data).getroot()
for computer in computerSet.iter("computer"):
... | BeamApp/Transit | scripts/cloudbees-am-i-on.py | cloudbees-am-i-on.py | py | 429 | python | en | code | 152 | github-code | 21 | [
{
"api_name": "socket.gethostname",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "urllib.urlopen",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree.parse",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "xml.etree.... |
27542326578 | import scipy.io as sio
import numpy as np
import pandas as pd
from pathlib import Path
from .pyphm import PHMDataset
import datetime
import time
import multiprocessing as mp
from typing import Any, Callable, List, Optional, Tuple
from .utils import (
download_and_extract_archive,
extract_archive,
... | tvhahn/PyPHM | src/pyphm/datasets/ims.py | ims.py | py | 12,883 | python | en | code | 12 | github-code | 21 | [
{
"api_name": "pyphm.PHMDataset",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 56,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 59,
"usage_type": "name"
},
{
"api_name": "numpy.ndarray",
"line_... |
37223526372 | #! /usr/bin/env python3
try:
import watchdog
except ModuleNotFoundError:
from subprocess import call
call('pip install watchdog',shell=True)
# Module
import os
from os import scandir, rename, getcwd
from time import sleep
from os.path import exists, join, splitext
from watchdog.observers import Observ... | demirezenmert/File-Organizer | file_manager_automation.py | file_manager_automation.py | py | 5,836 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "subprocess.call",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "watchdog.events.FileSystemEventHandler",
"line_number": 64,
"usage_type": "name"
},
{
"api_name": "os.scandir",
"line_number": 71,
"usage_type": "call"
},
{
"api_name": "time... |
73027830773 | import logging
from collections import OrderedDict
from stream_alert.parsers import get_parser
logging.basicConfig()
logger = logging.getLogger('StreamAlert')
class InvalidSchemaError(Exception):
"""Raise this exception if a declared schema field type does not match
the data passed."""
pass
class Stre... | LiuFang816/SALSTM_py_data | python/airbnb_streamalert/streamalert-master/stream_alert/classifier.py | classifier.py | py | 10,797 | python | en | code | 9 | github-code | 21 | [
{
"api_name": "logging.basicConfig",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "stream_alert.parsers.get_parser",
"line_number": 230,
"usage_type": "call"
},
{
"api_name": "... |
37043140358 | from typing import Dict, List, NoReturn, Optional, Tuple
from datetime import datetime as dt, timedelta
from random import choice, random, shuffle
from json import load as _load
from os import remove
import webbrowser
import re
from speech_worker import SpeechWorker
from my_logger import logger
from tokens import toke... | StrangeArcturus/iva-sigma | voice_assistant.py | voice_assistant.py | py | 38,817 | python | ru | code | 0 | github-code | 21 | [
{
"api_name": "speech_worker.SpeechWorker",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "typing.Dict",
"line_number": 37,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 37,
"usage_type": "name"
},
{
"api_name": "typing.List",
... |
10404355414 | import os, sys, argparse, lmdb, fire
import pandas as pd
from sklearn.model_selection import train_test_split
from tqdm.auto import tqdm
prj_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.append(prj_dir)
def get_train_val_df(path, seed=42):
train_path = os.path.join(path, 'data', 'train.csv')
df = ... | co1dtype/Dacon_Text_Recognition | create_lmdb.py | create_lmdb.py | py | 2,839 | python | en | code | 0 | github-code | 21 | [
{
"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... |
21087160482 | import shutil
import os
import pytest
ROOTDIR = os.getcwd()
TARGET = 'AutoStructureFilesForDFplayer.py'
PLAYLISTFOLDER = 'PlayListsM3U'
SDCARDFOLDER = 'SDcardFolders'
TESTFOLDER = 'test'
DUMMYPLAYLISTS = os.sep.join([ROOTDIR, TESTFOLDER, 'm3u_source'])
DUMMYCONTENT = os.sep.join([ROOTDIR, TESTFOLDER, 'mp3_source'])
... | Schallbert/DFplayer_AutoStructureFromPlaylist | integration_test.py | integration_test.py | py | 3,556 | python | en | code | 8 | github-code | 21 | [
{
"api_name": "os.getcwd",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.sep.join",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.sep",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "os.sep.join",
"line_number": 11,... |
14460044202 | from flask import jsonify
from flask_jwt_extended import get_jwt_identity, jwt_required
from src.models.Curso import Curso
from src.models.User import User
from src.services.CursoService import CursoService
@jwt_required
def get_curso_from_user():
coord: User = User.objects(id=get_jwt_identity()).get()
curso... | LucasFlaquer/plano-aula-api | src/controllers/CoordenadorController.py | CoordenadorController.py | py | 840 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "src.models.User.User",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "src.models.User.User.objects",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask_jwt_extended.get_jwt_identity",
"line_number": 11,
"usage_type": "call"
},
{
... |
9954606241 | import os
from flask import Flask, render_template
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_bcrypt import Bcrypt
from flask_login import LoginManager
from flask_mail import Mail
app = Flask(__name__)
app.config['SECRET_KEY'] = '840bd878d3b9abaddcc64c e086b6f391'
app.config[... | tylerdurdenfc1/handytools | CURRENT - Password-Reset-Email/flaskblog/__init__.py | __init__.py | py | 1,122 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Flask",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask_sqlalchemy.SQLAlchemy",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "flask_migrate.Migrate",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "flask_bc... |
17288356017 | import serial
import time
import json
import os
ser = serial.Serial('COM6',9600,timeout =1)
def PM_monitor():
data = ser.read(10)
pm25_low = int(data[2].encode('hex'),16)
pm25_high = int(data[3].encode('hex'),16)
pm25=((pm25_high*256) + pm25_low)/10
pm10_low = int(data[4].encode('hex'),16)
pm... | OccupiedTheName/MEMS_Project | serial_read_program.py | serial_read_program.py | py | 707 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "serial.Serial",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 19,
"usage_type": "call"
}
] |
42378066715 | # check version
#%%
import azureml.core
print("This notebook was created using version 1.0.45 of the Azure ML SDK")
print("You are currently using version", azureml.core.VERSION, "of the Azure ML SDK")
# AML workspace info
#%%
import myinfos
subscription_id = myinfos.subscription_id
resource_group = myinfos.resour... | mddiallo/AML-service | 00_setup.py | 00_setup.py | py | 2,466 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "azureml.core.core",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "azureml.core",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "myinfos.subscription_id",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "myinfo... |
8059778483 | from argparse import ArgumentParser
import csv
import json
import logging
import os
import pkg_resources
import sys
import traceback
from dateutil import tz
import validictory
from unicorn_backend.param_finder import findParameters
from unicorn_backend.param_finder import MAX_NUM_ROWS
from unicorn_backend.utils impo... | bopopescu/numenta-apps-archived-htm.it-grokcli-htmitmobile | unicorn/py/unicorn_backend/param_finder_runner.py | param_finder_runner.py | py | 6,151 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 75,
"usage_type": "name"
},
{
"api_name": "json.loads",
"line_number": 96,
"usage_type": "call"
},
{
"api_name": "pkg_resources.re... |
19708293463 | """ script to preprocess hetionet dataset and construct entity info file """
from argparse import ArgumentParser
from collections import defaultdict
import json
import re
import requests
import os
from Bio import Entrez
from bs4 import BeautifulSoup
import pandas as pd
from tqdm import tqdm
# command-line arguments... | rahuln/lm-bio-kgc | data/script/hetionet/preprocess_hetionet.py | preprocess_hetionet.py | py | 10,096 | python | en | code | 42 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pandas.read_table",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "tqdm.tqdm",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "requests.get",
... |
3959634756 | import argparse
from fusion import Fusion
import math
parser = argparse.ArgumentParser(description="Integrate accel+gyro+magnet data for the human gait dataset.")
parser.add_argument('--start', default=5, type=int, help='the column of the first accelerometer data')
parser.add_argument('target_file', help='the relative... | jpiland16/hmv-scratchpad | data-playground/datatype_handlers/micropython_fusion/fusiontest_gait.py | fusiontest_gait.py | py | 2,679 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "fusion.Fusion",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "math.pi",
"line_number": 20,
"usage_type": "attribute"
}
] |
28602687003 | #!/usr/bin/env python
#This script first collects medications found in RxList medication database in alphabetical order.
#After collecting medications it will check if the collected medication returns a valid search because
#Rxlist.com store their medication either by their generic name or brand name.
from requests i... | juanbrena/RxList-web-scraper | find_rxlist_meds.py | find_rxlist_meds.py | py | 4,050 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "contextlib.closing",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "requests.exceptions.RequestException",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "... |
5154952393 | from tkinter import *
from customtkinter import*
from tkinter import ttk
import cv2
from PIL import Image, ImageTk
class Tenant():
def __init__(self, root):
self.root = root
self.root.geometry("1000x500+180+60")
self.root.title("Tenant Management System")
main_f = CTkFrame(self.ro... | FLIVIAN/TENANT-MANAGEMENT-SYSTEM | tenant.py | tenant.py | py | 1,491 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "PIL.Image.fromarray",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "cv2.cvtColor",
"li... |
3514340050 | # -*- coding: utf-8 -*-
"""
Created on Thu Jul 16 13:51:24 2020
@author: Aldo
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
#import seaborn as sns
from sklearn.feature_extraction import text
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.cluster import KMeans
... | FrancescoPetrosino/SpeechAnalyzer | python/bin/MachineL/API.py | API.py | py | 2,440 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "nltk.tokenize.RegexpTokenizer",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "nltk.stem.snowball.SnowballStemmer",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "sklearn.feature_extraction.text.lower",
"line_number": 31,
"usage_type":... |
35985601827 | # # import os
# # import re
# # import time
# # import RestAPI
# from requests_toolbelt import MultipartEncoder
# # cx = RestAPI.CxRestAPI()
# # def check_tool_checkmarx(src):
# # global project_name, team_id
# # #print("* Welcome to use this scripts! *")
# # #flag = input("- Do you want to create a new pr... | thanhngtdev/SAST_PROJECT | projects/tests.py | tests.py | py | 12,302 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.exists",
"line_number": 166,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 167,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 169,
"usage_type": "call"
},
{
"api_name": "CheckmarxPythonSDK.C... |
32555464378 | #!/usr/bin/python
'''
# Exploit Title: Centreon v19.04 authenticated Remote Code Execution
# Date: 28/06/2019
# Exploit Author: Askar (@mohammadaskar2)
# CVE : CVE-2019-13024
# Vendor Homepage: https://www.centreon.com/
# Software link: https://download.centreon.com
# Version: v19.04
# Tested on: CentOS 7.6 / PHP 5.4.... | ryanmrestivo/red-team | _Resources/Exploit DB 2021-12-11/exploits/php/webapps/47069.py | 47069.py | py | 3,244 | python | en | code | 91 | github-code | 21 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"l... |
12902308235 | # -*- coding: utf-8 -*-
"""
Created on Sat Feb 5 16:32:44 2022
@author: changai
"""
from ase.db import connect
from ase.visualize import view
# from ase.geometry import get_distances
import numpy as np
import pandas as pd
def view_db(db_name):
"""View all structures in the database"""
db = connect(db_name)
... | changzhiai/PlotPackage | plotpackage/myproject/version3/bond_length.py | bond_length.py | py | 4,582 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "ase.db.connect",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "ase.visualize.view",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"li... |
72076239733 | import json
from plotly.graph_objs import Scattergeo, Layout
from plotly import offline
# Extract all data.
# For most up-to-date data, go to
# https://earthquake.usgs.gov/earthquakes/feed/v1.0/geojson.php
filename = 'data/1.0_month.json'
with open(filename, encoding='utf8') as f:
all_eq_data = json.load(f)
# Ge... | srenegado/pycrashcourse | ch16/eq_world_map.py | eq_world_map.py | py | 1,178 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "json.load",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "plotly.graph_objs.Layout",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "plotly.offline.plot",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "plotly.offline... |
978555057 | import glob
from os import path
import config
from load import create_load, read_load
from strava import load_strava_activity
from utility import log, exit_on_error
def print_info():
dir = config.get_download_dir()
if dir is None:
print("No load directory configured. To set, use 'heroscript config... | chs8691/heroscript | cmd_load.py | cmd_load.py | py | 2,410 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "config.get_download_dir",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "utility.exit_on_error"... |
74813879091 | '''
It is used to preprocess the data, the data comes from kaggle dataset!
The data is not concluded in the project. Therefore, if you just want to run AIRadiologist, you should not run this file!
The dataset is different from the data in preprocessing.py, with contains 704 normal pictures and 700 tuberculosis pictures... | 123123123nhc/AIRadiologist | BIA_PROJECT/preprocessing_ImageWithMask.py | preprocessing_ImageWithMask.py | py | 2,665 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.walk",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "matplotlib.image.imread",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "matplotlib.image",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"... |
43987146797 | import requests
import json
import os
previous_points = {}
def create_players(players):
with open('players.txt', 'w') as outfile:
json.dump(players, outfile)
def get_detailed_players(player_id):
r = \
requests.get(url='https://fantasy.premierleague.com/api/element-summary/'
... | Ebisuu/Fantasy-premier-league-helper | create-files.py | create-files.py | py | 2,130 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "json.dump",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 49,
... |
14050747335 | # Common imports
import numpy as np
from PIL import Image
# TensorFlow imports
# may differs from version to versions
import tensorflow as tf
from tensorflow import keras
# OpenCV
import cv2
# Flask
from flask import request
from app import db
from app.model.user import User
##from sqlalchemy import text
# def get... | bintangkurniawanpp/face-recognition-unej | flask-api/app/controller/PredictController.py | PredictController.py | py | 7,045 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "cv2.CascadeClassifier",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "cv2.data",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.keras.models.load_model",
"line_number": 40,
"usage_type": "call"
},
{
"api_name":... |
32181460315 | import logging
from typing import TYPE_CHECKING
import dask.dataframe as dd
import pandas as pd
from dask_sql.datacontainer import ColumnContainer, DataContainer
from dask_sql.physical.rel.base import BaseRelPlugin
from dask_sql.physical.utils.ml_classes import get_cpu_classes, get_gpu_classes
from dask_sql.utils imp... | dask-contrib/dask-sql | dask_sql/physical/rel/custom/create_experiment.py | create_experiment.py | py | 9,488 | python | en | code | 336 | github-code | 21 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "logging.getLogger",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "dask_sql.physical.utils.ml_classes.get_cpu_classes",
"line_number": 18,
"usage_type": "call"
},
... |
38311572282 | import os
import glob
import json
from datetime import datetime
import numpy as np
import pandas as pd
from rdkit import Chem
from rdkit.Chem import Draw
from sklearn.model_selection import train_test_split
from functools import partial
from multiprocessing import Pool
def smiles2img(row, save_path, smiles_col, file_n... | yuxin212/GPCR-public | scripts/prepare_dataset.py | prepare_dataset.py | py | 11,974 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "rdkit.Chem.MolFromSmiles",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "rdkit.Chem",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "rdkit.Chem.Draw.MolsToGridImage",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "r... |
10198395643 | #!/usr/bin/env python
# encoding: utf-8
"""
@version: ??
@author: liangliangyy
@license: MIT Licence
@contact: liangliangyy@gmail.com
@site: https://www.lylinux.net/
@software: PyCharm
@file: manager.py
@time: 2018/6/9 上午12:59
"""
from accounts.models import WxUserModel, UserModel
from django.utils.timezone import ... | XiaoBiaoBai/xiaobiaobai.api | weixin/manager.py | manager.py | py | 3,708 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "weixin.weixinapi.wxutils.get_wx_config",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "weixin.weixinapi.wxpay.WeixinPay",
"line_number": 38,
"usage_type": "call"
},
... |
28640013355 | # encoding: utf-8
"""
Expose the multiengine controller over the Foolscap network protocol.
"""
__docformat__ = "restructuredtext en"
#-------------------------------------------------------------------------------
# Copyright (C) 2008 The IPython Development Team
#
# Distributed under the terms of the BSD Licens... | lumanjiao/XLS_BigData_Hue | build/env/lib/python2.7/site-packages/ipython-0.10-py2.7.egg/IPython/kernel/multienginefc.py | multienginefc.py | py | 30,932 | python | en | code | 13 | github-code | 21 | [
{
"api_name": "zope.interface.Interface",
"line_number": 70,
"usage_type": "name"
},
{
"api_name": "foolscap.Referenceable",
"line_number": 86,
"usage_type": "name"
},
{
"api_name": "zope.interface.implements",
"line_number": 90,
"usage_type": "call"
},
{
"api_nam... |
2422894151 | """
This is the core script for the pyplantie framework.
The brains of the operation.
UI apps may communicate with this module but are able to send commands directly to the rwis.
Main goals:
- Trigger events
- Redirect sensor data to databases
- Store config values
- Should be able to kill or start new ... | franciscoaze/plantie-plantie | pyplantie/core.py | core.py | py | 4,476 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "logging.WARNING",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "pyplantie.utils.constants.SQL_DEBUG_LEVEL",
"line_number": 24,
"usage_type": "argument"
},
{
... |
7367520340 | from google_images_download import google_images_download
from political_sisterhood.candidate.models import Candidate
import logging
from django.core.files.base import ContentFile
from PIL import Image as PImage
from django.core.files import File
logger = logging.getLogger(__name__)
import os
def run():
for candi... | 2019politicalsisterhood/2019Candidates | scripts/head.py | head.py | py | 1,128 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "political_sisterhood.candidate.models.Candidate.objects.filter",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "political_sisterhood.candidate.models.Candidate.objects",
"li... |
15742176208 | from bs4 import BeautifulSoup
import requests
import time
def find_jobs():
html_text=requests.get('https://www.facebook.com/').text
#print(html_text)
soup =BeautifulSoup(html_text, 'lxml')
jobs = soup.find_all('div',class_='du4w35lb k4urcfbm l9j0dhe7 sjgh65i0')
#defining class of different f... | dihanahmed/beautiful_soup | facebook_scraping/main.py | main.py | py | 686 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "requests.get",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 10,
"usage_type": "call"
}
] |
32340302120 | import pandas as pd
import os
import matplotlib.pyplot as plt
import numpy as np
class Trading:
def get_portfolio_return(self, invest_ratio_path, inv_r_name, stockspath, stock_name_end, trading_date_df,
end_date):
'''
get portfolio return according to the invest ratio... | Ryettt/PCA_factors_analysis | trading.py | trading.py | py | 4,329 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "pandas.merge",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"... |
4659131594 | r"""Functional interface"""
import torch
import pydec
from torch import Tensor
import torch.nn.functional as F
from .._composition import Composition, IndexComposition
from pydec.core.decOVF import (
get_decomposition_func,
get_decomposition_name,
)
from pydec import core
from ..overrides import _a... | NJUNLP/pydec | pydec/nn/functional.py | functional.py | py | 34,228 | python | en | code | 7 | github-code | 21 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 59,
"usage_type": "name"
},
{
"api_name": "torch.types._dtype",
"line_number": 63,
"usage_type": "name"
},
{
"api_name": "typing.TypeVar",
"line_number": 67,
"usage_type": "call"
},
{
"api_name": "_composition.C... |
71589731893 | import datetime
from django.contrib.auth.mixins import PermissionRequiredMixin
from django.contrib.messages.views import SuccessMessageMixin
from django.shortcuts import render, get_object_or_404, redirect
from django.views.generic import ListView, DetailView
from django.views.generic.edit import CreateView, UpdateVie... | chrisbay/library.kdhx.org | albums/views.py | views.py | py | 7,792 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.views.generic.ListView",
"line_number": 37,
"usage_type": "name"
},
{
"api_name": "albums.models.Album",
"line_number": 41,
"usage_type": "name"
},
{
"api_name": "django.shortcuts.redirect",
"line_number": 51,
"usage_type": "call"
},
{
"api_n... |
73810868851 | import sys
import geopandas as gpd
import matplotlib.pyplot as plt
from PIL import Image
def convert_shp_to_bw_png(path_to_shapefile, resulting_name, chosen_dpi=1000):
"""
This function converts a shapefile to a black and white png image.
:param path_to_shapefile: path to the shapefile
:param resulti... | menisadi/medial-axis-of-shapefiles | convert_shp_to_bw_png.py | convert_shp_to_bw_png.py | py | 1,076 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "geopandas.read_file",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "matp... |
36775071096 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('corpus', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='LanguageSession',
fields=[
... | nanchenchen/emoticon-analysis | emoticonvis/apps/corpus/migrations/0002_auto_20160317_0033.py | 0002_auto_20160317_0033.py | py | 1,928 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.CreateModel",
"line_number": 14,
"usage_type": "call"
},
... |
7905525642 | """Retrieve funding stats related to Tidelift funding."""
import argparse
from typing import Union
import requests
from funderfinder.utils.github_sources import get_funding_sources
from ._finder import Finder
class TideliftFinder(Finder):
name = "Tidelift"
@staticmethod
def is_funded(text: str) -> boo... | georgetown-cset/funder-finder | funderfinder/sources/tidelift.py | tidelift.py | py | 2,601 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "_finder.Finder",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "funderfinder.utils.github_sources.get_funding_sources",
"line_number": 50,
"usage_type": "call"
},
{
... |
12589999323 | import os
from rdkit import Chem
from rdkit.Chem import Draw, AllChem
#from rdkit.Chem.Draw import IpythonConsole
from rdkit.Chem import Descriptors
def Mol2MolSupplier (file=None, sanitize=False):
mols=[]
with open(file, 'r') as mol2_file:
mol2_lines = mol2_file.readline()
while not ... | tomdyer11/mol_opener2 | mol2_file_opener.py | mol2_file_opener.py | py | 2,055 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.fstat",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.fstat",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "rdkit.Chem.MolFromMol2Block",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "rdkit.Chem",
"line_... |
38624289986 | import cv2 as cv
import mediapipe as mp
import time
import HandTrackingModule as htm
prev_time = 0
curr_time = 0
cap = cv.VideoCapture(0)
detector = htm.handDetector()
while True:
ret,img = cap.read()
img = detector.findHands(img,draw = False)
lm_list = detector.findPosition(img,draw=... | Tanmay2262/Hand-Tracking-Module | trial.py | trial.py | py | 671 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "HandTrackingModule.handDetector",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "cv2.putText"... |
30981741747 | import os
import requests
from PIL import Image
from flask import Flask, render_template, request, send_file
from werkzeug.utils import secure_filename
from module import transform
app = Flask(__name__, static_url_path='/static')
os.makedirs(os.path.join(app.instance_path, 'uploads'), exist_ok=True)
@app.route("/"... | mrizwan18/Transform-and-Homography-API | index.py | index.py | py | 3,113 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Flask",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.makedirs",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,... |
71259965813 | from selenium import webdriver
from selenium.webdriver import ActionChains
browser = webdriver.Chrome()
browser.get("https://www.runoob.com/try/try.php?filename=jqueryui-api-droppable")
browser.switch_to.frame("iframeResult")
source = browser.find_element_by_id("draggable")
target = browser.find_element_by_id("droppab... | Bruceey/Spider_Learning | 07、Selenium/Demo04_actionChain.py | Demo04_actionChain.py | py | 406 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.ActionChains",
"line_number": 9,
"usage_type": "call"
}
] |
42008197187 | from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
# driver = webdriver.Chrome(executable_path="D:\ProgramApp\chromedriver\chromedriver73.exe")
driver = webdriver.Chrome(executable_path=r"D:\Study\python\tools\chromedriver.exe")
# driver.get("https://www.zhihu.com/signin?n... | 164622456/python | 05爬虫进阶/02动态网页爬虫/04行为链.py | 04行为链.py | py | 1,286 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.common.action_chains.ActionChains",
"line_number": 26,
"usage_type": "call"... |
71342561013 | """Create config files for dataset model combinations."""
import argparse
import itertools
import subprocess
import os
def main():
parser = argparse.ArgumentParser()
parser.add_argument('sacred_experiment')
parser.add_argument('--name', type=str, required=True, action='append')
parser.add_argument('--... | BorgwardtLab/topological-autoencoders | scripts/configs_from_product.py | configs_from_product.py | py | 1,316 | python | en | code | 120 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "itertools.product",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.path",
... |
7377102124 | """
1. entry.583024700 : "隨便打名字"
2. entry.1000003 : "6月"
3. entry.2789839 : "1日"
4. entry.1000005 : "206"
# 加入學生名單
5 entry.1000006_sentinel
entry.1000006 : 毛彥森 邱耀毅 謝昀燊
6 fvv : 1
7. draftResponse : [null, null, "這邊數字要先抓"]
8. pageHistory : 0 (都是0)
9. fbzx : 每次都要抓
"""
import requests
from bs4 import BeautifulSoup... | arthurtibame/Auto_GoogleForm | google.py | google.py | py | 2,152 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "requests.Session",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "urllib3._collections.HTTPHeaderDict",
"line_number": 32,
"usage_type": "call"
},
{
"api_name":... |
4822360707 | #############################################################################################################
# This code was created by Alessandro Marins (University of Sao Paulo) and is owned by BINGO Telescope
#
# Its use is to extract optical data from Pan-STARRS1 telescope
#
# Any question about your operation, pl... | multinverse/PS1zxcorr | run_pixels_PS1zxcorr.py | run_pixels_PS1zxcorr.py | py | 7,382 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "sys.version_info",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "ConfigParser.RawConfigParser",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "sys.version_info",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name... |
33749324123 | import re
from setuptools import setup, find_packages
# Read property from project's package init file
def get_property(prop, project):
result = re.search(r'{}\s*=\s*[\'"]([^\'"]*)[\'"]'.format(prop),
open(project + '/__init__.py').read())
return result.group(1)
setup(
name='rayli... | bytedance/raylink | setup.py | setup.py | py | 691 | python | en | code | 34 | github-code | 21 | [
{
"api_name": "re.search",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "setuptools.setup",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",
"line_number": 16,
"usage_type": "call"
}
] |
73849385334 | import os
import requests
import pprint
from dotenv import load_dotenv
import pandas as pd
load_dotenv()
api_key = os.getenv("API_KEY")
token = os.getenv("BEARER_TOKEN")
api_version = 3
app_base_url = f"https://api.themoviedb.org/{api_version}"
endpoint_path = f"/search/movie"
query = "The Matrix"
endpoint = f"{app_... | artespankov/python-30-days | Day 0/main.py | main.py | py | 1,164 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number"... |
8334943873 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Tweet',
fields=[
('id', models.AutoField(verbos... | Doris1989/A-twitter-heat-map-website | mysite/migrations/0001_initial.py | 0001_initial.py | py | 852 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.CreateModel",
"line_number": 13,
"usage_type": "call"
},
... |
13200411525 | import copy
__all__ = ("FULL_DATA", "GUI_SETTINGS", "VEHICLE_STATE", "DRIVE_STATE", "CHARGE_STATE", "ATTRS", "KEYS", "CLIMATE_STATE")
KEYS = [
"charge_state",
"climate_state",
"drive_state",
"gui_settings",
"vehicle_config",
"vehicle_state",
]
FULL_DATA = {
"access_type": "OWNER",
"ap... | Hellowlol/tesla_api | tests/data.py | data.py | py | 8,068 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "copy.deepcopy",
"line_number": 210,
"usage_type": "call"
},
{
"api_name": "tesla_api.TeslaApiClient",
"line_number": 248,
"usage_type": "call"
},
{
"api_name": "tesla_api.misc.diff",
"line_number": 254,
"usage_type": "call"
},
{
"api_name": "asyncio... |
42605508818 | from ..forms import AddTaskForm
from ..models import Shift, Manager, Member, Priority, Status
from mixer.backend.django import mixer
import pytest
@pytest.mark.django_db
class TestForms:
def test_AddTaskForm_is_valid(self):
manager = mixer.blend(Manager, user__is_manager=True)
shift = mixer.blend... | taiyeoguns/shiftmgr-django | shifts/tests/test_forms.py | test_forms.py | py | 844 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "mixer.backend.django.mixer.blend",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "models.Manager",
"line_number": 11,
"usage_type": "argument"
},
{
"api_name": "mixer.backend.django.mixer",
"line_number": 11,
"usage_type": "name"
},
{
"ap... |
27777222845 | import d3rlpy
import json
import yaml
import os
import sys
import argparse
import pickle
import mzutils
from tqdm import tqdm
import numpy as np
import pandas as pd
import random
import copy
# from d3rlpy.gpu import Device
import mzutils
from pensimpy.examples.recipe import Recipe, RecipeCombo
from pensimpy.data.consta... | Mohan-Zhang-u/smpl-experiments | pensimenv_experiments/offline_data_generation.py | offline_data_generation.py | py | 4,192 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "sys.path.insert",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number... |
74322239094 | from rest_framework import serializers
from .models import Post, Comment
class CommentSerializer(serializers.ModelSerializer):
post = serializers.ReadOnlyField(source='post.title')
class Meta:
model = Comment
fields = (
'id',
'author',
'email',
... | lemeshkoborys/k-art-rest-backend | news_app/serializers.py | serializers.py | py | 976 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "rest_framework.serializers.ModelSerializer",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "rest_framework.serializers.ReadOnlyField",
"line_number": 7,
"us... |
9733181754 | import keras
from keras.layers import LSTM, Dense, Dropout
from keras.models import Sequential
from keras.callbacks import TensorBoard
import sklearn
from sklearn.metrics import roc_curve,auc
import numpy as np
from numpy import savetxt
import skimage
from skimage import io
from skimage.transform import resize
from mat... | Cassie106/-FOGCare | FoG_Classifier.py | FoG_Classifier.py | py | 3,723 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.join",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 1... |
29256550772 | # *mpl_finance*
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import os
import numpy as np
import matplotlib.dates as dates
import mplfinance as mpf
filename = 'F:\GitHub\My_data_set\I/20131018.csv'
test_ratio = 0.2
filepath = 'F:\GitHub\My_data_set\I'
# df_stock = pd.read_csv(filename)
pl... | xinming365/quantitative-trading-exercise | process_data.py | process_data.py | py | 6,971 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "matplotlib.pyplot.rcParams",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "pandas.read_csv",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "os.... |
11986909480 | from __future__ import absolute_import
import json
import time
import sys
from .result import Result
from .naming import normalize_kinds, normalize_kind, qname_matches
from .model import *
from .util import split_names, is_collection_type
from .action import oc_action
from .context import cur_context
from . import ut... | openshift/openshift-client-python | packages/openshift/selector.py | selector.py | py | 33,586 | python | en | code | 60 | github-code | 21 | [
{
"api_name": "naming.normalize_kind",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "result.Result",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "naming.normalize_kinds",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "util.is_co... |
4974152117 | # -*- coding: utf-8 -*- #
import os
import glob
import json
import time
PATH_SERIES_COLLECTED = os.path.join(os.curdir, 'urls_series_collected')
PATH_SERIES_AGGREGATED = os.path.join(os.curdir, 'urls_series_aggregated')
def aggregate_series_urls():
"""
Gathers all the JSON files from the 'urls_series_coll... | moussa75XIX/projet_allocine | data-acquisition-allocine/aggregate_urls.py | aggregate_urls.py | py | 1,291 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.join",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "os.curdir",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_num... |
38173489112 | import os, subprocess, csv, datetime
def get_subdirectories(mother_directory, extension = None):
if extension is None:
dir_list = [sub_dir for sub_dir in os.listdir(mother_directory)
if not sub_dir.startswith('.') and not sub_dir.endswith('\r')]
else:
dir_list = [sub_dir fo... | glossm/data | ASK_preprocess/modules.py | modules.py | py | 3,652 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "os.listdir",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.splitext",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 35,... |
15173959528 | import pygame
from random import randint
import time
pygame.init()
size = (500, 500)
window = pygame.display.set_mode((size))
pygame.display.set_caption("Heapsort")
black = pygame.Color(0, 0, 0)
white = pygame.Color(255, 255, 255)
ourlist = []
listLength = 100
xList, y, w = [], 0, 5
tmpX = 0
for i in r... | brockellefson/IntrospectiveSortResearch | HeapSort.py | HeapSort.py | py | 1,334 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "pygame.init",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "pygame.display.s... |
36894671103 | import colorgram
def rgb_to_hex(r, g, b):
return ('{:X}{:X}{:X}').format(r, g, b)
def getColors(filename):
rgb_colors = []
hex_colors = []
print(filename)
colors = colorgram.extract(f"/home/jayesh/Desktop/new/{filename}", 10)
for i in colors:
rgb_colors.append(i.rgb)
for i in... | Pratik1618/Color-assitant | colors_from_image.py | colors_from_image.py | py | 431 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "colorgram.extract",
"line_number": 14,
"usage_type": "call"
}
] |
24650318343 | #!/usr/bin/env python3
from simple_term_menu import TerminalMenu
import os
import time
import yaml
import TTP
def clear():
os.system('cls' if os.name == 'nt' else 'clear')
def EnterMainMenu():
# Some basic tasks that need to happen everytime the main menu is opened.
clear()
TTP.SendDEFCONLevel()
... | justin-p/SenseCon2021-TicTacPwn | TicTacPwn.py | TicTacPwn.py | py | 7,686 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.system",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.name",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "TTP.SendDEFCONLevel",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "TTP.GetCurrentMessage",
... |
11418520382 | import re
from itertools import zip_longest
from functools import cmp_to_key
INPUT_FILE = 'Day13/input.txt'
DIVIDER_PACKET_1 = '[[2]]'
DIVIDER_PACKET_2 = '[[6]]'
def process_input(file):
with open(file) as f:
file_content = f.read()
lines_pairs = file_content.split("\n\n")
for i, lines_pair in e... | Carmoldu/AoC22 | Day13/problem.py | problem.py | py | 2,782 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "itertools.zip_longest",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "functools.cmp_to_key",
"line_number": 81,
"usage_type": "call"
}
] |
72285905653 | #%%
import plotly.express as px
import pandas as pd
from skimage import io
bandeiras = pd.read_csv("https://raw.githubusercontent.com/programacaodinamica/analise-dados/master/dados/countries-fifa-flags.csv")
campeoes = pd.read_csv("./campeoes.csv")
#%%
def select_winner(year):
winner = campeoes[campeoes['year'] =... | Erickslb/copa-do-mundo-vis | code/image_gather.py | image_gather.py | py | 693 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "skimage.io.imread",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "skimage.io",
"lin... |
70426090932 | from collections import defaultdict
class Solution:
def findRepeatedDnaSequences(self, s: str) -> list[str]:
if len(s) < 10:
return []
once = set()
twice = set()
for i in range(len(s) - 9):
sequence = s[i:i + 10]
if sequence in once:
... | Jeldo/PS | leetcode/solved/187.py | 187.py | py | 822 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "collections.defaultdict",
"line_number": 21,
"usage_type": "call"
}
] |
36600780618 | from django.conf.urls import url, include
from rest_framework.routers import DefaultRouter
from views import (
TicketListView,
TicketCreateView,
TicketViewSet,
)
router = DefaultRouter()
router.register(r'tickets', TicketViewSet, basename='ticket')
urlpatterns = [
url(r'list', TicketListView.as_view(... | mcueto/ticket_support | tickets/urls.py | urls.py | py | 458 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "rest_framework.routers.DefaultRouter",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "views.TicketViewSet",
"line_number": 11,
"usage_type": "argument"
},
{
"api_name": "django.conf.urls.url",
"line_number": 14,
"usage_type": "call"
},
{
"... |
13039745892 | import time
import threading
from enum import Enum
from panda3d.core import Point3
from direct.showbase.ShowBase import ShowBase
from direct.task import Task
class Entities(Enum):
SURVIVAL = {4, 5}
BIRTH = {4, 5}
COUNTER = 5
class Cell:
def __init__(self, cube, state):
self.cube = cube
... | AndreSlavescu/3D-Neural-Cellular-Automata | neural_cellular_automata.py | neural_cellular_automata.py | py | 4,886 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "enum.Enum",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "panda3d.core.Point3",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "threading.Thread",
"line_number": 85,
"usage_type": "call"
},
{
"api_name": "direct.showbase.ShowBas... |
73683515571 | import os
import math
from simulation import loqc
import numpy as np
import json
# from simulation import data
# set the random seed
np.random.seed(42)
# import Strawberry Fields
import strawberryfields as sf
from strawberryfields.ops import *
class Circuit:
name = "somename"
backend = "fock"
backend_o... | StudioShader/SF_Composer | simulation/SFSimulation.py | SFSimulation.py | py | 12,483 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numpy.random.seed",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "json.loads",
"line_number": 176,
"usage_type": "call"
},
{
"api_name": "strawberryfields.Prog... |
40310726483 | """Initial schema
Revision ID: 1bf4e4e7b24f
Revises:
Create Date: 2020-07-26 08:46:28.752972
"""
from alembic import op
import sqlalchemy as sa
revision = '1bf4e4e7b24f'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
metadata = sa.MetaData()
sa.Table(
'snippets', meta... | xsnippet/xsnippet-api | src/storage/sql/migrations/versions/1bf4e4e7b24f_initial_schema.py | 1bf4e4e7b24f_initial_schema.py | py | 3,992 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "sqlalchemy.MetaData",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Table",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Int... |
16218690965 | #manager app urls
from django.urls import path
from manager import views
app_name = 'manager'
urlpatterns= [
path('', views.manager_home, name='home'),
path('login/', views.manager_login, name='login'),
path('profile/', views.view_profile, name='profile'),
path('logout/', views.mlogout, name='logout')... | heliosPy/hrmanagement | hrm/manager/urls.py | urls.py | py | 1,468 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "manager.views.manager_home",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "manager.views",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.ur... |
36029249851 | # -*- coding: utf-8 -*-
"""
Created on Thu Jul 9 15:26:45 2020
@author: ahirc
"""
import discord
from discord.ext import commands
import os
import json
import pymysql
import datetime
import random
import time
client = discord.Client()
messageCounter = 0
canClaim = False
claimEmoji = ""
claimMessage = ""
blacklist = [... | LonghornGaming/DiscordBot | main.py | main.py | py | 28,093 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "discord.Client",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
... |
35943930945 | from django.urls import path
from authentication.views import UserLoginView, UserProfileView, UserRegistrationView
urlpatterns = [
path('signup/',UserRegistrationView.as_view()),
path('login/',UserLoginView.as_view()),
path('profile/',UserProfileView.as_view()),
# path('changepassword/',UserChangePass... | nadeesha1997/athlete_workload_backend | authentication/urls.py | urls.py | py | 342 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "authentication.views.UserRegistrationView.as_view",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "authentication.views.UserRegistrationView",
"line_number": 6,
"usage_typ... |
73369701812 | from dataclasses import dataclass
from coopstorage.my_dataclasses import Resource, UoM, resource_factory, uom_factory, ResourceType
@dataclass(frozen=True, slots=True)
class ResourceUoM:
resource: Resource
uom: UoM
def as_dict(self):
return {
'resource': self.resource.as_dict(),
... | tylertjburns/coopstorage | coopstorage/my_dataclasses/resourceUom.py | resourceUom.py | py | 1,194 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "coopstorage.my_dataclasses.Resource",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "coopstorage.my_dataclasses.UoM",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "dataclasses.dataclass",
"line_number": 5,
"usage_type": "call"
},
{
... |
21103693222 | """
:Created: 17 April 2016
:Author: Lucas Connors
"""
from django.db import models
class VerifiedEmailManager(models.Manager):
def get_current_email(self, user):
verified_email, _ = self.get_or_create(user=user, email=user.email)
return verified_email
def is_current_email_verified(self, us... | RevolutionTech/perdiem-django | emails/managers.py | managers.py | py | 1,119 | python | en | code | 7 | github-code | 21 | [
{
"api_name": "django.db.models.Manager",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "django.db.models.Manager",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_... |
33118112850 | #!/usr/bin/env python3
# -1: invalid
# 0: wall
# 1: open space
#
# bitfields:
# 0x10: character
# 0x20: destination
# 0x40: box
# 0x80: reachable by character
# directions:
# 1: up
# 2: right
# 3: down
# 4: left
import array
import copy
from enum import Enum
m = [[0, 0, 0, 0, 0, 0],
... | qhe/sokoban-solver | sokoban.py | sokoban.py | py | 11,837 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "enum.Enum",
"line_number": 43,
"usage_type": "name"
},
{
"api_name": "array.array",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "copy.copy",
"line_number": 198,
"usage_type": "call"
},
{
"api_name": "copy.deepcopy",
"line_number": 2... |
15224496647 | from __future__ import absolute_import
from __future__ import print_function
from time import sleep
from .NotifyBase import NotifyBase
from ..common import NotifyImageSize
from ..common import NotifyType
from ..utils import parse_bool
from ..AppriseLocale import gettext_lazy as _
# Default our global support flag
NO... | caronc/apprise | apprise/plugins/NotifyWindows.py | NotifyWindows.py | py | 7,210 | python | en | code | 8,936 | github-code | 21 | [
{
"api_name": "NotifyBase.NotifyBase",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "AppriseLocale.gettext_lazy",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "common.NotifyImageSize.XY_128",
"line_number": 56,
"usage_type": "attribute"
},
{
... |
5717054793 |
def get_surrounding_points(p):
pm1 = (0, 1, -1)
results = []
for x in pm1:
for y in pm1:
for z in pm1:
if len(p) == 4:
for w in pm1:
if all(n == 0 for n in (x, y, z, w)):
continue
else:
results.append((
p[0] + x,
p[1] + y,
p[2] + z,
p[3] + w
... | jansenk/advent-of-code | advent/2020/solutions/day17.py | day17.py | py | 1,508 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "collections.Counter",
"line_number": 33,
"usage_type": "call"
}
] |
7074490663 | import os
import unittest
from typing import BinaryIO
import docker
from docker.errors import ContainerError
from functainer.decorator import functainerize
@functainerize(python_command='python2', from_image='boomset/ubuntu-python27-mysql')
def old_python(output_file_path): # pragma: no cover
with open(output_... | diegojromerolopez/functainer | functainer/tests/test_decorator.py | test_decorator.py | py | 5,156 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "functainer.decorator.functainerize",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "functainer.decorator.functainerize",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "functainer.decorator.functainerize",
"line_number": 23,
"usage_type... |
33004718675 | from django.forms import widgets
from django.utils.html import escape
from django.utils.functional import Promise
from django_countries.conf import settings
COUNTRY_CHANGE_HANDLER = (
"this.nextSibling.src = '%s'"
".replace('{code}', this.value.toLowerCase() || '__')"
".replace('{code_upper}', this.value.... | ecugol/django-countries | django_countries/widgets.py | widgets.py | py | 1,511 | python | en | code | null | github-code | 21 | [
{
"api_name": "django.utils.functional.Promise",
"line_number": 25,
"usage_type": "argument"
},
{
"api_name": "django.forms.widgets.Select",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "django.forms.widgets",
"line_number": 37,
"usage_type": "name"
},
... |
70267580532 | from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import json
from random import randint
class DataLoader(object):
def __init__(self):
file = json.load(open('data.json'))
self._ix_to_word = file['ix_to_word']
self._vocab = file['... | hane1818/project-in-sinaca | dataloader.py | dataloader.py | py | 3,606 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "json.load",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 37,
"usage_type": "call"
}
] |
32181457625 | import logging
from typing import TYPE_CHECKING
from dask_sql.physical.rel.base import BaseRelPlugin
if TYPE_CHECKING:
import dask_sql
from dask_sql._datafusion_lib import LogicalPlan
logger = logging.getLogger(__name__)
class CreateCatalogSchemaPlugin(BaseRelPlugin):
"""
Create a schema with the g... | dask-contrib/dask-sql | dask_sql/physical/rel/custom/create_catalog_schema.py | create_catalog_schema.py | py | 1,180 | python | en | code | 336 | github-code | 21 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "logging.getLogger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "dask_sql.physical.rel.base.BaseRelPlugin",
"line_number": 13,
"usage_type": "name"
}
] |
8944430714 | import logging
from breezypythongui import EasyCanvas
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
class Button(EasyCanvas):
"""This class creates a very simple clickable button. The
button is simply a circle of a certain {colour}. A listener
can register to its click events by supp... | Sandyman/countdown-gui | button.py | button.py | py | 2,203 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "breezypythongui.EasyCanvas",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "breezypyt... |
20935409510 | from api.v1.controllers.user_controller import UserController
from flask import Blueprint, request
from api.v1.middlewares import token_require, valid_roles
from shared.constants import roles
from shared.utils.response import error_not_found, forbidden, success
user_route = Blueprint("users", __name__, url_prefix="/us... | TuyenHoangPG/python-demo | src/api/v1/routes/user_route.py | user_route.py | py | 1,275 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Blueprint",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "api.v1.controllers.user_controller.UserController",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask.request.args",
"line_number": 15,
"usage_type": "attribute"
},
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.