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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
42976571248 | """Simulation environment and setup tools."""
import logging
import os
import random as rnd
from collections import defaultdict
from dataclasses import dataclass, field
from typing import (Callable, Dict, Generic, Hashable, List, Mapping, Optional, Tuple, Type, TypeVar, Union)
import torch
import torch.nn as nn
from ... | microsoft/fl-simulation | src/fl_simulation/simulation/instance.py | instance.py | py | 13,982 | python | en | code | 11 | github-code | 6 | [
{
"api_name": "typing.TypeVar",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "typing.Hashable",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "typing.TypeVar",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "fl_simulation.client.co... |
6679876702 | import os
import argparse, sys
import numpy as np
import matplotlib.pyplot as plt
import joblib
import warnings
warnings.filterwarnings('ignore')
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import torchvision.transforms as transforms
from sklea... | gdqb233/inm363prj | O2U.py | O2U.py | py | 9,603 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "torchvision.transforms.Compose",
"line_number": 47,
"usage_type": "call"
},
{
"api... |
34382804105 | import logging
import parser_2
import config
from aiogram import Bot, Dispatcher, executor, types
logging.basicConfig(level=logging.INFO)
bot = Bot(token=config.API_TOKEN)
dp = Dispatcher(bot)
# url страниц которые будем парсить
url_hot = 'https://www.povarenok.ru/recipes/category/6/~'
url_soup = 'https://www.povaren... | VKURICH/Telegram-bot | bot_2.py | bot_2.py | py | 5,002 | python | ru | code | 0 | github-code | 6 | [
{
"api_name": "logging.basicConfig",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "aiogram.Bot",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "config.API_TOKEN",
... |
43241953316 | # -*- coding:utf-8 -*-
#
# 该文件用于语音识别
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
import websocket
import datetime
import hashlib
import base64
import hmac
import json
from urllib.parse import urlencode
import time
import ssl
from wsgiref.handle... | miliki-boop/FPGA-Final-assignment | embedded/audio.py | audio.py | py | 6,926 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "datetime.datetime.now",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 42,
"usage_type": "name"
},
{
"api_name": "wsgiref.handlers.format_date_time",
"line_number": 43,
"usage_type": "call"
},
{
"api_nam... |
35875625030 | import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from tensorboard.backend.event_processing import event_accumulator
base_event_path = 'CNN_BASE_IMITATION'
scalar_event_path = 'Loss_MSE Loss'
event_path = 'events.out.tfevents.1591650349.DESKTOP-8ORT4I6.20336.'
path = os.path.join('log... | josepdecid/MineRL | src/plots/generate_plots.py | generate_plots.py | py | 1,097 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.path.join",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "tensorboard.backend.event_processing.event_accumulator.EventAccumulator",
"line_number": 15,
"usage_type": "cal... |
21485835829 | from typing import List
import heapq
class Solution:
def constrainedSubsetSum(self, nums: List[int], k: int) -> int:
n = len(nums)
dp = nums[::]
res = nums[-1]
delete = set()
q = []
heapq.heappush(q, (- dp[-1], n-1))
for i in range(n-2, -1, -1):
wh... | bboychencan/Algorithm | leetcode/weekly_contests/weekly186/4.py | 4.py | py | 817 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.List",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "heapq.heappush",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "heapq.heappop",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "heapq.heappush",
"line_nu... |
36441539115 | # -*- coding:utf-8 -*-
"""
Author:Wei Mao
Date :2022-12-06
Email : weimao@whu.edu.cn
"""
from PySide2.QtWidgets import QApplication
from PySide2.QtUiTools import QUiLoader
import image.icon16_rc
class DeMo:
def __init__(self):
# 从文件中加载UI定义
self.ui = QUiLoader().load('ui/demo5.16.ui')
app = QA... | Weiwei-Mao/PySide2 | demo5.16.py | demo5.16.py | py | 397 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "PySide2.QtUiTools.QUiLoader",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "PySide2.QtWidgets.QApplication",
"line_number": 20,
"usage_type": "call"
}
] |
25926337232 | '''
Created on 07 Feb 2019
@author: Deon
'''
import sys
import ctypes
import numpy as np
import OpenGL.GL as gl
import OpenGL.GLUT as glut
import traceback
#==================================================
vertex_code = """
#version 130
attribute vec3 position;
attribute vec4 color;
varying ve... | Deon-Marais/ScanManipulator | Attenuation/GLshaders.py | GLshaders.py | py | 5,883 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "OpenGL.GL.glCreateProgram",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "OpenGL.GL",
"line_number": 40,
"usage_type": "name"
},
{
"api_name": "OpenGL.GL.glCreateProgram",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "OpenGL.... |
34105548428 | import logging
from pathlib import Path
from asyncpg.exceptions import SyntaxOrAccessError
from udata_hydra import context
log = logging.getLogger("udata-hydra")
class Migrator:
# NB: we can't use async __init__, hence the workaround
@classmethod
async def create(cls, db_name, skip_errors=False):
... | etalab/udata-hydra | udata_hydra/migrations/__init__.py | __init__.py | py | 2,125 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "udata_hydra.context.pool",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "udata_hydra.context",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "pathlib... |
73365518267 | from collections import deque
import math
def red( x, y):
# print("Reducing ", x, y)
if x < y:
x, y = 2 * x, y - x
else:
x, y = x - y, 2 * y
return x, y
def is_solvable(x, y, dict = {}, prev = []):
# x, y positive integers
if (x, y) in dict:
return dict[(x, y)]
i... | johnportin/google_challenge | hopcroft_karp/main.py | main.py | py | 3,859 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "collections.deque",
"line_number": 67,
"usage_type": "call"
}
] |
17017487521 | # -*- coding: utf-8 -*-
from ...Template import Template
class KNeighborsClassifier(Template):
"""
See also
--------
sklearn.neighbors.KNeighborsClassifier
http://scikit-learn.org/0.18/modules/generated/sklearn.neighbors.KNeighborsClassifier.html
"""
SUPPORTED_METHODS = ['predict']
... | prashanthgedde/sklearn-porter | sklearn_porter/classifier/KNeighborsClassifier/__init__.py | __init__.py | py | 4,567 | python | en | code | null | github-code | 6 | [
{
"api_name": "Template.Template",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "sklearn.neighbors.kd_tree.KDTree",
"line_number": 52,
"usage_type": "name"
},
{
"api_name": "sklearn.neighbors.ball_tree.BallTree",
"line_number": 52,
"usage_type": "name"
}
] |
10120424359 | """
Generic operation of an analog sensor.
Reads and returns the voltage.
"""
import utime
import sensors
import gpio_handler
import logging
def get_reading(data_pin, voltage_divider=1, vcc_pin=None):
sensors.set_sensor_power_on(vcc_pin)
# get measurement
vmeas = None
try:
vmeas = gpio_h... | insighio/insighioNode | insighioNode/lib/sensors/analog_generic.py | analog_generic.py | py | 688 | python | en | code | 5 | github-code | 6 | [
{
"api_name": "sensors.set_sensor_power_on",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "gpio_handler.get_input_voltage",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "logging.debug",
"line_number": 19,
"usage_type": "call"
},
{
"api_name... |
3674288660 | from bson import ObjectId
from sanic.exceptions import InvalidUsage, Forbidden
from app.models import CafeEmployeeDocument, OrderDocument, ProductDocument
def require_json(func):
async def wrapped(self, request, **kwargs):
if request.json is None:
raise InvalidUsage('Data is not provided.')
... | recluse27/cafesystem | app/utils.py | utils.py | py | 1,482 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sanic.exceptions.InvalidUsage",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sanic.exceptions.InvalidUsage",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "app.models.CafeEmployeeDocument.find_one",
"line_number": 22,
"usage_type": "... |
37935554361 | import numpy as np
import matplotlib.pyplot as plt
import numpy.linalg
from scipy import misc
class pivEval(object):
def __init__(self, params):
#print Initializing
self.im1 = misc.imread(params['file1'])
self.im2 = misc.imread(params['file2'])
if params['show'] == 1:
... | gtg556h/pyPIV | pivLib.py | pivLib.py | py | 459 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "scipy.misc.imread",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "scipy.misc",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "scipy.misc.imread",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "scipy.misc",
"line... |
6673886072 | import bs4
import requests
import csv
url = 'https://id.carousell.com/carousell_id'
contents = requests.get(url)
response = bs4.BeautifulSoup(contents.text, 'html.parser')
data = response.find('div', attrs={'class': 'D_apq D_eZ M_gF D_fb M_gH'})
datas = data.findAll('div', attrs={'class': 'D_jg', 'class': 'D_qq',... | AlfaRiza/ScrapingCarousell | extraction.py | extraction.py | py | 1,215 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.get",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "csv.writer",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "csv.writer",
"line_number... |
27591474090 | import sys
import numpy as np
import pandas as pd
import datetime as dt
import time
from SourceReader import SourceReader
from Pipeline import Pipeline
import threading
import json
def main(args):
if len(args) < 1:
print('usage: informe o nome do arquivo de configuracao')
return
with open(args[0]) as content:
... | andre1393/creditas-challenge | src/postgre_loader.py | postgre_loader.py | py | 1,325 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "json.load",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "SourceReader.SourceReader",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "Pipeline.Pipeline",
... |
3837264998 | import os, glob, csv
import tkinter as tk
from PIL import Image, ImageTk
import math
# CONFIGURATION
COLOR_PRIMARY = "black"
COLOR_SECONDARY = "#115599"
COLOR_TEXT = "white"
IMAGENAME_FORM_DEFAULT = "%d.jpg"
class FolderObj(object):
def __init__(self, main, foldername, formentry):
self.parent... | fosterseth/multi_frame_viewer | multi_frame_viewer.py | multi_frame_viewer.py | py | 5,753 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "tkinter.Button",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "tkinter.W",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "tkinter.X",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "tkinter.RAISED",
"li... |
26041210876 | from __future__ import annotations
import os.path
from dataclasses import dataclass
from typing import Iterable
from pants.backend.python.goals import lockfile
from pants.backend.python.lint.pylint.skip_field import SkipPylintField
from pants.backend.python.subsystems.python_tool_base import PythonToolBase
from pants... | pantsbuild/pants | src/python/pants/backend/python/lint/pylint/subsystem.py | subsystem.py | py | 7,770 | python | en | code | 2,896 | github-code | 6 | [
{
"api_name": "pants.engine.target.FieldSet",
"line_number": 41,
"usage_type": "name"
},
{
"api_name": "pants.backend.python.target_types.PythonSourceField",
"line_number": 42,
"usage_type": "name"
},
{
"api_name": "pants.backend.python.target_types.PythonSourceField",
"line_... |
26496272866 | import random
from argparse import Namespace
from enum import Enum
import numpy as np
from game import Game
from gym import Env
from gym.spaces import Box, MultiDiscrete
from perlin_noise import PerlinNoise
from stable_baselines3 import A2C
from utilities import *
DIRECTION_OFFSETS_EVEN: dict[int, tuple[int, int]] =... | olcayseygan/ssb-suru-2022 | src/agents/agent.py | agent.py | py | 49,669 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "enum.Enum",
"line_number": 58,
"usage_type": "name"
},
{
"api_name": "enum.Enum",
"line_number": 241,
"usage_type": "name"
},
{
"api_name": "numpy.ndarray",
"line_number": 601,
"usage_type": "attribute"
},
{
"api_name": "perlin_noise.PerlinNoise",
... |
19805414351 | import sys
from PyQt5.QtWidgets import QWidget, QProgressBar, QApplication
from PyQt5.QtCore import *
class ProgressBar(QWidget):
def __init__(self):
super().__init__()
self.setWindowTitle("Progress Bar")
self.pbar = QProgressBar(self)
self.pbar.setValue(10)
self.pbar.setO... | mgupta27/PyQt-Projects | ProgressBar_V2.py | ProgressBar_V2.py | py | 497 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "PyQt5.QtWidgets.QWidget",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtWidgets.QProgressBar",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets.QApplication",
"line_number": 17,
"usage_type": "call"
},
{
"... |
74009289467 | import logging
class WazuhRules(object):
def __init__(self, filenames):
# Logging Parameters
logging.basicConfig(level=logging.INFO)
self.logger = logging.getLogger(__name__)
# self.logger.setLevel(logging.INFO)
self.logger.setLevel(logging.DEBUG)
# self.logger.setL... | irvinhomem/pyscope | WazuhRules.py | WazuhRules.py | py | 1,007 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.basicConfig",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
... |
3467040228 | """
Predict output by trained model.
"""
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
import cv2
import json
import common
import numpy as np
import os
import os.path
import random
import sys
import time
class Predictor:
def __init__(self, config_path):
"""Load trained_... | doosik71/lecture_python | 40_tensorflow/46_Defect_Inspection/predict.py | predict.py | py | 2,361 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "warnings.simplefilter",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "common.Config",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "common.get_model",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "common.read_image... |
35787218141 | import os, sys, time
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
import traceback
import numpy as np
import pandas as pd
import pickle
import subprocess
import pydicom
from pathlib import Path
import shutil
import gc
import argparse
import json
from evt_classes import *
from Util... | mmkanta/fl-webapp-model | pacs_connection/dicom_function.py | dicom_function.py | py | 14,749 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sys.path.insert",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number... |
33762689100 | from __future__ import unicode_literals
import random
from lib.constants import DATA_BLOB as d
from lib.constants import SPREAD_DATA_BLOB as sd
from lib.constants import NFL as nfl
class DataBlobFactory():
def generate_data(self, timestamp=0, week=0, type="score"):
if timestamp:
if type == "s... | FenrirUnbound/football-spread | tests/test_lib/datablob_factory.py | datablob_factory.py | py | 1,717 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "lib.constants.DATA_BLOB.GAME_WEEK",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "lib.constants.DATA_BLOB",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "lib.constants.DATA_BLOB.GAME_SEASON",
"line_number": 31,
"usage_type": "at... |
73674675708 | import torch
from functions_activations import softmax
class FFNN(torch.nn.Module):
def __init__(self, F, l_h, l_a, C):
super(FFNN, self).__init__()
dim = [F] + l_h + [C]
self.Ws = torch.nn.ParameterList(
[torch.nn.Parameter(torch.randn(dim[i], dim[i + 1]))
... | fdzr/neural_networks | FFNN_v2.py | FFNN_v2.py | py | 2,382 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "torch.nn",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.ParameterList",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.Parameter"... |
15161804540 | from telegram import Update, ReplyKeyboardMarkup, ReplyKeyboardRemove
from telegram.ext import ContextTypes
from telegram.constants import MessageEntityType
import pandas as pd
from telegram import PhotoSize, Animation, Audio, Voice, Video, VideoNote
from telegram.constants import ParseMode
import json
from log im... | twobrowin-study/metro-2022-bot | python/handlers.py | handlers.py | py | 7,950 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "telegram.Update",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "telegram.ext.ContextTypes.DEFAULT_TYPE",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "telegram.ext.ContextTypes",
"line_number": 23,
"usage_type": "name"
},
{
... |
34752862023 | import json
from tqdm import tqdm
import argparse
from Sort_and_Valid import MyValidator
from Sort_and_Valid import MyInsertionSort
class ReadFile:
"""
Объект класса ReadFile считывает текст из файла и хранит их
Он нужен для того, чтобы хранить в себе данные из файла
для дальнейшего использования.
... | Hocyxa/Python_Laba3 | main.py | main.py | py | 4,132 | python | ru | code | 0 | github-code | 6 | [
{
"api_name": "json.load",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "tqdm.tqdm",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "Sort_and_Valid.MyValidato... |
71968247867 | import time
from multiprocessing import Process
from proxypool.api import app
from proxypool.getter import Getter
from proxypool.tester import Tester
from proxypool.db import RedisClient
from proxypool.setting import *
class Scheduler():
def schedule_tester(self, cycle=TESTER_CYCLE):
"""[summary]
... | GYT0313/ProxyPool | proxypool/scheduler.py | scheduler.py | py | 1,646 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "proxypool.tester.Tester",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "proxypool.getter.Getter",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "time.sleep... |
34199824862 | from art_instructions.gui import GuiInstruction
from PyQt4 import QtCore
import rospy
from art_msgs.srv import NotifyUserRequest
import numpy as np
from art_projected_gui.items import ObjectItem, DialogItem, PolygonItem
from math import sqrt
import tf
import matplotlib.path as mplPath
from art_projected_gui.helpers imp... | robofit/arcor | art_instructions/src/art_instructions/gui/drill_points.py | drill_points.py | py | 10,816 | python | en | code | 9 | github-code | 6 | [
{
"api_name": "PyQt4.QtCore.QCoreApplication",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "PyQt4.QtCore",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "art_instructions.gui.GuiInstruction",
"line_number": 16,
"usage_type": "name"
},
{
... |
42174752259 | """Add IP Limit
Revision ID: 2b59bac07ae2
Revises: b21f5b2d77ec
Create Date: 2023-10-30 23:27:13.196934
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "2b59bac07ae2"
down_revision = "b21f5b2d77ec"
branch_labels = None
depends_on = None
def upgrade() -> None:... | eloravpn/EloraVPNManager | src/migration/alembic/versions/2b59bac07ae2_add_ip_limit.py | 2b59bac07ae2_add_ip_limit.py | py | 915 | python | en | code | 15 | github-code | 6 | [
{
"api_name": "alembic.op.add_column",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integer... |
25226560586 | #%%
import yfinance as yf
import matplotlib.pyplot as plt
import time
plt.ion()
plt.subplots_adjust(hspace=0.5)
while True:
try:
SPXL = yf.download(tickers = "SPXL", period = '1d', interval = '1m')
MYMF = yf.download(tickers = "MYM=F", period = '1d', interval = '1m')
sD2 = SPXL.tail(30)['O... | HawkingLaugh/Stock-Stuff | paypay_point.py | paypay_point.py | py | 866 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "matplotlib.pyplot.ion",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.subplots_adjust",
"line_number": 7,
"usage_type": "call"
},
{
"api_name":... |
13418926680 | from elasticsearch import Elasticsearch
from elasticsearch.helpers import bulk
from searchapp.constants import DOC_TYPE, INDEX_NAME
from searchapp.data import all_products, ProductData
def main():
# Connect to localhost:9200 by default.
es = Elasticsearch()
es.indices.delete(index=INDEX_NAME, ignore=404... | reachingfdreams/sendo_homework | searchapp/index_products.py | index_products.py | py | 1,672 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "elasticsearch.Elasticsearch",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "searchapp.constants.INDEX_NAME",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "searchapp.constants.INDEX_NAME",
"line_number": 14,
"usage_type": "name"
},
... |
74348528189 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.core.validators
class Migration(migrations.Migration):
dependencies = [
('mail_list', '0002_auto_20151005_1731'),
]
operations = [
migrations.AlterField(
mo... | DarKnight24/workshop | workshop/mail_list/migrations/0003_auto_20151007_1707.py | 0003_auto_20151007_1707.py | py | 2,096 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.AlterField",
"line_number": 15,
"usage_type": "call"
},
{... |
19241439756 | import json
import os
from mock import Mock
from mock import patch
from django.db.models import Q
from minecode.management.commands.request_scans import Command
from minecode.utils_test import MiningTestCase
from packagedb.models import Package
from minecode.models import ScannableURI
class RequestScansTest(Mining... | nexB/purldb | minecode/tests/test_request_scans.py | test_request_scans.py | py | 2,666 | python | en | code | 23 | github-code | 6 | [
{
"api_name": "minecode.utils_test.MiningTestCase",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.path.... |
38559785000 | # data-query-function
import json
import boto3
import os
import datetime
# Testing the source change.
def lambda_handler(event, context):
#try:
#print("passed in event: {}".format(event))
#print(event['query'])
## This block queries the file using s3 select
# Can I pass fo... | jmw7115/terraform-aws-devops | src/lambda/data-query-function/lambda_function.py | lambda_function.py | py | 4,698 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "datetime.datetime.now",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "boto3.client",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "json.loads"... |
74494631866 | """
coin detection using opencv and python
task: draw a circle around each coin in an image
method:
- find the edge using Gaussian and Canny
- try to fit a circle to the edges by comparing circles of increasing size. Once passed threshold,
assume that is the radius of coin and save the coordinates of the center
- dra... | tinazhouhui/computer_vision | image_analysis/coin_detection.py | coin_detection.py | py | 4,662 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "cv2.imread",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "cv2.resize",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "cv2.GaussianBlur",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "cv2.BORDER_DEFAULT",
"line... |
39668387843 | #!/usr/bin/python
# -*- encoding: utf-8 -*-
from logger import setup_logger
from AttaNet import AttaNet
from cityscapes import CityScapes
from loss import OhemCELoss
from evaluate import evaluate
from optimizer import Optimizer
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.distribut... | songqi-github/AttaNet | train.py | train.py | py | 5,470 | python | en | code | 40 | github-code | 6 | [
{
"api_name": "os.environ",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "os.path.exists",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "os.makedirs",
"line_number... |
38760717165 | '''
Created on 23 Feb 2020
@author: alex
'''
import argparse
import sys
import logging
from geophys_utils._get_netcdf_util import get_netcdf_util
logger = logging.getLogger()
logger.setLevel(logging.INFO) # Initial logging level for this module
def main():
'''
Main function for calling Net... | GeoscienceAustralia/geophys_utils | geophys_utils/rechunk.py | rechunk.py | py | 3,218 | python | en | code | 22 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "geophys_u... |
20169212637 | #!/usr/bin/env python3
from collections import Counter
import heapq
from pprint import pprint
import string
import nltk
import yaml
with open('articles.yaml', 'r') as f:
articles = yaml.load(f)
df = Counter()
letters = set(string.ascii_lowercase)
for article in articles:
tf = Counter()
text = article['abstract']... | raylu/oldnews | analyzer.py | analyzer.py | py | 680 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "yaml.load",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "string.ascii_lowercase",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "collections... |
5759867174 | # -*- coding: utf-8 -*-
"""
Editor de Spyder
Este es un archivo temporal
"""
import numpy as np
import matplotlib.pyplot as plt
#%% Creamos datos
datos = 10
data = np.array([np.arange(datos),np.arange(datos)]) - np.random.random((2,datos))*5
data = data.T
plt.scatter(data[:,0],data[:,1])
#%% Covertir datos a conj... | OscarFlores-IFi/CDINP19 | code/p12.py | p12.py | py | 938 | python | es | code | 0 | github-code | 6 | [
{
"api_name": "numpy.array",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.random.random",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line... |
22946263723 | import io, socket
import time, signal
import os, sys, copy
from tokenize import String
import requests
from flask import Flask, Response, abort, render_template, request
from _thread import start_new_thread
from scripts.args import ArgumentParser
from scripts.file import FlaskFileReader
from scripts.image import Imag... | Team-Crez/game-forums | main.py | main.py | py | 5,452 | python | ko | code | 1 | github-code | 6 | [
{
"api_name": "copy.copy",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "os.kill",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "os.getpid",
"line_number": 61,
"... |
2880878541 | from django.core.exceptions import ValidationError
from django.core.validators import MaxValueValidator, MinValueValidator
from django.db import models
from bboard import config
class Bb(models.Model):
title = models.CharField(max_length=50, verbose_name='Товар')
content = models.TextField(null=True, blank=T... | RomanZorkin/fitness_erp | samplesite/bboard/models.py | models.py | py | 6,362 | python | ru | code | 0 | github-code | 6 | [
{
"api_name": "django.db.models.Model",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "... |
40687970363 | from __future__ import (
absolute_import,
division,
print_function,
unicode_literals,
)
from abc import ABC, abstractmethod
from typing import Optional
class TcOpsBase(ABC):
"""
Implements TC lower level operations to create scheduler and filters.
Each function has all argments re... | magma/magma | lte/gateway/python/magma/pipelined/qos/tc_ops.py | tc_ops.py | py | 1,112 | python | en | code | 1,605 | github-code | 6 | [
{
"api_name": "abc.ABC",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "abc.abstractmethod",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "abc.abstractmethod",
"... |
27213257325 | import sys
import itertools
heights = [int(sys.stdin.readline().rstrip()) for i in range(9)]
heights = sorted(heights)
comb = itertools.combinations(heights, 7)
for c in comb:
if sum(c) == 100:
for i in c:
print(i)
break
| hammii/Algorithm | BAEKJOON_python/2309_일곱난쟁이.py | 2309_일곱난쟁이.py | py | 256 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "sys.stdin.readline",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "sys.stdin",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "itertools.combinations",
"line_number": 7,
"usage_type": "call"
}
] |
32644512657 | from functools import partial
import maya.cmds as cmds
from mgear.vendor.Qt import QtWidgets, QtCore, QtGui
from mgear.core import pyqt, utils as coreUtils, animLayers
from mgear.shifter.game_tools_fbx import fbx_export_node, utils
class AnimClipsListWidget(QtWidgets.QWidget):
def __init__(self, parent=None):
... | mgear-dev/mgear4 | release/scripts/mgear/shifter/game_tools_fbx/anim_clip_widgets.py | anim_clip_widgets.py | py | 15,993 | python | en | code | 209 | github-code | 6 | [
{
"api_name": "mgear.vendor.Qt.QtWidgets.QWidget",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "mgear.vendor.Qt.QtWidgets",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "mgear.vendor.Qt.QtWidgets.QVBoxLayout",
"line_number": 23,
"usage_type":... |
30950815957 | import numpy as np
import matplotlib.pyplot as plt
import sys
sys.path.append('../../scripts')
from virialcoeffs import VirialCoeffs
from kirkwood import Kirkwood
sys.path.append('../../analysis_scripts')
from rdfloader import RdfLoader
Nsamples = 20
fp = 0
prefix1 = '../../2020_03_19/raw_data_processing/raw_d... | samueljmcameron/ABPs_coarse_graining | experiments/2020_03_23/no_activity_pressure/no_activity_pressure.py | no_activity_pressure.py | py | 2,088 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sys.path.append",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "sys.path.append",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_numb... |
21616080249 | from graphene_django import DjangoObjectType
import graphene
from graphene import NonNull
from .models import Order, Product
class ProductType(DjangoObjectType):
class Meta:
model = Product
fields = [
"id",
"name",
"price",
"description",
... | rubberdok/indok-web | backend/apps/ecommerce/types.py | types.py | py | 955 | python | en | code | 17 | github-code | 6 | [
{
"api_name": "graphene_django.DjangoObjectType",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "models.Product",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "graphene.Enum.from_enum",
"line_number": 21,
"usage_type": "call"
},
{
"api_name":... |
9365906258 | import pandas as pd
from sklearn.preprocessing import LabelEncoder
from sklearn.linear_model import LinearRegression
import matplotlib.pyplot as plt
import numpy as np
import xgboost as xgb
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_squared_error
# загрузка датасета
data = pd... | NikitaChernikov04/Football_Result_Predict | tochnost'.py | tochnost'.py | py | 3,598 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.LabelEncoder",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "sklearn.linear_model.LinearRegression",
"line_number": 28,
"usage_type": "call"
},
... |
32724142080 | from __future__ import annotations
import logging
from typing import Optional
from report_calculation.model import Purchase
from report_calculation.schema import PurchaseRequest
logger = logging.getLogger(__name__)
# add purchase
def create(purchase: PurchaseRequest) -> Purchase:
logger.info("Adding purchase"... | DanielDucuara2018/report_calculation | report_calculation/actions/purchase.py | purchase.py | py | 1,452 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "report_calculation.schema.PurchaseRequest",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "report_calculation.model.Purchase",
"line_number": 16,
"usage_type": "call"
... |
14082232216 | import json
import openpyxl
import sqlite3
import sys
YEAR_FROM = 1863
YEAR_TO = 1912
conn = sqlite3.connect('mapping_the_homestead_act.db')
conn.row_factory = sqlite3.Row
# Create the schema.
conn.execute('DROP TABLE IF EXISTS states')
conn.execute('''
CREATE TABLE states (
id INTEGER PRIMARY KEY,
state TEX... | chnm/mapping-the-homestead-act | migrate.py | migrate.py | py | 6,441 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sqlite3.connect",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "sqlite3.Row",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "json.load",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_numb... |
43426393047 | #!/usr/bin/env python3
import argparse
# Defining and parsing the command-line arguments
parser = argparse.ArgumentParser(description='kubeflow pipeline component to read csv file and visualize the data')
parser.add_argument('--input-datasource-directory-mountable', default=False, action="store_true", help='whether in... | ShaswataJash/kfpcomponent | TabularDataVisualizationUsingPandaProfiler/src/data_visualization.py | data_visualization.py | py | 3,839 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "tempfile.mkdtemp",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "subprocess.run",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "subprocess.PIP... |
19221697734 | ####################################################
# D1014636 潘子珉
####################################################
#import sys
import socket
import tkinter as tk
import threading
import eel
eel.init('gui', allowed_extensions=['.js', '.html'])
PORT = 8888
BUF_SIZE ... | PMinn/UDP-Client-Server | code/Client_web.py | Client_web.py | py | 1,554 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "eel.init",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "socket.gethostbyname",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "eel.writeClientMessage",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "eel.connectEnd",... |
25375511195 | #!/usr/bin/python3
"""
User view for API.
"""
from flask import abort, request, jsonify
from api.v1.views import app_views
from models import storage
from models.user import User
@app_views.route(
'/users',
methods=['GET'],
strict_slashes=False)
def get_all_users():
"""Returns JSON of all users"""
... | amde-et/AirBnB_clone_v3 | api/v1/views/users.py | users.py | py | 2,088 | python | en | code | 5 | github-code | 6 | [
{
"api_name": "models.storage.all",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "models.storage",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "flask.jsonify",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "api.v1.views.app_view... |
35445270763 | from dexy.filter import DexyFilter
from dexy.plugins.process_filters import SubprocessStdoutFilter
from dexy.plugins.process_filters import SubprocessFilter
try:
from docutils import core
AVAILABLE = True
except ImportError:
AVAILABLE = False
class RestructuredTextFilter(DexyFilter):
"""
A 'native... | gotosprey/dexy | dexy/plugins/restructured_text_filters.py | restructured_text_filters.py | py | 2,848 | python | en | code | null | github-code | 6 | [
{
"api_name": "dexy.filter.DexyFilter",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "docutils.core.publish_parts",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "docutils.core",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "docu... |
38036243752 | from setuptools import find_packages, setup
from amset import __version__
with open("README.md", "r") as file:
long_description = file.read()
if __name__ == "__main__":
setup(
name="amset",
version=__version__,
description="AMSET is a tool to calculate carrier transport properties "
... | hackingmaterials/amset | setup.py | setup.py | py | 2,726 | python | en | code | 110 | github-code | 6 | [
{
"api_name": "setuptools.setup",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "amset.__version__",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "setuptools.find_packages",
"line_number": 21,
"usage_type": "call"
}
] |
23285012780 | # %%
# #adding the optuna for google colab
# !pip install --quiet optuna
# import optuna
# optuna.__version__
# %%
# Importing Libraries
import numpy as np
import pandas as pd
from sklearn.svm import SVC
from sklearn.model_selection import train_test_split
from sklearn import metrics
import optuna
from ... | chrisewanik/school_projects | cos598_machine_learning/final_project/classification_models.py | classification_models.py | py | 11,769 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.random.seed",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "sklearn.utils.check_random_state",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "... |
11400759514 | import numpy as np
from rtree import index
UNCLASSIFIED_ID = None
class CMDD:
def __init__(self, k, minpts):
if minpts > k:
raise Exception('Invalid arguments. k cannot be greater than minpts!')
self.k = k
self.minpts = minpts
self.dataset = None
def fit(self, X):... | ArtemKamantsev/clusterization_comparision | CMDD.py | CMDD.py | py | 3,535 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "rtree.index.Property",
"line_number": 63,
"usage_type": "call"
},
{
"api_name": "rtree.index",
"line_number": 63,
"usage_type": "name"
},
{
"api_name": "rtree.index.Index",
"line_number": 65,
"usage_type": "call"
},
{
"api_name": "rtree.index",
... |
8187002997 | import apache_beam as beam
import csv
def my_transformation(element):
# Replace this with your actual transformation logic
# Example: Convert the element to uppercase
transformed_data = element.upper()
return transformed_data
def run():
# Define your Google Cloud Storage paths
input_file = 'gs... | AyoubOulkadi/Real_time_Crypto_data_analytics_GCP | dataflow_etl.py | dataflow_etl.py | py | 735 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "apache_beam.Pipeline",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "apache_beam.io.ReadFromText",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "apache_beam.io",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "... |
10503012412 | from rest_framework import serializers
from ..models.subscriber import Subscriber
class SubscriberSerializer(serializers.ModelSerializer):
class Meta:
model = Subscriber
fields = [
"id",
"endpoint",
"public_key",
"auth_key",
"status",
... | anojkr/onboarding-project | push_notification/apps/subscriber/serializers/subscriber.py | subscriber.py | py | 486 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "rest_framework.serializers.ModelSerializer",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "models.subscriber.Subscriber",
"line_number": 7,
"usage_type": "... |
19886595790 | import os
import random
from typing import Tuple, Optional
from pathlib import Path
from pendulum import now as pendulum_now
from uuid import uuid4
from guardata.logging import configure_logging
from guardata.client import logged_client_factory
from guardata.api.data import (
UserProfile,
UserCertificateConten... | bitlogik/guardata | guardata/test_utils/organization.py | organization.py | py | 13,836 | python | en | code | 9 | github-code | 6 | [
{
"api_name": "pathlib.Path",
"line_number": 42,
"usage_type": "name"
},
{
"api_name": "guardata.client.types.BackendAddr",
"line_number": 43,
"usage_type": "name"
},
{
"api_name": "guardata.logging.configure_logging",
"line_number": 50,
"usage_type": "call"
},
{
... |
33599080724 | # -*- coding: utf-8 -*-
import numpy as np
import torch
import torch.nn as nn
import torch.utils.data as Data
import torchvision
import torchvision.models as models
import torchvision.transforms as transforms
import os
import PIL.Image as Image
NUM_CLASSES = 200
BATCH_SIZE = 32
DATASET_DIR = "./2021VRDL_HW1_datasets/... | angelalien/VRDL-HW1 | inference.py | inference.py | py | 2,284 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "torch.device",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "torchvision.mode... |
73049424508 | # -*- coding: utf-8 -*-
"""
@author: Nicolas Verrier
"""
import time
import os
# import matplotlib.pyplot as plt
import numpy as np
import FileTools as ft
import Retropropagation as rp
import manip
import napari
# Path to the parameter file, and parameters reading
# Data folders and config files
if os.name == 'nt': #... | madeba/MTD_transmission | Python_Tomo/PostTraitement.py | PostTraitement.py | py | 2,688 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "os.name",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "manip.Manip",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "FileTools.readvalue",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "FileTools.readvalue",
... |
8412855404 | import pandas as pd
import numpy as np
import seaborn as sns
from vgc_project import utils, gridutils
from msdm.domains import GridWorld
from vgc_project.modelinterface import create_modeling_interface
import json
from functools import lru_cache
from itertools import combinations, product
import warnings
from tqdm imp... | markkho/value-guided-construal | analyses/prep_data.py | prep_data.py | py | 26,970 | python | en | code | 20 | github-code | 6 | [
{
"api_name": "numpy.std",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.sqrt",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.sum",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.nan",
"line_number": 13,
... |
14387716618 | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
药品数量验证
'''
import UI.com_th_supcom_api.common.Utility as Utility
import UI.common_th_supcom_config.url_config as path
from sqlalchemy import func
from UI.com_th_supcom_pojo.pharm_re_portal_pojo import DmsPhamBasicInfo,DmsPhamStock,DmsPhamOrg
#根据药品信息查询药品数量
#pham_name : 药... | 1373822829/auto-test | UI/com_th_supcom_portal_dao/pharm_re_portal_dao/ApplyPharmVerify.py | ApplyPharmVerify.py | py | 2,280 | python | en | code | 4 | github-code | 6 | [
{
"api_name": "UI.com_th_supcom_pojo.pharm_re_portal_pojo.DmsPhamBasicInfo.PhamBasicInfo",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "UI.com_th_supcom_pojo.pharm_re_portal_pojo.DmsPhamBasicInfo",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "UI.com... |
32731945658 | from collections import deque
n = int(input())
card = deque([i for i in range(1, n+1)])
while(len(card) > 1):
card.popleft()
card.append(card.popleft())
print(card[0])
'''
n이 5일 때
card[0]제거하고 card[1]을 맨뒤card[5]로 옮기고
card[2]제거하고, card[3]을 card[6]으로 옮기고
card[4]제거 card[5] 를[7]로
card[6]제거 card[7] 남음
card[0]제거... | woo222/baekjoon | python/큐,스택/s4_2164_카드2.py | s4_2164_카드2.py | py | 1,149 | python | ko | code | 0 | github-code | 6 | [
{
"api_name": "collections.deque",
"line_number": 4,
"usage_type": "call"
}
] |
28233464040 | from flask import Flask, render_template, request, redirect, url_for, Response, jsonify, session
from decouple import config
import random
import requests
#PRUEBA OAUTH
from authlib.integrations.flask_client import OAuth
app=Flask(__name__)
#PRUEBA OAUTH
app.secret_key=config('LLAVE_SECRETA_APP')
oauth = OAuth(app)... | CASH8811121/RETO-MELI | app/app.py | app.py | py | 5,546 | python | es | code | 0 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "decouple.config",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "authlib.integrations.flask_client.OAuth",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "de... |
30097131013 | """ Full profile scraper class"""
import json
import logging
import os
import random
import urllib.request
from time import sleep
from urllib.parse import urlparse
import numpy as np
import pandas as pd
from scripts.argparser import ArgParser
from scripts.auxiliary.misc_aux import _finditem_nested_dict
... | ScrPzz/InstagramScraper | src/profile_scraper.py | profile_scraper.py | py | 7,817 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "logging.basicConfig",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "logging.CRITICAL",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "time.sleep",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "random.choice",
... |
28398925939 | import datetime
import os
from pathlib import Path
from threading import Thread, Event
from typing import Dict
from inotify_simple import flags, Event as INotifyEvent
from sync.misc.Config import ConfKey, config, SyncInfo
from sync.misc.FilesInformation import FilesInformation
from sync.misc.Logger import logger
from... | dpjl/termux-sync | sync/watch/DirectoryWatcherThread.py | DirectoryWatcherThread.py | py | 6,801 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "threading.Thread",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "sync.watch.INotifyThread.INotifyThread",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "sync.misc.Config.SyncInfo",
"line_number": 19,
"usage_type": "name"
},
{
... |
34862223977 | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as UserAdmin_
from django.contrib.auth.models import Group, User
from users.models import ObjectPermission, Token
from . import filters, forms, inlines
# Unregister the built-in GroupAdmin and UserAdmin classes so that we can use our cu... | Status-Page/Status-Page | statuspage/users/admin/__init__.py | __init__.py | py | 3,832 | python | en | code | 45 | github-code | 6 | [
{
"api_name": "django.contrib.admin.site.unregister",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.models.Group",
"line_number": 10,
"usage_type": "argument"
},
{
"api_name": "django.contrib.admin.site",
"line_number": 10,
"usage_type": "a... |
40285032570 | import numpy as np
from typing import List, Callable, Union
from functools import lru_cache
from .models import Photo, Orientation
def calc_score(p1: Photo, p2: Photo) -> int:
return min(p1 & p2, p1 - p2, p2 - p1)
@lru_cache(maxsize=2 ** 20)
def lazy_calc_score(p1: Photo, p2: Photo) -> int:
return calc_scor... | w9PcJLyb/Photo-Slideshow-Optimization | slideshow_optimization/utils.py | utils.py | py | 3,461 | python | en | code | 6 | github-code | 6 | [
{
"api_name": "models.Photo",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "models.Photo",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "functools.lru_cache",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "models.Photo",
"line... |
17512054890 | # -*- coding: utf-8 -*-
"""
Created on Sun Feb 12 20:29:20 2017
@author: haowen
"""
import numpy as np
import matplotlib.pyplot as plt
import random
def getDataSet(filename):
dataSet = open(filename, 'r')
dataSet = dataSet.readlines()
num = len(dataSet)
X = np.zeros((num,5))
... | hytsang/Machine-Learning-Foundations-and-Techniques | hw1_Q18.py | hw1_Q18.py | py | 1,833 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "numpy.zeros",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.float",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.float",
"line_number": ... |
12860385794 | from __future__ import print_function
from PIL import Image, ImageDraw, ImageFont, ImageFilter
import random
im = Image.open("C:/Users/wang/Pictures/Saved Pictures/test.jpg")
print(im.format, im.size, im.mode)
# im.show()
###在图片的右上角加上数字
def add_num(img):
draw = ImageDraw.Draw(img)
myfont = ImageFont.truetype(... | marquis007/learning-code | 00001图片数字添加.py | 00001图片数字添加.py | py | 1,049 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "PIL.Image.open",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "PIL.ImageDraw.Draw",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "PIL.ImageDraw",
"line_n... |
5609385824 | import numpy as np
from gym.envs.mujoco import mujoco_env
from gym import utils
def mass_center(model, sim):
mass = np.expand_dims(model.body_mass, 1)
xpos = sim.data.xipos
return (np.sum(mass * xpos, 0) / np.sum(mass))[0]
class SparseHumanoidEnv(mujoco_env.MujocoEnv, utils.EzPickle):
def __init__(sel... | pfnet-research/piekd | envs/humanoid.py | humanoid.py | py | 1,623 | python | en | code | 6 | github-code | 6 | [
{
"api_name": "numpy.expand_dims",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.sum",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "gym.envs.mujoco.mujoco_env.MujocoEnv",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "g... |
665082501 | import requests
from django.shortcuts import render
from datetime import datetime
from nkrsiSystem import settings
def index(request):
response = requests.get(
'https://graph.facebook.com/v6.0/nkrsiuj/posts?access_token={}'.format(settings.FACEBOOK_TOKEN))
result = response.json()
if 'data' not in... | Kanciarzek/NkrsiSystem | frontpage/views.py | views.py | py | 641 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.get",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "nkrsiSystem.settings.FACEBOOK_TOKEN",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "nkrsiSystem.settings",
"line_number": 9,
"usage_type": "name"
},
{
"api_name"... |
26794219955 | from django.test import TestCase
from django.shortcuts import reverse
from .views import FormularioCSV
# Create your tests here.
class TestForm(TestCase):
def testFormBien(self):
datos = {'csv': 'buggy', 'csv_paswd': 'flores00'}
form = FormularioCSV(datos)
self.assertTrue(form.is_valid())
... | 200095/Proyecto_CSV | CSV/tests.py | tests.py | py | 478 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.test.TestCase",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "views.FormularioCSV",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "views.FormularioCSV",
"line_number": 14,
"usage_type": "call"
}
] |
71882704188 | import json
import os
from time import sleep
import sys
path = "data/data.json"
if os.path.exists(path) is not True:
with open(path, "w") as file:
file.close()
class Erreurstorage(Exception):
"""
Class représentant l'absence ou un crash du stockage
Args:
Exception (raise): erreur d... | albator105/Fight-of-mighty | tool/storage.py | storage.py | py | 6,942 | python | fr | code | 0 | github-code | 6 | [
{
"api_name": "os.path.exists",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "json.loads",
"line_number": 74,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_numbe... |
21639112074 | import os
from random import sample
import config
import random
import shutil
# Traverse the directory
path, dirs, files = next(os.walk(config.inp_dir))
# I want to sample 100 MB, that's 100 million bytes.
sample_size = 100000000
sample_volume = 0
# This will be where the outputs are stored
dest = r'.\random_samples_o... | Adam-Grinbergs/text_sampler | sampler.py | sampler.py | py | 740 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.walk",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "config.inp_dir",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "random.randint",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_num... |
854197504 | import core.modules
import core.modules.module_registry
from core.modules.vistrails_module import Module, ModuleError
from scipy import sparse
import vtk
from Array import *
from Matrix import *
class ArrayUtilModule(object):
my_namespace = 'numpy|array|utilities'
class ArrayToVTKVectors(ArrayUtilModule, Module):... | VisTrails/VisTrails | contrib/NumSciPy/ArrayUtilities.py | ArrayUtilities.py | py | 10,063 | python | en | code | 100 | github-code | 6 | [
{
"api_name": "core.modules.vistrails_module.Module",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "vtk.vtkDoubleArray",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "core.modules.vistrails_module.Module",
"line_number": 64,
"usage_type": "name"
... |
30727650940 | import utils
import re
import math
lines = utils.readLines()
cng = []
for line in lines:
disc, positions, time, pos = map(int, re.findall(r'\d+', line))
# print(line, disc, positions, time, pos)
# print(f"x + {pos + disc} == 0 (mod {positions})")
# print(f"x = {(-pos-disc) % positions} (mod {position... | mdaw323/alg | adventofcode2016/15.py | 15.py | py | 895 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "utils.readLines",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_number": 10,
"usage_type": "call"
}
] |
22689401057 | import streamlit as st
import pandas as pd
from PIL import Image
#-------------------------------------------------------
tab_prod = pd.read_csv("df2_v3.csv")
df_data = pd.read_csv('donnes_labaled_type_produit.csv')
descriptif=[['gra','adouciss','nourr','apai','brill','protect','fondant','onctueux','vitamin','forte po... | Baxx95/my_llittle_care_render | app.py | app.py | py | 8,855 | python | fr | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 69,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_nu... |
35548884142 |
import matplotlib.pyplot as plt
import networkx as nx
import numpy as np
import sys
def printSplash():
print ('=============== BlaBibAnalyzer ===============')
print ('= Copyright (c) 2015 Pedro Belin Castellucci =')
print ('==============================================')
def printUsage():
print('... | pedrocastellucci/BlaBibAnalyzer | blaBibAnalyzer.py | blaBibAnalyzer.py | py | 5,483 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.array",
"line_number": 90,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 91,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.xticks",
"line_number": 94,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
... |
23361505579 | import time
import random
from selenium.common import TimeoutException
from selenium.webdriver import Keys
from selenium.webdriver.support.select import Select
from generator.generator import generated_color, generated_date
from locators.widgets_page_locators import AccordianPageLocators, AutoCompletePageLocators, Da... | TyukhteevAM/automation_qa_course-ARTVLAD- | pages/widgets_page.py | widgets_page.py | py | 9,324 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "pages.base_page.BasePage",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "locators.widgets_page_locators",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "locators.widgets_page_locators.AccordianPageLocators",
"line_number": 15,
"usage_... |
13262871603 | import csv
import datetime
import cv2
from face_recog import FaceRecognition
# Encode faces from a folder
sfr = FaceRecognition()
sfr.load_encoding_images("images/")
# Open CSV file to append data
with open('names.csv', mode='a', newline='') as names_file:
fieldnames = ['Name', 'Time']
csv_writer = csv.DictW... | ilkanates/ComputerVisionApplication_ML | main.py | main.py | py | 1,863 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "face_recog.FaceRecognition",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "csv.DictWriter",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "datetime.ti... |
21396266899 | from typing import Optional
from pydantic import BaseModel, Extra, validator
from racetrack_client.utils.quantity import Quantity
class Config(BaseModel, extra=Extra.forbid, arbitrary_types_allowed=True):
"""Configuration for Lifecycle server instance"""
# Log level: debug, info, warn, error
log_level: ... | TheRacetrack/racetrack | lifecycle/lifecycle/config/config.py | config.py | py | 2,437 | python | en | code | 27 | github-code | 6 | [
{
"api_name": "pydantic.BaseModel",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "pydantic.Extra.forbid",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "pydantic.Extra",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "racetrack_c... |
31162042833 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
from shutil import copy2
import matplotlib.pyplot as plt
import numpy as np
class Recorder:
def __init__(self, *args: str) -> None:
"""Need to input all string that will use as keys.
:param args: A string for key of dictionary.
"""
... | ninfueng/nsn | recorder.py | recorder.py | py | 5,439 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 49,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.grid",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "matpl... |
72082422587 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.shortcuts import render
import speech_recognition as sr
import numpy as np
import httplib, urllib, base64, json
from django.http import HttpResponse
import datetime
import json
import cStringIO as StringIO
from xhtml2pdf import pisa
from djan... | anujasaini/Note-Fi | notifyApp/views.py | views.py | py | 5,565 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "http.client.client.HTTPSConnection",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "http.client.client",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "http.client",
"line_number": 24,
"usage_type": "name"
},
{
"api_name":... |
17762378113 | """
Combining many stimuli (of multiple features) into a stimulus board that can
"""
from __future__ import annotations
import random, torch
from typing import Tuple, List
from copy import deepcopy
from purias_utils.multiitem_working_memory.stimuli import *
class Stimulus:
set_size: int = 1
num_feature_d... | puria-radmard/utils | multiitem_working_memory/stimulus_board.py | stimulus_board.py | py | 5,562 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "torch.zeros",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "copy.deepcopy",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "copy.deepcopy",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "torch.tensor",
"line_numb... |
20859789373 | import pygame
import pymunk
import pymunk.pygame_util
from classes.enemies.spawn import Spawn
from classes.structures.structures import Wall
from classes.player.player import Player
from classes.weapons.pistol import Pistol
from classes.weapons.knife import Knife
from classes.inventory.inventory import Inventor... | matej-kotrba/python-survival-game | main.py | main.py | py | 31,254 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "pygame.init",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pygame.time.Clock",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "pygame.time",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "pymunk.Space",
"li... |
23762014299 | import sqlite3
# db_name = the name of the database
def create_table_db(db_name):
# SQL statements
sql_drop_entries = '''
DELETE FROM uniqueMAC;
'''
sql_create_table = '''
CREATE TABLE IF NOT EXISTS uniqueMAC(
TX TEXT,
RX TEXT,
SNR REAL);
''' ... | pursuitdan/integration | db_utils.py | db_utils.py | py | 1,158 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sqlite3.connect",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect",
"line_number": 33,
"usage_type": "call"
}
] |
21211184181 | from collections import deque
def bfs():
q = deque()
q.append((home_x, home_y))
while q:
x, y = que.popleft()
if abs(x - festival_x) + abs(y - festival_y) <= 1000:
print("happy")
return
for i in range(n): #편의점들 확인
if not visited[i]: #편의점을 방문하지 않음... | kimkimj/Algorithm | python/BFS-DFS/walkingWithBeer.py | walkingWithBeer.py | py | 1,452 | python | ko | code | 0 | github-code | 6 | [
{
"api_name": "collections.deque",
"line_number": 4,
"usage_type": "call"
}
] |
25553624170 | # -*- coding: utf-8 -*-
from . import git
import setuptools.command.build_ext
import distutils.command.clean
from distutils.util import get_platform
from distutils.file_util import copy_file
from distutils.dir_util import copy_tree
import ast
import glob
import os, sys, shutil
import subprocess
def get_b... | moneytech/Benzina | scripts/utils.py | utils.py | py | 7,295 | python | en | code | null | github-code | 6 | [
{
"api_name": "distutils.util.get_platform",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "sys.version_info",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.pat... |
29182033424 | import os
import json
import random
from flask import Flask,request,jsonify,render_template,Response
import cv2
app = Flask(__name__)
basepath = os.path.dirname(__file__)
with open(basepath + '/static/relationships.json', 'r', encoding='utf-8') as f:
relationships = json.loads(f.read())
# for i... | Walterkd/Research-and-Projects | Image Retrival using Advanced Scene Graph/Data collection from web/main.py | main.py | py | 6,670 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "json.loads",
"line_number":... |
4789307150 | from urllib.request import urlopen
from urllib.parse import quote
from operator import itemgetter
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver.common.by import By
import time
import re
import csv
def getTopics(topics):
for topic in topics:
responses = topic.parent.... | K56KShhu/topics-doubanSpider | sample.py | sample.py | py | 3,164 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "urllib.request.urlopen",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "re.compile",
... |
13122865172 | import pandas as pd
from time import time
import re
import json
from matplotlib import pyplot as plt
from sklearn.model_selection import train_test_split
import nltk
from nltk.stem import PorterStemmer
from nltk.tokenize import word_tokenize
def get_main_label_names(json_path):
with open(json_path) as ... | DimitrisPatiniotis/Human-Value-Detection | Utils/loader.py | loader.py | py | 5,762 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "json.load",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 22... |
30299542752 | from django.urls import path,include
from.import views
urlpatterns = [
path("",views.home,name='home' ),
path("login/",views.login,name="login"),
path("signup/",views.signup,name="signup"),
path("courses/",views.courses,name="courses"),
path("student_pro/",views.student_pro,name="student... | Ashutosh010sharma/First | Test/onlinecource/app/urls.py | urls.py | py | 716 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.urls.path",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
31285565007 | #! /usr/bin/env python3
import os
import os.path
import urllib.parse
from requests_oauthlib import OAuth1Session
import nacl.utils
import base64
import nacl.public
import nacl.utils
import mimetypes
from http.cookies import SimpleCookie
import jinja2
from sendfile_osm_oauth_protector.oauth_data_cookie import OAuthDat... | geofabrik/sendfile_osm_oauth_protector | check_access.py | check_access.py | py | 12,883 | python | en | code | 4 | github-code | 6 | [
{
"api_name": "sendfile_osm_oauth_protector.config.Config",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "sendfile_osm_oauth_protector.key_manager.KeyManager",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "jinja2.__version__.split",
"line_number": 25,
... |
20211676982 | import cv2
import board
import neopixel
from time import sleep
np = neopixel.NeoPixel(board.D18, 60)
np.brightness = 0.5
def RGB(event, x, y, flags, param):
if event == cv2.EVENT_MOUSEMOVE :
colorsBGR = img[y, x]
colorsRGB=tuple(reversed(colorsBGR))
for i in range(60):
... | freedomwebtech/rpi-bullseye-rgb-colorpicker | m.py | m.py | py | 801 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "neopixel.NeoPixel",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "board.D18",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "cv2.EVENT_MOUSEMOVE",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "time.sleep",
... |
8367655332 | from flask import Flask, render_template, redirect
from flask import request
import forms
from operaciones import Calculadora
from agregarTxt import txt
from flask import make_response
from flask import flash
from flask_wtf import CSRFProtect
app=Flask(__name__)
app.config['SECRET_KEY']="esta es tu clave encriptada"
... | IDGS-901-20000557/IDGS801-Flask2 | app.py | app.py | py | 2,852 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask_wtf.CSRFProtect",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "flask.request... |
17177413464 | """
Kaming Yip
CS677 A1 Data Science with Python
Apr. 14, 2020
Assignment 11.1: k-means
"""
from pandas_datareader import data as web
import os
import pandas as pd
import numpy as np
from tabulate import tabulate
import matplotlib.pyplot as plt
from sklearn.preprocessing import StandardScaler
from sklearn.cluster impo... | KamingYip/Trading_Strategies_with_Stock_Data | k-means Clustering.py | k-means Clustering.py | py | 12,580 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "pandas_datareader.data.get_data_yahoo",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pandas_datareader.data",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "pandas.to_datetime",
"line_number": 30,
"usage_type": "call"
},
{
"a... |
10420031293 | from __future__ import annotations
import dataclasses
from PySide6 import QtGui, QtWidgets
from randovania.games.cave_story.layout.cs_cosmetic_patches import (
CSCosmeticPatches,
CSSong,
MusicRandoType,
MyChar,
SongGame,
)
from randovania.gui.dialog.base_cosmetic_patches_dialog import BaseCosmeti... | randovania/randovania | randovania/games/cave_story/gui/dialog/cs_cosmetic_patches_dialog.py | cs_cosmetic_patches_dialog.py | py | 4,563 | python | en | code | 165 | github-code | 6 | [
{
"api_name": "randovania.gui.dialog.base_cosmetic_patches_dialog.BaseCosmeticPatchesDialog",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "randovania.gui.generated.cs_cosmetic_patches_dialog_ui.Ui_CSCosmeticPatchesDialog",
"line_number": 20,
"usage_type": "name"
},
{
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.