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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
40261683440 | import sys
sys.path.append("..")
import os
import pandas
import re
import math
import argparse
from models.train_model import get_training_model_new
from train.ds_iterator import DataIterator
from train.ds_client_generator import DataGeneratorClient
from keras.optimizers import Adam
from keras.callbacks import Learning... | piperod/beepose | beepose/train/train_stages.py | train_stages.py | py | 7,547 | python | en | code | 8 | github-code | 6 | [
{
"api_name": "sys.path.append",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "pandas.read_csv",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "math.pow",
"line_numb... |
15293278222 | import numpy as np
import pandas as pd
from flask import Flask, render_template, request
app = Flask(__name__)
df = pd.read_csv("amazon_prime.csv")
df = df.fillna("NaN")
df["release_year"] = [str(x) for x in df['release_year']]
def get_features(feats):
input_columns = feats[0]
inputs = feats[1]
indices... | daBawse167/amazon-prime | app.py | app.py | py | 4,782 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "flask.request.get_dat... |
16119409500 | import customtkinter as tk
tk.set_appearance_mode("dark")
janela = tk.CTk()
janela.title("Janela 1")
janela.geometry("400x350")
janela.configure(fg_color="grey31")
janela.resizable(width=False,height=False)
colunas = list(range(13))
linhas = list(range(13))
janela.grid_columnconfigure(colunas, weight=1)
j... | dudasaanches/interface-grafica | 1.py | 1.py | py | 1,201 | python | pt | code | 0 | github-code | 6 | [
{
"api_name": "customtkinter.set_appearance_mode",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "customtkinter.CTk",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "customtkinter.CTkLabel",
"line_number": 27,
"usage_type": "call"
},
{
"api_name... |
37785863928 | #!/usr/bin/env python3
# Modules libraries
from PyInquirer import Separator
from PyInquirer.prompts import list as PyInquirer_prompts_list
from PyInquirer.prompts.common import if_mousedown
from PyInquirer.prompts.list import basestring
from prompt_toolkit.layout.controls import TokenListControl
from prompt_toolkit.to... | starr-dusT/gitlab-ci | gitlabci_local/package/patcher.py | patcher.py | py | 3,488 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "prompt_toolkit.layout.controls.TokenListControl",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "PyInquirer.Separator",
"line_number": 27,
"usage_type": "argument"
},
{
"api_name": "PyInquirer.prompts.list.basestring",
"line_number": 30,
"usage_t... |
20774839234 | import csv
import math
import time
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.ticker as mticker
initial = time.time()
B = 5e-4
RBW = 300
data = {}
for k in range(11):
for i in range(3):
with open('C:\\Users\\uqfgotar\\Documents\\Magnetome... | gotamyers/Flux_conc_height | Read_multiple_data_files.py | Read_multiple_data_files.py | py | 3,404 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "time.time",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.float",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "numpy.reshape",
"line_number": 30... |
9910655539 | from flask import Flask, render_template
import requests, json
NYTimes_API_KEY = 'ca470e1e91b15a82cc0d4350b08a3c0b:14:70189328'
app = Flask(__name__, static_folder='static', static_url_path='/static')
NYTimes_Search_URL = 'http://api.nytimes.com/svc/search/v2/articlesearch.json?q={0}+&api-key=' + NYTimes_API_KEY
def... | NYUHackDays/NYTimes-Python-Done | nytimes.py | nytimes.py | py | 614 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_... |
11004600528 | from typing import List
class Solution:
def largestSumOfAverages(self, A: List[int], K: int) -> float:
n = len(A)
p = [0.0] * (n + 1)
for i in range(n):
p[i+1] = p[i]+A[i]
dp = [0.0] * n
for i in range(n):
dp[i] = (p[n] - p[i])/(n-i)
for k ... | xixihaha1995/CS61B_SP19_SP20 | temp/toy/python/813. Largest Sum of Averages.py | 813. Largest Sum of Averages.py | py | 555 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.List",
"line_number": 5,
"usage_type": "name"
}
] |
8495271737 | import bpy
from bpy_extras.object_utils import world_to_camera_view
import numpy as np
from util import poissonDiscSampling
import math
import random
from mathutils import Euler, Vector
import os
import glob
import sys
class ForegroundObjectPlacementRandomizer:
"""
A randomizer class which randomly spawns vir... | MichaelLiLee/Synthetic-Data-Generator-for-Human-Detection | HumanSDG/HumanSDG_020_ForegroundObjectPalcementRandomizer.py | HumanSDG_020_ForegroundObjectPalcementRandomizer.py | py | 11,870 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "bpy.data",
"line_number": 56,
"usage_type": "attribute"
},
{
"api_name": "bpy.data",
"line_number": 57,
"usage_type": "attribute"
},
{
"api_name": "bpy.data",
"line_number": 58,
"usage_type": "attribute"
},
{
"api_name": "bpy.data",
"line_number... |
21705466300 | from os.path import basename
from glob import glob
from tqdm import tqdm
def main():
"""
フルラベルファイルのp16に歌唱者名を仕込む。
"""
# フルラベルファイルが入ってるフォルダを指定
label_dir = input('label_dir: ').strip('"')
# フルラベル全ファイル取得
l = glob(f'{label_dir}/**/*.lab', recursive=True)
# ラベルファイルのp16部分に歌唱者名を埋め込む
for pa... | oatsu-gh/nnsvs_mixed_db | recipe/00-svs-world/utils/set_singername_p16.py | set_singername_p16.py | py | 763 | python | ja | code | 0 | github-code | 6 | [
{
"api_name": "glob.glob",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "tqdm.tqdm",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path.basename",
"line_number": 16,
"usage_type": "call"
}
] |
44248037473 | import cv2
import numpy as np
import glob
import uuid
import caffe
import skimage.io
from util import histogram_equalization
from scipy.ndimage import zoom
from skimage.transform import resize
import random
#from project_face import project_face
import cv2
import numpy as np
from matplotlib import pyplot as plt
import ... | juanzdev/TeethClassifierCNN | src/mouth_detector_dlib.py | mouth_detector_dlib.py | py | 4,369 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "dlib.shape_predictor",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "project_face.frontalizer",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "dlib.get_frontal_face_detector",
"line_number": 26,
"usage_type": "call"
},
{
"api_... |
42367773251 | # -*- coding: utf-8 -*-
from tornado.web import RequestHandler
from ..Apps import Apps
from ..Exceptions import AsyncyError
from ..Sentry import Sentry
class BaseHandler(RequestHandler):
logger = None
# noinspection PyMethodOverriding
def initialize(self, logger):
self.logger = logger
def ... | rashmi43/platform-engine | asyncy/http_handlers/BaseHandler.py | BaseHandler.py | py | 1,138 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "tornado.web.RequestHandler",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "Apps.Apps.get",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "Apps.Apps",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "Exceptions.AsyncyEr... |
12771403336 | import tensorflow as tf
from yolo import YOLO, detect_video
from PIL import Image
import os
os.environ['CUDA_VISIBLE_DEVICES'] = "1"
def detect_img(yolo):
img = '10.jpg'
try:
image = Image.open(img)
except Exception as e:
print('Open Error! Try again!')
print(e)
else:
r_... | Jerry-Z464/yolo | keras-yolo3/test.py | test.py | py | 490 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.environ",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "PIL.Image.open",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "yolo.detect_image",
"line... |
42672162843 | # -*- coding: utf-8 -*-
"""
Created on Apr 7 2021
Modified on May 05 2021
@author: Andres Sandino
Convert "nii" image format in "png" in Lung WW=-500,WL=1500
"""
#%%
import os
import numpy as np
import matplotlib.pyplot as plt
import cv2
import nibabel as nib
# Patient number
patient_no = 1
# Origin path and file... | andres87sg/LungCT | ConvertImages/get_nii_LungMask.py | get_nii_LungMask.py | py | 1,553 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "nibabel.load",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "numpy.asarray",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "numpy.shape",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "numpy.shape",
"line_number... |
26625675366 | from django import template
import re
try:
from django.utils.safestring import mark_safe
except ImportError:
mark_safe = lambda s:s
register = template.Library()
def rfc3339_date(date):
return date.strftime('%Y-%m-%dT%H:%M:%SZ')
register.filter('atom_date', rfc3339_date)
def atom_tag_uri(url, date=None)... | dokterbob/satchmo | satchmo/apps/satchmo_ext/product_feeds/templatetags/satchmo_feed.py | satchmo_feed.py | py | 4,527 | python | en | code | 30 | github-code | 6 | [
{
"api_name": "django.utils.safestring.mark_safe",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "django.template.Library",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.template",
"line_number": 8,
"usage_type": "name"
},
{
"api_name":... |
6484090494 | from rest_framework import serializers
from django.contrib.auth import get_user_model
from session.serializers.recent_sessions import RecentSessionSerializer
User = get_user_model()
class ClientListSerializer(serializers.ModelSerializer):
number_of_sessions = serializers.SerializerMethodField()
latest_sessi... | roberttullycarr/cyclingsimulator | backend/user/serializers/coach/list_clients.py | list_clients.py | py | 909 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.contrib.auth.get_user_model",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "rest_framework.serializers.ModelSerializer",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 9,
"usage_ty... |
11896445749 | from django.http import HttpRequest
from google_optimize.context_processors import google_experiment
def test_experiment_processor():
request = HttpRequest()
request.COOKIES["_gaexp"] = "GAX1.2.utSuKi3PRbmxeG08en8VNw.18147.1"
experiment = google_experiment(request)
assert experiment == dict(google_op... | danihodovic/django-google-optimize | tests/test_context_processors.py | test_context_processors.py | py | 585 | python | en | code | null | github-code | 6 | [
{
"api_name": "django.http.HttpRequest",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "google_optimize.context_processors.google_experiment",
"line_number": 9,
"usage_type": "call"
}
] |
7357482434 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
This is an example script that uses DIC data from Carrol et al
as input for SIF to find K field and cracktip data
The output is written to a CSV file
@author: Swati Gupta
"""
import SIF_final as SIF
import numpy as np
from os import walk
import pdb
from datetime imp... | sg759/separability | DICexample.py | DICexample.py | py | 2,731 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.walk",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 38,
... |
26336217910 | import streamlit as st
import extra_streamlit_components as stx
from datetime import datetime, timedelta
import Scripts.constants as constants
@st.experimental_singleton(suppress_st_warning=True)
def get_manager():
return stx.CookieManager()
# def get_user_cookies():
# COOKIES = constants.COOKIES.get(constan... | PeaPals/docnets | Scripts/cookie_manager.py | cookie_manager.py | py | 1,550 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "extra_streamlit_components.CookieManager",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "streamlit.experimental_singleton",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "Scripts.constants.COOKIE_MANAGER.get_all",
"line_number": 38,
"us... |
8201566770 | from typing import Dict
import os
import shutil
from hexlib.db import Table, PersistentState
import pickle
from tesseract import get_tesseract_langs
import sqlite3
from config import LOG_FOLDER, logger
from sist2 import SearchBackendType, Sist2SearchBackend
RUNNING_FRONTENDS: Dict[str, int] = {}
TESSERACT_LANGS = g... | simon987/sist2 | sist2-admin/sist2_admin/state.py | state.py | py | 3,537 | python | en | code | 652 | github-code | 6 | [
{
"api_name": "typing.Dict",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "tesseract.get_tesseract_langs",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pydantic.BaseModel",
"line_number": 23,
"usage_type": "argument"
},
{
"api_name": "pick... |
40887076205 | # Тестирование компонентов задач
import unittest
from pyodbc import Connection as PyodbcConnection
from connections import Connection1
from task_classes.db.mssqldb import MSSqlTarget
from task_classes.csv_task_classes import PrepareCsvBulkPackages
class TestMSSqlTarget(unittest.TestCase):
"""Класс тестирования M... | Foresco/luigivar | tests.py | tests.py | py | 2,370 | python | ru | code | 0 | github-code | 6 | [
{
"api_name": "unittest.TestCase",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "task_classes.db.mssqldb.MSSqlTarget",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "connections.Connection1",
"line_number": 16,
"usage_type": "call"
},
{
... |
10068857131 | import cv2
import numpy as np
from time import sleep
import os
# global variables
bg = None
def run_avg(image, aWeight):
global bg
# initialize the background
if bg is None:
bg = image.copy().astype("float")
return
# compute weighted average, accumulate it and update the background
... | RemonIbrahimNashed/HandGestureUseingCNN | live.py | live.py | py | 2,732 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "cv2.accumulateWeighted",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "cv2.absdiff",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "cv2.threshold",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "cv2.THRESH_BINARY",
... |
73919543869 | from django.shortcuts import render
from resources.models import Resource
def resources(request):
resources = Resource.objects.all().order_by('order').filter(hidden=False)
context = {
'resources': resources
}
return render(request, 'resources.html', context)
| ctiller15/Humanity-first-tracker | resources/views.py | views.py | py | 288 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "resources.models",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "resources.models.Resource.objects.all",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "resources.models.Resource.objects",
"line_number": 5,
"usage_type": "attribute"
},... |
36733100195 | import os
import sys
import logging
import MySQLdb
#import datetime
logger = logging.getLogger(__name__)
locz = []
locz_file = ''
# 'locz' table fields: chat_id, chat_title, user_id, user_name, date_time, latitude, longitude
def add_loc(mess):
locstr = 'chat.id:' + str(mess.chat.id) + ',chat.title:' + str(mess... | nikodim500/pyIkuraTeleBot | locationstore.py | locationstore.py | py | 3,142 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "MySQLdb.connect",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sys.exc_info",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "sys.exc_info",
"lin... |
5257520483 | import boto3
from secretss import accessKey, secretKey
# upload files to AWS S3 bucket
s3 = boto3.client('s3')
bucket_name = "mmc-video-bucket"
file_path = 'E:\Programming files\Home-Surveillance\\basicvideo.mp4'
object_key = 'basicvideo.mp4'
s3.upload_file(file_path, bucket_name, object_key)
| Varun-Naik/Home-Surveillance | upload_to_s3.py | upload_to_s3.py | py | 297 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "boto3.client",
"line_number": 5,
"usage_type": "call"
}
] |
11417571951 | # -*- coding: utf-8 -*-
"""
(C) 2014-2019 Roman Sirokov and contributors
Licensed under BSD license
http://github.com/r0x0r/pywebview/
"""
import os
import sys
import logging
import json
import shutil
import tempfile
import webbrowser
from threading import Event, Semaphore
from ctypes import windll
from platform imp... | hanzzhu/chadle | venv/Lib/site-packages/webview/platforms/edgechromium.py | edgechromium.py | py | 6,044 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "clr.AddReference",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "clr.AddReference",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "clr.AddReference",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "platform.architect... |
7986369348 | import basc_py4chan as chanapi
import requests
import argparse
import sys
import os
class FourchanDownloader:
def __init__(self):
self.boards_list = chanapi.get_all_boards()
def run(self):
self.verify_boards()
if len(self.board) == 0:
print("No existing boards selected, yo... | SteelPh0enix/4chanDownloader | 4chan.py | 4chan.py | py | 4,179 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "basc_py4chan.get_all_boards",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sys.exit",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "basc_py4chan.get_all_boards",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "basc... |
29703199407 | import bpy
import types
import sys
from select import select
import socket
import errno
import mathutils
import traceback
from math import radians
from bpy.props import *
from ast import literal_eval as make_tuple
from .callbacks import *
from ..nodes.nodes import *
def make_osc_messages(myOscKeys, myOscMsg):
env... | maybites/blender.NodeOSC | server/_base.py | _base.py | py | 16,277 | python | en | code | 100 | github-code | 6 | [
{
"api_name": "bpy.context",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "mathutils.Vector",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "mathutils.Quaternion",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "math... |
72646625788 | # some functions from discovery/scripts/cdisco/cdisco.py
import numpy as np
import torch
import torchvision
import PIL.Image as Image
from my_datasets import transform
from my_datasets import transform_normalize
def get_model_state(model, paths, y, dim_c, dim_w, dim_h, SAVEFOLD=''):
batch_size = 32
tot_acc =... | lomahony/sw-interpretability | scripts/get_embeddings.py | get_embeddings.py | py | 3,411 | python | en | code | 4 | github-code | 6 | [
{
"api_name": "torch.device",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "numpy.zeros",
... |
39359091601 | import time
from openpyxl import Workbook
from selenium import webdriver
import openpyxl
# from selenium.webdriver.common import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.wait import WebDriverWait
from selenium.common.exc... | Paviterence/Selenium-Python-BasicCodes | webScrapping.py | webScrapping.py | py | 1,886 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.common.by.By.ID",
"line_number": 18,
"usage_type": "attribute"
},
{
... |
29099740995 | from torch.utils.data import Dataset
from typing import List
import torch
import pandas as pd
class InferenceDataset(Dataset):
def __init__(self, texts: List[list], tokenizer, max_length: int):
self.texts = texts
self.tokenizer = tokenizer
self.max_length = max_length
def __len__(self... | MaryNJ1995/Sarcasm_Detection | src/inference/dataset.py | dataset.py | py | 3,398 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "torch.utils.data.Dataset",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "torch.utils.data.Dataset",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "torch.ten... |
825675496 | # -*- coding: utf-8 -*-
"""
Created on Tue May 10 04:27:29 2022
@author: ThinkPad
"""
from __future__ import print_function
import argparse
import os
import numpy as np
import random
import torch
import torch.nn.parallel
import torch.optim as optim
import torch.utils.data
from PartialScan import PartialScans,unpickle,... | FreddieRao/TextCondRobotFetch | pointnet/inference.py | inference.py | py | 13,605 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "random.randint",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "random.seed",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "torch.manual_seed",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "normalizeData.normalizeP... |
12902368672 | #!/usr/bin/python3
import sqlite3
import gspread
from oauth2client.service_account import ServiceAccountCredentials
scope = ['https://spreadsheets.google.com/feeds',
'https://www.googleapis.com/auth/drive']
dbfile = 'TimeTrack4237.db'
dbconn = sqlite3.connect(dbfile)
student_hours = None
with dbconn:
... | washide/TimeTrack4237 | UploadTotalHours.py | UploadTotalHours.py | py | 1,173 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sqlite3.connect",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_name",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "oauth2client.service_account.ServiceAccountCredenti... |
70357157629 | # coding=utf-8
import numpy as np
import matplotlib.pyplot as plt
MapL = 15 # Chessboard size
WinN = 5 # "Five"-in-a-row
step = 0 # Steps taken
steps = [] # Coordinates of each step
end_flag = 0 # Game end flag
board = np.zeros((MapL,MapL),dtype=np.int64) # chessboard
mode = 4 # modes: 0:p... | BetaGem/Games | gobang.py | gobang.py | py | 13,951 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "numpy.zeros",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.int64",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "numpy.array",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_numb... |
9752254935 | import functools
from flask_login import current_user, LoginManager
from flask import session
from src.model import UserModel
login_manager = LoginManager()
def roles_allowed(func=None, roles=None):
"""
Check if the user has at least one required role
:param func: the function to decorate
:param rol... | GreyTeam2020/GoOutSafe_microservice | gateway/src/auth.py | auth.py | py | 949 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "flask_login.LoginManager",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "functools.partial",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "flask.session.get",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "flask.ses... |
14374651405 | """Bridgy App Engine config.
"""
import logging
class StubsFilter(logging.Filter):
"""Suppress these INFO logs:
Sandbox prevented access to file "/usr/local/Caskroom/google-cloud-sdk"
If it is a static file, check that `application_readable: true` is set in your app.yaml
"""
def filter(self, recor... | snarfed/bridgy-fed | appengine_config.py | appengine_config.py | py | 580 | python | en | code | 219 | github-code | 6 | [
{
"api_name": "logging.Filter",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 19,
"usage_type": "call"
}
] |
20519423740 | """!
@brief Examples of usage and demonstration of abilities of K-Medoids algorithm in cluster analysis.
@authors Andrei Novikov (pyclustering@yandex.ru)
@date 2014-2020
@copyright BSD-3-Clause
"""
from pyclustering.samples.definitions import SIMPLE_SAMPLES, FCPS_SAMPLES
from pyclustering.cluster impor... | annoviko/pyclustering | pyclustering/cluster/examples/kmedoids_examples.py | kmedoids_examples.py | py | 5,155 | python | en | code | 1,113 | github-code | 6 | [
{
"api_name": "pyclustering.utils.read_sample",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pyclustering.utils.calculate_distance_matrix",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "pyclustering.utils.distance_metric",
"line_number": 29,
"usag... |
73928041148 | from pyvi import window
from pyvi.modes import normal
class Editor(object):
_command = None
active_tab = None
def __init__(self, tabs=None, config=None, normal=normal):
self.config = config
self.mode = self.normal = normal
self.count = None
if tabs is None:
t... | Julian/PyVi | pyvi/editor.py | editor.py | py | 635 | python | en | code | 11 | github-code | 6 | [
{
"api_name": "pyvi.modes.normal",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "pyvi.modes.normal",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "pyvi.window.Tab",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pyvi.window",
... |
21594560177 | from django.shortcuts import render, redirect
import csv
from django.http import HttpResponse
from django.template.loader import render_to_string
# from weasyprint import HTML
# Create your views here.
from .models import Members, Loans, Deposits
from django.db.models import Avg, Sum
from .forms import MemberForm
d... | laloluka/sol | information_system/views.py | views.py | py | 2,960 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "models.Deposits.objects.aggregate",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "models.Deposits.objects",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "models.Deposits",
"line_number": 15,
"usage_type": "name"
},
{
"ap... |
37512481914 | import os
import pytest
from contextlib import contextmanager
from tempfile import TemporaryDirectory, NamedTemporaryFile
from unittest.mock import patch
from zipfile import ZipFile
from repo2docker.contentproviders import Hydroshare
from repo2docker.contentproviders.base import ContentProviderException
def test_co... | igorkatinas/jupyter | tests/unit/contentproviders/test_hydroshare.py | test_hydroshare.py | py | 7,638 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "unittest.mock.patch.object",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "repo2docker.contentproviders.Hydroshare",
"line_number": 14,
"usage_type": "argument"
},
{
"api_name": "unittest.mock.patch",
"line_number": 14,
"usage_type": "name"
},... |
19400189989 | from typing import List
import random
# 398. 随机数索引
# https://leetcode-cn.com/problems/random-pick-index/
# 蓄水池抽样
class Solution:
def __init__(self, nums: List[int]):
self.nums = nums
def pick(self, target: int) -> int:
ans = -1
k = 1
for i, each in enumerate(self.nums):
... | Yigang0622/LeetCode | randomNumIndexing.py | randomNumIndexing.py | py | 693 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "typing.List",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "random.randint",
"line_number": 19,
"usage_type": "call"
}
] |
730586622 | from selenium import webdriver
from selenium.webdriver.common.by import By
chrome_driver_path = r"C:\Users\Tobiloba\development\chromedriver.exe"
driver = webdriver.Chrome(executable_path=chrome_driver_path)
#driver.get('https://www.amazon.com/dp/B0963P9QTM/ref=sbl_dpx_kitchen-electric-cookware_B08GC6PL3D_0')
#pri... | adecool/python100days | day-48/main.py | main.py | py | 1,180 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.common.by.By.CSS_SELECTOR",
"line_number": 23,
"usage_type": "attribute"
... |
42197867431 | from django.test import TestCase
from feedback.forms import FeedbackForm
class TestForms(TestCase):
def test_feedback_form_valid_data(self):
form = FeedbackForm(data={
'titolo': 'Recensione',
'descrizione': 'Una descrizione',
'voto': 5
})
self.assertTr... | lucacasarotti/CineDate | feedback/tests/test_forms.py | test_forms.py | py | 506 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.test.TestCase",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "feedback.forms.FeedbackForm",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "feedback.forms.FeedbackForm",
"line_number": 17,
"usage_type": "call"
}
] |
650276737 | #! /bin/python
# IMPORTANT do threadctl import first (before numpy imports)
from threadpoolctl import threadpool_limits
import os
import sys
import json
import luigi
import nifty.tools as nt
import cluster_tools.utils.volume_utils as vu
import cluster_tools.utils.function_utils as fu
from cluster_tools.cluster_task... | constantinpape/cluster_tools | cluster_tools/label_multisets/create_multiset.py | create_multiset.py | py | 5,506 | python | en | code | 32 | github-code | 6 | [
{
"api_name": "luigi.Task",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "luigi.Parameter",
"l... |
11110715644 | # coding:utf-8
import pygame
class Main(object):
def __init__(self, title, height, width, Fps=60):
self.height = height
self.width = width
self.title = title
self.Fps = Fps
self.main()
self.vars()
self.events()
def main(self):
pygame.init() ... | PatrickShun/pygameDemo | pygamedemo_run.py | pygamedemo_run.py | py | 1,650 | python | zh | code | 0 | github-code | 6 | [
{
"api_name": "pygame.init",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pygame.mixer.init",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pygame.mixer",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "pygame.display.set_ca... |
37635242690 | from videos_freeze_analyzer import VideosFreezeAnalyzer
from video_valid_points_list_generator import dowload_url
from video_valid_points_list_generator import VideoValidPointsListGeneratorFfmpeg
from video_freeze_analyzer import VideoFreezeAnalyzer
import json
def main(urls):
files = []
for url in urls:
... | EderRobins/video_freeze_analyzer | main.py | main.py | py | 1,064 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "video_valid_points_list_generator.dowload_url",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "video_valid_points_list_generator.VideoValidPointsListGeneratorFfmpeg",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "video_freeze_analyzer.VideoFr... |
8412088860 | from rest_framework import serializers
from .models import (
Product,
ProductImage,
Size,
Category
)
class CategoryListSerializer(serializers.HyperlinkedModelSerializer):
url = serializers.HyperlinkedIdentityField(
view_name='products:category-detail-view',
lookup_field='slug'
... | fanimashaun-r7/Nf_Kicks_Api | app/products/serializers.py | serializers.py | py | 2,365 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "rest_framework.serializers.HyperlinkedModelSerializer",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "rest_framework.serializers.HyperlinkedIdentityField",
"... |
72638922747 | import pandas as pd
from dotenv import load_dotenv
import os
# load env
load_dotenv()
# load dataset
url = "https://raw.githubusercontent.com/erijmo/3690/main/healthcare_dataset.csv"
df = pd.read_csv(url)
# set api key
api_key = os.getenv("OPENAI_API_KEY")
def get_healthcare_response(user_input, user_... | erijmo/3690 | chatbot.py | chatbot.py | py | 1,661 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 13,
"usage_type": "call"
}
] |
39803355853 | import pickle
from pathlib import Path
script_location = Path(__file__).absolute().parent
data_loc = script_location / "name_gen_model"
from bangla_linga.BN_countvectorizer import CountVectorizer
import bangla_linga.BN_ngram as ng
class BN_gen_pred(object):
def __init__(self,model_name=data_loc):
self.model_... | Kowsher/Bangla-NLP | Bangla Linga/bangla_linga/gender_prediction.py | gender_prediction.py | py | 846 | python | en | code | 11 | github-code | 6 | [
{
"api_name": "pathlib.Path",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "bangla_linga.BN_ngram.n_gram",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "bangla_linga.BN_... |
27009678128 | import numpy as np
import run as r
from sklearn.gaussian_process.kernels import ABCMeta, Matern, ConstantKernel, Exponentiation, ExpSineSquared, Hyperparameter, KernelOperator, \
NormalizedKernelMixin, PairwiseKernel, RationalQuadratic, StationaryKernelMixin, RBF, CompoundKernel, DotProduct, Product, GenericKernel... | lisunshine1234/mlp-algorithm-python | machine_learning/regression/gaussian_processes/GaussianProcessRegressor/main.py | main.py | py | 6,034 | python | zh | code | 0 | github-code | 6 | [
{
"api_name": "run.run",
"line_number": 74,
"usage_type": "call"
},
{
"api_name": "numpy.loadtxt",
"line_number": 86,
"usage_type": "call"
},
{
"api_name": "numpy.delete",
"line_number": 90,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 98... |
17522204148 | import json
import sqlite3
from urllib import response
from fastapi.testclient import TestClient
import time
import pytest
from main import app, conn, c
from models import AtualizarFilme, AtualizarPlaneta, Filme, Planeta, Excluido, InserirPlaneta
client = TestClient(app)
# def test_create_schema():
# c.executesc... | MarceloTerra0/FastAPI_TesteTuring | test_main.py | test_main.py | py | 5,453 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "fastapi.testclient.TestClient",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "main.app",
"line_number": 11,
"usage_type": "argument"
},
{
"api_name": "urllib.response",
"line_number": 67,
"usage_type": "name"
},
{
"api_name": "urllib.res... |
21341173003 | import torch
from torch.optim import SGD
import torch.nn.functional as F
from sklearn.metrics import accuracy_score
from models_torch.FFM import FFM_Layer
from utils.load_data import load_criteo_data
if __name__ == '__main__':
(X_train, y_train), (X_test, y_test), feature_info = load_criteo_data('dataset... | KrianJ/CtrEstimate | predict_ffm_torch.py | predict_ffm_torch.py | py | 1,739 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "utils.load_data.load_criteo_data",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "torch.tensor",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.float32",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "torc... |
10695567948 | import subprocess
from multiprocessing import Pool
import os
import numpy as np
import sys
def Thread(arg):
print(arg)
file = open('output/' + str(0) + '.log', 'w')
subprocess.call(arg, shell=True, stdout=file)
def main():
seed = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
batch = np.array([10, 50,... | mikufan/NCRFAE_DepParsing | noderun_pl_model.py | noderun_pl_model.py | py | 1,323 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "subprocess.call",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.tile",
"line_number... |
25316393069 | from typing import List, Set, Callable, Optional, Iterator
import math
class Tile:
def __init__(self, tile: List[str], tile_id: int = 0):
self.tile = tile
self.id = tile_id
self.edge_len = len(tile)
def right_edge(self) -> str:
return "".join(t[-1] for t in self.tile)
def... | stx73/aoc2020 | day20/p1.py | p1.py | py | 3,211 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.List",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 43,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 58,
"usage_type": "name"
},
{
"api_name": "typing.Callable",
"line_number... |
24905708193 | import cadquery as cq
import cadquery.selectors as cqs
import logging
import importlib
import utilities # TODO: Change to a relative import ".utilities" to preempt name clashes.
from types import SimpleNamespace as Measures
from math import sin, cos, radians
# A parametric cover that can be hooked to the top edge of a... | tanius/cadquery-models | lenscover/lens_cover.py | lens_cover.py | py | 23,912 | python | en | code | 11 | github-code | 6 | [
{
"api_name": "types.SimpleNamespace",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "types.SimpleNamespace",
"line_number": 68,
"usage_type": "call"
},
{
"api_name": "types.SimpleNamespace",
"line_number": 89,
"usage_type": "call"
},
{
"api_name": "typ... |
39048517647 | import re
import logging
from datetime import datetime, timezone
__all__ = ('datetime_to_ns',)
logger = logging.getLogger('aionationstates')
class DataClassWithId:
def __eq__(self, other):
# Ids in NS are pretty much always not globally unique.
if type(self) is not type(other):
ret... | micha030201/aionationstates | aionationstates/utils.py | utils.py | py | 6,383 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "re.match",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.utcfromtimestamp",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "datetime... |
43724719541 | from PyQt5.QtCore import QThread, QMutex, pyqtSignal
from binance.client import Client
import pyupbit
import pybithumb
import requests
from bs4 import BeautifulSoup
from debug import debuginfo
class binanceThread(QThread):
binance_data = pyqtSignal(dict)
def __init__(self):
QThread.__init__(self)
... | JunTae90/coin_viewer | thread.py | thread.py | py | 9,535 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "PyQt5.QtCore.QThread",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtCore.pyqtSignal",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtCore.QThread.__init__",
"line_number": 14,
"usage_type": "call"
},
{
"api_na... |
6806255656 | """
Пожалуйста, приступайте к этой задаче после того, как вы сделали и получили ревью ко всем остальным задачам
в этом репозитории. Она значительно сложнее.
Есть набор сообщений из чата в следующем формате:
```
messages = [
{
"id": "efadb781-9b04-4aad-9afe-e79faef8cffb",
"sent_at": datetime.datet... | hodakoov/basic_exercises | for_dict_challenges_bonus.py | for_dict_challenges_bonus.py | py | 7,598 | python | ru | code | null | github-code | 6 | [
{
"api_name": "random.randint",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "datetime.datetime... |
27465756937 | import keras.backend as K
import tensorflow as tf
import cv2
import imageio
import numpy as np
def square_sum(x):
return K.sum(K.square(x), axis=-1, keepdims=True)
def euclSq(x):
x, y = x
x = K.batch_flatten(x)
y = K.batch_flatten(y)
return square_sum(x - y)
def l2_normalize(x):
inv_sqrt = ... | ebatuhankaynak/DeepPotato | src/util.py | util.py | py | 1,405 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "keras.backend.sum",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "keras.backend",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "keras.backend.square",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "keras.backend.batch... |
37407227644 | from matplotlib import pyplot as plt
from findiff import FinDiff
import pandas as pd
import numpy as np
from tqdm import tqdm
id_col = 'ID'
date_col = 'DATE'
px_close = 'px_last'
px_high = 'px_high'
px_low = 'px_low'
px_open = 'px_open'
def find_derivative(series): #1 day interval
'''
Compute the first and se... | etq-quant/etqbankloan | Lib/etiqalib/ta/turning_points.py | turning_points.py | py | 24,726 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "findiff.FinDiff",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "findiff.FinDiff",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "numpy.asarray",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
... |
40187735381 | from luigi.contrib.postgres import CopyToTable
from src.utils.general import read_yaml_file
from src.utils.utils import load_df
from src.pipeline.LuigiBiasFairnessTaskRDS import BiasFairnessTask
#from src.pipeline.ingesta_almacenamiento import get_s3_client
from datetime import date
from time import gmtime, strftime
im... | Acturio/DPA-Project | src/pipeline/LuigiBiasFairnessTestTask.py | LuigiBiasFairnessTestTask.py | py | 3,890 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "marbles.core.core",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "marbles.core",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "marbles.core.mixins",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "luigi.co... |
3755394850 | import asyncio
import traceback
from neptune_py.skeleton.skeleton import NeptuneServiceSkeleton
from neptune_py.skeleton.messager import (
NeptuneWriterBaseAbstract, NeptuneMessageType
)
import struct
import collections
class TLV:
_format = '!HI'
meta_size = struct.calcsize(_format)
tlv = collections... | kstardust/neptune | neptune_py/skeleton/transporter/neptune_tlv.py | neptune_tlv.py | py | 3,598 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "struct.calcsize",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "collections.namedtuple",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "struct.pack",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "struct.unpack",
... |
26531296671 | from pyhpecfm import fabric
from lib.actions import HpecfmBaseAction
class fabricIpLookup(HpecfmBaseAction):
def run(self):
cfm_fabrics = fabric.get_fabric_ip_networks(self.client)
if isinstance(cfm_fabrics, list):
fabric_data = []
# Loop through cfm_fabrics and process IPZ
... | HewlettPackard/stackstorm-hpe-cfm | actions/get_fabric_ips.py | get_fabric_ips.py | py | 979 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "lib.actions.HpecfmBaseAction",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "pyhpecfm.fabric.get_fabric_ip_networks",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pyhpecfm.fabric",
"line_number": 6,
"usage_type": "name"
}
] |
39939937920 | from mpl_toolkits.mplot3d import axes3d
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import csv
from matplotlib import cm
from matplotlib.ticker import LinearLocator, FormatStrFormatter
from mpl_toolkits.mplot3d import Axes3D
import plotly.graph_objects as go
import plotly.express as px
... | urbancomp/fogarch | FogLayer/visualization/chart3_old.py | chart3_old.py | py | 7,553 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "pandas.options",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "pandas.read_csv",
"line_number": 81,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 95,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",... |
35777431960 | from pydoc import tempfilepager
from PIL import Image
import numpy
import cv2
slot_1_box = (905, 215, 930, 235)
slot_2_box = (933, 215, 958, 235)
slot_3_box = (961, 215, 986, 235)
slots_poss = (slot_1_box, slot_2_box, slot_3_box)
def get_crop(_source, _box):
return Image.open(_source).convert('RGB').crop(_box) ... | BruceCheng1995/cyber_hunter | src/analyze_slot.py | analyze_slot.py | py | 2,531 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "PIL.Image.open",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "cv2.cvtColor",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.asarray",
"line_numbe... |
72715840829 | from django.db import models
from django import forms
from django.contrib.auth import get_user_model
# Create your models here.
class Challenge(models.Model):
title = models.CharField(max_length=200)
author = models.ForeignKey ( # author info will be retrieved from the user model
get_user_model(),
... | hackathon-team-1/ReadingChallenge | readingchallenge/challenges/models.py | models.py | py | 1,024 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.db.models.Model",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "... |
16916661051 | import subprocess
import sys
import json
import platform
import os
from crmetrics import CRBase
class CRLogs(CRBase):
def _get_container_logs(self, pod, namespace, containers, kubeconfig):
for c in containers:
container = c['name']
cmd = 'kubectl logs ' + pod + ' -n ' + namespace + ' -c ' + container + ' ' +... | cloud-ark/kubeplus | plugins/crlogs.py | crlogs.py | py | 3,366 | python | en | code | 555 | github-code | 6 | [
{
"api_name": "crmetrics.CRBase",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "subprocess.Popen",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "subprocess.PIPE",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "subprocess.PIPE... |
5461750614 | #Gets the longitude and latittude for an address using the Google Maps API
import json
import time
import pandas as pd
import urllib.error
import urllib.parse
import urllib.request
#Gets api key from txt file
with open(r".txt","r") as file:
API_KEY = r"&key=" + file.readline()
GEO_URL = r"https://ma... | randr000/MyPythonScripts | get_lat_lon_Google.py | get_lat_lon_Google.py | py | 1,674 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "urllib.error.request.urlopen",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "urllib.error.r... |
21402453945 | import torch
import math
from torch import nn
import torch.nn.functional as F
from transformers.activations import get_activation
from .utils import init_weights
def _mask(logits, mask):
return mask * logits - 1e3 * (1 - mask)
# VarMisuse -----------------------------------------------------------------
class... | cedricrupb/ctxmutants | ctxmutants/modelling/meta_models.py | meta_models.py | py | 14,434 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "torch.nn.Module",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "torch.nn.Linear",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_nu... |
5479249067 | """
Proximal Policy Optimization Algorithms (PPO):
https://arxiv.org/pdf/1707.06347.pdf
Related Tricks(May not be useful):
Mastering Complex Control in MOBA Games with Deep Reinforcement Learning (Dual Clip)
https://arxiv.org/pdf/1912.09729.pdf
A Closer Look at Deep Policy Gradients (Value clip, Re... | haosulab/ManiSkill2-Learn | maniskill2_learn/methods/mfrl/ppo.py | ppo.py | py | 21,464 | python | en | code | 53 | github-code | 6 | [
{
"api_name": "maniskill2_learn.utils.torch.BaseAgent",
"line_number": 36,
"usage_type": "name"
},
{
"api_name": "copy.deepcopy",
"line_number": 90,
"usage_type": "call"
},
{
"api_name": "copy.deepcopy",
"line_number": 91,
"usage_type": "call"
},
{
"api_name": "ma... |
442805106 | import tensorflow as tf
from PIL import Image
import cv2
import numpy as np
import uuid
import os
from .admin import model_path, label_path
from .utility import load_image_into_numpy_array, calculate_area, delete_and_create_folder, shortest_longest_area
import sys
sys.path.append("../models/research")
from object_det... | krishnakaushik25/Forecasting-Business-KPI | modular_code/src/ML_Pipeline/predict.py | predict.py | py | 5,576 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sys.path.append",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "utility.delete_and_create_folder",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "utilit... |
28041597167 | import unittest
import os
from conans.test.utils.test_files import temp_folder
from conans.util.files import save
from time import sleep
class SaveTestCase(unittest.TestCase):
def setUp(self):
folder = temp_folder()
self.filepath = os.path.join(folder, "file.txt")
# Save some content an... | pianoslum/conan | conans/test/util/files_test.py | files_test.py | py | 1,276 | python | en | code | null | github-code | 6 | [
{
"api_name": "unittest.TestCase",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "conans.test.utils.test_files.temp_folder",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 13,
"usage_type": "call"
},
{
"api_n... |
12260712099 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import pymysql
money_all=56.75+2+938.7+83.2
money_all_str=str(money_all)
print(money_all_str)
money_real=int(money_all)
print(str(money_real))
print(7/3)
print(7//5)
print(35<54)
def sort(x):
return x['price']
mydb=pymysql.connect(
host="localhost",
use... | hedychium/python_learning | erase_zero.py | erase_zero.py | py | 459 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pymysql.connect",
"line_number": 23,
"usage_type": "call"
}
] |
30763374181 | # -*- coding: utf-8 -*-
"""
Created on Mon Dec 26 15:42:17 2016
@author: Shahidur Rahman
"""
import explorers
import stringRecorder
import pandas
from sqlalchemy import create_engine
import random
from mmh3 import hash128
#from sklearn.datasets import load_iris
import warnings
warnings.filterwarnings("... | skshahidur/nlp_paper_implementation | Word-Embedding/mwt_v1.py | mwt_v1.py | py | 4,021 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.create_engine",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.random.normal",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "... |
9805159119 | import multiprocessing
# Gunicorn app
# Tell Gunicorn which application to run
wsgi_app = "django_examples.asgi:application"
# Requests
# Restart workers after so many requests, with some variability.
max_requests = 1000
max_requests_jitter = 50
# Logging
# Use stdout for logging
log_file = "-"
# Workers
bind = "0.... | andrewguest/django-alpine-htmx | gunicorn.conf.py | gunicorn.conf.py | py | 425 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "multiprocessing.cpu_count",
"line_number": 18,
"usage_type": "call"
}
] |
27267958481 | from django.shortcuts import render
from django.views.decorators.csrf import csrf_exempt
from rest_framework.parsers import JSONParser
from django.http.response import JsonResponse
from viteproject.models import DesignSave
from viteproject.serializers import DesignSaveSerializer
from django.core.files.storage import ... | SurajBhosale003/Osdag-React-Django | backend/viteproject/views.py | views.py | py | 1,795 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "viteproject.models.DesignSave.objects.all",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "viteproject.models.DesignSave.objects",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "viteproject.models.DesignSave",
"line_number": 15,
"... |
26041579406 | from __future__ import annotations
import itertools
import re
from collections import defaultdict
from typing import Iterable, Iterator, Sequence, Tuple, TypeVar
from pkg_resources import Requirement
from typing_extensions import Protocol
from pants.backend.python.subsystems.setup import PythonSetup
from pants.backe... | pantsbuild/pants | src/python/pants/backend/python/util_rules/interpreter_constraints.py | interpreter_constraints.py | py | 21,381 | python | en | code | 2,896 | github-code | 6 | [
{
"api_name": "typing_extensions.Protocol",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "pants.build_graph.address.Address",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "pants.backend.python.target_types.InterpreterConstraintsField",
"line_number": 3... |
21499361084 | import importlib
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import os
import pandas as pd
import re
import seaborn as sns
import shutil
from datetime import timedelta
from file_read_backwards import FileReadBackwards
from functools import partial
from getpass import getuser
from openpyxl imp... | vicmcl/postpro | utils/misc.py | misc.py | py | 6,902 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "utils.find.find_logs",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "utils.find",
"line_number": 34,
"usage_type": "name"
},
{
"api_name": "utils.find.find_runs",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "file_read_backwa... |
71243441147 | import random
import string
#Image:一个画布
#ImageDraw:一个画笔
#ImageFont:画笔的字体
from PIL import Image,ImageDraw,ImageFont
#Captcha验证码
class Captcha(object):
#生成几位验证码
number = 4
#验证码图片的宽度和高度
size = (100,30)
#验证码字体大小
fontsize = 25
#加入干扰线的条数
line_number = 2
# 构建一个验证码源文件
SOURCE = list(str... | lubocsu/BBS | tool/captcha/__init__.py | __init__.py | py | 2,943 | python | en | code | 23 | github-code | 6 | [
{
"api_name": "string.ascii_letters",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "random.seed",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "random.choice",
... |
13865138503 | import argparse
import datetime
import json
import os
from itertools import zip_longest
from pathlib import Path
from typing import List, Optional, Tuple
import gpxpy
from rich import box
from hiking.import_export import JSON_IMPORT_EXAMPLE
from hiking.models import Hike
from hiking.utils import DATA_HOME, DEFAULT_BO... | open-dynaMIX/hiking | hiking/arg_parsing.py | arg_parsing.py | py | 10,991 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.Optional",
"line_number": 40,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 40,
"usage_type": "name"
},
{
"api_name": "hiking.models.Hike.FIELDS",
"line_number": 44,
"usage_type": "attribute"
},
{
"api_name": "hiking.mod... |
35729401904 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
# from multiprocessing.pool import ThreadPool
import threading
from time import sleep
import requests
from selenium import webdriver
from bs4 import BeautifulSoup
import output as op
class FlaskScraper:
# groupName: webUrl
dictOfNameAndWebUrl = {}
# weburl: webCont
dictO... | clamli/fdatanotice | scraper.py | scraper.py | py | 8,975 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 43,
"usage_type": "name"
},
{
"api_name": "time.sleep",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "bs4.Beautiful... |
36106930014 | import pyperclip
import re
matchPhone = re.compile(r'''(
(\d{3}|\(\d{3}\)) # area code
(\s|-|\.) # separator
(\d{3}) # first 3 digits
(\s|-|\.) # separator
(\d{4}) ... | kaisteussy/AtBS | automate_the_boring_stuff/Chapter 7/phoneAndEmail.py | phoneAndEmail.py | py | 1,355 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "re.compile",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "re.VERBOSE",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "re.compile",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "re.VERBOSE",
"line_number": ... |
15068023113 | from os import name
from django.urls import path
from . import views
urlpatterns = [
path('', views.home, name="home"),
path('about/', views.about, name="about"),
path('join_us/', views.join_us, name="join_us"),
path('hotel_detail/<int:hotel_id>/',
views.hotel_detail, name="hotel_detail"),
... | leenabadgujar/Online_Tiffin_Service | food/urls.py | urls.py | py | 935 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
71840534267 | # coding=utf8
from validate_email import validate_email
if __name__ == '__main__':
f = open("stargazers_email.txt", "r")
emails = f.readlines()
emails = [line.rstrip('\n') for line in emails]
valid_email = []
for i in range(len(emails)):
is_valid = validate_email(emails[i], verify=True)
print(is_valid)
if ... | haoshuai999/Master-project | validate_stargazers_email.py | validate_stargazers_email.py | py | 494 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "validate_email.validate_email",
"line_number": 11,
"usage_type": "call"
}
] |
24367084112 | import numpy as np
import cv2 as cv
image = cv.imread('lena.jpg')
image = cv.cvtColor(image, cv.COLOR_BGR2GRAY)
img = np.array(image)
height = image.shape[0]
width = image.shape[1]
kernel= np.array([[-1, -1, -1],[-1, 8, -1], [-1, -1, -1]])
#print(kernel)
m= kernel.shape[0]//2
w=h=3
conv= np.zeros(image.shape)
for i ... | maximana99/kernel-python | main.py | main.py | py | 589 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "cv2.imread",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "numpy.array",
"line_... |
11046567215 | import urllib.request, json
import pytz
from datetime import datetime
dateTimeStr=datetime.utcnow().replace(tzinfo=pytz.utc)
def jsonReaderScooter(urlToOpen):
with urllib.request.urlopen(urlToOpen) as url:
data = json.loads(url.read().decode())
retStr='lat,lon,isdisabled,time\n'
try:
with op... | hjames034/scooterRecordLA | parseScooter.py | parseScooter.py | py | 941 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "datetime.datetime.utcnow",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "pytz.utc",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "urllib.request.... |
34608382125 | import sys
import pygame
from setting import Settings
from setting import Ship
import game_functions as gf
def run_game():
# Initialize game and create a screen object.
pygame.init()
ai_settings = Settings()
screen = pygame.display.set_mode(
(ai_settings.screen_width, ai_settings.... | andy-miao-gu/preply_by_umair | old/okbruhpygame.py | okbruhpygame.py | py | 749 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pygame.init",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "setting.Settings",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pygame.display",... |
21139527922 | #!/usr/bin/env python3
import time
from pymavlink import mavutil
from trunk import *
#from colored import fg, bg, attr
from colored import fg, bg, attr
#if get_Setting('mainLoopStatus', 'status.json', 0) == "closed":
# print("Warning: Manual override enabled")
# set_Setting('mainLoopStatus', 'manual', 'status.json', 1... | j07rdi/controlzero_testing | mavlink_test.py | mavlink_test.py | py | 3,092 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "time.time",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pymavlink.mavutil.mavlink_connection",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "pymavlink.m... |
41146228063 | from flask import Flask, g, render_template, request, send_from_directory, url_for
import sqlite3, os, datetime
from werkzeug.utils import redirect, secure_filename
SITENAME = 'SaLeeMas - PicShare'
# Définir le dossier dans lequel les photos
# vont petre uploadés
UPLOAD_FOLDER = 'uploads'
ALLOWED_EXTENSIONS = {'png',... | Sabrina-MORSLI/PicShare | picshare/run.py | run.py | py | 7,210 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask.g",
"line_number": 22,
"usage_type": "argument"
},
{
"api_name": "flask.g._database",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "flask.g",
"line_nu... |
3121294529 | import os
import sys
import time
from functools import partial
from multiprocessing import Pool
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.chro... | davi1972/greener-app | greener-scraper/greener-scraper-cli.py | greener-scraper-cli.py | py | 9,583 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "selenium.webdriver.ChromeOptions",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "time.sleep",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "seleni... |
9771781643 | #Brownian Motion Simulator
#Simulate first on $R^1$
import numpy as np
import numpy
import matplotlib as mpl
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
import matplotlib.pyplot as plt
def graph(points):
data = np.array(points)
fig = plt.figure()
ax = fig.add_subplot(111)
ax.scatter(data[:,0],data... | ElleNajt/TinyProjects | BrownianMotionSimulator.py | BrownianMotionSimulator.py | py | 2,129 | python | en | code | 4 | github-code | 6 | [
{
"api_name": "numpy.array",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyp... |
650134167 | #! /usr/bin/python
import os
import sys
import json
import luigi
import numpy as np
import vigra
import nifty.ufd as nufd
import cluster_tools.utils.volume_utils as vu
import cluster_tools.utils.function_utils as fu
from cluster_tools.cluster_tasks import SlurmTask, LocalTask, LSFTask
#
# Find Labeling Tasks
#
cl... | constantinpape/cluster_tools | cluster_tools/connected_components/merge_assignments.py | merge_assignments.py | py | 4,231 | python | en | code | 32 | github-code | 6 | [
{
"api_name": "luigi.Task",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "luigi.Parameter",
"l... |
32102340399 | from typing import List
class Solution:
def canJump(self, nums: List[int]) -> bool:
if not nums or len(nums) < 2:
return True
max_arrive = nums[0]
for i in range(1, len(nums)):
if max_arrive < i:
return False
max_arrive = max(max_arrive, ... | Eleanoryuyuyu/LeetCode | python/Greedy/55. 跳跃游戏.py | 55. 跳跃游戏.py | py | 398 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "typing.List",
"line_number": 4,
"usage_type": "name"
}
] |
39131633270 | import random
from itertools import zip_longest
from typing import List
from config import MuZeroConfig
from game.game import AbstractGame
import _pickle as cPickle
import os
import numpy as np
class ReplayBuffer(object):
def __init__(self, config: MuZeroConfig, fighter):
self.window_size = config.windo... | Nebraskinator/StreetFighter2AI | muzero/training/replay_buffer.py | replay_buffer.py | py | 6,951 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "config.MuZeroConfig",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "config.window_size",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "config.batch_size",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "co... |
26806868269 | # -*- coding: utf-8 -*-
"""
Created on Wed Jan 23 17:29:26 2019
@author: dell
"""
from selenium import webdriver
from time import sleep
from bs4 import BeautifulSoup as bs
url = "https://www.google.com/"
browser = webdriver.Chrome("E:\\Study\\Project_4_Web_Scrapping\\chromedriver.exe")
browser.get(url)
... | lavish71/Forsk_2019 | Project_4_Web_Scrapping/Project_4_2/Project_4_2_2.py | Project_4_2_2.py | py | 665 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "time.sleep",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "time.sleep",
... |
25135340045 | from flask import Flask, request, render_template
from chatXYZ import run, run_test
import logging
# API Key
from config import openai_api_key
log_handler = logging.StreamHandler()
log_formatter = logging.Formatter("%(asctime)s - %(message)s")
log_handler.setFormatter(log_formatter)
logger = logging.getLogger()
log... | rikab/ChatXYZ | main.py | main.py | py | 2,111 | python | en | code | null | github-code | 6 | [
{
"api_name": "logging.StreamHandler",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "logging.Formatter",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "logging.INFO... |
11735874338 | import sys
import enum
from sqlalchemy import Column, DateTime, Integer, String, ForeignKey, Table
from sqlalchemy.orm import relationship, backref
from rhinventory.extensions import db
class SimpleAssetAttribute():
name: str
def __str__(self) -> str:
return f"{self.name}"
def asset_n_to_n_table(oth... | retroherna/rhinventory | rhinventory/models/asset_attributes.py | asset_attributes.py | py | 3,448 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "rhinventory.extensions.db.Model",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "rhinventory.extensions.db",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Table",
"line_number": 16,
"usage_type": "call"
},
{
"a... |
27265911454 | import time
import json
from scrape_linkedin.utils import AnyEC
from scrape_linkedin.Profile import Profile
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import Timeout... | DumbMachine/linkedin | person.py | person.py | py | 5,813 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "selenium.webdriver.support.ui.WebDriverWait",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "scrape_linkedin.utils.AnyEC",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.support.expected_conditions.presence_of_element_locate... |
34218162586 | # -*- coding: utf-8 -*-
"""
Created on Tue Feb 8 11:01:20 2022
@author: sonne
"""
#0. Imports
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
from matplotlib.figure import Figure
import matplotlib.patches as patches
import matplotlib.animation as animation
import matplotlib.ticker as tick... | tappelnano/molecular_dynamics | 2022_02_13_C5_Molekulardynamik.py | 2022_02_13_C5_Molekulardynamik.py | py | 22,402 | python | de | code | 0 | github-code | 6 | [
{
"api_name": "matplotlib.figure.Figure",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "matplotlib.figure.Figure",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "matplotlib.patches.Arrow",
"line_number": 68,
"usage_type": "call"
},
{
"api_na... |
72274308029 | import datetime
import inspect
import json
import logging
from typing import Callable, Dict, List, Union
_JSON_INDENT = 4
_JSON_SEPERATORS = (",", ": ")
_DEPTH_RECURSION_DEFAULT = 1
_DEPTH_RECURSION_GET_LOGGER = 2
_DEPTH_RECURSION_JSON_LOGGER = 3
_LOGGING_LEVEL = logging.INFO if not __debug__ else logging.DEBUG
_FOR... | novus-inc/pylogger | pylogger/pylogger.py | pylogger.py | py | 9,703 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.INFO",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "logging.DEBUG",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "inspect.currentframe",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "typing.Call... |
38058129584 | from lib.processors import findFaceGetPulse
import networkx as nx
"""
Simple tool to visualize the design of the real-time image analysis
Everything needed to produce the graph already exists in an instance of the
assembly.
"""
#get the component/data dependancy graph (depgraph) of the assembly
assembly = findFaceGe... | noahcse/webcam_pulse_detect | make_design_graph.py | make_design_graph.py | py | 615 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "lib.processors.findFaceGetPulse",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "networkx.to_agraph",
"line_number": 21,
"usage_type": "call"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.