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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
38458190228 | import pprint
import requests
from flask import Blueprint, render_template
from keys import KAKAO_REST_KEY
KAKAO_BASE_URL = 'https://dapi.kakao.com'
header = {'Authorization' : 'KakaoAK ' + KAKAO_REST_KEY}
news_blueprint = Blueprint('news', __name__)
@news_blueprint.route('/main')
def news_main():
return 'welc... | Just-NB/SoA_practice | views/menus.py | menus.py | py | 1,470 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "keys.KAKAO_REST_KEY",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "flask.Blueprint",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "flask.render_template... |
3287182668 | # Written by Seonwoo Min, Seoul National University (mswzeus@gmail.com)
# Some parts of the code were referenced from or inspired by below
# - Tristan Bepler's code (https://github.com/tbepler/protein-sequence-embedding-iclr2019)
# PLUS
""" P-ELMo model classes and functions """
import torch
import torch.nn as nn
imp... | seonwoo-min/PLUS | plus/model/p_elmo.py | p_elmo.py | py | 6,515 | python | en | code | 40 | github-code | 97 | [
{
"api_name": "plus.model.plus_rnn.PLUS_RNN",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "plus.model.plus_rnn.PLUS_RNN",
"line_number": 18,
"usage_type": "argument"
},
{
"api_name": "torch.nn.Linear",
"line_number": 21,
"usage_type": "call"
},
{
"api... |
27895722307 | import cv2
import numpy as np
import mediapipe as mp
from src import string_constants, var, landmark_condition
from pynput.keyboard import Controller, Key
keyboard = Controller()
mp_hands = mp.solutions.hands
hands = mp_hands.Hands()
mp_drawing = mp.solutions.drawing_utils
mp_drawing_styles = mp.solutions.drawing_styl... | nguyenhuy158/final_dip | Part_2/src/utils.py | utils.py | py | 7,104 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pynput.keyboard.Controller",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "mediapipe.solutions",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "mediapipe.solutions",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_na... |
29552633150 | from skimage import feature
import numpy as np
from PIL import Image
class LocalBinaryPatterns:
def __init__(self, numPoints, radius):
# store the number of points and radius
self.numPoints = numPoints
self.radius = radius
def describe(self, image, eps=1e-7):
# compute the Lo... | New-generation-hsc/PPractice | week2/LBP.py | LBP.py | py | 1,546 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "skimage.feature.local_binary_pattern",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "skimage.feature",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "numpy.histogram",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "... |
39968149065 | import socket, cv2, pickle, struct
fuente1 = "rtsp://192.168.226.202:554"
host_ip = '192.168.226.100'
print('HOST IP:',host_ip)
port = 9999
socket_address = (host_ip,port)
# Socket Create
server_socket = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
server_socket.bind(socket_address) # Socket Bind
server_socket.l... | SebastianMerino/TumiROV | camaras/servidor_1cam.py | servidor_1cam.py | py | 782 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "socket.socket",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "socket.AF_INET",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "socket.SOCK_STREAM",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "cv2.VideoCa... |
43465522973 | import requests as r
import config as cfg
from collections import deque
import sys
import time
import os
tree = dict() #
d = dict() #
q = deque() #
used = dict() #
pred = dict() #
fout = open("order.txt", "w")
def nameFromID(id):
response = r.get(
"https://api.vk.com/method/users.get?access_token={0... | SphericalPotatoInVacuum/VK-Social-Graph | script.py | script.py | py | 3,089 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "collections.deque",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "config.token",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line... |
6635893695 | """
Module that reduces scenario_trees and create a graph structure
"""
import time
import matplotlib.pyplot as plt
import networkx as nx
import numpy as np
import pandas as pd
# tree = pd.read_csv('test.csv', delimiter = ';', decimal = ',', header = 0)
# tree = np.array(tree)
# plt.plot(tree)
# n_scen = len(tree[... | paplessix/mines_strat_gaz_nat | strat_gaz/storage_optimisation/tree_reducer.py | tree_reducer.py | py | 6,916 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "pandas.read_csv",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "numpy.ones",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number... |
74107582077 | from django.http import HttpResponse
from django.shortcuts import render
def home(request):
return HttpResponse("Hello!")
def blog(request):
return HttpResponse("Welcome to my Blog! ENJOY!")
def about2(request):
pangalan = 'Rachel'
apelyido = 'Paras'
edad = '20'
return render(request, "about... | maedador/last | UNIVERSITY/views.py | views.py | py | 1,104 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.http.HttpResponse",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.http.HttpResponse",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 15,
"usage_type": "call"
},
{
"api_name"... |
37536313744 | # -*- coding: utf-8 -*-
__author__ = 'Tao Kong'
import logging
import os
import time
from common import globalvariable
PATH = lambda path: os.path.abspath(
os.path.join(
os.path.dirname(__file__), path
)
)
class BasePage:
def __init__(self, appium_driver):
self.__driver = appium_driver
... | sayidkongtao/mobilefwk | common/basepage.py | basepage.py | py | 4,364 | python | en | code | 0 | github-code | 97 | [
{
"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.join",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": ... |
35169969167 | from functools import partial
import logging
import math
from typing import Tuple, List, Callable, Any, Dict, Sequence, Optional
import torch
import torch.nn as nn
@torch.jit.script
def get_padding_size(length, dap_size):
return (int(length / dap_size) + int((length % dap_size)!=0)) * dap_size - length
@torch.ji... | alibaba/BladeDISC | examples/PyTorch/Inference/CUDA/AlphaFold/FoldAcc/foldacc/model/modules/utils.py | utils.py | py | 12,831 | python | en | code | 707 | github-code | 97 | [
{
"api_name": "torch.jit",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "torch.Tensor",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.functional.pad",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "torch.nn",
... |
1320913686 | import tensorflow as tf
import numpy as np
from typing import Tuple, Optional, Union
from models.Subpixel import Subpixel
class SSDCAE(tf.keras.models.Model):
def __init__(
self,
filters:Tuple=(16, 16),
pre_filters:Tuple=(8, 8),
shape:Tuple[int, int, int]=(128, 128,... | ENEmyr/DeepImageCompressor | models/SSDCAE.py | SSDCAE.py | py | 3,908 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "tensorflow.keras",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "typing.Tuple",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "typing.Tuple",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "typing.Tuple",
"lin... |
34583479261 | """
中文文本情感分析
pip3 install snownlp
"""
from snownlp import SnowNLP
text = '愿上天赐予我:接受无法改变之事物的平静,改变可改变之事物的勇气,以及区分,这两者之不同的永恒智慧 --沉思录 奥勒留 '
s = SnowNLP(text)
# 分词
print(s.words)
# 词性标注
tags = [x for x in s.tags]
print(tags)
# 断句
print(s.sentences)
# 拼音
print(s.pinyin)
# 情绪判断,返回值为正面情绪的概率,越接近1表示正面情绪,越接近0表示负面情绪
text1 = '这部电影... | GitHub-fly/ubuntu-python | base/4Apr/4_28.py | 4_28.py | py | 1,024 | python | zh | code | 1 | github-code | 97 | [
{
"api_name": "snownlp.SnowNLP",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "snownlp.SnowNLP",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "snownlp.SnowNLP",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "snownlp.SnowNLP",
... |
33969373697 | # -*- coding: utf-8 -*-
import os, sys
from .config import *
from .importExport import *
import zipfile as zp
import requests # OA 1/10
import shutil
class Menus:
def __init__(self, gui, core):
self.gui,self.core = gui,core
self.cfg = Config(core)
self.dialogs = self.cfg.dialogs
se... | ORTI3D/ORTI3D | menus.py | menus.py | py | 15,910 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "os.sep",
"line_number": 145,
"usage_type": "attribute"
},
{
"api_name": "os.listdir",
"line_number": 156,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 158,
"usage_type": "call"
},
{
"api_name": "os.sep",
"line_number": 171,... |
38683111852 | from django.test import TestCase
from django.urls import reverse
from django.http import JsonResponse
import json
class GetSuggestedFriendsViewTest(TestCase):
def test_get_suggested_friends(self):
# test user_id
user_id = 5
# Loading JSON file with user data
with open('friends/use... | Abk2345/DjangoChatApp | djangoChat/friends/tests.py | tests.py | py | 1,067 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.test.TestCase",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "json.load",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "django.urls.reverse",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "django.http.JsonRes... |
32160276063 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import wagtail.wagtailcore.fields
class Migration(migrations.Migration):
dependencies = [
('product', '0005_auto_20161121_0623'),
]
operations = [
migrations.CreateModel(
... | harshaashok93/Gale-UV5-Test-Project | src/server/apps/wagtail/pages/product/migrations/0006_productproperties.py | 0006_productproperties.py | py | 825 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.CreateModel",
"line_number": 15,
"usage_type": "call"
},
... |
20361737054 | import pytest
from advent_of_code_2015_python.day_02.a import Day02PartASolver
from advent_of_code_2015_python.day_02.b import Day02PartBSolver, get_solution, solve
from advent_of_code_2015_python.day_02.parser import Parser
SAMPLE_INPUT = """
2x3x4
1x1x10
"""
@pytest.mark.parametrize(
"input, expected",
[
... | tyler-hoffman/aoc-2015 | tests/test_day_02/test_b.py | test_b.py | py | 648 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "advent_of_code_2015_python.day_02.parser.Parser.parse_line",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "advent_of_code_2015_python.day_02.parser.Parser",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "advent_of_code_2015_python.day_02.b.Da... |
44146886524 | # -*- coding: utf-8 -*-
import codecs
import xml.etree.ElementTree as ET
# 读取待修改文件
updateTree = ET.parse("volun_qa.aiml")
root = updateTree.getroot()
f = codecs.open("志愿者常见问题问答.txt", 'r', 'utf8')
for line in f:
# 创建新节点并添加为root的子节点
category = ET.Element("category")
root.append(category)
... | jiubai/Visualization-of-Volunteer-Service-System | My_KG/Create_KG/Bot_Data/Data_Preprocessing.py | Data_Preprocessing.py | py | 724 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "xml.etree.ElementTree.parse",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "codecs.open",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "xml.etree... |
71640452798 | from django.urls import path
from . import views
app_name = 'history'
urlpatterns = [
path('', views.IndexView.as_view(), name='index'),
path('users/', views.UserLogsView.as_view(), name='users'),
path('inventories/', views.InventoriesLogsView.as_view(), name='inventories'),
path('purchases/', views.P... | DPreciado/django-template | apps/history/urls.py | urls.py | py | 748 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
41161551424 | from utils import (
is_in, argmin, argmax, argmax_random_tie, probability, weighted_sampler,
memoize, print_table, open_data, PriorityQueue, name,
distance, vector_add
)
from collections import defaultdict, deque
import math
import random
import sys
import bisect
from operator import itemgetter
... | YolandaManurung/UCS_simulator_Institut_Teknologi_Del | GGThe_Explorer/search.py | search.py | py | 18,816 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "utils.is_in",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "collections.deque",
"line_number": 146,
"usage_type": "call"
},
{
"api_name": "collections.deque",
"line_number": 200,
"usage_type": "call"
},
{
"api_name": "utils.memoize",
... |
37278964129 | #!/usr/bin/env python
"""
compile proto:
protoc --python_out=. dep_extraction/dep_meta.proto
"""
import os
import argparse
from dep_extraction import extract_lib
from dep_extraction import heuristic_setup_deps
from dep_extraction import stdlib_modules_autogenerated
from dep_extraction import dep_meta_pb2 as dep_meta
i... | teh/fullpypi | dep_extraction/extract_imports.py | extract_imports.py | py | 2,907 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "os.path.abspath",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"li... |
42003564467 | from dotenv import load_dotenv
import os
from datetime import datetime
from speech_proccessing import start_recording, speak
from openai_proccessing import complete_openai
load_dotenv(override=True)
settings = {
"speechKey": os.environ.get("SPEECH_KEY"),
"region": os.environ.get("SPEECH_REGION"),
"langua... | RY3IEZN/the_conversational_ai_project | main.py | main.py | py | 1,043 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.environ.get",
... |
16490106086 | import numpy as np
from solcx import compile_standard, install_solc
import collections
from nltk import ngrams
import itertools
import xgboost as xgb
from joblib import load
ARITHMETIC_OP = ['ADD', 'MUL', 'SUB', 'DIV', 'SDIV', 'SMOD', 'MOD', 'ADDMOD', 'MULMOD', 'EXP']
CONSTANT1 = ['BLOCKHASH', 'TIMESTAMP', 'NUMBER... | kiizavu/Automatic-detection-of-smart-contract-vulnerabilities-based-on-machine-learning-methods | main.py | main.py | py | 5,551 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "solcx.install_solc",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "solcx.compile_standard",
"line_number": 67,
"usage_type": "call"
},
{
"api_name": "itertools.product",
"line_number": 91,
"usage_type": "call"
},
{
"api_name": "nltk.ngra... |
6289518536 | import logging
from logging import handlers
import os
class Server_Log:
def __init__(self, level=logging.DEBUG,
logPath="./logs",
when="d",
interval=1,
backupCount=7
):
logger = logging.getLogger()
logger.setLevel(level)
if not ... | FengLiuFeseliud/PyHP-web | pyhpweb/log.py | log.py | py | 908 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "logging.DEBUG",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path.isdir",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path",
"line... |
70636155519 | import requests
import pandas
import json
import datetime
class TeamsAlerter:
def __init__(self):
with open('./message_template/file_link_msg_template.json', 'r', encoding='utf-8') as f:
self.json_template = f.read()
with open('./message_template/list_logging_template.json', 'r', encod... | SongWei-C/selenium_scrape_data | Teams_webhook.py | Teams_webhook.py | py | 4,249 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "requests.request",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.today",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 61,
"usage_type": "attribute"
}
] |
19391125875 | import torch
import torch.nn as nn
import torch.nn.functional as F
class MultiHeadAttentionBlock(nn.Module):
def __init__(self, head_size: int, max_seq_length: int, n_heads: int, dropout: float) -> None:
super().__init__()
self.n_heads = n_heads
self.head_size = head_size
self.key =... | TobiasJacob/tinychatgpt | tinychatgpt/models/blocks/MultiHeadAttention.py | MultiHeadAttention.py | py | 1,819 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "torch.nn.Module",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "torch.nn.Linear",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_numb... |
74154622719 | # CSCS 161 Assignment #2 -- Zombie Apocalypse
# Name: David Tyler Gosbee
# Student number: 201905838
import matplotlib.pyplot as plt
import numpy
import networkx
def make_city(name, neighbours):
"""
Create a city (implemented as a list).
:param name: String containing the city name
:param neighbours... | Tylergos/ZombieApocalypse | asn2.py | asn2.py | py | 7,794 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.where",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.int32",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "numpy.triu",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "numpy.random.random_sample",
"... |
22651395111 | import inputAoC as aoc
from json import loads
import my_utils
sues = aoc.get_input_file(16,2015)
# chaque ligne sera au format:
# Sue nn: "fieldA": a, "fieldB": b, "fieldC": c
sues = sues.replace('children', '"children"')
sues = sues.replace('cats', '"cats"')
sues = sues.replace('samoyeds', '"samoyeds"')
sues = s... | MathProuv/Advent-of-Code | y2015/2015-day16.py | 2015-day16.py | py | 2,016 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "inputAoC.get_input_file",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 27,
"usage_type": "call"
}
] |
73026049278 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Mar 08 15:51:55 2020
@author: julianarhee
"""
import os
import glob
import json
import h5py
import cv2
import traceback
import h5py
import sys
import optparse
import matplotlib as mpl
mpl.use('agg')
import numpy as np
import pylab as pl
import analyze2... | julianarhee/rat-2p-area-characterizations | analyze2p/extraction/neuropil_masks.py | neuropil_masks.py | py | 16,249 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "matplotlib.use",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.ones",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "numpy.empty",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "cv2.dilate",
"line_number":... |
22819310333 | # -*- coding: utf-8 -*-
import scrapy
from scrapy import Selector
from scrapy.http import Request
from selenium import webdriver
from time import sleep
from selenium.common.exceptions import NoSuchElementException
class AmazonSpider(scrapy.Spider):
name = 'amazon'
allowed_domains = ['amazon.com']
#start_ur... | RenukaDeshmukh23/AmazonProducts-Scraper | amazon.py | amazon.py | py | 2,901 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "scrapy.Spider",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "scrapy... |
13449292473 | # -*- coding: utf-8 -*-
from flask import json
from tests.base import BaseTestCase
from got.models.comments import Comments
class SeriesTestCase(BaseTestCase):
def test_get_all_episodes(self):
self.insert_sample_got_data(title="t1", season=1, episode=1)
self.insert_sample_got_data(title="t2", se... | pangan/python-code-test-2020 | tests/test_endpoints.py | test_endpoints.py | py | 8,002 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "tests.base.BaseTestCase",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "flask.json.loads",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "flask.json",
"line_number": 39,
"usage_type": "name"
},
{
"api_name": "flask.json.loads",... |
6852492526 | from itertools import combinations
def solution(orders, course):
ASCII_factor = ord('A')
alpha_count = [0] * 27
max_order_len = 0
# 2번 이상 주문된 메뉴만 골라서 조합으로 구성할 것임
for order in orders:
for menu in order:
alpha_count[ord(menu) - ASCII_factor] += 1
max_order_len = max(len(o... | gangbro-dev/Solving | programers/2021 KAKAO BLIND RECRUITMENT/메뉴 리뉴얼/solution.py | solution.py | py | 2,378 | python | ko | code | 0 | github-code | 97 | [
{
"api_name": "itertools.combinations",
"line_number": 24,
"usage_type": "call"
}
] |
21600621891 | #!/usr/bin/env python3
LICENSE = """
PlexSeriesOrganizer - A tool to organize your plex series, without moving files.
Copyright (C) 2015 George T. Gougoudis <george_gougoudis@hotmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public ... | GeorgeTG/plex-series-organizer | series_orginizer.py | series_orginizer.py | py | 10,138 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.listdir",
"line_number": 91,
"usage_type": "call"
},
{
"api_name": "os.path.isfile",
"line_number": 91,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 91,
"usage_type": "call"
},
{
"api_name": "os.path.isfile",
"line_num... |
32070752913 | import os
from parsl.app.app import python_app
from paropt import ParslOptimizer
from config import nsccConfig
# Parsl function for timing command execution time
@python_app
def timeCmd(cmd, params, invert):
import os
from string import Template
import subprocess
import time
import uuid
cmd_script = os.... | macintoshpie/testParsl | nscc/strelkaDemo/strelkaDemo.py | strelkaDemo.py | py | 1,101 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "os.path.expanduser",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "uuid.uuid1",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "string.Template",
"lin... |
13833927456 | import heapq
import itertools
heap = []
array = {"ovocie":"mandarinka", "zelenina":"mrkva", "sladkosti":"cukriky", "auto":"ferrari"}
array2 = ["ovocie","mandarinka", "zelenina","mrkva", "sladkosti","cukriky", "auto","ferrari"]
array3 = [10,8,4,6,8,3,4,8,9,7,987,98,6,1,96,7,3]
heap2 = heapq.heapify(array2)
print("heap2... | Spaceific-Studio/_WORK | projects/heap/main.py | main.py | py | 2,418 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "heapq.heapify",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "heapq.heapify",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "heapq.heappush",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "heapq.heappush",
"line_... |
39154588104 | from prettytable import PrettyTable
import os
try:
for filename in os.listdir('solutions_executionTime'):
f = open("solutions_executionTime/"+filename,'r')
line = f.readline()
x = PrettyTable()
titleTable = filename[0 : len(filename) - 4]
x.title = titleTable
x.fiel... | PauloMaced0/AED_SpeedRun | sol_statistics.py | sol_statistics.py | py | 683 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.listdir",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "prettytable.PrettyTable",
"line_number": 8,
"usage_type": "call"
}
] |
2893732430 | import matplotlib as mpl
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
import matplotlib.pyplot as plt
fig=plt.figure()
ax = fig.add_subplot(111, projection='3d')
'''
mat phang 2x+3y-4z-5=0
'''
x1= np.linspace(-5,5)
y1= np.linspace(-5,5)
X, Y=np.meshgrid(x1,y1)
Z=(2*X +3*Y -5)/4
ax.set_xlabel('X Label')
a... | VANTHO15/Python | Matplotlib/MatPhang3D.py | MatPhang3D.py | py | 402 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "numpy.linspace",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.linspac... |
14955130298 | import sys, os
import pickle
import numpy as np
import pandas as pd
import glob
import shutil
import gc
if len(sys.argv) > 1:
job_df = pd.read_pickle(sys.argv[1])
job_index = int(sys.argv[2])
job_row = job_df.iloc[job_index].copy()
else:
job_row = None
# Import pymask
sys.path.append('/afs/cern.ch/en... | sterbini/run3_beta_beating | 000_job.py | 000_job.py | py | 17,587 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sys.argv",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "pandas.read_pickle",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_nu... |
20110324231 | from pydantic import (
BaseModel,
EmailStr,
Field,
HttpUrl,
validator,
)
from ..core.config import (
ActivityExtraConfig,
ProbabilisticStateConfig,
)
from ..core.selenium import SeleniumStatemachineConfig
class ActivitySelectionConfig(ProbabilisticStateConfig):
"""Wordpess wpDiscuz us... | ait-aecid/kyoushi-statemachines | src/cr_kyoushi/statemachines/wordpress_wpdiscuz/config.py | config.py | py | 6,111 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "core.config.ProbabilisticStateConfig",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "pydantic.Field",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pydantic.Field",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "co... |
29303283604 | import numpy as np
import matplotlib.pyplot as plt
from utils import map_function1, map_function2
def set_axis(ax):
"""
Sets x and y axes of a matplotlib plot to origin
:param ax: plot whose axes will be set
:type ax: matplotlib axix
"""
ax.spines['left'].set_position('zero')
ax.spines['bottom'].set_positio... | kenji-yamane/college | optatives/fm-223/lista1/cobwep_plot.py | cobwep_plot.py | py | 1,997 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 44,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.xticks",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": ... |
6492349872 | import os
from datetime import datetime
import requests
from django.conf import settings
from django.core.management.base import BaseCommand
from dotenv import load_dotenv
DOMAIN = os.environ.get('DOMAIN')
load_dotenv()
if settings.DEVELOPE:
AUTH_URL = f'http://{DOMAIN}/api/auth/token/login'
TEMPLATE_URL = ... | generator-meme/generator-meme | backend/memes/management/commands/load_images.py | load_images.py | py | 1,995 | python | en | code | 8 | github-code | 97 | [
{
"api_name": "os.environ.get",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "dotenv.load_dotenv",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.conf.settings.... |
24888950518 | from __future__ import division
import math
import re
import os,time,scipy.io
import skimage.io
import tensorflow as tf
import tensorflow.contrib.slim as slim
import numpy as np
import cv2
import os, sys
import dill
NUM_TRAINING_IMAGES = 7480
#NUM_TRAINING_IMAGES = 30
dimdic = dill.load(open("dim_150.pkl", "rb"))
scale... | yukikawana/hmgan | image/eval_imgsynth.py | eval_imgsynth.py | py | 3,454 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "dill.load",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "dill.load",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.concatenate",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.expand_dims",
"line_n... |
40694564692 | import create_signals
from cvxopt import matrix, solvers
import matplotlib.pyplot as plt
import numpy as np
import sklearn.metrics as metrics
from scipy import sparse
def solve_Y(L, X, alpha):
Y = np.dot(np.linalg.inv((np.eye(L.shape[0]) - alpha*L)),X)
return Y
def solve_L(Y, N, alpha, beta, A, G, b, h, M):
... | kyle-donoghue/AR-Graph-Inference | optimization/laplacian.py | laplacian.py | py | 4,807 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.dot",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.linalg.inv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.linalg",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "numpy.eye",
"line_numbe... |
8855140956 | from django.urls import path, include, reverse_lazy
from .views import ProfileView, ProfileEditView, SignUpView, AFOLMOCsView, AFOLShirtView, AFOLShirtEditView, \
AFOLVolunteerView, AFOLVolunteerCreateView, AFOLVolunteerListView, AFOLActivitiesCreateView, \
AFOLActivitiesListView, AFOLActivitiesView, AFOLVoteL... | brickfiestastem/brickfiesta | afol/urls.py | urls.py | py | 1,574 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.urls.path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "views.SignUpView.as_view",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "views.SignUpView",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "django.url... |
74409725120 | #!/usr/bin/env python
from flask import Flask, request
app = Flask(__name__)
# Shared storage for our list of tasks
tasks = ["GenCS 1"]
@app.route("/")
def home():
task_list = ["<li>" + task + "</li>" for task in tasks]
return "<ul>" + "".join(task_list) + "</ul>"
app.run()
| thunderboltsid/shukla.tech | talks/snake-taming-101/my-first-web-app.py | my-first-web-app.py | py | 289 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask.Flask",
"line_number": 4,
"usage_type": "call"
}
] |
19209992033 | from collections import OrderedDict
from ydk.types import Entity, EntityPath, Identity, Enum, YType, YLeaf, YLeafList, YList, LeafDataList, Bits, Empty, Decimal64
from ydk.filters import YFilter
from ydk.errors import YError, YModelError
from ydk.errors.error_handler import handle_type_error as _handle_type_error
cl... | sjjufw/ACI | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_terminal_device_oper.py | Cisco_IOS_XR_terminal_device_oper.py | py | 59,126 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "ydk.types.Enum",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "ydk.types.Enum.YLeaf",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "ydk.types.Enum",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "ydk.types.Enum.YLea... |
28852843101 | """
Name: Ardi Artani
Email: ARDI.ARTANI96@myhunter.cuny.edu
Resources: n/a
"""
from sklearn.datasets import load_sample_image
from sklearn.cluster import MiniBatchKMeans
# This function has three inputs and returns an np-array containing the recolored image:
# img: an np-array containing an image, from sklearn.datas... | ArdiArtani/Programs-CSCI39542 | main.py | main.py | py | 1,004 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sklearn.cluster.MiniBatchKMeans",
"line_number": 20,
"usage_type": "call"
}
] |
15906249658 | from django.core.management.base import BaseCommand, CommandError
from Water_QC import models
import os
import arcview
import arcpy
def push_changes():
folder_object = get_gdb()
if folder_object is not None:
update_geodatabase(folder_object)
def update_geodatabase(folder_object):
folder_object... | namur007/Water_App | Water_QC/management/commands/push_changes.py | push_changes.py | py | 3,230 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.path.join",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 3... |
27632188386 | from keras.preprocessing.image import img_to_array, load_img
from keras.models import load_model
import numpy as np
model = load_model('./model.h5')
paths = ['bocian.jpg', 'kot.jpg', 'pies.jpg']
for path in paths:
image = load_img(path, target_size=(224, 224))
image = img_to_array(image)
image = image / ... | tomaszkaliciak/Projekt-Zespolowy | wersja-testowa/pred.py | pred.py | py | 450 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "keras.models.load_model",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "keras.preprocessing.image.load_img",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "keras.preprocessing.image.img_to_array",
"line_number": 11,
"usage_type": "call... |
71499504320 | from pathlib import Path
from time import time
from os import path as opath, remove as oremove, rename as orename
from subprocess import check_output
from asyncio import sleep as asleep
from requests import get as rget
from config import LOGGER, Config
from bot.client import Client
from bot.core.db.db_func import db
fr... | Jarvis991/UploadEver-TBot | bot/plugins/uploadfile.py | uploadfile.py | py | 4,568 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "bot.client.Client",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "pyrogram.types.Message",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "bot.core.db.db_func.db._getUserToken",
"line_number": 41,
"usage_type": "call"
},
{
"api... |
65590213 | import folium
from django.http import HttpResponseNotFound
from django.shortcuts import render
from pokemon_entities.models import Pokemon
MOSCOW_CENTER = [55.751244, 37.618423]
DEFAULT_IMAGE_URL = "https://vignette.wikia.nocookie.net/pokemon/images/6/6e/%21.png/revision/latest/fixed-aspect-ratio-down/width/240/heig... | ReminoR/dvmn_pokemon_man | pokemon_entities/views.py | views.py | py | 3,397 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "folium.features.CustomIcon",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "folium.features",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "folium.Marker",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pokemon... |
9307781924 | import itertools
# calculate all "unique" combinations
def calculate_combinations(combinations, N, Sum):
lucky_tickets = []
for combination in combinations:
first_half = combination[:N]
second_half = combination[N:]
first_sum = 0
second_sum = 0
for char1 in first_half:
... | marzique/OdooTestTask | tickets.py | tickets.py | py | 1,501 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "itertools.product",
"line_number": 26,
"usage_type": "call"
}
] |
25299557541 | import sqlite3
from hashlib import sha256
import os
import time
def _get_conn(config):
conn = sqlite3.connect(config['db_host'])
conn.row_factory = sqlite3.Row
return conn
def add_document(file_path, config):
m = sha256()
with open(file_path, 'rb') as fi:
doc_text = fi.read()
m.u... | MESanderson/word_server | db_interfaces/sqlite.py | sqlite.py | py | 1,910 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sqlite3.connect",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sqlite3.Row",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "hashlib.sha256",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path.split",
"li... |
71605462078 | from django.shortcuts import render, redirect
from .models import Task
from .forms import TaskForm
def index(request):
tasks = Task.objects.order_by('id')
return render(request, 'main/index.html', {'title': 'Николаев Даниил',
'tasks': tasks})
def about(request)... | danilfg/django_edu | cv/main/views.py | views.py | py | 817 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "models.Task.objects.order_by",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "models.Task.objects",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "models.Task",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django... |
72620599040 | import sys
import argparse
import functools
import tensorflow as tf
import tensorflow_transform as tft
from trainer import input_util
from trainer import metadata
from trainer import model
def parse_arguments(argv):
"""Parse command-line arguments."""
parser = argparse.ArgumentParser()
parser.add_argum... | GoogleCloudPlatform/professional-services | examples/cloudml-churn-prediction/trainer/trainer/task.py | task.py | py | 5,514 | python | en | code | 2,602 | github-code | 97 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "tensorflow_transform.TFTransformOutput",
"line_number": 130,
"usage_type": "call"
},
{
"api_name": "functools.partial",
"line_number": 133,
"usage_type": "call"
},
{
... |
35429209800 | # https://leetcode.com/problems/partition-labels/
from typing import List
class Solution:
def partitionLabels(self, s: str) -> List[int]:
end_indexes = {}
i = 0
while i < len(s):
end_indexes[s[i]] = i
i += 1
partitions = []
i = 0
while i < ... | ahsan-007/Competitive-Programming | Hash Table/Medium/PartitionLabels.py | PartitionLabels.py | py | 931 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "typing.List",
"line_number": 7,
"usage_type": "name"
}
] |
33497536988 | import warnings
warnings.filterwarnings("ignore")
from pymoo.core.problem import ElementwiseProblem
from pymoo.algorithms.moo.nsga2 import NSGA2
from pymoo.operators.crossover.sbx import SBX
from pymoo.operators.mutation.pm import PM
from pymoo.operators.sampling.rnd import FloatRandomSampling
from pymoo.core.proble... | RamonHA/CrytosStudy | pymoo_test_warmstart.py | pymoo_test_warmstart.py | py | 9,778 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "numpy.random.seed",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 38,
"usage_type": "attribute"
},
{
"api_name": "pymoo.core... |
29150930029 | import torch
import torch.nn as nn
import torch.nn.functional as NF
import math
from .gru import GRU
class RecurrentRegularizer(nn.Module):
'''
View Selector should be taking warped feature and output the pixel-wise
weights for each each view.
Input:
NxHxWxCxPxP
Output:
HxW weigh... | leejaeyong7/patchmatch-rl | patchmatch_rl/recurrent_regularizer.py | recurrent_regularizer.py | py | 1,818 | python | en | code | 33 | github-code | 97 | [
{
"api_name": "torch.nn.Module",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "gru.GRU",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "torch.nn.ModuleList",
"line_n... |
40311605569 | import json
import os.path as op
import pickle
from os import makedirs
import matplotlib.pyplot as plt
import numpy as np
from matplotlib import colors, cm
from matplotlib.gridspec import GridSpec
from scipy.io import loadmat
from scipy.stats import t as tdist
from mtrf_python import STRF_utils
from mtrf_python.scrip... | emilyps14/mtrf_python | projectfiles/figS2_EC36_summary.py | figS2_EC36_summary.py | py | 8,357 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "os.path.expanduser",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "json.load",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number"... |
16464760951 | # I - IMPORT AND INITIALIZE
import pygame, BreakSprites, time
pygame.init()
screen = pygame.display.set_mode((640, 480))
def main():
'''This function defines the 'mainline logic' for our pyPong game.'''
# DISPLAY
pygame.display.set_caption("Super Break-out!")
# ENTITIES
... | howardleung/breakOut | breakout.py | breakout.py | py | 5,087 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pygame.init",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "pygame.display.s... |
24624346019 | #%%
import os
import numpy as np
import tensorflow as tf
import cv2
import matplotlib.pyplot as plt
from keras.models import load_model, Model
from keras.datasets import cifar10
from keras.preprocessing.image import ImageDataGenerator
from scipy.spatial.distance import cosine, euclidean
(x_train, y_train)... | KrystianPP/Deep-learning | Image retrival/image_retrival.py | image_retrival.py | py | 1,845 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "keras.datasets.cifar10.load_data",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "keras.datasets.cifar10",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "keras.preprocessing.image.ImageDataGenerator",
"line_number": 15,
"usage_type": "... |
73643921599 | #!/usr/bin/env python
"""
pytest script for testing utils folder
"""
import typing
from pathlib import Path
import numpy as np
from hydrogels.utils import *
from hydrogels.utils import simulation
from hydrogels.utils import system
from hydrogels.utils import topology
import pytest
FOLDER = Path(__file__).absolute().... | debeshmandal/hydrogels | test/test_utils.py | test_utils.py | py | 1,882 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "pathlib.Path",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "hydrogels.utils.topology.Topology",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "hydrogels.utils.topology",
"line_number": 20,
"usage_type": "name"
},
{
"api_name"... |
15228025382 | from django.core.management.base import BaseCommand, CommandError
from django.utils import timezone
from django.core import serializers
from results.models import Result, ResultManual, ResultStage, Race
from results.slackbot import slackbot
from results.s3connection import s3_connection
import os
def generate_json(el... | mcclatchy/mccelections | electionsproject/results/management/commands/generate_json.py | generate_json.py | py | 3,959 | python | en | code | 10 | github-code | 97 | [
{
"api_name": "results.slackbot.slackbot",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "results.models.Race.objects.filter",
"line_number": 19,
"usage_type": "call"
},
{
"api_... |
2496892914 | #!/usr/bin/env python3
from pypresence import Presence
import psutil
import time
import sys
"""
Check README.md if you need help to change the code
"""
client_id = "356875221078245376"
RPC = Presence(client_id=client_id)
RPC.connect()
RPC.update(start=int(time.time()))
while True:
if any(map(lambda x: (x.name(... | brainwo/overwatch-discordrpc-linux | rich-presence.py | rich-presence.py | py | 464 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pypresence.Presence",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "psutil.process_iter",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "sys.exit",
"lin... |
5384887629 | #!/usr/bin/env python3
'''
Author: qiupengfei@rxthinking.com
Date: 2021-04-22 11:48:55
'''
import copy
import json
import random
import re
from queue import PriorityQueue
from datetime import timedelta
import pandas as pd
import sys
from collections import defaultdict
import logging
from typing import Dict, List
imp... | zycer/qqq | qcaudit/application/sampleapplication.py | sampleapplication.py | py | 54,458 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "typing.Dict",
"line_number": 60,
"usage_type": "name"
},
{
"api_name": "collections.defaultdict",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "qcaudit.domain.case.case.Case",
"line_number": 63,
"usage_type": "name"
},
{
"api_name": "qca... |
37903391101 | from random import choice, randint
from sqlalchemy import Column, Integer, ForeignKey, Date
from sqlalchemy.orm import relationship
import statistics
from model import Base, session
from model.worker_base import FirmName, FirmRating
from settings import get_anno, POSITION_CAP
class Firm(Base):
session = None
... | babushkian/it_workers | model/firm.py | firm.py | py | 6,523 | python | ru | code | 0 | github-code | 97 | [
{
"api_name": "model.Base",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "model.session",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integer",
"... |
16100997587 | from rest_framework import serializers
from api.models import *
def update_instance(instance, validated_data):
"""Update all the instance's fields specified in the validated_data"""
for key, value in validated_data.items():
setattr(instance, key, value)
return instance.save()
class AddressSerializer(serializer... | mateusvictor/School-API | api/serializers.py | serializers.py | py | 3,378 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "rest_framework.serializers.ModelSerializer",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "rest_framework.serializers.ModelSerializer",
"line_number": 19,
... |
19319364701 | """
URL configuration for EMS project.
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
C... | rajesh-sht/Employe-Management-System-2.0 | ems_app/urls.py | urls.py | py | 991 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.urls.path",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "ems_app.views.empList",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "ems_app.views",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "django.urls... |
73019575358 | import asyncio
import requests
async def request():
url='https://www.baidu.com'
status=requests.get(url)
return status
def callback(task):
print(task.result())
task=asyncio.ensure_future(request())
task.add_done_callback(callback)
print(task)
print(1)
loop=asyncio.get_event_loop()
print(2)
loop.run_unt... | sixgodhls/pySpider | 模块/async/asyncio/callback.py | callback.py | py | 349 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "asyncio.ensure_future",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "asyncio.get_event_loop",
"line_number": 14,
"usage_type": "call"
}
] |
41450158833 | # -*- coding: utf-8 -*-
"""Base UDP Multicast.
Relaying only on pure Python socket API
"""
__author__ = 'douglasvinter'
__version__ = '0.1'
import socket
import struct
import select
import netifaces
from logging import getLogger
from collections import namedtuple
# udp_pkg used to return datagram status
# Class-lik... | douglasvinter/simple-network-framework | protocols/networking.py | networking.py | py | 12,239 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "collections.namedtuple",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "select.select",
"line_number": 94,
"usage_type": "call"
},
{
"api_name": "socket.error",
"line_number": 95,
"usage_type": "attribute"
},
{
"api_name": "select.select"... |
19887823652 | import matplotlib
# matplotlib.use('TkAgg')
matplotlib.rcParams['pdf.fonttype'] = 42
matplotlib.rcParams['ps.fonttype'] = 42
import matplotlib.pyplot as plt
import csv
import os
print(matplotlib.get_backend())
# plt.interactive(True)
# http://ksrowell.com/blog-visualizing-data/2012/02/02/optimal-colors-for-graphs/
M... | adam-dziedzic/bandlimited-cnns | cnns/graphs/noisy_channels_max_accuracy/max_accuracy.py | max_accuracy.py | py | 5,192 | python | en | code | 17 | github-code | 97 | [
{
"api_name": "matplotlib.rcParams",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.rcParams",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.get_backend",
"line_number": 10,
"usage_type": "call"
},
{
"api_name":... |
11211626688 | from django.shortcuts import render
from django.http import HttpResponse, Http404, JsonResponse
def index(request):
if 'course' in request.GET and 'coursecurrency' in request.GET and 'input' in request.GET and 'from' in request.GET\
and 'to' in request.GET:
course = float(request.GET['course']... | Andy1407/currency_converter | converter/views.py | views.py | py | 887 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.http.JsonResponse",
"line_number": 25,
"usage_type": "call"
}
] |
28895417735 | from flask import Flask, request, render_template, flash, redirect, session, jsonify
from flask_debugtoolbar import DebugToolbarExtension
from boggle import Boggle
boggle_game = Boggle()
app = Flask(__name__, static_folder='./static')
app.config['SECRET_KEY'] = "nichen"
debug = DebugToolbarExtension(app)
high_score = ... | nichen2/SpringboardExercises | flask-boggle/app.py | app.py | py | 1,120 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "boggle.Boggle",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "flask_debugtoolbar.DebugToolbarExtension",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask... |
14517620633 | # coding=utf-8
import web
import hashlib
import time
import json
import cgi
import types
import urlparse
# import urllib
from markdown import markdown
from sign import sign
from config import render,upload_path,app_root
from conn import client
from bson.objectid import ObjectId
from common import *
from types import *... | otarim/pyblog | api.py | api.py | py | 8,304 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "conn.client.pyblog",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "conn.client",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "web.input",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "web.ctx.session.get",
... |
28562621651 | from typing import Any, List
import warnings
from sklearn.metrics import confusion_matrix, matthews_corrcoef, f1_score, roc_auc_score
import numpy as np
import torch
from defender.utils import save_pickle, load_pickle
import torchmetrics as metrics
from defender.models.feature_extractor import FeatureExtractor
from to... | vibalcam/ml-malware-detection | defender/model.py | model.py | py | 7,128 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "numpy.unique",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "numpy.isnan",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.insert",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "numpy.append",
"line_number... |
29878427082 | import sys
import os
import json
import asyncio
import websockets
import datetime
import firebase_admin
from firebase_admin import db
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
from multiprocessing import Process
import pprint
async def send_msg(event, type_of, path, o... | Deathpandk/technical_test | main.py | main.py | py | 2,356 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "websockets.connect",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime.utcfromtimestamp",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "da... |
23769227260 | import sklearn
import pandas as pd
import scipy.stats as st
import numpy as np
def get_scores_df(cms):
dict = {}
for i in range(len(cms)):
dict[i] = metrics(cms[i])
df = pd.DataFrame(dict)
df_means = pd.DataFrame(df.T.mean())
df_means.columns = ['mean']
df_out = pd.concat([df,df_means... | j0nflores/planet-hma-streams | master/utils/metrics.py | metrics.py | py | 4,344 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pandas.DataFrame",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pandas.concat",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sklearn.metrics.multi... |
38548948142 | #!/usr/bin/python
# coding: utf-8
import pymysql.cursors
class Vectorizor():
def __init__(self):
pass
def parseShop(self, shop):
# stab
transportation = 0.5
# regular_holiday
if shop.regular_holiday.find('no data') < 0:
regular_holiday = 0.9
else:
regular... | Kamihara/oaiso | recommend/Vectorizor.py | Vectorizor.py | py | 10,515 | python | ja | code | 0 | github-code | 97 | [
{
"api_name": "pymysql.cursors.connect",
"line_number": 149,
"usage_type": "call"
},
{
"api_name": "pymysql.cursors",
"line_number": 149,
"usage_type": "name"
},
{
"api_name": "pymysql.cursors.cursors",
"line_number": 150,
"usage_type": "attribute"
},
{
"api_name"... |
17988850430 | import sys
import os
import re
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--input_sentences', default='./workdir/decoded_results.genie_copy_transformer.transformer_tiny_genie.semparse_thingtalk_noquote.beam1.alpha0.6.inputs', type=str)
parser.add_argument('--gold_program', default='./work... | stanford-oval/genie-parser | genieparser/scripts/post_process_decoded_results.py | post_process_decoded_results.py | py | 3,284 | python | en | code | 16 | github-code | 97 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 52,
"usage_type": "call"
}
] |
71348613760 | import numpy as np
import pytest
import geonum.geovector3d as mod
def test_init_NO_INPUT():
with pytest.raises(ValueError):
mod.GeoVector3D()
def test_init_DOUBLE_INPUT():
v = mod.GeoVector3D(dx=1, dy=1, azimuth=223, dist_hor=1.2456)
assert v.dx == 1
assert v.dy == 1
@pytest.mark.parametrize('... | jgliss/geonum | test/test_geovector3d.py | test_geovector3d.py | py | 1,365 | python | en | code | 6 | github-code | 97 | [
{
"api_name": "pytest.raises",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "geonum.geovector3d.GeoVector3D",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "geonum.geovector3d",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "geonum.g... |
8762631859 | #import library
import pygame
import random
pygame.init() #initialize game
#set window length and width
win_length = 500
win_width = 500
#set the random pipe initial coordinate
ranbeamdown = [[[490, 500]]]
ranbeamup = [[[500, -10]]]
beamx = 500
charpos = [20, 240] #set the character initial coordinat... | melvinchia3636/pygames | flappy bird.py | flappy bird.py | py | 3,336 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pygame.init",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "pygame.time.Cl... |
73459535358 | import hashlib
import os
import shutil
from flask import Flask, render_template, session, redirect, request, send_file, url_for
from werkzeug.utils import secure_filename
import common
app = Flask(__name__)
app.secret_key = 'HomeWorkSystem' # should be random.
DATA_DIR = './data'
PATH_USERS = '%s/users.json' % DA... | HsOjo/HomeWorkSystem | app.py | app.py | py | 6,697 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask.Flask",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "common.load_json",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "common.load_json",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "flask.session.get",
... |
35919072292 | from flask_restful import Resource, inputs
from flask_restful.reqparse import RequestParser
from common.models.recipe import RawMaterial
from common.dao.material import delete_material_by_args, update_material_info_by_id, get_material_by_id
from common.models import db
from flask import current_app, g
from common.utils... | nonoroazoro25/Pets-UP | core/admin/api/material/material.py | material.py | py | 4,765 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "flask_restful.Resource",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "flask_restful.reqparse.RequestParser",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "flask_restful.inputs.positive",
"line_number": 19,
"usage_type": "attribute"
... |
11048873666 | from builtins import zip
from builtins import range
# The base class for all spatial slicers.
# Slicers are 'data slicers' at heart; spatial slicers slice data by RA/Dec and
# return the relevant indices in the simData to the metric.
# The primary things added here are the methods to slice the data (for any spatial sl... | lsst-sims/legacy_sims_maf | python/lsst/sims/maf/slicers/baseSpatialSlicer.py | baseSpatialSlicer.py | py | 10,979 | python | en | code | 13 | github-code | 97 | [
{
"api_name": "baseSlicer.BaseSlicer",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "lsst.sims.maf.plots.spatialPlotters.BaseHistogram",
"line_number": 94,
"usage_type": "name"
},
{
"api_name": "lsst.sims.maf.plots.spatialPlotters.BaseSkyMap",
"line_number": 94,
... |
15166185012 | # Transformer implementation in PyTorch
import math
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from modules import clone_layers
# Implementation of Transformer as per Attention is all you need paper.
# Base Encoder Decoder model
class Enc... | crizzy9/MuGeTransGan | src/torch_transformer/transformer.py | transformer.py | py | 10,981 | python | en | code | 3 | github-code | 97 | [
{
"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.Module",
"line_number": 41,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"li... |
15037847800 | from utils6 import *
import numpy as np, re
from sklearn.linear_model import LogisticRegression, LogisticRegressionCV
from sklearn.ensemble import RandomForestClassifier
class Detector :
def __init__(self, name, input_size, maha_mag = None):
if 'Maha' in name and maha_mag is None:
raise ValueError('Maha detector... | advadvadvadvadv/adv | detector_class_b.py | detector_class_b.py | py | 6,899 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "numpy.array",
"line_number": 77,
"usage_type": "call"
},
{
"api_name": "sklearn.linear_model.LogisticRegressionCV",
"line_number": 105,
"usage_type": "call"
},
{
"api_name": "sklearn.ensemble.RandomForestClassifier",
"line_number": 107,
"usage_type": "call"... |
716532505 | import logging
from datetime import datetime, timedelta
from django_extensions.management.jobs import HourlyJob
from events.linkedevents import LinkedEventsClient
logger = logging.getLogger(__name__)
def flatten(t):
return [item for sublist in t for item in sublist]
# python manage.py runjobs hourly
class ... | City-of-Helsinki/yjdh | backend/tet/events/jobs/hourly/clean_unused_images.py | clean_unused_images.py | py | 1,990 | python | en | code | 7 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django_extensions.management.jobs.HourlyJob",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "events.linkedevents.LinkedEventsClient",
"line_number": 22,
"usage_type": "c... |
75008671039 | # %load ./codes/argParse.py
import argparse
parser = argparse.ArgumentParser()
group = parser.add_mutually_exclusive_group()
# calling this program now need to specify 2 argument 'echo' and 'square'
# Positional arguments
parser.add_argument('square', type = int, help = 'display a square of a given number')
# Optional... | Chi-Zaozao/luckyDiary | codes/argParse.py | argParse.py | py | 1,153 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 3,
"usage_type": "call"
}
] |
27758048072 | import yaml
from constant import CONFIG_PATH, CLIENT_SECRETS_FILE
import sys
import json
def get_config(path):
with open(path) as f:
parsed_config = yaml.safe_load(f)
with open(str(CLIENT_SECRETS_FILE)) as secret_file:
if sys.argv[-1] == 'DEV':
parsed_config['oauth_call... | alex-kayne/family_tree | app/settings.py | settings.py | py | 561 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "yaml.safe_load",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "constant.CLIENT_SECRETS_FILE",
"line_number": 10,
"usage_type": "argument"
},
{
"api_name": "sys.argv",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "json.loa... |
27461661180 | #!/usr/bin/env python3
import sys
import numpy as np
import re
from glob import glob
from gen_stats import gen_stats
from gen_ground_truth import load_lats
OBSERVED_NAME="prober.diffsync"
TRUTH_NAME="ground_truth.txt"
#https://gist.github.com/SeanSyue/8c8ff717681e9ecffc8e43a686e68fd9
def sorted_alphanumeric(data):
... | Systems-ShiftLab/optane_sec23_ae | keystroke/gen_final.py | gen_final.py | py | 2,562 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "re.split",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 33... |
27276992717 | import json
import time
from src.awards import get_awards_api
from src.hosts import get_hosts_api
from src.presenters import get_presenters_api
from src.winners import get_winners_api
from src.nominees import get_nominees_api
from src.sentiment import get_sentiment_api
# IMPORTANT: DO NOT CHANGE ANY OF THE FUNCTION N... | aparkerryan27/golden-globes-tweet-mining | gg_api.py | gg_api.py | py | 4,003 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "json.load",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "src.hosts.get_hosts_api",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "src.awards.get_awards_api... |
20509845719 | from django.shortcuts import redirect, render
from .models import Book
# Create your views here.
def home(request):
return render(request, 'books/home.html')
def book_list(request):
books = Book.objects.all()
return render(request, 'books/book_list.html', {'books': books})
def add_book(request):
i... | LuisSillva/Books-list | books/views.py | views.py | py | 860 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "django.shortcuts.render",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "models.Book.objects.all",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "models.Book.objects",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name"... |
13283335617 | from urllib.request import urlopen
from pandas import json
import requests
import os
import re
#h获取链接
def get_one_page(url):
response = requests.get(url).text
# print(response.text)
return response
#获得主页内容的各个子网页链接
def parse_total_page(response):
pattern = re.compile('<li><a href=(.*?)target=... | gxiskobe/pyspider3 | meizitu._re.py | meizitu._re.py | py | 3,525 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "re.S",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "re.findall",
"line_number": 15,
... |
43760844626 | import logging
from pathlib import Path
from typing import Union
from fastapi import FastAPI, Request
from fastapi.middleware.cors import CORSMiddleware
from fastapi.responses import FileResponse
from fastapi.staticfiles import StaticFiles
from fastapi.templating import Jinja2Templates
from backend.api.routes import ... | angel-langdon/musictype | backend/main.py | main.py | py | 2,898 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "fastapi.FastAPI",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "typing.Union",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_nu... |
41268207236 | #!/usr/bin/python3
from sys import argv
import configparser
from datetime import date
from os import system, path
import htmlReport
import systemWrapper
import databaseWrapper
options = {
"config-file" : "trafficdatabaseWrapper.conf", # Default configuration file
"enable" : False, # True if service is enable... | JustBeYou/trafficdb | trafficdb.py | trafficdb.py | py | 7,141 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "configparser.RawConfigParser",
"line_number": 134,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 145,
"usage_type": "argument"
},
{
"api_name": "systemWrapper.Tcpdump",
"line_number": 149,
"usage_type": "call"
},
{
"api_name": "os... |
74690823998 | ################################################################################
import cv2
import telegram
from telethon import TelegramClient, events, functions, types
from telethon.tl.types import PeerUser, PeerChat, PeerChannel
import geocoder
########################################################################... | Prasanth231/Fire_Detection | fire detection.py | fire detection.py | py | 1,671 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "cv2.CascadeClassifier",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "telegram.Bot",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "telethon.TelegramCl... |
18340850346 | import sys
import logging
import asyncio
import asyncpg
import tornado.httpserver
import tornado.ioloop
import tornado.web
import tornado.log
from tornado.options import define, options
from jinja2 import Environment, FileSystemLoader
from setting import STATIC_PATCH, TEMPLATE_PATH, DB_PSQL_DSN
from routes import rou... | vadim7j7/tornado-oauth | server.py | server.py | py | 2,032 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "tornado.options.define",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "tornado.options.define",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "tornado.options.define",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "... |
29203705187 | import time
import socket
import random
import logging
import struct
import numpy as np
import settings
from console.config import config
from console.exceptions import ConsoleException
from console import threads
__all__ = (
"client",
"set_client_click_timeout",
"set_client_move_timeout"
)
logger = log... | aachurin/robobo | console/client.py | client.py | py | 7,635 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "console.exceptions.ConsoleException",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "struct.pack",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "set... |
72566290558 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from __future__ import print_function
import os
import subprocess
import glob
import requests
isolist = [
"https://atxfiles.netgate.com/mirror/downloads/pfSense-CE-2.6.0-RELEASE-amd64.iso.gz",
"https://osdn.mirror.constant.com//clonezilla/74519/clonezilla-live-2.7... | dalraf/proxmoxconfigure | configurepromox.py | configurepromox.py | py | 7,161 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "glob.glob",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "os.chdir",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "subprocess.call",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "subprocess.call",
"line_number... |
20686199474 | from django.conf.urls import include, url
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static
from biblioteca import views
from contactos.views import contactos
from pokemon.views import get_pokemon,info_pokemon,tipo_pokemon
"""
aumento
xd
"""
urlpatterns = ... | Raymundoo/api-cliente | prueba/urls.py | urls.py | py | 2,270 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "django.conf.urls.url",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "django.contrib.admin.site",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 15,
"usage_type": "name"
},
{
"api_name... |
73131987200 | import argparse
from typing import get_args
from pullbug._version import __version__
from pullbug.bug import (
DEFAULT_BASE_URL,
DEFAULT_LOCATION,
DEFAULT_LOG_LEVEL,
GITHUB_CONTEXT_CHOICES,
GITHUB_STATE_CHOICES,
LOG_LEVEL_CHOICES,
Pullbug,
)
class PullBugCli:
def __init__(self):
... | Justintime50/pullbug | pullbug/cli.py | cli.py | py | 5,608 | python | en | code | 5 | github-code | 97 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "typing.get_args",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "pullbug.bug.GITHUB_STATE_CHOICES",
"line_number": 59,
"usage_type": "argument"
},
{
"api_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.