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
12009423058
from __future__ import annotations from dataclasses import fields from typing import Tuple import numpy as np from napari.layers import Image def update_layer_contrast_limits( layer: Image, contrast_limits_quantiles: Tuple[float, float] = (0.01, 0.98), contrast_limits_range_quantiles: Tuple[float, float...
bkntr/napari-brainways
src/napari_brainways/utils.py
utils.py
py
1,473
python
en
code
6
github-code
6
[ { "api_name": "napari.layers.Image", "line_number": 11, "usage_type": "name" }, { "api_name": "typing.Tuple", "line_number": 12, "usage_type": "name" }, { "api_name": "typing.Tuple", "line_number": 13, "usage_type": "name" }, { "api_name": "numpy.quantile", "l...
24270752412
import numpy as np import matplotlib.pyplot as plt import os import torch import torchvision import numpy as np from torchvision import transforms from sklearn.metrics import precision_recall_curve, average_precision_score, auc, roc_auc_score, roc_curve import matplotlib.pyplot as plt from config import * import random...
dhaivat1729/detectron2_CL
generative_classifier/maha_dist_analysis.py
maha_dist_analysis.py
py
4,431
python
en
code
0
github-code
6
[ { "api_name": "numpy.load", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.load", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.load", "line_number": 15, "usage_type": "call" }, { "api_name": "torch.manual_seed", "line_number...
74957082106
# Sinw wave plot tool import numpy as np import matplotlib.pyplot as plt f =0.5 #frequency of sine wave # f =2 A =5# maximum amplitude of sine wave # A = 1 x = np.arange(-6.28, 6.28, 0.01)# array arranged from -pi to +pi and with small increment of 0.01 # x = np.arange(-3.14, 3.14, 0.01) #y = A*np.sin(f*x) y = A*np.ta...
dilshad-geol/IRIS-2022-Seismology-Skill-Building-Workshop
00_UNIX_DataFiles/python/numpy/sine.py
sine.py
py
397
python
en
code
0
github-code
6
[ { "api_name": "numpy.arange", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.tan", "line_number": 11, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.plot", "line_number": 12, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", ...
12643025727
from playsound import playsound import os import pandas as pd path = "audio/" # path to the dataset files = os.listdir(path) df = pd.DataFrame([], columns = ["file_name", "label"]) for file, i in zip(files, range(len(files))): print("Currently playing " + file) playsound(path + file) label = input("Please, provid...
Barsegh-A/audio-labelling
script.py
script.py
py
556
python
en
code
0
github-code
6
[ { "api_name": "os.listdir", "line_number": 6, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 8, "usage_type": "call" }, { "api_name": "playsound.playsound", "line_number": 12, "usage_type": "call" } ]
27250989956
import torch.nn.functional as F import torch.nn as nn import torch filters = torch.tensor([[[[2, 0, 0], [1, 0, 1], [0, 3, 0]], [[1, 0, 1], [0, 0, 0], [1, 1, 0]], [[0...
moon-hotel/DeepLearningWithMe
Archived/02_ConvolutionalNN/01_CNNOP/01_CnnOpSingleFilter.py
01_CnnOpSingleFilter.py
py
1,225
python
en
code
116
github-code
6
[ { "api_name": "torch.tensor", "line_number": 5, "usage_type": "call" }, { "api_name": "torch.tensor", "line_number": 15, "usage_type": "call" }, { "api_name": "torch.tensor", "line_number": 20, "usage_type": "call" }, { "api_name": "torch.nn.functional.conv2d", ...
33153414975
import dgl import torch import torch.nn as nn import torch.nn.functional as F import math import dgl.function as fn from dgl.nn.pytorch import edge_softmax class GCNLayer(nn.Module): def __init__(self, in_feats, out_feats, activation, dropout, ...
raspberryice/ala-gcn
layers.py
layers.py
py
21,424
python
en
code
21
github-code
6
[ { "api_name": "torch.nn.Module", "line_number": 8, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 8, "usage_type": "name" }, { "api_name": "torch.nn.Parameter", "line_number": 16, "usage_type": "call" }, { "api_name": "torch.nn", "line_n...
50777891
from typing import List class Solution: def dailyTemperatures(self, temperatures: List[int]) -> List[int]: ans = [0] * len(temperatures) stack = [0] for i in range(1, len(temperatures)): if temperatures[i] <= temperatures[stack[-1]]: # if temp is not larger, jus...
code-cp/leetcode
solutions/739/main.py
main.py
py
802
python
en
code
0
github-code
6
[ { "api_name": "typing.List", "line_number": 4, "usage_type": "name" } ]
34405330102
import matplotlib.pyplot as plt import numpy as np import os, tkinter, tkinter.filedialog, tkinter.messagebox # show the file selection filedialog root = tkinter.Tk() root.withdraw() fTyp = [('','*')] iDir = os.path.abspath(os.path.dirname(__file__)) # tkinter.messagebox.showinfo('簡易プロットプログラムです','どのフォルダのcsvでグラフを作る?') ...
kobashin/GHz-ultrasonic
easy_plot.py
easy_plot.py
py
1,071
python
ja
code
1
github-code
6
[ { "api_name": "tkinter.Tk", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path.abspath", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_numb...
38840281994
from django.shortcuts import render, get_object_or_404, redirect, HttpResponse from django.contrib.auth.decorators import login_required from account.models import User from product.models import Product from .models import Message, MessageRoom @login_required def check_message_room(request, product_id): product ...
bishwopr/creative-poultry
messaging/views.py
views.py
py
2,261
python
en
code
0
github-code
6
[ { "api_name": "product.models", "line_number": 10, "usage_type": "name" }, { "api_name": "django.shortcuts.get_object_or_404", "line_number": 10, "usage_type": "call" }, { "api_name": "product.models.Product", "line_number": 10, "usage_type": "argument" }, { "api_...
27082622973
from fastapi import APIRouter, Depends, HTTPException from ...celery.tasks import ExcelParser from ..crud.dishes_crud import DishesCrud from ..crud.menu_crud import MenuCrud from ..crud.submenu_crud import SubmenuCrud parser_router = APIRouter(prefix='/parser', tags=['Parser']) @parser_router.post('/parse-excel') a...
puplishe/testproject
fastapi1/api/routes/excel_router.py
excel_router.py
py
756
python
en
code
0
github-code
6
[ { "api_name": "fastapi.APIRouter", "line_number": 8, "usage_type": "call" }, { "api_name": "crud.menu_crud.MenuCrud", "line_number": 13, "usage_type": "name" }, { "api_name": "crud.submenu_crud.SubmenuCrud", "line_number": 14, "usage_type": "name" }, { "api_name":...
45635574383
from typing import Dict, List, Optional, Tuple import torch import torch.nn as nn import torch.nn.functional as F from .conv_tasnet import TCN, GatedTCN from .lobe.activation import get_activation from .lobe.norm import get_norm from .lobe.rnn import FSMN, ConditionFSMN class Unet(nn.Module): """ Generic_Ar...
mcw519/PureSound
puresound/nnet/unet.py
unet.py
py
26,136
python
en
code
4
github-code
6
[ { "api_name": "torch.nn.Module", "line_number": 13, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 13, "usage_type": "name" }, { "api_name": "typing.Tuple", "line_number": 42, "usage_type": "name" }, { "api_name": "typing.Tuple", "line_n...
30338109347
from collections import deque n, k = map(int, input().split()) graph = [[] * (k+1) for _ in range(k+1)] gmap = [[] * (n+1) for _ in range(n+1)] for i in range(1, n+1): arr = list(map(int, input().split())) gmap[i] = arr for j, m in zip(arr, range(1, n+1)): if j != 0: graph[j].append((i, ...
minju7346/CordingTest
bfs3.py
bfs3.py
py
944
python
en
code
0
github-code
6
[ { "api_name": "collections.deque", "line_number": 18, "usage_type": "call" } ]
8310320668
from stevedore import extension class Extensions: """Lazy singleton container for stevedore extensions. Loads each namespace when requested for the first time. """ _managers = {} def __init__(self): raise NotImplementedError() @classmethod def get(cls, namespace, name): ...
dwtcourses/SHARE
share/util/extensions.py
extensions.py
py
658
python
en
code
null
github-code
6
[ { "api_name": "stevedore.extension.ExtensionManager", "line_number": 24, "usage_type": "call" }, { "api_name": "stevedore.extension", "line_number": 24, "usage_type": "name" } ]
17202898458
#!/usr/bin/env python import robot import time from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTClient import json import logging def send_json(data): msg = {'action':data} msg = json.dumps(msg) return (msg) def action(client, userdata, message): data = message.payload.decode() data = json.loads(data) data = da...
mkyle1121/gopigo
web/robot_sock_client2.py
robot_sock_client2.py
py
2,084
python
en
code
0
github-code
6
[ { "api_name": "json.dumps", "line_number": 11, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 16, "usage_type": "call" }, { "api_name": "robot.forward", "line_number": 21, "usage_type": "call" }, { "api_name": "robot.stop", "line_number": 2...
2075941699
import pandas as pd from datetime import datetime import os def get_csv(source): try: df = pd.read_csv('data/' + source + '.csv') except (OSError, IOError) as e: df = pd.DataFrame() print(e) return df; def get_status(source_name): return ''; def set_status(source_name, status)...
shodnebo/datafetch
csv_helper.py
csv_helper.py
py
1,729
python
en
code
0
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 7, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 9, "usage_type": "call" }, { "api_name": "pandas.concat", "line_number": 26, "usage_type": "call" }, { "api_name": "os.path.exists", "li...
44248042853
import cv2 import numpy as np import glob import uuid import caffe import skimage.io from util import histogram_equalization from scipy.ndimage import zoom from skimage.transform import resize import random import cv2 import numpy as np from matplotlib import pyplot as plt import dlib from project_face import frontaliz...
juanzdev/TeethClassifierCNN
src/mouth_detector_opencv.py
mouth_detector_opencv.py
py
3,870
python
en
code
3
github-code
6
[ { "api_name": "cv2.CascadeClassifier", "line_number": 23, "usage_type": "call" }, { "api_name": "cv2.CascadeClassifier", "line_number": 24, "usage_type": "call" }, { "api_name": "cv2.CascadeClassifier", "line_number": 25, "usage_type": "call" }, { "api_name": "dli...
40650003765
import re import requests from selenium import webdriver from xvfbwrapper import Xvfb from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.keys import Keys from selenium.common ...
Foxonn/ytgrabber
ytgrabber.py
ytgrabber.py
py
3,726
python
ru
code
0
github-code
6
[ { "api_name": "re.match", "line_number": 26, "usage_type": "call" }, { "api_name": "re.match", "line_number": 29, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 37, "usage_type": "call" }, { "api_name": "selenium.webdriver.support.ui.WebDrive...
45356075426
import numpy as np from PyQt5.QtCore import QSize from PyQt5.QtGui import QIcon, QColor from PyQt5.QtWidgets import QListWidgetItem, QPushButton from LGEprocess.flags_LGE import * from skimage import exposure, img_as_float import torch.utils.data as Datas from LGEprocess import Network as Network import nibabel as nib ...
JefferyCYH/pyqt_medical
LGEprocess/listWidgetItems_LGE.py
listWidgetItems_LGE.py
py
6,988
python
en
code
0
github-code
6
[ { "api_name": "os.environ", "line_number": 14, "usage_type": "attribute" }, { "api_name": "torch.device", "line_number": 15, "usage_type": "call" }, { "api_name": "torch.__version__", "line_number": 16, "usage_type": "attribute" }, { "api_name": "torch.utils.data....
19579927717
from pymongo import MongoClient from flask import Flask, jsonify from flask_cors import CORS app = Flask(__name__) CORS(app) @app.route("/") def hello(): new_list = [] client = MongoClient() db = client.variables variables = db.variables cursor = variables.find({}) # print(variables) for ...
OlzyInnovation/DaveBot_Forex
server.py
server.py
py
2,308
python
en
code
0
github-code
6
[ { "api_name": "flask.Flask", "line_number": 6, "usage_type": "call" }, { "api_name": "flask_cors.CORS", "line_number": 7, "usage_type": "call" }, { "api_name": "pymongo.MongoClient", "line_number": 12, "usage_type": "call" }, { "api_name": "flask.jsonify", "li...
3660394854
import sqlite3 conn=sqlite3.connect("Stationary_inventt.db") c = conn.cursor() print(" database successful") #using drop table to avoid duplicate copy c.execute("DROP TABLE IF EXISTS Stationery_stock") c.execute(""" CREATE TABLE Stationery_stock( ITEM_ID INTEGER, ITEMS TEXT, COST_PRICE INTEGER, QUANTITY_IN_STOCK INTEG...
debbytech22/module-5-solutions
Lesson_3_solution.py
Lesson_3_solution.py
py
1,271
python
en
code
0
github-code
6
[ { "api_name": "sqlite3.connect", "line_number": 2, "usage_type": "call" } ]
21204997139
# -*- coding: utf-8 -*- """ This is a prototype script. """ import numpy as np from PIL import Image from PIL import ImageEnhance from scipy.ndimage import gaussian_filter import cv2 from skimage import io as ip frame_rate = 24 #output frame rate vidcap = cv2.VideoCapture('video9.mov') success,image...
PindareTech/video-modding-script
editing_script.py
editing_script.py
py
3,414
python
en
code
0
github-code
6
[ { "api_name": "cv2.VideoCapture", "line_number": 16, "usage_type": "call" }, { "api_name": "cv2.imwrite", "line_number": 21, "usage_type": "call" }, { "api_name": "PIL.Image.open", "line_number": 26, "usage_type": "call" }, { "api_name": "PIL.Image", "line_num...
194935106
from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework.reverse import reverse from rest_framework import serializers from rest_framework import generics from rest_framework import viewsets from rest_framework.decorators import detail_route, list_route from rest_f...
xmaruto/mcord
xos/core/xoslib/methods/cordsubscriber.py
cordsubscriber.py
py
17,144
python
en
code
0
github-code
6
[ { "api_name": "rest_framework.serializers", "line_number": 21, "usage_type": "argument" }, { "api_name": "rest_framework.serializers.ReadOnlyField", "line_number": 23, "usage_type": "attribute" }, { "api_name": "rest_framework.serializers", "line_number": 23, "usage_type"...
40224803539
import sys from PyQt6.QtWidgets import QApplication, QWidget, QLabel from PyQt6.QtGui import QPixmap, QFont class MainWindow(QWidget): def __init__(self): """constructor for Empty windows """ super().__init__() self.initializeUI() def initializeUI(self): """Set up the applicati...
grant-Gan/programing_learn
pyqt6_learn/ch2-Building_a_simple_GUI/user_profile.py
user_profile.py
py
2,148
python
en
code
0
github-code
6
[ { "api_name": "PyQt6.QtWidgets.QWidget", "line_number": 5, "usage_type": "name" }, { "api_name": "PyQt6.QtWidgets.QLabel", "line_number": 24, "usage_type": "call" }, { "api_name": "PyQt6.QtGui.QPixmap", "line_number": 25, "usage_type": "call" }, { "api_name": "PyQ...
29582028401
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). import logging from odoo import api, models, _ _logger = logging.getLogger(__name__) class AccountInvoice(models.Model): _inherit = 'account.invoice' @api.multi def action_auto_open(self): return_item = super(AccountInvoice, self).a...
OdooNodrizaTech/slack
slack_sale_orders_generate_invoice/models/account_invoice.py
account_invoice.py
py
2,180
python
en
code
0
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 4, "usage_type": "call" }, { "api_name": "odoo.models.Model", "line_number": 7, "usage_type": "attribute" }, { "api_name": "odoo.models", "line_number": 7, "usage_type": "name" }, { "api_name": "odoo.api.multi", ...
33942211702
import uvicorn import datetime from loguru import logger from fastapi import FastAPI from sqlalchemy import select from fastapi.middleware.cors import CORSMiddleware from SAGIRIBOT.ORM.AsyncORM import orm from SAGIRIBOT.Core.AppCore import AppCore from SAGIRIBOT.command_parse.Commands import * from SAGIRIBOT.ORM.Async...
m310n/sagiri-bot
WebManager/web_manager.py
web_manager.py
py
3,231
python
en
code
null
github-code
6
[ { "api_name": "fastapi.FastAPI", "line_number": 13, "usage_type": "call" }, { "api_name": "fastapi.middleware.cors.CORSMiddleware", "line_number": 18, "usage_type": "argument" }, { "api_name": "SAGIRIBOT.ORM.AsyncORM.orm.fetchall", "line_number": 28, "usage_type": "call" ...
43953915570
from flask import Flask, request, abort from linebot import ( LineBotApi, WebhookHandler ) from linebot.exceptions import ( InvalidSignatureError ) from linebot.models import * # My Code from util import * app = Flask(__name__) # Channel Access Token line_bot_api = LineBotApi('++7wQ1tXdLomUPrrUbvcKEE12HAh+e...
asianpwnage422/myLineBot
line-bot-kevin/app.py
app.py
py
2,208
python
en
code
0
github-code
6
[ { "api_name": "flask.Flask", "line_number": 14, "usage_type": "call" }, { "api_name": "linebot.LineBotApi", "line_number": 17, "usage_type": "call" }, { "api_name": "linebot.WebhookHandler", "line_number": 19, "usage_type": "call" }, { "api_name": "flask.request.h...
15915660899
"""initial Revision ID: 977a56225963 Revises: None Create Date: 2016-09-24 22:05:55.701455 """ # revision identifiers, used by Alembic. revision = '977a56225963' down_revision = None from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - please adjust! ### o...
cloudiirain/Website
migrations/versions/977a56225963_.py
977a56225963_.py
py
1,139
python
en
code
null
github-code
6
[ { "api_name": "alembic.op.create_table", "line_number": 19, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 19, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 20, "usage_type": "call" }, { "api_name": "sqlalchemy.Integ...
72000465789
from __future__ import absolute_import from __future__ import division from __future__ import print_function import copy import datetime import locale import os from tqdm import tqdm from collections import * from typing import Optional,List,Tuple from trident.backend.common import * from trident.backend.pytorch_op...
AllanYiin/trident
trident/models/pytorch_embedded.py
pytorch_embedded.py
py
9,944
python
en
code
74
github-code
6
[ { "api_name": "trident.context._context", "line_number": 23, "usage_type": "call" }, { "api_name": "trident.context", "line_number": 23, "usage_type": "name" }, { "api_name": "os.path.join", "line_number": 28, "usage_type": "call" }, { "api_name": "os.path", "...
11160464439
from django.db import models from book_archive.models import Genre from config.models import User class BookRequest(models.Model): title = models.CharField('Наименование', max_length=128) author = models.CharField('Автор', max_length=128, null=True, blank=True) genre = models.ForeignKey(Genre, on_delete=...
SliceOfMind/thesombot_web
book_request/models.py
models.py
py
989
python
en
code
0
github-code
6
[ { "api_name": "django.db.models.Model", "line_number": 7, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 7, "usage_type": "name" }, { "api_name": "django.db.models.CharField", "line_number": 8, "usage_type": "call" }, { "api_name": "...
8655579477
from torch import nn import torch import utils import cv2 import numpy as np import supervisely_lib as sly def inference(model: nn.Module, input_height, input_width, image_path, device=None): with torch.no_grad(): model.eval() image = sly.image.read(image_path) # RGB input = utils.prepare_image_i...
supervisely-ecosystem/unet
custom_net/inference.py
inference.py
py
1,728
python
en
code
2
github-code
6
[ { "api_name": "torch.nn.Module", "line_number": 9, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 9, "usage_type": "name" }, { "api_name": "torch.no_grad", "line_number": 10, "usage_type": "call" }, { "api_name": "supervisely_lib.image.read"...
16013407471
import cv2 import numpy as np import matplotlib.pyplot as plt img=cv2.imread('/home/hasantha/Desktop/repos/old-yolov4-deepsort-master/data/download2.png' ,0) #img=img[423:998,806:1408] ret, bw_img = cv2.threshold(img, 200, 255, cv2.THRESH_BINARY) #165 kernel = np.ones((1,1),np.uint8) #erosion = cv2.erode(img,kernel,i...
hasantha-nirmal/Traffic_Violation_Detection_Yolov4_Deep-Sort
lane_line_extract3.py
lane_line_extract3.py
py
850
python
en
code
23
github-code
6
[ { "api_name": "cv2.imread", "line_number": 5, "usage_type": "call" }, { "api_name": "cv2.threshold", "line_number": 8, "usage_type": "call" }, { "api_name": "cv2.THRESH_BINARY", "line_number": 8, "usage_type": "attribute" }, { "api_name": "numpy.ones", "line_n...
37349408
"""See `TestSet` for an example.""" from typing import Type, MutableSet from tests.collection_testing import unordered_equal class MutableSetTests: mutable_set: Type = None @classmethod def create_mutable_set(cls) -> MutableSet: return cls.mutable_set() @staticmethod def get_element(i):...
BlackHC/mamo
tests/collection_testing/test_mutable_set.py
test_mutable_set.py
py
2,179
python
en
code
0
github-code
6
[ { "api_name": "typing.Type", "line_number": 8, "usage_type": "name" }, { "api_name": "typing.MutableSet", "line_number": 11, "usage_type": "name" }, { "api_name": "tests.collection_testing.unordered_equal", "line_number": 73, "usage_type": "call" }, { "api_name": ...
32347991199
import cv2 as cv import numpy as np def nothing(x): pass cap= cv.VideoCapture('pranay1.avi') fourcc= cv.VideoWriter_fourcc('X', 'V', 'I', 'D') out= cv.VideoWriter('final1.avi', fourcc, 20.0, (640,480) ) #cv.namedWindow('Tracking') #cv.createTrackbar('l_h', 'Tracking', 0, 255, nothing) #cv.createTrackbar('l_s', 'Tr...
pranayvarmas/Virtual-Keyboard
Mini-Projects/Invisible Cloak.py
Invisible Cloak.py
py
1,721
python
en
code
0
github-code
6
[ { "api_name": "cv2.VideoCapture", "line_number": 6, "usage_type": "call" }, { "api_name": "cv2.VideoWriter_fourcc", "line_number": 7, "usage_type": "call" }, { "api_name": "cv2.VideoWriter", "line_number": 8, "usage_type": "call" }, { "api_name": "cv2.resize", ...
20497360293
import random from datetime import datetime ALPHABET = 'abcdefghijklmnopqrstuvwxyz' conteudo = 'There are many variations of passages of Lorem Ipsum available, but the ' \ 'majority have suffered alteration in some form, by injected humour, or randomised ' \ 'words which look even slightly believ...
Adriano1976/Curso-de-Python
Secao11-Django-com-Python-Projetos/Projeto-Blog/posts-generator.py
posts-generator.py
py
1,787
python
pt
code
0
github-code
6
[ { "api_name": "datetime.datetime.now", "line_number": 10, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 10, "usage_type": "name" }, { "api_name": "random.choices", "line_number": 19, "usage_type": "call" }, { "api_name": "random.randint...
855819574
#!/usr/bin/env python # # This example creates a polygonal model of a cone, and then renders it to # the screen. It will rotate the cone 360 degrees and then exit. The basic # setup of source -> mapper -> actor -> renderer -> renderwindow is # typical of most VTK programs. # # # First we include the VTK Python packag...
VisTrails/VisTrails
examples/vtk_examples/Tutorial/Step1/Cone.py
Cone.py
py
2,362
python
en
code
100
github-code
6
[ { "api_name": "vtk.vtkConeSource", "line_number": 22, "usage_type": "call" }, { "api_name": "vtk.vtkPolyDataMapper", "line_number": 34, "usage_type": "call" }, { "api_name": "vtk.vtkActor", "line_number": 43, "usage_type": "call" }, { "api_name": "vtk.vtkRenderer"...
32506954132
import csv import numpy as np import os import pydicom from segmentation_models.backbones import get_preprocessing import tensorflow as tf from pneumothorax_segmentation.constants import image_size, folder_path from pneumothorax_segmentation.data_augment import apply_random_data_augment from pneumothorax_segmentation....
benoitkoenig/pneumothorax-segmentation
preprocess.py
preprocess.py
py
4,252
python
en
code
0
github-code
6
[ { "api_name": "segmentation_models.backbones.get_preprocessing", "line_number": 14, "usage_type": "call" }, { "api_name": "os.walk", "line_number": 20, "usage_type": "call" }, { "api_name": "pneumothorax_segmentation.constants.folder_path", "line_number": 20, "usage_type"...
39459918108
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.home, name='index'), # url(r'^games/(?P<steamid>[0-9]+)$', views.games, name='games'), url(r'^home/$', views.home, name='home'), url(r'^games/', views.games, name='games'), url(r'^friends/', views.friends, name=...
ryanchesler/allauth_django
core/urls.py
urls.py
py
401
python
en
code
0
github-code
6
[ { "api_name": "django.conf.urls.url", "line_number": 7, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 9, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 10, "usage_type": "call" }, { "api_name": "django.c...
44399481784
import gym from collections import deque import numpy as np import time import torch torch.manual_seed(0) # set random seed import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.distributions import Categorical from policy import Policy from gym.wrappers.monitoring.video_recorder...
david-wb/acrobot-v1
train.py
train.py
py
1,870
python
en
code
2
github-code
6
[ { "api_name": "torch.manual_seed", "line_number": 7, "usage_type": "call" }, { "api_name": "gym.make", "line_number": 15, "usage_type": "call" }, { "api_name": "torch.device", "line_number": 20, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", ...
29943421716
import argparse import yaml from pyspark.sql.functions import udf, when, year class CreateSqlInput: def __init__(self): self.name = 'CalculateStats' @staticmethod @udf def extract_production(dict_string): try: production_array = yaml.load(dict_string, Loader=yaml.FullLoade...
richierichard99/TrueFilmIngest
tfi_etl/CreateSqlInput.py
CreateSqlInput.py
py
2,302
python
en
code
0
github-code
6
[ { "api_name": "yaml.load", "line_number": 14, "usage_type": "call" }, { "api_name": "yaml.FullLoader", "line_number": 14, "usage_type": "attribute" }, { "api_name": "pyspark.sql.functions.udf", "line_number": 11, "usage_type": "name" }, { "api_name": "pyspark.sql....
33671678331
from __future__ import annotations from datetime import datetime from datetime import timedelta from unittest.mock import MagicMock import pytest from common.reddit_client import RedditClient from prawcore.exceptions import Forbidden from requests import Response @pytest.fixture def reddit_client(): return Redd...
kelvinou01/university-subreddits
tests/unit/test_reddit_client.py
test_reddit_client.py
py
2,642
python
en
code
0
github-code
6
[ { "api_name": "common.reddit_client.RedditClient", "line_number": 15, "usage_type": "call" }, { "api_name": "pytest.fixture", "line_number": 13, "usage_type": "attribute" }, { "api_name": "unittest.mock.MagicMock", "line_number": 24, "usage_type": "call" }, { "api...
35031048423
from celery import Celery from celery.schedules import crontab app = Celery( "vivaldi", broker_url="redis://localhost:6379/0", result_backend="redis://localhost:6379/0", imports=["tasks"], task_serializer="json", result_serializer="json", accept_content=["json"], timezone="Europe/Lisbon...
miccaldas/celery_and_friends
celery_and_friends/vivaldi/__init__.py
__init__.py
py
525
python
en
code
0
github-code
6
[ { "api_name": "celery.Celery", "line_number": 4, "usage_type": "call" }, { "api_name": "celery.schedules.crontab", "line_number": 17, "usage_type": "call" } ]
36961545751
#!/usr/bin/env python # coding: utf-8 # ## App Creation # # First, import all necessary libraries: # In[1]: #App Libraries import json import dash from dash import html, dcc, Input, Output, State, dash_table import dash_bootstrap_components as dbc #Distributions from scipy.stats import gamma from scipy.stats impo...
annette-bell/SInR-Covid-Dissertation
dash_lambda.py
dash_lambda.py
py
44,277
python
en
code
1
github-code
6
[ { "api_name": "numpy.random.seed", "line_number": 54, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 54, "usage_type": "attribute" }, { "api_name": "numpy.random.gamma", "line_number": 59, "usage_type": "call" }, { "api_name": "numpy.random",...
6313183972
from django.urls import path, include from django.conf.urls import url from mysite import views urlpatterns = [ path('search/', views.search_view, name='search'), url(r'^request/(?P<record_id>[-\w]+)/$', views.send_req_view, name='request'), path('requests/', views.req_view, name='requests'), path('...
abpopal/sehat.af
mysite/urls.py
urls.py
py
1,044
python
en
code
0
github-code
6
[ { "api_name": "django.urls.path", "line_number": 9, "usage_type": "call" }, { "api_name": "mysite.views.search_view", "line_number": 9, "usage_type": "attribute" }, { "api_name": "mysite.views", "line_number": 9, "usage_type": "name" }, { "api_name": "django.conf....
30188434989
import bluetooth class Alpha1S: """ Class to control the Ubtech Alpha 1S robot """ def __init__(self, name="ALPHA 1S"): self.__bt = self.Alpha1S_bluetooth(name) def battery(self): """ Get battery information. Returns: dict: Dictionary with fields: ...
alvaroferran/Alpha1S
alpha1s/__init__.py
__init__.py
py
7,677
python
en
code
6
github-code
6
[ { "api_name": "bluetooth.discover_devices", "line_number": 171, "usage_type": "call" }, { "api_name": "bluetooth.BluetoothSocket", "line_number": 179, "usage_type": "call" }, { "api_name": "bluetooth.RFCOMM", "line_number": 179, "usage_type": "attribute" } ]
72532676669
# pylint: disable=protected-access # pylint: disable=redefined-outer-name # pylint: disable=unused-argument import urllib.parse from pathlib import Path from random import choice from typing import Awaitable, Callable import pytest from aiohttp import web from aiohttp.test_utils import TestClient from faker import F...
ITISFoundation/osparc-simcore
services/storage/tests/unit/test_handlers_files_metadata.py
test_handlers_files_metadata.py
py
5,239
python
en
code
35
github-code
6
[ { "api_name": "typing.Callable", "line_number": 26, "usage_type": "name" }, { "api_name": "pydantic.ByteSize", "line_number": 26, "usage_type": "name" }, { "api_name": "typing.Awaitable", "line_number": 26, "usage_type": "name" }, { "api_name": "pathlib.Path", ...
15697493759
import cv2 as cv # Cargamos la imagen y transformamos en blanco y negro img_original = cv.imread("imgs/Cuadrados.jpg") img_bnw = cv.cvtColor(img_original, cv.COLOR_BGR2GRAY) # Aplicamos la funcion de deteccion de esquinas maxCorners = 20 esquinas = cv.goodFeaturesToTrack(img_bnw, maxCorners, 0.01, 10) # Definimos el...
FadedGuy/Universidad
L3/visionComputador/tp5/cuestiones/8.py
8.py
py
816
python
es
code
2
github-code
6
[ { "api_name": "cv2.imread", "line_number": 4, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 5, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2GRAY", "line_number": 5, "usage_type": "attribute" }, { "api_name": "cv2.goodFeaturesToTrack"...
3835462701
#coding: utf-8 import urllib import BaseHTTPServer from SimpleHTTPServer import SimpleHTTPRequestHandler import webbrowser import os from threading import Timer import base64 from ui import Image import console import sys import io sys.stderr = io.StringIO() console.show_activity('Creating images…') imagefilenames ...
0942v8653/pythonista-homescreen-icon
chooseicon.py
chooseicon.py
py
2,087
python
en
code
9
github-code
6
[ { "api_name": "sys.stderr", "line_number": 14, "usage_type": "attribute" }, { "api_name": "io.StringIO", "line_number": 14, "usage_type": "call" }, { "api_name": "console.show_activity", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path.splitext", ...
7571022590
import numpy as np import logging import sys import pkg_resources import pytz import datetime import os import re from numpy import cos,sin # Get the version version_file = pkg_resources.resource_filename('pynortek','VERSION') # Setup logging module logging.basicConfig(stream=sys.stderr, level=logging.DEBUG) logger =...
MarineDataTools/pynortek
pynortek/pynortek.py
pynortek.py
py
17,352
python
en
code
4
github-code
6
[ { "api_name": "pkg_resources.resource_filename", "line_number": 12, "usage_type": "call" }, { "api_name": "logging.basicConfig", "line_number": 15, "usage_type": "call" }, { "api_name": "sys.stderr", "line_number": 15, "usage_type": "attribute" }, { "api_name": "l...
70809071868
# ------------------------------------------------------------------# # AMPBA - 2021 Winter :: Data Collection assignment - PART2 # # Group Id : 3 # # Authors: # # Nishant Jalasutram - PG I...
deepkamal/DC_AMPBA_W2021
3_matchDetails.py
3_matchDetails.py
py
11,760
python
en
code
0
github-code
6
[ { "api_name": "scrapy.Spider", "line_number": 38, "usage_type": "attribute" }, { "api_name": "scrapy.Spider", "line_number": 41, "usage_type": "attribute" }, { "api_name": "scrapy.Request", "line_number": 226, "usage_type": "call" } ]
38751132701
import os import util import config scanned_files = 0 for directory, _, files_list in os.walk(config.td): #directory looks like "c:\user\box\...\phonexx\images" for ea_filename in files_list: #ea_filename looks like "ADX-....jpg" file_path = (directory+"\\"+ea_filename) #file_path ...
maravis05/EyeCup-File-Scanner
move_pxl.py
move_pxl.py
py
1,001
python
en
code
0
github-code
6
[ { "api_name": "os.walk", "line_number": 9, "usage_type": "call" }, { "api_name": "config.td", "line_number": 9, "usage_type": "attribute" }, { "api_name": "config.td", "line_number": 18, "usage_type": "attribute" }, { "api_name": "config.dd", "line_number": 27...
37314756203
import pandas as pd import sklearn import matplotlib.pyplot as plt import seaborn import load_data train = load_data.get_data()[0] testX = load_data.get_data()[1] inv_labels = load_data.get_inverted_labels() trainX = train.drop(['SalePrice'], axis = 1) trainY = train['SalePrice'] def info_discrete(column): scatt...
jantar44/reg_house_prices
house_prices/house_prices.py
house_prices.py
py
1,771
python
en
code
0
github-code
6
[ { "api_name": "load_data.get_data", "line_number": 7, "usage_type": "call" }, { "api_name": "load_data.get_data", "line_number": 8, "usage_type": "call" }, { "api_name": "load_data.get_inverted_labels", "line_number": 9, "usage_type": "call" }, { "api_name": "seab...
24985299915
#Imprting libraries from dash import Dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output from random import randint import plotly.express as px # Creating dash environment app = Dash(__name__) # Constructing the layout app.layout = html.Div([ # T...
Miautawn/simple-DashBoard-with-Dash
random_plotter.py
random_plotter.py
py
2,553
python
en
code
0
github-code
6
[ { "api_name": "dash.Dash", "line_number": 10, "usage_type": "call" }, { "api_name": "dash_html_components.Div", "line_number": 13, "usage_type": "call" }, { "api_name": "dash_html_components.Div", "line_number": 15, "usage_type": "call" }, { "api_name": "dash_core...
10230332445
""" This file defines the recorder classes which log eval results in different ways, such as to a local JSON file or to a remote Snowflake database. If you would like to implement a custom recorder, you can see how the `LocalRecorder` and `Recorder` classes inherit from the `RecorderBase` class and override certain me...
openai/evals
evals/record.py
record.py
py
23,030
python
en
code
12,495
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 28, "usage_type": "call" }, { "api_name": "contextvars.ContextVar", "line_number": 34, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 34, "usage_type": "name" }, { "api_name": "typing.Optio...
6214826810
from json import loads from bot_core.utils.redis_topics import CMD_COLL_NAME from bot_core.utils.action_tools import cmd_analysis, pub_sub def main(): pub_sub.subscripe(CMD_COLL_NAME) while (True): msg_data = pub_sub.get_message().get("data", None) if msg_data: cmd_analysis( ...
KTOALE/tel_bot_coro
bot_core/src/main_core.py
main_core.py
py
401
python
en
code
0
github-code
6
[ { "api_name": "bot_core.utils.action_tools.pub_sub.subscripe", "line_number": 8, "usage_type": "call" }, { "api_name": "bot_core.utils.redis_topics.CMD_COLL_NAME", "line_number": 8, "usage_type": "argument" }, { "api_name": "bot_core.utils.action_tools.pub_sub", "line_number"...
7998920894
import random from . import users from flask import request import json ##### Hier kommt code, den ich einfach von Tina so übernommen habe. Wenn er schlecht ist ist Tina schuld ############ import os from dotenv import load_dotenv from flask import jsonify, Response import pymongo import hashlib # Die brauchen wir fü...
rosemaxio/flauraBackend
users/Api.py
Api.py
py
10,619
python
de
code
0
github-code
6
[ { "api_name": "dotenv.load_dotenv", "line_number": 15, "usage_type": "call" }, { "api_name": "os.environ.get", "line_number": 16, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 16, "usage_type": "attribute" }, { "api_name": "pymongo.MongoClient...
12919232280
import datetime categories = ['INACTIVE', 'WEB', 'AUDIO', 'VIDEO', 'GAMING'] inp = raw_input("Clear? Y/N\n") if inp in ["y", "Y"]: with open('log.txt', 'w') as f: f.write("") while True: for i, c in enumerate(categories): print("{}: {}".format(i, c)) cat = raw_input() print("\n") time = date...
noise-lab/ml-networking
activities/lib/interative_log.py
interative_log.py
py
420
python
en
code
8
github-code
6
[ { "api_name": "datetime.datetime.now", "line_number": 16, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 16, "usage_type": "attribute" } ]
7129738963
#!/usr/bin/env python import pandas as pd from collections import defaultdict import argparse def bowtie2bed(fn, fo): """ From a bowtie output (tsv, NOT sam) file, return a BED file. :param fn: string name of bowtie default output tsv file :param fo: string name of bedfile output to...
YeoLab/chim-eCLIP
bin/bowtie2bed.py
bowtie2bed.py
py
1,281
python
en
code
1
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 22, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 30, "usage_type": "call" } ]
38763808043
import spotipy from model import * from enum import Enum class EmotionsMood(Enum): """Creating constants to assign to different moods""" Calm = 1 #Calm Energetic = 2 happy = 2 sad = 0 def get_songs_features(sp,ids): """Get features of songs to identify tyoe of music""" meta = sp.track(id...
nagarro-hackathon-2023/python_ml
spotify.py
spotify.py
py
3,947
python
en
code
0
github-code
6
[ { "api_name": "enum.Enum", "line_number": 5, "usage_type": "name" }, { "api_name": "spotipy.Spotify", "line_number": 54, "usage_type": "call" } ]
29899432213
import numpy as np from absl import app, flags HEADER_SIZE = 10 RECORD_SIZE = 100 FLAGS = flags.FLAGS flags.DEFINE_string( "input_file", None, "Path to binary data file.", short_name="i", ) flags.DEFINE_string( "output_file", None, "Path to output file (optional).", short_name="o", ) ...
exoshuffle/raysort
scripts/misc/decode.py
decode.py
py
1,340
python
en
code
14
github-code
6
[ { "api_name": "absl.flags.FLAGS", "line_number": 7, "usage_type": "attribute" }, { "api_name": "absl.flags", "line_number": 7, "usage_type": "name" }, { "api_name": "absl.flags.DEFINE_string", "line_number": 9, "usage_type": "call" }, { "api_name": "absl.flags", ...
39399855904
import datetime import decimal import logging import os import re from kensu.psycopg2.pghelpers import get_table_schema, get_current_db_info, pg_query_as_dicts from kensu.utils.kensu_provider import KensuProvider from kensu.utils.kensu import KensuDatasourceAndSchema from kensu.utils.dsl.extractors.external_lineage_dto...
Fundamentals-of-Data-Observability/handson
python_environment/volume/week2/dbt/dbt-do/dbt-ast/kensu_postgres.py
kensu_postgres.py
py
12,258
python
en
code
8
github-code
6
[ { "api_name": "pglast.Node", "line_number": 52, "usage_type": "call" }, { "api_name": "logging.debug", "line_number": 53, "usage_type": "call" }, { "api_name": "pglast.parse_sql", "line_number": 76, "usage_type": "call" }, { "api_name": "pglast.ast.RawStmt", "...
70749170429
#Server dependencies #from gevent.pywsgi import WSGIServer from threading import Thread from flask import Flask, request, send_from_directory from flask_mobility import Mobility import os #Apis used from assistant import sendToAssistant #File management #from bs4 import BeautifulSoup import codecs #import re import j...
Creativity-Hub/chatbot_template
main.py
main.py
py
2,540
python
en
code
1
github-code
6
[ { "api_name": "datetime.datetime.today", "line_number": 41, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 41, "usage_type": "name" }, { "api_name": "codecs.open", "line_number": 50, "usage_type": "call" }, { "api_name": "threading.Threa...
36312680043
import pandas as pd from xml.etree import ElementTree as ET import requests from datetime import datetime import matplotlib.pyplot as plt q_range = {'Range': 1} q_resp_group = {'ResponseGroup': 'History'} q_url_WHO = {'https://www.who.int/'} q_date = datetime.date(datetime.now()) url = "https://awis.api.alexa.com/api...
alanalien/covid_19_circumstantial_evidences
data_processing_funs/click_ratio_data.py
click_ratio_data.py
py
1,858
python
en
code
0
github-code
6
[ { "api_name": "datetime.datetime.date", "line_number": 10, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 10, "usage_type": "name" }, { "api_name": "datetime.datetime.now", "line_number": 10, "usage_type": "call" }, { "api_name": "reques...
2799425380
import os.path import random import torchvision.transforms as transforms import torch from data.base_dataset import BaseDataset, get_params, get_transform, normalize from data.image_folder import make_dataset from PIL import Image import numpy as np class AlignedDataset(BaseDataset): def initialize(self, opt): ...
carolineec/EverybodyDanceNow
data/aligned_dataset.py
aligned_dataset.py
py
3,566
python
en
code
639
github-code
6
[ { "api_name": "data.base_dataset.BaseDataset", "line_number": 10, "usage_type": "name" }, { "api_name": "os.path.path.join", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path.path", "line_number": 16, "usage_type": "attribute" }, { "api_name": "os....
71844650429
from django.conf import settings from django.urls import NoReverseMatch, reverse def get_slug_or_pk(object, slug_field=None): res = dict() field = slug_field if hasattr(object, slug_field) else "pk" if object: param = "slug" if hasattr(object, slug_field) else "pk" res.update({param: getat...
dbsiavichay/faclab
viewpack/shortcuts.py
shortcuts.py
py
1,595
python
en
code
0
github-code
6
[ { "api_name": "django.urls.reverse", "line_number": 23, "usage_type": "call" }, { "api_name": "django.urls.reverse", "line_number": 25, "usage_type": "call" }, { "api_name": "django.urls.NoReverseMatch", "line_number": 26, "usage_type": "name" }, { "api_name": "dj...
12050674214
"""Define settings for the window""" from data.options import CUSTOM_SETTINGS_FILENAME import json from logger import logger from os import path DEFAULT_SETTINGS = { "width": 1024, "height": 768 } def get(_type, data): """Used to get value for the settings file Args: _type (string) ...
Barbapapazes/dungeons-dragons
config/window.py
window.py
py
779
python
en
code
1
github-code
6
[ { "api_name": "os.path.join", "line_number": 27, "usage_type": "call" }, { "api_name": "data.options.CUSTOM_SETTINGS_FILENAME", "line_number": 27, "usage_type": "argument" }, { "api_name": "os.path", "line_number": 27, "usage_type": "name" }, { "api_name": "json.l...
27082695603
import pytest from httpx import AsyncClient from fastapi1.main import app menu_id = '' def assert_menu_properties(response_json): if not response_json: return assert 'id' in response_json assert 'title' in response_json assert 'description' in response_json @pytest.mark.anyio async def tes...
puplishe/testproject
tests/test_menu.py
test_menu.py
py
3,056
python
en
code
0
github-code
6
[ { "api_name": "httpx.AsyncClient", "line_number": 20, "usage_type": "call" }, { "api_name": "fastapi1.main.app", "line_number": 20, "usage_type": "name" }, { "api_name": "pytest.mark", "line_number": 17, "usage_type": "attribute" }, { "api_name": "httpx.AsyncClien...
24428391900
#!/usr/bin/python3 """ sends a post request to the URL and displays the body """ import requests from sys import argv if __name__ == "__main__": url = argv[1] r = requests.get(url) if r.status_code == 200: print(r.text) else: print("Error code: {}".format(r.status_code))
Isaiah-peter/alx-higher_level_programming
0x11-python-network_1/7-error_code.py
7-error_code.py
py
305
python
en
code
0
github-code
6
[ { "api_name": "sys.argv", "line_number": 8, "usage_type": "name" }, { "api_name": "requests.get", "line_number": 9, "usage_type": "call" } ]
21320836605
from typing import Tuple import torch import torch.nn as nn import torch.nn.functional as F from torch_geometric.nn import SAGEConv from torch_geometric.nn import aggr from src.utils import make_diff_matrix, triu_vector class Model(nn.Module): NUM_NODE_FEATURES = 140 NUM_OPCODES = 120 def __init__(sel...
Obs01ete/kaggle_latenciaga
src/model.py
model.py
py
7,190
python
en
code
1
github-code
6
[ { "api_name": "torch.nn.Module", "line_number": 13, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 13, "usage_type": "name" }, { "api_name": "torch.nn.Linear", "line_number": 37, "usage_type": "call" }, { "api_name": "torch.nn", "line_nu...
10888914316
import random from django.template.loader import render_to_string from .naver import 블로그_검색, 상한가_크롤링, 테마별_시세_크롤링 def search(search_engine, keyword): if search_engine == '네이버 블로그': post_list = 블로그_검색(keyword) response_text = render_to_string('dialogflow/naver_blog_search_result.txt', { ...
allieus-archives/demo-20180805-startup-dev
dialogflow/actions.py
actions.py
py
937
python
ko
code
16
github-code
6
[ { "api_name": "naver.블로그_검색", "line_number": 8, "usage_type": "call" }, { "api_name": "django.template.loader.render_to_string", "line_number": 9, "usage_type": "call" }, { "api_name": "naver.상한가_크롤링", "line_number": 20, "usage_type": "call" }, { "api_name": "nave...
74199623228
from tkinter import messagebox from PyPDF2 import PdfReader, PdfWriter import os class TrabajarPDF: def divide_pdf(self, rutaPDF, rutaGuardar, num_pages): pdf_reader = PdfReader(rutaPDF) total_pages = len(pdf_reader.pages) for i in range(0, total_pages, num_pages): pdf_writer =...
JhostinR/emergia_projects
dividir_unir_pdf/controller/dividir_functions.py
dividir_functions.py
py
753
python
en
code
0
github-code
6
[ { "api_name": "PyPDF2.PdfReader", "line_number": 7, "usage_type": "call" }, { "api_name": "PyPDF2.PdfWriter", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path", "line_num...
74606056828
from __future__ import unicode_literals import errno import json import logging import os __author__ = 'Jakub Plichta <jakub.plichta@gmail.com>' logger = logging.getLogger(__name__) class DashboardExporter(object): def process_dashboard(self, project_name, dashboard_name, dashboard_data): pass clas...
jakubplichta/grafana-dashboard-builder
grafana_dashboards/exporter.py
exporter.py
py
2,430
python
en
code
141
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 51, "usage_type": "call" }, { "api_name": "os.path", "line_number": 51, "usage_type": "attribute" }, { "api_name": "os.makedirs", "line...
38292113901
import cv2 from cv2 import dnn_superres # Create an SR object sr = dnn_superres.DnnSuperResImpl_create() # Read image image = cv2.imread('2.jpg') # ##########Read the desired model #path = "./models/EDSR_x3.pb" path = "./models/LapSRN_x2.pb" sr.readModel(path) # Set the desired model and scale to get correct pre- a...
Hsoleimanii/SuperResolution
super.py
super.py
py
1,013
python
en
code
1
github-code
6
[ { "api_name": "cv2.dnn_superres.DnnSuperResImpl_create", "line_number": 5, "usage_type": "call" }, { "api_name": "cv2.dnn_superres", "line_number": 5, "usage_type": "name" }, { "api_name": "cv2.imread", "line_number": 8, "usage_type": "call" }, { "api_name": "cv2....
34712009040
# Coding Math Episode 9b # Add the acceleration and observe how it impacts velocity (speed + direction) # on the fireworks __author__ = "piquesel" import pygame import math import random from ep7 import Vector as Vector class Particle: 'Represents a particle defined by its position, velocity and direction' ...
piquesel/coding-math
ep9b.py
ep9b.py
py
1,954
python
en
code
0
github-code
6
[ { "api_name": "ep7.Vector", "line_number": 19, "usage_type": "call" }, { "api_name": "ep7.Vector", "line_number": 20, "usage_type": "call" }, { "api_name": "ep7.Vector", "line_number": 23, "usage_type": "call" }, { "api_name": "pygame.init", "line_number": 33,...
4715617180
from square.configuration import Configuration from square.client import Client from django.contrib.auth.models import User from django.conf import settings import datetime from pytz import utc as utc from django.utils import timezone from dateutil.relativedelta import relativedelta import uuid ACCESS_TOKEN = settin...
BryceTant/LabLineup
LLenv/LabLineup/app/Payment.py
Payment.py
py
4,739
python
en
code
0
github-code
6
[ { "api_name": "django.conf.settings.SQUARE_ACCESS_TOKEN", "line_number": 13, "usage_type": "attribute" }, { "api_name": "django.conf.settings", "line_number": 13, "usage_type": "name" }, { "api_name": "django.conf.settings.SQUARE_ENV", "line_number": 14, "usage_type": "at...
36078929738
import requests from sqlalchemy import or_ from flask import Blueprint from flask_login import current_user from flask import redirect, request, render_template, url_for, jsonify from models import User, MealRequest, Proposal from dbSession import session from loginAPIKeyDecorator import require_api_key f...
NaPiZip/Online-course-notes
Designing_RESTful_APIs/Exercices/L5/appEndpoints.py
appEndpoints.py
py
7,871
python
en
code
0
github-code
6
[ { "api_name": "flask.Blueprint", "line_number": 14, "usage_type": "call" }, { "api_name": "keyHelper.get_mapquest_key_dict", "line_number": 16, "usage_type": "call" }, { "api_name": "keyHelper.get_foursquare_key_dict", "line_number": 17, "usage_type": "call" }, { ...
27828726752
# -*- coding: utf-8 -*- import pandas as pd import numpy as np import re import arcpy import sys import traceback import tempfile import os __author__ = "Coen Jonker" class ColumnParser(object): def __init__(self): self.non_alpha_pattern = re.compile(r'[^A-Za-z0-9_]') self.ending = re.compile(r'...
wagem007/asset-management-geo
tactisch_plan_xlsx_to_feature_class.py
tactisch_plan_xlsx_to_feature_class.py
py
3,474
python
en
code
0
github-code
6
[ { "api_name": "re.compile", "line_number": 17, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 18, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 19, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 20, ...
30353259361
from os import path import os import sys from os.path import join, dirname # Enthought library imports. from pyface.action.api import Action from traitsui.api import auto_close_message # Local imports import mayavi.api from mayavi.core.common import error from mayavi.preferences.api import preference_manager # To fi...
enthought/mayavi
mayavi/action/help.py
help.py
py
2,807
python
en
code
1,177
github-code
6
[ { "api_name": "os.path.dirname", "line_number": 18, "usage_type": "call" }, { "api_name": "mayavi.api.api", "line_number": 18, "usage_type": "attribute" }, { "api_name": "mayavi.api", "line_number": 18, "usage_type": "name" }, { "api_name": "os.path.join", "li...
12492560506
#!/usr/bin/env python # coding: utf-8 # In[1]: from __future__ import print_function import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from sklearn.metrics import classification_report from sklearn import metrics from sklearn import tree import warnings warnings.filterwarni...
Panktibhatt08/Machine-Learning
Machine Learning Final Project.py
Machine Learning Final Project.py
py
14,506
python
en
code
0
github-code
6
[ { "api_name": "warnings.filterwarnings", "line_number": 16, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 22, "usage_type": "call" }, { "api_name": "ipywidgets.interact", "line_number": 42, "usage_type": "call" }, { "api_name": "ipywidget...
43721480783
import numpy as np from config import * from KnowledgeSent import KnowledgeSentence from transformers import BertTokenizer, BertModel import torch hops = FLAGS.hops string_year = str(FLAGS.year) number = 0 start = FLAGS.start end = FLAGS.end if string_year == '2015': number = 3864 elif string_year == ...
Felix0161/KnowledgeEnhancedABSA
Embeddings.py
Embeddings.py
py
4,594
python
en
code
0
github-code
6
[ { "api_name": "transformers.BertTokenizer.from_pretrained", "line_number": 36, "usage_type": "call" }, { "api_name": "transformers.BertTokenizer", "line_number": 36, "usage_type": "name" }, { "api_name": "transformers.BertModel.from_pretrained", "line_number": 37, "usage_...
4546238710
import cv2 from matplotlib.pyplot import contour import numpy as np import matplotlib.pyplot as plt from random import randint import matplotlib.pyplot as plt def DetectPositionMaxSkin(filename,x, y, w, h, lower, upper): #y=y+50 Image = cv2.VideoCapture(filename) #Image = cv2.VideoCaptu...
raquelpantojo/Detectskin
DetectNail.py
DetectNail.py
py
6,004
python
en
code
1
github-code
6
[ { "api_name": "cv2.VideoCapture", "line_number": 12, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 23, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2HSV", "line_number": 23, "usage_type": "attribute" }, { "api_name": "cv2.inRange", ...
33787246110
from itertools import chain import os import pytest @pytest.fixture(scope="module") def organization_id(): """Get Organization ID from the environment variable """ return os.environ["GCLOUD_ORGANIZATION"] @pytest.fixture(scope="module") def source_name(organization_id): from google.cloud import security...
silverdev/google-cloud-python
securitycenter/docs/snippets_findings.py
snippets_findings.py
py
20,863
python
en
code
0
github-code
6
[ { "api_name": "os.environ", "line_number": 9, "usage_type": "attribute" }, { "api_name": "pytest.fixture", "line_number": 6, "usage_type": "call" }, { "api_name": "google.cloud.securitycenter.SecurityCenterClient", "line_number": 16, "usage_type": "call" }, { "api...
37005580941
#coding: utf-8 import tornado.web from basehandler import BaseHandler from lib.lrclib import LrcLib from lib.songinfo import SongInfo from models import MusicModel, UserModel import json import re import logging log = logging.getLogger("index") log.setLevel(logging.DEBUG) rm_regex = r"/(\([^\)]*\))|(\[[^\]]*\])|(([^)...
mgbaozi/ruankusb
handlers/index.py
index.py
py
3,525
python
en
code
0
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 12, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 13, "usage_type": "attribute" }, { "api_name": "re.sub", "line_number": 16, "usage_type": "call" }, { "api_name": "basehandler.BaseHandler",...
8207780556
import base64 from django.shortcuts import render from django.http import JsonResponse from django.views.decorators.cache import never_cache from stolen_wiki_game.models import Article # Create your views here. def index(request): return render(request, 'stolen_wiki_game/index.html', {}) @never_cache def arti...
Jack-Naughton/homepage
stolen_wiki_game/views.py
views.py
py
596
python
en
code
0
github-code
6
[ { "api_name": "django.shortcuts.render", "line_number": 12, "usage_type": "call" }, { "api_name": "stolen_wiki_game.models.Article.objects.order_by", "line_number": 17, "usage_type": "call" }, { "api_name": "stolen_wiki_game.models.Article.objects", "line_number": 17, "us...
32822098386
# coding:utf-8 from flask import request from flask import Flask, render_template from controller import search, getPage, get_suggestion import sys import json # reload(sys) # sys.setdefaultencoding('utf-8') app = Flask(__name__) @app.route('/') def index(): return "the server is running!" # return render_t...
QimingZheng/WSM-Project-WikiSearch
app/index.py
index.py
py
1,221
python
en
code
4
github-code
6
[ { "api_name": "flask.Flask", "line_number": 11, "usage_type": "call" }, { "api_name": "flask.request.args", "line_number": 22, "usage_type": "attribute" }, { "api_name": "flask.request", "line_number": 22, "usage_type": "name" }, { "api_name": "flask.request.args....
6251031632
import matplotlib.pyplot as plt import eel eel.init("web") userid = [] @eel.expose def login(uid,upass): get = open("data.txt", "r") temp = get.readlines() udata = [] for i in range(len(temp)): if temp[i].startswith(uid): udata = temp[i].split("|") ...
vish0290/Polling-System-File-Structures
main.py
main.py
py
17,483
python
en
code
0
github-code
6
[ { "api_name": "eel.init", "line_number": 4, "usage_type": "call" }, { "api_name": "eel.expose", "line_number": 9, "usage_type": "attribute" }, { "api_name": "eel.expose", "line_number": 80, "usage_type": "attribute" }, { "api_name": "eel.expose", "line_number"...
22457592991
import torch from transformers import BertTokenizer, BertModel, BertConfig, AdamW, BertForMaskedLM from tokenizers import ByteLevelBPETokenizer from tokenizers.implementations import ByteLevelBPETokenizer from tokenizers.processors import BertProcessing from sumerian_data import SumerianDataset from typing import...
sethbassetti/sumerian_embeddings
src/BERTmodel.py
BERTmodel.py
py
7,800
python
en
code
0
github-code
6
[ { "api_name": "torch.device", "line_number": 12, "usage_type": "call" }, { "api_name": "torch.utils", "line_number": 17, "usage_type": "attribute" }, { "api_name": "os.mkdir", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path.join", "line_numbe...
17541028772
#/usr/bin/env python from pwn import * from Crypto.Util.number import bytes_to_long, long_to_bytes from Crypto.Cipher import AES import hashlib import os import base64 from gmpy2 import is_prime class Rng: def __init__(self, seed): self.seed = seed self.generated = b"" self.num = 0 def more_bytes(self...
cybernatedwizards/CybernatedWizardsCTF
2020/DragonCTF_2020/bitflip1/sol.py
sol.py
py
3,818
python
en
code
0
github-code
6
[ { "api_name": "hashlib.sha256", "line_number": 17, "usage_type": "call" }, { "api_name": "Crypto.Util.number.long_to_bytes", "line_number": 19, "usage_type": "call" }, { "api_name": "Crypto.Util.number.bytes_to_long", "line_number": 19, "usage_type": "call" }, { "...
72568366267
#!/usr/bin/env python import seaborn import numpy as np import os from collections import OrderedDict import pandas as pd import matplotlib.pyplot as plt import sys from termcolor import cprint # Load data # Global vars for tracking and labeling data at load time. exp_idx = 0 label_parser_dict = None smooth_factor =...
flowersteam/social-ai
data_analysis_neurips.py
data_analysis_neurips.py
py
22,418
python
en
code
5
github-code
6
[ { "api_name": "os.walk", "line_number": 36, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 44, "usage_type": "call" }, { "api_name": "os.path", "line_number": 44, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 5...
7722787082
from spynnaker.pyNN import exceptions from spynnaker.pyNN.models.neural_projections.connectors.abstract_connector \ import AbstractConnector from spynnaker.pyNN.models.neural_properties.synaptic_list import SynapticList from spynnaker.pyNN.models.neural_properties.synapse_row_info \ import SynapseRowInfo import...
ominux/sPyNNaker
spynnaker/pyNN/models/neural_projections/connectors/from_list_connector.py
from_list_connector.py
py
3,525
python
en
code
null
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 10, "usage_type": "call" }, { "api_name": "spynnaker.pyNN.models.neural_projections.connectors.abstract_connector.AbstractConnector", "line_number": 13, "usage_type": "name" }, { "api_name": "numpy.array", "line_number": 50, ...
11702399982
import md5 import random #from settings import SOLRSOLR_HOST, SOLR_PORT # Make this unique, and don't share it with anybody. SECRET_KEY = 'j*zdirg7yy9@q1k=c*q!*kovfsd#$FDFfsdfkae#id04pyta=yz@w34m6rvwfe' def generate_hash(): hash = md5.new() hash.update("".join(map(lambda i: chr(random.randint(0, 255)), range(16...
bioinformatics-ua/montra
emif/insert_script.py
insert_script.py
py
2,771
python
en
code
7
github-code
6
[ { "api_name": "md5.new", "line_number": 13, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 14, "usage_type": "call" }, { "api_name": "requests.post", "line_number": 56, "usage_type": "call" } ]
12791911896
from django.contrib.auth.models import User from django.http import JsonResponse, Http404 from django.shortcuts import redirect, get_object_or_404 from django.urls import reverse from django.utils.decorators import method_decorator from django.views.generic import DetailView, CreateView, View, TemplateView, DeleteView ...
skazancev/NeKidaem
project/blog/views.py
views.py
py
3,548
python
en
code
0
github-code
6
[ { "api_name": "django.views.generic.View", "line_number": 14, "usage_type": "name" }, { "api_name": "django.contrib.auth.models.User.objects.get", "line_number": 19, "usage_type": "call" }, { "api_name": "django.contrib.auth.models.User.objects", "line_number": 19, "usage...
7763839215
from Monitor import Monitor import MonitorVarTypes import requests monitor_var = {'PreviousClosingPrice': MonitorVarTypes.FLOAT} monitor_text = "URL FORMAT: https://api.polygon.io/v2/aggs/ticker/{TICKER}/prev?apiKey={APIKEY}; \nGo to https://polygon.io/docs/get_v1_meta_symbols__stocksTicker__news_anchor for more info...
YuHanjiang/IFTTT-backend
Monitors/PolygonStockAPIMonitor.py
PolygonStockAPIMonitor.py
py
881
python
en
code
1
github-code
6
[ { "api_name": "MonitorVarTypes.FLOAT", "line_number": 5, "usage_type": "attribute" }, { "api_name": "Monitor.Monitor", "line_number": 9, "usage_type": "name" }, { "api_name": "requests.get", "line_number": 16, "usage_type": "call" } ]
40139751051
from PIL import Image img = Image.open("UnoDeck2.png") i = 0 for y in range(6): j = 2 k = 3 for x in range(12): if i == 64: break left = 0 top = 0 height = 256 width = 166 box = (width+j)*x, (height+k)*y, width*(x+1)+(j*x), height*...
CrazyScorcer/ImageCutter
imageCut.py
imageCut.py
py
472
python
en
code
0
github-code
6
[ { "api_name": "PIL.Image.open", "line_number": 3, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 3, "usage_type": "name" } ]
33038113455
"""Config flow for Withings.""" import logging import voluptuous as vol from withings_api.common import AuthScope from homeassistant import config_entries from homeassistant.components.withings import const from homeassistant.helpers import config_entry_oauth2_flow _LOGGER = logging.getLogger(__name__) @config_ent...
84KaliPleXon3/home-assistant-core
homeassistant/components/withings/config_flow.py
config_flow.py
py
2,112
python
en
code
1
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 11, "usage_type": "call" }, { "api_name": "homeassistant.helpers.config_entry_oauth2_flow.AbstractOAuth2FlowHandler", "line_number": 15, "usage_type": "attribute" }, { "api_name": "homeassistant.helpers.config_entry_oauth2_flow", ...
32639606030
import unittest from selenium import webdriver from selenium.webdriver.common.by import By class AddRemoveElements(unittest.TestCase): def setUp(self) -> None: self.driver = webdriver.Chrome(executable_path="chromedriver") self.driver.get('https://the-internet.herokuapp.com/') self.dr...
yorlysoro/intro_selenium_course
test_add_remove.py
test_add_remove.py
py
1,436
python
en
code
0
github-code
6
[ { "api_name": "unittest.TestCase", "line_number": 6, "usage_type": "attribute" }, { "api_name": "selenium.webdriver.Chrome", "line_number": 9, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 9, "usage_type": "name" }, { "api_name": "sele...
28969789667
import machine import picoweb import ujson import ulogging as logging import ure as re import utime from common import config app = picoweb.WebApp(__name__) hooks = {} CONFIGURE_DEVICE_HOOK = 'CONFIGURE_WIFI' CONFIGURE_AWS_HOOK = 'CONFIGURE_AWS' CONFIGURE_SENSOR_HOOK = "CONFIGURE_SENSOR" GET_STATUS_HOOK = 'GET_STATU...
wizzdev-pl/iot-starter
MicroPython/src/web_server/web_app.py
web_app.py
py
5,324
python
en
code
7
github-code
6
[ { "api_name": "picoweb.WebApp", "line_number": 10, "usage_type": "call" }, { "api_name": "ujson.dumps", "line_number": 30, "usage_type": "call" }, { "api_name": "ujson.loads", "line_number": 43, "usage_type": "call" }, { "api_name": "utime.time", "line_number"...
15624457572
import numpy as np from keras.utils import to_categorical from sklearn.model_selection import train_test_split test_size = 0.2 seed = 42 x_data = np.load('./data/soja_images_150_new.npy', allow_pickle=True) y_data = np.load('./data/soja_labels_150_new.npy', allow_pickle=True) x_data = x_data.astype(np.float32) y_da...
nagahamaVH/soybean-image-classif
app/src/prepare_data.py
prepare_data.py
py
741
python
en
code
1
github-code
6
[ { "api_name": "numpy.load", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.load", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.float32", "line_number": 11, "usage_type": "attribute" }, { "api_name": "keras.utils.to_categorical", ...
3177305776
from flipperzero_cli import CONFIG, load_config, show_config, \ read_until_prompt, print_until_prompt, check_file_presence, \ flipper_init, main, \ storage_read, save_file, download_from_flipper, \ upload_to_flipper, check_local_md5, compare_md5 import builtins import pytest from unittest.mock import ...
nledez/flipperzero-cli
tests/test_cli.py
test_cli.py
py
14,895
python
en
code
6
github-code
6
[ { "api_name": "flipperzero_cli.load_config", "line_number": 50, "usage_type": "call" }, { "api_name": "flipperzero_cli.CONFIG", "line_number": 51, "usage_type": "name" }, { "api_name": "flipperzero_cli.load_config", "line_number": 55, "usage_type": "call" }, { "ap...
35413864969
import multiprocessing from multiprocessing import Process from cleanup import TwitterCleanuper from preprocessing import TwitterData from word2vec import Word2VecProvider import pandas as pd def preprocess(results, data_path, is_testing, data_name, min_occurrences=5, cache_output=None): twitter_data = TwitterData...
michal0janczyk/information_diffusion
fuzzy_logic/word_2_vectors/main.py
main.py
py
7,484
python
en
code
1
github-code
6
[ { "api_name": "preprocessing.TwitterData", "line_number": 9, "usage_type": "call" }, { "api_name": "cleanup.TwitterCleanuper", "line_number": 12, "usage_type": "call" }, { "api_name": "word2vec.Word2VecProvider", "line_number": 19, "usage_type": "call" }, { "api_n...
16505295497
from typing import List, Dict, Tuple def create_chirp_dictionary(file_name: str) \ -> Dict[int, Tuple[int, str, List[str], List[int], List[int]]]: """ Opens the file "file_name" in working directory and reads the content into a chirp dictionary as defined on Page 2 Functions 2. Note, some spac...
kimber1y-tung/CSC108
assignment3/A3-2.py
A3-2.py
py
2,659
python
en
code
0
github-code
6
[ { "api_name": "typing.Dict", "line_number": 4, "usage_type": "name" }, { "api_name": "typing.Tuple", "line_number": 4, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 4, "usage_type": "name" } ]