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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
74887699421 | from django.conf import settings
from django.contrib.auth.models import AbstractUser
from django.db import models
class CustomUser(AbstractUser):
username = models.CharField(blank=True, null=True, max_length=50)
# Overwrtiting to make it available to have a blank username, because the email field will be the ... | JakubWronka/best-project-ever | bestprojectever/blog/models.py | models.py | py | 1,668 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.contrib.auth.models.AbstractUser",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.db.models",
"line_number": 7,
"usage_type": "name"
},
{
"... |
36041143681 | #!/usr/bin/env python3
"""Specify the parameters for all the commands in gridgen
"""
from pathlib import Path
from json import load
from collections.abc import Iterable
PKG_PATH = Path(__file__).parents[2]
DIMENSIONS = 'x', 'y', 'rotation'
REQUIRED = {
'grid2d': [
'grid2d',
],
'ecog': [
... | gpiantoni/gridgen | gridgen/bin/parameters.py | parameters.py | py | 18,250 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pathlib.Path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 323,
"usage_type": "call"
},
{
"api_name": "collections.abc.Iterable",
"line_number": 467,
"usage_type": "argument"
},
{
"api_name": "pathlib.Path"... |
9264270460 | from layout import Layout
from pos import Pos
from size import Size
import pygame
import colour
import styles
import orientation
class ListLayout(Layout):
def __init__(
self,
size,
pos=Pos(0,0),
border=0,
spacing=0,
orientation=orientation.VERTICAL,
scaling=... | lazukr/pykiwi | listlayout.py | listlayout.py | py | 1,865 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "layout.Layout",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "pos.Pos",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "orientation.VERTICAL",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "styles.FREE",
"li... |
28305029174 | from django.shortcuts import render
from django.http import HttpResponse
import os
# Create your views here.
import csv
import json
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# print(BASE_DIR)
def index(request,):
Budget = request.GET['Budget']
path_to_file = BASE_DIR +'/data/Detail_Of_... | mukulvashisht1026/PlanMyTrip | api/views.py | views.py | py | 874 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "os.path.dirname",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_numb... |
44673636079 | #!/usr/bin/env python
import rospy
from geometry_msgs.msg import PoseStamped
from styx_msgs.msg import Lane, Waypoint
from std_msgs.msg import Int32
from scipy import spatial
import numpy as np
import math
'''
This node will publish waypoints from the car's current position to some `x` distance ahead.
As mentioned i... | JoeyLI17/Lincoln_System_Integration_ROS | ros/src/waypoint_updater/waypoint_updater.py | waypoint_updater.py | py | 6,259 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "rospy.init_node",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "rospy.Publisher",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "styx_msgs.msg.Lane",
"line_number": 36,
"usage_type": "argument"
},
{
"api_name": "rospy.Subscrib... |
17255211354 | import plotly.graph_objects as go
import csv
from datetime import datetime
Alphabet = []
filename = 'data/Eminence_Data.csv'
with open(filename) as f:
reader = csv.reader(f)
header_row = next(reader)
# gets date, high, and low temps
dates, rains = [], []
for row in reader:
curre... | AidenB0die/Anthis_Weather_Practical | Eminense_Project/Humidity.py | Humidity.py | py | 1,577 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "csv.reader",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "plotly.graph_o... |
8619197603 | """
CH23. 85_Fibonacci_Number.py
"""
import collections
import enum
import heapq
import functools
import itertools
import re
import sys
import math
import bisect
# 입력 1
input1 = 5
# 출력
output1 = 5
# 입력 2
input2 = 10
# 출력 2
output2 = 55
# --------------------------------------------------
def fib(N):
if N <=... | sherrygelato/python-coding-interview | ch23_dynamic_programming/ford_85_fibonacci_number.py | ford_85_fibonacci_number.py | py | 2,672 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "collections.defaultdict",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 63,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 84,
"usage_type": "call"
},
{
"api_name"... |
16343094080 | from unittest.mock import patch
from sqlalchemy import func
from truth.truth import AssertThat
from freshcart.lib.embedder import embed_product
from freshcart.lib.models import db
from freshcart.lib.models.products import Product
from freshcart.tests import AppTestCase, DbMixin
class TestEmbedder(DbMixin, AppTestCa... | scademyai/fresh-cart | backend/freshcart/tests/lib/embedder_test.py | embedder_test.py | py | 1,283 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "freshcart.tests.DbMixin",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "freshcart.tests.AppTestCase",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "freshcart.lib.embedder.embed_product",
"line_number": 14,
"usage_type": "call"
},
... |
33681341186 | # -*- coding: utf-8 -*-
"""
Created on Thu Jun 6 06:03:15 2019
@author: hp
"""
my_image = "cat1.jpg" # change this to the name of your image file
my_label_y = [1] # the true class of your image (1 -> cat, 0 -> non-cat)
from sklearn.externals import joblib
parameters=joblib.load('model.pkl')
fname = ... | nikhilmalhotra1998/cat_detector | final.py | final.py | py | 773 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "sklearn.externals.joblib.load",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sklearn.externals.joblib",
"line_number": 11,
"usage_type": "name"
}
] |
10475937773 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2018/3/13 20:27
#import some necessary librairies
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import matplotlib.pyplot as plt # Matlab-style plotting
import seaborn as sns
color = sns.color_palet... | drawwon/HousePrice-Kaggle | 多模型融合/House_price_Stacking_Model.py | House_price_Stacking_Model.py | py | 13,184 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "seaborn.color_palette",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "seaborn.set_style",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "warnings.warn",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "pandas.set... |
22665850453 | from collections import deque
with open('input.txt') as f:
lines = f.read().split('\n')[:-2]
heights = []
start_x = 0
start_y = 0
end_x = 0
end_y = 0
for y, line in enumerate(lines):
heights.append([])
for x, c in enumerate(line):
if c == 'S':
start_x = x
start_y = y
... | muji-4ok/aoc_2022 | 12_climbing/solve.py | solve.py | py | 1,100 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "collections.deque",
"line_number": 32,
"usage_type": "call"
}
] |
29293192700 | import os
import json
import pickle
text_var = 'Данные для практической работы 2/4/products_3.pkl'
file_products = os.path.join(os.path.dirname(__file__), os.path.normpath(text_var))
text_var = 'Данные для практической работы 2/4/price_info_3.json'
file_change = os.path.join(os.path.dirname(__file__), os.path.normpath... | SvetlanaShagivaleeva/Data_engineering | second/code/4.py | 4.py | py | 1,260 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "os.path.join",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path.normpath",
"line_n... |
40895991072 | import requests
import json
from flask import Flask, jsonify, request
from flask_cors import CORS
from PIL import Image
import numpy as np
from tensorflow.keras.models import load_model
from tensorflow.keras.preprocessing.image import load_img, img_to_array
from tensorflow.keras.applications.resnet_v2 import preprocess... | Kshitij-Sharma49/wowdao | app.py | app.py | py | 1,843 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "flask.Flask",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "flask_cors.CORS",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "flask.request.files",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
... |
6997851160 | """
Comic Maker Helper Script
In one command this script:
- Sets up the venv
- Runs the tool
- Runs the test server.
"""
from pathlib import Path
import os, http.server, socketserver, platform
def setup_venv():
print("Checking environment...")
if Path("venv").exists():
print("Found existing ve... | SeanZWrites/comicmaker | helper.py | helper.py | py | 1,744 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pathlib.Path",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "platform.system",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.system",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.system",
"line_number":... |
21933729210 | # Load up packages
from jax import grad, jit, random
import jax.numpy as jnp
import numpy as np
from datetime import datetime
import os
# And functions I've written
from NRT_functions import helper_functions
from NRT_functions import losses
##### Set a load of parameters ######
T = 75000 # How many... | WilburDoz/ICLR_Actionable_Reps | Line.py | Line.py | py | 14,494 | python | en | code | 5 | github-code | 7 | [
{
"api_name": "numpy.floor",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_number": 72,
"usage_type": "call"
},
{
"api_name": "numpy.random.randint",
"line_number": 77,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"lin... |
15962677121 |
from multiprocessing import ProcessError
import cv2
import numpy as np
from numpy import mean, array
from sensor_msgs.msg import Image
from cv_bridge import CvBridge
import rospy
from cv2 import namedWindow, cvtColor, imshow, inRange
from cv2 import destroyAllWindows, startWindowThread
from cv2 import COLOR_BGR2GRAY, ... | Progr4m4573R/MSc-Robotics-and-Autonomous-Systems | Robot Programming/Assignment/Move_and_avoid_function/grape_counter.py | grape_counter.py | py | 3,363 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "cv_bridge.CvBridge",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "rospy.Subscriber",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sensor_msgs.msg.Image",
"line_number": 20,
"usage_type": "argument"
},
{
"api_name": "rospy.S... |
695842898 | # -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
from pyPdf import PdfFileReader, PdfFileWriter
from reportlab.pdfgen import canvas
from reportlab.lib.units import cm
from reportlab.lib import utils
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
fro... | GitNicolasFlasque/QCM-histoire-des-sciences | logotage/pypdf_essai.py | pypdf_essai.py | py | 2,559 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pyPdf.PdfFileReader",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pyPdf.PdfFileWriter",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pyPdf.PdfFileReader",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "pyPdf.Pdf... |
36521787501 | import os
import sys
from typing import Any, Callable, Dict, List, Tuple
from kitty.cli import parse_args
from kitty.cli_stub import PanelCLIOptions
from kitty.constants import appname, is_macos
from kitty.fast_data_types import make_x11_window_a_dock_window
from kitty.os_window_size import WindowSizeData
OPTIONS = r... | kovidgoyal/kitty | kittens/panel/main.py | main.py | py | 4,949 | python | en | code | 20,382 | github-code | 7 | [
{
"api_name": "kitty.constants.appname",
"line_number": 52,
"usage_type": "name"
},
{
"api_name": "kitty.cli_stub.PanelCLIOptions",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "typing.List",
"line_number": 60,
"usage_type": "name"
},
{
"api_name": "ki... |
28671732606 | from flask import Flask
app = Flask(__name__)
@app.route('/<phrase>')
def hello_world(phrase):
output = '<H1>Hi Alex, {}</H1>'.format(phrase)
output += '<img src="uglybunny.jpg">'
return output
if __name__ == '__main__':
app.run(debug=True) | sakamer71/aws-snippets | firstflask.py | firstflask.py | py | 257 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "flask.Flask",
"line_number": 2,
"usage_type": "call"
}
] |
38427606773 | import argparse
import json
import logging
import os
import sys
import time
import torch
from ray import tune
import data
import energy
import meta
import models
import train
import utils
from utils import config
def load_default_config(dataset, method, model):
"""
Load default parameter configuration fro... | smonsays/contrastive-meta-learning | metaopt_spiking/run_implicit.py | run_implicit.py | py | 14,040 | python | en | code | 9 | github-code | 7 | [
{
"api_name": "json.load",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "argparse.SUPPRESS",
"line_number": 73,
"usage_type": "attribute"
},
{
"api_name": "argparse.SUP... |
20200395430 | import torch
from tqdm import tqdm
import math
from modules.fuse_pipeline import Fuse_Pipeline
from modules.filter_pipeline import Filter_Pipeline
import numpy as np
class Pipeline(torch.nn.Module):
def __init__(self, config):
super(Pipeline, self).__init__()
self.config = config
# se... | eriksandstroem/SenFuNet | modules/pipeline.py | pipeline.py | py | 7,235 | python | en | code | 11 | github-code | 7 | [
{
"api_name": "torch.nn",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "modules.fuse_pipeline.Fuse_Pipeline",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "modules.filter_pipeline.Filter_Pipeline",
"line_number": 22,
"usage_type": "call"
},
... |
30287534906 | # -*- coding: utf-8 -*-
import os
import sys
import logging
import numpy as np
import torch
import torchvision
base_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(base_dir)
import skeleton
LOGGER = logging.getLogger(__name__)
def parse_args():
import argpar... | wbaek/torchskeleton | bin/dawnbench/cifar10_infer.py | cifar10_infer.py | py | 5,816 | python | en | code | 26 | github-code | 7 | [
{
"api_name": "os.path.dirname",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sys.path.append",
"l... |
38620539043 | import argparse
parser = argparse.ArgumentParser(description='Cluster reviews')
parser.add_argument('--model_name', type=str, default="bert-base-uncased")
parser.add_argument('--tpu', action='store_true')
parser.add_argument('--gpu', action='store_true')
parser.add_argument('--tfidf_feature', action='store_true')
par... | D3Mlab/rir | Neural_PM/runners/embedder_cmd.py | embedder_cmd.py | py | 1,632 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "Neural_PM.finetune.train_utils.setup_tpu",
"line_number": 38,
"usage_type": "call"
}
] |
22274016897 | import requests
import argparse
# url和端口携程自己的
flask_url = 'http://127.0.0.1:5012/predict'
def predict_result(image_path):
#啥方法都行
image = open(image_path, 'rb').read()
payload = {'image': image}
#request发给server.
r = requests.post(flask_url, files=payload).json()
# 成功的话在返回.
if r['success'... | jackliaoall/5th-cv-nlp-camp | 第三章 深度学习核⼼框架PyTorch/第八章:flask预测/flask_predict.py | flask_predict.py | py | 934 | python | en | code | 8 | github-code | 7 | [
{
"api_name": "requests.post",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 27,
"usage_type": "call"
}
] |
26361587510 | import pymysql
# 头条news item
# 新闻item
# {
# single_mode: false,
# middle_mode: true,
# more_mode: true,
# tag: "news",
# tag_url: "search/?keyword=%E5%85%B6%E5%AE%83",
# title: "以前喝水的只能叫水壶,今年流行这样的保温杯,热水能保温几天",
# chinese_tag: "其它",
# source: "换个活法儿",
# group_source: 7,
# imag... | Concentrate/mySpider | first/first/utils/DataBaseUtil.py | DataBaseUtil.py | py | 4,554 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pymysql.connect",
"line_number": 76,
"usage_type": "call"
}
] |
9624722391 | import logging
def get_config(name, modality = 'rgb', **kwargs):
logging.debug("loading network configs of: {}".format(name.upper()))
config = {}
if name.upper() == "I3D":
config['mean'] = [0.5] * 3
config['std'] = [0.5] * 3
else:
config['mean'] = [0.485, 0.456, 0.406]
... | facebookresearch/dmc-net | code/dmcnet_I3D/network/config.py | config.py | py | 517 | python | en | code | 45 | github-code | 7 | [
{
"api_name": "logging.debug",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "logging.info",
"line_number": 19,
"usage_type": "call"
}
] |
2050007726 | #!/usr/bin/env python
# coding: utf-8
import random
import uuid
import time
import sys
import queue
import multiprocessing as mp
import dbm
import os
import pathlib
import hashlib
import sqlite3
import filelock # pip install filelock
class KVTest:
def __init__(self, dict_like_under_test):
self.k... | nicku33/dbexperiments | 2022-12-10-kedzie-kvstore/kvstore.py | kvstore.py | py | 6,784 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "random.Random",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "uuid.uuid4",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "time.time_ns",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "time.time_ns",
"line_number... |
31432027833 | """Module docstrings.
"""
from typing import Literal
import numpy as np
from scipy.special import factorial as fact
from qoptcraft.state import State, PureState
from qoptcraft.math import hs_scalar_product, gram_schmidt_generator
from qoptcraft.basis import get_algebra_basis
def photon_invariant(
state: State, ... | pablovegan/QOptCraft | qoptcraft/invariant/invariant.py | invariant.py | py | 3,094 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "qoptcraft.state.State",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "typing.Literal",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "qoptcraft.state.PureState",
"line_number": 28,
"usage_type": "argument"
},
{
"api_name": "qo... |
24235925297 | from torch import nn
from torch import optim
from torch.cuda.memory import reset_accumulated_memory_stats
from model import ResNet10
from data import bird_train_dataloader,bird_valid_dataloader
from data import mnist_train_dataloader, mnist_valid_dataloader
import torch
from config import CONFIG
from tqdm import tqdm... | karanjakhar/bird-species-classification | src/train.py | train.py | py | 2,992 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "torch.nn.CrossEntropyLoss",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "torch.no_grad",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "tqdm.tqdm",
"lin... |
75006324383 | import asyncio
import signal
import logging
import traceback
from .log import Log
from .tui import Tui
from .conf import Conf
from .diskmanager import Diskmanager
from .comm import Comm
from .devicemanager import Devicemanager
from .processingqueue import Queue
from .pluginmanager import Pluginmanager
class Gascamcon... | OpenSO2/gascamcontrol | gascamcontrol/gascamcontrol.py | gascamcontrol.py | py | 4,252 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "conf.Conf",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "tui.Tui",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "diskmanager.Diskmanager",
"li... |
73377302622 | import numpy as np
import math
import copy
import itertools
import requests
from scipy import interpolate
from sklearn.cluster import KMeans
from shapely.geometry import Point
from shapely.geometry.polygon import Polygon
from collections import defaultdict
from scipy.spatial import ConvexHull, convex_hull_plot_2d
fro... | denizkenankilic/reconnaissance | ZoningProblem.py | ZoningProblem.py | py | 10,852 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "copy.deepcopy",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "scipy.spatial.ConvexHull",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "numpy.array",
... |
9914430011 | import typing
import time
import os
import spacy
import pymysql
from docx import Document
from datetime import datetime
start = time.time()
collins = {5: -1, 4: -1, 3: 0, 2: 1, 1: 2, 0: 3}
oxford = {1: -3, 0: 0}
tag = {"zk": -2, "gk": -1, "cet4": 0, "ky": 1, "cet6": 1, "toefl": 1,
"ielts": -1, "gre": 1}
maximu... | goldenapple1/labeling | labeling.py | labeling.py | py | 5,373 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "time.time",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "os.listdir",
"li... |
16092902562 | import os, sys
from pathlib import Path
apps = []
if m.is_android:
m.link_glob(DOTFILES/"config/termux", "~/.termux")
else:
apps += [
"xorg",
"river",
"hypr",
"awesome",
"qtile",
"sxhkd",
"picom",
"zathura",
"taskwarrior",
"sxiv"... | YohananDiamond/dotfiles | config/dots/sysmrc.py | sysmrc.py | py | 2,909 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pathlib.Path",
"line_number": 74,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 74,
"usage_type": "attribute"
},
{
"api_name": "sys.stderr",
"line_number": 77,
"usage_type": "attribute"
},
{
"api_name": "sys.stderr",
"line_n... |
72170003102 | #import os
from config import DATABASE_URL
from app import app
from datetime import datetime
import random
from sqlalchemy import create_engine, Column, String, Integer, ForeignKey, DateTime, func, PrimaryKeyConstraint,text
from sqlalchemy import Table, Text,MetaData
from sqlalchemy.ext.declarative import declarative... | fatoumatasylla/SlackBot | models.py | models.py | py | 7,906 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "config.DATABASE_URL",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.create_engine",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.ext.declarative.declarative_base",
"line_number": 26,
"usage_type": "call"
},
... |
42716992094 | import sys
sys.path.append("/usr/local/lib/python3.9/site-packages")
from xlwt import Workbook
wb = Workbook()
sheet = wb.add_sheet('Order Book', cell_overwrite_ok=True)
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
from s... | dshubham771/bot | bot.py | bot.py | py | 24,277 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "sys.path.append",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "xlwt.Workbook",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.chrome.se... |
6669108952 | from flask import (
Blueprint, flash, g, redirect, render_template, request, url_for, Flask, send_from_directory, current_app,session
)
from werkzeug.exceptions import abort
from flask_login import login_required, current_user
from asc.schema import Flight, SchemaError, Aircraft, Pilot, Slot
from sqlalchemy import... | ascgliding/flights310 | flights.py | flights.py | py | 32,096 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "flask.current_app",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "flask.Blueprint",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "flask_wtf.FlaskForm",
"line_number": 43,
"usage_type": "name"
},
{
"api_name": "wtforms.fields.... |
10145595063 | import tensorflow as tf
from datasets.cifar10 import Cifar10 as Dataset
EMBEDDING_SIZE = 3
class Cifar10:
def __init__(self, learning_rate):
self.learning_rate = learning_rate
"""--------------------------------------------------------------------------------------------------------------"""
... | smivv/tensorflow-cifar-10 | nets/cifar10.py | cifar10.py | py | 6,273 | python | en | code | 4 | github-code | 7 | [
{
"api_name": "tensorflow.variable_scope",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "tensorflow.cast",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "tensorflow.float32",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "ten... |
41161031534 | import copy
import datetime
import json
import logging.config
import os
import random
import re
import sys
import time
import uuid
from datetime import datetime as dt
import jctconv
import requests
LOG_CONF = "./logging.conf"
logging.config.fileConfig(LOG_CONF)
from bs4 import BeautifulSoup
from k... | 44maru/MkBotInputJson | jsonMaker.py | jsonMaker.py | py | 17,240 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "logging.config.config.fileConfig",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "logging.config.config",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "logging.config",
"line_number": 17,
"usage_type": "name"
},
{
"api_na... |
7724549283 | from config.dbconfig import pg_config
import psycopg2
class RequestDAO:
global list
list = set()
def __init__(self):
connection_url = "dbname=%s user=%s password=%s host=127.0.0.1" % (pg_config['dbname'],
pg_config['user'],
... | anthonyz15/DB | dao/request.py | request.py | py | 5,501 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "config.dbconfig.pg_config",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "config.dbconfig.pg_config",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "config.dbconfig.pg_config",
"line_number": 10,
"usage_type": "name"
},
{
"api_n... |
30999225575 | from keras.models import Sequential
from keras.layers import Dense
from keras.models import model_from_json
from keras import optimizers
import numpy as np
import os
import pandas as pd
import sys, getopt
from optparse import OptionParser
from pathlib import Path
def train_model(train,truth):
# Load dataset
d... | flavioconterato/python | exams/deepersystem.py | deepersystem.py | py | 6,396 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pandas.read_csv",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "keras.models.Sequential",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "keras.layers.... |
36520792201 | from collections import OrderedDict
from couler.core import states, utils
def config_defaults(name_salter=None, service_account: str = None):
"""
Config couler defaults.
:param name_salter: function to salt workflow names.
:param service_account: name of the default Kubernetes
ServiceAccount ... | couler-proj/couler | couler/core/config.py | config.py | py | 3,740 | python | en | code | 855 | github-code | 7 | [
{
"api_name": "couler.core.states._workflow_name_salter",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "couler.core.states",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "couler.core.states.default_service_account",
"line_number": 18,
"usage_t... |
32580711636 |
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
class CandidateEmail:
Emailbutton = "//a[@id='btn-email']"
EmailSubject = "//input[@name='subject']"
emailIframe = "//div[@class='tox-edit-area']/iframe"
EmailBody = "//*[@id='tinymce']"
Ad... | Shiv180399/TestPython | pageObjects/CandidateEmail.py | CandidateEmail.py | py | 2,787 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "time.sleep",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 39,
... |
43480322638 | import hardware
async def set_rtc_time(secrets):
import rtc
import time
import asyncio
print("Setting NTP server...")
hardware.espwifi.esp.sntp_config(True, secrets['timezone'], secrets['ntp_server'])
# Get the time, check the year, if it is 1970 then retry every 10 seconds
t = hardwar... | smokethis/pico-testing | timehandler.py | timehandler.py | py | 1,704 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "hardware.espwifi.esp.sntp_config",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "hardware.espwifi",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "hardware.espwifi",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_na... |
3401888745 | import random
import discord
import os
from discord.ext import commands
class Imgspam(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command()
async def cat(self, ctx):
rand = random.choice(os.listdir("/root/TomodachAI/cats"))
await ctx.send(file=discord.File("ca... | ConnorBambrough/TomodachAI | cogs/imgspam.py | imgspam.py | py | 1,180 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "discord.ext.commands.Cog",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "random.choice",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.lis... |
28485466399 | import unittest
from microservices import postgres_mode as pm
from microservices.xml_handler import XmlReport as XHXmlReport
from microservices.xml_handler import XmlRequest
from bs4 import BeautifulSoup
class XHUnitTestXmlReport(XHXmlReport):
def __init__(self):
pass
class TestManager(unittest.TestCase):... | Wenfort/concurent_site_release | microservices/tests/test_xml_handler.py | test_xml_handler.py | py | 12,694 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "microservices.xml_handler.XmlReport",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "unittest.TestCase",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "microservices.postgres_mode.custom_request_to_database_without_return",
"line_numbe... |
34270765913 | from functools import cmp_to_key
def in_order(a, b):
if type(a) != type(b):
# one int and one list
if type(a) == int:
a = [a]
else:
b = [b]
return in_order(a, b)
if type(a) == int:
# two ints
return a - b
else:
# two lists
... | jisaa/coding | Advent of Code 2022/day13.py | day13.py | py | 995 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "functools.cmp_to_key",
"line_number": 44,
"usage_type": "call"
}
] |
26932026367 | from tkinter import *
from tkinter import ttk
from bittrex.bittrex import Bittrex
from firebase import firebase
def login(*args):
try:
# value = apikey.get()
bittrex = Bittrex(apikey.get(), apisecret.get())
print(bittrex.get_balances())
# meters.set((0.3048 * value * 10000.0 + 0.5) / 10000.0)
except ValueEr... | wululoo/trade-watcher | main.py | main.py | py | 1,511 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "bittrex.bittrex",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "bittrex.bittrex.Bittrex",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "bittrex.bittrex.get_balances",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "... |
23545119997 | # -*- coding: utf-8 -*-
import django_filters
from ipware import get_client_ip
from django_filters import rest_framework as filters
from django.conf.urls import url, include
from django.shortcuts import get_list_or_404, get_object_or_404
from rest_framework import generics
from rest_framework import authentication, vie... | over55/workery-django | workery/tenant_api/views/vehicle_type.py | vehicle_type.py | py | 3,616 | python | en | code | 10 | github-code | 7 | [
{
"api_name": "rest_framework.generics.ListCreateAPIView",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.generics",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "tenant_api.serializers.vehicle_type.VehicleTypeListCreateSerializer",
... |
22683609833 | from django.forms import Textarea,TextInput,Select
from django import forms
db_type_choice = (
("","请选择"),
("mysql","MySQL"),
("oracle","Oracle"),
("postgresql","PostgreSQL")
)
class RdsInstanceSearchForm(forms.Form):
search_instance_name = forms.CharField(
widget = TextInput(attrs = {"id"... | sxf123/sxf-devops | cmdb/forms/RdsInstanceForm.py | RdsInstanceForm.py | py | 1,354 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "django.forms.Form",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "django.forms.CharField",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "django.for... |
21487173065 | from sqlalchemy import select
from fin.adapters.db.db_schemas.db_model import Target
from fin.adapters.repository.target.error import TargetNotFoundError
from fin.adapters.repository.repository import Repository
class TargetRepository(Repository):
def __init__(self, db_session) -> None:
"""Init."""
... | beilak/HomeRP_Finance | fin/adapters/repository/target/target.py | target.py | py | 1,781 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "fin.adapters.repository.repository.Repository",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "fin.adapters.db.db_schemas.db_model.Target",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "fin.adapters.repository.target.error.TargetNotFoundError"... |
72277232224 | from sys import path
path.insert(1, '/marconi/home/userexternal/crodrigu/Plasma/prod/2D_FELTOR_Analysis/')
from Analysis import Analyse
from os.path import join, exists, isdir
from os import chdir
from numpy import average, shape, amax, absolute
from time impo... | carlosmhd27/Feltor_2D_Master_Thesis | Miscellanious/Comparison.py | Comparison.py | py | 2,598 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "sys.path.insert",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 2,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number":... |
33077422740 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4 nu
# maintainer: Fadiga
from __future__ import (
unicode_literals, absolute_import, division, print_function)
from datetime import datetime
from peewee import (DateTimeField, IntegerField, CharField, FloatField,
Bool... | Ciwara/DE-ENCAISSEMENT | models.py | models.py | py | 5,194 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "datetime.datetime.now",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "Common.models.BaseModel",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "peewe... |
4249876332 | from domain.auth import AuthScheme
from framework.rest.blueprints.meta import MetaBlueprint
from quart import request
from services.mfp.mfp_service import MyFitnessPalService
myfitnesspal_bp = MetaBlueprint('myfitnesspal_bp', __name__)
@myfitnesspal_bp.configure('/api/mfp/diary/sync', methods=['POST'], auth_scheme=A... | danleonard-nj/fitness-api | routes/mfp.py | mfp.py | py | 926 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "framework.rest.blueprints.meta.MetaBlueprint",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "services.mfp.mfp_service.MyFitnessPalService",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "services.mfp.mfp_service.MyFitnessPalService",
"line... |
38828088591 | """“add_correct_upload_flow”
Revision ID: bba506e94efd
Revises: 4d8618cc75d4
Create Date: 2023-01-08 21:56:30.201614
"""
import sqlalchemy_utils
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'bba506e94efd'
down_revision = '4d8618cc75d4'
branch_labels = None
depen... | NwaforAugustine321/ktizo-backend | alembic/versions/bba506e94efd_add_correct_upload_flow.py | bba506e94efd_add_correct_upload_flow.py | py | 1,600 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "alembic.op.create_table",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "sqlalchemy_utils... |
35357275746 | #Main class for the game
#Important modules
import sys
import pygame
from settings import *
from ship import *
from bullet import *
from alien import *
from time import sleep
from game_stats import GameStats
from button import *
from scoreboard import *
class AlienInvasion:
"""Class to manage the game... | Tiago851/Alien-Invasion | alien_invasion.py | alien_invasion.py | py | 9,160 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pygame.init",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "pygame.FULLSC... |
19181808183 | from sanic.response import json
from sanic import Blueprint
from Base.MongoDB.mac import query_mac_change_by_ip, query_mac_change_by_owner
from Decorators import permission
from documentation.log.mac_change_doc import (
MacChangeGetLogByUsernameDoc,
MacChangeGetLogByIpDoc,
)
bp_log_mac = Blueprint("log-mac")
... | YuntechNet/YunNet-Backend | api/log/mac_change.py | mac_change.py | py | 787 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "sanic.Blueprint",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "Base.MongoDB.mac.query_mac_change_by_owner",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "sanic.response.json",
"line_number": 19,
"usage_type": "call"
},
{
"ap... |
19817242529 | import pygame
class Controls:
def __init__(self):
self.forward = False
self.left = False
self.right = False
self.reverse = False
def update(self, event):
if event.key == pygame.K_LEFT:
self.left = not self.left
if event.key == pygame.K_RIGHT:
... | maxscheidl/AI-Race | AI Evolution/controls.py | controls.py | py | 830 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pygame.K_LEFT",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "pygame.K_RIGHT",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "pygame.K_DOWN",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "pygame.K_UP... |
34502428658 | import argparse
import os
from datasets import llp_variant_generation
import pandas as pd
import numpy as np
from copy import deepcopy
from sklearn.preprocessing import MinMaxScaler
from sklearn.cluster import KMeans
from datasets import llp_variant_generation
from datasets_gen_info import CANDIDATES
from sklearn.datas... | gaabrielfranco/llp-variants-datasets-benchmarks | dataset_gen_multiclass.py | dataset_gen_multiclass.py | py | 8,303 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "numpy.unique",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "numpy.empty",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.where",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "numpy.count_nonzero",
"line_... |
4627673382 | import boto3
from flask import Flask, render_template, request
import base64
import os
import json
app = Flask(__name__)
# Get AWS credentials from environment variables
aws_access_key_id = os.environ["AWS_ACCESS"]
aws_secret_access_key = os.environ["AWS_SECRET"]
# Create a new session using the credentials
session... | abzdel/image-classifier-web-app | app.py | app.py | py | 2,173 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "flask.Flask",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "boto3.Session",
"line_... |
31095371499 | import sys
from collections import deque
h, w = map(int, input().split())
# 가능한 패턴
ptn1 = 'WB' * 4
ptn2 = 'BW' * 4
# 칠해야 할 칸의 수를 표시
cnt1 = deque([0 for _ in range((w-7)*(h-7))])
cnt2 = deque([0 for _ in range((w-7)*(h-7))])
# i행 j열에서 시작하는 체스판의 index n = i*(w-7) + j
for i in range(h):
color = input()
if (i%2)... | dee021/CodingTest | 백준/Silver/1018. 체스판 다시 칠하기/체스판 다시 칠하기.py | 체스판 다시 칠하기.py | py | 876 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "collections.deque",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "collections.deque",
"line_number": 11,
"usage_type": "call"
}
] |
38221507137 | from bs4 import BeautifulSoup as bs
import pandas as pd
with open('onion_data.xls', 'r') as f:
content = f.read()
soup = bs(content, 'html5lib')
data = []
table = soup.find('table')
for tr in table.findAll('tr'):
row = []
count = 0
for td in tr.findAll('td'):
if count != 0:
row.... | siramk/DS250_PROJECT_VEGETABLE_PRICE_ANALYSIS | data collection/data_scrapeing_ds250.py | data_scrapeing_ds250.py | py | 856 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "bs4.BeautifulSoup",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 34,
"usage_type": "call"
}
] |
38119039562 | #from datetime import datetime
from datetime import datetime, timedelta
import pytz
from tqdm import tqdm
import ccxt
import numpy as np
import pandas as pd
from itrader.price_handler.BINANCE_Live import BINANCELiveStreamer
from .base import PriceHandler
from .base import SqlHandler
import logging
logger = logging... | tiziaco/crypto-exchange-dashboard | app/main/models/data/CCXT_data_provider.py | CCXT_data_provider.py | py | 15,122 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "base.PriceHandler",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "base.SqlHandler",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "itrader.price_han... |
21563345883 | # -*- coding: utf-8 -*-
__author__ = "You-Sheng Lin"
__copyright__ = "Copyright (C) 2019"
__license__ = "AGPL"
__email__ = "pyquino@gmail.com"
from math import ceil, sqrt, hypot
import matplotlib.pyplot as plt
sampling_time = 0.001
Amax = 2500
def interpolation_2d(ox, oy, x, y, f):
length = hypot((x - ox), (... | kmolLin/motion_control | core/v_planning.py | v_planning.py | py | 5,140 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "math.hypot",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "math.ceil",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "math.ceil",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_number": 29,
... |
18990113260 | """thin-edge.io client"""
import logging
import json
import time
import re
import os
import threading
from typing import Any, List
import requests
from paho.mqtt.client import Client, MQTTMessage
from .config import Config
from .topics import health_topic
from .management.worker import Worker, Job
from .management impo... | thin-edge/tedge-demo-container | images/child-device/connector/client.py | client.py | py | 8,046 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "config.Config",
"line_number": 42,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number... |
13415230978 | import os
import random
import numpy as np
import torch
import torchvision.utils as tvu
import torchsde
from .Improved_Diffusion_Unconditional.improved_diffusion.sc09_spectrogram_dataset import melspec_inv_standardize, melspec_standardize
from .Improved_Diffusion_Unconditional.improved_diffusion.script_util import cr... | cychomatica/AudioPure | diffusion_models/improved_diffusion_sde.py | improved_diffusion_sde.py | py | 8,971 | python | en | code | 16 | github-code | 7 | [
{
"api_name": "torch.load",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 41,
"usage_type": "attribute"
},
{
"api_name": "torch.linspace",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "torch.cumprod",
"line_num... |
72844452702 | # BSD 3-Clause License
#
# Copyright (c) 2017,
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list o... | Ascend/ModelZoo-PyTorch | ACL_PyTorch/contrib/cv/classfication/Conformer_Ti/conformer_pth2onnx.py | conformer_pth2onnx.py | py | 4,296 | python | en | code | 31 | github-code | 7 | [
{
"api_name": "conformer.Conformer",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "collections.OrderedDict",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "torch.load",
"line_number": 75,
"usage_type": "call"
},
{
"api_name": "torch.randn",
... |
38106947957 | import os
import sys
import time
import torch
import argparse
import numpy as np
from tqdm import tqdm
def cald(y, x, idx):
'''calculate ay/a(x_idx)'''
return torch.autograd.grad(y, x, grad_outputs=torch.ones_like(y), create_graph=True)[0][:,idx-1].reshape(-1, 1)
def autograd(y:torch.tensor, x:torch.tensor, o... | HarryPotterXTX/HOPE | auto.py | auto.py | py | 2,979 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "torch.autograd.grad",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "torch.autograd",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "torch.ones_like",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "torch.tensor"... |
19627269350 | from bs4 import BeautifulSoup
import requests
uname=input("Enter username:")
source=requests.get("https://myanimelist.net/profile/"+uname).text
soup=BeautifulSoup(source,'lxml')
#print(soup.prettify())
t1=soup.find('title').text
print(t1)
t2=soup.find('div',class_='stat-score di-t w100 pt8').text
print(t2)
print("A... | Soham13U/RyuBot | .idea/anime.py | anime.py | py | 1,746 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "requests.get",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 6,
"usage_type": "call"
}
] |
6507292150 | import numpy as np
import numpy.testing as npt
import pytest
from pycudadecon import affineGPU, deskewGPU, rotateGPU
def test_deskew(raw_image, deskewed_image):
"""test basic deskewing of a file aquired on a lattice light sheet"""
deskewed = deskewGPU(raw_image, dzdata=0.3, angle=31.5, pad_val=98)
npt.ass... | tlambert03/pycudadecon | tests/test_affine.py | test_affine.py | py | 2,308 | python | en | code | 54 | github-code | 7 | [
{
"api_name": "pycudadecon.deskewGPU",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.testing.assert_allclose",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.testing",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "pyte... |
14261227905 | from connect import cursor as c
import utils
db = utils.read("DB: ")
table = utils.read("Table: ")
try:
sql = """INSERT INTO {}.dbo.{}
VALUES(100001,'John Rambo',100,'HD')""".format(db,table)
c.execute(sql)
print(f'A new record has been created!!!')
except ConnectionError:
print("Cannot connect ... | Sopcha/SusRepo | week05 - Python/pythonsql/insertone.py | insertone.py | py | 335 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "utils.read",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "utils.read",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "connect.cursor.execute",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "connect.cursor",
"line... |
33160750861 | from django.shortcuts import render
from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseForbidden
from django.views.decorators.csrf import csrf_exempt
from django.conf import settings
from linebot import LineBotApi, WebhookParser
from linebot.exceptions import InvalidSignatureError, LineBotApiEr... | Xupertomato/toolmanbot | toolmanbot/views.py | views.py | py | 7,832 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "linebot.LineBotApi",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "django.conf.settings.LINE_CHANNEL_ACCESS_TOKEN",
"line_number": 39,
"usage_type": "attribute"
},
{
"api_name": "django.conf.settings",
"line_number": 39,
"usage_type": "name"
}... |
28678134812 | #!/usr/bin/env python
# coding: utf-8
# Trader Joe's web site is designed in a way that information of a store can be find by
#first determining the state where the store is located. Thus, [list of states in which
#Trader Joe's located](https://locations.traderjoes.com/) is welcomed us. Then, one needs
#to determin... | ytalp17/TJ | TraderJoes.py | TraderJoes.py | py | 11,221 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "requests.get",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"... |
72101254624 | import math
import logging
from functools import partial
from collections import OrderedDict
import torch
import torch.nn as nn
import torch.nn.functional as F
from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
# from .layers import StdConv2dSame, DropPath, to_2tuple, trunc_normal_
from timm.models.laye... | KyrieXDL/transformer_inpainting | models/vision_transformer.py | vision_transformer.py | py | 6,990 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "torch.nn.Module",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "torch.nn.GELU",
"... |
28868753739 | class TheisWell:
"""Theis (1935) radial flow solution.
The default TheisWell object uses the default Aq2dConf and WellGrid
classes. The WellGrid class includes the default Well class. Methods
include radius of influence .ri, transient drawdown at a point .dd and
grid-contoured drawdown at specified... | Moofbytes/PyGAF | pygaf/solutions/theis_1935.py | theis_1935.py | py | 11,703 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "numpy.sqrt",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "numpy.log",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "scipy.special.expn",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "numpy.pi",
"line_number":... |
7076856611 | from kivy.uix.boxlayout import BoxLayout
from kivy.uix.image import AsyncImage
from kivy.uix.stacklayout import StackLayout
from kivy.lang.builder import Builder
from kivy.properties import NumericProperty
from kivy.app import App
from discord import TextChannel
from kivy.uix.button import Button
from kivy.clock import... | Jaffies/PrikolCord | server_widget.py | server_widget.py | py | 3,511 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "kivy.lang.builder.Builder.load_string",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "kivy.lang.builder.Builder",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "kivy.uix.stacklayout.StackLayout",
"line_number": 75,
"usage_type": "name... |
72158061342 | import json
import cv2
import numpy as np
from PIL import Image
from torch.utils import data as data
class ImageData(data.Dataset):
def __init__(self, files, trans, trans2, tokenizer):
super(ImageData, self).__init__()
self.files = files
self.vae_transforms = trans
self.yolo_transf... | YZBPXX/test | datas/datasets.py | datasets.py | py | 1,599 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "torch.utils.data.Dataset",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "torch.utils.data",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "torch.utils.data",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "json.lo... |
27771970709 | from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import collections
import shlex
class CommandStringParser(object):
"""Object which builds and returns all metadata about string and flags.
Attributes:
command_node: calliope._CommandCommon, The com... | twistedpair/google-cloud-sdk | google-cloud-sdk/lib/googlecloudsdk/core/util/command_string_parser.py | command_string_parser.py | py | 15,668 | python | en | code | 55 | github-code | 7 | [
{
"api_name": "collections.OrderedDict",
"line_number": 49,
"usage_type": "attribute"
},
{
"api_name": "collections.OrderedDict",
"line_number": 124,
"usage_type": "attribute"
},
{
"api_name": "collections.OrderedDict",
"line_number": 171,
"usage_type": "attribute"
},
... |
13276453788 | # iotest.py Test PR #3836 timing using GPIO pins.
import io, pyb
import uasyncio as asyncio
import micropython
micropython.alloc_emergency_exception_buf(100)
MP_STREAM_POLL = const(3)
MP_STREAM_POLL_RD = const(1)
y1 = pyb.Pin('Y1', pyb.Pin.OUT)
class MyIO(io.IOBase):
def __init__(self):
self.ready = Fal... | kelsonengineering/micropython-samples | uasyncio_iostream/tests/iotest.py | iotest.py | py | 1,786 | python | en | code | null | github-code | 7 | [
{
"api_name": "micropython.alloc_emergency_exception_buf",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pyb.Pin",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "io.IOBase",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "pyb.T... |
42576915579 | from bs4 import BeautifulSoup
from urllib.request import urlretrieve
import os
import time
import requests
if __name__ == '__main__':
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
}
# List Urls
url ... | darcccccc/photo_crawler | crawler.py | crawler.py | py | 3,779 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "requests.get",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"... |
11462570644 | # Prim's algorithm #
# Time: O(N^2 * log(N))
# Space: O(N^2)
import heapq
from collections import defaultdict
points=[[0,0],[2,2],[3,10],[5,2],[7,0]]
N=len(points)
#https://leetcode.com/problems/min-cost-to-connect-all-points/solution/
### Actually dont even need adjacency list
adj=defaultdict(list)
for i in range(N):
... | Johnkhk/Algorithms | prims MST algo.py | prims MST algo.py | py | 845 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "collections.defaultdict",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "heapq.heappop",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "heapq.heappush",
"line_number": 31,
"usage_type": "call"
}
] |
32025331547 | # Title: Medium Asteroid Class
# Filename: medium.py
# Purpose: Creates a
# class for a
# medium asteroid
# object to be used in
# the asteroid program.
# Date: 03/01/2021
###############################################
import arcade
import constants
impor... | fellj/cs241a | Assignments/assign10/medium.py | medium.py | py | 2,284 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "asteroid.Asteroid",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "arcade.load_texture",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "constants.MEDIUM_ROCK_RADIUS",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name"... |
70996520543 | from abc import ABC, abstractmethod
import attrs
from data_diff.abcs.database_types import (
Array,
TemporalType,
FractionalType,
ColType_UUID,
Boolean,
ColType,
String_UUID,
JSON,
Struct,
)
from data_diff.abcs.compiler import Compilable
@attrs.define(frozen=False)
class Abstract... | datafold/data-diff | data_diff/abcs/mixins.py | mixins.py | py | 7,023 | python | en | code | 2,618 | github-code | 7 | [
{
"api_name": "abc.ABC",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "attrs.define",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "data_diff.abcs.database_types.ColType",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "abc.abstra... |
11077892580 | from sympy import symbols, preorder_traversal, Float
import re
import sys
import subprocess
import math
def separate(somelist):
imaginary = []
real = []
for expression in somelist:
if 'i' in expression:
if len(expression) > 2:
imaginary.append(expression[:-2])
... | haveyouheardofthehighelves/ImaginaryGraphVisualization | expansion.py | expansion.py | py | 8,571 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "math.pi",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "math.sin",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "math.cos",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "sympy.expand",
"line_number": 112,... |
19082393859 | import importlib
import numpy as np
import traceback
import sys
import vis_pygame as vis
import gzip, pickle
from datetime import datetime
import os
import getopt
# Class avatar is a wrapper for the agent with extra bits required
# for runnin the game
class Avatar:
# Initialise avatar for an agent of a given pla... | Camaz993/AI_Example | game.py | game.py | py | 26,596 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "numpy.zeros",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.floor",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "numpy.log2",
"line_number": 4... |
7129806478 | from matplotlib import pyplot as plt
from sklearn.preprocessing import LabelBinarizer
from sklearn.metrics import roc_curve, auc, roc_auc_score
import numpy as np
def multiclass_roc_auc_score(y_test, y_pred, target_list, multiclass=True, average="macro"):
#returns roc_auc score and plots roc curve
plt.figure(f... | niccolot/CDOPA | test_utils.py | test_utils.py | py | 3,452 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "sklearn.preprocessing.LabelBinarizer",
"line_number": 11,
"usage_type": "call"
},
{
"api... |
74069394463 | from tokenizers import ByteLevelBPETokenizer
tokenizer = ByteLevelBPETokenizer('vocab/vocab.json', 'vocab/merges.txt')
tokenizer.enable_truncation(max_length=512)
token_text = tokenizer.encode("<number> hdG jRGd JYGWj GdehGO GdGajhfjI, dG SjeG aj Tcd GdgjQhjf, jJSHH aj eYXe WdH YdGL JYGWj GdeNOQGJ aj eYXe HdOGf hSW ... | cs2r/KSU_MSA_RoBERTa | test_tokenizer.py | test_tokenizer.py | py | 375 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "tokenizers.ByteLevelBPETokenizer",
"line_number": 3,
"usage_type": "call"
}
] |
25046185730 | from DataBase import DB_movie,DB_proxy
from web import web
import time
class spider_master(object):
def __init__(self):
self.spider = None
self.movie_db().clear()
def movie_db(self):
tmp=DB_movie()
return tmp.operator
def scrapy_main(self):
self.scrap... | vimalk78/Code_training | pythonTools/spider.py | spider.py | py | 1,917 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "DataBase.DB_movie",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number... |
6654687916 | import csv
import threading
import time
import cv2
import numpy as np
import os
import queue
import random
class CSI_Camera:
def __init__(self, sensor_id=None):
self.video_capture = None
self.frame = None
self.grabbed = False
self.read_thread = None
self.read_lock = threa... | mojtaba1989/jetson | imx21983driver.py | imx21983driver.py | py | 8,821 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "threading.Lock",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "cv2.CAP_GSTREAMER",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "threading.Thre... |
29769058985 | from dataclasses import dataclass
from typing import List, Optional
from neoclient import Service, base_url, get
@dataclass
class Repository:
id: int
name: str
description: Optional[str]
@base_url("https://api.github.com/")
class GitHub(Service):
@get("users/{user}/repos")
def list_repos(self, ... | neoclient/neoclient | examples/github.py | github.py | py | 535 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "typing.Optional",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "dataclasses.dataclass",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "neoclient.Service",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "neoclient.get"... |
4392301017 | # -*- coding: utf-8 -*-
import torch
from torch import nn, Tensor
from abc import ABC, abstractmethod
from ctp.kernels import BaseKernel
from ctp.reformulators.util import AttentiveLinear
from typing import List, Optional
import logging
logger = logging.getLogger(__name__)
class BaseReformulator(ABC, nn.Module)... | uclnlp/ctp | ctp/reformulators/base.py | base.py | py | 7,939 | python | en | code | 49 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "abc.ABC",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "torch.nn.Module",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_n... |
7184631363 | from aiounittest import AsyncTestCase
from aiounittest.mock import AsyncMockIterator
from unittest.mock import Mock
async def fetch_some_text(source):
res = ''
async for txt in source.paginate():
res += txt
return res
class MyAsyncMockIteratorTest(AsyncTestCase):
async def test_add(self):
... | kwarunek/aiounittest | tests/test_asyncmockiterator.py | test_asyncmockiterator.py | py | 646 | python | en | code | 55 | github-code | 7 | [
{
"api_name": "aiounittest.AsyncTestCase",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "unittest.mock.Mock",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "aiounittest.mock.AsyncMockIterator",
"line_number": 17,
"usage_type": "call"
}
] |
73293315104 | import os
from PIL import Image
import numpy as np
bs_dir = '/mnt/lustre/fnzhan/datasets/CVPR2022/night2day/'
sv_dir = bs_dir + 'split/test/'
im_dir = bs_dir + 'test/'
nms = os.listdir(im_dir)
# n = 0
for nm in nms:
im_path = im_dir + nm
im = Image.open(im_path)
im = np.array(im)
inp, gt = im[:, 0:25... | fnzhan/MoNCE | SPADE_MoNCE/util/split_night2day.py | split_night2day.py | py | 470 | python | en | code | 31 | github-code | 7 | [
{
"api_name": "os.listdir",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "numpy.array",
"line_number": ... |
36354187057 | import cv2 as cv
img =cv.imread('photos/dog.jpg')
img =cv.resize(img, (400,250))
cv.imshow('Dog', img)
gray = cv.cvtColor(img, cv.COLOR_RGB2GRAY)
cv.imshow('Gray', gray)
#Simple Thresholding
threshold, thresh = cv.threshold(gray, 150, 255, cv.THRESH_BINARY)
cv.imshow('Thresholded Simple', thresh)
#Simle thersholdin... | AI-drian/OpenCv_course | thresholding.py | thresholding.py | py | 847 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "cv2.imread",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "cv2.resize",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": 7,
... |
30358403012 | import pika
import json
import time
import os
import logging
import django
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")
django.setup()
from users.models import User, Notification, NotificationInfo
from feedback.models import Playlist
from config import settings
from podcast.models import Podcast... | hosseink9/RSSfeed-Project | src/consumer.py | consumer.py | py | 3,167 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "os.environ.setdefault",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "django.setup",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
... |
299253654 | from PyQt6.QtWidgets import QApplication, QPushButton, QMainWindow, QVBoxLayout, QWidget, QLabel, QColorDialog, QHBoxLayout
from PyQt6.QtCore import QTimer
import sys
import glob
from time import sleep
import serial
import threading
def setInterval(func,time):
e = threading.Event()
while not e.wait(time):
... | 1MarBur1/Jingle-Bells | main.py | main.py | py | 5,814 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "threading.Event",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sys.platform.startswith",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sys.platform",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "sys.platfor... |
73111331424 | #!/usr/bin/env python
"""Create a reduced image of the detector readings from a Mantid workspace.
This reduces the detector readings for each pixel by integrating in the time
dimension.
"""
from __future__ import print_function
from __future__ import division
import string
import mantid.simpleapi
import plotly
imp... | player1537-playground/EQSANS-autoreduce-plot | reduce_EQSANS.py | reduce_EQSANS.py | py | 8,040 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "numpy.array",
"line_number": 88,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 89,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 90,
"usage_type": "call"
},
{
"api_name": "numpy.unique",
"line_number":... |
16322459085 | import os
import re
from collections import deque
from gi import require_version
from gi.repository import Gtk
from gi.repository.GLib import timeout_add, source_remove, idle_add, unix_signal_add, PRIORITY_HIGH
require_version('AppIndicator3', '0.1')
from gi.repository import AppIndicator3 as appIndicator
from cpulib.... | rualark/CpuIndicator | cpulib/icon.py | icon.py | py | 2,727 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "gi.require_version",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "cpulib.run.run",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "re.split",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "gi.repository.AppIndicator3... |
22895213215 | import rasterio
import fiona
import rasterio.warp as warp
from rasterio.mask import mask
from rasterio.warp import Resampling
import os
from glob import glob
import numpy as np
from shapely.geometry import mapping, shape
from affine import Affine
from pyproj import Proj, transform
from s2cloudless import S2PixelCloudDe... | oyssko/Sentinel_2_ThinSeaIceThickness | raster_utils.py | raster_utils.py | py | 16,838 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "rasterio.warp.Resampling.nearest",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "rasterio.warp.Resampling",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "rasterio.warp.Resampling.bilinear",
"line_number": 20,
"usage_type": "attr... |
20337515484 | from socket import *
import sys
from threading import *
from datetime import datetime
import os
import art
def clear():
if os.name == 'nt':
_ = os.system('cls')
else:
_ = os.system('clear')
clear()
print(art.text2art(" Port Scanner"))
try:
host ... | Pritam1729/TCP_Port_Scanner | TCP_Port_Scanner.py | TCP_Port_Scanner.py | py | 2,455 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "os.name",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.system",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.system",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "art.text2art",
"line_number": 17... |
31081980679 |
from PyQt5 import QtCore, QtWidgets, Qt, uic
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
import sys
from pb_Woo_Order_Class import PbWooCommerce
from cls_web_order import webOrderUI
from cls_stock_levels import stockUI
import fnc_meta_processing
import dialog_functions
import delivery_note_printing
# Se... | thetonto/PBWebOrder | cls_Load_Orders.py | cls_Load_Orders.py | py | 8,272 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pb_Woo_Order_Class.PbWooCommerce",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets.QMainWindow",
"line_number": 38,
"usage_type": "attribute"
},
{
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.