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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
28962304991 | import os
import errno
from flair.data_fetcher import NLPTaskDataFetcher
from flair.embeddings import WordEmbeddings, FlairEmbeddings, DocumentLSTMEmbeddings
from flair.models import TextClassifier
from flair.trainers import ModelTrainer
from pathlib import Path
DATA_DIRECTORY = './data'
TEN_PERCENT = 'ten_percent'
T... | Peantab/NLP-Tasks | task8/classification_flair.py | classification_flair.py | py | 1,284 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "flair.data_fetcher.NLPTaskDataFetcher.load_classification_corpus",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "flair.data_fetcher.NLPTaskDataFetcher",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 23,
... |
33509187702 | from pyglet.sprite import Sprite
from create_window import scale_game, scale_menu
import resources, random, pyglet
score = None
player_health = []
def load(width, height, batch=None, front=None, back=None):
global score, player_health
player = Sprite(img=resources.player_image, x=width*1/3, y=height/2, batch=batch,... | sotiskot/SlideGame | V4/load.py | load.py | py | 1,615 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pyglet.sprite.Sprite",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "resources.player_image",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "pyglet.sprite.Sprite",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": ... |
16397965889 | import imp
import inspect
import json
from typing import Dict, Any
from avnav_api import AVNApi
from avnav_store import AVNStore
from avnav_manager import AVNHandlerManager
from avnav_util import *
from avnav_worker import *
import avnav_handlerList
from avnremotechannel import AVNRemoteChannelHandler
from avnuserapp... | wellenvogel/avnav | server/handler/pluginhandler.py | pluginhandler.py | py | 27,910 | python | en | code | 72 | github-code | 18 | [
{
"api_name": "avnav_api.AVNApi",
"line_number": 43,
"usage_type": "name"
},
{
"api_name": "charthandler.AVNChartHandler.getConfigName",
"line_number": 82,
"usage_type": "call"
},
{
"api_name": "charthandler.AVNChartHandler",
"line_number": 82,
"usage_type": "name"
},
... |
11838241044 |
import operator
from functools import reduce
from hero_guides.ability_build.ability_filtering import ability_filter
from hero_guides.ability_build.talent_levels import most_used_talents
from hero_guides.item_builds.filter_items import filter_items
from hero_guides.item_builds.starting_items import starting_items_filt... | 27bslash/dota2-pro-item-tracker | hero_guides/update_builds/update_build.py | update_build.py | py | 2,288 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "hero_guides.item_builds.starting_items.starting_items_filter",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "helper_funcs.database.collection.all_items",
"line_number": 26,
"usage_type": "argument"
},
{
"api_name": "functools.reduce",
"line_number":... |
72569585001 | from os import sep
import sys
import re
import time
import tkinter as tk
from tkinter import messagebox
from tkinter import *
from tkinter.constants import DISABLED, FALSE, LEFT, TRUE, W
import apscheduler.schedulers.background
from pkg_resources import *
from selenium import webdriver
from selenium.webdriver.suppor... | shinfon/Python_project | AutoStatement/Auto_statement.py | Auto_statement.py | py | 8,849 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "selenium.webdriver.ChromeOptions",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 28,
"usage_type": "call"
},
{
"api... |
34519288253 | import numpy as np
import cv2
import imutils
from imutils import paths
cv2.namedWindow("Output",cv2.WINDOW_NORMAL)
print("[INFO] loading images...")
imagePaths = sorted(list(paths.list_images("Tests/C")))
images = []
# loop over the image paths, load each one, and add them to our
# images to stitch list
for imagePath... | ashish1sasmal/Images-Stitching-Using-OpenCV | stitcher_opencv.py | stitcher_opencv.py | py | 925 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "cv2.namedWindow",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cv2.WINDOW_NORMAL",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "imutils.paths.list_images",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "imutils... |
75172743081 | # -*- coding: utf-8 -*-
#Python
import uvicorn
import uuid
from typing import Optional, List
from datetime import datetime
import pandas as pd
import jwt
import secrets
#Models
from classmodels.models import *
#fastAPI
from fastapi import FastAPI, Body, Query, Path, Depends, Header
from fastapi.middlew... | xpressiceover0/somossms | main.py | main.py | py | 24,455 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "fastapi.FastAPI",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "fastapi.middleware.cors.CORSMiddleware",
"line_number": 33,
"usage_type": "argument"
},
{
"api_name": "fastapi.Query",
"line_number": 44,
"usage_type": "call"
},
{
"api_name... |
70805879399 | import streamlit as st
from PIL import Image
import os
import qrcode
from streamlit_option_menu import option_menu
import random
isworkorder=False
base_path=os.getcwd()
conp = {}
equip={}
avlprojects=[]
def createDataFrame(rawdata):
address=[]
clientName=[]
jobDescriptions=[]
po=[]
workorders=[]
... | deepayannandy/OTProject | apps/projects.py | projects.py | py | 13,086 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "os.getcwd",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "streamlit_option_menu.option_menu",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "streamlit.markdown",
"line_number": 107,
"usage_type": "call"
},
{
"api_name": "strea... |
43223786531 | import boto3
def upload_to_bucket(bucket_name, file_name, dest_name):
# Create an S3 client
s3 = boto3.client('s3')
# Upload the file to S3
s3.upload_file(file_name,
bucket_name, dest_name)
| ludesdeveloper/expense_app | s3_bucket.py | s3_bucket.py | py | 228 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "boto3.client",
"line_number": 6,
"usage_type": "call"
}
] |
9975798026 | import pytest
from django.urls import reverse
from faker import Faker
from rest_framework import status
from rest_framework.test import APIClient
from my_apps.shop.models import Category, Product, Settings
fake = Faker()
client = APIClient()
@pytest.fixture(autouse=True)
def initialized_task_db(tmpdir):
"""Conn... | alex2011ua/OnlineStore | OnlineStoreDjango/my_apps/shop/tests/test_api_na_users.py | test_api_na_users.py | py | 2,004 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "faker.Faker",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "rest_framework.test.APIClient",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "my_apps.shop.models.Category.objects.create",
"line_number": 16,
"usage_type": "call"
},
{
... |
19847745712 | from setuptools import setup, find_packages
import codecs
with codecs.open("README.md", "r", 'utf_8_sig') as fh:
long_description = fh.read()
setup(
name='egais',
version='1.0',
author="Roman Kablukov",
description="Python SDK for Egais",
long_description=long_description,
long_description... | rkablukov/egais | setup.py | setup.py | py | 704 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "codecs.open",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "setuptools.setup",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",
"line_number": 15,
"usage_type": "call"
}
] |
4049082425 | import requests
class GitHubUser(object):
url = 'https://api.github.com/users/{0}'
def __init__(self, username):
self.username = username
self.url = self.url.format(username)
def fetch(self):
r = requests.get(self.url)
return r.json()
def short_info(self):
us... | MadPUG/Introduction-to-Testing-in-Python | example_patch.py | example_patch.py | py | 486 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "requests.get",
"line_number": 12,
"usage_type": "call"
}
] |
34212528549 | import io
import sys
_INPUT = """\
30
"""
sys.stdin = io.StringIO(_INPUT)
def is_prime(n):
if n == 1:
return True
for i in range(2, int(n**0.5) + 1):
if n % i == 0:
return False
return True
def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
i... | kkchart9/atcoder | Day_dir/1203.py | 1203.py | py | 662 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "sys.stdin",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "io.StringIO",
"line_number": 7,
"usage_type": "call"
}
] |
29729969117 | from random import randint
from faker import Faker
from faker.providers import internet, phone_number, credit_card
fake = Faker()
fake.add_provider(internet)
fake.add_provider(phone_number)
fake.add_provider(credit_card)
fake_emails = [fake.email() for _ in range(0, 1500)]
def make_fake_pii():
name = fake.name... | Tracardi/tracardi | tracardi/service/fake_data_maker/generate_pii.py | generate_pii.py | py | 1,456 | python | en | code | 430 | github-code | 18 | [
{
"api_name": "faker.Faker",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "faker.providers.internet",
"line_number": 7,
"usage_type": "argument"
},
{
"api_name": "faker.providers.phone_number",
"line_number": 8,
"usage_type": "argument"
},
{
"api_name":... |
5691437792 | """ This app allows the user to process several mathematical
functions on a csv file """
import csv
import os
import sys
import matplotlib.pyplot as plt
from pandas import read_csv
print('***************** Welcome to the Python Data Analysis App ********** ')
print('What type of data would you like to analyze')
whil... | EricCanCode/pythonanalysis | main.py | main.py | py | 7,886 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "os.path.join",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "sys.path",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "csv.DictReader",
"line_nu... |
6728696405 | from PyQt5.QtCore import QObject
from lib.port import PortFactory
from lib.device import DeviceFactory
class Server(QObject):
def __init__(self, config, parent=None):
super().__init__(parent=parent)
self.port = {}
for key, value in config['port'].items():
self.port[key] = Port... | Alser69rus/A3136p2 | lib/server.py | server.py | py | 551 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "PyQt5.QtCore.QObject",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "lib.port.PortFactory.create_port",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "lib.port.PortFactory",
"line_number": 12,
"usage_type": "name"
},
{
"api_nam... |
3276963657 | import asyncio
import logging
from configparser import ConfigParser
from pyrogram import Client, filters
from pyrogram.errors import ChatAdminRequired, RPCError
from pyrogram.types import (Message)
from dbhelper import DBHelper
botconfig = ConfigParser()
botconfig.read('bot.ini', encoding='utf-8')
default_config = {... | NimaQu/Anti-channel-bot | main.py | main.py | py | 4,926 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "configparser.ConfigParser",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "logging.basicConfig",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "dbhel... |
33588099019 | import numpy as np
import torch
from torch.utils.data.dataset import Dataset, Subset
class MaximumLabelDataset(Subset):
def __init__(self, ds: Dataset, n, seed=None):
print("data seed:", seed)
rng = np.random.default_rng(seed)
labels = ds.targets
dataset_idx = []
max_la... | creinders/ChimeraMix | datasets/pipeline/MaximumLabelDataset.py | MaximumLabelDataset.py | py | 842 | python | en | code | 14 | github-code | 18 | [
{
"api_name": "torch.utils.data.dataset.Subset",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "torch.utils.data.dataset.Dataset",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "numpy.random.default_rng",
"line_number": 10,
"usage_type": "call"
},
... |
11585542438 | # individual network settings for each actor + critic pair
# see model for details
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.optim import Adam
import numpy as np
# add OU noise for exploration
from OUNoise import OUNoise
from model import Actor, Critic
#device = torch.device("cud... | aquanta-aagyaa/drlnd-p3-collab-compet | td3.py | td3.py | py | 5,891 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "model.Actor",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "model.Actor",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "torch.optim.Adam",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "model.Critic",
"line_num... |
37883442432 | from django.urls import path
from .views import BookDetail, BookList,MovieDetail, MovieList
urlpatterns = [
path('books/',BookList.as_view(),name = 'book'),
path('books/<int:pk>/', BookDetail.as_view() ,name ='singlebook'),
path('movies/', MovieList.as_view(),name= 'movies'),
path('movies/<int:pk>/',... | muga35lu39yusuf/django-booksa-pi | django_books_api/urls.py | urls.py | py | 373 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "views.BookList.as_view",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "views.BookList",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "django.urls.path"... |
13328070816 | # import numpy as np
import autograd.numpy as np
import matplotlib.pyplot as plt
from collections import defaultdict
from scipy.spatial import Delaunay
from skimage.draw import line
from bresenham import bresenham
import os
from autograd.builtins import isinstance, tuple
class VascularGenerator:
def __init__(sel... | zcase/labmeat | src/VascularGenerator.py | VascularGenerator.py | py | 13,377 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "collections.defaultdict",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "autograd.numpy.array",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "autograd.numpy",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "autograd.... |
30060077846 | import contextlib
import os
from tempfile import TemporaryDirectory
from typing import Callable, Optional, TypeVar
from framework import utils
# Locally, this will always compare against main, even if we try to merge into, say, a feature branch.
# We might want to do a more sophisticated way to determine a "parent" b... | prannoygiri/firecracker | tests/framework/ab_test.py | ab_test.py | py | 4,799 | python | en | code | null | github-code | 18 | [
{
"api_name": "os.environ.get",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "typing.TypeVar",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "typing.TypeVar",
"l... |
21201224589 | from django.urls import path
from . import views
urlpatterns = [
path('',views.home,name='home'),
path('blog_details/<int:pk>/',views.blog_details,name='blog_details'),
# path('blog/',views.blog,name='blog'),
path('contact/',views.contact,name ='contact'),
# path('accounts/login',views.... | krishna-oss/django-my-first-blog | realblog1/urls.py | urls.py | py | 433 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
}
] |
6221843917 | from threading import RLock
from common.api import BkLoginApi
from common.local import get_local_param, set_local_param
from django.conf import settings
from django.utils import translation
from django.utils.translation.trans_real import get_supported_language_variant
class BkLanguage:
"""
当前请求需要的语言环境
在中... | Tencent/bk-base | src/api/upizza/common/bklanguage.py | bklanguage.py | py | 6,459 | python | en | code | 85 | github-code | 18 | [
{
"api_name": "django.conf.settings.LANGUAGE_CODE",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "django.conf.settings",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "django.conf.settings.BK_LANGUAGE_EN",
"line_number": 18,
"usage_type": "attr... |
13063797051 | import os
import sys
import subprocess
import logging
default_logger = logging.getLogger(name='aligner')
def _find_bash():
"""Originally from https://github.com/chapmanb/bcbio-nextgen/blob/master/bcbio/provenance/do.py"""
try:
which_bash = subprocess.check_output(["which", "bash"]).strip()
except... | stutiagrawal/aligner | runBashCmd.py | runBashCmd.py | py | 2,878 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "logging.getLogger",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "subprocess.check_output",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "subprocess.CalledProcessError",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_n... |
1968079766 | import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import tqdm
import os
import numpy as np
import time
from storage_utils import save_statistics
class ExperimentBuilder(nn.Module):
def __init__(self, network_model, experiment_name, num_epochs, train_data, val_data,
... | AntreasAntoniou/TemplateProjectCDTGPUCluster | experiment_builder.py | experiment_builder.py | py | 15,683 | python | en | code | 10 | github-code | 18 | [
{
"api_name": "torch.nn.Module",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
... |
24331421572 | import base64
def encode(secret_string):
bytes_string = secret_string.encode('ascii')
code_string = base64.b64encode(bytes_string)
secret_string_out = code_string.decode('ascii')
print(f"Encode string is: {secret_string_out} ")
def decode(secret_string):
bytes_string_out = secret_string.encode('... | Sib-Coder/Same_Random_Python | Base64_Encoding/main.py | main.py | py | 820 | python | en | code | 3 | github-code | 18 | [
{
"api_name": "base64.b64encode",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "base64.b64decode",
"line_number": 13,
"usage_type": "call"
}
] |
14140477614 | import matplotlib.pyplot as plt
import numpy as np
import random
from itertools import repeat
import pylab
import copy
def gen_signal():
signal = []
for x in range(10):
signal += list(repeat(random.randint(-1,1), 100))
return np.array(signal)
def cross_correlate(xs, ys, minval=False):
"""T... | jasoncox576/Signal-Cross-Correlation | correlation.py | correlation.py | py | 1,964 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "itertools.repeat",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.subplot... |
22119695423 | #!/usr/bin/env python
###################################################################
# basic_example.py : A very simple test script example which include:
# common_setup
# Tescases
# common_cleanup
# The purpose of this sample test script is to show the "hello world"
# of aetest.
######################... | jbronikowski/pyATS_Examples | source-route/source_route_script.py | source_route_script.py | py | 2,998 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "logging.getLogger",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pyats.aetest.CommonSetup",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "pyats.aetest",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "genie.co... |
2574569759 | from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
from collections import Counter
import termtables as tt
import sqlite3
import datetime
def create_database():
print('Categories:\n', categories, '\n')
# creating tables if not exists
cur.execute('''
CREATE... | wloszynski/statsjustjoinit-scraper | skill_spider.py | skill_spider.py | py | 8,979 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "selenium.webdriver.Firefox",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 55,
"usage_type": "name"
},
{
"api_name": "time.sleep",
"line_number": 67,
"usage_type": "call"
},
{
"api_name": "selenium.web... |
35972111518 | import numpy as np
from numpy.lib import recfunctions as rfn
from scipy.io.arff import loadarff
from sklearn.model_selection import StratifiedKFold
from sklearn.preprocessing import MinMaxScaler
from algorithms import *
from P3_algorithms import *
from numpy.random import uniform
import time
import pandas as pd
import ... | javigallego4/MH | Prácticas/Entrega P3/software/src/main.py | main.py | py | 13,965 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "scipy.io.arff.loadarff",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "numpy.lib.recfunctions.drop_fields",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "numpy.lib.recfunctions",
"line_number": 32,
"usage_type": "name"
},
{
"... |
27158081731 | from django.conf.urls import url
from . import views
app_name = 'inventory'
urlpatterns = [
url(r'^$', views.start, name='start'),
url(r'^about_us/$', views.about_us, name='about_us'),
url(r'^contact/$', views.contact, name='contact'),
url(r'^register/$', views.register, name='register'),
url(r'^l... | lokiore/Inventory-Management-System | inventory/urls.py | urls.py | py | 4,801 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "django.conf.urls.url",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.co... |
19249032406 | import pyrebase
from django.conf import settings
firebase = pyrebase.initialize_app(settings.FIREBASE_CONFIG)
storage = firebase.storage()
def upload_to_firebase(img_name,folder_name,path_local):
path_on_cloud = f'{folder_name}/{img_name}.jpg'
imgurl = storage.child(path_on_cloud).put(path_local)
img_url... | Dishank99/NFH | admin_view/firebase.py | firebase.py | py | 423 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pyrebase.initialize_app",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.conf.settings.FIREBASE_CONFIG",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "django.conf.settings",
"line_number": 5,
"usage_type": "name"
}
] |
6588353726 | import pika, sys
#establish the connection
connection = pika.BlockingConnection(parameters=pika.ConnectionParameters(host="localhost"))
channel = connection.channel()
#declare direct type exchange
channel.exchange_declare(exchange="tutorial4", exchange_type="direct")
#basically getting log type want to receive
seve... | hariharasudhan-nagarethinam/rabbitmq | tutorial4/receive_logs.py | receive_logs.py | py | 975 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pika.BlockingConnection",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "pika.ConnectionParameters",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "sys.std... |
20255479692 | #I can write a simple script that automatically launches the browser to a specific address on google maps
#it would be cool if I could run this program and the cmd line args would be the address
import webbrowser, sys, pyperclip
sys.argv #would have the cmd line args e.g ['mapit.py', '870', 'Valencia', 'St.']
#check... | wijdanb/Python-scripts | mapit.py | mapit.py | py | 903 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "sys.argv",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "pyperclip.paste",
"line_n... |
35891973731 | from typing import Union
import services
class BarcodeCleaner:
@staticmethod
def get_tokens(barcodes: Union[list, str]) -> list:
if not isinstance(barcodes, list):
barcodes = barcodes.split(",")
tokens = [token.split(",") for token in barcodes]
tokens = services.flatten(to... | selimslab/entrophy | services/barcode/barcode_cleaner.py | barcode_cleaner.py | py | 1,595 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "typing.Union",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "services.flatten",
"line_number": 12,
"usage_type": "call"
}
] |
21259315064 | #! /usr/bin/env python3
import os.path
import glob
import json
backlight_dir = glob.glob("/sys/class/backlight/*")[0]
def get_from_file(name):
with open(os.path.join(backlight_dir, name), "r") as f:
return int(f.read())
max_brightness = get_from_file("max_brightness")
class Py3status:
cache_time... | GinjaNinja32/dotfiles | i3status/brightness.py | brightness.py | py | 610 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "glob.glob",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path.path.join",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.path",
"line_numb... |
71427388520 | # This Python 3 environment comes with many helpful analytics libraries installed
# It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python
# For example, here's several helpful packages to load in
import numpy as np # linear algebra
import pandas as pd # data processing, CSV fil... | aorursy/new-nb-3 | ipg2014xxx_cat-in-the-dat-kernel.py | ipg2014xxx_cat-in-the-dat-kernel.py | py | 4,078 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "os.walk",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "pandas.read_csv",
"line_number"... |
22437376425 | import requests
import pandas as pd
import json
def callAPI(key, videoId):
return requests.get('https://www.googleapis.com/youtube/v3/videos',
params={
'key': key,
'part': 'statistics',
'id': videoId
})
def statistics(key, videoId):
... | jose-amat/python-youtube-comments | functions/videos.py | videos.py | py | 438 | python | en | code | 3 | github-code | 18 | [
{
"api_name": "requests.get",
"line_number": 6,
"usage_type": "call"
}
] |
15555412166 | import yaml
class Route(yaml.YAMLObject):
"""Symbolic base class for routes"""
yaml_tag = u'!route'
def __init__(self, service_name, class_name, service, prefix):
self.service_name = service_name
self.class_name = class_name
self.service = service
self.prefix = prefix
... | wackerl91/luna | resources/lib/routing/route.py | route.py | py | 541 | python | en | code | 98 | github-code | 18 | [
{
"api_name": "yaml.YAMLObject",
"line_number": 4,
"usage_type": "attribute"
}
] |
33122285169 | # %% imports and settings
import json
import os
from functools import wraps
import pandas as pd
import torch
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
)
from typing import Dict, List, Tuple
import argparse
from IPython import get_ipython
# %%
parser = argparse.ArgumentParser()
parser.add... | subercui/CodeExp | code2text/GPT-J/eval-gpt-neo.py | eval-gpt-neo.py | py | 7,496 | python | en | code | 14 | github-code | 18 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "IPython.get_ipython",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 114,
"usage_type": "call"
},
{
"api_name": "os.path",
... |
42629272243 | import os
import textwrap
from typing import List
from uuid import uuid4
from environment import AUDIO_CUT_TIME, TEXT_CONFIG, tmp_dir
from common.SentenceInfo import SentenceInfo
def get_text_overlay_filter(text: str, start_time: float, end_time: float) -> str:
font_size = TEXT_CONFIG.FONT_SIZE
font_file = TEXT_CONF... | GeorgeF23/video_generator | src/video_generator/generation/ffmpeg_helper.py | ffmpeg_helper.py | py | 2,173 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "environment.TEXT_CONFIG.FONT_SIZE",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "environment.TEXT_CONFIG",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "environment.TEXT_CONFIG.FONT_PATH",
"line_number": 10,
"usage_type": "attrib... |
3962932487 | import urllib
import urllib2
from core import base
try:
import json
except ImportError:
import simplejson as json
class IMDB(base.baseClass):
@classmethod
def imdb(cls, search):
data = urllib2.urlopen('http://www.imdbapi.com/?' + urllib.urlencode({'t': search})).read()
return json.loads... | DempDemp/nautilus | modules/imdb.py | imdb.py | py | 1,259 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "core.base.baseClass",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "core.base",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "urllib2.urlopen",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "urllib.urlencode",
... |
22921592567 | import sys
import json
import _thread
import importlib
import threading
from flask import Flask,render_template,request,redirect,url_for
from libs import ip_scan
from libs.management import ConfigManage
from exts import db
from config import devel,prod
from models import Info,Plugin,Batch,Config
from Equipme... | Aquariuscsx/STX | Stx_textas/views.py | views.py | py | 5,655 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "flask.Flask",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "config.prod",
"line_number": 19,
"usage_type": "argument"
},
{
"api_name": "sys.argv",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "importlib.import_module",
... |
11506165996 | import numpy as np
npa = np.array
# f = open(r"/Users/matt/Desktop/data.txt")
import matplotlib
# matplotlib.use('qt5agg')
from matplotlib import pylab as plt
#
# for line in f.readlines():
# data = line.strip('\n\r\t ').split(',')
# if data[-1] == '':
# data = data[:-1]
# p = npa([float(each) for e... | maplee/PracticePro | matplotlib/dataShow1.py | dataShow1.py | py | 1,483 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "numpy.array",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "numpy.loadtxt",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "matplotlib.pylab.figure",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyla... |
31897124581 | import asyncio
import logging
from aiogram import Bot, Dispatcher
from aiogram.contrib.fsm_storage.memory import MemoryStorage
from aiogram.contrib.fsm_storage.redis import RedisStorage2
from tgbot.config import load_config
from tgbot.filters import register_all_filters
from tgbot.handlers import register_all_handler... | koyaware/mafia-bot | bot.py | bot.py | py | 1,434 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "logging.getLogger",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "logging.basicConfig",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "tgbot.config.... |
41765085701 | from django.core.exceptions import ValidationError
from django.utils.deconstruct import deconstructible
DOMAINS = ('gmail.com', 'yahoo.com')
def validate_email_domain(value): # email_name@domain.com --> ['email_name', 'domain.com']
# domains = ('gmail.com', 'yahoo.com')
domain = value.split('@')[-1]
... | python-hillel/python_advanced_06_12_2022 | 05_django_lms/core/validators.py | validators.py | py | 843 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "django.core.exceptions.ValidationError",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "django.core.exceptions.ValidationError",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "django.utils.deconstruct.deconstructible",
"line_number": 15,
... |
12698858194 | from pathlib import Path
from rdflib import RDF, Graph
from rdflib.namespace import FOAF
EXAMPLES_DIR = Path(__file__).parent
if __name__ == "__main__":
graph = Graph()
graph.parse(f"{EXAMPLES_DIR / 'foaf.n3'}", format="n3")
for person in graph[: RDF.type : FOAF.Person]: # type: ignore[misc]
f... | Silvya292/Practicas_UCO | Tercero/Practicas_ISSBC/Practica5/rdflib/slice.py | slice.py | py | 564 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "pathlib.Path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "rdflib.Graph",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "rdflib.RDF.type",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "rdflib.RDF",
"line_... |
42284599931 | #!/usr/bin/env python
import os
from glob import glob
basepath = os.path.join(os.path.dirname(os.path.realpath(__file__)),
"examples")
template = """\
.. _ex-{name}:
Example: `compapp.samples.{name}`
----------------------------------------------------------------------
.. literalinclude:: ... | tkf/compapp | doc/source/genexamples.py | genexamples.py | py | 1,443 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "os.path.join",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path.realpath",
"line_n... |
41105919933 | from ossaudiodev import control_labels
from signal import pause
from gpiozero import DistanceSensor
from signal import pause
from bluedot import BlueDot
from EchoBot import BotGuarning
import RPi.GPIO as GPIO
import time
import board
import busio
import digitalio
from PIL import Image, ImageDraw, ImageFont
... | JEFMX/Proyecto-Maquina-de-Refrescos | ControlProyecto.py | ControlProyecto.py | py | 5,802 | python | es | code | 0 | github-code | 18 | [
{
"api_name": "RPi.GPIO.setmode",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "RPi.GPIO",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "RPi.GPIO.BCM",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "RPi.GPIO.setup",
"lin... |
20318711004 | from .AICNet import SSC_RGBD_AICNet
import torch.nn as nn
import torch
from .MLP import LocalDecoder
from collections import OrderedDict
from .DDRNet import SSC_RGBD_DDRNet
import os
import torch.nn.functional as F
import numpy as np
class RichSSC(nn.Module):
def __init__(self, cls=12, basic_module="aic", mlp_layer... | lstcutong/RichSSC | models/RichSSC.py | RichSSC.py | py | 6,880 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "torch.nn.Module",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "AICNet.SSC_RGBD_AICNet",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "DDRNet.SSC_RGBD_... |
38286226893 | # 导入所需的库
import numpy as np
import matplotlib.pyplot as plt
# 设置随机种子
np.random.seed(0)
# 生成10次运行的结果,每次都有fpr和tpr
# 假设每次有100个点
fprs = []
tprs = []
for i in range(10):
fpr = np.sort(np.random.rand(100)) # 随机生成fpr,并排序
tpr = np.sort(np.random.rand(100)) # 随机生成tpr,并排序
fprs.append(fpr)
tprs.append(tpr)
# 计算... | chilutong/makeGraph | ROC_plot.py | ROC_plot.py | py | 948 | python | zh | code | 0 | github-code | 18 | [
{
"api_name": "numpy.random.seed",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "numpy.sort",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.random.rand",
... |
927364325 | from intcode import IntcodeVm
import time
import curses
import itertools
from collections import Counter
def parse_grid(vm):
grid = []
row = []
for c in vm.run():
c = str(chr(c))
if c == '\n':
if row: grid.append(row)
if len(grid) == 43: break
row = []
... | alvarosevilla95/advent | 2019/17/main.py | main.py | py | 6,464 | python | en | code | 3 | github-code | 18 | [
{
"api_name": "collections.Counter",
"line_number": 106,
"usage_type": "call"
},
{
"api_name": "itertools.combinations",
"line_number": 120,
"usage_type": "call"
},
{
"api_name": "curses.curs_set",
"line_number": 186,
"usage_type": "call"
},
{
"api_name": "time.sl... |
4005378064 | from absl.testing import parameterized
import numpy as np
from tensorflow.python.eager import context
from tensorflow.python.framework import constant_op
from tensorflow.python.framework import dtypes
from tensorflow.python.framework import errors
from tensorflow.python.framework import indexed_slices
from tensorflow... | tensorflow/tensorflow | tensorflow/python/ops/ragged/ragged_gather_op_test.py | ragged_gather_op_test.py | py | 19,137 | python | en | code | 178,918 | github-code | 18 | [
{
"api_name": "tensorflow.python.framework.test_util.TensorFlowTestCase",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.python.framework.test_util",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "absl.testing.parameterized.TestCase",
"li... |
16339296990 | # -*- encoding: utf-8 -*-
'''
@project : LeetCode
@File : canThreePartsEqualSum.py
@Contact : 9824373@qq.com
@Desc :
给你一个整数数组 A,只有可以将其划分为三个和相等的非空部分时才返回 true,否则返回 false。
形式上,如果可以找出索引 i+1 < j 且满足 (A[0] + A[1] + ... + A[i] == A[i+1] + A[i+2] + ... + A[j-1] == A[j] + A[j-1] + ... + A[A.... | passionzhan/LeetCode | canThreePartsEqualSum.py | canThreePartsEqualSum.py | py | 2,042 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "typing.List",
"line_number": 44,
"usage_type": "name"
}
] |
5197970737 | import sirs
from settings import HOST
import json
import os
DATA_DIRECTORY = 'data'
api = sirs.API(HOST)
os.makedirs(DATA_DIRECTORY, exist_ok=True)
print('downloading data from %s' % api.url)
for name, table in api.tables.items():
path = os.path.join(DATA_DIRECTORY, name + '.json')
print(
'writing c... | EE/hackaton-examples | sirs/download_all.py | download_all.py | py | 642 | python | en | code | 7 | github-code | 18 | [
{
"api_name": "sirs.API",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "settings.HOST",
"line_number": 9,
"usage_type": "argument"
},
{
"api_name": "os.makedirs",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number"... |
20830862794 | import datetime
import urllib, httplib, urlparse
import utils
class SimpleRestApiClient:
"""
Create rest client for simplifying http/https requests
"""
def __init__(self, base_url, common_url_params = {}):
"""
* base_url - usually endpoint of rest api http://example/api/v2
* c... | ivadim/movies | movies/utils.py | utils.py | py | 2,479 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "urlparse.urlparse",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "httplib.HTTPSConnection",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "httplib.HTTPConnection",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "urll... |
31728499332 | import re, subprocess,os, io
import matplotlib.pyplot as plt
os.chdir('E:/TZR/Epistasis/logs')
# val = subprocess.check_call('log_summary.sh %s' %file, shell=True, stdout=out, stderr=subprocess.STDOUT)
#
# print(val)
file = 'time'
dict = {}
with open('%s.txt' % file,'r') as f:
text = ''.join(f.readlines(... | Parks-Laboratory/calculate_running_time | plot_condor_stats.py | plot_condor_stats.py | py | 841 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "os.chdir",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "collections.OrderedDict",
"line_num... |
38752710718 | import unittest
import torch
from imap.data.image_rendering_data_module import ImageRenderingDataModule
# noinspection PyTypeChecker,PyUnresolvedReferences
class TestSevenScenesDataModule(unittest.TestCase):
def setUp(self) -> None:
dataset_name = '7scenes'
dataset_params = {
'datase... | MisterMap/imap-pytorch | test/test_image_rendering_data_module.py | test_image_rendering_data_module.py | py | 2,095 | python | en | code | 9 | github-code | 18 | [
{
"api_name": "unittest.TestCase",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "imap.data.image_rendering_data_module.ImageRenderingDataModule",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "torch.Size",
"line_number": 24,
"usage_type": "call"... |
71803296040 | import openql as ql
import os
import unittest
from config import json_dir, output_dir
config_fn = os.path.join(json_dir, "test_config_default.json")
platform = ql.Platform("starmon", config_fn)
class TestKernel(unittest.TestCase):
@classmethod
def setUp(cls):
ql.initialize()
ql.set_option('... | QuTech-Delft/OpenQL | test/v1x/python/test_Kernel.py | test_Kernel.py | py | 3,838 | python | en | code | 91 | github-code | 18 | [
{
"api_name": "os.path.join",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "config.json_dir",
"line_number": 8,
"usage_type": "argument"
},
{
"api_name": "os.path",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "openql.Platform",
"lin... |
8338395195 | from fastapi import FastAPI
app = FastAPI()
sales = {
1: {"item": "tin", "unit_price": 4, "quantity": 5},
2: {"item": "2 liters", "unit_price": 15, "quantity": 5},
3: {"item": "12 fl oz", "unit_price": 10, "quantity": 5},
4: {"item": "mini tin", "unit_price": 2, "quantity": 5},
}
@app.get("/")
def h... | sparsh-ai/recohut | docs/07-devops/fastapi/lab-simple-api/main.py | main.py | py | 528 | python | en | code | 91 | github-code | 18 | [
{
"api_name": "fastapi.FastAPI",
"line_number": 3,
"usage_type": "call"
}
] |
40490942820 | import glob
import numpy
from PIL import Image
from natsort import natsorted
frames = numpy.load("frames.npy")
actions = numpy.load("actions.npy")
files = glob.glob("E:/GeneralDev/chronicon-ai/data/*jpg")
files = natsorted(files)
diff = len(files)-len(frames)
if (diff > 0):
for file in files[len(frames):len(files)]:... | RookieIndieDev/chronicon-ai | updatedata.py | updatedata.py | py | 618 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "numpy.load",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.load",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "natsort.natsorted",
"line_number": 9... |
21100535294 | import logging
import onnx
from onnx import onnx_pb as onnx_proto # noqa: F401
from ..quant_utils import attribute_to_kwarg, ms_domain
from .base_operator import QuantOperatorBase
"""
Quantizes the EmbedLayerNorm fused ONNXRuntime Op.
This Quant operator keeps the input and segment IDs at int32 but will quantize a... | microsoft/onnxruntime | onnxruntime/python/tools/quantization/operators/embed_layernorm.py | embed_layernorm.py | py | 3,937 | python | en | code | 9,700 | github-code | 18 | [
{
"api_name": "base_operator.QuantOperatorBase",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "logging.info",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "quant_utils.attribute_to_kwarg",
"line_number": 109,
"usage_type": "call"
},
{
"api_... |
72816589799 | import cv2
from PIL import Image
img = cv2.imread('../labka.jpg')
img_gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
cv2.imwrite('grayscale_labka.jpg', img_gray)
gray_img = Image.open('grayscale_labka.jpg')
quan2 = gray_img.quantize(2)
quan4 = gray_img.quantize(4)
quan6 = gray_img.quantize(6)
quan2.show('2 colors')
... | Ersain/opencv-python-course | lab1/1/quantize.py | quantize.py | py | 465 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "cv2.imread",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "cv2.imwrite",
"line_... |
44558782418 | import pandas
import matplotlib.pyplot as plt
from scipy.fft import *
import numpy as np
import time
cNames = ["Mag1","Mag2","Mag3",
"Acc1_1","Acc1_2","Acc1_3",
"Gyro1","Gyro2","Gyro3",
"Acc2_1","Acc2_12","Acc2_3","Time"]
raw = pandas.read_csv("AGM_data.csv",names=cNames)
Time = raw.Tim... | Suzutsuki-CH/readSerial | Fourier.py | Fourier.py | py | 2,249 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pandas.read_csv",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.average",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.average",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.average",
"line... |
36790993083 | from bs4 import BeautifulSoup
import requests
url = "http://www.saramin.co.kr/zf_user/jobs/list/job-category?exp_cd=1&edu_min=8&edu_max=11&cat_cd=404&panel_type=&search_optional_item=y&search_done=y&panel_count=y"
url2= "http://www.saramin.co.kr/zf_user/jobs/list/job-category?exp_cd=1&edu_min=8&edu_max=11&cat_cd=407&pa... | wwe221/TIL | python&Django/day3/saramin_parser.py | saramin_parser.py | py | 1,589 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "requests.get",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"l... |
3400730555 | from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np
def matrix_composed_history(history):
fig = plt.figure(figsize=plt.figaspect(0.5))
ax = fig.add_subplot(211, projection='3d')
ax_two = fig.add_subplot(212, projection='3d')
a_one = [x for x in history if x[1] =... | fkocovski/optimaltaskassignment | evaluation/matrix_composed_history.py | matrix_composed_history.py | py | 1,027 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.figaspect",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "m... |
72753765159 | import socket
import threading
import PySimpleGUI as sg
import sys
FORMAT = 'utf-8'
HOST = socket.gethostbyname(socket.gethostname())
ADDR = (HOST, 5050)
chat_name = None
recieved = []
def try_connecting(client):
while True:
try:
client.connect(ADDR)
chat_name = sg.popup_get_text('... | AdamShively/chatapp | client.py | client.py | py | 2,079 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "socket.gethostbyname",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "socket.gethostname",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "PySimpleGUI.popup_get_text",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "PySi... |
15238422731 | from faker import Faker
import secrets
import string
import pandas as pd
import re
import mysql.connector
from sqlalchemy import create_engine
from cryptography.fernet import Fernet
from random import *
n=100
def mygen():
con=mysql.connector.connect(user='root',password='1525',host='localhost',database='dhanatdmpoc... | DhanaInfinite/TDMPOC | poc.py | poc.py | py | 5,589 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "mysql.connector.connector.connect",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "mysql.connector.connector",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "mysql.connector",
"line_number": 12,
"usage_type": "name"
},
{
"... |
14186815553 | from typing import Tuple
import albumentations as A
__all__ = ["CoarseDropout"]
class CoarseDropout(A.CoarseDropout):
def _keypoint_in_hole(self, keypoint: Tuple, hole: Tuple) -> bool:
x1, y1, x2, y2 = hole
x, y = keypoint[:2]
return x1 <= x < x2 and y1 <= y < y2
def apply_to_keypoi... | BloodAxe/xView3-The-First-Place-Solution | xview3/augmentations/coarse_dropout.py | coarse_dropout.py | py | 1,984 | python | en | code | 56 | github-code | 18 | [
{
"api_name": "albumentations.CoarseDropout",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "typing.Tuple",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "albumentations.Compose",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "a... |
14158756167 | # -*- coding: utf-8 -*-
"""Running and displaying multiple SubsidenceModel objects
"""
import os
from PySub import SubsidenceModelGas as _SubsidenceModelGas
from PySub import Points as _Points
from PySub import utils as _utils
from PySub import plot_utils as _plot_utils
from PySub import ProjectFolder as _Proje... | TNO/PySub | PySub/SubsidenceSuite.py | SubsidenceSuite.py | py | 99,073 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "warnings.filterwarnings",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "PySub.utils.is_iterable",
"line_number": 119,
"usage_type": "call"
},
{
"api_name... |
72390817319 | # encoding=utf-8
from xmlrpc.server import SimpleXMLRPCServer
from xmlrpc.server import SimpleXMLRPCRequestHandler
from datetime import datetime
import time
import socketserver
import logging,sys
from queue import PriorityQueue
from SqlServer import *
from common import TaskInfo
import common,FBCheckHelper... | leena201818/FacebookCrawl | TaskServer.py | TaskServer.py | py | 9,046 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "logging.basicConfig",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "sys.stdout",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "xmlrpc.server.S... |
12101758989 | import streamlit as st
import numpy as np
import cv2
import pandas as pd
# ********************
def main():
st.title('Recognition App')
st.sidebar.title('Parameters')
st.sidebar.markdown('Choose Parameters')
st.subheader('Choose What You want to Identify')
a = st.selectbox("Choose Option", ("Face... | kevkanae/Streamlit-Face-Recognition | P1.py | P1.py | py | 3,939 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "streamlit.title",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "streamlit.sidebar.title",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "streamlit.sidebar",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "stream... |
70489901160 | from pathlib import Path
from click.testing import CliRunner
from zenml.cli.base import clean, init
from zenml.constants import CONFIG_FILE_NAME, REPOSITORY_DIRECTORY_NAME
from zenml.utils import yaml_utils
from zenml.utils.io_utils import get_global_config_directory
def test_init_creates_zen_folder(tmp_path: Path)... | zenml-io/apidocs-fork | tests/integration/functional/cli/test_base.py | test_base.py | py | 1,237 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pathlib.Path",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "click.testing.CliRunner",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "zenml.cli.base.init",
"line_number": 14,
"usage_type": "argument"
},
{
"api_name": "zenml.co... |
33153623669 | import re
from django.contrib.sites import requests
__author__ = 'Travis'
def analysis(tweet_list):
#links to NLP sentiment analysis at http://text-processing.com/demo/sentiment/
url = 'http://text-processing.com/api/sentiment/'
payload = {'text':tweet_list}
response = requests.post(url, data=paylo... | travis6888/data_projects | twitter_interpreter/analysis2.py | analysis2.py | py | 1,306 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "django.contrib.sites.requests.post",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "django.contrib.sites.requests",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "re.findall",
"line_number": 15,
"usage_type": "call"
}
] |
33781703702 | from pathlib import Path
from typing import Tuple
import yaml
import tempfile
import uuid
import shutil
from dataclasses import dataclass, asdict
import numpy as np
import audiotools as at
import argbind
import torch
import gradio as gr
from vampnet.interface import Interface
from vampnet import mask as pmask
# Inte... | camenduru/vampnet-hf | app.py | app.py | py | 15,952 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "vampnet.interface.Interface",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "p... |
18493602402 | import numpy as np
import numpy.linalg as nplg
import scipy.linalg as sclg
from functional import cost_function,gradient,hessian
from modCholDec import modDec
from utilities import unvec
"""
Implemetation of the modified newton method for cost function minimization
"""
def rec(P0, D,W, conv):
"""
Use the mo... | RiccardoBiondi/SensorPositionSimulation | reconstruct.py | reconstruct.py | py | 1,731 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "functional.gradient",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "functional.hessian",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "modCholDec.modDec",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "scipy.linalg... |
14175506796 |
import numpy as np
import torch
@torch.no_grad()
def mixup(x, y, alpha=0.2):
if alpha > 0:
lam = np.random.beta(alpha, alpha)
else:
lam = 1
mixed_x = lam * x + (1 - lam) * x.flip(dims=(0,))
y_a, y_b = y, y.flip(dims=(0,))
return mixed_x, y_a, y_b, lam
def mixup_criterion(criterion, pred, y_a, y_b, lam):
r... | 13282803166/shengna | mmdetection/mmdet/datasets/pipelines/mixup.py | mixup.py | py | 389 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "numpy.random.beta",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "torch.no_grad",
"line_number": 5,
"usage_type": "call"
}
] |
3950488709 | import os
import pyautogui
import pyperclip
from PIL import ImageGrab
import random
import urllib.parse
from time import sleep
from datetime import datetime
from common.services.common_service import CommonService
class PyAutoGuiService(CommonService):
def __init__(self, **kwargs):
super().__init__(**kwa... | fukan-data/fukan-data-sobayonin-v8-1 | app/common/services/pyautogui/pyautogui_service.py | pyautogui_service.py | py | 8,642 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "common.services.common_service.CommonService",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "os.makedirs",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "PIL.ImageGrab.grab",
"line_number": 17,
"usage_type": "call"
},
{
"api_n... |
17017712475 | import itertools
n=int(input())
arr=[]
for i in range(n):
p=int(input())
arr.append(p)
ans=10**10
for i in list(itertools.product((0,1),repeat=n)):
p0=0
p1=0
for j in range(n):
if i[j]==0:
p0+=arr[j]
else:
p1+=arr[j]
ans ... | autumncolors11/atc_submits | arc029/arc029_1/20200113235029.py | 20200113235029.py | py | 357 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "itertools.product",
"line_number": 10,
"usage_type": "call"
}
] |
25014428632 | from django.shortcuts import render
from django.http import HttpResponse, HttpResponseNotFound, JsonResponse
from django.conf import settings
from django.core.files.storage import FileSystemStorage
import time
import os.path
from . import steg as lsbsteg
from . import filesteg as lsbfilesteg
UPLOAD_ROOT = o... | titusjohnson1209/Stegtool | myapp/views.py | views.py | py | 3,539 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "os.path.path.dirname",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "os.path.path.realpath"... |
36817470823 | import numpy as np
from collections import deque
from itertools import count
from matplotlib.patches import Circle
import matplotlib
import matplotlib.pyplot as plt
from .math import length_squared, angle_between
from .area import Area
import time
from scipy.ndimage.interpolation import rotate
from .pedestriannumba imp... | RexValkering/socialforcemodel | socialforcemodel/pedestrian.py | pedestrian.py | py | 35,130 | python | en | code | 8 | github-code | 18 | [
{
"api_name": "itertools.count",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 94,
"usage_type": "call"
},
{
"api_name": "numpy.sqrt",
"line_number": 98,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number... |
22121895843 | from django.urls import path
from direct_messages import views
url_patterns = [
path('messages/<str:username>/',
views.MessagesView.as_view(), name="direct_messages"),
path('messages/', views.AllMessages.as_view(), name="all_messages")
]
| jarnewma/carbon-dating | direct_messages/urls.py | urls.py | py | 258 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "direct_messages.views.MessagesView.as_view",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "direct_messages.views.MessagesView",
"line_number": 7,
"usage_type": "attribute... |
40330554431 | import os
import sys
import setuptools
NAME = 'pyoslog'
about = {}
working_directory = os.path.join(os.path.abspath(os.path.dirname(__file__)), NAME)
with open(os.path.join(working_directory, '__version__.py')) as version_file:
exec(version_file.read(), about)
with open('README.md') as readme_file:
readme =... | simonrob/pyoslog | setup.py | setup.py | py | 2,739 | python | en | code | 5 | github-code | 18 | [
{
"api_name": "os.path.join",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_nu... |
27263661451 | from datetime import datetime
from django import template
register = template.Library()
@register.filter
def ts_to_date(value):
try:
ttd = datetime.fromtimestamp(int(value))
except:
ttd = value
return ttd
@register.filter
def wei_to_eth(value):
try:
wei_to_eth = int(value) /... | ashaffir/nft-analytics | opensea/templatetags/extra_tags.py | extra_tags.py | py | 402 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "django.template.Library",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "django.template",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.fromtimestamp",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": ... |
7639654242 | from flask import Flask, render_template,request,jsonify
from pymongo import MongoClient
import os
import json
from flask_restplus import reqparse
app = Flask (__name__)
client = MongoClient('localhost', 27017)
db = client['F22Labs']
app = Flask(__name__)
datas=[]
filters=['Season','Episode','Gender','Investor']... | NikhilXavierJohn/SharkTank-F22Labs | Main.py | Main.py | py | 3,683 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "flask.Flask",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pymongo.MongoClient",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask_restplus.reqparse.Req... |
30024526898 | """Media Player platform for eversolo."""
from __future__ import annotations
import datetime as dt
from homeassistant.components.media_player import (
MediaPlayerDeviceClass,
MediaPlayerEntity,
MediaPlayerEntityFeature,
MediaPlayerState,
)
from .const import DOMAIN, LOGGER
from .coordinator import Ev... | hchris1/Eversolo | custom_components/eversolo/media_player.py | media_player.py | py | 11,971 | python | en | code | 8 | github-code | 18 | [
{
"api_name": "homeassistant.components.media_player.MediaPlayerEntityFeature.TURN_OFF",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "homeassistant.components.media_player.MediaPlayerEntityFeature",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "homea... |
13586555428 | # -*- coding: utf-8 -*-
"""
Created on Wed Aug 11 14:46:09 2021
@author: Olivia Gozel
Get the pairwise correlation as a function of distance data for Peijia
"""
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import os
os.chdir('C:\\Users\\olivi\\Dropbox\\Projects\\U19_project\\Code_python\\... | ogozel/fluo_noiseCorr | main_analyze_forPeijia.py | main_analyze_forPeijia.py | py | 9,215 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "os.chdir",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pandas.read_hdf",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "globalParams.neuropilSub",
"line_number": 46,
"usage_type": "attribute"
},
{
"api_name": "globalParams.p... |
3120970725 | #####################################
# Developed by Baptiste PICARD #
# picard.baptiste@laposte.net #
# Started the 11th of April 2020 #
# picard.baptiste@laposte.net #
# #
#####################################
# Imports
# Librairies
import json
import ... | BaptPicxDev/stock-exchanges-tool | stock.py | stock.py | py | 9,761 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "json.dump",
"line_number": 92,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 97,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 110,
"usage_type": "call"
},
{
"api_name": "pandas.to_datetime",
"line_... |
70205657001 | # -*- coding: utf-8 -*-
# @Time : 2022/12/7 10:49
# @Author : jinjie
# @File : test_app.py
import sqlite3
# 使用 unittest进行flask的单元测试
from flask import abort
import unittest
from myapp import app,db
# sqlite数据库配置
DATABASE = 'test.db'
# 使用测试类,工厂模式
class MyappTestCase(unittest.TestCase):
def setUp(self) ... | JiinJie/python_flask | 7_flask_test1/test_app.py | test_app.py | py | 1,901 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "unittest.TestCase",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "myapp.app.app_context",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "myapp.app",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "myapp.app.conf... |
29822911399 | from selenium import webdriver
from selenium.webdriver.common.keys import Keys
# add the chrome driver
chrome_driver ="C:\Development\chromedriver.exe"
driver = webdriver.Chrome(executable_path=chrome_driver)
# some web sites styles adjust the elements in the size screen and we maybe see less elements
driver.maximize_... | ecanro/100DaysOfCode_Python | Day_48/selenium_in_web2.py | selenium_in_web2.py | py | 968 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.common.keys.Keys.ENTER",
"line_number": 27,
"usage_type": "attribute"
},
... |
39899613645 | import cv2
import numpy as np
import matplotlib.pyplot as plt
img = cv2.imread("car.jpg", 0)
car = img[125:220, 200:300] # roi of the image
indices = np.where(car != [0])
coordinates = zip(indices[0], indices[1])
# cv2.imshow('coordinates', coordinates)
plt.imshow(img)
plt.show()
cv2.waitKey(0)
cv2.destroyAllWind... | namdang-exe/Computer_Vision_project | FIndingCoordinates.py | FIndingCoordinates.py | py | 325 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "cv2.imread",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "numpy.where",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.imshow",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
... |
34543054308 | import django
django.setup()
import datetime
import sys
import traceback
from apscheduler.schedulers.blocking import BlockingScheduler
from django.utils.timezone import now
from django.conf import settings
from logs.models import RedisSetting, RedisMetric
from utils.mail_helper import mail_admins
from utils.redis_scali... | carnot-technologies/redis-scaling | scheduler.py | scheduler.py | py | 2,312 | python | en | code | 10 | github-code | 18 | [
{
"api_name": "django.setup",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "apscheduler.schedulers.blocking.BlockingScheduler",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "django.utils.timezone.now",
"line_number": 19,
"usage_type": "call"
},
... |
42921726523 | from os import sep
import scrapy
import pandas as pd
import numpy as np
from scrapy.http import headers
class YapoSpider(scrapy.Spider):
name = "yapo"
df = pd.DataFrame(columns=['precio','Tipo de inmueble','Comuna','Dormitorios','Baños','Servicios'])
def start_requests(self):
urls = [
... | developBDULS/scrapy-sernatur-test | yaposc/yaposc/spiders/yapo_spider.py | yapo_spider.py | py | 4,115 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "scrapy.Spider",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "pandas.DataFrame",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "scrapy.Request",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pandas.read_excel",
... |
41115106288 | import csv
import json
airspace_count = 0
fir_list = []
firpoint_list = None
firheader_list = None
# file_name = 'source/FIRBoundaries_test.dat'
# file_name = 'source/FIRBoundaries.dat'
def fir_header(header):
global airspace_count, firheader_list
airspace_count += 1
firheader_list = header
def airspac... | NelisV/vatspy-geojson | import_functions.py | import_functions.py | py | 2,909 | python | en | code | 5 | github-code | 18 | [
{
"api_name": "json.dumps",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_number": 69,
"usage_type": "call"
}
] |
24189639831 | from PyPDF2 import PdfFileReader, PdfFileMerger
import eel
import time
from PIL import Image
# Initializing EEL into the web Directory
eel.init('F:\Sajed Project\Python\PDF Merger by using EEL\web')
# Function for Merging PDFs
@eel.expose
def pdfMaker(pdfList):
if len(pdfList) > 1:
try:
... | myself-sajed/PDF-Converter-and-Merger | index.py | index.py | py | 2,460 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "eel.init",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "PyPDF2.PdfFileMerger",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "eel.success",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "eel.error",
"line_number... |
28739457242 | import numpy as np
import matplotlib.pyplot as plt
import argparse
ap = argparse.ArgumentParser()
ap.add_argument("-f", "--motorfile", required=True, help="name of motor data file")
args = vars(ap.parse_args())
plt.rcParams['agg.path.chunksize'] = 20000
def ReadInsertionData():
MotorFile = args["motorfile"]
... | ckirby19/InsertionSimulatorWithCpp | Assets/Data/InsertionExperiment/DataPlotter.py | DataPlotter.py | py | 1,261 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.rcParams",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 9,
"usage_type": "name"
},
{
"api_name":... |
43277376800 | from datetime import datetime
from django.conf import settings
from django.db import models
from django.db.models import BooleanField
from django.db.models import CASCADE
from django.db.models import Case
from django.db.models import Count
from django.db.models import IntegerField
from django.db.models import Q
from d... | piratar/wasa2il | topic/models.py | models.py | py | 3,729 | python | en | code | null | github-code | 18 | [
{
"api_name": "django.db.models.QuerySet",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.now",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": ... |
12513904653 | import pygame
pygame.init()
ourScreen=pygame.display.set_mode((400, 300))
pygame.display.set_caption("PYGAME")
finish = False;
color1 = (0,0,255)
color2 = (255,0,0)
color = color1
# coordinates
x=30
y=30
# frame per sec
#clock = pygame.time.Clock()
while not finish:
for e in pygame.event.get():
if e... | etlars/python | testPy4.py | testPy4.py | py | 1,096 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pygame.init",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "pygame.display.s... |
15209012789 | from torch import nn
from sklearn.metrics import mean_squared_error
import math
import pandas as pd
import numpy as np
import torch
from torch.utils.data import DataLoader, TensorDataset
import os
def load_prediction(folder, model_name):
'''
Load one prediction
'''
return np.loadtxt(os.pat... | xiyichen/collaborative-filtering | utils.py | utils.py | py | 5,998 | python | en | code | 3 | github-code | 18 | [
{
"api_name": "numpy.loadtxt",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "numpy.sqrt",
"line_number... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.