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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
72472829983 | import logging
import math
import subprocess
from pathlib import Path
from random import randrange
import ffmpeg
from options import inputVideo, isVideoAlreadyBlurred, tmp_dir, tmpVideo
from classes.post import Post
logger = logging.getLogger(__name__)
PADDING = 2 # seconds
def getDuration(filename):
return i... | asasamo/youtube-video-generator | libs/renderer/renderer.py | renderer.py | py | 4,705 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "ffmpeg.probe",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "ffmpeg.probe",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "ffmpeg.probe",
"line_... |
7709138273 | import unittest
import functools
from scoring_api import api, store
def cases(cases):
def decorator(f):
@functools.wraps(f)
def wrapper(*args):
for c in cases:
new_args = args + (c if isinstance(c, tuple) else (c,))
f(*new_args)
return wrapper
... | that-very-guy/otus-python-pro | 03_1_Tests/homework/tests/unit/unit_tests.py | unit_tests.py | py | 3,842 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "functools.wraps",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "unittest.TestCase",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "scoring_api.api.method_handler",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "... |
1579954495 | import cv2
import numpy as np
import torch
from skimage.morphology import skeletonize
from mmocr.models.builder import POSTPROCESSOR
from .base_postprocessor import BasePostprocessor
from .utils import centralize, fill_hole, merge_disks
@POSTPROCESSOR.register_module()
class TextSnakePostprocessor(BasePostprocessor)... | chris901003/DeepLearning | mmocr/mmocr/models/textdet/postprocess/textsnake_postprocessor.py | textsnake_postprocessor.py | py | 9,205 | python | zh | code | 7 | github-code | 7 | [
{
"api_name": "base_postprocessor.BasePostprocessor",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "torch.sigmoid",
"line_number": 70,
"usage_type": "call"
},
{
"api_name": "numpy.sqrt",
"line_number": 93,
"usage_type": "call"
},
{
"api_name": "utils.f... |
24564724147 | """Chain for question-answering against a vector database."""
from __future__ import annotations
import inspect
import warnings
from abc import abstractmethod
from typing import Any, Dict, List, Optional
from langchain_core.documents import Document
from langchain_core.language_models import BaseLanguageModel
from la... | langchain-ai/langchain | libs/langchain/langchain/chains/retrieval_qa/base.py | base.py | py | 9,935 | python | en | code | 68,990 | github-code | 7 | [
{
"api_name": "langchain.chains.base.Chain",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "langchain.chains.combine_documents.base.BaseCombineDocumentsChain",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "langchain_core.pydantic_v1.Extra.forbid",
"line... |
44629851093 | import torch
from torch import Tensor
def log_expm1(
x: Tensor,
) -> Tensor:
r"""Logarithm of :math:`e^{x} - 1`.
If :math:`x` is large, ``torch.exp(x)`` returns ``float("inf")`` whereas:
.. math::
\log e^{x} - 1 \approx x.
Therefore, an approximation for :math:`x > 15` is used, such tha... | facebookresearch/NeuralCompression | neuralcompression/functional/_log_expm1.py | _log_expm1.py | py | 626 | python | en | code | 412 | github-code | 7 | [
{
"api_name": "torch.Tensor",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "torch.where",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "torch.log",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "torch.expm1",
"line_number": 26... |
18336645005 | import sys
import time
from random import randint
import zmq
def main(url=None):
ctx = zmq.Context.instance()
subscriber = ctx.socket(zmq.SUB)
if url is None:
url = "tcp://localhost:5557"
subscriber.connect(url)
publisher=ctx.socket(zmq.PUB)
publisher.bind("t... | shivamchs/SOAP | zmq_snippets/client_sub.py | client_sub.py | py | 831 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "zmq.Context.instance",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "zmq.Context",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "zmq.SUB",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "zmq.PUB",
"line_... |
14832925449 | from datetime import timedelta, datetime
from decimal import Decimal
import json
from urllib.parse import urlencode
from chalicelib import dynamo, constants
import requests
def is_valid_entry(item, expected_entries, date):
"""Function to remove traversal time entries which do not have data for each leg of the tri... | transitmatters/data-ingestion | ingestor/chalicelib/daily_speeds.py | daily_speeds.py | py | 6,238 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "datetime.datetime.strftime",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "chalicelib.constants.DATE_FORMAT_BACKEND",
"line_number": 24,
"usage_type": "attribute"
},... |
31013783798 | import requests
import bs4
from bs4 import BeautifulSoup
import numpy as np
from Pokemon import *
import ast
# URL of the webpage with the table
def getPokedex():
url = 'https://pokemondb.net/pokedex/all'
response = requests.get(url)
if response.status_code == 200:
# Parsear el contenido HTML de l... | JoseLu201/PokemonDLE | scrpt.py | scrpt.py | py | 7,115 | python | es | code | 0 | github-code | 7 | [
{
"api_name": "requests.get",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"... |
8478139387 | import streamlit as st
import joblib
import numpy as np
from sklearn.preprocessing import StandardScaler
sc = StandardScaler()
def main():
html_temp = """
<div style="background-color: #E6E6FA; padding: 16px; border-radius: 8px; box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.2);">
<h2 style="color: #333333; text-a... | codeWudaya/Churn-Predictor | app.py | app.py | py | 1,934 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "sklearn.preprocessing.StandardScaler",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "streamlit.markdown",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "joblib.load",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "st... |
34467063225 | from sklearn import ensemble
import numpy as np
import synthimpute as si
def rf_synth(
X,
seed_cols,
classification_cols=None,
n=None,
trees=100,
random_state=0,
synth_cols=None,
):
"""Synthesize data via random forests.
Args:
X: Data to synthesize, as a pandas DataFrame.
... | PolicyEngine/synthimpute | synthimpute/synthesize.py | synthesize.py | py | 2,011 | python | en | code | 11 | github-code | 7 | [
{
"api_name": "sklearn.ensemble.RandomForestRegressor",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "sklearn.ensemble",
"line_number": 38,
"usage_type": "name"
},
{
"api_name": "numpy.random.seed",
"line_number": 47,
"usage_type": "call"
},
{
"api_nam... |
21883932017 | #!/usr/bin/env python
# coding: utf-8
#1- ReflectanceImagesFolder
#2- panel corners
#3- band index
import sys, time, os, datetime, glob
import micasense.metadata as metadata
import micasense.capture as capture
import micasense.imageset as imageset
import micasense.utils as msutils
import micasense.plotutils as plotut... | rrdpereira/imageprocessing | CodesMSE2.py | CodesMSE2.py | py | 8,844 | python | en | code | null | github-code | 7 | [
{
"api_name": "sys.version",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "os.system",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "platform.python_version",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "ipywidgets.FloatPr... |
33574109803 | import numpy as np
import pandas as pd
from sklearn.preprocessing import LabelEncoder
dataset = pd.read_csv('iris.csv')
encoder = LabelEncoder()
X = dataset.iloc[:, 1:5].values
y = dataset.iloc[:, -1].values
y1 = encoder.fit_transform(y)
Y = pd.get_dummies(y1).values
from sklearn.model_selection import train_test... | valdis121/backpropProject | mlp.py | mlp.py | py | 5,854 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pandas.read_csv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.LabelEncoder",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pandas.get_dummies",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "s... |
35408670978 | from PyQt5 import QtWidgets
from PyQt5.QtWidgets import QApplication, QMainWindow, QMessageBox, QLineEdit
import sys
class MyWindow(QMainWindow):
def __init__(self):
super(MyWindow, self).__init__()
self.setGeometry(200, 200, 300, 300)
self.setWindowTitle('Simple Widget')
self.init... | senyihui/PyQt5Demo | SimpleWidget.py | SimpleWidget.py | py | 1,272 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "PyQt5.QtWidgets.QMainWindow",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtWidgets.QLabel",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "PyQ... |
7129039917 | import json
import spacy
from random import randint
from pprint import pprint
with open('MLMap1.json') as f:
cm1 = json.load(f)
with open('MLMap2.json') as f:
cm2 = json.load(f)
with open('MLMap3.json') as f:
cm3 = json.load(f)
nlp = spacy.load("en_core_web_sm")
def is_valid_token(token):
ret = True
... | elMolda/SimilarityTry | group_map.py | group_map.py | py | 3,956 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "json.load",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "spacy.load",
"line_number": 14,
"... |
36433224632 | import sqlite3
connectionDB = sqlite3.connect("db1.db")
# user = str(input("User:"))
# password = str(input("Password:"))
# worker = str(input("Worker? (1=YES, 0=NO):"))
# student = str(input("Student? (1=YES, 0=NO):"))
# incomes = str(input("Incomes:"))
# print(user, password, worker, student, incomes)
name = str(in... | AleksDeveloper/python-flask-project | dbutils/insertionsDB.py | insertionsDB.py | py | 908 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "sqlite3.connect",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "sqlite3.Error",
"line_number": 27,
"usage_type": "attribute"
}
] |
19293066499 | """
You must log in before proceeding with the code
Launch remote window. copy and paste the below command into command prompt window (cmd)
chrome.exe --remote-debugging-port=9222 --user-data-dir="C:\selenum\ChromeProfile)
"""
#All necessary imports from pip installs
import time
from selenium import webdriver
... | naiarani/naiarani | Console Log Scraper V2.py | Console Log Scraper V2.py | py | 16,257 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "selenium.webdriver.chrome.options.Options",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.chrome.service.Service",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 37,
"usage... |
39487980656 | # -*- coding: utf-8 -*-
"""
Created on Mon Dec 26 11:27:31 2022
@author: matte
"""
import random
import numpy as np
import torch
from models import BiSeNetV2
from copy import deepcopy
from collections import OrderedDict
from torch.utils.data import DataLoader
from tqdm import tqdm
from sklearn.metrics ... | srrmtt/FedDrive-AML2022 | servers/server.py | server.py | py | 9,688 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "numpy.bincount",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.diag",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "numpy.mean",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "torch.utils.data.DataLoader",
... |
29286682747 |
import numpy as np
from tqdm import tqdm
import infomap
import json
import time
from multiprocessing.dummy import Pool as Threadpool
from multiprocessing import Pool
import multiprocessing as mp
import os
import shutil
from tools.utils import Timer, mkdir_if_no_exist, l2norm, intdict2ndarray, read_meta
from evaluation... | zengwb-lx/Yolov5-Deepsort-Fastreid | pedestrians-cluster/face_cluster/face_cluster_by_infomap.py | face_cluster_by_infomap.py | py | 7,841 | python | en | code | 240 | github-code | 7 | [
{
"api_name": "numpy.array",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "tools.utils.Timer",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "multiprocessing.Pool",
... |
42036061639 | import numpy as np
import matplotlib.pyplot as plt
fa = lambda x : np.maximum(0, x)
dfa = lambda x : 1
alpha = 0.0001
w1 = np.random.rand(5, 2)
b1 = np.random.rand(5, 1)
w2 = np.random.rand(1, b1.shape[0])
b2 = np.random.rand(1, 1)
def output(x):
global w1, w2
y1 = fa(np.dot(w1, x) + b1)
return fa(np.dot... | chentianba/ml | backpropagation/bp.py | bp.py | py | 2,135 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "numpy.maximum",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "numpy.random.rand",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "numpy.random.rand",
... |
73605047262 | import uuid
from tkinter import *
from tkinter import messagebox
import pymysql
from app.util import Constants
def validation(register_name, register_email, register_mobile, var, register_pwd, pwd_again):
check_counter = 0
warn = ""
if register_name.get() == "":
warn = "Name can't be empty"
... | RoastedCaramel/Python-Miniproject | app/customer/RegisterationPage.py | RegisterationPage.py | py | 6,280 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "tkinter.messagebox.showerror",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "tkinter.messagebox",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "tkinter.messagebox.showerror",
"line_number": 23,
"usage_type": "call"
},
{
"api_... |
32098865236 | # importing requests
import urllib.request as request
import json
# writing out varibles makes troubleshooting eaiser
import logging
## regular expressions, easist way i could find to check that ISBN was 13 digits , using isdigits and length gets triped up on charage returns etc
import re
logging.basicConfig(filena... | UC-Design/11055-PfD-2019-2 | Exercises/Jessica Newman U3171992/testwriter3.py | testwriter3.py | py | 5,492 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "logging.basicConfig",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "logging.warning",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "re.match",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "logging.warning",
"l... |
38096352053 | import re
from os.path import join, dirname, abspath
import logging
import yaml
import os
from yaml.reader import Reader
from .aws_secrets import get_secret, get_specific_secret
import jmespath
logger = logging.getLogger(__name__)
REGION = os.getenv(key='AWS_DEFAULT_REGION', default='us-west-2')
class Config(obje... | leantaas/flexi_config | flexi_config/config.py | config.py | py | 5,105 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 32... |
33908985067 | import asyncio
# import MpesaApiWrapper from Routes
from Routes.mpesa_api_wrapper import MpesaApiWrapper
from Config.config import settings
async def other_task():
for i in range(10):
print(f"Running other tasks...{i}")
await asyncio.sleep(0.1)
return "Finished Other Task !!"
def test_confi... | LeakeyMaina/MKODI | RentCollection/demo_async_funcs.py | demo_async_funcs.py | py | 1,129 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "asyncio.sleep",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "Config.config.settings.authorization_key",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "Config.config.settings",
"line_number": 16,
"usage_type": "name"
},
{
... |
4262433350 | import csv
import mysql.connector
from tabulate import tabulate
import pandas as pd
from pandas import DataFrame
from faker import Faker
import sys
db = mysql.connector.connect(
host="35.236.32.138",
user="michelle",
password="chapmanrules",
database="StudentsMK"
)
curr = db.cursor()
fake = Faker(... | kutsanovm/DBFinal | finalDBProject.py | finalDBProject.py | py | 14,922 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "mysql.connector.connector.connect",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "mysql.connector.connector",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "mysql.connector",
"line_number": 9,
"usage_type": "name"
},
{
"api... |
34315433311 | from django.urls import include, path
from apps.portfolio.views import index, RedirectionView
app_name = "portfolio"
urlpatterns = [
path("", index, name="index"),
path("<str:destination>", RedirectionView.as_view(), name="redirection"),
path("api/v1/", include("apps.portfolio.api.v1.urls", namespace="ap... | islam-aymann/my-site | apps/portfolio/urls.py | urls.py | py | 331 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "apps.portfolio.views.index",
"line_number": 8,
"usage_type": "argument"
},
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "apps.po... |
9687001117 | # -*- coding: utf-8 -*-
from dataclasses import dataclass
from pathlib import Path
from typing import Type
from absl import app, flags
from ..utils.config import build_config
from .datamodule import DataConf, DataModule
from .module import Module, ModuleConf
from .trainer import Trainer, TrainerConf
FLAGS = flags.F... | gqk/LAE | libml/core/app.py | app.py | py | 1,880 | python | en | code | 52 | github-code | 7 | [
{
"api_name": "absl.flags.FLAGS",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "absl.flags",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "absl.flags.DEFINE_string",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "absl.flags"... |
24748340709 | # -*- coding: utf-8 -*-
from odoo import models, fields, api
import logging
_logger = logging.getLogger(__name__)
class SaleOrder(models.Model):
_inherit = 'sale.order'
rysunek = fields.Char('Rysunek', required = False)
@api.multi
def get_mos(self):
record_collection=[]
record_collecti... | kruzer/saleorder_mrp | models/models.py | models.py | py | 1,149 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "odoo.models.Model",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "odoo.models",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "odoo.fields.Char",
... |
285814417 | import xml.dom.minidom
class RendezvousRequest(object):
def __init__(self):
self.accept = []
self.version = ""
self.privacy_informed = 0
self.privacy_can_collect = 0
self.privacy_can_share = 0
class RendezvousResponse(object):
def __init__(self):
self.update = {... | neubot/neubot-client | neubot/rendezvous/compat.py | compat.py | py | 1,590 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "xml.dom.minidom.dom.minidom.parseString",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "xml.dom.minidom.dom",
"line_number": 43,
"usage_type": "attribute"
},
{
"api_name": "xml.dom.minidom",
"line_number": 43,
"usage_type": "name"
}
] |
27909176790 | import requests
import json
def find(args):
search = '+'.join(args)
query = f'https://www.googleapis.com/customsearch/v1?key=AIzaSyB-EYXiIPfz_q1ZU1dBbpBaxZB_IbVcp3M&cx=26533ab1e170a00d7&q={search}'
data = requests.get(query).json()
if 'items' in data:
return data['items']
else:
retu... | TheTrio/Covid19-India-Telegram-Bot | src/FactCheck.py | FactCheck.py | py | 328 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "requests.get",
"line_number": 7,
"usage_type": "call"
}
] |
39638628635 | """DBSplan - MRI Registration module
This module performs the MRI coregistration process.
It may be called from the `registration_mri` function.
"""
# Path setup
import os
import sys
root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
src = os.path.join(root, "src")
if root not in sys.path... | shaverschuren/DBSplan | src/registration_mri.py | registration_mri.py | py | 7,906 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "os.path.dirname",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line... |
44831574047 | import kivy
from com.florek.CheckOutput import CheckOutput
from com.florek.ChooseLine import ChooseLine
from kivy.app import App
from kivy.clock import Clock
kivy.require("1.11.1")
class WdiApp(App):
seconds = 30
def build(self):
# self.widget = CheckOutput()
self.widget = ChooseLine()
... | florekkinga/LearnPythonApp | com/florek/App.py | App.py | py | 907 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "kivy.require",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "kivy.app.App",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "com.florek.ChooseLine.ChooseLine",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "kivy.clock.... |
33656819144 | #!/usr/bin/env python3
import json
import time
from kafka import KafkaConsumer
from requests import post
def handle(event, context):
if event.method == "POST":
try:
data = json.loads(event.body)
value = data["value"]
topic = value["topic"]
consumer = Kafka... | 5GEVE/monitoring_dockerized_environment | serverless_functions/kafka-consumer/handler.py | handler.py | py | 1,338 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "json.loads",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "kafka.KafkaConsumer",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_numb... |
31724506069 | from flask import Flask, render_template, request, jsonify, url_for, session
import pydig
# import express
# import dns
# import dnspython
# import dns.resolver
# import dnspython as dns
# from requests import get
# from dns import resolver
app = Flask(__name__,template_folder='template')
app.secret_key = "abc"
# ... | lidaanoop/DNS_CHECKER | dns_checker.py | dns_checker.py | py | 2,839 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "flask.Flask",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "flask.request.method",
"line_number": 43,
"usage_type": "attribute"
},
{
"api_name": "flask.req... |
24794328946 | """Module for filtering and smoothing joint data"""
import numpy as np
import pykalman
from post_processing.src import game_tools
from post_processing.src import hampel_filter
from pose.src import joints
def get_times(hdf5_file, games, game_idx, time_name):
"""Construct important times for games relative to vide... | Rehab-Robotics-Lab/FloAssessmentPipeline | post_processing/src/filter_joints.py | filter_joints.py | py | 20,464 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "numpy.argmax",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "numpy.argmax",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "post_processing.src.game_tools.parse_games",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "... |
10043875346 | from ssz_test_case import invalid_test_case, valid_test_case
from eth2spec.utils.ssz.ssz_typing import boolean, uint8, uint16, uint32, uint64, uint128, uint256, Vector, BasicView
from eth2spec.utils.ssz.ssz_impl import serialize
from random import Random
from typing import Dict, Type
from eth2spec.debug.random_value im... | ethereum/consensus-specs | tests/generators/ssz_generic/ssz_basic_vector.py | ssz_basic_vector.py | py | 3,158 | python | en | code | 3,289 | github-code | 7 | [
{
"api_name": "random.Random",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "eth2spec.debug.random_value.RandomizationMode",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "typing.Type",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "... |
734153877 | import ConfigParser
import logging
import superglance
def setup_logging():
# Defaults
filename = 'superglance.log'
level = 'INFO'
handler = 'FileHandler' # NullHandler to enable
# Get log config from super config
try:
config = superglance.SuperGlance().get_glance_creds().items("log")... | rtgoodwin/superglance | superglance/log_config.py | log_config.py | py | 1,236 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "superglance.SuperGlance",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "ConfigParser.NoSectionError",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 26,
"usage_type": "call"
},
{
"api_na... |
7603692962 | import copy
import functools
import inspect
import logging
import testtools
from tempest import config
from tempest import test
from nuagetempest.lib.test import tags as test_tags
CONF = config.CONF
def nuage_skip_because(*args, **kwargs):
"""A decorator useful to skip tests hitting known bugs
@param bug: ... | greenpau/nuage-tempest | nuagetempest/lib/test/nuage_test.py | nuage_test.py | py | 4,320 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "tempest.config.CONF",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "tempest.config",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "testtools.TestCase.skipException",
"line_number": 34,
"usage_type": "call"
},
{
"api_name... |
20166452948 | """cdb URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based ... | nanarino/cdb | cdb/urls.py | urls.py | py | 1,826 | python | en | code | 13 | github-code | 7 | [
{
"api_name": "django.conf.urls.url",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "django.contrib.admin.site",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 22,
"usage_type": "name"
},
{
"api_name... |
74590933983 | import numpy as np
import cv2
from src.utils import *
class MOSSE:
def __init__(self, lr = 1e-2, gauss_sig = 2, n_train = 100):
"""
lr : is the learning rate for the updating of A and B
gauss_sig: is the standard deviation used for the response map in the distance calcula... | shawn-lab-ml/TrackingWithCF | src/MOSSE.py | MOSSE.py | py | 5,518 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "cv2.cvtColor",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "numpy.float32",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "numpy.conjuga... |
15088370629 | """pimek URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based v... | dtekluva/kofo | main/urls.py | urls.py | py | 2,050 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.urls.path",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "django.contrib.admin.site",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "... |
7887872625 | #coding=utf-8
from flask import Flask
app = Flask(__name__)
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy import desc
from datetime import datetime
app.config["SQLALCHEMY_DATABASE_URI"] = 'sqlite:///./foo.db'
app.config['SQLALCHEMY_COMMIT_ON_TEARDOWN'] = 1#True
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = 1... | vtheno/PyWeb | main.py | main.py | py | 5,004 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "flask.Flask",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "flask_sqlalchemy.SQLAlchemy",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "datetime... |
2550283227 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Nov 25 12:31:46 2018
@author: vijay
"""
from Config import Config as Config
import matplotlib.pyplot as plt
import torch
from torch import optim
import torch.nn.functional as F
import numpy as np
import gc
class ContrastiveLoss(torch.nn.Module):
... | vjayd/Signature-verification-using-Siamese-CNN | Process.py | Process.py | py | 3,848 | python | en | code | 12 | github-code | 7 | [
{
"api_name": "torch.nn",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.functional.pairwise_distance",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "torch.nn.functional",
"line_number": 24,
"usage_type": "name"
},
{
"api_name"... |
320994145 | import re
from datetime import datetime
from .data_saver import DataSaver
class InputParser:
"""
InputParser is a utility class for parsing user input and determining its format.
Methods:
- parse_user_input(user_input):
Parse the given user input and determine its format, such as full name, ph... | Perkhun/Specialized-programming-languages | classes/lab7/input_parser.py | input_parser.py | py | 3,759 | python | uk | code | 0 | github-code | 7 | [
{
"api_name": "re.match",
"line_number": 76,
"usage_type": "call"
},
{
"api_name": "re.match",
"line_number": 78,
"usage_type": "call"
},
{
"api_name": "re.match",
"line_number": 80,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.strptime",
"line_num... |
27724212444 | import time
from itertools import groupby
# https://projecteuler.net/problem=52
# Permuted multiples
def all_equal(iterable):
g = groupby(iterable)
return next(g, True) and not next(g, False)
def IsPermutations(llist):
llist = [int(''.join(map(str,sorted(str(n))))) for n in llist]
return all_equal(lli... | henningward/ProjectEuler | problem_052.py | problem_052.py | py | 831 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "itertools.groupby",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 33,
"usage_type": "call"
}
] |
71638997345 | import os
import netdiff
import re
from jsonpath2 import Path
import json
from io import StringIO
import yaml
class NoAliasDumper(yaml.SafeDumper):
def ignore_aliases(self, data):
return True
def jp2_query(json_to_query, query_expression):
jp2_expr = Path.parse_str(query_expression)
value_list =... | aristanetworks/netdevops-examples | demo/emea-2020-ansible-cvp-automation/post_validation/netdiff/process/test_data.py | test_data.py | py | 3,851 | python | en | code | 104 | github-code | 7 | [
{
"api_name": "yaml.SafeDumper",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "jsonpath2.Path.parse_str",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "jsonpath2.Path",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "re.split... |
36645546274 | '''
Script that contains a function that tests different classifier models
The best performing model was the MLP classifier.
Author: Marina Dolokov
Date: Februar 2022
'''
from sklearn.svm import SVC
from sklearn.ensemble import RandomForestClassifier
from sklearn.naive_bayes import GaussianNB
from sklearn.tree impor... | dolorina/classification-census-bureau | ml/best_classifier.py | best_classifier.py | py | 2,013 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "sklearn.ensemble.RandomForestClassifier",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "sklearn.svm.SVC",
"line_number": 26,
"usage_type": "call... |
40281196950 | from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
from aiogram.utils.callback_data import CallbackData
from database.postgres_async import AsyncDatabase
class KeyStart:
callback = CallbackData('s', 'type')
type_order = InlineKeyboardMarkup(row_width=1, inline_keyboard=[
[
... | kha1l/aida2.0 | bot/keyboard.py | keyboard.py | py | 10,468 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "aiogram.utils.callback_data.CallbackData",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "aiogram.types.InlineKeyboardMarkup",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "aiogram.types.InlineKeyboardButton",
"line_number": 11,
"usage_... |
13117066001 | import MySQLdb
user_id = [524811, 2135908, 2314026, 2454324, 2546039]
very_poor_uid = [386558, 696595, 1102783, 3240464, 3821755]
poor_uid = [4026932, 2639832, 7768096, 8730616, 7186222]
for uid in poor_uid:
sql1 = 'select user_id, video_id, sum(video_time_end - video_time_start) as watched_duration from clickstr... | mmylei/eLearning | learning_pattern/video_watched_duration_pattern.py | video_watched_duration_pattern.py | py | 1,581 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "MySQLdb.connect",
"line_number": 10,
"usage_type": "call"
}
] |
1740076687 | import numpy as np
import pickle
import time
from scipy.interpolate import NearestNDInterpolator
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from numpy import pi,cos,sin
import scipy.linalg as lg
from scipy.constants import e,c,h,hbar,u,m_e,epsilon_0
muB = 2*pi* e*hbar/(2*m_e)/(h*1e10) ... | itchono/Electric-Atoms | Hydrogen/full.py | full.py | py | 12,494 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "numpy.pi",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "scipy.constants.e",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "scipy.constants.hbar",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "scipy.constants.m_e",... |
32946296088 | import os
from sendgrid import SendGridAPIClient
from sendgrid.helpers.mail import Mail
def send_email(from_email, to_emails, subject, html_content):
try:
# sg = SendGridAPIClient('key')
sg = SendGridAPIClient(os.environ['SENDGRID_KEY'])
response = sg.send(Mail(
from_email,
... | rogfut/dca-btc | BuyBTCTimerTrigger/sendmail.py | sendmail.py | py | 536 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "sendgrid.SendGridAPIClient",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "sendgrid.helpers.mail.Mail",
"line_number": 9,
"usage_type": "call"
}
] |
74865022304 | import os
import sys
__dir__ = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.abspath(os.path.join(__dir__, "../..")))
import numpy as np
import moviepy.editor as mpy
import decord
import cv2
import json
import mindspore as ms
from mindspore import context, ops, Tensor
from mindvideo.utils.confi... | ZJUT-ERCISS/zjut_mindvideo | tools/classification/infer.py | infer.py | py | 6,105 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "os.path.dirname",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "sys.path.append",
"line... |
18617327733 | from fastapi import APIRouter
from sqlalchemy.orm import Session
from fastapi import Depends,HTTPException,status
from backend.db.session import get_db
from backend.schemas.recipes import RecipeCreate,RecipeView
from backend.db.repository.recipes import create_new_recipe, get_all_recipes, get_recipe_id
router = APIRo... | Delnold/recipe-web-api | backend/apis/ver_1/route_recipes.py | route_recipes.py | py | 1,135 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "fastapi.APIRouter",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "backend.schemas.recipes.RecipeCreate",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.orm.Session",
"line_number": 13,
"usage_type": "name"
},
{
"api_... |
23594354922 | import socket
from exceptions import GameOver, SendBall
import time
import pygame
import os
import math
class Ball:
def __init__(self, position, vector):
self.position = position
self.vector = vector
def bounce_h(self):
self.vector[1] = self.vector[1]*-1
def bounc... | Oliver-CoderAcademy/networkpong | classes.py | classes.py | py | 5,091 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "math.copysign",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "exceptions.SendBall",
"line_number": 75,
"usage_type": "call"
},
{
"api_name": "socket.socket",
"line_number": 112,
"usage_type": "call"
},
{
"api_name": "socket.AF_INET",
... |
42578228448 | from dry.measurements import mm, to_mm
from cli import FloatParameter, ispositive, mainloop
def main() -> None:
diam = FloatParameter("Диаметр трубы, мм", ispositive, mm)
thickness = FloatParameter("Толщина стенки, мм", ispositive, mm)
slend = FloatParameter("Гибкость стержня", ispositive)
slend.try_... | e2t/cli-tools | src/pipe_slenderness.py | pipe_slenderness.py | py | 755 | python | ru | code | 0 | github-code | 7 | [
{
"api_name": "cli.FloatParameter",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "cli.ispositive",
"line_number": 7,
"usage_type": "argument"
},
{
"api_name": "dry.measurements.mm",
"line_number": 7,
"usage_type": "argument"
},
{
"api_name": "cli.FloatP... |
11610975350 | import argparse
import pickle
from tkinter import E
from src.classifier.syntactic_classifier import get_features, n_val, evaluation_metrics
import numpy as np
from sklearn.preprocessing import StandardScaler
import joblib
from sklearn.metrics import confusion_matrix
import os
from src.utils import Logger, read_idx2id,... | thanhlecongg/Invalidator | invalidator.py | invalidator.py | py | 6,518 | python | en | code | 6 | github-code | 7 | [
{
"api_name": "src.utils.Logger",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_numb... |
70852443745 | import os
import json
from .us import split_county_fips
class DataDumper:
def __init__(self, data, target_folder):
self.json_folder = target_folder
self.data = data
def _get_json_path(self, fips):
assert len(fips) in (1, 2, 5)
path = None
if len(fips) <= 2:
... | bayhiker/covid-data | collector/data_dumper.py | data_dumper.py | py | 1,894 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "us.split_county_fips",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.makedirs",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_... |
9774980315 | #!/usr/bin/env python
# coding: utf-8
# In[4]:
from datetime import datetime, date, time, timedelta
# In[ ]:
file_url = "https://www.ag.ch/media/kanton_aargau/themen_1/coronavirus_1/daten_excel/Covid-19-Daten_Kanton_Aargau.xlsx"
# In[5]:
today = date.today()
today = today.strftime("%Y-%m-%d")
todays_weekday... | MAZ-CAS-DDJ/kurs_20_21 | 12 Pandas Teil 4/debugging_übungen_aus_projekten/general_settings.py | general_settings.py | py | 444 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "datetime.date.today",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "datetime.date.today",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "datetime.date",... |
27684857690 | #!/usr/bin/env python3
import numpy as np
import math
import matplotlib.pyplot as plt
from Env import Map, Map_Trailer
import vehicle_models
from Hybrid_astar import*
from Hybrid_astar_trailer import*
ENV_WIDTH = 41
ENV_HEIGHT = 41
ARROW_LEN = 3
'''
Running the Hybrid A* planner for all three vehicles
'''
def ma... | Loahit5101/Search-based-Planning-for-Autonomous-Parking | Valet.py | Valet.py | py | 2,983 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "numpy.deg2rad",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.deg2rad",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "numpy.deg2rad",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "numpy.deg2rad",
"line_n... |
42800801647 |
from dataclasses import dataclass
from enum import Enum
from typing import Any, List
import requests
from flask_restful import Resource, reqparse
from api.config import GENIE_API
from api.helpers import get_ct_payload, get_roi_payload
from dataclasses import dataclass, asdict
@dataclass
class CalculateCtMeshParams: ... | aI-lab-glider/radiotherapy-plans-backend | flaskr/api/calculate_mesh.py | calculate_mesh.py | py | 987 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "dataclasses.dataclass",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "dataclasses.dataclass",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "api.helpers.get_roi_payload",
"line_number": 30,
"usage_type": "call"
},
{
"api_name"... |
40987682411 | from collections import OrderedDict, defaultdict
class Solution(object):
def largestPathValue(self, colors, edges):
"""
:type colors: str
:type edges: List[List[int]]
:rtype: int
"""
n = len(colors)
inls = [0]*n
g = [[] for _ in range(n)]
for a... | wherby/code | questions/c240/q4.py | q4.py | py | 1,810 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "collections.defaultdict",
"line_number": 53,
"usage_type": "call"
}
] |
17214296459 | """
Cumulative Wikipedia Donations
==============================
This chart shows cumulative donations to Wikipedia over the past 10 years. Inspired by this `Reddit post <https://www.reddit.com/r/dataisbeautiful/comments/7guwd0/cumulative_wikimedia_donations_over_the_past_10/>`_ but using lines instead of areas.
"""
... | stiles/notebooks | lapd-crimes-arrests/notebook/lib/python3.7/site-packages/altair/examples/cumulative_wiki_donations.py | cumulative_wiki_donations.py | py | 711 | python | en | code | 24 | github-code | 7 | [
{
"api_name": "altair.Chart",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "altair.X",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "altair.Axis",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "altair.Y",
"line_number": 14,
... |
16074196445 | import os
import json
class ClsGetter:
def __init__(self) :
self.cls = "class"
self.cls_names = []
self.cls_dict = {}
self.all_cls_dict = {}
self.lineCounter = 0
def getCls(self, lines) :
n=1
self.lineCounter = 0
for line in lines:
... | MZachura/Grafy | clsGetter.py | clsGetter.py | py | 1,324 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "json.dump",
"line_number": 50,
"usage_type": "call"
}
] |
23970885034 | from selenium import webdriver
from selenium.webdriver.chrome.service import Service
import pandas as pd
website = 'https://www.etsy.com/ca/search?q=kimi%20no%20na%20wa&ref=auto-1&as_prefix=kimi%20no%20na%20wa'
path = 'F:/ChromeDriver/chromedriver_win32'
service = Service(executable_path=path)
driver = webdriver.Chr... | Khan-F-M/Python-Task-Automation | WebScrape.py | WebScrape.py | py | 1,811 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "selenium.webdriver.chrome.service.Service",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 10,
"usage_type": "name"
},
{
... |
21615391920 | import os
from dataclasses import dataclass, field
import math
import transformers
from itertools import chain
from transformers import (
CONFIG_MAPPING,
AutoConfig,
AutoModelForCausalLM,
AutoTokenizer,
HfArgumentParser,
Trainer,
TrainingArguments,
MODEL_FOR_CAUSAL_LM_MAPPING,
defau... | pytorch-tpu/ray-llama | train/llama_hf.py | llama_hf.py | py | 35,991 | python | en | code | 5 | github-code | 7 | [
{
"api_name": "torch_xla.runtime.use_spmd",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "torch_xla.runtime",
"line_number": 46,
"usage_type": "name"
},
{
"api_name": "transformers.utils.check_min_version",
"line_number": 56,
"usage_type": "call"
},
{
... |
39554767976 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
__author__ = 'ghou'
import time
import datetime
import weakref
import re
from lib import utils
from lib.utils import encoding
from lib.utils.debug import print_log
from lib.utils.time_tools import is_open_from_week
from lib.utils.encoding import force_unicode
from lib.db ... | isoundy000/learn_python | learn_backend/models/association.py | association.py | py | 3,783 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "lib.db.ModelBase",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "settings.get_father_server",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "settings.is_combined",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "lib.... |
74854205981 | from pyspark.sql import SparkSession
import pyspark.sql.functions as f
from itertools import chain
from pyspark.context import SparkContext
from pyspark.ml.linalg import Vectors
from pyspark.sql.session import SparkSession
from pyspark.ml import Pipeline, PipelineModel
from pyspark.ml.feature import VectorAssembler, St... | arjunram07/CS4830-Big-Data-Lab | project_consumer.py | project_consumer.py | py | 4,433 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "pyspark.sql.session.SparkSession.builder.appName",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pyspark.sql.session.SparkSession.builder",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "pyspark.sql.session.SparkSession",
"line_numbe... |
8994815844 |
try:
import requests
except:
from os import system
system("pip install requests")
import requests
from django.http import HttpResponse
from django.shortcuts import render
from .gets import *
from cart.get import u_cart
from reserve.get import *
# Create your views here.
def products_view(request, *... | DEMIDOB/Dachnik | src/products/views.py | views.py | py | 2,139 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "os.system",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cart.get.u_cart",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "cart.get.u_cart",
... |
27389797117 | #!/usr/bin/env python
# coding: utf-8
# In[1]:
class graph:
def __init__(self):
self.bigl=[]
def addvertex (self,vert):
self.bigl.append([vert,{}])
def addedge (self,vertfro,vertto,weight=0):
for i in range(len(self.bigl)):
if self.bigl[i][0] ==vertfro:
... | rocker2121/BFS-DFS | BFS-Graph.py | BFS-Graph.py | py | 3,974 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "random.randint",
"line_number": 137,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 206,
"usage_type": "call"
},
{
"api_name": "difflib.ndiff",
"line_number": 345,
"usage_type": "call"
},
{
"api_name": "difflib.ndiff",
"l... |
43016609587 | """Helper function to get input from user side with video detection"""
from __future__ import annotations
import argparse
def parse_arguments() -> argparse[object]:
"""Function to parse the arguments"""
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--input", type=str, required=True,
... | krupesh1958/people-count | helper.py | helper.py | py | 524 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "call"
}
] |
2120811215 | from django.http import HttpResponse
from django.shortcuts import redirect, render
from django.http import HttpResponse
from myapp.forms import TaskForm
from .models import Task
# Create your views here.
def home(request):
tasks =Task.objects.all()
all_task = tasks.count()
completed = Task.objects.filter(... | gaurav7720/ToDo_App | TODO/myapp/views.py | views.py | py | 1,377 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "models.Task.objects.all",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "models.Task.objects",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "models.Task",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "models.Task... |
1981716758 | import torch
import torchvision
import torchvision.transforms as transforms
import torch.utils.data as Utils
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import os
import cv2
import csv
import sys
import json
import math
import imageio
import num... | RiccardoGrin/VampPrior | utils.py | utils.py | py | 5,852 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "os.path.isdir",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "os.system",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "os.path.isdir",
"line_number... |
11735815555 | import functools
import os
import shutil
import sys
run_path = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(run_path, ".."))
import lib.SQLiteDB as Database
from lib.Objects import Song, Genre, Charter
from lib.ObjectVerification import verify_song, verify_genre, verify_charter
... | StroveLight/TJADB | lib/DatabaseLayer.py | DatabaseLayer.py | py | 8,296 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "os.path.dirname",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "os.path.realpath",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sys.path.append",
"lin... |
31021453043 | from django.conf.urls import url
from django.contrib.auth.views import login
from . import views
app_name="klucz"
urlpatterns =[
url(r'^$', views.login_view, name='logowanie'),
url(r'potwierdzenie', views.potwierdzenie, name='potwierdzenie'),
url(r'klucz', views.wybierz_kluczowe, name='wybierz_kluczowe')... | kmaamk/Kluczowe | klucz/urls.py | urls.py | py | 519 | python | pl | code | 0 | github-code | 7 | [
{
"api_name": "django.conf.urls.url",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.... |
73589045024 | # -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException... | dylanrodbar/ReconocedorRostros | Avance 3/Pruebas de Sistema/Pruebas Entrenamiento/SeleniumEntrenamiento.py | SeleniumEntrenamiento.py | py | 2,513 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "unittest.TestCase",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "selenium.webdriver.Firefox",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "... |
31376274801 | #!/usr/bin/env python3
import csv
import matplotlib.pyplot as plt
import matplotlib.ticker as plticker
from typing import Sequence, Tuple, List, Optional, NamedTuple, Union
from cycler import cycler
from misc import ProgressElement
from misc import get_file_name_stat, get_file_name_stat_img
from post_common import ... | s-kostyuk/af_replacement | post_experiment/show_progress_charts.py | show_progress_charts.py | py | 5,904 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "csv.DictReader",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "typing.List",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "misc.ProgressElement",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "typing.Union",
"l... |
522999636 | #!/usr/bin/env python
# encoding=utf-8
# maintainer: rgaudin
import re
from datetime import date, timedelta
from bolibana.models import Provider
def contact_for(identity):
try:
provider = Provider.objects.get(phone_number=identity)
except Provider.DoesNotExist:
provider = None
return p... | yeleman/unfpa2012 | unfpa_sms/common.py | common.py | py | 1,948 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "bolibana.models.Provider.objects.get",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "bolibana.models.Provider.objects",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "bolibana.models.Provider",
"line_number": 14,
"usage_type": "n... |
29416407997 | import cv2
import os
import numpy as np
import qrcode
import random
# 1) Считываем все фотографии из директории
dir_path = "images"
all_images = [os.path.join(dir_path, img) for img in os.listdir(dir_path) if img.endswith(('jpg', 'png'))]
# Создаем QR-код
data = "https://t.me/burmistrov_robotics"
box_size... | stepanburmistrov/qr-collage | makeQR.py | makeQR.py | py | 3,624 | python | ru | code | 0 | github-code | 7 | [
{
"api_name": "os.path.join",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.listdir",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "qrcode.QRCode",
"line_number": ... |
35798320023 | import arrow
from decimal import Decimal # If you want to use money this works better
# for floats 0.01 +0.02 != 0.03
import numpy as np
import numpy_financial as npf
from pathlib import Path
from scipy import stats
import shutil
import xlsxwriter
import importlib.metadata
# This is the controlling model which has... | drummonds/pyxmc | pyxmc/model.py | model.py | py | 2,776 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "importlib.metadata.metadata.version",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "importlib.metadata.metadata",
"line_number": 34,
"usage_type": "attribute"
},
{
"api_name": "importlib.metadata",
"line_number": 34,
"usage_type": "name"
},
... |
30347742542 | import matplotlib.pyplot as plt
import cv2
img_logo = cv2.imread("./logo.png")
b, g, r = cv2.split(img_logo)
img_new = cv2.merge([r, g, b])
# plt.subplot(121)
# plt.imshow(img_logo)
# plt.subplot(122)
# plt.imshow(img_new)
#
# plt.show()
cv2.imshow("bgr_image", img_logo)
cv2.imshow("rgb_image", img_new)
cv2.waitKe... | Incipe-win/C-CPP | linux_c/opencv_code/py/opencv4/03_opencv.py | 03_opencv.py | py | 349 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "cv2.imread",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "cv2.split",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cv2.merge",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line_number": 17,
"... |
17821461733 | import torch
import torch.nn as nn
from embed_regularize import embedded_dropout
from locked_dropout import LockedDropout
from weight_drop import WeightDrop
class RNNModel(nn.Module):
"""Container module with an encoder, a recurrent module, and a decoder."""
def __init__(self, rnn_type, vocab, ninp, nhid, ... | aistairc/lm_syntax_negative | lm/model.py | model.py | py | 6,009 | python | en | code | 4 | github-code | 7 | [
{
"api_name": "torch.nn.Module",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "locked_dropout.LockedDropout",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "torch.nn.E... |
26357332080 | import collections
import contextlib
import re
import mock
from oslo.vmware import exceptions as vexc
from oslo.vmware import pbm
from nova import context
from nova import exception
from nova.network import model as network_model
from nova.openstack.common import uuidutils
from nova import test
from nova.tests.unit i... | projectcalico/calico-nova | nova/tests/unit/virt/vmwareapi/test_vm_util.py | test_vm_util.py | py | 51,988 | python | en | code | 6 | github-code | 7 | [
{
"api_name": "nova.tests.unit.virt.vmwareapi.fake.DataObject",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "nova.tests.unit.virt.vmwareapi.fake",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "nova.test.NoDBTestCase",
"line_number": 28,
"usage_typ... |
75008410463 | import json
from elasticsearch import Elasticsearch
from elasticsearch import helpers
es_conf = [{"host": '0.0.0.0', "port": 9400}]
es = Elasticsearch("http://0.0.0.0:9400")
def create_index(index_name):
global es
indices = es.indices.get_alias().keys()
if index_name in indices:
p... | tengben0905/es_sim_base_kbqa | insert_into_Es.py | insert_into_Es.py | py | 2,572 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "elasticsearch.Elasticsearch",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "elasticsearch.helpers.bulk",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "elas... |
19608202631 | import json
import os
import re
def process_directory(target_txt, ds_path, json_file):
contents = json.load(open(json_file))
valid_ids = os.listdir(ds_path)
if 'flow' in valid_ids:
valid_ids.remove('flow')
with open(target_txt, "w") as f:
n_records = 0
... | alloky/inteligenceSystemsProject | MFF-pytorch/process_msasl.py | process_msasl.py | py | 1,240 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "json.load",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_number": 14,
"usage_type": "call"
}
] |
42252700785 | from rest_framework.authentication import TokenAuthentication as BaseAuthToken
from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView
from rest_framework_simplejwt.serializers import TokenRefreshSerializer
from rest_framework_simplejwt.exceptions import InvalidToken
class TokenAuthentication... | 9akashnp8/mini-ERP | api/authentication.py | authentication.py | py | 2,307 | python | en | code | 9 | github-code | 7 | [
{
"api_name": "rest_framework.authentication.TokenAuthentication",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "rest_framework_simplejwt.serializers.TokenRefreshSerializer",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "rest_framework_simplejwt.exceptions.... |
73467928224 | from math import degrees, cos, sin
from statistics import mean
from calendar import c
import os
import cv2
import time
import sys
import signal
from PIL import Image, ImageDraw, ImageFont
from PyQt5 import QtGui, QtCore, QtWidgets
from six import BytesIO
import paho.mqtt.client as mqtt
import simplejpeg
import imagezmq... | dakoner/microscope_ui_experimental | old/microscope_ui.py | microscope_ui.py | py | 9,542 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "matplotlib.use",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 34,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "PyQt5.QtCore.Qt",
"lin... |
8692623843 | """
Models module.
"""
import os
import xgboost as xgb
SEED = 108
CV_RESULT_DIR = "./output/xgboost_cv_results"
def OptunaObjective(trial, dtrain: xgb.DMatrix, folds: list, n_boost_round: int):
"""
Optuna objective function definition.
"""
param = {
"verbosity": 0,
... | DavidColasRomanos/ExplainSumm | src/models.py | models.py | py | 1,883 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "xgboost.DMatrix",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "xgboost.cv",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_numb... |
30170942291 | import bpy
from bpy.props import StringProperty
import re
matching_props = []
bpy.types.Object.ice_cube_search_filter = StringProperty(
name="ice_cube_search_filter",
description="Search filter for Ice Cube",
default="",
options={'TEXTEDIT_UPDATE'}
)
def ic_search_ui(self,context,scale):
... | DarthLilo/ice_cube | ice_cube_data/systems/search_system.py | search_system.py | py | 16,707 | python | en | code | 15 | github-code | 7 | [
{
"api_name": "bpy.types",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "bpy.props.StringProperty",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "bpy.data",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "re.search",
... |
35064681753 | #!/usr/bin/env python3
import argparse
from boto3 import session
def get_client(endpoint):
s = session.Session(
region_name="foo", aws_access_key_id="foo", aws_secret_access_key="bar"
)
client = s.client(service_name="dynamodb", endpoint_url=endpoint)
return client
def create_table(client, ... | Yelp/paasta | paasta_tools/contrib/create_dynamodb_table.py | create_dynamodb_table.py | py | 1,181 | python | en | code | 1,652 | github-code | 7 | [
{
"api_name": "boto3.session.Session",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "boto3.session",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 31,
"usage_type": "call"
}
] |
14471897852 | import datetime
import json
import itertools
import os
import sys
from collections import defaultdict
from hashlib import md5
from time import sleep
import requests
from lxml.html import fromstring
CACHE_PATH = 'data/'
class BusTracker(object):
api_url = 'http://ws.mybustracker.co.uk/'
def __init__(self,... | allait/buslane | load_data.py | load_data.py | py | 8,285 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "datetime.datetime.utcnow",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "hashlib.md5",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "lxml.html... |
27761740639 | from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import base64
import subprocess
import tempfile
from googlecloudsdk.api_lib.compute import exceptions
from googlecloudsdk.core import log
import six
DEFAULT_KEY_LENGTH = 2048
class OpenSSLException(exce... | twistedpair/google-cloud-sdk | google-cloud-sdk/lib/googlecloudsdk/api_lib/compute/openssl_encryption_utils.py | openssl_encryption_utils.py | py | 4,417 | python | en | code | 55 | github-code | 7 | [
{
"api_name": "googlecloudsdk.api_lib.compute.exceptions.Error",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "googlecloudsdk.api_lib.compute.exceptions",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "subprocess.Popen",
"line_number": 47,
"usa... |
9186774096 |
from gcore import mongoapi
from . import missions
import xlsxwriter
import arrow
from dataclass import Job
from xlsxwriter.utility import xl_rowcol_to_cell
from tasks import S3Sender
from tasks.mission_report import MissionReport
logger = None
topdarkblue = "#10456F"
primary = "#2196F3"
def set_... | sharani97/Serveur-Node-Copie | scripts/workers/mission_reports.py | mission_reports.py | py | 4,781 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "dataclass.Job",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "tasks.mission_report.MissionReport",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "tasks.S3Sender.upload_file",
"line_number": 42,
"usage_type": "call"
},
{
"api_n... |
13068454919 | """Heatmap Creator
This code creates a heatmap from a dictionary of data it recieves.
It includes an addition as part of the Register Access Heatmap tool.
This tool requires the following Python libraries be installed:
* mpl_toolkits.axes_grid1.inset_locator.InsetPosition
* matplotlib.pyplot (Matplotlib Versio... | karen-nativ/Heatmap | create_heatmap.py | create_heatmap.py | py | 4,449 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "packaging.version.parse",
"line_number": 80,
"usage_type": "call"
},
{
"api_name": "matplotlib.__version__",
"line_number": 80,
"usage_type": "argument"
},
{
"api_name": "packaging.version",
"line_number": 80,
"usage_type": "name"
},
{
"api_name": "... |
39760977848 | import sympy as sym
from load_eq import load_v3
import numpy as np
from geneticalgorithm import geneticalgorithm as ga
import pickle
from plotta_sim_dep_ini_Idip import plot_tr_v3_vect3_dep_ini,plot_tr_from_fit_neuron_rette_dep_ini
from load_eq import load_v3
from scipy.optimize import minimize
from scipy.optim... | ModelDBRepository/267598 | optimization/plot_genetic_cm_idep_ini2.py | plot_genetic_cm_idep_ini2.py | py | 18,352 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "numpy.int32",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": ... |
75096436703 | # pylint: disable=missing-module-docstring, missing-function-docstring, missing-class-docstring
import json
import uuid
from functools import lru_cache
import mysql.connector as conn
from fastapi import Depends
from utils.utils import get_config_filename, get_app_secrets_filename, is_valid_uuid
from .models import... | gabrielnoal/megadados2020 | APS1/tasklist/tasklist/database.py | database.py | py | 5,536 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "mysql.connector.MySQLConnection",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "mysql.connector",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "uuid.UUID",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "u... |
25031807533 | from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
class SteamTradeBot:
def __init__(self,username,password,bekle=5):
self.username = username
self.password = password
self.bekle = bekle
self.girisYap()
def girisYap(self):
... | MertPlc/SteamTradeBot | Tradebot.py | Tradebot.py | py | 4,729 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "time.sleep",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "selenium.webd... |
23394167862 | """
Nevada has CSV files containing precinct-level results for each jurisdiction and all offices
from the 2004 general to the 2012 general. All of those files are pre-processed and available on Github at
https://github.com/openelections/openelections-data-nv. Prior to the 2004 general and
after the 2012 primary, county... | openelections/openelections-core | openelex/us/nv/datasource.py | datasource.py | py | 5,785 | python | en | code | 175 | github-code | 7 | [
{
"api_name": "future.standard_library.install_aliases",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "future.standard_library",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "openelex.base.datasource.BaseDatasource",
"line_number": 19,
"usage_type": ... |
43461524920 | from pymongo import MongoClient
from time import strftime
from time import strptime
from pandas import Series
import time
import pandas as pd
from re import compile
from functools import reduce
def integration(address1,address2):
'''
将同一员工的不同邮箱的信息进行整合
'''
[address1['address'].append(item) for item ... | niubanjin/visual | foots/get_inner_staff.py | get_inner_staff.py | py | 6,423 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 104,
"usage_type": "call"
},
{
"api_name": "functools.reduce",
"line_number": 161,
"usage_type": "call"
}
] |
15722543413 | """Defines the :class:`Log` class, which is responsible for collating
simultaneous readings from :class:`sensor.Sensor` objects and periodically
pushing these to be sent to the computer, via the serial connection.
"""
from sensor import Sensor
from utils import ResponsiveDict
#import asyncio
class Log:
"""The :cl... | TomFahey/DTA-MSc-Project | src/microcontroller/log.py | log.py | py | 5,565 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "utils.ResponsiveDict",
"line_number": 53,
"usage_type": "call"
}
] |
9983153976 | '''
deepspeed --num_gpus=1 GPT-2_fine_tune.py
'''
from argparse import ArgumentParser
import os
import pandas as pd
import torch
from torch.utils.data import DataLoader
from tqdm import tqdm
from transformers import AutoTokenizer, AutoModelWithLMHead
import deepspeed
from deepspeed.ops.adam import DeepSpeedCPUAdam
im... | momozzing/kiosk_bot | GPT-2_fine_tune.py | GPT-2_fine_tune.py | py | 4,024 | python | en | code | 12 | github-code | 7 | [
{
"api_name": "os.environ",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "transformers.AutoTokenizer.from_pretrained",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "transformers.AutoTokenizer",
"line_number": 20,
"usage_type": "name"
},
{
... |
7617565292 | import logging
from django.views.generic import TemplateView
import uptrace
logger = logging.getLogger(__name__)
class IndexView(TemplateView):
template_name = "index.html"
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["trace_url"] = uptrace.tra... | uptrace/uptrace-python | example/django/otel/views.py | views.py | py | 783 | python | en | code | 13 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.views.generic.TemplateView",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "uptrace.trace_url",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.