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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
73435227303 | """setup.py file."""
import uuid
from setuptools import setup, find_packages
try:
# pip >=20
from pip._internal.network.session import PipSession
from pip._internal.req import parse_requirements
except ImportError:
try:
# 10.0.0 <= pip <= 19.3.1
from pip._internal.download import PipSes... | ixs/napalm-procurve | setup.py | setup.py | py | 1,391 | python | en | code | 21 | github-code | 36 | [
{
"api_name": "pip.req.parse_requirements",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "uuid.uuid1",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "setuptools.setup",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "setuptools.fin... |
15369619842 | from contextlib import contextmanager
from typing import Union
from apiens.error import exc
from .base import ConvertsToBaseApiExceptionInterface
@contextmanager
def converting_unexpected_errors(*, exc=exc):
""" Convert unexpected Python exceptions into a human-friendly F_UNEXPECTED_ERROR Application Error
... | kolypto/py-apiens | apiens/error/converting/exception.py | exception.py | py | 1,528 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "apiens.error.exc",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "apiens.error.exc",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "contextlib.contextmanager",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "typing.Uni... |
3102977676 | import json
import os
from flask import Flask, render_template, request
import tensorflow as tf
from tensorflow.contrib import predictor
os.environ['CUDA_VISIBLE_DEVICES']='0'
app = Flask(__name__)
print("# Load lm model...")
config = tf.ConfigProto(allow_soft_placement=True, log_device_placement=False)
config.gpu_opt... | flyliu2017/mask_comments | data_process/lm.py | lm.py | py | 766 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.environ",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "flask.Flask",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "tensorflow.ConfigProto",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "tensorflow.Session",... |
8017126240 | import datetime as dt
import logging
from sqlalchemy import (
Column,
ForeignKey,
MetaData,
Table,
UniqueConstraint,
create_engine,
)
from sqlalchemy.dialects import postgresql as pg
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import backref, relationship, sessio... | iterlace/knu_assistant | assistant/src/app/database.py | database.py | py | 8,494 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "logging.getLogger",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.create_engine",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "app.core.config.settings.SQLALCHEMY_DATABASE_URI",
"line_number": 21,
"usage_type": "attribute... |
73915028905 | import sqlite3
import utils
import csv
con = sqlite3.connect('bookswort.sqlite')
cur = con.cursor()
def positionStdDev(Books_id,Words_id):
import statistics
cur.execute('''SELECT position FROM Textorder WHERE Books_id = ? AND
Words_id = ?''', (Books_id,Words_id))
positions = [v[0] for ... | jevargas-m/bookdistillery | analyzebook.py | analyzebook.py | py | 7,639 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "sqlite3.connect",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "statistics.stdev",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "math.log10",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "csv.writer",
"line_num... |
1202982324 | from enum import Enum
import re
import datetime as dt
import pytz
from os.path import basename
from pandas import read_csv, to_datetime
class StrEnum(str, Enum):
def __str__(self):
return self._value_
@classmethod
def values(cls):
return [v.value for _, v in cls.__members__.items()]
cl... | sheryllan/tickdb | bar_checks/bar/datastore_config.py | datastore_config.py | py | 4,478 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "enum.Enum",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "pytz.UTC",
"line_number": 145,
"usage_type": "attribute"
},
{
"api_name": "os.path.basename",
"line_number": 149,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.strptime... |
12131483929 | from youtube_transcript_api import YouTubeTranscriptApi
import re
import string
import copy
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from PIL import Image
from wordcloud import WordCloud, STOPWORDS, ImageColorGenerator
from sklearn.feature_extraction.text import CountVectorizer
import spac... | vitmesquita/desafio_1sti | script/main.py | main.py | py | 9,747 | python | pt | code | 0 | github-code | 36 | [
{
"api_name": "nltk.download",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "spacy.load",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "wordcloud.STOPWORDS.add",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "wordcloud.STOPWORDS"... |
41824110115 | from pandas.io.parsers import read_csv
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
from matplotlib import cm
from matplotlib.ticker import LinearLocator, FormatStrFormatter
import numpy as np
def carga_csv(file_name):
"""carga"""
valores = read_csv(file_name, header=None).values
... | nesi73/AA | Practica 1/Practica1.2.py | Practica1.2.py | py | 1,873 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pandas.io.parsers.read_csv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.shape",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.shape",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.dot",
"l... |
42090081109 | from pathlib import Path
import logging
import shlex
import subprocess
import sys
# Returns the URIs of all the files inside 'path'.
def get_uri_list(path: Path) -> list:
uri_list = []
for file in path.iterdir():
if file.is_file():
uri_list.append(file.as_uri())
if uri_list == []:
... | Dante-010/change_wallpaper.py | helper_functions.py | helper_functions.py | py | 1,642 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pathlib.Path",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "logging.error",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "sys.exit",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "subprocess.run",
"line_number"... |
37746699511 | import requests
from bs4 import BeautifulSoup
from lxml.html import fromstring
from itertools import cycle
import traceback
class Scrape:
proxies = ""
proxy_pool = ""
def __init__(self):
self.proxies = self.get_proxies()
self.proxy_pool = cycle(self.proxies)
def get_proxies(self):
url = '... | msheroubi/album-central | main/scripts/scrape - Proxy Loop.py | scrape - Proxy Loop.py | py | 3,457 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "itertools.cycle",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "lxml.html.fromstring",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "requests.get",
... |
32143174021 | import os
import SimpleITK as sitk
import slicer
from math import pi
import numpy as np
# read input volumes
fixedImageFilename = '/Users/peterbehringer/MyImageData/ProstateRegistrationValidation/Images/Case1-t2ax-intraop.nrrd'
movingImageFilename= '/Users/peterbehringer/MyImageData/ProstateRegistrationValidation/Im... | PeterBehringer/BRAINSFit_to_SimpleITK | _old/simpleITK_EulerRotation.py | simpleITK_EulerRotation.py | py | 5,841 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "SimpleITK.ReadImage",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "SimpleITK.sitkFloat32",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "SimpleITK.ReadImage",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "Si... |
18645146697 | from pyttsx3 import init
from speech_recognition import Recognizer,Microphone
from webbrowser import open
import wikipedia
from datetime import date,datetime
# pip install pyttsx3 speech_recognition,wikipedia
''' speaking methord'''
def speak(output):
engine =init()
engine.setProperty('rate',120)
... | MohitKumar-stack/personal-computer-assistance | jarvis.py | jarvis.py | py | 2,308 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "pyttsx3.init",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "speech_recognition.Recognizer",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "speech_recognition.Microphone",
"line_number": 22,
"usage_type": "call"
},
{
"api_name... |
74612450025 | #有序字典
from collections import OrderedDict
from pyexcel_xls import get_data
def readXlsAndXlsxFile(path):
#创建一个有序的字典,excel中的数据都是有顺序的,所以用有序字典
dic = OrderedDict()
#抓取数据
xdata = get_data(path) #OrderedDict([('Sheet1', [['年度', '总人口(万人)', '出生人口(万人)', '死亡人口(万人)'.....
for sheet in xdata:
dic[shee... | hanyb-sudo/hanyb | 自动化办公/4、excel自动化办公/3、返回xls和xlsx文件内容.py | 3、返回xls和xlsx文件内容.py | py | 666 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "collections.OrderedDict",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pyexcel_xls.get_data",
"line_number": 11,
"usage_type": "call"
}
] |
18924228815 | from selenium import webdriver
from selenium.webdriver.common.by import By
import time
class SwitchToFrame():
def test1(self):
baseUrl = "https://letskodeit.teachable.com/pages/practice"
driver = webdriver.Firefox()
driver.maximize_window()
driver.get(baseUrl)
driver.find... | PacktPublishing/-Selenium-WebDriver-With-Python-3.x---Novice-To-Ninja-v- | CODES/S23 - Selenium WebDriver -_ Switch Window And IFrames/5_switch-to-alert.py | 5_switch-to-alert.py | py | 764 | python | en | code | 11 | github-code | 36 | [
{
"api_name": "selenium.webdriver.Firefox",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.common.by.By.ID",
"line_number": 14,
"usage_type": "attribute"
},
{
... |
3585776354 | # Local Imports
from utils import BertBatchInput, BertSingleDatasetOutput, BertBatchOutput
# Standard Imports
# Third Party Imports
import torch
from torch import nn
from torch.nn import MSELoss
from transformers import BertPreTrainedModel, BertModel
class ArgStrModel(BertPreTrainedModel):
"""Handles weights and... | The-obsrvr/ArgStrength | Hyper-parameter-optimization/src/modeling.py | modeling.py | py | 8,100 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "transformers.BertPreTrainedModel",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "transformers.BertModel",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "torch.nn.Sigmoid",
"line_number": 22,
"usage_type": "call"
},
{
"api_name... |
42768410408 | from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.converter import TextConverter, HTMLConverter
from pdfminer.layout import LAParams
from pdfminer.pdfpage import PDFPage
from collections import defaultdict
from io import BytesIO
import PyPDF2
import re
import json
from PDF_Keywords_Ext... | CSIRO-enviro-informatics/modsim-keywords | PDF_Keywords_Extractor/PdfExtractor.py | PdfExtractor.py | py | 7,785 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "bs4.BeautifulSoup",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "PDF_Keywords_Extractor.PdfOcr.keywordpdftotext",
"line_number": 84,
"usage_type": "call"
},
{
"api_name": "PDF_Keywords_Extractor.PdfOcr",
"line_number": 84,
"usage_type": "name"
... |
29550562784 | from pymongo import MongoClient
import json
#import numpy as np
puerto = 27017
#puerto = 50375
hostname = 'localhost'
def ConectToMongoDB(puerto, Hostname):
# Conexión a la base de datos
mongoClient = MongoClient(Hostname, puerto)
# Creamos la base de datos Pulseras
db = mongoClient.Pulseras
# ... | palomadominguez/TFG-pulseras | src/MongoConection.py | MongoConection.py | py | 1,109 | python | es | code | 0 | github-code | 36 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 37,
"usage_type": "call"
}
] |
8445202168 | """Module for RBF interpolation."""
import math
import warnings
from itertools import combinations_with_replacement
import cupy as cp
# Define the kernel functions.
kernel_definitions = """
static __device__ double linear(double r)
{
return -r;
}
static __device__ float linear_f(float r)
{
return -r;
}
... | cupy/cupy | cupyx/scipy/interpolate/_rbfinterp.py | _rbfinterp.py | py | 23,197 | python | en | code | 7,341 | github-code | 36 | [
{
"api_name": "cupy._core.create_ufunc",
"line_number": 113,
"usage_type": "call"
},
{
"api_name": "cupy._core",
"line_number": 113,
"usage_type": "attribute"
},
{
"api_name": "cupy._core.create_ufunc",
"line_number": 125,
"usage_type": "call"
},
{
"api_name": "cu... |
70447210985 | import os
import typer
from src.core.config import settings
from src.collection.building import collect_building
from src.collection.poi import collect_poi
from src.collection.landuse import collect_landuse
from src.collection.network import collect_network
from src.collection.network_pt import collect_network_pt
from ... | goat-community/data_preparation | manage.py | manage.py | py | 4,391 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "typer.Typer",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "src.db.db.Database",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "src.core.config.settings.LOCAL_DATABASE_URI",
"line_number": 25,
"usage_type": "attribute"
},
{
"a... |
30371792823 | import streamlit as st
from EmailSender import EmailSender
from models.client.client import CreateClient
from models.client.message import CreateMessage
from models.client.template import CreateTemplate
from pages.group_send import run_group_send
from pages.single_send import run_single_send
from pages.manage_client... | helmi75/SendMegaEmailsOVH | App/main.py | main.py | py | 1,610 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "EmailSender.EmailSender",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "models.client.message.CreateMessage",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "models.client.client.CreateClient",
"line_number": 21,
"usage_type": "call"
... |
21362127557 | # step1_unpack.py
"""Read the GEMS output directly from .tar archives, compile it into a single
data set of size (num_variables * domain_size)x(num_snapshots), and save it
in HDF5 format.
The GEMS data for this project collects snapshots of the following variables.
* Pressure
* x-velocity
* y-velocity
* Temperature
*... | a04051127/ROM-OpInf-Test | step1_unpack.py | step1_unpack.py | py | 8,380 | python | en | code | null | github-code | 36 | [
{
"api_name": "re.compile",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "numpy.empty",
"line_number": 79,... |
86452991700 | import pandas as pd
import numpy as np
import scanpy as sc
import decoupler as dc
import anndata as ad
import matplotlib.pyplot as plt
import matplotlib.backends.backend_pdf
import argparse
# Init args
parser = argparse.ArgumentParser()
parser.add_argument('-m','--meta_path', required=True)
parser.add_argument('-p','... | saezlab/VisiumMS | workflow/scripts/figures/fig1/niches_markers.py | niches_markers.py | py | 2,695 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "scanpy.read_h5ad",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "pandas.read_... |
73478421545 | import pygame
import random
from pygame.math import Vector2
from triangle import Triangle
from settings import *
from colors import *
class Sierpinski:
def __init__(self):
self.width = WIDTH
self.height = HEIGHT
self.xoff = X_OFF
self.yoff = Y_OFF
self.gameWinWidth = GA... | Deadshot96/sierpinski-triangle | main.py | main.py | py | 3,079 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pygame.init",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "pygame.font.init",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "pygame.font",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "pygame.display.set_mode... |
15768186318 | """Test cases for the kallisto methods."""
import numpy as np
import pytest
from kallisto.units import Bohr
from rdkit import Chem
from rdkit.Chem.rdMolDescriptors import CalcNumAtoms
from tests.store import pyridine
from jazzy.core import get_charges_from_kallisto_molecule
from jazzy.core import kallisto_molecule_fro... | AstraZeneca/jazzy | tests/test_kallisto.py | test_kallisto.py | py | 3,257 | python | en | code | 63 | github-code | 36 | [
{
"api_name": "tests.store.pyridine",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.isclose",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.isclose",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "tests.store.pyridine... |
42893966152 | import json
import boto3
print('creating client')
client = boto3.client(
'dynamodb',
# endpoint_url="http://9.9.9.9:8000",
endpoint_url="http://localhost:8000",
aws_access_key_id='dummyid',
aws_secret_access_key='dummykey',
aws_session_token='dummytoken',
region_name='us-west-2'
)
def... | tthoraldson/PetMatch | src/pet_match_stack/lambdas/dynamo_test/app.py | app.py | py | 878 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "boto3.client",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 36,
"usage_type": "call"
}
] |
36919269029 | from __future__ import unicode_literals, division, absolute_import, print_function
import logging
import base64
import inspect
import re
import enum
import sys
import textwrap
import time
from datetime import datetime, timezone, timedelta
from typing import Callable, Tuple, Optional
from asn1crypto import x509, keys,... | mongodb/mongo | src/third_party/mock_ocsp_responder/mock_ocsp_responder.py | mock_ocsp_responder.py | py | 23,898 | python | en | code | 24,670 | github-code | 36 | [
{
"api_name": "logging.getLogger",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sys.version_info",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "textwrap.dedent",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "re.sub",
... |
70427123945 |
def outer_function():
num = 20
def inner_function():
global num
num = 30
print("Before calling inner_function(): ", num)
inner_function()
print("After calling inner_function(): ", num)
outer_function()
print("Outside both function: ", num)
import random
print(random.randra... | asu2sh/dev | Python/main.py | main.py | py | 22,131 | python | en | code | 3 | github-code | 36 | [
{
"api_name": "random.randrange",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "random.choice",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "random.shuffle",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "random.random",
"li... |
31877057798 | import numpy as np
import cv2 as cv
from pathlib import Path
def get_image():
Class = 'BACKWARD'
Path('DATASET1/'+Class).mkdir(parents=True, exist_ok=True)
width=1200
height=720
cam=cv.VideoCapture(0,cv.CAP_DSHOW)
cam.set(cv.CAP_PROP_FRAME_WIDTH, width)
cam.set(cv.CAP_PROP_FRAME_HEIGHT,hei... | Ewon12/Hand-Gesture-Recogniton-Control-for-a-Cylindrical-Manipulator | get_image.py | get_image.py | py | 1,043 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pathlib.Path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "cv2.CAP_DSHOW",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "cv2.CAP_PROP_FRAME_WI... |
74352477543 | # -*- coding: utf-8 -*-
"""
-------------------------------------------------------------------------------
GUFY - Copyright (c) 2019, Fabian Balzer
Distributed under the terms of the GNU General Public License v3.0.
The full license is in the file LICENSE.txt, distributed with this software.
----------------... | Fabian-Balzer/GUFY | GUFY/simgui_modules/configureGUI.py | configureGUI.py | py | 15,735 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "logging.getLogger",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "configparser.ConfigParser",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "PyQt5.Q... |
73485125223 | # https://programmers.co.kr/learn/courses/30/lessons/72415
from collections import defaultdict
import heapq
dr = (-1, 1, 0, 0)
dc = (0, 0, -1, 1)
def get_cnt(board, r, c, _r, _c):
cnt_map = [[float('inf') for _ in range(4)] for _ in range(4)]
cnt_map[r][c] = 0
pq = [(0, r, c)]
heapq.heapify(pq)
... | lexiconium/algorithms | programmers/2021_KAKAO_BLIND_RECRUITMENT/72415.py | 72415.py | py | 1,997 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "heapq.heapify",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "heapq.heappop",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "heapq.heappush",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "heapq.heappush",
"line... |
37069874151 | #!/usr/bin/python3
"""
function that queries the Reddit API and prints the titles
of the first 10 hot posts listed for a given subreddit.
"""
import requests
def top_ten(subreddit):
"""
function that queries subredit hot topics
"""
params = {'limit': 10}
url = f"https://www.reddit.com/r/{subreddi... | wughangar/alx-system_engineering-devops | 0x16-api_advanced/1-top_ten.py | 1-top_ten.py | py | 1,000 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "requests.get",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "requests.exceptions",
"line_number": 35,
"usage_type": "attribute"
}
] |
2548310 | import pytest
from comicgeeks import Comic_Geeks
from dotenv import dotenv_values
from pathlib import Path
dotenv_path = Path(".devdata.env")
env = dotenv_values(dotenv_path=dotenv_path)
if "LCG_CI_SESSION" not in env:
import os
env = {
"LCG_CI_SESSION": os.environ.get("LCG_CI_SESSION"),
"LCG_... | pruizlezcano/comicgeeks | tests/test_Issue.py | test_Issue.py | py | 6,575 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "pathlib.Path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "dotenv.dotenv_values",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line... |
14681878400 | import csv
import math
import os
import sys
import torch
from matplotlib import pyplot as plt
from torch.utils.data import DataLoader
import Feedforward
import Kalman
from BKF_testing import start_test
from CircleGenerator import CirclesDataset, create_directory, save_tensor
from DeviceDataLoader import DeviceDataLoade... | tiboat/BackpropKF_Reproduction | BKF.py | BKF.py | py | 16,374 | python | en | code | 6 | github-code | 36 | [
{
"api_name": "DeviceDataLoader.get_default_device",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "torch.no_grad",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "torch.tensor",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "math.e... |
20579907742 | import numpy as np
import matplotlib.pyplot as plt
from tkinter import *
from tkinter import messagebox
# Own Fuctions
from harmGen import *
from transformLibrary import *
from visualization import *
from preSettings import preSet # Optional: copy another PreSet.py file with new default values... | josediazb/alpha-beta-harmonics | clarkeos.py | clarkeos.py | py | 4,883 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "tkinter.messagebox.showinfo",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "tkinter.messagebox",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "preSettings.preSet",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "mat... |
73850392743 | from django.urls import path
from . import views
# /articles/ ___
app_name = 'articles'
urlpatterns = [
# 입력 페이지 제공
path('', views.index, name='index'),
# /articles/10/ 이런식으로 몇번 게시글 보여주세요 라는 의미이다.
path('<int:article_pk>/', views.detail, name='detail'), # detail
# path('new/', views.new, name='new')... | blueboy1593/Django | Django_crud/articles/urls.py | urls.py | py | 923 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
1270205424 | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="PyPolkaSideCar-mickstar", # Replace with your own username
version="0.0.1",
author="Michael Johnston",
author_email="michael.johnston29@gmail.com",
description="A Simple ... | mickstar/PyPolkaSideCar | setup.py | setup.py | py | 823 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "setuptools.setup",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",
"line_number": 21,
"usage_type": "call"
}
] |
29696788586 | import utils
def read_input(path):
return [(l[0], int(l[1]))
for l in [l.split() for l in utils.read_lines(path)]]
def part1(path):
input = read_input(path)
h = 0
v = 0
for m in input:
if m[0] == "forward":
h += m[1]
elif m[0] == "up":
v -= m... | dialogbox/adventofcode | py/2021/day2.py | day2.py | py | 666 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "utils.read_lines",
"line_number": 6,
"usage_type": "call"
}
] |
16097700723 | from player import Player
from typing import List
class LineUp:
def __init__(self):
self.players:List[Player] = []
def addPlayer(self, player: Player):
self.players.append(player)
def print(self, otherLineup):
if(otherLineup == 0):
for player in self.players:
... | JHarding86/SoccerSubs | lineup.py | lineup.py | py | 3,616 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "typing.List",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "player.Player",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "player.Player",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "player.Player",
"line_number... |
41220371897 | # https://en.wikipedia.org/wiki/Trilateration
# https://electronics.stackexchange.com/questions/83354/calculate-distance-from-rssi
# https://stackoverflow.com/questions/4357799/convert-rssi-to-distance
# https://iotandelectronics.wordpress.com/2016/10/07/how-to-calculate-distance-from-the-rssi-value-of-the-ble-beacon/
... | mirrorcoloured/picobeacon | analysis/analysis.py | analysis.py | py | 4,235 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pandas.read_csv",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "plotly.express.scatter_3d",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "plotly.exp... |
19249979909 | from functools import reduce
from typing import NamedTuple
Coord = tuple[int, int]
"""X and Y coordinates"""
Views = list[list[int]]
"""
The views from the tree looking outwards.
Each outer list is a direction. The inner list contains tree heights. The start of the list is closest to the tree.
"""
class Tree(NamedT... | dan-osull/python_aoc2022 | day08/code.py | code.py | py | 2,988 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "typing.NamedTuple",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "functools.reduce",
"line_number": 78,
"usage_type": "call"
}
] |
30481483106 | from pathlib import Path
import pyotp
from Model import login, order_book, stats, trades
from time import sleep
import pandas as pd
import json
import datetime
from threading import Thread
import pickle
import os.path
class Controller:
TOKEN = ""
symbols = None
order_list = []
trade_list = []
stat... | amirhosseinttt/nobitexAutoTrader | dataCollector/Controller.py | Controller.py | py | 11,133 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pandas.set_option",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "pandas.set_option",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "pandas.set_option",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "os.path.path.di... |
28091587486 | from flask import Flask, render_template, redirect
from flask_restful import abort, Api
import news_resources
import projects_resources
import library_recources
import reports_resources
from __all_forms import LoginForm, RegistrationForm, CreateNewsForm, CreateProjectForm, ChangePasswordForm, \
FindErrorForm
from d... | InfiRRiar/YL_proj_web | run.py | run.py | py | 16,572 | python | ru | code | 0 | github-code | 36 | [
{
"api_name": "flask.Flask",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "flask_restful.Api",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "flask_login.LoginManager",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "datetime.timed... |
29659709532 | #Import modules
from bs4 import BeautifulSoup
from urllib.request import urlopen
import math
import pandas as pd
import numpy as np
from sklearn.linear_model import LinearRegression
#Lottery ticket expectation value calculator
class lottery_expectation_calculator:
def __init__(self):
self.current_jackpot ... | StanleyKubricker/Lottery-Expectation-Value | lottery_expectation_value.py | lottery_expectation_value.py | py | 4,744 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "urllib.request.urlopen",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "urllib.request.urlopen",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "bs4.B... |
31727663113 | """
This module should contain helper functionality that assists for Jira.
"""
import logging
from collections import namedtuple
from typing import Dict, List, Union
import jira
SSLOptions = namedtuple("SSLOptions", "check_cert truststore")
class JiraUtils:
"""
This class contains the shared functions that ... | openSUSE/sle-prjmgr-tools | sle_prjmgr_tools/utils/jira.py | jira.py | py | 5,957 | python | en | code | 4 | github-code | 36 | [
{
"api_name": "collections.namedtuple",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "jira.JIRA",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "typing.Dict",
... |
6394563903 | import jax
import jax.numpy as jnp
import numpy as np
import pyscf
import chex
from jaxtyping import Float, Array, Int
from jsonargparse import CLI, Namespace
from functools import partial
from collections import namedtuple
from icecream import ic
from pyscf_ipu.nanoDFT import utils
from pyscf_ipu.exchange_correlation.... | graphcore-research/pyscf-ipu | pyscf_ipu/nanoDFT/nanoDFT.py | nanoDFT.py | py | 36,015 | python | en | code | 31 | github-code | 36 | [
{
"api_name": "jax.numpy",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "numpy.shape",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "jax.lax.dynamic_update_slice",
"line_number": 78,
"usage_type": "call"
},
{
"api_name": "jax.lax",
... |
10731339024 | from db import model
from api import api
from datetime import datetime
import json
import webbrowser
from vkinder.settings import Settings
class APP:
def __init__(self, token, _id):
self.vk = api.VK(token)
self.user_id = str(self.vk.resolve_screen_name(_id))
self.db = model.DB(self.user_i... | rychanya/vkinder | src/vkinder/app.py | app.py | py | 3,208 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "api.api.VK",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "api.api",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "db.model.DB",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "db.model",
"line_number": 14,
... |
69886416746 | import requests
import os
CHAT_ID = os.getenv('CHAT_ID')
TOKEN = os.getenv('TG_TOKEN')
print(f"TOKEN is {TOKEN}, CHAT_ID is {CHAT_ID}")
if not CHAT_ID or not TOKEN:
raise ValueError("Char ID or TOKEN was not specified")
TOKEN = TOKEN.replace("\n", "")
async def send_message(data: str):
"""
Send data t... | dievskiy/devops-kubernetes-course | part-5/502/broadcaster/send.py | send.py | py | 666 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "os.getenv",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 24,
"usage_type": "call"
}
] |
5495864560 | import pickle
from flask import Flask, request, app, jsonify,url_for, render_template
import numpy as np
import pandas as pd
from sklearn.preprocessing import StandardScaler
app=Flask(__name__)
## load the model
regmodel=pickle.load(open('regmodel.pkl','rb'))
scalar=pickle.load(open('scaling.pkl','rb'))
@app.route('/... | MithunMiranda/bostonhousepricing | app.py | app.py | py | 997 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "flask.app",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "flask.Flask",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 11,
... |
74552235623 | import os
import json
import sqlite3
import datetime, time
import itertools
from common import util
import queue
import threading
from threading import Thread
import logging
import sqlite3
import datetime, time
import itertools
from common import util
class IDEBenchDriver:
def init(self, options, schema, driver... | leibatt/crossfilter-benchmark-public | drivers/sqlite.py | sqlite.py | py | 3,498 | python | en | code | 3 | github-code | 36 | [
{
"api_name": "queue.LifoQueue",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 2... |
31604178727 | import json
ores = [
'iron',
'coal',
'gold',
'copper',
'silver',
'redstone',
'diamond',
'lapis',
'emerald',
'quartz',
'tin',
'lead',
'nickel',
'zinc',
'aluminum',
'cobalt',
'osmium',
'iridium',
'uranium',
'ruby',
'sapphire',
'sulfu... | N-Wither/omniores | src/main/python_data_generate/tag/ores.py | ores.py | py | 2,012 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "json.dumps",
"line_number": 67,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 70,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 75,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 79,
... |
18873086609 | from django.shortcuts import redirect, render
from . import models
def index(req):
return render(req, 'home.html')
def listKategori(req):
if req.method == 'POST':
kategori_id = req.POST.get('kategori_id')
data = models.KategoriModel.objects.get(id=kategori_id)
data.delete()
return redirect('/kateg... | zakiyul/2022django | bookstore/views.py | views.py | py | 4,596 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.shortcuts.render",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.redirect",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 14,
"usage_type": "call"
},
{
"api_name... |
7522166332 | import cv2
from mtcnn import MTCNN
capture = cv2.VideoCapture(0)
detector = MTCNN()
while True:
ret, frame = capture.read()
faces = detector.detect_faces(frame)
for single_faces in faces:
x, y, width, height = single_faces["box"]
left_eyeX, left_eyeY = single_faces["keyp... | iamSobhan/deep_learning | face_detection/face_video_detect.py | face_video_detect.py | py | 1,466 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "mtcnn.MTCNN",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cv2.rectangle",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "cv2.circle",
"line_numbe... |
6601688520 | from flask import render_template,request,redirect
from models import *
from forms import CardForm, StoryForm, NewsForm
from upload import save_file
from app import app
from extensions import db
import requests
import xml.etree.ElementTree as ET
@app.route('/')
def index():
story = Story.query.all()
card = Car... | Emrahgs/Yelo-Bank-Flask | controllers.py | controllers.py | py | 3,427 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "flask.render_template",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "app.app.route",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "app.app",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "flask.render_template",
... |
2116048955 | from mirl.agents.td3_agent import TD3Agent
import mirl.torch_modules.utils as ptu
import torch.nn.functional as F
import copy
from mirl.utils.logger import logger
class TD3BCAgent(TD3Agent):
def __init__(
self,
env,
policy,
qf,
qf_target,
pool=None,
normali... | QiZhou1997/MIRL | mirl/agents/td3bc_agent.py | td3bc_agent.py | py | 4,104 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "mirl.agents.td3_agent.TD3Agent",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "mirl.torch_modules.utils.from_numpy",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "mirl.torch_modules.utils",
"line_number": 33,
"usage_type": "name"
},... |
12267770021 | # coding=utf8
from youtubesearchpython import Search
import pandas as pd
import numpy as np
search_query_test = 'Кончится Лето Kino'
def find_first_vid(search_query):
allSearch = Search(search_query, limit = 1)
result_dict = allSearch.result()
result_dict2 = list(result_dict.values())[-1]
... | WildLegolas/spotify_csv_to_mp3 | youtube_vid_finder.py | youtube_vid_finder.py | py | 2,573 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "youtubesearchpython.Search",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "pytube.YouTube",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "os.path.spl... |
39156552883 | import re
from math import log
from time import sleep
import subprocess
from io import StringIO
from pathlib import Path
from operator import itemgetter
from Bio import SearchIO, SeqIO
from Bio.Blast import NCBIXML, NCBIWWW
from RecBlast import print, merge_ranges
from RecBlast.WarningsExceptions import *
class Searc... | docmanny/RecSearch | RecBlast/Search.py | Search.py | py | 43,643 | python | en | code | 4 | github-code | 36 | [
{
"api_name": "pathlib.Path",
"line_number": 23,
"usage_type": "argument"
},
{
"api_name": "pathlib.Path",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "RecBlast.print",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "RecBlast.print",
"li... |
40877684818 | import argparse
import sys
import datetime
from lib.data_holder import *
from lib.models import *
from lib.extremums import *
###
### GLOBALS
###
CACHE_DIR = 'cache'
data_holder = None
def lazy_data_holder():
global data_holder
if data_holder is None:
data_holder = DataHolder()
return data_hol... | Intelligent-Systems-Phystech/ProbabilisticMetricSpaces | code/main.py | main.py | py | 6,488 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "matplotlib.backends.backend_pdf.PdfPages",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 145,
"usage_type": "call"
},
... |
39908905434 | # Imports from FindRoots
from FindRoots import fixPoint
from FindRoots import bisection
from FindRoots import falsPos
from FindRoots import newRap
from FindRoots import secant
from FindRoots import multipleRoot
from FindRoots import intervals
from FindRoots import derivatives
# Imports from Integrals
from Integral... | Ngonzalez693/MetodosNumericos | ProgramMetods/main.py | main.py | py | 9,646 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "numpy.arange",
"line_number": 82,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 92,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 92,
"usage_type": "name"
},
{
"api_name": "matplotlib.py... |
22612711093 | import urllib3
from kivy.clock import Clock
from functools import partial
class Ping():
# Выводим статус подключения к сети на главной странице и странице Настроек
def getPing(self, ti):
try:
http=urllib3.PoolManager()
response = http.request('GET', 'http://google.com')
self.screens[0].ids.net_l... | IPIvliev/Pro_2 | Moduls/ping.py | ping.py | py | 655 | python | ru | code | 0 | github-code | 36 | [
{
"api_name": "urllib3.PoolManager",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "kivy.clock.Clock.schedule_interval",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "kivy.clock.Clock",
"line_number": 20,
"usage_type": "name"
},
{
"api_name"... |
23620498135 | import math
import json
import argparse
import cv2
import numpy as np
from shapely.geometry import Point
from PIL import Image, ImageDraw, ImageFont
SIZE = 60, 60
INNER_CIRCLE_DIAM = 28
HOLE_SPACING = 0
HOLE_SIZE = 0.800 # only used for debug out... | volzotan/LensLeech | fabrication/stencil/cncwrite.py | cncwrite.py | py | 13,041 | python | en | code | 5 | github-code | 36 | [
{
"api_name": "math.sqrt",
"line_number": 126,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_number": 127,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_number": 131,
"usage_type": "call"
},
{
"api_name": "PIL.ImageFont.load_default",
"li... |
36369809558 | from ast import literal_eval
import os, sys
import customtkinter as ctk
from PIL import Image
ctk.set_appearance_mode("dark")
ctk.set_default_color_theme("blue")
from numpy import number
sys.path.insert(0, os.path.dirname("algorithms"))
import random
import copy
import tkinter as tk
from tkinter import ttk
fro... | Jakcrimson/pjeb_twitter_sentiment_analysis | gui/xsa.py | xsa.py | py | 26,096 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "customtkinter.set_appearance_mode",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "customtkinter.set_default_color_theme",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sys.path.insert",
"line_number": 11,
"usage_type": "call"
},
{
... |
42194323986 | import datetime
import math
from sqlalchemy import desc, asc
from app.main import db
from app.main.model.product_price_history import ProductPriceHistory
from app.main.model.product import Product
def save_product_price_history(data):
errors = {}
# Check null
if data['effective_date'] == "":
err... | viettiennguyen029/recommendation-system-api | app/main/service/product_price_history_service.py | product_price_history_service.py | py | 14,012 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "app.main.model.product.Product.query.filter_by",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "app.main.model.product.Product.query",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "app.main.model.product.Product",
"line_number": 37,
... |
73323091304 | from django.shortcuts import render
from Process.models import *
from django.contrib.auth.decorators import login_required
from django.contrib.auth import get_user_model,login,logout,authenticate
from django.http import HttpResponse
from django.shortcuts import redirect
from datetime import datetime
from django.... | ZidbeRR/Projekat-Grupa-2 | projekat/eIzbori/Process/views.py | views.py | py | 24,794 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pathlib.Path",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.models.Group.objects.get",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.models.Group.objects",
"line_number": 23,
"usage_type": "at... |
8860145335 | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import os
seeds = [6969, 4242, 6942, 123, 420, 5318008, 23, 22, 99, 10]
delta_vals = [0.1, 0.2, 0.3, 0.4, 0.6, 0.7, 0.8, 0.9, 0.001, 0.005, 0.01, 0.05, 0.5, 1, 2, 3, 5]
delta_vals = [1, 2, 3, 5]
root_folder = 'sumo/test_results'
test_results = 'n... | TheGoldenChicken/robust-rl | examineloss.py | examineloss.py | py | 1,060 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.path.join",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "pandas.read_csv",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_nu... |
10492814030 | import matplotlib.pyplot as plt
import pyk4a
from pyk4a import Config, PyK4A
import open3d as o3d
import time
import numpy as np
import copy
import cv2
from modern_robotics import *
if __name__ == "__main__":
k4a = PyK4A(
Config(
color_resolution=pyk4a.ColorResolution.RES_720P,
de... | chansoopark98/3D-Scanning | test_code/capture_by_button.py | capture_by_button.py | py | 2,887 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pyk4a.PyK4A",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pyk4a.Config",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pyk4a.ColorResolution",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "pyk4a.DepthMode",... |
74004605223 | import os
from openai import OpenAI
from sentence_transformers import SentenceTransformer
from typing import Protocol
import numpy.typing as npt
import numpy as np
import config
class EmbeddingMaker(Protocol):
def encode(self, text: str) -> npt.NDArray[np.float32]:
...
class AI:
def __init__(self) ... | capgoai/doc_search | api/ai.py | ai.py | py | 1,070 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "typing.Protocol",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "numpy.typing.NDArray",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "numpy.typing",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "numpy.float32"... |
29867512033 | import os
import json
import shelve
from jsonobject import JsonObject
from constants import *
class TranslationDB():
def __init__(self):
if CLEAN:
self.db = shelve.open(TRANSLATION_CACHE_NAME, flag='n')
self.db = shelve.open(TRANSLATION_CACHE_NAME)
if len(self.db) == 0... | Jugbot/FEH-Automation | database/translationdb.py | translationdb.py | py | 782 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "shelve.open",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "shelve.open",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.walk",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 17,... |
12366302032 | """Module containing a framework for unittesting of AMPLE modules"""
__author__ = "Felix Simkovic"
__date__ = "22 Mar 2016"
__version__ = "1.0"
import glob
import logging
import os
import sys
from ample.constants import AMPLE_DIR
from unittest import TestLoader, TextTestRunner, TestSuite
# Available packages. Hard-... | rigdenlab/ample | ample/testing/unittest_util.py | unittest_util.py | py | 2,557 | python | en | code | 6 | github-code | 36 | [
{
"api_name": "logging.getLogger",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "ample.constants.AMPLE_DIR",
"line_number": 34,
"usage_type": "argument"
},
{
"api_name": "ample.constants.AMPLE_DIR",
"line_number": 36,
"usage_type": "argument"
},
{
"api... |
21439179828 | import scrapy
class QuotesSpider(scrapy.Spider):
name = "reviews"
start_urls = [
'https://domicilios.com/restaurantes/bogota/ppc-suba-menu?t=comentarios',
]
def parse(self, response):
for review in response.css("#reviewList > li"):
yield {
'text': review.cs... | VolodyaCO/e-Marketing_Konrad2019 | spider.py | spider.py | py | 1,152 | python | es | code | 1 | github-code | 36 | [
{
"api_name": "scrapy.Spider",
"line_number": 4,
"usage_type": "attribute"
}
] |
10524711951 | #!/usr/bin/python
import os
from os.path import expanduser
from dotenv import load_dotenv
import mysql.connector
def se_db_run_cmd(query,values):
home = expanduser("~")
config_path = home + "/.app_config/.env_db"
load_dotenv(dotenv_path=config_path)
try:
mydb = mysql.connector.connect(
host=os.ge... | jsanchezdevelopment/se_project | se_test/se_db/se_db_run_cmd.py | se_db_run_cmd.py | py | 926 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.path.expanduser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "dotenv.load_dotenv",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "mysql.connector.connector.connect",
"line_number": 14,
"usage_type": "call"
},
{
"api_name":... |
27410425777 | from io import UnsupportedOperation
import numpy as np
import unittest
class IntegerEncoder:
"""Encoder of integer values into a set of other encoding formats. (Binary and grey-decoded) are only supported now.
"""
def __init__(self) -> None:
return
def __binary_encoder(self, value... | skycoin/kcg-tiletool | int-encoder/IntegerEncoder.py | IntegerEncoder.py | py | 3,890 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "numpy.binary_repr",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "io.UnsupportedOperation",
"line_number": 71,
"usage_type": "call"
},
{
"api_name": "unittest.TestCase",
"line_number": 74,
"usage_type": "attribute"
},
{
"api_name": "unit... |
33930837671 | from aiogram import Bot, types
from aiogram.dispatcher import Dispatcher
from aiogram.utils import executor
from bot_keyboards import (first_start_keyboard, menu_keyboard)
TOKEN = '5669721003:AAHm1uNSZyJXRw43GZH84cvwTXsmjD833zY'
bot = Bot(token=TOKEN)
dp = Dispatcher(bot)
@dp.message_handler(commands=['start','he... | MarietaKsenia/olxBot | repeat.py | repeat.py | py | 1,997 | python | uk | code | 0 | github-code | 36 | [
{
"api_name": "aiogram.Bot",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "aiogram.dispatcher.Dispatcher",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "aiogram.types.Message",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "... |
32512355098 | """this module contains methods for working with a web server
"""
from http.server import BaseHTTPRequestHandler, HTTPServer
import cgi
from search_engine import SearchEngine, Context_Window
import time
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
"""create an html page with a... | mathlingv-siv/tokenizer | web_server.py | web_server.py | py | 8,672 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "http.server.BaseHTTPRequestHandler",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "time.time",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "cgi.FieldStorage",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "time.tim... |
38495991100 | import imp
import os.path
from collections import namedtuple
ConfigValue = namedtuple('ConfigValue', ('name', 'description'))
class NotPresentType(object):
def __repr__(self):
return "NotPresent"
NotPresent = NotPresentType()
BASE_CONFIG = (
ConfigValue('token', 'github auth token'),
ConfigValue(... | mwhooker/gh | gh/ghconfig.py | ghconfig.py | py | 1,871 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "collections.namedtuple",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path.path.expanduser",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path.path",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "os.pa... |
71914015143 | from keras import layers, models, optimizers
MAXLEN = 128
CHARS = 1000
HIDDEN_DIM = 128
def make_encoder() -> models.Sequential:
model = models.Sequential(name='encoder')
model.add(layers.TimeDistributed(layers.Dense(HIDDEN_DIM), input_shape=(MAXLEN, CHARS)))
model.add(layers.LSTM(HIDDEN_DIM, return_sequ... | cympfh/twitter-dialogue-bot | bot/model.py | model.py | py | 1,131 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "keras.models.Sequential",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "keras.models",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "keras.layers.TimeDistributed",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "keras... |
33763269561 | """The CLI entry of steamutils."""
from argparse import ArgumentParser
from ._version import __version__ as version
def main(argv=None):
"""Tools for performing analytics on steam users, steam groups and servers using the SteamAPI and various popular SourceMod plugins"""
parser = ArgumentParser()
parser.... | CrimsonTautology/steamutils | src/steamutils/__main__.py | __main__.py | py | 691 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "_version.__version__",
"line_number": 12,
"usage_type": "name"
}
] |
20529220011 | import numpy as np
import matplotlib.pyplot as plt
greyhounds = 500
lads = 500
grey_height = 28 + 4 * np.random.randn(greyhounds)
lad_height = 24 + 4 * np.random.randn(lads)
plt.hist([grey_height,lad_height],stacked=True,color=['r','b'])
plt.show() | slm960323/ML_Diary | toyex_dog.py | toyex_dog.py | py | 251 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "numpy.random.randn",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "numpy.random.randn",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.random",
... |
36936928879 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Works with python2.6
import os
import sys
import math
import json
from subprocess import Popen, PIPE
from operator im... | mongodb/mongo | src/third_party/mozjs/extract/js/src/devtools/gc/gc-test.py | gc-test.py | py | 5,569 | python | en | code | 24,670 | github-code | 36 | [
{
"api_name": "os.walk",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "os.path.relpath",
"line_number"... |
8413026987 | from flask import Flask, render_template
from flask_restful import Api
from resources.hotel import Hotels, Hotel
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///db.db'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
api = Api(app)
@app.before_first_request
def create_db():
db.create_... | mariorodeghiero/flask-python-rest-api-course | app.py | app.py | py | 590 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "flask.Flask",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "flask_restful.Api",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "resources.hotel.Hot... |
12840958073 | '''
Yangbot #2 - elo ~ 1800 - 2000
FEATURE LIST:
- UCI interface [INCOMPLETE]
- opening book [OK]
- negamax [OK]
- quiscence search [OK]
- killer moves [TESTING]
- move ordering ... | yangman946/yanchess-ai | chessAI/test.py | test.py | py | 24,405 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "chess.polyglot.open_reader",
"line_number": 131,
"usage_type": "call"
},
{
"api_name": "chess.polyglot",
"line_number": 131,
"usage_type": "attribute"
},
{
"api_name": "random.shuffle",
"line_number": 150,
"usage_type": "call"
},
{
"api_name": "ches... |
20136544568 | import torch
import torch.nn as nn
import torch.nn.functional as F
from src.utils import config
from .Vis_Module import Vis_Module
class DeepFakeTSModel(nn.Module):
def __init__(self, mm_module_properties,
modalities,
window_size, window_stride,
modality_embeddi... | mmiakashs/Multimodal-Deepfakes-Detection | src/network/DeepFakeTSModel.py | DeepFakeTSModel.py | py | 10,428 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "torch.nn.Module",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "torch.nn.ModuleDict",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_... |
556015803 | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html
from pymongo import MongoClient
class JobparserPipeline(object):
def __init__(self):
client = MongoClient('local... | GruXsqK/Methods_scraping | Lesson_5/jobparser/pipelines.py | pipelines.py | py | 2,967 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 12,
"usage_type": "call"
}
] |
38221108073 | from itertools import product
def solution(word):
dic = ['A', 'E', 'I', 'O', 'U']
data = []
for i in range(1,6):
data += list(map(''.join, product(dic, repeat=i)))
data.sort()
idx = data.index(word)
return idx + 1 | kh-min7/Programmers | 84512(모음사전).py | 84512(모음사전).py | py | 245 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "itertools.product",
"line_number": 7,
"usage_type": "call"
}
] |
28864712409 | import requests
import lxml
from bs4 import BeautifulSoup
import re
def dadjokes():
source = requests.get(
"https://www.boredpanda.com/funny-dad-jokes-puns/?utm_source=google&utm_medium=organic&utm_campaign=organic").text
soup = BeautifulSoup(source, 'lxml')
article = soup.find_all('ar... | rushihadole/discord_bot | jokescrapper.py | jokescrapper.py | py | 1,264 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "requests.get",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 11,
"usage_type": "call"
}
] |
74224409063 |
import datetime
import logging
import re
from math import ceil
import numpy as np
import matplotlib.pyplot as plt
import os
import pandas as pd
import seaborn as sns
import skimage.io as io
from numpy.linalg import LinAlgError
from skimage import img_as_float
from skimage.color import rgb2lab
from skimage.exposure im... | AntoineRouland/ki67 | src/v7_validation/run_v7.py | run_v7.py | py | 9,829 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "datetime.datetime.now",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "src.data_loader.root_dir",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": ... |
74090896742 | from bs4 import BeautifulSoup
from urllib.request import urlopen
from platform import subprocess
# if genlist = 0, then this script downloads the files, the cmd_downloader variable comes into play
# if genlist = 1, then this script generates a list.txt file containing direct links to music files in the working direct... | aviaryan/pythons | TheHyliaSoundtrack/hylia_s.py | hylia_s.py | py | 1,588 | python | en | code | 6 | github-code | 36 | [
{
"api_name": "urllib.request.urlopen",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "urllib.request.urlopen",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "bs4.B... |
23299064589 | from ext_cloud.BaseCloud.BaseNetworks.BaseGateway import BaseGatewaycls
from boto import vpc
from ext_cloud.AWS.AWSBaseCloud import AWSBaseCloudcls
class AWSGatewaycls(AWSBaseCloudcls, BaseGatewaycls):
__aws_gateway = None
__vpc = None
def __init__(self, *arg, **kwargs):
self.__aws_gateway = arg... | Hawkgirl/ext_cloud | ext_cloud/AWS/AWSNetworks/AWSGateway.py | AWSGateway.py | py | 1,211 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "ext_cloud.AWS.AWSBaseCloud.AWSBaseCloudcls",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "ext_cloud.BaseCloud.BaseNetworks.BaseGateway.BaseGatewaycls",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "ext_cloud.AWS.AWSBaseCloud.AWSBaseCloudcls.n... |
1415008124 | from ninja import Router, Query
from ninja.pagination import paginate
import logging
from django.http import Http404
from datetime import datetime
from typing import List
from reservation_system.schemas.room import (
RoomSchema,
CreateRoomSchema,
PatchRoomSchema,
PutRoomSchema,
)
from reservation_syste... | kamranabdicse/Django-Pydantic-TTD | reservation_system/api/api_v1/controllers/room.py | room.py | py | 2,222 | python | en | code | 4 | github-code | 36 | [
{
"api_name": "logging.getLogger",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "ninja.Router",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "reservation_system.schemas.room.CreateRoomSchema",
"line_number": 23,
"usage_type": "name"
},
{
"a... |
43245032675 | """
@file util.py
@author Himanshu Mishra
This module contains all the utility functions required by other modules.
All the plotting and displaying features are included with this module.
"""
# Necessary libraries
import os, shutil
import sys
import string
import cv2 as cv # OpenCV library used for image processing
i... | bhawesh-source/OCR | engine/util.py | util.py | py | 11,167 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.listdir",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "os.path.isfile",
"line_numbe... |
16036460087 | # References https://github.com/Sayan98/pytorch-segnet/blob/master/src/model.py
# Small segnet version
import torch
import torch.nn as nn
import torch.nn.functional as F
import warnings
warnings.filterwarnings("ignore")
class Conv2dSame(torch.nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, ... | bbrangeo/pytorch-image-segmentation | models/segnet.py | segnet.py | py | 4,464 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.Sequential... |
41797863785 | from flask import render_template, url_for, request, flash, redirect, abort, send_from_directory
from flask_login import current_user
from werkzeug import exceptions
from datetime import datetime
from ics import Calendar as icsCalendar, Event as icsEvent
import os
from threading import Thread
import json
# ----------... | footflaps/ELSR-Website | core/routes_socials.py | routes_socials.py | py | 21,479 | python | en | code | 3 | github-code | 36 | [
{
"api_name": "os.environ",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name": "flask.request.args.get",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "flask.request.args",
"line_number": 60,
"usage_type": "attribute"
},
{
"api_name": "flask.... |
5063223720 | __all__ = [
'AuthorizationView',
'RevokeTokenView',
'TokenView',
'IntrospectTokenView',
]
from calendar import timegm
from oauth2_provider.views import (
AuthorizationView,
RevokeTokenView,
TokenView,
)
from rest_framework import (
generics,
response,
status,
)
from ..authenti... | mind-bricks/UMS-api | apps/oauth/views.py | views.py | py | 1,410 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "rest_framework.generics.GenericAPIView",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.generics",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "permissions.TokenHasScope",
"line_number": 33,
"usage_type": "name"
... |
31981036961 | """empty message
Revision ID: 01368a3a906b
Revises: 5e10a128f4c9
Create Date: 2020-09-14 12:46:33.026557
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '01368a3a906b'
down_revision = '5e10a128f4c9'
branch_labels = None
depends_on = None
def upgrade():
# ... | OsamuHasegawa/society-portal | migrations/versions/01368a3a906b_.py | 01368a3a906b_.py | py | 1,614 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "alembic.op.create_table",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integ... |
39472224381 | from sqlalchemy import func, ForeignKey
from sqlalchemy.orm import relationship, declared_attr
from models.comments import CommentsModel
from db import db
from models.enums import RoleType
from models.orders import OrdersModel
class UsersModel(db.Model):
__tablename__ = "users"
id = db.Column(db.Integer, prim... | a-angeliev/Shoecommerce | server/models/users.py | users.py | py | 1,602 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "db.db.Model",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "db.db",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "db.db.Column",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "db.db",
"line_number": 11,
... |
32754344712 | from django.contrib import admin
from django.urls import path
from django.contrib.auth import views as auth_views
from rafacar.views import home
from . import views
urlpatterns = [
path('admin/', admin.site.urls),
path('', home), # tela inicio
path('home', home, name='home'),
path('contato/', views.... | HenriqueJunio/tcc_rafacar | rafacar/urls.py | urls.py | py | 1,097 | python | pt | code | 0 | github-code | 36 | [
{
"api_name": "django.urls.path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.contrib.admin.site",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "... |
2036893082 | import click_log
import logging
class MyFormatter(click_log.ColorFormatter):
def format(self, record):
msg = click_log.ColorFormatter.format(self, record)
if record.levelname in ("DEBUG", "INFO"):
new_msg = "> " + msg
elif record.levelname in ("WARNING"):
new_msg = ... | nuvolos-cloud/resolos | resolos/logging.py | logging.py | py | 647 | python | en | code | 3 | github-code | 36 | [
{
"api_name": "click_log.ColorFormatter",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "click_log.ColorFormatter.format",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "click_log.ColorFormatter",
"line_number": 7,
"usage_type": "attribute"
},
... |
22321037083 | """
Author: Zhuo Su, Wenzhe Liu
Date: Feb 18, 2021
"""
import math
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn as nn
import torch
from torch.nn import functional as F
from torchvision import models
import torch
import torch.nn as nn
import torch.nn.functiona... | elharroussomar/Refined-Edge-Detection-With-Cascaded-and-High-Resolution-Convolutional-Network | models/chrnet.py | chrnet.py | py | 10,342 | python | en | code | 4 | github-code | 36 | [
{
"api_name": "functools.partial",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "torch.nn.BatchNorm2d",
"line_number": 38,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 38,
"usage_type": "name"
},
{
"api_name": "functools.partia... |
73118934184 | import datetime as dt
def workdays_count(date1, date2):
delta = date2 - date1
ddays = delta.days
print(f"Всего дней между ними {ddays}")
workdays = 0
while ddays > 0:
if date1.weekday() < 5:
workdays += 1
date1 += dt.timedelta(days=1)
ddays -= 1
return workd... | IlyaOrlov/PythonCourse2.0_September23 | Practice/mtroshin/Module 10/2.py | 2.py | py | 654 | python | ru | code | 2 | github-code | 36 | [
{
"api_name": "datetime.timedelta",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "datetime.datet... |
7950443823 | import warnings
warnings.filterwarnings("ignore", message="numpy.dtype size changed")
warnings.filterwarnings("ignore", message="numpy.ufunc size changed")
import argparse
from argparse import ArgumentParser
from Bio import SeqIO
import numpy as np
import os
import pandas as pd
import pickle
import multiprocessing
NR... | Dowell-Lab/OCR_transcription_detection | get_overlaps.py | get_overlaps.py | py | 10,100 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "warnings.filterwarnings",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": ... |
16408236851 | """Filter chat messages"""
import logging
_LOG = logging.getLogger(__name__)
import discord
import doosbot.client
def init(client: doosbot.client.DoosBotClient, tree: discord.app_commands.CommandTree):
@client.event
async def on_message(message: discord.message.Message):
_LOG.info(f"MESSAGE { message.author.dis... | PimDoos/DoosBotPy | doosbot/modules/chat.py | chat.py | py | 881 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "logging.getLogger",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "doosbot.client.client",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "doosbot.client",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "discord.app_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.