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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
34283247253 | import ray
from components.MyCircuit import MyCircuit
from components.xyce import XyceSim
from utils.NetlistWriter import SPICEParser
import torch.nn.functional as F
import torch
import numpy as np
# SPICE wrapper for xyce_parallel
@ray.remote
def ray_train(id:int, circuit:MyCircuit, dimensions:list , batch, beta, mpi... | sinnce/EqProp-SPICE | components/ray_workers.py | ray_workers.py | py | 2,855 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "components.MyCircuit.MyCircuit",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "torch.std_mean",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "utils.NetlistWriter.SPICEParser.clampLayer",
"line_number": 36,
"usage_type": "call"
},
... |
27634925658 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author : Stanl
# @Time : 2023/5/15 12:24
# @File : runner.py
# @Project : lab
import os
import torch
import torch.backends.cudnn as cudnn
import torch.nn as nn
import torch.optim as optim
import torch.optim.lr_scheduler as lrs
def net(model_name, models, d... | lumeilevel/NNDL_project2 | utils/runner.py | runner.py | py | 6,128 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "torch.nn.DataParallel",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "torch.backends.cudnn.benchmark",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "to... |
30864125402 | from pathlib import Path
from diopter.compiler import (
CompilationSetting,
CompilerExe,
CompilerProject,
ObjectCompilationOutput,
OptLevel,
)
from diopter.generator import CSmithGenerator
from diopter.sanitizer import Sanitizer
def test_preprocessor_make_compiler_agnostic() -> None:
gcc = Co... | DeadCodeProductions/diopter | tests/preprocessor_test.py | preprocessor_test.py | py | 2,039 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "diopter.compiler.CompilerExe",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "diopter.compiler.CompilerProject.GCC",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "diopter.compiler.CompilerProject",
"line_number": 15,
"usage_type"... |
14751116857 | import pandas as pd
import numpy as np
import re
import json
import collections
import time
from nltk.tokenize import word_tokenize
lista_chetada = list()
lista_long = list()
class recomendador:
def recomendador(recipes):
recipes_final = pd.read_csv('./data/recipes_final.csv')
... | jesusllorens79/recipes_steam | recomendador.py | recomendador.py | py | 2,029 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "nltk.tokenize.word_tokenize",
... |
14934577480 | #!/usr/bin/env python3
"""
Library defining a block for converting \bibitem{something}, where something is
the citation key of some entry in the 'bibliography' table of the nLab
database into a reference. If no such entry can be found, returns 'something?'
as a link to creating the reference. Also records the use of t... | sattlerc/nlab | script/src/renderer/bibitem_block.py | bibitem_block.py | py | 2,620 | python | en | code | null | github-code | 6 | [
{
"api_name": "os.environ",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "MySQLdb.connect",
... |
26999507243 | import traceback
from django.db import IntegrityError
from django.http import JsonResponse
from django.shortcuts import render
from django.views.decorators.csrf import csrf_exempt
from rest_framework.decorators import api_view
from .models import ClientModel
from admin_view.models import Course
from .serializers import... | KingDavid360/E-registration_system-backend-project | client/views.py | views.py | py | 2,888 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "models.ClientModel.objects.filter",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "models.ClientModel.objects",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "models.ClientModel",
"line_number": 31,
"usage_type": "name"
},
{
... |
74927173306 | from setuptools import setup # Always prefer setuptools over distutils
__author__ = "Romain Thomas"
__credits__ = "Romain Thomas"
__license__ = "GNU GPL v3"
__version__ = "22.4.1"
__maintainer__ = "Romain Thomas"
__email__ = "the.spartan.proj@gmail.com"
__status__ = "Development"
__website__ = "https://astrom-tom.git... | astrom-tom/Photon | setup.py | setup.py | py | 916 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "setuptools.setup",
"line_number": 12,
"usage_type": "call"
}
] |
72529702268 | """
This script saves camera mesh from poses and intrinsics
"""
import numpy as np
from typing import Optional, Union
def save_opencv_camera_mesh(
path: str,
extrinsic: np.ndarray,
intrinsic: Optional[np.ndarray] = None,
focal: Optional[np.ndarray] = None,
cxcy: Optional[np.ndarray] ... | limacv/CameraPoseSaver | save_cameras.py | save_cameras.py | py | 8,499 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "numpy.ndarray",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "typing.Optional",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "numpy.ndarray",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "typing.Optional... |
26042577396 | from dataclasses import dataclass
from pathlib import Path
from pants.base.build_root import BuildRoot
from pants.engine.rules import collect_rules, rule
from pants.option.global_options import GlobalOptions
from pants.util.strutil import softwrap
def is_child_of(path: Path, directory: Path) -> bool:
abs_path = ... | pantsbuild/pants | src/python/pants/core/util_rules/distdir.py | distdir.py | py | 1,402 | python | en | code | 2,896 | github-code | 6 | [
{
"api_name": "pathlib.Path",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "dataclasses.dataclass",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pants.option.global_o... |
32583745604 | from docker import from_env as initDockerClient
from .resources import ResourcesProfiler
from ...component.basic import BasicComponent
from ...types.hostProfiles import ActorResources
class ImagesProfiler(ResourcesProfiler):
def __init__(
self,
basicComponent: BasicComponent,
... | Cloudslab/FogBus2 | containers/actor/sources/utils/actor/profiler/images.py | images.py | py | 1,402 | python | en | code | 17 | github-code | 6 | [
{
"api_name": "resources.ResourcesProfiler",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "component.basic.BasicComponent",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "types.hostProfiles.ActorResources",
"line_number": 13,
"usage_type": "name"
}... |
30487767495 | import os
import argparse
import hashlib
def get_files_by_size(path, file_format):
# Collect a list of file paths and sizes in the specified directory
files_list = []
for root, _, files in os.walk(path):
for file in files:
filepath = os.path.join(root, file)
if not file_form... | mukhulm4/Duplicate-File-Handler | main.py | main.py | py | 3,767 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.walk",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "os.path.getsize",
"line_number":... |
22680475522 | # coding: utf-8
"""
Bybit API
## REST API for the Bybit Exchange. Base URI: [https://api.bybit.com] # noqa: E501
OpenAPI spec version: 0.2.11
Contact: support@bybit.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
cl... | bybit-exchange/api-connectors | swagger-gen/python/swagger_client/models/leverage_info.py | leverage_info.py | py | 3,102 | python | en | code | 149 | github-code | 6 | [
{
"api_name": "six.iteritems",
"line_number": 75,
"usage_type": "call"
},
{
"api_name": "pprint.pformat",
"line_number": 100,
"usage_type": "call"
}
] |
15211663730 | r"""
Kurtosis and Skew
-----------------
Figure 3.6.
An example of distributions with different skewness
:math:`\Sigma` (top panel) and kurtosis K (bottom panel). The modified
Gaussian in the upper panel is a normal distribution multiplied by a
Gram-Charlier series (see eq. 4.70), with a0 = 2, a1 = 1, and a2 = 0.5.
Th... | astroML/astroML_figures | book_figures/chapter3/fig_kurtosis_skew.py | fig_kurtosis_skew.py | py | 2,946 | python | en | code | 7 | github-code | 6 | [
{
"api_name": "astroML.plotting.setup_text_plots",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 32,
"usage_type": "name"
},
{
"api_... |
25868410660 | #!/usr/bin/env python3
import sys
root_dir = f"{__file__.split('src')[0]}"
if root_dir not in sys.path:
sys.path.append(root_dir)
import typing
from dataclasses_json import dataclass_json
from dataclasses import dataclass, field
from src.rl.proof_action import ProofAction
from src.tools.training_data_format impor... | trishullab/copra | src/rl/proof_tree.py | proof_tree.py | py | 3,596 | python | en | code | 11 | github-code | 6 | [
{
"api_name": "sys.path",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "sys.path.append",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "typing.List",
"line_numb... |
15270095869 | import discord
import random
import math
import ast
from discord.ext import commands
from datetime import date
def BetBot(_bot):
PLAYERBETS='PlayersBet'
CANBET = 'CanBet'
BOTMESSAGE = 'LastRatioMessage'
WINNER = 'Winner'
GUILDRAKE=0.10
MAXBET = 10000000
MINBET = 100000
bot=_bot
be... | Curriosityy/DiscordBot | betbot.py | betbot.py | py | 11,798 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "datetime.date.today",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "datetime.date",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "discord.utils.get",
... |
14467450982 | import openpyxl
import sys
import csv
input_file_name = sys.argv[1]
filename =input_file_name+'.csv'
input_workno = sys.argv[2]
examplefile=open(filename)
exampleReader=csv.reader(examplefile)
exampleData=list(exampleReader)
headers=exampleData[0]
#find column number of work no in headers of input file.
for i in r... | djcse/CS-699 | lab6/Manipulating Excel and CVS files/solution.py | solution.py | py | 1,416 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sys.argv",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "csv.reader",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "openpyxl.Workbook",
"line_nu... |
75124863227 | import asyncio
from aiohttp import web
async def handle_health(request):
return web.Response(
status=200,
content_type='text/html',
text="<html><head><title>Dragonbot</title></head><body>Healthy</body></html>",
)
print('Starting web server')
app = web.Application()
app.add_routes([web.... | Chris-Slade/dragonbot | src/health.py | health.py | py | 375 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "aiohttp.web.Response",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "aiohttp.web",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "aiohttp.web.Application",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "aiohttp.web",
... |
4738234815 | from bs4 import BeautifulSoup as bs
import requests
#Defining user-agent as Google will prevent scraping otherwise
USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"
# US english
LANGUAGE = "en-US,en;q=0.5"
def get_weather_data(url):
sess... | danlhennessy/Learn | Python/tools/webscrape/webscrapeWeather.py | webscrapeWeather.py | py | 590 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.Session",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 16,
"usage_type": "call"
}
] |
7832878017 | import os
import cv2
import numpy as np
import torch
from torch.utils.data import Dataset
import albumentations as albu
from albumentations.pytorch import ToTensorV2
def post(im, resize=None, bw=False, rotate=False, name="", LAB=True):
im_ = np.transpose(im, (1, 2, 0))
im_ = 0.5 * (im_ + 1)
im_ = 255 * im... | tobyshooters/unet_harmonization | dataset.py | dataset.py | py | 4,824 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.transpose",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.clip",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.uint8",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "cv2.COLOR_LAB2BGR",
"... |
19432548071 | from keras.preprocessing.image import img_to_array
from keras.models import load_model
import imutils
import cv2
import numpy as np
import sys
# parameters for loading data and images
detection_model_path = 'haarcascade_files/haarcascade_frontalface_default.xml'
emotion_model_path = 'models/_mini_XCEPTION.106-0.65.hdf... | abhijeet3922/FaceEmotion_ID | facial_emotion_image.py | facial_emotion_image.py | py | 1,634 | python | en | code | 49 | github-code | 6 | [
{
"api_name": "sys.argv",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "cv2.CascadeClassifier",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "keras.models.load_model",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "cv2.imrea... |
371896641 | import json
from abc import ABC
from sqlalchemy import not_, func, or_
from typing import List, Tuple
from flask_restful import abort
from app.common.filters import CurrentUser
from app.common.common import StatusEnum, RoleEnum, Common, NlpTaskEnum
from app.common.utils.status_mapper import status_str2int_mapper
from... | lixin940207/flask-api-project | app/model/mark_task_model.py | mark_task_model.py | py | 17,051 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "app.model.base.BaseModel",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "abc.ABC",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "app.common.extension.session.query",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "a... |
29078476546 | from flask import Flask, render_template, request
import joblib
app = Flask(__name__)
pipeline = joblib.load('pipeline.pkl')
label_mapping = {0: 'No', 1: 'Yes'}
@app.route("/")
def home():
return render_template('index.html')
@app.route("/predict",methods=['GET', 'POST'])
def predict():
if request.method ==... | SayamAlt/Employee-Attrition-Prediction | app.py | app.py | py | 1,568 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "joblib.load",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask.request.method",
... |
31605080560 | import pickle
import os.path
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
from googleapiclient.http import MediaFileUpload
import zipfile
from zipfile import ZipFile
import time
import os
import io
from Google im... | LaserSpud/Y2S1-Web-Dev | Piquant Integrated/backup_and_restore.py | backup_and_restore.py | py | 5,540 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "Google.Create_Service",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "io.BytesIO",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "googleapiclient.http.MediaIoBaseDownload",
"line_number": 38,
"usage_type": "call"
},
{
"api_nam... |
2991243904 | from shapely.geometry import Polygon, Point, MultiPoint # 从哪些库中导入一些类
import geopandas as gpd # 导入库,简称为包
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from geovoronoi import voronoi_regions_from_coords
def get_hex(shp, length, epsg_code):
sh01 = gpd.read_file(shp) # 读取上海市域界限
sh01_m =... | workload/taoge | useful_code/p_mygrid.py | p_mygrid.py | py | 5,204 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "geopandas.read_file",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.sqrt",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.sqrt",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.sqrt",
"line_numbe... |
7606756621 | """CLI runner."""
from argparse import ArgumentParser
from .. import __description__
from . import send_summary_emails
def main():
"""Run the command-line tool."""
parser = ArgumentParser(description=__description__)
subparsers = parser.add_subparsers(title='commands')
send_summary_emails.add_sub... | thomasleese/gantt-charts | ganttcharts/cli/__main__.py | __main__.py | py | 529 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 13,
"usage_type": "call"
}
] |
1558412714 | import unittest
import pygame
from core import objectids
from platformer.physics import actors, platforms, projectiles, context
generator = objectids.object_id_generator()
class ProjectilePhysicsTest(unittest.TestCase):
def setUp(self) -> None:
self.ctx = context.Context()
def test__can_hit(self)... | cgloeckner/prehistoric_guy | test/test_platformer/test_physics/test_projectiles.py | test_projectiles.py | py | 2,162 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "core.objectids.object_id_generator",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "core.objectids",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "unittest.TestCase",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name":... |
18124944376 | import torch
import random
import numpy as np
import torch.nn as nn
import time
import sys
np.random.seed(42069)
random.seed(42069)
torch.manual_seed(42069)
inp_h = int(sys.argv[1])
inp_w = int(sys.argv[2])
inp_c = int(sys.argv[3])
c_out = int(sys.argv[4])
inp = torch.rand((1,inp_c,inp_h,inp_w))
s = time.time()
... | alchemi5t/CoConv-CUDA | pytorch.py | pytorch.py | py | 815 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "numpy.random.seed",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "random.seed",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "torch.manual_seed",
... |
36646882887 | import random
import math
import numpy as np
from skimage import draw
from skimage import filters
from deepdecoder import TAG_SIZE
class BackgroundGenerator(object):
def __init__(self):
self.background_range = (0x35, 0x40)
self.n_circles_range = (25, 60)
self.circle_radius_range = (3, 8)
... | berleon/deepdecoder | deepdecoder/generate_background.py | generate_background.py | py | 1,872 | python | en | code | 50 | github-code | 6 | [
{
"api_name": "math.sin",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "math.cos",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "skimage.draw.ellipse",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "skimage.draw",
"line_numbe... |
21545682994 | from django.urls import path
from . import views
urlpatterns = [
path('pay/',views.Start_payment.as_view(), name="payment"),
path('payment/success/',views.Handle_payment_success.as_view(), name="payment_success"),
path('appointments/',views.AppointmentListView.as_view(),name="appointments"),
pat... | AjithMthomas/MediCareBackEnd | payment/urls.py | urls.py | py | 778 | python | en | code | 2 | 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",
... |
8451166497 | from tkinter import *
from bs4 import BeautifulSoup
import urllib2
from googletrans import Translator
import re
def go():
htmltxt = urllib2.urlopen(entry.get()).read()
soup = BeautifulSoup(htmltxt, 'lxml')
ft = soup.find_all('p')
tag = len(soup.find_all('p'))
for x in range(0,tag):
data = translat... | Akshay1517/Webpage-language-Converter | Webpage language Converter.py | Webpage language Converter.py | py | 2,096 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "urllib2.urlopen",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "googletrans.Translator",
"line_number": 25,
"usage_type": "call"
}
] |
21844601175 | from channels.generic.websocket import WebsocketConsumer
from channels.generic.websocket import AsyncWebsocketConsumer
import json
import cv2
import threading
import base64
from drow.drowsiness_detector import Drowsiness
import time
class ChatConsumer(WebsocketConsumer):
def connect(self):
self.accept()
... | are1224/drowness | stream/mysite/drowsiness/consumer.py | consumer.py | py | 1,698 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "channels.generic.websocket.WebsocketConsumer",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "json.loads",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "drow.drowsiness_detector.Drowsiness",
"line_number": 35,
"usage_type": "call"
}... |
1686852034 | #!/usr/bin/env python3
"""Gas and Electricity usage from the Octopus API."""
import asyncio
import logging
import logging.handlers
import os
from dotenv import dotenv_values
from influxconnection import InfluxConnection
from octopusapi.api import OctopusClient
def get_logger():
"""Log messages to the syslog."... | claytonn73/octopus-api | octopus-usage.py | octopus-usage.py | py | 2,567 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "logging.handlers.SysLogHandler",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "logging.handlers",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name":... |
16550479375 | from django.http.response import HttpResponseRedirect
from django.shortcuts import redirect, render
from django.contrib.auth.forms import UserCreationForm,AuthenticationForm
from django.contrib.auth import get_user, login, logout
from accounts.forms import *
from django.contrib.auth.views import LoginView
# Create yo... | intervallie/tkpbp | accounts/views.py | views.py | py | 2,244 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.http.response.HttpResponseRedirect",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "django.http.response.HttpResponseRedirect",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "django.http.response.HttpResponseRedirect",
"line_number"... |
19386105215 | import torch
from torch import nn
import numpy as np
import torchvision
from lib.config import CONF
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
class Decoder(nn.Module):
"""
Decoder.
"""
def __init__(self, vocab_list, embedding_dict, use_votenet, embed_dim=300, vote_dimens... | nseppi/scan2cap | scan2cap/models/baseline_captioning_module.py | baseline_captioning_module.py | py | 9,438 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "torch.device",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.Module",
... |
41841536508 | import tensorflow as tf,sys
from subprocess import Popen
import os
import wikipedia
from yaml import load, SafeLoader
image_path = sys.argv[1]
# Read in the image_data
image_data = tf.io.gfile.GFile(image_path, 'rb').read()
# Loads label file, strips off carriage return
label_lines = [line.rstrip() for line in tf.io... | alisaffari97/Celestial-bodies-detection | hub/examples/image_retraining/label_image.py | label_image.py | py | 3,624 | python | en | code | null | github-code | 6 | [
{
"api_name": "sys.argv",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.io.gfile.GFile",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "tensorflow.io",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.... |
10913242678 | from collections import OrderedDict
import bpy
from .utils import *
from .settings_model import *
from .main_model import *
from .preset_model import *
register_classes = []
class Preset:
def __init__(self):
self.datas = OrderedDict()
def file_lines(self, file):
text = bpy.data.texts[file]
... | fatboyzz/batch_process | preset_control.py | preset_control.py | py | 3,605 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "collections.OrderedDict",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "bpy.data",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "collections.OrderedDict",
"line_number": 64,
"usage_type": "call"
},
{
"api_name": "bpy.dat... |
20245974482 | import os
import sys
sys.path.append('../')
sys.path.append('../util')
from gensim.models import KeyedVectors
from datasetParser import *
import numpy as np
from mytoolbox import pickledump, set_debugger
from util.base_parser import BaseParser
from vidDatasetParser import *
set_debugger()
class dictParser(BaseParse... | zfchenUnique/WSSTG | fun/create_word2vec_for_dataset.py | create_word2vec_for_dataset.py | py | 4,498 | python | en | code | 56 | github-code | 6 | [
{
"api_name": "sys.path.append",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "sys.path.append",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_numbe... |
5979995306 | import pickle
from collections import defaultdict
from block import Block
from db import DB
from transaction import Transaction
import sys
class Blockchain(object):
latest = 'l'
db_file = 'blockchain.db'
genesis_coinbase_data = 'The Times 03/Jan/2009 Chancellor on brink of second bailout for banks'
de... | voidism/blockchain | blockchain.py | blockchain.py | py | 4,425 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "db.DB",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "sys.exit",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "transaction.Transaction",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "block.Block",
"line_number... |
26040134876 | from __future__ import annotations
import logging
import pkgutil
from dataclasses import dataclass
from pathlib import PurePath
from typing import Any
from pants.backend.helm.utils.yaml import YamlPath
from pants.backend.python.subsystems.python_tool_base import PythonToolRequirementsBase
from pants.backend.python.ta... | pantsbuild/pants | src/python/pants/backend/helm/subsystems/k8s_parser.py | k8s_parser.py | py | 4,924 | python | en | code | 2,896 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "pants.backend.python.subsystems.python_tool_base.PythonToolRequirementsBase",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "pants.backend.python.util_rules.pex",
"line_num... |
284861689 | from kivy.app import App
from kivy.uix.widget import Widget
from kivy.graphics import *
from kivy.uix.label import Label
from kivy.core.window import Window
class MorpionGame(Widget):
def __init__(self, **kwargs):
super(MorpionGame, self).__init__()
Window.size = (1000, 500)
s... | Luxyrion/Autonomie_Informatique_1 | morpion.py | morpion.py | py | 7,517 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "kivy.uix.widget.Widget",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "kivy.core.window.Window.size",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "kivy.core.window.Window",
"line_number": 12,
"usage_type": "name"
},
{
"a... |
11356105446 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Wed May 9 12:57:38 2018
@author: therry
"""
# File used to know how to calculate each variable of stats
import numpy as np
import gsw as gsw
from scipy import interpolate as ip
import argotools as tools
import stats as stats
import general_tools as gener... | pvthinker/pargopy | pargopy_v0/variable_selector.py | variable_selector.py | py | 7,040 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "argotools.zref",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "stats.date_mode_filter",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "numpy.where",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "numpy.isnan",
... |
5079579626 | from django.conf.urls import url
from django.views.decorators.cache import cache_page
#from django.views.decorators.csrf import csrf_protect
from django.contrib import admin # To add the admin wrapper to awstats_view
from . import views
app_name = 'gendep'
# Some info about url patterns: http://www.webforefront.com/... | cancergenetics/cancergd | gendep/urls.py | urls.py | py | 7,032 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "django.conf.urls.url",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "django.views.decorators.cache.cache_page",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 20,
"usage_type": "call"
},
{
... |
21071721133 | """"Merge metadata files and save to a single csv for each channel"""
import glob
from functools import partial
from pathlib import Path, PosixPath
from typing import Dict, List, Union
import numpy as np
import pandas as pd
def get_full_file_name(filename: str, all_files: Dict[str, str]):
"""Return the full pat... | centre-for-humanities-computing/Gjallarhorn | metadata_analysis/merge_metadata.py | merge_metadata.py | py | 8,500 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "typing.Dict",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "numpy.nan",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "pathlib.PosixPath",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "typing.Dict",
"line_... |
19412254639 | import urllib3
import sys
import requests
# to disable unwanted warnings about certificates, .. etc.
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
# configure the proxy settings.
proxies = {'http':'http://127.0.0.1:8080', 'https':'http://127.0.0.1:8080'}
# Creating the OS Command injection func... | AbdelrahimAlsadiq/PortSwigger-Labs | OS command injection/scripts/Lab-1.py | Lab-1.py | py | 1,324 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "urllib3.disable_warnings",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "urllib3.exceptions",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "requests.post",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "sys.argv... |
35837012658 | #!/usr/bin/env python3
# -*- encoding:utf-8 -*-
# @Author : Haoran Pan
# Date: 2022/05/19
import re
import sys
import argparse
import pandas as pd
from path import Path
from natsort import natsorted
from collections import OrderedDict
from rich.traceback import install
from PYHR.apps.base import Action... | valderpan/PYHR | hic/utils.py | utils.py | py | 15,879 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "PYHR.apps.base.richlog",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pandas.read_table",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "re.findall",
... |
73536620669 | import matplotlib.pyplot as plt
from functools import partial
from PyQt5 import QtWidgets, QtCore
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar
from processing_utils.roi import construct_tic, cons... | Arseha/peakonly | gui_utils/abstract_main_window.py | abstract_main_window.py | py | 5,899 | python | en | code | 94 | github-code | 6 | [
{
"api_name": "PyQt5.QtWidgets.QMainWindow",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "PyQt5.QtWidgets",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtCore.QThreadPool",
"line_number": 15,
"usage_type": "call"
},
{
"api_nam... |
48241221 | from typing import *
from collections import defaultdict
class Solution:
def getFolderNames(self, names: List[str]) -> List[str]:
res = []
folders = defaultdict(int)
for n in names:
if folders[n] == 0:
res.append(n)
folders[n] += 1
e... | code-cp/leetcode | solutions/1487/main.py | main.py | py | 994 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "collections.defaultdict",
"line_number": 6,
"usage_type": "call"
}
] |
14868887746 |
from django.conf.urls import patterns, url
from albums.views import AlbumView, AlbumPage, FileView
uuid = r'(?P<uuid>[0-9a-z]{32})'
urlpatterns = patterns('',
url(r'^$', AlbumPage.as_view(), name="albums"),
url(r'^albums/$', AlbumView.as_view(), name="album-list"),
url(r'^albums/%s/$' % uuid, AlbumView.... | qrees/backbone-gallery | albums/urls.py | urls.py | py | 482 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.conf.urls.patterns",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "albums.views.AlbumPage.as_view",
"line_number": 9,
"usage_type": "call"
},
{
"api_na... |
13802181699 | import os
import csv
from celery import Celery
from celery.result import AsyncResult
from celery.exceptions import Ignore
from celery.task.control import revoke
from celery.app.task import Task as celery_task
from io import StringIO
from io import TextIOWrapper
from datetime import datetime
from werkzeug.utils import s... | vishalpolley/Long-Running-Jobs-Manager | socialcops/api/app/routes.py | routes.py | py | 9,707 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "app.make_celery",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "app.app",
"line_number": 19,
"usage_type": "argument"
},
{
"api_name": "flask.jsonify",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "app.app.errorhandler",
... |
10233697635 | #!/usr/bin/env python3
from mupq import mupq
from interface import parse_arguments, get_platform
import sys
if __name__ == "__main__":
args, rest = parse_arguments()
platform, settings = get_platform(args)
with platform:
schemes = [s for s in rest if s not in ['--nostack',
... | mupq/pqm4 | benchmarks.py | benchmarks.py | py | 1,133 | python | en | code | 234 | github-code | 6 | [
{
"api_name": "interface.parse_arguments",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "interface.get_platform",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "mupq.mupq.StackBenchmark",
"line_number": 15,
"usage_type": "call"
},
{
"api_name"... |
43865904189 | import sys
from pathlib import Path
import pytest
path = Path(__file__).parents[2].joinpath("Bot")
sys.path.append(str(path))
from Libs.cache import cache, cache_json
from redis.asyncio.connection import ConnectionPool
DATA = "Hello World"
REDIS_URI = "redis://localhost:6379/0"
@pytest.mark.async... | No767/Kumiko | tests/redis/test_cache_deco.py | test_cache_deco.py | py | 2,480 | python | en | code | 20 | github-code | 6 | [
{
"api_name": "pathlib.Path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sys.path.append",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "redis.asyncio.connection.Conn... |
35505637056 | import os, sys, re, json, time
import requests
import numpy as np
import astropy.units as u
from astropy.coordinates import SkyCoord
from astroquery.vizier import Vizier
from astroquery.mast import Catalogs
from astropy.table import Table, Column, Row
from astropy.wcs import WCS
try: # Python 3.x
from urllib.parse... | arosoyl/ex-ai-in-university | pythonProject1/venv/Lib/site-packages/ellie/mast.py | mast.py | py | 10,695 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sys.version_info",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "urllib.pathname2url",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "httplib.HTTPSCon... |
24924605394 | # -*- coding: utf-8 -*-
import base64
import datetime
import json
import os
import re
import threading
import stromx.runtime
from . import conversion
from . import view
from . import error
def _str(value):
return value
TEMP_PATH = stromx.runtime.File.tempDir()
VERSION_STRING = stromx.runtime.versionString()
... | uboot/stromx-web | backend/stromxweb/model.py | model.py | py | 63,197 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "stromx.runtime.runtime.File.tempDir",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "stromx.runtime.runtime",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "stromx.runtime",
"line_number": 19,
"usage_type": "name"
},
{
"ap... |
30940061405 | from cube2d.cube2d import CubicalRipser2D, Filter2D
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import struct
import csv
import matplotlib.pyplot as plt
from matplotlib import gridspec
from mpl_toolkits.mplot3d import Axes3D
from sklearn.decomposition import PCA
import scipy.interpolate as i... | infophysics/CubicalRipser2D | Cube2D.py | Cube2D.py | py | 15,666 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.style.use",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.style",
"line_number": 20,
"usage_type": "attribute"
},
{
"... |
22030864729 | import numpy as np
import pandas as pd
from scipy import stats
import warnings
class CensoredSurvivalData:
"""Class to specify the True Data Generating Process and sample from it."""
def __init__(self,
p=0.2,
event_dist_maj='Exponential',
event_dist_min=None,
... | chiragnagpal/unbiased_risk_with_proxies | urp/dataset.py | dataset.py | py | 9,964 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "warnings.warn",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "warnings.warn",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "scipy.stats.expon",
"line_number": 70,
"usage_type": "call"
},
{
"api_name": "scipy.stats",
"line... |
29800440222 | from django import forms
from django.contrib import admin
from .models import Product, Dish, Category
from ckeditor_uploader.widgets import CKEditorUploadingWidget
class DishAdminForm(forms.ModelForm):
list_display = ('title', 'category', 'price')
search_fields = ('title', 'category')
title = forms.CharFi... | Aliaksei-Hrazhynski/DP | cafe/admin.py | admin.py | py | 857 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.forms.ModelForm",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.forms.CharField",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.... |
33914666142 | from django.shortcuts import render, redirect
from django.contrib import messages
from django.contrib.auth import login, logout
from django.conf import settings
from django.http import JsonResponse
from .models import *
import os
import stripe
import json
import uuid
# Create your views here.
# Stripe product config
... | RRB230899/Yogshalaa | landing_page/views.py | views.py | py | 13,441 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "stripe.api_key",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "django.conf.settings.SECRET_KEY_PROD",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "django.conf.settings",
"line_number": 15,
"usage_type": "name"
},
{
... |
21314544745 | import snowflake.connector
import logging
def db_get(current1,current2):
ctx = snowflake.connector.connect(
user='xxxxxx',
password='xxxxxxx',
account='xxxxxxx.ap-southeast-2',
warehouse='COMPUTE_WH',
database='TEST',
schema='public'
)
cs = ctx.cursor()
try:
#cs.execute("... | xiongye77/aws_sysops_tasks | snowflake_db_query.py | snowflake_db_query.py | py | 1,790 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "snowflake.connector.connector.connect",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "snowflake.connector.connector",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "snowflake.connector",
"line_number": 4,
"usage_type": "name"
}
] |
27694331622 | from openpyxl import Workbook
from openpyxl.worksheet.table import Table, TableStyleInfo
from openpyxl.utils import get_column_letter
from datetime import date
today = date.today().strftime("%Y%m%d")
wb = Workbook()
wb.save(today + '_Movie_Catalog.xlsx')
def str_to_int_or_float(value):
if isinstance(v... | soffet713/Python_Movie_Catalog | Movie_Catalog.py | Movie_Catalog.py | py | 16,989 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "datetime.date.today",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "openpyxl.Workbook",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "openpyxl.utils.get_c... |
29209745810 | import abc
import ast
import os
import random
import re
import shutil
import string
import subprocess
import sys
from abc import abstractmethod, ABC
from pathlib import Path
from subprocess import Popen
from typing import List, Optional, Tuple, Any, Sequence
from tests4py.constants import Environment, PYTHON
from test... | smythi93/Tests4Py | src/tests4py/projects/cookiecutter.py | cookiecutter.py | py | 39,236 | python | en | code | 8 | github-code | 6 | [
{
"api_name": "tests4py.projects.Project",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 35,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 35,
"usage_type": "name"
},
{
"api_name": "typing.List",
... |
38234598966 | import logging
import os
import boto3
from botocore.client import Config, ClientError
from celery import Celery
from dotenv import load_dotenv
from csv_detective.explore_csv import routine_minio
from udata_event_service.producer import produce
from udata_analysis_service.utils.kafka import get_topic
load_dotenv()
lo... | etalab/udata-analysis-service | udata_analysis_service/background_tasks.py | background_tasks.py | py | 3,251 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.environ",
... |
13740898161 | from flask import(
current_app as app,
request,
url_for,
redirect,
render_template,
session,
g
)
import os
import json
def redirect_to_last_page():
last_page_url = request.referrer
if request.referrer is not None :
if (len(request.referrer.split('?')) == 1) | (request.refe... | vkous/simple_dashboard | dashboard/model/flask_utils.py | flask_utils.py | py | 1,285 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.request.referrer",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "flask.request.referrer",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": ... |
6451285882 | import time
import warnings
from copy import deepcopy
from typing import Optional, List, Tuple, Dict, Set
import numpy as np
import pandas as pd
from ConfigSpace import Configuration
from IPython.display import JSON
from sklearn.pipeline import Pipeline
from xautoml._helper import XAutoMLManager
from xautoml.config_s... | Ennosigaeon/xautoml | xautoml/main.py | main.py | py | 30,626 | python | en | code | 31 | github-code | 6 | [
{
"api_name": "IPython.display.JSON",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "warnings.catch_warnings",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "warnings.simplefilter",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "xa... |
20622525992 | import requests
import base64
import time
import uuid
import json
import hmac
import hashlib
USERNAME = 'MERCHANT_ID'
PASSWORD = 'MERCHANT_PASSCODE'
SIGN_SECRET = 'MERCHANT_KEY'
url = "https://khalti.com/api/qr/generate_dynamic/"
nonce = int(time.time())
prn = str(uuid.uuid4())
payment_data = {
'prn': prn,
... | khalti/IntegrationSamples | dynamic_qr/python/generate.py | generate.py | py | 1,551 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "time.time",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "uuid.uuid4",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "base64.b64encode",
"line_number":... |
36818383951 | from typing import List
import pytest
from vk_utils import VKPerson, VKGroup, VKPost
pytestmark = pytest.mark.asyncio
async def test_simple(vk):
user_info = await vk.me()
assert isinstance(user_info, VKPerson)
async def test_group(vk, group_id):
group_info = await vk.group_info(group_id)
assert... | AzaubaevViktor/vk_grabber | src/vk_utils/tests/test_vk.py | test_vk.py | py | 2,068 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "pytest.mark",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "vk_utils.VKPerson",
"line_number": 13,
"usage_type": "argument"
},
{
"api_name": "vk_utils.VKGroup",
"line_number": 19,
"usage_type": "argument"
},
{
"api_name": "pytest.rai... |
42418003575 | import random
import time
import pylsl
from fire import Fire
from psychopy.visual import TextStim, Window
from mi_paradigm.utils.logging import logger
logger.setLevel(10)
BG_COLOR = (0, 0, 0)
TEXT_COLOR = (1, 0, 0)
t_pre = 1
t_show = 1
t_post = 1
class Outlet:
def __init__(self):
self.logger = logger... | bsdlab/pd-mi-paradigm-mockup | mi_paradigm/main.py | main.py | py | 2,029 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "mi_paradigm.utils.logging.logger.setLevel",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "mi_paradigm.utils.logging.logger",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "mi_paradigm.utils.logging.logger",
"line_number": 22,
"usage_t... |
28458843115 | from flask import Blueprint
from . import db, rds
from .methods import *
views = Blueprint("views", __name__)
@views.route("/", methods=['POST'])
def get_response():
query=request.get_json()
user_q=query["text"]
is_valid_que = check_if_question_valid(user_q)
if(not is_valid_que):
return jsoni... | meesala-BFRS01946/GPT-POC | faq_bot/views.py | views.py | py | 1,439 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Blueprint",
"line_number": 5,
"usage_type": "call"
}
] |
2003292984 | import requests
import streamlit as st
from streamlit_lottie import st_lottie
from PIL import Image
# Find more emojis here: https://www.webfx.com/tools/emoji-cheat-sheet/
st.set_page_config(page_title="ProtonInsights", page_icon=":tada:", layout="wide")
def load_lottieurl(url):
r = requests.get(url)
if r.s... | Zaidusa/ProtonInsights | app.py | app.py | py | 2,587 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "streamlit.set_page_config",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "streamlit.markdown",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "PIL.Image.op... |
5452281748 | import os
import sys
import argparse
import instruction
import parse_prog
import parse_hist
import copy
parser = argparse.ArgumentParser(description="Arguments for %s" % __file__)
parser.add_argument("--verbose", "-v", action="count", default=0)
parser.add_argument("--debug", "-d", action="store_true", default=False)
... | leedoowon/MTraceCheck | src_main/cycle_checker.py | cycle_checker.py | py | 10,205 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "instruction.getMemOp",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "sys.stdout.write",
"line_number": 65,
"usage_type": "call"
},
{
"api_name": "sys.stdo... |
25030997634 | #! py -3
# -*- coding: utf-8 -*-
import os
import time
import numpy as np
import tensorflow as tf
from PIL import Image
from six.moves import range
from tensorflow.python import keras
from tensorflow.python.keras.layers import Conv2D, MaxPooling2D
from tensorflow.python.keras.layers import Dense, Dropout, Flatten
fr... | MoeexT/wheat | src/old/wheat_tfrecord.py | wheat_tfrecord.py | py | 4,322 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.empty",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "numpy.empty",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "tensorflow.train.string_input_producer",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "tensor... |
14404055744 | import gradio as gr
import speech_recognition as sr
import openai
import pyttsx3
from dotenv import load_dotenv
import os
load_dotenv()
openai.api_key = os.getenv("OPENAI_API_KEY")
messages=[
{"role": "system", "content": "You are a teacher"}
]
def transcribe(audio):
global messages
file = open(a... | feranmiodugbemi/python-Chatgptapi | app.py | app.py | py | 1,098 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "openai.api_key",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.getenv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "openai.Audio.transcribe... |
7143240025 | from datetime import datetime, timezone
from django.contrib.auth.models import User
from django.db import models
from django.dispatch import receiver
from rest_framework.authtoken.models import Token
class Player(models.Model):
"""
Player model.
"""
user = models.ForeignKey(User, on_delete=models.CA... | the-norns/norns | norns/player/models.py | models.py | py | 6,613 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.db.models.Model",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "django.db.models.ForeignKey",
"line_number": 14,
"usage_type": "call"
},
{
"api_name":... |
72531787389 | from enum import Enum, unique
import pytest
from models_library.utils.enums import are_equivalent_enums, enum_to_dict
from pydantic import BaseModel, ValidationError, parse_obj_as
#
# Enum Color1 is **equivalent** to enum Color2 but not equal
#
@unique
class Color1(Enum):
RED = "RED"
@unique
class Color2(Enum)... | ITISFoundation/osparc-simcore | packages/models-library/tests/test__pydantic_models_and_enums.py | test__pydantic_models_and_enums.py | py | 3,134 | python | en | code | 35 | github-code | 6 | [
{
"api_name": "enum.Enum",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "enum.unique",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "enum.Enum",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "enum.unique",
"line_number": 16,
... |
3050149480 | import models
from database import SessionLocal, engine
from models import Stock, Option
from sqlalchemy.orm import Session
from sqlalchemy import and_, or_, desc, asc
import math
def get_option_prop(symbol, strikes_list, put_call, obj_property, dte):
db = SessionLocal()
options = db.query(Option)
options... | k6116/zebra | tools.py | tools.py | py | 1,498 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "database.SessionLocal",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "models.Option",
"line_number": 10,
"usage_type": "argument"
},
{
"api_name": "sqlalchemy.and_",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "models.Option.... |
32354409539 | import os
import telebot
import os.path
import json
import glob
from dotenv import load_dotenv
from Functions import *
load_dotenv()
from telebot.types import ReplyKeyboardMarkup, InlineKeyboardMarkup, InlineKeyboardButton
mess_time = datetime.datetime.now()
bot = telebot.TeleBot(os.getenv('SECRET_KEY'))
album_name ... | NikolayKot/TelegramBot-PhotoManager | src/main.py | main.py | py | 18,399 | python | ru | code | 0 | github-code | 6 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "telebot.TeleBot",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "telebot.types.InlineKeyb... |
41003604309 | import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
import matplotlib.pyplot as plt
import torchvision.datasets as dset
import torchvision.transforms as transforms
from old_code.video_loader import Zipindexables
from flexible_resnet import resnet18_flexible
import sys
import imageio
#... | rkruser/granger-causal-frames | markov_process.py | markov_process.py | py | 41,040 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "numpy.array",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "numpy.abs",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "numpy.dot",
"line_number": 67,
... |
86314673998 | import sys
import pandas as pd
from sqlalchemy import create_engine
def load_data(messages_filepath, categories_filepath):
"""Load data from messages and categories files
INPUT
messages_filepath -- csv file with disaster messages
categories_filepath -- csv file with categories messages
OUTPUT
... | eduardorvd/Disaster-Response-Pipeline | data/process_data.py | process_data.py | py | 2,820 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pandas.merge",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pandas.concat",
"lin... |
1633181262 | from future import standard_library
standard_library.install_aliases()
from builtins import object
from collections import Mapping
import pickle as pickle
from datetime import datetime
from hashlib import sha256
import logging
import os
import shutil
from tempfile import NamedTemporaryFile
import zipfile
import dateut... | cmusatyalab/opendiamond | opendiamond/blaster/cache.py | cache.py | py | 4,983 | python | en | code | 19 | github-code | 6 | [
{
"api_name": "future.standard_library.install_aliases",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "future.standard_library",
"line_number": 2,
"usage_type": "name"
},
{
"api_name": "logging.getLogger",
"line_number": 17,
"usage_type": "call"
},
{
"a... |
34357851711 | from copy import copy
from functools import partial
from typing import Optional
from domain.board import Board, Column, Size, create, from_list, has_collision, row_pairs, to_list
from algorithms.brute_force import brute_force as algorithm
def __next_permutation(board: Board) -> Board:
columns = to_list(board)
... | swhustla/n_queens | solutions/brute_force.py | brute_force.py | py | 1,277 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "domain.board.Board",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "domain.board.to_list",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "domain.board.from_list",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "domain.... |
72872248509 | import sys
from collections import deque
def bfs(graph, root):
tmp = []
q = deque([root])
while q:
n = q.popleft()
if n not in tmp:
tmp.append(n)
q += graph[n]
return ' '.join(str(i) for i in tmp)
def dfs(graph, root):
tmp = []
stack = [root]
... | JunSuHeo/CO-TE | Q1260.py | Q1260.py | py | 1,009 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "collections.deque",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sys.stdin.readline",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "sys.stdin",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "sys.stdin.readline... |
1924406001 | # Third-party
import pytest
from numpy.testing import assert_allclose
# First-party
from idpi.grib_decoder import GribReader
from idpi.operators.destagger import destagger
from idpi.operators.theta import ftheta
from idpi.operators.vertical_interpolation import interpolate_k2theta
# @pytest.mark.parametrize("mode", ... | MeteoSwiss-APN/icon_data_processing_incubator | tests/test_idpi/test_intpl_k2theta.py | test_intpl_k2theta.py | py | 1,334 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "idpi.grib_decoder.GribReader.from_files",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "idpi.grib_decoder.GribReader",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "idpi.operators.theta.ftheta",
"line_number": 29,
"usage_type": "call... |
19515007258 | import itertools
import random
class Offline:
def __init__(self):
return
def printBoard(self,board, rounds):
# print the chessboard
print('\n0 ' + board['0,0'] + '|' + board['1,0'] + '|' + board['2,0'])
print(' -+-+-')
print('1 ' + board['0,1'] + '|' +... | af3079/annafarhanicsproject | Offline.py | Offline.py | py | 5,772 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "random.choice",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "itertools.combinations",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "random.choice",
"line_number": 127,
"usage_type": "call"
}
] |
8599573683 | import sqlite3
import pandas as pd
from queries import QUERY_SELECT_ALL_TABLETS
class DataframeDemitidos(object):
dataframe_demitidos_s_filtro = pd.DataFrame()
@classmethod
def carrega_df_demitidos(cls):
df_demitidos = cls.__csv_demitidos_para_df()
df_atuais = cls.__csv_atuais_para_df()
... | tvcastro1/projetos-analise-dados | citrix-podio/demitidos/teste.py | teste.py | py | 3,993 | python | pt | code | 0 | github-code | 6 | [
{
"api_name": "pandas.DataFrame",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pandas.merge",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pandas.merge",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line... |
32166077376 | import collections
from enum import Enum
from math import sqrt
import numpy as np
class Tile_State(Enum):
deadzone = 0
fire = 1
box = 2
wall = 3
bomb = 4
upgrade_range = 5
upgrade_health = 6
upgrade_trap = 7
player = 8
trap = 9
box_broken = 10
clear = 11
target = 1... | AliSK81/AICUP2021 | Engine/player.py | player.py | py | 20,058 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "enum.Enum",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "enum.Enum",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "collections.deque",
"line_number": 77,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_number": 1... |
16543805417 | from nuitka.ModuleRegistry import getRootTopModule
from nuitka.nodes.FunctionNodes import (
ExpressionFunctionPureBody,
ExpressionFunctionPureInlineConstBody,
)
from nuitka.SourceCodeReferences import fromFilename
internal_source_ref = fromFilename("internal").atInternal()
def once_decorator(func):
"""Ca... | Nuitka/Nuitka | nuitka/tree/InternalModule.py | InternalModule.py | py | 1,474 | python | en | code | 10,019 | github-code | 6 | [
{
"api_name": "nuitka.SourceCodeReferences.fromFilename",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "nuitka.ModuleRegistry.getRootTopModule",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "nuitka.nodes.FunctionNodes.ExpressionFunctionPureInlineConstBody",... |
73573184827 | from binascii import hexlify, unhexlify
import hashlib
import string
import logging
log = logging.getLogger(__name__)
class Base58(object):
"""Base58 base class
This class serves as an abstraction layer to deal with base58 encoded
strings and their corresponding hex and binary representation
through... | dpneko/pyutil | base58.py | base58.py | py | 7,738 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "string.hexdigits",
"line_number": 48,
"usage_type": "attribute"
},
{
"api_name": "binascii.hexlify",
"line_number": 68,
"usage_type": "call"
},
{
"api_name": "binascii.hexl... |
20317321276 | import numpy as np
import os
import glob
import matplotlib.pyplot as plt
from skimage import io
from skimage.morphology import binary_closing, binary_dilation, binary_erosion, binary_opening, selem
from keras_preprocessing.image import ImageDataGenerator
# Import modules
from tensorflow.keras import backend as K
impo... | marinasuban/Comp309 | Capstone/train copy.py | train copy.py | py | 9,497 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "tensorflow.keras.preprocessing.image.ImageDataGenerator",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 52,
"usage_type": "attribute"
},
{
... |
26935331975 |
# cutesolver.py - løser den dæmpede fjederligning numerisk.
import numpy as np
import matplotlib.pyplot as plt
def cutesolver(parametre=0,startværdier=0,Dt=0.1,tmax=100.,v_potens=1.):
'''
Løser en 'fjeder ligning', det vil sige en differentialligning af typen
mx'' = -b(x')^p-kx
Hvis p=1 afhænger dæ... | unclellama/cutesolver | cutesolver.py | cutesolver.py | py | 6,174 | python | da | code | 1 | github-code | 6 | [
{
"api_name": "numpy.zeros",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "numpy.sign",
"line_number": 1... |
75014351548 | # -*- coding: utf-8 -*-
"""
Created on Mon May 27 10:19:20 2019
@author: dguti
"""
import numpy as np
features = np.load("features_data.npy")
labels = np.load("labels_data.npy")
Ndatos = 8000
train = 5600
validation = 1600
test = 800
x_train = features[0:train]
y_train = labels[0:train]
x_t... | Dany503/Mobility-Classification | fully_conected_mobility.py | fully_conected_mobility.py | py | 4,864 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "numpy.load",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.load",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "keras.utils.to_categorical",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "keras.utils",
"l... |
70160204988 | from bottle import route, run, template, request, response
from base64 import b64encode, b64decode
from detector import predict, predict_proba
import bottle
import time
def enable_cors(fn):
def _enable_cors(*args, **kwargs):
# set CORS headers
response.headers['Access-Control-Allow-Origin'] = '*'
... | antoinevl/DetectorML | prediction-server.py | prediction-server.py | py | 964 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "bottle.response.headers",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "bottle.response",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "bottle.response.headers",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_nam... |
16971760207 | # gruscc_sftp.py
# Author: Mohammad Immam (immamma@gru.com)
# Description: This is a general python script written to transfer files through SFTP to different destinations. Usages
# include SFTP to EIA and OATI server for different requirements. The process retries 3 times in cases of failures
# requried impo... | mohammad-a-immam/code-snippets | Python/ccoati_sftp.py | ccoati_sftp.py | py | 4,071 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "sys.argv",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime.today",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "datetime.datetime... |
39639314280 | import django.contrib.auth
from django.contrib import messages
from django.http import HttpResponse
from django.shortcuts import redirect, render
from django.template import loader
from django.views.decorators.csrf import csrf_exempt
from .models import *
from urllib.parse import urlparse
from django.contrib.auth impor... | Haopeng138/ASW-Hacker-News | hackersNews/homepage/views.py | views.py | py | 20,733 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "logging.StreamHandler",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "logging.DE... |
27265916834 | import os
import json
import pickle
from selenium import webdriver
from tqdm import tqdm
from bs4 import BeautifulSoup as soup
companies = ["facebook", "google", "twitter", "youtube", "instagram"]
stpage = 0
edpage = 40
company = "facebook"
startpage = "https://www.linkedin.com/search/results/people/?keywords={comp... | DumbMachine/linkedin | raw_to_links.py | raw_to_links.py | py | 1,477 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "selenium.webdriver.Firefox",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "pickle.load",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "tqdm.tqdm",... |
35227526024 | # -*- coding: utf-8 -*-
"""
Spyder Editor
Moasic of TrueOrtho
"""
import cv2
import numpy as np
import os
import matplotlib.pyplot as plt
import glob
tt = glob.glob(' *.JPG ')
img_name_all = os.listdir(".")
img_list = []
img_list = [s for s in img_name_all if ".JPG" in s]
T_Ortho = cv2.imread(img_list[4])
for ... | LeonChen66/UAV-and-TrueOrtho | Image mosiac/TrueOrtho_mosiac_rough.py | TrueOrtho_mosiac_rough.py | py | 646 | python | en | code | 8 | github-code | 6 | [
{
"api_name": "glob.glob",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 25,
... |
74062923388 | '''
Memcache Monitor
Collect data from memcache server
- Current number of connections
- Bytes writen/read
- Malloc Fails
- Current Items
- Get Count
- Set Count
- Get Misses
- Delete Misses
* The list can be increased, currently I will deal with the data I need
Author :... | adrian-tilita/bummer | monitor/monitors/MemcacheMonitor.py | MemcacheMonitor.py | py | 2,791 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "BaseMonitor.BaseMonitor",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "telnetlib.Telnet",
"line_number": 67,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_number": 82,
"usage_type": "call"
}
] |
32792613341 | from keras.layers import Embedding, Conv1D, MaxPooling1D, GlobalMaxPool1D, Dense
from keras.models import Sequential
from keras.callbacks import TensorBoard
from keras.datasets import imdb
from keras.preprocessing.sequence import pad_sequences
max_features, max_len = 2000, 500
(x_train, y_train), (x_test, y_test) = ... | pgurazada/fast-fast-ai | code/basic-text-classification.py | basic-text-classification.py | py | 1,169 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "keras.datasets.imdb.load_data",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "keras.datasets.imdb",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "keras.preprocessing.sequence.pad_sequences",
"line_number": 12,
"usage_type": "call"
... |
19663355451 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Aug 31 00:21:54 2019
@author: lihepeng
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
# Temp
filename = '/home/lihepeng/Documents/Github/tmp/data/historical-hourly-weather-data/temperature.csv'
city = "Las Vegas"
df = pd.r... | liudading/tmp | dr/temp.py | temp.py | py | 2,229 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.linspace",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.mean",
"line_nu... |
7605876991 | import discord
import termcolor
import sys
import colorama
from discord.ext import commands
import asyncio
from colorama import Fore, Back, Style
from colorama import init
from termcolor import colored, cprint
intents = discord.Intents.all()
client=commands.Bot(command_prefix='//', self_bot=True, intents=in... | thomasm2850/discord-mass-dm | massdm.py | massdm.py | py | 2,048 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "discord.Intents.all",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "discord.Intents",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands.Bot",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "dis... |
41240458766 | from extractCeatCategories import getCeatWords
from sklearn.metrics.pairwise import cosine_similarity
from scipy.stats import norm
import numpy as np
import pickle
import os
import sys
from prettytable import PrettyTable
from tqdm import tqdm
import scipy
def associate(w, A, B):
return (
cosine_similarity... | Jayanta47/CEAT-Data-Collection | CEATCalculations.py | CEATCalculations.py | py | 8,576 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sklearn.metrics.pairwise.cosine_similarity",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sklearn.metrics.pairwise.cosine_similarity",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.sum",
"line_number": 21,
"usage_type": "call"... |
14325451258 | import os
import random
from flask import Blueprint, current_app
from flask import Blueprint, render_template, request
from classess.data_manager import DataManager
from .exceptions import OutOfFreeNamesError, PictureFormatNotSupportedError, PictureNotUploadedError
loader_blueprint = Blueprint('loader_blueprint', __... | mikluxomaklai/pythonProject9 | loaders/views.py | views.py | py | 3,006 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Blueprint",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_numbe... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.