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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
70373498108 | from typing import Optional, Any, Union, Callable
import torch
from torch import Tensor
import torch.nn.functional as F
from torch.nn.modules import Module
from .linear import Linear
from .normalization import LayerNorm
from .activation import MultiheadAttention
from .dropout import Dropout
class TransformerEncoder... | S-Lab-System-Group/Hydro | hydro/fuse_ops/transformer.py | transformer.py | py | 12,254 | python | en | code | 18 | github-code | 6 | [
{
"api_name": "torch.nn.modules.Module",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "typing.Union",
"line_number": 81,
"usage_type": "name"
},
{
"api_name": "typing.Callable",
"line_number": 81,
"usage_type": "name"
},
{
"api_name": "torch.Tensor",
... |
20250267652 | from mimetypes import init
import requests
import urllib.parse
import json
class MapBox:
def __init__(self, access_token) -> None:
self.root_url = "https://api.mapbox.com/geocoding/v5/mapbox.places/{}.json?types=place%2Caddress%2Cregion&access_token={}"
self.access_token = access_token
def get... | andrewhuang427/WashU-Athletics-Demographics | utils/MapBox.py | MapBox.py | py | 1,369 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "urllib.parse.parse.quote",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "urllib.parse.parse",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "urllib.parse",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "request... |
13126886716 | from itertools import combinations
def make_all_cases(user_info_array):
all_cases_from_user = [];
for i in range(5):
combination_array = combinations([0,1,2,3],i)
for combination in combination_array:
case = "" #[] -> ----
for j in range(4):
... | 39world/Today-Algorithm-Study- | old_test/al_pg_08.py | al_pg_08.py | py | 2,005 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "itertools.combinations",
"line_number": 7,
"usage_type": "call"
}
] |
477748253 | import torch as t
import ipdb
class AttentionPooling(t.nn.Module):
def __init__(self, input_size, hidden_size, dropout):
super(AttentionPooling, self).__init__()
self.projection1 = t.nn.Linear(input_size, hidden_size, bias=True)
self.dropout = t.nn.Dropout(dropout)
self.projection2... | CNDPlab/MSMARCO_Reshaped | Predictor/ModelUtils/query_pooling.py | query_pooling.py | py | 1,316 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "torch.nn",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.Linear",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.Dropout",
"line... |
39654407914 | import os
import logging
import yaml
from typing import Dict, Any
from yacs.config import CfgNode as _CfgNode
BASE_KEY = "__BASE__"
class CfgNode(_CfgNode):
@staticmethod
def load_yaml_with_base(filename: str, allow_unsafe: bool = False):
with open(filename, 'r') as file:
... | lqxisok/llSeg | configs/base.py | base.py | py | 3,491 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "yacs.config.CfgNode",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "yaml.safe_load",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "yaml.unsafe_load... |
71927845947 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, unicode_literals
import logging
import sys
import os
import urlparse
import xbmcgui
import xbmcplugin
import xbmcaddon
from resources.lib import loghandler
loghandler.config()
LOG = logging.getLogger()
PLUGIN_PATH = 'plu... | croneter/plugin.video.proof-of-concept | default.py | default.py | py | 2,070 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "resources.lib.loghandler.config",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "resources.lib.loghandler",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "logging.getLogger",
"line_number": 16,
"usage_type": "call"
},
{
"api_na... |
32659197304 | from werkzeug.exceptions import ClientDisconnected
from flask import Flask, request
from flask import current_app
from flask_cache import Cache
from mongoengine import connect
from flask_superadmin import Admin
from flask_mail import Mail
from flaskext.markdown import Markdown
from flask_restful import Api
from rever... | JunctionAt/JunctionWWW | constructor.py | constructor.py | py | 4,126 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "flask_cache.Cache",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "flask.current_app",
"line_number": 19,
"usage_type": "argument"
},
{
"api_name": "mongoengine.connect",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "flask.cur... |
18716841287 | #! /user/bin/env python
# -*- coding:utf-8 -*-
'''
爬取列表信息
'''
import json
from scrapy.http import Request
from scrapy.spiders import CrawlSpider
from douyin.items import DouyinCategoryItem
class categorySpider(CrawlSpider):
name = 'categorySpider'
redis_key = 'categorySpider'
cursor_num = 0
coun... | gisShield/douyin | douyin/spiders/categoryspider.py | categoryspider.py | py | 2,313 | python | en | code | 24 | github-code | 6 | [
{
"api_name": "scrapy.spiders.CrawlSpider",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "json.loads",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "scrapy.http.Request",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "douyin.item... |
41040069910 | from tracemalloc import start
import pyaudio
import wave
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from matplotlib.ticker import *
import numpy as np
import struct
import time
from scipy import interpolate
plt.style.use('gray-background')
class Fourier:
def __init__(self, scale, dt)... | MoeMatsuda-ai/SWVC | test/fft_live_test/inout_live.py | inout_live.py | py | 3,531 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "matplotlib.pyplot.style.use",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.style",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 12,
"usage_type": "name"
},
{
"api_na... |
73027828029 | import senticnet5 as sent_dict
import pandas as pd
import numpy as np
from itertools import islice
from sklearn.model_selection import train_test_split
import re
# returns numpy array
def get_ratings(ratings_filename):
return np.load(ratings_filename)
# returns array of document arrays with words
def get_review... | jgombac/RatingPredictor | simple_sentiment.py | simple_sentiment.py | py | 4,427 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.load",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "senticnet5.senticnet",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "sklearn.model_selection.t... |
26459920205 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from ..nnutils import geom_utils
from ..nnutils import loss_utils
from ..nnutils import train_utils
from ..nnutils import discriminators
from ..nnutils.smr import SoftRenderer
from ..nnutils import cub_mesh_s1 ... | NVlabs/UMR | experiments/train_s1.py | train_s1.py | py | 17,158 | python | en | code | 223 | github-code | 6 | [
{
"api_name": "absl.flags.DEFINE_float",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "absl.flags",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "absl.flags.DEFINE_float",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "absl.flags... |
37392717665 | import streamlit as st
import requests,random,time
from deta import Deta
deta = Deta(st.secrets['key'])
# Base key
db= deta.Base("usernames")
st.set_page_config(page_title="Github Shoutout",page_icon="images/githublogo.png",layout="centered",initial_sidebar_state="auto") # setting the page config
def ver... | samadpls/Github-Shoutout | app.py | app.py | py | 4,179 | python | en | code | 10 | github-code | 6 | [
{
"api_name": "deta.Deta",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "streamlit.secrets",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "deta.Base",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "streamlit.set_page_config",
... |
29836585751 | # #Unzip the test directory
# !unzip drive/My\ Drive/CatVSDog/test1.zip
# #Unzip the train directory
# !unzip drive/My\ Drive/CatVSDog/train.zip
# Plotting the images of dog
import shutil
from keras.preprocessing.image import ImageDataGenerator
from keras.callbacks import ModelCheckpoint
from keras.layers import Dense
... | mcaupybugs/CatsVSDogs | catvsdog.py | catvsdog.py | py | 4,994 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "matplotlib.pyplot.subplot",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "matplotlib.image.imread",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "m... |
38684469232 | # pylint: disable=attribute-defined-outside-init,wrong-import-order,redefined-outer-name,invalid-name
import gc
from configparser import ConfigParser
from tempfile import TemporaryDirectory
import magic
import pytest
from storage.binary_service import BinaryService
from storage.db_interface_backend import BackEndDbI... | 5am1i/Fact | src/test/integration/storage/test_binary_service.py | test_binary_service.py | py | 2,626 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "test.common_helper.create_test_firmware",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "tempfile.TemporaryDirectory",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "test.common_helper.get_config_for_testing",
"line_number": 21,
"usage... |
15426226201 | import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), 'classes'))
from classes import data_manager
from sklearn.neural_network import MLPClassifier, MLPRegressor
from sklearn.pipeline import Pipeline
from sklearn.model_selection import GridSearchCV
from sklearn.ensemble import RandomForestRegressor
f... | JaapvDijk/PredictTaskImpactNLP | classes/prediction_models.py | prediction_models.py | py | 14,556 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sys.path.append",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": ... |
24337846458 | # -*- coding: utf-8 -*-
import os
import sys
import shutil
import datetime
import numpy as np
from sklearn.model_selection import train_test_split
from PIL import Image
from keras import models
from keras import layers
from keras import optimizers
from keras import regularizers
from keras import backend... | jabez128/dl-trafficsigns-detection | classifier.py | classifier.py | py | 5,975 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "os.path.exists",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "os.mkdir",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 35... |
21216112261 | import requests
NEWS_ENDPOINT = "https://newsapi.org/v2/everything"
NEWS_API_KEY = 'caa8a3621a5e481c96807e77fe1dfc91'
news_params = {
'q': "Tesla Inc",
'apiKey': NEWS_API_KEY
}
response = requests.get(url=NEWS_ENDPOINT, params=news_params)
response.raise_for_status()
data = response.json()["articles"]
articl... | myoaung99/Stock-news | eg.py | eg.py | py | 390 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.get",
"line_number": 10,
"usage_type": "call"
}
] |
29157621722 | # -*- coding: utf-8 -*-
import logging
import aiogrpc
class AsyncPluginManager:
"""
Connects to a running mavsdk server or starts one and manages plugins
"""
@classmethod
async def create(cls, host, port=50051):
self = AsyncPluginManager()
self.host = host
self.port = por... | mavlink/MAVSDK-Python | mavsdk/async_plugin_manager.py | async_plugin_manager.py | py | 1,162 | python | en | code | 246 | github-code | 6 | [
{
"api_name": "aiogrpc.insecure_channel",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "logging.NullHandler",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "aiogrp... |
38827999454 |
import random
import qrcode
import qrcode.image.svg
from io import BytesIO
from django.shortcuts import render
from django.views.generic import View
class IndexView(View):
def get(self, request, *args, **kwargs):
template = 'index.html'
return render(
request,
template,
... | AbrahamAdekunle/Bashir_abraham_ERP | bar_qr_code/views.py | views.py | py | 1,087 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.views.generic.View",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "django.shortcuts.render",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "random.sample",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "djang... |
38047305072 | from flask import Flask, jsonify, render_template
import psutil
import subprocess
app = Flask(__name__)
def get_gpu_usage():
result = subprocess.check_output("nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits", shell=True)
gpu_usage = float(result.strip())
return gpu_usage
@app.route('... | agbld/webserver_for_system_infos | app.py | app.py | py | 784 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "subprocess.check_output",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "psutil.cpu_pe... |
25068490855 | from typing import Tuple, List
from asendia_us_lib.shipping_rate_request import ShippingRateRequest
from asendia_us_lib.shipping_rate_response import ShippingRate
from purplship.core.units import Packages, Services, Options
from purplship.core.utils import Serializable, DP, NF
from purplship.core.models import (
Ra... | danh91/purplship | sdk/extensions/asendia_us/purplship/providers/asendia_us/rate.py | rate.py | py | 2,301 | python | en | code | null | github-code | 6 | [
{
"api_name": "purplship.providers.asendia_us.utils.Settings",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "purplship.providers.asendia_us.error.parse_error_response",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "typing.Tuple",
"line_number": 16,
... |
26169526568 | import argparse
import json
import os
import time
import torch
from redsandt.encoder.bert_encoder import BERTEncoder
from redsandt.framework.bag_re import BagRE
from redsandt.selector.bag_attention import BagAttention
# Pass arguments
parser = argparse.ArgumentParser(
description='Improving Distantly-Supervised ... | DespinaChristou/REDSandT | redsandt.py | redsandt.py | py | 4,210 | python | en | code | 22 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_... |
22982145642 | import sys
import json
import os
import io
import collections
import argparse
import logging
from e2edutch import conll
from e2edutch import minimize
from e2edutch import util
from e2edutch import coref_model as cm
from e2edutch import naf
import tensorflow.compat.v1 as tf
logger = logging.getLogger('e2edutch')
cl... | Filter-Bubble/e2e-Dutch | e2edutch/predict.py | predict.py | py | 7,163 | python | en | code | 9 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "e2edutch.util.initialize_from_env",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": ... |
34540343891 | import argparse
import sys
from operator import add
import os
import shlex
import shutil
from subprocess import Popen, PIPE
from pyspark import SparkContext, SparkConf
import pyspark.serializers
import subprocess
import boto3
import re
global parser_result
if sys.version > "3.4":
pyspark.serializers.protocol = 4
... | VCCRI/Falco | source/spark_runner/run_pipeline_alignment.py | run_pipeline_alignment.py | py | 15,126 | python | en | code | 37 | github-code | 6 | [
{
"api_name": "sys.version",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "pyspark.serializers",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "subprocess.Popen",
"line_number": 98,
"usage_type": "call"
},
{
"api_name": "shlex.spli... |
8385118921 | from __future__ import absolute_import
from __future__ import print_function
import os
import sys
import subprocess
import optparse
from collections import namedtuple
if 'SUMO_HOME' in os.environ:
tools = os.path.join(os.environ['SUMO_HOME'], 'tools')
sys.path.append(tools)
import sumolib # noqa
else:
... | ngctnnnn/DRL_Traffic-Signal-Control | sumo-rl/sumo/tools/tlsCoordinator.py | tlsCoordinator.py | py | 12,854 | python | en | code | 17 | github-code | 6 | [
{
"api_name": "os.environ",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_numb... |
30364393271 | import os.path
import shutil
import sys
import tempfile
import textwrap
import testfixtures
from okonomiyaki.file_formats import EggMetadata, PackageInfo
from okonomiyaki.utils.test_data import NOSE_1_3_4_RH5_X86_64
from okonomiyaki._cli import main
if sys.version_info < (2, 7):
import unittest2 as unittest
else... | enthought/okonomiyaki | okonomiyaki/_cli/tests/test_cli.py | test_cli.py | py | 2,580 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "sys.version_info",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "unittest.TestCase",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "tempfile.mkdtemp",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "shutil.... |
23065976802 | import numpy as np
import os, sys, math
import pandas as pd
import dash
#import dash_core_components as dcc
from dash import dcc
#import dash_html_components as html
from dash import html
from dash.dependencies import Input, Output
import plotly.graph_objs as go
class Obstacle():
def __init__(self, ... | ArmanAstud/3D_detection_visualizer | scripts/utils.py | utils.py | py | 4,363 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sys.exit",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "math.cos",
"line_number": 73,
"usage_type": "call"
},
{
"api_name": "math.sin",
"line_number": 73,
"usage_type": "call"
},
{
"api_name": "math.sin",
"line_number": 74,
"usa... |
36466168685 | #!/usr/bin/env python
import utils
import gzip
import argparse
from pysam import TabixFile
import numpy as np
import glob
def get_args():
parser = argparse.ArgumentParser()
parser.add_argument('-r',
dest='rate_dir',
required=True,
help='P... | ryanlayerlab/layer_lab_chco | bin/get_regions_zscores.py | get_regions_zscores.py | py | 2,039 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "gzip.open",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "utils.Interval",
"lin... |
35041229962 | from toscaparser.imports import ImportsLoader
from configuration_tool.common import utils
from configuration_tool.common.configuration import Configuration
from configuration_tool.common.tosca_reserved_keys import *
from configuration_tool.providers.common.provider_configuration import ProviderConfiguration
from conf... | sadimer/clouni_configuration_tool | configuration_tool/providers/common/tosca_template.py | tosca_template.py | py | 22,563 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "configuration_tool.common",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "configuration_tool.providers.common.provider_configuration.ProviderConfiguration",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "configuration_tool.common.configuratio... |
43855241031 | import os
import matplotlib.pyplot as plt
import numpy as np
import torch
from torch import nn
import torch.optim as optim
import torchvision
from torchvision import transforms, models, datasets
import imageio
import time
import warnings
import random
import sys
import copy
import json
from PIL import Image
#########... | harryjd/keras_dogs_vs_cats | 图像识别_仿写唐宇迪的例子.py | 图像识别_仿写唐宇迪的例子.py | py | 14,465 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.array",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "torchvision.models.resnet152",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "torchvision.mode... |
35543810797 | from django.urls import path
from . import views
app_name='cv'
urlpatterns = [
path('curriculo', views.index, name='index'),
path('curriculo/dados-pessoais', views.cadastrar_ou_aletarar_foto_e_objetivo, name='editar_dados'),
path('curriculo/educacao', views.cadastrar_educacao, name='educacao'),
path('cu... | smctinf/casa_do_trabalhador | curriculo/urls.py | urls.py | py | 662 | python | pt | code | 0 | github-code | 6 | [
{
"api_name": "django.urls.path",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
47533751 | from typing import List
class Solution:
def maxUncrossedLines(self, nums1: List[int], nums2: List[int]) -> int:
# dp table
dp = [[0] * (len(nums2)+1) for _ in range(len(nums1)+1)]
# initialize
# pass
# traverse dp table
for i in range(1, len(nums1)+1):
f... | code-cp/leetcode | solutions/1035/main.py | main.py | py | 689 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.List",
"line_number": 4,
"usage_type": "name"
}
] |
25823990802 | import numpy as np
import pygame
import constants
class Driver(object):
"""
This class implements the car's driver: visibility, controls etc.
"""
def __init__(self,
view_distance=constants.MAX_VIEW_DISTANCE,
view_resolution=constants.VIEW_RESOLUTION,
... | vuolleko/FormulaPF | driver.py | driver.py | py | 9,079 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "constants.MAX_VIEW_DISTANCE",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "constants.VIEW_RESOLUTION",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "constants.VIEW_ANGLE",
"line_number": 14,
"usage_type": "attribute"
},
... |
31373127129 | # encoding=utf8
import datefinder
from datetime import datetime
import sys
import csv
import boto3
from data import Data
from PIL import Image
import pytesseract
import cv2
import os
import re
class TestData:
"""docstring for TestData"""
@staticmethod
def get():
data = Data()
data.set('Fi... | prasadbiradar/date-extraction-from-images | testdata.py | testdata.py | py | 2,928 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "data.Data",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "data.set",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "data.set",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "boto3.client",
"line_number": 40,
... |
20755734857 | import pandas as pd
import logging as lg
import pickle
lg.basicConfig(filename='data_test_automation.log', level=lg.INFO, format='%(asctime)s %(name)-12s %(levelname)-8s %('
'message)s', datefmt='%m-%d %H:%M',
filemode='w')
def... | InduMouliMahamkali/flightfareprediction | pre-processing and modeling/automated_model_test.py | automated_model_test.py | py | 5,520 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "logging.basicConfig",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "logging.warning",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pandas.read_excel... |
74903206266 | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
from collections import deque
class Solution:
def levelOrder(self, root: Optional[TreeNode]) -> List[List[int]]:
i... | eungang3/Leetcode | binary-tree-level-order-traversal/binary-tree-level-order-traversal.py | binary-tree-level-order-traversal.py | py | 973 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "collections.deque",
"line_number": 15,
"usage_type": "call"
}
] |
15974434638 | # Api Agenda Lionx
from src.infrastructures.mongo.mongo_infrastructure import MongoInfrastructure
# Third party
from decouple import config
from pymongo.cursor import Cursor
from pymongo.collection import InsertOneResult, UpdateResult
class MongoRepository:
def __init__(self):
self.mongo_client = MongoIn... | vinireeis/api_agenda_lionx | src/repositories/mongo/repository.py | repository.py | py | 2,050 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "src.infrastructures.mongo.mongo_infrastructure.MongoInfrastructure.get_client",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "src.infrastructures.mongo.mongo_infrastructure.MongoInfrastructure",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "... |
29944774792 | import os
import sys
sys.path.insert(1, os.path.join(sys.path[0], 'utils'))
import numpy as np
import pandas as pd
import argparse
import h5py
import librosa
from scipy import signal
import matplotlib.pyplot as plt
import time
import csv
import random
from concurrent.futures import ProcessPoolExecutor
from functools im... | iamjanvijay/Background-Sound-Classification-in-Speech-Audio-Segments | utils/features.py | features.py | py | 7,026 | python | en | code | 4 | github-code | 6 | [
{
"api_name": "sys.path.insert",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": ... |
16601473639 | import socket
import serial
import sqlite3
import select
import time
import datetime
HEADERSIZE = 10
running_on_pie = False # pie or windows
if running_on_pie:
host = '192.168.1.10'
pos = '192.168.1.10'
win1 = '192.168.1.11'
win2 = '192.168.1.12'
conn = sqlite3.connect('/home/sysop/pos/order.db')... | RG11rant/donuts | server.py | server.py | py | 9,334 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "sqlite3.connect",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "serial.Serial",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "serial.Serial",
"li... |
13442824529 | import pygame, os
from modules.entitysets._puresensor import PureSensor
from imageload import loadImage
from button import Button
from menustate import MenuState
from staticimage import StaticImage
from gridrounding import gridRound
from selectionbox import SelectionBox
from label import Label
class RemoveSens... | Occuliner/ThisHackishMess | modules/menuentries/sensoredit.py | sensoredit.py | py | 6,709 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "button.Button",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "imageload.loadImage",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "button.Button.__init__",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "button.Butto... |
16791541041 | # -*- coding: utf-8 -*-
"""
Created on Wed Nov 23 12:32:47 2022
@author: maksi
"""
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
from sklearn.datasets import load_digits
from keras.models import Sequential
from keras.layers import Dense
from tensorflow.keras.optimizers impor... | makspervov/Podstawy-SI-Python | lab5/lab5_zad2.py | lab5_zad2.py | py | 1,785 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sklearn.datasets.load_digits",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pandas.Categorical",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "pandas.get_dummies",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "ke... |
7368403785 | #!/usr/bin/env python2.6
# -*- coding: utf-8 -*-
# mainframe.py
# Pomodoro
#
# Created by Roman Rader on 22.06.11.
# New BSD License 2011 Antigluk https://github.com/antigluk/Pomodoro
"""
Contains main frame of application.
"""
import wx
from state import PomodoroStateProxy as PomodoroState
from NotificationCente... | rrader/Pomodoro | pomodoro/mainframe.py | mainframe.py | py | 4,124 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "wx.Frame",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "wx.Frame.__init__",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "wx.Frame",
"lin... |
17600865196 | #encoding:UTF-8
import urllib
import urllib.request
import json
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif'] = ['SimHei']
import matplotlib.lines as mlines
import numpy as np
import time
data = urllib.request.urlopen('https://stationdata.wunderground.com/cgi... | Louis-He/weather_map | wunderground_weather.py | wunderground_weather.py | py | 6,022 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "matplotlib.pyplot.rcParams",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "urllib.request.urlopen",
"line_number": 13,
"usage_type": "call"
},
{
"api_name":... |
17282581755 | from pynput.keyboard import Listener, Key
import time
from threading import Thread
from canvas import Canvas
from pedal import Pedal
from snake import Snake
from ball import Ball
import os
def on_press(key):
if hasattr(key, 'char'): # Write the character pressed if available
print(key.char)
elif key =... | devbit-algorithms/snakepong-snaka69 | gameLoop.py | gameLoop.py | py | 1,665 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pynput.keyboard.Key.up",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "pynput.keyboard.Key",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "snake.up",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pynput.keybo... |
25849126163 | import random
import time
from colorama import Back, Fore, init
from SudokuF import *
from SudokuT import *
from Menus import *
from Ahorcado import *
lop = 0
while lop == 0:
menuprincipal()
opcionprincipal = input(Fore.BLUE + "[4] Finalizar: " + Fore.RESET)
if opcionprincipal == "Fernando": #... | K23NO/Soduko | Sudoku.py | Sudoku.py | py | 7,562 | python | es | code | 0 | github-code | 6 | [
{
"api_name": "colorama.Fore.BLUE",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "colorama.Fore",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "colorama.Fore.RESET",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "colora... |
11278711462 | """
Here we test a basic strategy that includes an indicator and FX rate movements.
We'll start with an ($100K) AUD denominated portfolio and buy 100 shares of SPY
only if the VIX < 26.
Also, buying in SPY will make us short USD.
Generate funding trades, to be executed the day after we buy SPY, so that
we aren't shor... | simongarisch/pxtrade | tests/test_strategy2.py | test_strategy2.py | py | 4,212 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "pxtrade.assets.reset",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "pxtrade.assets.Stock",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "pxtrade.assets.Cash",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "pxtrade... |
41457469135 | """
flaskr.utils.db
~~~~~~~~~~~~~~~
Utilities for database operations.
"""
import sqlite3
from typing import List, Optional
from datetime import datetime, timezone
from flask import g
from flask import current_app
from flaskr.utils.node import Node
def convert_timestamp(t):
return datetime.fromisoformat(t.decode... | MioYvo/unlimited-level-messages | backend/flaskr/utils/db.py | db.py | py | 3,870 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "datetime.datetime.fromisoformat",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "datetime.timezone.utc",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_... |
13918838862 | # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
import time
from collections import defaultdict
from datetime import datetime
from odoo import api, models
class ManagementDashboard(models.Model):
_name = 'management.dashboard'
_description = "Project Management Dashboard"
@api.mo... | onesteinbv/ProjectManagement | management_dashboard/models/management_dashboard.py | management_dashboard.py | py | 5,708 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "odoo.models.Model",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "odoo.models",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "collections.defaultdict",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "odoo.api.m... |
29542340141 | import re
from collections import defaultdict
from string import Template
from odoo import _
from odoo.exceptions import MissingError
DEFAULT_REFERENCE_SEPARATOR = ""
PLACE_HOLDER_4_MISSING_VALUE = "/"
class ReferenceMask(Template):
pattern = r"""\[(?:
(?P<escaped>\[) |
(... | odoonz/odoonz-addons | product_code_builder/models/helper_methods.py | helper_methods.py | py | 1,828 | python | en | code | 14 | github-code | 6 | [
{
"api_name": "string.Template",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "re.compile",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "odoo.exceptions.MissingError",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "odoo._",
... |
42012547996 | # python 3 has different package names
try: from urlparse import urlparse
except ImportError: from urllib.parse import urlparse
from collections import defaultdict
def _new_collection():
""" Collection data type is
{path: {method: (ResponseClass,) }}
So e.g. a POST request to http://venmo.com/... | venmo/tornado-stub-client | tornado_stub_client/collection.py | collection.py | py | 1,717 | python | en | code | 9 | github-code | 6 | [
{
"api_name": "collections.defaultdict",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "urllib.parse.urlparse",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "urllib.parse.urlparse",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "u... |
71836229628 | from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_insertar(object):
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(570, 518)
self.verticalLayout = QtWidgets.QVBoxLayout(Form)
self.verticalLayout.setObjectName("verticalLayout")
self.groupBox = QtWidgets.QG... | JoseVale99/simulador_prediccion_desemepe-o | view/insertar.py | insertar.py | py | 9,728 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "PyQt5.QtWidgets.QVBoxLayout",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtWidgets.QGroupBox",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "P... |
43229119277 | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("shop", "0005_auto_20150527_1127"),
]
operations = [
migrations.AlterField(
model_name="order",
name="key",
field=models.CharField(max_length=40, db_index... | stephenmcd/cartridge | cartridge/shop/migrations/0006_auto_20150916_0459.py | 0006_auto_20150916_0459.py | py | 345 | python | en | code | 696 | github-code | 6 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.AlterField",
"line_number": 11,
"usage_type": "call"
},
{... |
33359783594 | from unittest import TestCase
import unittest
# from unittest.mock import patch, Mock
# import csv
# from flask import request, jsonify
import requests
# import sys
#
# sys.path.insert(0, '../../src')
class TestLoadDailyReports(TestCase):
# def setUp(self):
# self.app = app.
def test_load_data_succ... | shin19991207/CSC301-A2 | tests/routes/test_daily_reports.py | test_daily_reports.py | py | 1,472 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "unittest.TestCase",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "requests.post",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "unittest.main",
"li... |
30059046061 | from pyswarms.base.base_discrete import DiscreteSwarmBase
import numpy as np
from scipy.spatial import cKDTree
class PerezPSO(DiscreteSwarmBase):
def assertions(self):
"""Assertion method to check various inputs.
Raises
------
KeyError
When one of the required diction... | Ninalgad/PerezSwarm | base_discrete.py | base_discrete.py | py | 10,842 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "pyswarms.base.base_discrete.DiscreteSwarmBase",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "numpy.full",
"line_number": 75,
"usage_type": "call"
},
{
"api_name": "numpy.inf",
"line_number": 75,
"usage_type": "attribute"
},
{
"api_name":... |
13138241281 | from django.contrib import admin
from django.urls import path, include
from django.http import HttpResponse
def homepage(request):
return HttpResponse("you're in the home page, goto polls.")
urlpatterns = [
path('admin/', admin.site.urls),
path('', homepage),
path('polls/', include('polls.urls')),
]... | callmebhawesh/100-Days-Of-Code | Day 31/mysite/mysite/urls.py | urls.py | py | 321 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "django.http.HttpResponse",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.contrib.admin.site",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name"... |
39993181023 | import os
import numpy as np
import matplotlib.pyplot as plt
import cv2
import open3d as o3d
def mkdirs(path):
try:
os.makedirs(path)
except:
pass
class Saver(object):
def __init__(self, save_dir):
self.idx = 0
self.save_dir = os.path.join(save_dir, "results")
... | zhijieshen-bjtu/PanoFormer | PanoFormer/saver.py | saver.py | py | 3,346 | python | en | code | 79 | github-code | 6 | [
{
"api_name": "os.makedirs",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "os.path.exists",
"line_numb... |
8352946523 | from setuptools import find_packages, setup
with open("./README.md") as fp:
description = fp.read()
setup(
name="pyC8",
version="1.1.1",
description="Python SDK for Macrometa Global Data Mesh",
long_description=description,
long_description_content_type="text/markdown",
author="Macrometa",... | Macrometacorp/pyC8 | setup.py | setup.py | py | 1,074 | python | en | code | 6 | github-code | 6 | [
{
"api_name": "setuptools.setup",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",
"line_number": 15,
"usage_type": "call"
}
] |
29528131446 | from flask import Flask, request
app = Flask(__name__)
@app.route('/')
def home():
return "TP Florian Marques"
@app.route('/means', methods=['GET'])
def meanOfList():
list = request.args.getlist('int', type=int)
if len(list) == 0:
return "Given list is null"
else:
return "Mean of the... | MarquesFlorian/python_server_testing_florian_marques | app.py | app.py | py | 362 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "flask.request.args.getlist",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask.request.args",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "flask.r... |
5694314611 | import torch
import torch.nn as nn
class Decoder(nn.Module):
def __init__(self):
super(Decoder, self).__init__()
self.reduce_dim_5 = nn.Conv2d(2048, 256, kernel_size=(1, 1), stride=1, padding=0)
self.reduce_dim_4 = nn.Conv2d(1024, 256, kernel_size=(1, 1), stride=1, padding=0)
... | dmdm2002/FPN | Model/TopDown.py | TopDown.py | py | 1,762 | python | en | code | 2 | github-code | 6 | [
{
"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.Conv2d",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_numbe... |
19601192171 | #-*- coding: utf-8 -*-
from django.shortcuts import render, redirect
from blog.models import Mypost, MainPage
from blog.forms import CreateForms
# Create your views here.
def index(request):
all_posts = Mypost.objects.all()
maintext = MainPage.objects.all()
# print('all_posts_all')
# print(all_posts)... | drhtka/forms_urls_drf | blog/views.py | views.py | py | 3,836 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "blog.models.Mypost.objects.all",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "blog.models.Mypost.objects",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "blog.models.Mypost",
"line_number": 10,
"usage_type": "name"
},
{
... |
12486639819 | import multiprocessing
import time
import hashlib
memory = list(range(30_000_000))
def function(name):
for i in range(10):
print("Current:", name, i)
time.sleep(1)
def slow_function(name):
for i in range(10):
print("Current:", name, i)
for j in range(300_000):
h... | tt-n-walters/21-tuesday-python | core/multiple_processes.py | multiple_processes.py | py | 524 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "time.sleep",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "hashlib.md5",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "multiprocessing.Process",
"line_number": 26,
"usage_type": "call"
}
] |
38592347384 | from .atari import Atari
from .obj3d import Obj3D
from torch.utils.data import DataLoader
from object_detector import CLIPort_Dataset
__all__ = ['get_dataset', 'get_dataloader']
def get_dataset(cfg, mode):
assert mode in ['train', 'val', 'test']
return CLIPort_Dataset(cfg.dataset_roots.TABLE, mode)
def get_... | 1989Ryan/paragon | object_detector/space/dataset/__init__.py | __init__.py | py | 713 | python | en | code | 7 | github-code | 6 | [
{
"api_name": "object_detector.CLIPort_Dataset",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "torch.utils.data.DataLoader",
"line_number": 21,
"usage_type": "call"
}
] |
18453506476 | from icecream import ic
from stack import Stack
from datetime import datetime
def time_format():
return f'{datetime.now().strftime("%m/%d/%Y, %I:%M:%S")}|> '
ic.configureOutput(prefix=time_format, includeContext=True)
def nextLargestElment(items):
tempStack = Stack()
returnStack = Stack()
tempStac... | beharamadhu270405/python-DS | stack/next_greatest_element_using_stacks.py | next_greatest_element_using_stacks.py | py | 1,594 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "datetime.datetime.now",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "icecream.ic.configureOutput",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "ice... |
34327083443 | import pickle
import re
from pathlib import Path
from typing import List
from IPython.display import display
import os.path as op
from datetime import datetime
import pandas as pd
from tqdm.notebook import tqdm
from matplotlib import pyplot as plt
from sklearn.metrics import (
accuracy_score,
balanced_accu... | ibrahimberb/Predicting-Mutation-Effects | src/dev/CancerValidation/A1/utils.py | utils.py | py | 11,283 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "src.helpers.mylogger.get_handler",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 34,
"usage_type": "attribute"
},
{
"api_name": ... |
72946767548 | import numpy as np
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
from sklearn.decomposition import LatentDirichletAllocation
import os
from time import strftime
# Python 3.5
def load_data(filename):
return np.loadtxt(filename, skiprows=1, delimiter=' ')
def save_predictions(X, mod... | bchidamb/AmazonFeels | shit_tier/random_forest_pca.py | random_forest_pca.py | py | 1,890 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "numpy.loadtxt",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "time.strftime",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.savetxt",
"line_nu... |
23907002609 | import numpy as np
import pandas as pd
import scipy.spatial.distance as spd
import scipy.stats as sps
import sklearn.model_selection as skm
import sklearn.metrics as skmetrics
import matplotlib.pyplot as plt
import seaborn as sb
from hw1_modules import *
# read data from CSV to array
data = np.array(pd.read_csv("train... | terry99999/M_hw1 | knn.py | knn.py | py | 1,791 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.array",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.expand_dims",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.ones",
"line_... |
70047131707 | import xml.etree.ElementTree as ET
import pandas as pd
import numpy as np
import cv2 as cv
def draw_label(path):
tree = ET.parse(path)
img_out = np.zeros(shape=(1024, 1280))
img_list_x = []
img_list_y = []
for elem in tree.iterfind('object'):
mylist_x = []
mylist_y = [... | Bagpip/-HSI- | label_test.py | label_test.py | py | 1,589 | python | en | code | 0 | github-code | 6 | [
{
"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": "numpy.zeros",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.arra... |
40107035382 | version = "0.8"
import os, io
import chardet
from functools import wraps
from tempfile import mkstemp, mkdtemp
from json import JSONEncoder as _JSONEncoder
from pathlib import Path
from collections import deque
from colorama import Fore as F
markdown = None
class LabelledTree (object) :
def __init__ (self, lab... | fpom/badass | badass/__init__.py | __init__.py | py | 3,857 | python | en | code | 4 | github-code | 6 | [
{
"api_name": "colorama.Fore.WHITE",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "colorama.Fore",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "colorama.Fore.RESET",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "color... |
16644551299 | import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
def ex_deal(df_Int, df_ex):
columns = ['顺序', '氮素', '频率', '刈割']
df_Int = pd.concat([df_Int, pd.DataFrame(columns=columns)])
for item in range(df_Int.shape[0]):
for jtem in range(df_ex.shape[0]):
if int(df_Int.iloc[it... | QingqingSun-Bao/GitResp2 | micro/Fig10_bar_distribution.py | Fig10_bar_distribution.py | py | 5,270 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.concat",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pandas.read_excel",
"line_number": 86,
"usage_type": "call"
},
{
"api_name": "numpy.linspace",
"... |
170942993 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from rp_ui_harness import RequestPolicyTestCase
from marionette import expectedFailure
from marionette_driver import Wai... | RequestPolicyContinued/requestpolicy | tests/marionette/rp_puppeteer/tests-quick/test_error_detection.py | test_error_detection.py | py | 3,791 | python | en | code | 253 | github-code | 6 | [
{
"api_name": "rp_ui_harness.RequestPolicyTestCase",
"line_number": 60,
"usage_type": "name"
},
{
"api_name": "marionette_driver.Wait",
"line_number": 98,
"usage_type": "call"
},
{
"api_name": "re.search",
"line_number": 109,
"usage_type": "call"
},
{
"api_name": ... |
10426113272 | from measurements.models import Location, Station, SourceType, Network
from django.contrib.gis.geos import Point
import requests
from bs4 import BeautifulSoup
from datetime import datetime, timedelta
import pandas as pd
import re
IOC = "http://www.ioc-sealevelmonitoring.org/station.php?code={}"
stations = (
(... | CNR-ISMAR/ecoads | scripts/import_station_locations.py | import_station_locations.py | py | 1,738 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "measurements.models.SourceType.objects.get_or_create",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "measurements.models.SourceType.objects",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "measurements.models.SourceType",
"line_numbe... |
27535721148 | import json
from web3 import Web3
from decimal import Decimal
from router import*
import time
# add blockchain connection information
cronos_mainnet_rpc = "ws://rpc.vvs.finance/"
w3 = Web3(Web3.WebsocketProvider(cronos_mainnet_rpc, websocket_timeout= 6000))
ERC20ABI = json.load(open('./erc20_abi.abi'))
#getSelector("... | Galahad091/My-arb-on-fantom | test/encode_data.py | encode_data.py | py | 2,926 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "web3.Web3",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "web3.Web3.WebsocketProvider",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 10,
"usage_type": "call"
}
] |
23125697422 | import os
import sys
sys.path.append("..")
import taobaoTry.taobaoTryUtils
from task.logUtils import logUtils
class taobaoTryTask:
def enum(**enums):
return type('Enum', (), enums)
taskType = enum(JingXuan=1, All=2)
mTaskTypeFor = taskType.All
taobaoTryTaskLockFile = ".." + os.path.sep + "loc... | tudousiji/pachong | taobaoTry/taobaoTryTask.py | taobaoTryTask.py | py | 2,503 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "sys.path.append",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "os.path",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "os.path",
"line_number":... |
29522073566 | import os
import random
import sys
import yaml
import numpy as np
with open("config.yml", 'r') as ymlfile:
cfg = yaml.load(ymlfile, Loader=yaml.FullLoader)
ymlfile.close()
if not cfg['use_gpu']:
os.environ['CUDA_VISIBLE_DEVICES'] = '-1'
seed = cfg['seed']
os.environ['PYTHONHASHSEED'] = str(seed)
random.... | emarche/Fashion-MNIST | main.py | main.py | py | 2,261 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "yaml.load",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "yaml.FullLoader",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_n... |
19521127011 | from panda3d.core import CollisionNode, CollisionTube, CollisionBox, AmbientLight, Vec4, DirectionalLight
from FreedomCampaignGame.comm_with_server import ClientLogObject
client_logger = ClientLogObject().client_logger
class GameMap():
def __init__(self, render, load_model_fun):
self.render = render
... | optimjiang/my_3d_game | game_map.py | game_map.py | py | 4,327 | python | zh | code | 0 | github-code | 6 | [
{
"api_name": "FreedomCampaignGame.comm_with_server.ClientLogObject",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "panda3d.core.AmbientLight",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "panda3d.core.Vec4",
"line_number": 21,
"usage_type": "call"... |
23055488423 | """
Creation:
Author: Martin Grunnill
Date: 2022-11-01
Description: Getting prevelance data for world cup teams.
"""
import copy
import pandas as pd
import datetime
schedule_df = pd.read_csv('data_extraction/Fifa 2022 Group stages matches with venue capacity.csv')
covid_data = pd.read_csv('https://covid.o... | LIAM-COVID-19-Forecasting/Modelling-Disease-Mitigation-at-Mass-Gatherings-A-Case-Study-of-COVID-19-at-the-2022-FIFA-World-Cup | Running_and_analysing_simulations/parameters/data_extraction/getting_prevelance_data.py | getting_prevelance_data.py | py | 5,030 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pandas.to_datetime",
... |
854208264 | import core.modules
import core.modules.module_registry
from core.modules.vistrails_module import Module, ModuleError
import numpy
import scipy
import scipy.ndimage
from Array import *
from Matrix import *
class ArrayImaging(object):
my_namespace = 'numpy|imaging'
class ExtractRGBAChannel(ArrayImaging, Module):
... | VisTrails/VisTrails | contrib/NumSciPy/Imaging.py | Imaging.py | py | 7,502 | python | en | code | 100 | github-code | 6 | [
{
"api_name": "core.modules.vistrails_module.Module",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "core.modules.vistrails_module.Module",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "scipy.ndimage.gaussian_gradient_magnitude",
"line_number": 41,
... |
14837094680 | import frappe
import json
#从前台传入items,客户料号→料号
@frappe.whitelist()
def so_refcode_to_itemcode():
#提取js传入参数
ao_items = json.loads(frappe.form_dict.get("items"))
customer_name = frappe.form_dict.get("customer")
#获取js传入的全部客户料号(非重复)
s_ref_code = {r.get("customer_item_code") for r in ao_items}
#从xx表获取所有客户料号对应的【料号】
it... | cwlong1987/yhen | yhen/api/sales_order.py | sales_order.py | py | 866 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "json.loads",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "frappe.form_dict.get",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "frappe.form_dict",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "frappe.form_dict.g... |
31366334882 | import torch
import torch.nn as nn
from GAWWN.tools.config import cfg
from GAWWN.tools.tools import replicate
class keyMulD(nn.Module):
def __init__(self):
super(keyMulD, self).__init__()
self.ndf = cfg.GAN.NDF
self.nt_d = cfg.TEXT.TXT_FEATURE_DIM
self.keypoint_dim = cfg.KEYPOINT.D... | LosSherl/GAWWN.Pytorch | GAWWN/model/discriminator.py | discriminator.py | py | 4,867 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "torch.nn.Module",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "GAWWN.tools.config.cfg.GAN",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "GAWWN.too... |
73832000827 | import numpy as np
import pandas as pd
import scipy.ndimage as nd
from skimage import io as skio
import sys
import getopt
def usage():
print("""
Usage : python3 gen_stacked_tif.py < -i mask.lst>
< -a anno.txt>
< -o output prefix>
... | BGI-Qingdao/4D-BioReconX | Preprocess/meshgen/gen_stacked_tif.py | gen_stacked_tif.py | py | 2,922 | python | en | code | 4 | github-code | 6 | [
{
"api_name": "sys.exit",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "getopt.getopt",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "getopt.GetoptError",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "sys.exit",
"line_n... |
32124422720 | from pages.courses.register_courses_page import RegisterCoursesPage
from utilities.teststatus import TestStatus
import unittest
import pytest
import time
@pytest.mark.usefixtures("oneTimeSetUp", "setUp")
class RegisterCoursesTests(unittest.TestCase):
@pytest.fixture(autouse=True)
def classSetup(self, oneTime... | badekarganesh04/selenium-python-framework | tests/courses/register_courses_tests.py | register_courses_tests.py | py | 1,090 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "unittest.TestCase",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "pages.courses.register_courses_page.RegisterCoursesPage",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "utilities.teststatus.TestStatus",
"line_number": 14,
"usage... |
41708064158 | import glob
import math
import os
import sys
import random
import numpy as np
import pandas as pd
import tensorflow as tf
from tqdm import tqdm
from model.siamese.config import cfg
tqdm.pandas()
"""
Files have to be stored in a structure:
main_folder/
1/
0030.jpg
1080.jpg
...
2/
... | burnpiro/farm-animal-tracking | data/data_generator.py | data_generator.py | py | 6,118 | python | en | code | 24 | github-code | 6 | [
{
"api_name": "tqdm.tqdm.pandas",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "tqdm.tqdm",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "tensorflow.data",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.keras",
... |
11859412516 | import logging
from copy import deepcopy
from datetime import datetime, timedelta, timezone
from pathlib import Path
from typing import Any, Dict, List, Union
from pandas import DataFrame, to_datetime
from tabulate import tabulate
from freqtrade.constants import (DATETIME_PRINT_FORMAT, LAST_BT_RESULT_FN, UNLIMITED_ST... | robcaulk/freqai | freqtrade/optimize/optimize_reports.py | optimize_reports.py | py | 41,632 | python | en | code | 42 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "typing.Dict",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "pandas.DataFrame",
"li... |
44717248733 | # Quick and dirty utility to get coordinates for transforming view into
# a bird's eye view. Useful in OCRs were the camera is in a fixed positioning
# viewing a straight plane.
import cv2
import numpy as np
def onTrackbarChange(trackbarValue):
pass
def order_points(pts):
# initialize a list of coordinates t... | hellkrusher/BirdsEyePerspectiveTransformationUtility | BirdsEyePerspectiveTransformationUtility.py | BirdsEyePerspectiveTransformationUtility.py | py | 6,413 | python | en | code | 5 | github-code | 6 | [
{
"api_name": "numpy.zeros",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.argmin",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.argmax",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.diff",
"line_number":... |
72465379387 | from django import forms
from .models import Meme
class MemeForm(forms.ModelForm):
class Meta():
model = Meme
fields = ('description','category','meme_img')
widgets = {
'description': forms.TextInput(attrs={
'class': 'field',
'placeholder': 'Enter... | omroczkowski/h8gag | meme/forms.py | forms.py | py | 701 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.forms.ModelForm",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "models.Meme",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "django.forms.TextIn... |
15387648798 | import matplotlib.pyplot as plt
from sklearn.datasets.samples_generator import make_blobs
import numpy as np
def sigmoid(x):
return 1.0 / (1 + np.exp(-x))
def dataset():
(X, y) = make_blobs(n_samples=250, n_features=2, centers=2,
cluster_std=1.05, random_state=20)
X = np.c_[np.ones((X.shape[0])), X]
... | nickruggeri/Machine_Learning | AdaGrad, ADAM and AMSGrad/Codes/my_sgd.py | my_sgd.py | py | 2,198 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "numpy.exp",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sklearn.datasets.samples_generator.make_blobs",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.c_",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "n... |
2677444598 | # This code is based on https://github.com/openai/guided-diffusion
"""
Train a diffusion model on images.
"""
import os
import json
from mdm_utils.fixseed import fixseed
from mdm_utils.parser_util import train_args
from mdm_utils import dist_util
from train_utils.train_loop import TrainLoop
from mdm_utils.model_util ... | zyhbili/LivelySpeaker | scripts/train_RAG.py | train_RAG.py | py | 1,624 | python | en | code | 38 | github-code | 6 | [
{
"api_name": "mdm_utils.parser_util.train_args",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "mdm_utils.fixseed.fixseed",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 26,
"usage_type": "call"
},
{
"api_name"... |
45386087756 | """
Classes representing uploaded files.
"""
import errno
import os
from io import BytesIO
from theory.conf import settings
from theory.core.files.base import File
from theory.core.files import temp as tempfile
from theory.utils.encoding import forceStr
__all__ = ('UploadedFile', 'TemporaryUploadedFile', 'InMemoryUp... | grapemix/theory | theory/core/files/uploadedfile.py | uploadedfile.py | py | 3,916 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "theory.core.files.base.File",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "theory.utils.encoding.forceStr",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "os.path.basename",
"line_number": 46,
"usage_type": "call"
},
{
"api_n... |
369174475 | from typing import Optional
#se verifica daca treeul este symetric
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Solution:
def isSymmetric(self, root: Optional[TreeNode]) -> bool:
if not root or not ro... | ArdaiArtur/PY | LeetCode/SymetricTree.py | SymetricTree.py | py | 1,405 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.Optional",
"line_number": 10,
"usage_type": "name"
}
] |
71623457467 | # -*- coding: utf-8 -*-
"""
Created on Tue Jun 23 11:31:08 2020
@author: dkafkes
"""
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
df = pd.read_csv('master_stdev.csv', header = 0, skiprows = list(np.arange(1, 177)))
df.drop(columns = ['Filename'], inplace = True)
df = df.set_ind... | dkafkes/simplified-ai-for-accelerators | data pipeline/histogram.py | histogram.py | py | 577 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.hist",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot... |
72066886907 | import sys, os, re
import unittest
from itertools import product as prod
from timeit import Timer
import time
import math
import logging
import numpy as np
from scipy.optimize import fmin, fmin_bfgs
from hydrodiy.stat.transform import BoxCox2
from hydrodiy.data.containers import Vector
from pygme.model import Mod... | csiro-hydroinformatics/pygme | tests/test_pygme_calibration.py | test_pygme_calibration.py | py | 17,767 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "hydrodiy.stat.transform.BoxCox2",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "logging.Formatter",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "l... |
16737781321 | import pdb
import unittest
import json
from objbrowser import browse
import mock
from mock import patch
import music_server
from music_server import youtube_search
from music_server import config
class YoutubeSearchTestCase(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
... | Sun42/music_server | tests/youtube_search_tests.py | youtube_search_tests.py | py | 3,183 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "unittest.TestCase",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "music_server.youtube_search.format_query",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "music_server.youtube_search",
"line_number": 25,
"usage_type": "name"
}... |
31266417589 | import pygame
import os
from tkinter import messagebox
import time
import threading
pygame.init()
pygame.mixer.set_num_channels(20)
width = 150
height = 151
channel = 0
stop_music = False
fon_m = pygame.mixer.music
fon_m.load(os.path.join("sounds", "fon_m.mp3"))
fon_m.play()
fon = pygame.image.load(os.path.join("imag... | solvalkon/python_study | my single monsters/my single monsters class.py | my single monsters class.py | py | 26,982 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pygame.init",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pygame.mixer.set_num_channels",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pygame.mixer",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "pygame.mixer... |
27825918351 | """
создайте асинхронные функции для выполнения запросов к ресурсам (используйте aiohttp)
- доработайте модуль `jsonplaceholder_requests`:
- установите значения в константы `USERS_DATA_URL` и `POSTS_DATA_URL` (ресурсы нужно взять отсюда https://jsonplaceholder.typicode.com/)
- создайте асинхронные функции для в... | MikhailParkin/MikhailParkin | homework_04/jsonplaceholder_requests.py | jsonplaceholder_requests.py | py | 2,013 | python | ru | code | 0 | github-code | 6 | [
{
"api_name": "aiohttp.ClientSession",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "aiohttp.ClientSession",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "aiohttp.ClientSession",
"line_number": 38,
"usage_type": "call"
}
] |
32474300219 | from django.conf.urls import url, include
from rest_framework import routers
from api import views
router = routers.DefaultRouter()
router.register(r'signup', views.ProfileViewSet)
router.register(r'add_animal', views.AddAnimalViewSet)
# Wire up our API using automatic URL routing.
# Additionally, we include login U... | stoic1979/pashu_palak_sahayak | api/urls.py | urls.py | py | 439 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "rest_framework.routers.DefaultRouter",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "rest_framework.routers",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "api.views.ProfileViewSet",
"line_number": 6,
"usage_type": "attribute"
},
{... |
2108921101 | import sys
from requests import get
from io import BytesIO
import sqlite3
from PIL import Image
from data.PYTHON_files.main import Ui_MainWindow
from data.PYTHON_files.load_image import Ui_Form
from data.PYTHON_files.description import Ui_Form_Desk
from data.PYTHON_files.effects import *
from PyQt5.QtCore import Qt
... | Programmer-Anchous/Effects-program | run.py | run.py | py | 16,243 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "PyQt5.QtWidgets.QMainWindow",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "data.PYTHON_files.load_image.Ui_Form",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtWidgets.QMainWindow",
"line_number": 34,
"usage_type": "name"
... |
31746854279 | """ This module allows you to download public files from Google Drive and Dropbox """
import os
import requests
import zipfile
import logging
import patoolib
from bs4 import BeautifulSoup
import gdrivedl
# Define urls to filter by cloud service
GDRIVE_URL = 'drive.google.com'
DROPBOX_URL = 'dropbox.com'
def download_... | duckduckgrayduck/clouddl | src/clouddl/clouddl.py | clouddl.py | py | 4,484 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "gdrivedl.GDriveDL",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "gdrivedl.GDriveDL",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "logging.info",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "logging.info",
"... |
17882061657 | from demisto_sdk.commands.common.constants import CLASSIFIERS_DIR, PACKS_DIR
from demisto_sdk.commands.common.content.objects.pack_objects.abstract_pack_objects.json_content_object import \
JSONContentObject
from demisto_sdk.commands.common.tools import src_root
TEST_DATA = src_root() / 'tests' / 'test_files'
TEST... | AdouniH/demisto-sdk | demisto_sdk/commands/common/content/tests/objects/pack_objects/abstract_pack_objects/json_content_object_test.py | json_content_object_test.py | py | 952 | python | en | code | null | github-code | 6 | [
{
"api_name": "demisto_sdk.commands.common.tools.src_root",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "demisto_sdk.commands.common.constants.PACKS_DIR",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "demisto_sdk.commands.common.constants.CLASSIFIERS_DIR",
... |
24285372674 | #! python3
# program to load current weather from api
# via cmd
# display for today and the next two days
# to run: currentWeather location
import json
import requests
import sys
if len(sys.argv) < 2:
print('More argument pls')
sys.exit()
location = ' '.join(sys.argv[1:])
key = ''
# download
url = 'http://api.... | chhatrachhorm/ABS | PythonStuff/JsonApi/currentWeather.py | currentWeather.py | py | 632 | python | en | code | 5 | github-code | 6 | [
{
"api_name": "sys.argv",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "sys.exit",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"line_number"... |
38044932492 | import requests
import uuid
from datetime import datetime
import pandas as pd
# https://kcnew.ifrc.org/api/v1/forms find the kpi asset uid for forms here
#from settings import * #to import MYTOKEN and KPIASSETUID
##################
## RUN SETTINGS ##
##################
##https://kobonew.ifrc.org/token/?format=jso... | aklilu/BachUploadToKobo | bathcuploadtokobo.py | bathcuploadtokobo.py | py | 2,722 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "datetime.datetime.now",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "pandas.read_excel",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "uuid.uuid4"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.