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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
15900382814 | #!/usr/bin/env python3
"""Custom killing of apps."""
import sys
import i3ipc
from i3_helpers import sh
CTRL_Q = ['Slack', 'discord']
CUSTOM = ['Chromium', 'Brave-browser']
def _get_windows(i3, which='all', get_ws=False):
tree = i3.get_tree()
focused_win = tree.find_focused()
if which == 'focused':
... | petobens/dotfiles | arch/config/i3/custom_kill.py | custom_kill.py | py | 1,622 | python | en | code | 132 | github-code | 97 | [
{
"api_name": "i3_helpers.sh",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "i3_helpers.sh",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "i3ipc.Connection"... |
13681993569 | import sys
import json
from PyQt5 import Qsci
from PyQt5.QtWidgets import QApplication, QMainWindow, QTextEdit
from PyQt5.QtGui import QSyntaxHighlighter, QTextCharFormat, QFont
from PyQt5.QtCore import Qt, QRegExp
from gui import Ui_PyJaMa
class JsonSyntaxHighlighter(QSyntaxHighlighter):
def __init__(self, parent... | VikSn0w/PyJaMa | main.py | main.py | py | 2,147 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "PyQt5.QtGui.QSyntaxHighlighter",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtGui.QTextCharFormat",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtCore.Qt.darkBlue",
"line_number": 13,
"usage_type": "attribute"
},
... |
8572938517 | import os
import torch
from fairseq.tasks import FairseqTask, register_task
from sightseq.data import CocoDetectionDataset
from sightseq.data.coco_utils import ConvertCocoPolysToMask
import sightseq.data.transforms as T
@register_task('object_detection')
class ObjectDetectionTask(FairseqTask):
"""
Train a o... | zhiqwang/sightseq | sightseq/tasks/object_detection.py | object_detection.py | py | 3,610 | python | en | code | 122 | github-code | 97 | [
{
"api_name": "fairseq.tasks.FairseqTask",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "sightseq.data.coco_utils.ConvertCocoPolysToMask",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "sightseq.data.transforms.ToTensor",
"line_number": 52,
"usage_t... |
12355011232 | from .base_dataset import Base, BaseDataset, CenterCrop, RandCrop3D, RandomRotion, RandomIntensityChange, RandomFlip, NumpyType, Pad
from .base_dataset import make_image_label, normalization, label_processing
import torch
import glob
import numpy as np
import nibabel as nib
from torchvision.transforms import Compose
... | JalexDooo/NASBrainSeg | dataset/brain_dataset.py | brain_dataset.py | py | 2,714 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "base_dataset.BaseDataset",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "base_dataset.BaseDataset.__init__",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "base_dataset.BaseDataset",
"line_number": 14,
"usage_type": "name"
},
{
... |
12187666284 | # -*- coding: utf-8 -*-
"""
Created on Mon Aug 17 19:21:08 2020
@author: bmcma
"""
import rnn
import numpy as np
import torch
import matplotlib.pyplot as plt
import svcca.cca_core as cca_core
from sklearn.manifold import MDS
from sklearn.cluster import KMeans
from sklearn.mixture import GaussianMixture
from sklearn.m... | bmcmahan2016/RNN_Learning_Rules | svcca_analysis.py | svcca_analysis.py | py | 14,790 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "numpy.sum",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "numpy.linspace",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "numpy.matmul",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "numpy.ones",
"line_number":... |
40256425641 | #!/usr/bin/env python
# coding: utf-8
# In[75]:
import os
import math
import operator
import numpy as np
import random
import pandas as pd
import GLAD
import glob, operator
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
# In[2]:
music = pd.read_csv('music_mturk_answers.csv')
sentiment = pd.... | qxc101/EECS440_Final | Runzhi Zhou/test GLAD.py | test GLAD.py | py | 2,595 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pandas.read_csv",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.unique",
"l... |
6671452763 | from gurobipy import GRB, quicksum, Model
# Initialise empty data
Nodes = []
Arcs = []
Omega = None
FromNode = -1
EPS = 0.00001
FlowINF = 10000
# Read in the data
with open("Outmax_flow2.dat") as f:
while True:
l = f.readline().strip()
if l[0] == "n":
FromNode = len(Nodes)
... | hugs7/MATH3205 | Week 2/ArcMaintenance/ArcMaintenanceBendersAllTricks.py | ArcMaintenanceBendersAllTricks.py | py | 5,813 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "gurobipy.Model",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "gurobipy.GRB.MAXIMIZE",
"line_number": 66,
"usage_type": "attribute"
},
{
"api_name": "gurobipy.GRB",
"line_number": 66,
"usage_type": "name"
},
{
"api_name": "gurobipy.quick... |
74848288637 | import sys
import json
from pathlib import Path
from bisect import bisect
import itertools
import collections
import lingpy
import segments
from pylexirumah import get_dataset
tokenizer = segments.tokenizer.Tokenizer()
model=lingpy.data.model.Model("asjp")
def to_asjp(segments):
return lingpy.tokens2class(segment... | Anaphory/eval_cogident | code/dataset_properties.py | dataset_properties.py | py | 4,913 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "segments.tokenizer.Tokenizer",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "segments.tokenizer",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "lingpy.data.model.Model",
"line_number": 13,
"usage_type": "call"
},
{
"api_... |
72746129599 | from aiogram import Dispatcher, types
from aiogram.dispatcher import FSMContext
from aiogram.dispatcher.filters.state import State, StatesGroup
from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton, ReplyKeyboardRemove
from datetime import datetime
import logging
from database import memory_bot
from ot... | Vasbarn/edu2023 | Telega/Bot/handlers/common.py | common.py | py | 13,070 | python | ru | code | 0 | github-code | 97 | [
{
"api_name": "aiogram.dispatcher.filters.state.StatesGroup",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "aiogram.dispatcher.filters.state.State",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "aiogram.dispatcher.filters.state.State",
"line_number": 1... |
69882945598 | import torch
import torch.nn as nn
from mover.utils.camera import (
get_pitch_roll_euler_rotation_matrix,
)
### ground plane nformation
def set_ground_plane(self, ground_plane):
self.ground_plane.data.copy_(ground_plane)
# def get_ground_plane(self):
# verts = self.get_verts_object_parallel_ground()
# ... | yhw-yhw/MOVER | mover/scene_reconstruction/_util_gp_cam.py | _util_gp_cam.py | py | 1,887 | python | en | code | 86 | github-code | 97 | [
{
"api_name": "torch.Tensor",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "torch.Tensor",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "torch.Tensor",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "torch.matmul",
"line_numbe... |
72126990398 | # From baselines.bench.monitor.py. Here so the client outside docker does not need to install baselines.
# Only pandas, tkinter (sudo apt-get install python3-tk), numpy, matplotlib.
# cd ~/custom_roboschool/servorobots/servorobots/tools
# python3 plot_results.py --dirs /progress_1
from glob import glob
import os.path a... | charles-blouin/servorobots | servorobots/tools/plot_results.py | plot_results.py | py | 5,858 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "glob.glob",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "glob.glob",
"line_number": 14,
... |
71341472 | import logging
import math
import time
import warnings
from itertools import cycle, islice
import torch
import numpy as np
from PIL import Image
from torch.utils.data import Dataset
from torchvision import datasets
from torchvision import transforms
from sklearn.preprocessing import StandardScaler
from sklearn.dataset... | max-ng/megaboost | megaboost/data.py | data.py | py | 8,762 | python | en | code | 72 | github-code | 97 | [
{
"api_name": "torch.utils.data.Dataset",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "torch.LongTensor",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "torchvision.transforms.Compose",
"line_number": 47,
"usage_type": "call"
},
{
"api_name... |
31472373170 | from subprocess import call
from tkinter import filedialog
import subprocess
import requests
import os
import platform
class Application(object):
app = None
viewer = None
smbUser = ('user', 'password')
serverUrlWidget = None
versionsWidget = None
installPathWidget = None
runWidget = N... | edwino-stein/net-installer | src/Application.py | Application.py | py | 8,107 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "platform.architecture",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 116,
"usage_type": "call"
},
{
"api_name": "os.path.isfile",
"line_number": 165,
"usage_type": "call"
},
{
"api_name": "os.path",
"li... |
74140932157 | # -*- coding: utf-8 -*-
# Author : zenk
# 2013-07-05 20:32
from os import path
from collections import defaultdict
import re
from PyQt4.QtGui import QDialog
from PyQt4.QtGui import QFileDialog
from PyQt4.QtGui import QGridLayout
from PyQt4.QtGui import QLineEdit
from PyQt4.QtGui import QLabel
from PyQt4.Qt... | zjykzk/conf-tool | ui_replace_i18n.py | ui_replace_i18n.py | py | 2,958 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "PyQt4.QtGui.QDialog",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "PyQt4.QtGui.QGridLayout",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "PyQt4.QtGui.QLabel",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "PyQt4.... |
14899323527 | from loader import dp
from aiogram.types import Message
import game
import random
@dp.message_handler()
async def mes_help(message: Message):
if game.new_game:
for duel in game.total:
if message.from_user.id == duel[0]:
count = message.text
name = message.from... | halekt/Seminar_10_Python | handlers/take.py | take.py | py | 1,414 | python | ru | code | 0 | github-code | 97 | [
{
"api_name": "aiogram.types.Message",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "game.new_game",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "game.total",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "game.new_game"... |
41884720214 | import cv2
import numpy as np
import matplotlib.pyplot as plt
def region_of_interest(img, vertices):
mask = np.zeros_like(img)
# channel_count = img.shape[2]
match_mask_color = 255
cv2.fillPoly(mask, vertices, match_mask_color)
masked_image = cv2.bitwise_and(img, mask)
return masked_ima... | Abii9443/openCV | lane detection/lane_detection.py | lane_detection.py | py | 1,225 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.zeros_like",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.fillPoly",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "cv2.bitwise_and",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "cv2.line",
"line_numbe... |
31489780200 | from scipy.ndimage import zoom
from torchvision import transforms
from PIL import Image
from cv2 import cv2
import cv2
import numpy as np
import torch
def gaussian_filter(img, K_size=7, sigma=0.4):
if len(img.shape) == 3:
H, W, C = img.shape
else:
img = np.expand_dims(img, axis=-1)
H, ... | WangPing521/toy_experiments | weight_map.py | weight_map.py | py | 2,455 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.expand_dims",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.float",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "numpy.zeros",
"lin... |
1329675017 | import librosa
import numpy as np
import pandas as pd
from IPython.display import Audio
import os
import shutil
import skimage
import skimage.io
from PIL import Image
class Preprocess:
def __init__(self, hop_length=256, n_mels=80, win_size=128):
self.hop_length = hop_length
self.n_mels = n_mels
... | MLBurnham/speechsynth | audio processing/Preprocess.py | Preprocess.py | py | 4,412 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.asarray",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "numpy.sum",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "numpy.full",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "numpy.asarray",
"line_number":... |
2078423096 | import torch
from PIL import Image
from torchvision import transforms
import torchvision
from tqdm import tqdm
import argparse
from efficientnet_pytorch import EfficientNet
from onnxsim import simplify
import onnx
import rexnetv1
import osnet
from thop import profile, clever_format
import numpy as np
def argparser():... | ys-jo/test_imagenet | test.py | test.py | py | 8,866 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "torch.sum",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "torch.sum",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "torch.hub.load",
"lin... |
29334643659 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import pybullet as p
import tf.transformations as tt
import matplotlib.pyplot as plt
from scipy.stats import norm
import time
def addDebugFrame(pos, quat, length=0.2, lw=2, duration=0.2, pcid=0):
rot_mat = np.array(p.getMatrixFromQuaternion(quat)).r... | eaa3/pybullet_cloud | src/image_getter.py | image_getter.py | py | 8,243 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "numpy.array",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pybullet.getMatrixFromQuaternion",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pybullet.addUserDebugLine",
"line_number": 17,
"usage_type": "call"
},
{
"api_name":... |
26318529544 | import asyncio
import logging
from typing import Mapping, Optional
from opentrons.drivers.mag_deck import (
SimulatingDriver,
MagDeckDriver,
AbstractMagDeckDriver,
)
from opentrons.drivers.rpi_drivers.types import USBPort
from ..execution_manager import ExecutionManager
from . import update, mod_abc, types
... | Opentrons/opentrons | api/src/opentrons/hardware_control/modules/magdeck.py | magdeck.py | py | 7,060 | python | en | code | 363 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "opentrons.drivers.rpi_drivers.types.USBPort",
"line_number": 50,
"usage_type": "name"
},
{
"api_name": "execution_manager.ExecutionManager",
"line_number": 51,
"usage_type": "name... |
37332180440 | import itertools
filepath = '/home/bigdata/PycharmProjects/LDA/PyLDA/pubmed_bioontology/data/PreLresults.txt'
# convert the data into list
def read_words(words_file):
with open(words_file, 'r') as f:
return list(itertools.chain.from_iterable(line.split("\n") for line in f))
mylist = read_words(filepath... | VIJAYAYERUVA/Python | SourceCode/UniqueValues.py | UniqueValues.py | py | 787 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "itertools.chain.from_iterable",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "itertools.chain",
"line_number": 9,
"usage_type": "attribute"
}
] |
21368821978 |
from skimage.transform import hough_line, hough_line_peaks
from skimage.feature import canny
import matplotlib.pyplot as plt
from skimage.draw import line
from PIL import Image as im
from matplotlib import cm
from skimage import data
import numpy as np
import imageio
import sys
import os
class edgedetector:
''' A ... | AhmedFakhry47/LineDetection-Numpy-Implementation | line_detect.py | line_detect.py | py | 4,004 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.path.exists",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "numpy.array",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_nu... |
18551512350 | import numpy as np
import time
import datetime
# Creating 5x4 array
"""array1 = np.arange(1000)
array2 = np.arange(1000)
tempo_inicial = time.time()
for i in array1:
for j in array2:
print(i+j)
tempo_final = time.time()
resultado = tempo_final - tempo_inicial
print(round(resultado, 2))"""
time1... | bruno7598/Soulcode-Python-com-Banco-Dados | Ativi-array-lista/array-lista.py | array-lista.py | py | 556 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "datetime.datetime.now",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime.now",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "da... |
38464796871 | # -*- coding: utf-8 -*-
import sys
from os import path
import logging
import re
import numpy as np
from tqdm import tqdm
sys.path.append('./src/')
from utils import argparser as parser
from utils import utils
def get_covariances(embs_full, min_samples):
covs, var = {}, {}
for word, embs in embs_full.items():... | tpimentelms/lexical-ambiguity-in-context | src/h02_bert_embeddings/get_embeddings_covariances.py | get_embeddings_covariances.py | py | 1,798 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sys.path.append",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "numpy.cov",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.var",
"line_number": ... |
35862324010 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: gaopeng
# @Date: 2018-01-22 16:52:53
# @Last modified by: gaopeng
# @Last modified time: 2018-01-24 15:50:33
import logging; logging.basicConfig(level=logging.INFO)
import os, time
from datetime import datetime
from transwarp import db
from transwarp.web i... | gaopeng0108/workspace | framework-learning/pythonWorkspace/awesome-python-app/www/wsgiapp.py | wsgiapp.py | py | 1,437 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "logging.basicConfig",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "time.time",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.fromt... |
29793318216 | """Extended base functionality for Django framework."""
from __future__ import unicode_literals
__version__ = "0.2.2"
from django.utils.functional import lazy
from django.core.urlresolvers import reverse, reverse_lazy
from django.contrib.auth.models import Group
from django.conf import settings
from django.middlewa... | theduke/django-baseline | django_baseline/__init__.py | __init__.py | py | 1,576 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "django.middleware.csrf._get_new_csrf_key",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "django.middleware.csrf",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "django.conf.settings",
"line_number": 33,
"usage_type": "argument"
},
... |
33003577621 | from importlib.abc import MetaPathFinder
from _frozen_importlib_external import PathFinder
import sys
import pathlib
import warnings
from typing import List, Any, Union, Iterable
PYODIDE = True
try:
from js import XMLHttpRequest
except:
warnings.warn("Pyodide not found, running in native mode")
import req... | ryanking13/pyodide-importer | pyodide_importer/import_hook.py | import_hook.py | py | 5,080 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "warnings.warn",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "importlib.abc.MetaPathFinder",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "typing.Union",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "typing.List",... |
8457133938 | """
Main
"""
import json
from Modules.smb_client import SmbClient
from Modules.archive import Archive
from Modules.mail import Mail
CONFIG = "config.json"
client = SmbClient(CONFIG)
archive = Archive(CONFIG)
mail = Mail(CONFIG)
with open(CONFIG, encoding="utf8") as conf:
data = json.load(c... | YeriAddict/ArchivingTool | main.py | main.py | py | 1,102 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "Modules.smb_client.SmbClient",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "Modules.archive.Archive",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "Modules.mail.Mail",
"line_number": 15,
"usage_type": "call"
},
{
"api_name":... |
1078281063 | import tensorflow as tf
import matplotlib.pyplot as plt
import numpy as np
mnist= tf.keras.datasets.mnist
(x_train,y_train), (x_test,y_test) =mnist.load_data()
##### Normalize input features
x_train = tf.keras.utils.normalize(x_train,axis=1)
x_test = tf.keras.utils.normalize(x_test,axis=1)
##### Define NN Model
m... | ganjalipour/Deep-learning | TF_neuralnetwork.py | TF_neuralnetwork.py | py | 1,089 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "tensorflow.keras",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.keras.utils.normalize",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_n... |
17600990056 |
from flask import request
from flask import Blueprint
import pdb
from . import db
import face_recognition
import pickle
bpAñadir = Blueprint('anadir', __name__)
@bpAñadir.route('/add', methods = ['POST'])
def add():
if request.method == 'POST':
# Desde la parte de params de postman, usamos args
#... | drudiez/servicioReconocimiento | flaskr/añadirEmpleado.py | añadirEmpleado.py | py | 1,828 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask.Blueprint",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask.request.method",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "flask.request.... |
73010829438 | #=================================================
# external imports
#=================================================
from maya.OpenMaya import MGlobal
from pymel.core.animation import parentConstraint
from pymel.core.general import selected
from pymel.core.language import mel
import pymel.core.nodetypes as nt
#==... | jednano/maya-scripts | lava/core/general.py | general.py | py | 5,925 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "pymel.core.nodetypes.AimConstraint",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "pymel.core.nodetypes",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "pymel.core.nodetypes.Condition",
"line_number": 29,
"usage_type": "attribute... |
33495027214 | """microdatasets package installation metadata."""
from importlib.machinery import SourceFileLoader
from pathlib import Path
from setuptools import find_packages, setup
version = SourceFileLoader(
"microdatasets.version",
str(Path(__file__).parent / "src" / "microdatasets" / "version.py"),
).load_module()
w... | FragileTech/microdatasets | setup.py | setup.py | py | 1,671 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "importlib.machinery.SourceFileLoader",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "setupto... |
27606385870 | import pandas as pd
from datetime import datetime
shape = 1000000
time_lst = []
col_1_and_2 = [i for i in range(shape)]
col_3 = ["a" for i in range(shape)]
col_4 = ["b" for i in range(shape)]
col_5 = ["c" for i in range(shape)]
df_dict = {
"col_1": col_1_and_2,
"col_2": col_1_and_2,
"col_3": col_3,
"... | Yung-Hsin-Chen/Digital_Tools_for_Finance_HW | homework/week_5/generate_data.py | generate_data.py | py | 1,075 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pandas.DataFrame",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "datetime.dat... |
30784844144 | from main import app, db
from views import Form, feature_flag
from models.ticket import TicketType
from models.cfp import (
TalkProposal, WorkshopProposal,
InstallationProposal, ProposalDiversity,
)
from flask import (
render_template, redirect, request,
url_for, abort,
)
from flask.ext.login import cu... | alistairuk/Website | views/cfp.py | cfp.py | py | 4,546 | python | en | code | null | github-code | 97 | [
{
"api_name": "views.Form",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "wtforms.TextField",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "wtforms.TextField",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "wtforms.TextField",
... |
70136265598 | # -*- coding = utf-8 -*-
"""
author:fengxi
time:2023/2/17
project name:pnlp2023
file name:main.py
function:
chapter_1主方法:
数据加载、预处理
文本(短评)数据可视化
数据分析与可视化
"""
import jieba
import pandas as pd
from preprocessing import load_stopwords
from visualization_comm... | fengxi177/pnlp2023 | chapter_1/main_chapter_1.py | main_chapter_1.py | py | 2,945 | python | zh | code | 1 | github-code | 97 | [
{
"api_name": "jieba.load_userdict",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "preprocessing.load_stopwords",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "jieb... |
25518114700 | # -*- coding: utf-8 -*-
import os
import sys
import random
import numpy as np
import json
import time
import copy
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torchvision.transforms as T
import argparse
from torch_geometric.data import DataLoader
from tensorboard... | Sirui-Xu/Arena | examples/IL_evaluate.py | IL_evaluate.py | py | 2,640 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "torch.device",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "argparse.Argumen... |
35465549050 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 12 10:52:20 2020
@author: aadityabhatia
Info: This module builds a hierarchical structure for brands and products where
Brands/ foler has multiple brands and
each brand has multiple product folders.
Brand folders have brand csvs and product folde... | Aaditya-Bhatia/Search_Engine_Query-Advertisment_Management | src/advertisement_ai_analytics/1_build_files.py | 1_build_files.py | py | 3,111 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "spacy.load",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "nltk.corpus.stopwords.words",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "nltk.corpus.stopwords",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "string.p... |
9541755467 |
import matplotlib.pyplot as plt
import imageio
import numpy as np
import regex
from os import path
from .crop_images import crop
description = "Computes the Stokes images. It is computed from 6 images like " \
"PREFIX_aXX_SUFFIX.EXT where XX is 0, 45, 90, 135, Dex are Lev. " \
"FILENAME mu... | dmaluenda/pyHolo | scripts/get_stokes.py | get_stokes.py | py | 4,237 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "regex.finditer",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 50,
"usage_type": "name"
},
{
"api_name": "os.path.basename",
"line_n... |
40996982562 | #new - whole script added by instructor
from rest_framework import serializers
from rest_framework.validators import UniqueForYearValidator
from .models import Customer
class CustomerSerializer(serializers.ModelSerializer):
class Meta:
model = Customer
fields = ['pk', 'name', 'email', 'crea... | fbw-p22-e3-assignments/python-apis-create-ii-alj-b | dciproject/my_project/customer/serializers.py | serializers.py | py | 525 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "rest_framework.serializers.ModelSerializer",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "models.Customer",
"line_number": 9,
"usage_type": "name"
},
... |
30103884097 | from __future__ import absolute_import, division, print_function
import pathlib
import random
import tensorflow as tf
from tensorflow import keras
from sklearn.preprocessing import LabelBinarizer
from sklearn.model_selection import train_test_split
from sklearn.metrics import classification_report
import cv2
import ... | timothyuan/LAHacks | tensor.py | tensor.py | py | 2,939 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "tensorflow.enable_eager_execution",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.data",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name":... |
36032200201 | from actions.utils import create_action
from bookmarks.common.decorators import ajax_required
from bookmarks.common.utils import is_ajax
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.core.exceptions import ObjectDoesNotExist
from django.core.paginator import (... | Marcin-Chudzik/django-social-platform | bookmarks/images/views.py | views.py | py | 3,034 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "models.Image.objects.all",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "models.Image.objects",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "models.Image",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "djang... |
34169133147 | from ortools.linear_solver import pywraplp
from Components.Food import FoodItem, ListFoodItem, ConstraintList, Constraint
from Components.utils import update_json
import pandas as pd
import streamlit as st
import json
#Global variable
food_list = ListFoodItem([])
food_list.initialize_me()
constraint_list = Constrain... | Marcelo-Kenji-Noda/Optimization-App-Test | Pages/FoodMixes.py | FoodMixes.py | py | 4,245 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "Components.Food.ListFoodItem",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "Components.Food.ConstraintList",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "ortools.linear_solver.pywraplp.Solver.CreateSolver",
"line_number": 17,
"usag... |
19100770002 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# project = https://github.com/lowliness9/pytools.git
# author = lowliness9
# date: 2021-04-23
from concurrent.futures import ThreadPoolExecutor
import threading
import requests
import sys
import time
import os
requests.packages.urllib3.disable_warnings()
headers = {
... | lowliness9/weaponKu | proxyGoo/dynamicProxy.py | dynamicProxy.py | py | 3,236 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "requests.packages.urllib3.disable_warnings",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "requests.packages",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 20,
"usage_type": "attribute"
},
{
"a... |
38846004808 | import os
from cffi import FFI
from quanser.communications import PollFlag, BooleanProperty, Timeout, StreamError
# region Setup
ffi = FFI()
ffi.cdef("""
/* Type Definitions */
typedef char t_boolean;
typedef unsigned int t_uint;
typedef unsigned short t_ushort;
... | Astro-lyc/RL_simulate_PID | quanser/communications/stream.py | stream.py | py | 30,688 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "cffi.FFI",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "quanser.communications.StreamError",
"line_number": 201,
"usage_type": "call"
},
{
"api_name": "quanser.communications.StreamError",
"line_number": 247,
"usage_type": "call"
},
{
"... |
33783032068 | from django.dispatch import receiver
from django.db.models.signals import post_save
from users.models import Profile
from users.models import CustomUser
@receiver(post_save, sender=CustomUser)
def create_profile(sender, instance, created, **kwargs):
if created:
print('email'+instance.email)
Profil... | JustinDo720/PowerPetProApi | users/signals.py | signals.py | py | 700 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "users.models.Profile.objects.create",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "users.models.Profile.objects",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "users.models.Profile",
"line_number": 11,
"usage_type": "name"
},... |
9110553771 | from diffusers import DDPMPipeline
from PIL import Image
import os
image_pipe = DDPMPipeline.from_pretrained('cancer_diffusion_results')
image_pipe.to('cuda')
output_dir = 'output_cancer_images_512'
for i in range(300):
images = image_pipe().images
output_img_name = 'generated_cancer_' + str(i) + '.jpg'
images[0].... | qilei123/gastro_cancer_diffusion | generate_diffusion_cancer.py | generate_diffusion_cancer.py | py | 368 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "diffusers.DDPMPipeline.from_pretrained",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "diffusers.DDPMPipeline",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"line_number": 12,
"usage_type": "call"
},
{
"api_name... |
11410162181 | # ---------------------------------------------------------
# Utils Implementation
# Licensed under The MIT License [see LICENSE for details]
# Written by Cheng-Bin Jin
# Email: sbkim0407@gmail.com
# ---------------------------------------------------------
import os
import logging
import tensorflow as tf
import sys
... | kym343/Siamese-Network-TensorFlow | src/utils.py | utils.py | py | 1,260 | python | en | code | 7 | github-code | 97 | [
{
"api_name": "logging.Formatter",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "logging.FileHandler",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.path",
"lin... |
5176210927 | from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from models.product import Product
app = FastAPI()
app.add_middleware(
CORSMiddleware,
allow_origins=["http://localhost:3000"],
allow_methods=["*"],
allow_headers=["*"],
)
@app.get("/products")
def list_products():
return [fo... | tomasoak/e_commerce_microservice | inventory/main.py | main.py | py | 883 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "fastapi.FastAPI",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "fastapi.middleware.cors.CORSMiddleware",
"line_number": 9,
"usage_type": "argument"
},
{
"api_name": "models.product.Product.all_pks",
"line_number": 17,
"usage_type": "call"
},
... |
15377818069 | import streamlit as st
import pandas as pd
import numpy as np
import pickle
from sklearn.ensemble import RandomForestClassifier
def main():
from PIL import Image
#image_hospital = Image.open('head.png')
#st.sidebar.image(image_hospital)
image_ban = Image.open('head.png')
st.image(image_b... | Thara-PSU/ct-pedtbi-psu | python/app.py | app.py | py | 1,344 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "PIL.Image.open",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "streamlit.image",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "streamlit.write",
"line_... |
43402329448 | # Discord Packages
import discord
def easy_embed(self, ctx, big_embed: bool = False):
avatar = self.bot.user.avatar_url_as(format=None, static_format="png", size=1024)
embed = discord.Embed(colour=ctx.author.colour)
embed.set_footer(text=f"{ctx.author}", icon_url=ctx.author.avatar_url)
if big_embed:
... | Roxedus/Discord.py-BotBase | cogs/utils/defaults.py | defaults.py | py | 376 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "discord.Embed",
"line_number": 7,
"usage_type": "call"
}
] |
17921901709 | import requests
from bs4 import BeautifulSoup, NavigableString, Tag
import csv
section ="정치"
url = "https://news.naver.com/main/main.nhn"
section_dict = { "정치" : 100,
"경제" : 101,
"사회" : 102,
"생활" : 103,
"세계" : 104,
"과... | cmin427/web | 5_news/news_2.py | news_2.py | py | 745 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 16,
"usage_type": "call"
}
] |
71411116798 | from __future__ import print_function
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
def dilation_layer(cell,inputs,rate, batch_size, state):
n_steps = len(inputs)
if rate < 0 or rate >= n_steps:
raise ValueError('The rate variable nee... | ujjax/dilated-lstm | DRNN.py | DRNN.py | py | 3,255 | python | en | code | 7 | github-code | 97 | [
{
"api_name": "torch.zeros_like",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "torch.cat",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "torch.split",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "torch.split",
"line_number... |
74684583997 | import numpy as np
from PIL import Image
import pandas as pd
SAVE_PATH = 'data/test/neut'
FILE_NAME = 'neutralized_reactions.tsv'
def get_labels(FILE_NAME):
labels = np.asarray(pd.read_csv(FILE_NAME, delimiter='\t', header=(0), encoding='utf-8'))
return labels
def convert_smiles(smiles):
smiles_bin = []
... | justkittenaround/CHEM | test_images.py | test_images.py | py | 1,856 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.asarray",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "numpy.eye",
"line_numbe... |
8736060043 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # 计算NCD余额变动 # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
import pandas as pd
import Tools.DateHelper as dh
import Tools.DataBaseHelper as DB
import sqlalchemy
import time
impor... | weidk/trade-api | jobs/NCDBalance.py | NCDBalance.py | py | 2,831 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "warnings.simplefilter",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "Tools.DataBaseHelper.getEngine",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "Tools.DataBaseHelper",
"line_number": 13,
"usage_type": "name"
},
{
"api_nam... |
6215936309 | __author__ = 'Agostino Sturaro'
import os
import networkx as nx
import matplotlib.pyplot as plt
import shared_functions as sf
def arrange_nodes(G, pos_by_node):
for node, (x, y) in pos_by_node.items():
G.node[node]['x'] = float(x)
G.node[node]['y'] = float(y)
output_dir = 'C:/Users/Agostino/Docum... | TiedNets/TiedNets | draw_single_step.py | draw_single_step.py | py | 2,848 | python | en | code | 40 | github-code | 97 | [
{
"api_name": "networkx.read_graphml",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "networkx.read_graphml",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "networkx.read_graphml",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "net... |
25327748777 | import os
import pytest
from django.urls import reverse
from bitcaster.agents.handlers.imap import ImapAgent
from bitcaster.utils.reflect import fqn
pytestmark = pytest.mark.django_db
def test_monitor_list(django_app, monitor1, user1):
application = monitor1.application
organization = application.organizat... | bitcaster-io/bitcaster | tests/web/views/application/monitors/test_monitors.py | test_monitors.py | py | 3,925 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "pytest.mark",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "django.urls.reverse",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "django.urls.reverse",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "django.urls.r... |
4207593033 | from setuptools import setup, find_packages
def find_version(filepath):
"""
Find project version in a given file
The syntax for the file version need to be in the form
__version__ = 'a.b.c'
which follows the semantic versioning http://semver.org/
* a : major version
* b : minor version
... | aboucaud/pypher | setup.py | setup.py | py | 1,897 | python | en | code | 48 | github-code | 97 | [
{
"api_name": "setuptools.setup",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",
"line_number": 43,
"usage_type": "call"
}
] |
921488988 | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import sys
import os
import pdb
import warnings
import io
# from comet_ml import Experiment
import matplotlib.pyplot as plt
import numpy as np
from tqdm import tqdm
from sklearn.model_selection import train_test_split
from sklearn.metrics import jaccard_score, f1_scor... | mattesko/CompNet-Medical | src/experiment_chaos_bottle.py | experiment_chaos_bottle.py | py | 10,934 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.path.join",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 44,
"usage_type": "attribute"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 82,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"l... |
17323801646 | import argparse
import logging
from settings import GITHUB_USER_TOKEN
from client import authorize, create_pull_request, AUTHORIZED_REPOSITORY
parser = argparse.ArgumentParser(description="")
parser.add_argument("--title", required=True, help="Pull Request Title")
parser.add_argument("--description", required=True, he... | jazlopez/py-pull-request-manager | create_pull_request.py | create_pull_request.py | py | 1,921 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "logging.basicConfig",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "logging.... |
654450044 | from simpful import *
from copy import deepcopy
# A simple dynamic fuzzy model of the repressilator
# Create a fuzzy reasoner object
FS = FuzzySystem()
# Define fuzzy sets and linguistic variables
LV = AutoTriangle(2, terms=['low', 'high'])
FS.add_linguistic_variable("LacI", LV)
FS.add_linguistic_variable("TetR", LV)... | aresio/simpful | examples/example_dynamic_fuzzy_model_repressilator.py | example_dynamic_fuzzy_model_repressilator.py | py | 1,666 | python | en | code | 102 | github-code | 97 | [
{
"api_name": "copy.deepcopy",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 51,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyp... |
7155327353 | from shapely.geometry import Polygon,Point
from .sampling import *
from scipy.spatial import Delaunay
import matplotlib.pyplot as plt
import torch
def Circle(center:tuple,r:float,num_points = 1024):
return Point(center).buffer(r,num_points)
def Rectangle(coords: list,create_from = 'corners'):
'''
Create a... | Johnnny-suu/torch_DE | src/geometry/shapes.py | shapes.py | py | 6,309 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "shapely.geometry.Point",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "shapely.geometry.Polygon",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "shapely.geometry.Polygon",
"line_number": 40,
"usage_type": "name"
},
{
"api_name"... |
15308870683 | import functools
import logging
import os
from itertools import permutations, combinations
from collections import defaultdict
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.contrib.auth.views import logout as base_logout
from django.core.exceptions import Permiss... | leaalex/dtrace | isle/views.py | views.py | py | 38,651 | python | en | code | null | github-code | 97 | [
{
"api_name": "django.shortcuts.render",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "django.urls.reverse",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.views.logout",
"line_number": 37,
"usage_type": "call"
},
{
"api_... |
36748794720 | # -*- coding: utf-8 -*-
"""
Created on Wed Jan 6 17:08:56 2021
@author: tpngu28
Code to calculate the dominant connection length
Input:
1.Raster layer of water depth
2.Raster layer of discharge in x and y directions
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import... | chinguyen193/Dynamic-Connection-Length | Dominant_connection_length.py | Dominant_connection_length.py | py | 4,570 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.zeros",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "numpy.where",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": ... |
32327486547 | from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
def home(request):
return render(request, './first_app/home.html', {'name': 'Tanver Rana Sobur', 'age': 19, 'marks': 90, 'courses': [
{
'id': 1,
'course': 'C',
'teacher': ... | tanverrana/django-fourth-project | first_app/views.py | views.py | py | 823 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.shortcuts.render",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 27,
"usage_type": "call"
}
] |
21055751626 | #!/usr/bin/env python
import cms
from setuptools import find_packages, setup
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="django-simplecms",
description="Simple Django CMS",
version=cms.__version__,
author="Jaap Joris Vens",
author_email="cms@jj.rtts.eu",
ur... | rtts/django-simplecms | setup.py | setup.py | py | 1,120 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "setuptools.setup",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "cms.__version__",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "setuptools.find_packages",
"line_number": 17,
"usage_type": "call"
}
] |
26320122024 | """Tests for opentrons.protocol_reader.role_analyzer.RoleAnalyzer."""
import pytest
from typing import List, Union
from opentrons.protocols.api_support.types import APIVersion
from opentrons.protocol_reader.file_reader_writer import BufferedFile
from opentrons.protocol_reader.file_identifier import (
IdentifiedFi... | Opentrons/opentrons | api/tests/opentrons/protocol_reader/test_role_analyzer.py | test_role_analyzer.py | py | 6,630 | python | en | code | 363 | github-code | 97 | [
{
"api_name": "opentrons.protocol_reader.file_identifier.IdentifiedPythonMain",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "opentrons.protocol_reader.file_reader_writer.BufferedFile",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "opentrons.protocols.api_... |
40939053408 | from __future__ import annotations
from ctypes import c_int16
from multiprocessing import Process, Semaphore, Value
from typing import Dict
from PyQt6.QtCore import QObject, pyqtSignal, pyqtSlot, QThread
from aplikacja_alpha.main import Rodzaj
from aplikacja_alpha.main import klasyfikuj as funkcja_analizujaca
class... | MariuszAKS/Projekt_IO | gui/logika/wielowatkowosc/analiza.py | analiza.py | py | 1,648 | python | pl | code | 0 | github-code | 97 | [
{
"api_name": "PyQt6.QtCore.QObject",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "PyQt6.QtCore.pyqtSignal",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "PyQt6.QtCore.pyqtSignal",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "... |
33212039170 | import yt_dlp
import os
import base64
class Downloader():
def __init__(self, url: str, mp3_dir :str, webm_dir :str):
self.url = url
self.mp3_dir = mp3_dir
self.webm_dir = webm_dir
with yt_dlp.YoutubeDL() as ydl:
info = ydl.extract_info(url, download=False)
... | aaatipamula/ytdl | discord_bot/downloader.py | downloader.py | py | 1,858 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "yt_dlp.YoutubeDL",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "base64.urlsafe_b64encode",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.chdir",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.getcwd",
"l... |
28843352822 | from datetime import datetime
import ftplib
from gzip import open as gopen
import logging
import MySQLdb
import os
import settings
import time
import urllib.request as urllib_request
import xml.etree.ElementTree as ET
class PubChemScraper:
"""
Scrape PubChem website for compound names and synonyms, populating... | ODonoghueLab/Aquaria-Tagger | chemscraper/pubchem_scraper.py | pubchem_scraper.py | py | 8,147 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "datetime.datetime.now",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "logging.info",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "MySQLdb.connect"... |
70322398718 | from collections import namedtuple
import threading
import time
import signal
import sys
import types
import sys
class Channel(object):
def __init__(self,name='default'):
self.name = name
self.__stop = False
self.__items = []
self._jobs = 0
self.__lock = threading.Lock()
... | BitTheByte/Helpers | threader_v2.py | threader_v2.py | py | 2,211 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "threading.Lock",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sys.exit",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "collections.namedtuple",
"line... |
42465988870 | #!/usr/bin/env python
from setuptools import setup
version_ns = {}
with open('findjava.py') as f:
for line in f:
if line.startswith('__version__'):
exec(line, version_ns)
break
setup(
name='findjava',
version=version_ns['__version__'],
py_modules=['findjava'],
desc... | AbdealiLoKo/findjava | setup.py | setup.py | py | 698 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "setuptools.setup",
"line_number": 12,
"usage_type": "call"
}
] |
8228128858 | import ast
from common import util
def extract(compressed_text):
codes, encoded_bytes = compressed_text.split(b'\n', 1)
codes = ast.literal_eval(codes.decode())
codes = {v: k for k, v in codes.items()}
return codes, encoded_bytes
def decode(encoded_text, codes):
decoded_text = str()
current... | arinanda/huffman-code-implementation-webapps | storage/compressor/huffman/tunstall/decompress.py | decompress.py | py | 925 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "ast.literal_eval",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "common.util.load_file_as_byte",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "common.util",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "common.util... |
43199465829 | #----------------------------------------------------------------------------
# IMPORTING MODULES
#----------------------------------------------------------------------------
from __future__ import print_function, division
import torch
import torch.nn as nn
import torch.optim as optim
from skimage import io, transf... | vlgiitr/Group-Level-Emotion-Recognition | GlobalCNN_DenseNet161_EmotiC_lr001.py | GlobalCNN_DenseNet161_EmotiC_lr001.py | py | 10,117 | python | en | code | 79 | github-code | 97 | [
{
"api_name": "PIL.ImageFile.LOAD_TRUNCATED_IMAGES",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "PIL.ImageFile",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 31,
"usage_type": "call"
},
{
"ap... |
17541360820 | import git
from . import repo
from warnings import warn
def git_config(section, option):
result = None
if repo is not None:
try:
result = repo.config_reader().get(section, option)
except git.exc.NoOptionError:
warn("No '{}.{}' git configuration found for this repo".... | jackmaney/pypt | pypt/git_utils/git_config.py | git_config.py | py | 394 | python | en | code | 10 | github-code | 97 | [
{
"api_name": "git.exc",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "warnings.warn",
"line_number": 16,
"usage_type": "call"
}
] |
1083502393 | from selenium.webdriver.common.by import By
from .base import FunctionalTest
class LayoutStylingTest(FunctionalTest):
def test_bootstrap_links_loaded_successfully(self):
self.browser.get(self.live_server_url)
links = [link.get_attribute("href")
for link in self.browser.find_ele... | kevgathuku/compshop | tests/functional/test_layout_and_styling.py | test_layout_and_styling.py | py | 885 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "base.FunctionalTest",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.common.by.By.TAG_NAME",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "selenium.webdriver.common.by.By",
"line_number": 12,
"usage_type": "name... |
6655979927 | import os
from typing import (
Dict,
List,
Optional,
Sequence,
TypeVar,
)
from fdk_rdf_parser.classes import (
Reference,
ReferenceDataCode,
)
base_url = os.getenv(
"FDK_REFERENCE_DATA_BASE_URI",
"https://www.staging.fellesdatakatalog.digdir.no",
)
def reference_data_url(endpoint... | Informasjonsforvaltning/fdk-rdf-parser | src/fdk_rdf_parser/reference_data/utils.py | utils.py | py | 2,357 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "os.getenv",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "typing.Optional",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "fdk_rdf_parser.classes.Referenc... |
4972448808 | from rest_framework.decorators import api_view
from django.http import JsonResponse
from api.models import BestPossible
from django.forms.models import model_to_dict
import json
@api_view(['GET'])
def view(request):
results = []
overall_total = 0
for best in BestPossible.objects.order_by('week').all():
... | kcincode/pickems-py | api/stats/best.py | best.py | py | 1,136 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "api.models.BestPossible.objects.order_by",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "api.models.BestPossible.objects",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "api.models.BestPossible",
"line_number": 12,
"usage_type": ... |
25167255231 | from django.db import models
# Create your models here.
# Un destino es un lugar al que se puede viajar, pero sin incluir los datos respecto al viaje, como precio, etc...
class Destino(models.Model):
lugar = models.CharField(max_length=100)
descripcion = models.TextField()
distancia = models.IntegerField()
def ... | i32jiura/PW | Examen 2014 Febrero/Django/AgenciaViajes/viajes/models.py | models.py | py | 1,196 | python | es | code | 1 | github-code | 97 | [
{
"api_name": "django.db.models.Model",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "... |
73305210559 | from models import mnist_models as mnist
import training_runner as base_runner
import callback_utilities
import utilities as util
import tarantella as tnt
import tensorflow as tf
import enum
import pytest
setup_save_path = callback_utilities.setup_save_path
class CallbackWrapper(enum.Enum):
NONE = 0,
DEFAULT = 1... | cc-hpc-itwm/tarantella | test/python/callbacks/user_defined_callback.py | user_defined_callback.py | py | 5,705 | python | en | code | 12 | github-code | 97 | [
{
"api_name": "callback_utilities.setup_save_path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "enum.Enum",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.keras",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_... |
18540945947 | import PySimpleGUI as Sg # PySimpleGUI Call Reference: https://www.pysimplegui.org/en/latest/call%20reference/
# ----- Theme Variables -----
# Colour Generator: http://colormind.io/bootstrap/
colours = {"light": "#A6A4A6",
"light_accent": "#ADA88D",
"main": "#E46F1C",
"dark_accent": ... | bleichnitz/LPN | GUI_01/working_with_class_data_GUI.py | working_with_class_data_GUI.py | py | 9,685 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "PySimpleGUI.Text",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "PySimpleGUI.Radio",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "PySimpleGUI.Text",
"line_number": 67,
"usage_type": "call"
},
{
"api_name": "PySimpleGUI.Text"... |
3546275396 | import os
import platform
import logging
logging.basicConfig(level=os.getenv("LOG_LEVEL", logging.INFO))
LOGGER = logging.getLogger(__name__)
def get_genesis_path():
if platform.system() == "Windows":
txn_path = os.path.realpath("./genesis")
else:
txn_path = "/home/indy/genesis"
txn_path... | nrempel/von-personal-agent | server/indy_config.py | indy_config.py | py | 643 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.basicConfig",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
... |
43356341287 | #!/usr/bin/python3
'''
This started out life as a practical example of setting up an AWS SSM Automation task, but this doesn't do that anymore.
Convert all GP2 volumes to GP3 volumes
'''
import boto3
from botocore.exceptions import ClientError
def tags_to_dict(resource):
'''Convert the Tags structure into a pyth... | pgmac/aws_helpers | gp2_to_gp3.py | gp2_to_gp3.py | py | 1,884 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "boto3.client",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "boto3.client",
"line_number": 46,
"usage_type": "call"
}
] |
17833104727 | import random
from direct.showbase.DirectObject import DirectObject
import Globals
from hood.places.Hood import Hood
SpawnPoints = [
[-0.7, 62, 0.08, 182, 0, 0],
[-1, -30, 0.06, 183, 0, 0],
[-13, -120, 0, 307, 0, 0],
[16.4, -120, 0, 65, 0, 0],
[-0.5, -90, 0, 182, 0, 0],
[-30, -25, -0.373, 326, ... | SamGoodin/Toontown | hood/places/GoofySpeedway.py | GoofySpeedway.py | py | 2,818 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "direct.showbase.DirectObject.DirectObject",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "hood.places.Hood.Hood",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "direct.showbase.DirectObject.DirectObject.__init__",
"line_number": 19,
"... |
31037911274 | #!/usr/bin/env python
# Written by gpt-4, fixed by Deniz Yuret
# See https://huggingface.co/docs/datasets/load_hub for documentation
from datasets import list_datasets
import requests
# Get the list of datasets
dataset_list = list_datasets()
print(f"{len(dataset_list)} datasets:")
# Function to get the size of a dat... | denizyuret/play | llm/list_datasets.py | list_datasets.py | py | 988 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "datasets.list_datasets",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 16,
"usage_type": "call"
}
] |
1867432872 | from django.views.generic import ListView
from .models import Menu, MenuItem
class MenuItemListView(ListView):
model = Menu
template_name = "templates/base.html"
class MenuByMenuItemView(ListView):
context_object_name = 'menu_items'
template_name = 'templates/menu.html'
def get_queryset(self):
... | AdelaYa/tree_menu | tree_menu/views.py | views.py | py | 1,045 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.views.generic.ListView",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "models.Menu",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "django.views.generic.ListView",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": ... |
5487863519 | '''
This module defines backends, which are provider-specific functions,
returning url to user avatar by uid.
'''
import urllib2
import json
import gevent
from gevent.coros import Semaphore
from cache import enable_cache
from log import enable_logging
@enable_cache('twitter')
@enable_logging
def twitter(uid):
' ... | staaas/avatr | src/backends.py | backends.py | py | 1,265 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "urllib2.urlopen",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "cache.enable_cache",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "log.enable_logging",
... |
6889326702 | # Blur torchvision Dataset
from torch.utils.data import TensorDataset
import torch
import cv2
import numpy as np
import sys
# Set random seed
# SEED = 0
# torch.manual_seed(SEED)
# np.random.seed(SEED)
def dataset_blur(dataset, min_sigma=0, max_sigma=3, normalise=True):
"""Return numpy array of blurred torchvi... | RussellTsuchida/deq-glm | code/lib/data_deblur.py | data_deblur.py | py | 1,300 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "numpy.zeros_like",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "cv2.GaussianBlur",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.random.uniform",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.random",... |
30342990158 | from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLabel, QLineEdit, QSpacerItem, QSizePolicy, QPushButton, \
QMessageBox, QGridLayout
#####################################################################
### QUESTA CLASSE SERVE PER MOSTRARE ALL'UTENTE L'INTERFACCIA ###
### DI SCARICO DI UN ARTICOLO... | Progetto-Ingegneria-del-Software/Progetto | listaarticoli/view/Vista_scarico_articolo.py | Vista_scarico_articolo.py | py | 4,170 | python | it | code | 0 | github-code | 97 | [
{
"api_name": "PyQt5.QtWidgets.QWidget",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtWidgets.QVBoxLayout",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets.QGridLayout",
"line_number": 18,
"usage_type": "call"
},
{
"ap... |
11770310182 | """
Handles all thing config
"""
from discord.commands import slash_command
from discord.ext import commands
import discord
import guildreader
def isauthor(author):
"""Makes sure they're the command invoker"""
def check(message) -> bool:
return message.author == author
return check
class Config... | redmoogle/Rednako | commands/settings.py | settings.py | py | 3,358 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "discord.ext",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "discord.ext",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "discord.Role",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "discord.commands.... |
44994855226 | from bs4 import BeautifulSoup
import requests
import re
import csv
import random
from time import sleep
print('Searching patents:')
phrase1='phytoene'
pubNum=[]
with open('results.csv','r') as csv_file_read:
csv_reader=csv.reader(csv_file_read)
for line in csv_reader:
print(line[0])
pubNum.app... | cmoshec/python-patent-search | patentsClaim1.py | patentsClaim1.py | py | 1,820 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "csv.reader",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "csv.writer",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_numb... |
990549438 | import typer
from git import Repo
import os
from pathlib import Path
from enum import Enum
import openshift as oc
import yaml
import re
import time
import base64
########################################################################################################################
# Common printout functions
#######... | rampadc/otp-cli | otp_cli/main.py | main.py | py | 7,762 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "typer.secho",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "typer.colors",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "typer.secho",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "typer.colors",
"line_nu... |
39954613019 | from pathlib import Path
from unittest.mock import Mock
import pytest
from antarest.core.config import Config, StorageConfig
from antarest.launcher.extensions.adequacy_patch.extension import AdequacyPatchExtension
from tests.helpers import with_db_context
@with_db_context
def test_hooks(tmp_path: Path):
study_s... | AntaresSimulatorTeam/AntaREST | tests/launcher/test_extension_adequacy_patch.py | test_extension_adequacy_patch.py | py | 1,519 | python | en | code | 10 | github-code | 97 | [
{
"api_name": "pathlib.Path",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "unittest.mock.Mock",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "antarest.launcher.extensions.adequacy_patch.extension.AdequacyPatchExtension",
"line_number": 14,
"usage_... |
22127447628 | import argparse
import os
from base64 import b64encode
template = """from base64 import b64decode
def main():
data = "{encoded}"
script = b64decode(data.encode("utf-8")).decode("utf-8")
exec(script)
if __name__ == "__main__":
main()
"""
def encode_file(python_content: str) -> str:
global temp... | evjeny/python_basic_lessons | convert_unsafe.py | convert_unsafe.py | py | 1,050 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "base64.b64encode",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number":... |
42995636459 | import json
import keras
import tensorflow as tf
from keras import backend as K
from keras.layers import Conv2D,regularizers,Input,MaxPooling2D,UpSampling2D,Dropout,concatenate,ZeroPadding2D,Conv2DTranspose
from keras.utils.vis_utils import model_to_dot,plot_model
from keras.engine.base_layer import Layer
from keras ... | RFKxavieryang/NewWaterShed | model_pred.py | model_pred.py | py | 14,716 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "keras.engine.base_layer.Layer",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "tensorflow.shape",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "tensorflow.shape",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "keras... |
4481682468 | import logging
logger = logging.getLogger(__name__)
import sys
import os
import json
import requests
from requests.exceptions import Timeout, ReadTimeout, ConnectionError
import time
import threading
import concurrent.futures
import collections
import binascii
import hashlib
from dogepartylib.lib import config, script... | coinwarp/dogeparty-lib | dogepartylib/lib/backend/addrindex.py | addrindex.py | py | 10,532 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "dogepartylib.lib.util.DictCache",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "dogepartylib.lib.util",
"line_number": 17,
"usage_type": "name"
},
{
"api_name":... |
13132808630 | import http
import http.client
import json
import threading
import sys
import queue
from enum import Enum
from ..version import __version__
from ..proxy import Proxy
from .stringextension import StringExtension
from .httpendpoint import HttpEndpoint
from .injectionresponseparser import InjectionResponseParser
from .s... | socketlabs/socketlabs-python | socketlabs/injectionapi/core/httprequest.py | httprequest.py | py | 5,773 | python | en | code | 12 | github-code | 97 | [
{
"api_name": "enum.Enum",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "httpendpoint.HttpEndpoint",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "stringextension.StringExtension.is_none_or_white_space",
"line_number": 50,
"usage_type": "call"
},... |
34311638617 | #! venv/bin/python3
"""a little bot for send paom at One houre to Discord Chanell
"""
import logging
from json import loads
from typing import AnyStr, Dict
from discord.ext import commands
from discord import Intents
from requests import get
TOKEN="TOKEN"
intents = Intents.default()
intents.message_content = True
bo... | mmdbalkhi/poem-bot | bot/main.py | main.py | py | 1,220 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "discord.Intents.default",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "discord.Intents",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "discord.ext.commands.Bot",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "disc... |
71597392959 | from __future__ import annotations
# TODO: RF and move all paths related functions from datalad.utils in here
import os
import os.path as op
# to not pollute API importing as _
from collections import defaultdict as _defaultdict
from collections.abc import (
Iterable,
Iterator,
)
from functools import wraps
fr... | datalad/datalad | datalad/support/path.py | path.py | py | 10,176 | python | en | code | 464 | github-code | 97 | [
{
"api_name": "utils.ensure_bytes",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "functools.wraps",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line_number": 42,
"usage_type": "attribute"
},
{
"api_name": "os.path",
... |
39226588693 | import navis
import requests
import warnings
import cloudvolume as cv
import numpy as np
import pandas as pd
import trimesh as tm
from abc import ABC
from io import StringIO, BytesIO
from ..utils import make_iterable
use_pbars = True
class OnDemandDict(dict):
"""Initialized with a just a URL.
Will fetch ... | navis-org/fafbseg-py | fafbseg/spine/base.py | base.py | py | 25,569 | python | en | code | 11 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 69,
"usage_type": "call"
},
{
"api_name": "abc.ABC",
"line_number": 74,
"usage_type": "name"
},
{
"api_name": "utils.make_iterable",
"line_num... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.