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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
24557946425 | import numpy as np
from PIL import ImageGrab
import cv2
import time
from src import mapGenerator
from src import Aanta
import pyautogui
from pynput import keyboard
size = 200
cc = True
def run_Aanta (screen):
# ---------------------------------------#
# criar mapa
# --------------------------... | murtalima/MazeSolver | src/main.py | main.py | py | 2,470 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "cv2.cvtColor",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "src.mapGenerator.MapGen",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "src.mapG... |
19095885293 | #!/usr/bin/env python3
import os
import json
complex_fps = os.listdir("complexes")
complex_unique_domains = {}
complex_edge_counts = {}
for comp in complex_fps:
with open(f"complexes/{comp}", "r") as handle:
comp = comp.split(".")[0]
unique_domains = []
num_edges = 0
for line in h... | wigasper/ddi-planarity | data-aggregation/combine_size_data.py | combine_size_data.py | py | 1,384 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.listdir",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 25,
"usage_type": "call"
}
] |
18439813123 | import argparse
import os
from PIL.Image import ImagePointHandler
import numpy as np
import matplotlib.pyplot as plt
import torchvision
import torch
import torch.nn as nn
import torch.optim as optim
from torch.utils.data import DataLoader
import torchvision.datasets as datasets
import torchvision.transforms as transfor... | Alibaba-AAIG/Beyond-ImageNet-Attack | train.py | train.py | py | 6,399 | python | en | code | 48 | github-code | 21 | [
{
"api_name": "os.environ",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "torch.manual_seed",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "torch.cuda.... |
30100769525 | #coding=utf-8
import os
import numpy as np
from cv2 import cv2
def get_img_list(dirname,flag=0):
rootdir= os.path.abspath(url+dirname+'/')
list = os.listdir(rootdir) #列出文件夹下所有的目录与文件
files=[]
for i in range(0,len(list)):
path = os.path.join(rootdir,list[i])
if os.path.isfile(path):
... | SuiMingYang/pic_classify | gender-recognition/gender_train_data.py | gender_train_data.py | py | 1,473 | python | en | code | 4 | github-code | 21 | [
{
"api_name": "os.path.abspath",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.listdir",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number... |
4068057724 | import json
from django.contrib.auth import get_user_model
from django.http import JsonResponse
from django.shortcuts import render, get_object_or_404
from django.views.generic.base import View, TemplateView
from utils.mixin import AdminLoginRequiredMixin, BreadMixin
from user.models import Role, Menu
from .form impo... | kevinguocn/myblog-django | admin/views_role.py | views_role.py | py | 4,761 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "django.contrib.auth.get_user_model",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "utils.mixin.AdminLoginRequiredMixin",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "utils.mixin.BreadMixin",
"line_number": 15,
"usage_type": "name"
... |
39887535594 | import System
import os
import tkinter as tk
from PIL import ImageTk
from functools import partial
import plotly.graph_objects as go
global current_stock
class GraphicalUI:
def __init__(self) -> None:
self.imageLabel = None
self.plot_frame = None
self.time_frame = None
self.graph... | msrana25/Stock_Analysis | GraphicalUI.py | GraphicalUI.py | py | 5,300 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "System.System",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "os.remove",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": ... |
19357364136 | from .LibraryController import LibraryController
from flask import Flask, render_template, request, make_response, redirect
app = Flask(__name__, static_url_path='', static_folder='../view/static', template_folder='../view/')
library = LibraryController()
@app.before_request
def get_logged_user():
if '/css' not i... | develask/ADSI23_biblioteca | controller/webServer.py | webServer.py | py | 2,264 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Flask",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "LibraryController.LibraryController",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask.request.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": ... |
10954530354 | from urllib.request import urlopen
from urllib.request import urlretrieve
from bs4 import BeautifulSoup
import os
local_image_folder = './dota_icons/'
if not os.path.exists(local_image_folder):
os.makedirs(local_image_folder)
ability_icon_urls = ['https://dota2.gamepedia.com/Category:Ability_icons',
... | tokotchd/PixelPicturePermutatorV2 | scrape_dota_icons.py | scrape_dota_icons.py | py | 1,637 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.exists",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "os.makedirs",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "urllib.request.urlopen",
"li... |
11913617657 | from django.urls import path
from goals import views
urlpatterns = [
path("goal_category/create", views.GoalCategoryCreateView.as_view(), name='create_category'),
path("goal_category/list", views.GoalCategoryListView.as_view(), name='list_category'),
path("goal_category/<pk>", views.GoalCategoryView.as_v... | morley-d/todolist | goals/urls.py | urls.py | py | 1,064 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "goals.views.GoalCategoryCreateView.as_view",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "goals.views.GoalCategoryCreateView",
"line_number": 7,
"usage_type": "attribute... |
30309419291 | #! /usr/bin/env python
import json
import cv2
import dlib
import argparse
## Face and points detection
def face_points_detection(img, bbox):
PREDICTOR_PATH = 'models/shape_predictor_68_face_landmarks.dat'
predictor = dlib.shape_predictor(PREDICTOR_PATH)
# Get the landmarks/parts for the face in box d.
... | etosworld/etos-faceswap | face_points_detection.py | face_points_detection.py | py | 1,517 | python | en | code | 19 | github-code | 21 | [
{
"api_name": "dlib.shape_predictor",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "dlib.rectangl... |
19373286160 | from __future__ import annotations
from ...api.observer import Observable, Observer
from ...model.image import ImagePresenter
from ...model.object import ObjectPresenter
from ...view.image import ImageView
from ..data import FileDialogFactory
from ..image import ImageController
class ObjectImageController(Observer):... | AdvancedPhotonSource/ptychodus | ptychodus/controller/object/image.py | image.py | py | 1,601 | python | en | code | 7 | github-code | 21 | [
{
"api_name": "api.observer.Observer",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "model.object.ObjectPresenter",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "model.image.ImagePresenter",
"line_number": 13,
"usage_type": "name"
},
{
"api... |
71189403253 | import math
import cmath
import matplotlib.pyplot as plt
import numpy
import random
import Util
import BaseRational
class Rational(BaseRational.BaseRational):
numeratorCoef = []
denominatorCoef = []
def __init__(self, numeratorCoef, denominatorCoef):
self.numeratorCoef = list(numeratorCoef)
... | gradyschofield/digital-filters | Rational.py | Rational.py | py | 8,121 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "BaseRational.BaseRational",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "Util.filterPolynomialFromRoots",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "Util.filterPolynomialFromRoots",
"line_number": 21,
"usage_type": "call"
... |
33863783542 | from tkinter import Tk, Frame
from trimmed_file_downloader_interface import TrimmedFileDownloaderGui
from playlist_downloader_interface import PlayListDownloaderGui
from single_file_downloader_interface import SingleFileDownloaderGui
from main_menu import MainMenu
from PIL import Image, ImageTk
class MainFrame(Tk):
... | PietroSassone/youtube-downloader-desktop-app | youtube_downloader/graphical_interface/main_frame.py | main_frame.py | py | 2,172 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "tkinter.Tk",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "tkinter.Tk.__init__",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "tkinter.Tk",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "PIL.ImageTk.PhotoImage",
... |
367613103 | from rest_framework.viewsets import ModelViewSet
from rest_framework.permissions import AllowAny, IsAuthenticated
from rest_framework.response import Response
from rest_framework import status
from django.shortcuts import get_object_or_404, redirect
from rest_framework.authentication import TokenAuthentication, Session... | rootaccess13/Intern-Project-Face-Recognition | api/views.py | views.py | py | 14,587 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "rest_framework.viewsets.ModelViewSet",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "models.AttendanceRecord.objects.all",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "models.AttendanceRecord.objects",
"line_number": 27,
"usage_type... |
12805161577 | import streamlit as st
from PIL import Image
import random
import base64
def add_bg_from_local(image_file):
with open(image_file, "rb") as image_file:
encoded_string = base64.b64encode(image_file.read())
st.markdown(
f"""
<style>
.stApp {{
background-image: url(data:im... | jojo96/KU_Leuven_hackathon | pages/WordClouds.py | WordClouds.py | py | 1,727 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "base64.b64encode",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "streamlit.markdown",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "streamlit.title",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "streamlit.header",
... |
74073275254 | from django import forms
from .models import Attendance,CongratulationWhises
class AttendanceForm(forms.ModelForm):
class Meta:
model = Attendance
fields = [
'name','phone','email','is_attend','guest','whises',
]
widgets = {
'name': forms.TextInput(attrs={'pl... | izzwl/oniv | event/forms.py | forms.py | py | 1,042 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.forms.ModelForm",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "models.Attendance",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "django.forms.... |
15734262229 | import logging, logging.handlers
import signal
import json
from concurrent.futures import ThreadPoolExecutor
import requests
import time
from xua import helpers
from . import datatypes
class WorkEngineGracefulExitException(Exception):
pass
class WorkEngine:
__config: datatypes.WorkerConfig = None
__lo... | kmirzavaziri/xua-cli | xua/xworker/work_engine.py | work_engine.py | py | 4,628 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "concurrent.futures.ThreadPoolExecutor",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "concurrent.futures.ThreadPoolExecutor",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "signal.signal",
"line_number": 39,
"usage_type": "call"
},
... |
33357108673 | import enum
import sqlalchemy
from sqlalchemy import MetaData, Column, Table, Integer, String, Boolean, Enum, DateTime, ForeignKey
from sqlalchemy.dialects.postgresql import UUID
from sqlalchemy.sql import func
metadata = MetaData()
class MyEnum(enum.Enum):
one = ""
users = Table("users", metadata,
... | Lordir/Custom_recipe_service-test_task | models/users.py | users.py | py | 1,411 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sqlalchemy.MetaData",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "enum.Enum",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "sqlalchemy.Table",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Column"... |
20058996751 | import copy
import os
import shutil
import cv2
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.metrics import silhouette_score, calinski_harabasz_score, davies_bouldin_score, adjusted_rand_score, \
normalized_mutual_info_score, adjusted_mutual_info_score
import plotly.express as px
from sklearn.clu... | Tadlai/auroral-classification | grouper.py | grouper.py | py | 19,451 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "machine.Machine",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "sklearn.neighbors.KNeighborsClassifier",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "sk... |
23638666003 | import requests
import json
# Constants
GRAPH_URL_PREFIX = 'https://graph.workplace.com/'
FIELDS_CONJ = '?fields='
SUBCAT_PREFIX = '/subcategories'
CATEGORY_FIELDS = 'id,title,content,status,read_audience,json_content,last_editor,last_updated'
JSON_KEY_DATA = 'data'
JSON_KEY_PAGING = 'paging'
JSON_KEY_NEXT = 'next'
#... | fbsamples/workplace-platform-samples | SupportScripts/Python/GetKLCategoryInfo/export_kl_category.py | export_kl_category.py | py | 2,672 | python | en | code | 179 | github-code | 21 | [
{
"api_name": "requests.get",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": ... |
72942976692 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# __author__ = "errrolyan"
# Date: 18-10-16
import os
import os.path
import xml.etree.ElementTree as ET
import pinyin
def coverFiles(sourceDir, targetDir):
for file in os.listdir(sourceDir):
sourceFile = os.path.join(sourceDir, file)
targetFile = os... | errolyan/musicxml_to_pinyin | xmlread.py | xmlread.py | py | 1,228 | python | en | code | 4 | github-code | 21 | [
{
"api_name": "os.listdir",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number"... |
15012562210 | from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn import tree
import matplotlib.pyplot as plt
import matplotlib
matplotlib.rcParams['font.family'] = 'SimHei'
matplotlib.rcParams['axes.unicode_minus'] = False
class decision_tree_classifier:
def __init__(self):
... | strategic-zjc/NJUSE-BigDataAnalytics | classification/classification_algo/decision_tree.py | decision_tree.py | py | 4,971 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "matplotlib.rcParams",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.rcParams",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "sklearn.datasets.load_iris",
"line_number": 10,
"usage_type": "call"
},
{
"api_na... |
33133798241 | import json
from datetime import timedelta
from werkzeug.exceptions import BadRequest
import odoo
from odoo.exceptions import AccessError
from odoo.fields import Date
from odoo.addons.base_rest.controllers.main import _PseudoCollection
from odoo.addons.component.core import WorkContext
from .common import BaseCoope... | coopiteasy/vertical-cooperative | cooperator_api/tests/test_subscription_requests.py | test_subscription_requests.py | py | 10,517 | python | en | code | 37 | github-code | 21 | [
{
"api_name": "common.BaseCooperatorRestCase",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "odoo.addons.base_rest.controllers.main._PseudoCollection",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "odoo.addons.component.core.WorkContext",
"line_number"... |
2973945952 | import copy
import os
from time import perf_counter
import click
import imageio
import numpy as np
import PIL.Image
import torch
import torch.nn.functional as F
import dnnlib
import legacy
from global2mesh.uv2mesh_withTex_liyi import generate
import json
from tqdm import tqdm
def project(
G,
... | Zod-L/StlyeGAN-Multi-Branches | generate_test_obj.py | generate_test_obj.py | py | 8,483 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "torch.Tensor",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "torch.device",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "copy.deepcopy",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "numpy.random.Random... |
15961709889 | # canny edge detector for images
# import degrees and radian conversion functions
from math import radians,degrees
# import pathlib to test if file exists
from pathlib import Path
# import PIL for image import and export
from PIL import Image
# numpy for efficient array use
import numpy as np
# import system for user ... | treyamador/computer_vision | theory/canny.py | canny.py | py | 14,000 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sys.argv",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number... |
9779005907 | # -*- coding:utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals, \
with_statement
import logging
from solrdataimport.lib.util import format_exc
from solrdataimport.lib.map import Map
from solrdataimport.payload import Payload
from solrdataimport.dataload.fetch import Fetc... | pisceanfoot/solrdataimport | solrdataimport/dataimport.py | dataimport.py | py | 4,265 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "solrdataimport.lib.map.Map",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "solrdataimport.dataload.fetch.FetchData.initCass",
"line_number": 36,
"usage_type": "call"
... |
46822463284 | #!/usr/bin/python
#-*- coding: utf-8 -*-
import json
import copy
import os
import subprocess
from random import randint
#标记语句
LABEL_STATEMENT = "line_number: "
#合约结果命名后缀
INJECTED_CONTRACT_SUFFIX = "_affectedByMiners.sol"
#标记文件命名后缀
INJECTED_INFO_SUFFIX = "_affectedByMinersInfo.txt"
#结果保存路径
DATASET_PATH = "./dataset/"
... | xf97/HuangGai | src/securityAbandonerAndInjector/contractAffectedByMiners/contractAffectedByMinersInjector.py | contractAffectedByMinersInjector.py | py | 5,378 | python | en | code | 32 | github-code | 21 | [
{
"api_name": "os.mkdir",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 69... |
7586731225 | import os
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import cv2
from training import get_paths_and_names
def save_images(images, image_filenames):
"""Save processed images in folder."""
for i in range(len(images)):
cv2.imwrite(f'images/carrier_preprocessed/{ima... | SClerckx/AE2223-II-ANN | carrier_preprocessing.py | carrier_preprocessing.py | py | 1,214 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "cv2.imwrite",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "cv2.resize",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "cv2.INTER_LINEAR",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "cv2.GaussianBlur",
"... |
70984543734 | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index),
url(r'^home/$', views.home),
url(r'^market/(\d+)/(\d+)/(\d+)/$', views.market),
url(r'^cart/$', views.cart),
#添加购物车
url(r'^addCart/(\d+)/$', views.addCart),
#
url(r'^deal/$', vie... | huangyuanyuan1011/dianshanggouwu | shaxf/urls.py | urls.py | py | 687 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "django.conf.urls.url",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.co... |
12643791256 | import torch
import torch.nn as nn
import numpy as np
import einops
import itertools
from torch.utils.data import DataLoader
import os
import clip
from dc_ldm.ldm_for_fmri_clip import cond_stage_model
from uni_md.diffusion.dpm_solver_pp import NoiseScheduleVP, DPM_Solver
from PIL import Image
from torchvision.utils im... | lsl001006/fmri-diff | code/uni_md/unid_fmri_control.py | unid_fmri_control.py | py | 14,109 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "torch.linspace",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "torch.float64",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "numpy.ones",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_... |
13292581511 | import os
import math
import time
import random
import inspect
from PIL import Image, ImageDraw
from Function import Multiply, Sin, Cos, random_expr, Var
WIDTH = 1000
HEIGHT = 1000
random.seed()
def generate_image(vars=[]):
rfunc = random_expr(vars, 0.5)
gfunc = random_expr(vars, 0.5)
bfunc = random_expr(... | raphaelpaiva/Creative | randomfunc.py | randomfunc.py | py | 1,154 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "random.seed",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "Function.random_expr",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "Function.random_expr",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "Function.random... |
41108058623 | import cv2
# Note the following is the typical rtsp url for streaming from an ip cam
# source = "rtsp://user:password@ipaddress:port/<camera specific stuff>"
# Each manufacturer is different. For my alibi cameras, this would be
# a valid url to use with the info you provided.
source = "rtsp://admin:autogruppe4@192.168.... | Hallvardd/autoferry | camera_test.py | camera_test.py | py | 673 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "cv2.waitKey",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "cv2.destroyAllWindows",
"l... |
42522320745 | from celery import Celery
app = Celery("tasks", broker="redis://localhost:6379", backend="rpc://")
@app.task
def countdown(n=int(5e8)):
assert isinstance(n, int)
for _ in range(n):
n -= 1
return n
| pimiento/python_threads_examples | tasks.py | tasks.py | py | 220 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "celery.Celery",
"line_number": 3,
"usage_type": "call"
}
] |
7618755499 | from fastapi import FastAPI, HTTPException
import uvicorn
from pydantic import BaseModel
from typing import List
import mysql.connector
import boto3
import uuid
from pytz import timezone
from datetime import datetime
currentTime = datetime.now(timezone('Asia/Seoul')).strftime('%Y-%m-%d %H:%M:%S')
table_name = 'FastAP... | Hyunsoo-Ryan-Lee/AWS-Training | Flet/fastapi-flet/main.py | main.py | py | 3,619 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "datetime.datetime.now",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "pytz.timezone",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "boto3.resource"... |
37161438480 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name: cloud
Description:
Author: huangzhen
date: 2018/3/13
-------------------------------------------------
Change Activity:
2018/3/13:
------------------... | zuiwan/CodingHub | Platform/ERACenter/Core/model.py | model.py | py | 11,558 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "marshmallow.Schema",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "marshmallow.fields.Str",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "marshmallow.fields",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "marshmal... |
14292070016 | import numpy as np
import cv2
import time
import mediapipe as mp
import math
from ctypes import cast, POINTER
from comtypes import CLSCTX_ALL
from pycaw.pycaw import AudioUtilities, IAudioEndpointVolume
def handTracking():
cap = cv2.VideoCapture(0)
#defining mediapipe library
mpHands = mp.solutions.hands... | sanjoggaihre/GestureVolumeControl | main.py | main.py | py | 4,428 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "mediapipe.solutions",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "mediapipe.solutions",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "py... |
4596314625 | import cv2
import numpy as np
line_thickness = 3
box = []
for i in range(3):
box.extend([[1,2]])
bgr_3d_array = cv2.imread(r'C:\Users\GS\Downloads\black_screen.jpg')
areas = [[[0, 0], [896, 0], [896, 544], [0, 544]],[[100,100],[200,100],[200,300],[100,300]]]
for area in areas:
pts = np.array(area, np.int32)
... | jsyzgs/git_exercises | cv2_ploy.py | cv2_ploy.py | py | 453 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "cv2.imread",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.int32",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "cv2.polylines",
"line_num... |
32534353432 | import tkinter as tk
import pyautogui
import time
import threading
import os
pyautogui.FAILSAFE = False
is_running = False
def move_cursor():
while is_running:
pyautogui.moveRel(4, 4)
time.sleep(2)
def start_script():
global is_running
if not is_running:
is_runnin... | enflasyon/AMC | far3.py | far3.py | py | 1,283 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pyautogui.FAILSAFE",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "pyautogui.moveRel",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "threading.Thread"... |
20165870539 | '''
Generator Application Serializers
generator/serializers.py
@author Teerapat Kraisrisirikul (810Teams)
'''
from django.core.exceptions import ValidationError
from django.core.validators import URLValidator
from django.utils.translation import gettext as _
from rest_framework import serializers
from cor... | 810Teams/clubs-and-events-backend | generator/serializers.py | serializers.py | py | 6,075 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "rest_framework.serializers.ModelSerializer",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "generator.models.QRCode",
"line_number": 23,
"usage_type": "na... |
73030676533 | """The xonsh shell"""
import builtins
from warnings import warn
from xonsh.execer import Execer
from xonsh.environ import xonshrc_context
from xonsh.tools import XonshError
def is_prompt_toolkit_available():
"""Checks if prompt_toolkit is available to import."""
try:
import prompt_toolkit
ret... | LiuFang816/SALSTM_py_data | python/donnemartin_gitsome/gitsome-master/xonsh/shell.py | shell.py | py | 2,313 | python | en | code | 9 | github-code | 21 | [
{
"api_name": "builtins.__xonsh_env__",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "warnings.warn",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "xonsh.prompt_toolkit_shell.PromptToolkitShell",
"line_number": 40,
"usage_type": "call"
},
... |
30794114250 | import requests
import json
import openpyxl
json_file_path = "E:/lis-to-tm/result.json"
def print_hi():
with open("result.json",encoding='utf-8', errors='ignore') as file:
data = json.load(file,strict=False)
req = requests.get(url='https://market.csgo.com/api/v2/prices/RUB.json')
items = req.json(... | va1ce/parse-lis-skins | main.py | main.py | py | 1,469 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "json.load",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "openpyxl.Workbook",
"line_number": 12,
"usage_type": "call"
}
] |
17400545152 | # encoding:utf-8
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
def Mumax3_plot(path):
data_txt = path + 'table.txt'
f = open(data_txt)
data = f.readlines() # 逐行读取txt并存成list。每行是list的一个元素,数据类型为str
print(len(data))
l = []
mx = []
my = [... | Alexander-qiu/mumax-python | mumax3_plot.py | mumax3_plot.py | py | 2,803 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "mat... |
34318641197 | import os
import os.path as op
import pickle as pl
import clr
import datetime
from pyrevit import framework
from pyrevit import script
from pyrevit import DB, UI
from os import path
__doc__ = 'Keep views synchronized. This means that as you pan and zoom and '\
'switch between Plan and RCP views, this tool wi... | tkahng/nerv_pyrevit | CustomExtension.extension/Nerv.tab/Experiment.panel/Test.pulldown/Smart Test.pushbutton/script.py | script.py | py | 5,621 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "datetime.datetime",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "os.path.exists",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "datetime.datetime",
... |
41307629545 | import pandas as pd
import pyfiglet as pfg
from termcolor import cprint
from interface import select_article
from news_parser import get_google_news_result
p = pfg.figlet_format("News Accumulator",font = 'slant')
cprint(p,'blue',attrs = ['bold'])
def get_inp():
titleName = input("Enter the news title keyword: ")... | kaustav202/News-Accumulator | main.py | main.py | py | 761 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "pyfiglet.figlet_format",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "termcolor.cprint",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "news_parser.get_google_news_result",
"line_number": 14,
"usage_type": "call"
},
{
"api_name... |
11588802764 | import os
from caffe2.python.dataset import Dataset
from torch.utils.data import Dataset
from PIL import Image
class MyData(Dataset):
def __init__(self, root, label):
self.root = root
self.label = label
self.path = os.path.join(root, label)
self.img_path = os.listdir(self.path)
... | 287852793/pytorch | read_data.py | read_data.py | py | 842 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "torch.utils.data.Dataset",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "os.listdir",
"l... |
29720492212 | #####################################################################
# MC Transformation : Swap 2 edges, 4 separate nodes, do not swap
# into existing edges
# This preserve the number of nodes N, the number of links and the
# degree sequence {z_i}
####################################################################
... | IsisChameleon/NetworkSyncCapstone | markovTransforms.py | markovTransforms.py | py | 16,862 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "copy.deepcopy",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "random.choice",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "numpy.random.randint",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"... |
4207206037 | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
# Leitura dos dados dos arquivos
data_db = pd.read_csv("media_tt_db.csv")
data_redis = pd.read_csv("media_tt_redis.csv")
data_result = pd.read_csv("media_tt_result.csv")
data_vote = pd.read_csv("media_tt_vote.csv")
# Seleção dos dados por grupo
gr... | jonathamgg/sarik_validation_graphics | DADOS/media/taxa_transmissao/grafico_ep.py | grafico_ep.py | py | 3,575 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"l... |
32051861411 | #!/usr/bin/env python
import datetime
import json
import os
import os.path as osp
import shlex
import cv2
import labelme
import numpy as np
import PIL.Image
import skimage.io
import subprocess32 as subprocess
import rospkg
PKG_DIR = rospkg.RosPack().get_path('jsk_arc2017_common')
def json_to_label(json_file):
... | mmurooka/jsk_apc | jsk_arc2017_common/scripts/annotate_jsk_v1.py | annotate_jsk_v1.py | py | 3,453 | python | en | code | null | github-code | 21 | [
{
"api_name": "rospkg.RosPack",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "labelme.utils.img_b64_to_array",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "labelme.utils... |
4280422457 | # File with functions that work with PyGitHub to use the GitHub API
from github import Github, GithubException, BadCredentialsException
# Change default github.MainClass.Github parameter from 30 to max 200
# per_page = number of items returned per API call
Github.per_page = 50
# Log in with user MathiasMeeusengt us... | mathiasmeeusengt/oca_modules_table | app/pygithub_api.py | pygithub_api.py | py | 1,188 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "github.Github.per_page",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "github.Github",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "github.Github",
"line_number": 12,
"usage_type": "call"
}
] |
13171458966 | # -*- coding:utf-8 -*-
# @Author: yang
# @File:depend_data.py
# @Time: 2020-12-14
# @IDE: Pycharm
# @Function: Get Depend Data
"""jsonpath_rw库用来提取接口返回数据json指定字段数据"""
from jsonpath_rw import parse
from util.operation_xls import OperationExcel
from util.operation_json import OperationJson
from data.get_data i... | catherinazhao/MyInterfaceTest | data/depend_data.py | depend_data.py | py | 2,895 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "util.operation_xls.OperationExcel",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "data.get_data.GetData",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "bases.run_method.RunMethod",
"line_number": 22,
"usage_type": "call"
},
{
... |
23099772837 | import dsmirai.client_broker as client_broker
from dsmirai.persistent_model import helpers
from django.conf import settings
from mirai.models import IaaS, Container, Client
import dsmirai.onos_helpers as onos_helpers
def delete(container_id, container_name, ip_server_container):
"""
Delete an SDN container
... | MOSAIC-LAB-AALTO/smart_sfc_migration | dsmirai/linux_container_deletion.py | linux_container_deletion.py | py | 2,760 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "dsmirai.client_broker.ClientBroker",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "dsmirai.client_broker",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "dsmirai.onos_helpers.OnosHelpers",
"line_number": 18,
"usage_type": "call"
},
... |
43351731132 | #coding=utf-8
import os
import random
import cv2
import subprocess
import shutil
import platform
#生成训练所需的列表文件和lmdb文件
#注意按序号修改数据集名称、年份以及数据集的位置和caffe安装位置以及标签文件
datasetname="voc"
modeldir="models"
if platform.system()=="Windows":
caffe_root="D:/CNN/ssd"#1
data_dir="E:/Face/Datasets/"+datasetname+"/"#2
else:
ca... | imistyrain/ssd-models | python/create_lmdb.py | create_lmdb.py | py | 3,128 | python | en | code | 69 | github-code | 21 | [
{
"api_name": "platform.system",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path.expanduser",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "random.shuffle",
... |
73435897974 | from inputs import get_gamepad
import os
import hy
import json
import re
import asyncio
import datetime
import random
import websockets
import MapInput
import DanceTyper
import PredictiveCode
def get_current_word(line, position):
try:
if line[position] in "() ": return ""
first = re.findall(r"[\w]... | bahorn/AnvilHackIV | DanceMat.py | DanceMat.py | py | 6,025 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "re.findall",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "DanceTyper.DanceTyper",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "PredictiveCode.Predictor"... |
1882631782 | from ipaddress import ip_address
import subprocess
import sys
import os
#import boto3, botocore
import importlib.util
import re
from rsa import PrivateKey
separator = "\n"
indent = " "
ansible_dir = "./ansible"
terraform_dir = "./terraform"
post_creation_dir = "./post-creation"
instance_config_file = "fresh_installa... | lab11/lab11-ec2-deployer | ec2_deployer.py | ec2_deployer.py | py | 17,326 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.chdir",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "os.chdir",
"line_number": 64,
"usage_type": "call"
},
{
"api_name": "os.chdir",
"line_number": 76,
"usage_type": "call"
},
{
"api_name": "os.chdir",
"line_number": 88,
"usa... |
25288644575 | # http://programarcadegames.com/python_examples/show_file.php?file=game_class_example.py
import pygame
import random
import math
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
GREEN = (0, 255, 0)
RED = (255, 0, 0)
BLUE = (0, 0, 255)
YELLOW = (255, 255, 0)
SCREEN_WIDTH = 700
SCREEN_HEIGHT = 500
class Bloc... | mvnDaMan/PyGame-Shoot-Test-And-Experiments | bullets.py | bullets.py | py | 8,008 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pygame.sprite",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "pygame.Surface",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "random.randrange",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "random.randrange",... |
7567417025 | import argparse
import uuid
import dialogflow
PROJECT_ID = 'project-harmony'
def detect_intent_texts(project_id, session_id, texts, language_code):
session_client = dialogflow.SessionsClient()
session = session_client.session_path(project_id, session_id)
print('Session path: {}\n'.format(session))
f... | mukilane/sws | test/dialogflowtext.py | dialogflowtext.py | py | 2,036 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "dialogflow.SessionsClient",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "dialogflow.types.TextInput",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "dialogflow.types",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_nam... |
29960687864 | LSTM_Units=256
Max_Allowed_Sequence_Length=512
def Get_Corpus_Transcripts():
import pyodbc
DB = pyodbc.connect(r'Driver={SQL Server};Server=(local);Database=TrainingCorpus;Trusted_Connection=yes;',autocommit=True)
DB_Link=DB.cursor()
Transcripts_Rows=DB_Link.execute("Select Transcript_Lower_Punc_Only_S... | Jeff-Winchell/Sentence_Restoration | Build_Train_Transcript_Sentence_Restoration_Model.py | Build_Train_Transcript_Sentence_Restoration_Model.py | py | 15,018 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pyodbc.connect",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "nltk.tokenize.treebank.Tree... |
17388776317 | from twilio.rest import Client
account_sid = 'AC7fac92d24e0c763b94c07234ac878efa'
auth_token = '0a053a398e536c5a5fbee634fbafca21'
client = Client(account_sid, auth_token)
def send_msg():
message = client.messages.create(
from_='whatsapp:+14155238886',
... | Ayush-mega-coder/Basic-Python-Projects | Whatsapp_Automation/whatsapp_auto.py | whatsapp_auto.py | py | 487 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "twilio.rest.Client",
"line_number": 5,
"usage_type": "call"
}
] |
2672951260 | import os
from pathlib import Path
import json
from cloudpathlib import S3Path
import pytest
def get_local_dir_files(local_dir: str, suffix: str) -> list[Path]:
"""Get all the files in a local directory."""
return list(
Path(
Path(__file__).parent / os.path.join("data", "pipeline_out", loc... | climatepolicyradar/navigator-data-ingest | integration_tests/test_pipeline_bucket_state.py | test_pipeline_bucket_state.py | py | 3,038 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pathlib.Path",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 1... |
2916909880 | from sqlalchemy.orm import Session
from app import crud, schemas
from app.core.config import settings
from app.db import base # noqa: F401
# make sure all SQL Alchemy models are imported (app.db.base) before initializing DB
# otherwise, SQL Alchemy might fail to initialize relationships properly
# for more details: ... | changsin/adart | src/backend/app/app/db/init_db.py | init_db.py | py | 3,508 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sqlalchemy.orm.Session",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "app.crud.group.get_multi",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "app.crud.group",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "a... |
41690459673 | #coding=utf-8
'''
Created on 2016年9月27日
@author: Administrator
'''
from __future__ import division
import nltk,re,pprint
from urllib import urlopen
url="http://www.gutenberg.org/files/2554/2554.txt"
raw=urlopen(url).read()
type(raw)
tokens=nltk.word_tokenize(raw)
url = "http://news.bbc.co.uk/2/hi/... | DingHe/python-ml | NLPInAction_src/ch3/test.py | test.py | py | 796 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "urllib.urlopen",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "nltk.word_tokenize",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "urllib.urlopen",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "nltk.clean_html",
... |
26981173925 | """
Author : Cagri Karaman
Date : 20212401
Script to parse the measurements table from
DSI Akim Gözlem Yıllıkları at https://www.dsi.gov.tr/Sayfa/Detay/744
file : PDF file to be parsed
page : Page of the table
year : year of the measuremtn (water year)
extract : Extraction of the data in csv format
De... | hckaraman/DSI-taskin-parser | src/Parser.py | Parser.py | py | 5,039 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "pandas.DataFrame",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "pdfplumber.open",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_nu... |
21183293005 | import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import warnings
from sklearn.model_selection import train_test_split
from sklearn.decomposition import PCA,KernelPCA
from sklearn.cross_decomposition import PLSRegression
from sklearn.neighbors import KNeighborsClassifier as KNC
from sklearn... | meierms1/Supervised-Dimension-Reduction-For-Optical-Vapor-Sensing | KNN_analysis.py | KNN_analysis.py | py | 9,745 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "inputfile.data_set",
"line_number": 21,
"usage_type": "argument"
},
{
"api_name": "pandas.read_excel",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "inpu... |
41476682688 | import json
import urllib.request
import html
def main():
username = input('Enter a MyAnimeList username: ')
animes = get_animes(username)
scores = get_scores(animes)
print_scores(scores)
def get_animes(username):
fp = urllib.request.urlopen(f'https://myanimelist.net/animelist/{username}')
p... | foxness/score-distro | main.py | main.py | py | 1,406 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "urllib.request.request.urlopen",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "urllib.request.request",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "urllib.request",
"line_number": 14,
"usage_type": "name"
},
{
"api_nam... |
18627838912 | """
All models in ensemble may not learn the required mapping from images to states
Since aleatoric uncertainty is built into the NN predictions, an ensemble member may converge to a frozen distribution
with a fixed mean and variance regardless of distribution
"""
import argparse
from src.learned_models.ensemble import... | ishank-juneja/Online-Model-Selection | src/perception_tests/encoder-distribution-test.py | encoder-distribution-test.py | py | 2,398 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "src.learned_models.ensemble.EncoderEnsemble",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "src.training.MyDatasetBuilder",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 62,
"usage_type": "cal... |
19251754645 | # import os
import logging
from typing import Dict, Callable, List
import pprint
from coinpy.core.crypto import Privkey, PrivkeyStorage
logger = logging.getLogger(__name__)
class Wallet(object):
def __init__(self) -> None:
self.__signing_keys = PrivkeyStorage.load_signing_keys()
self.__comman... | mrkovec/coinpy | wallet.py | wallet.py | py | 1,482 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "coinpy.core.crypto.PrivkeyStorage.load_signing_keys",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "coinpy.core.crypto.PrivkeyStorage",
"line_number": 15,
"usage_type"... |
2805057164 | from flask import Flask, render_template
from flask_socketio import SocketIO, send, emit
import os, sys
app = Flask(__name__)
app.config['SECRET_KEY'] = 'secret!'
socketio = SocketIO(app)
# if 'SUMO_HOME' in os.environ:
# tools = os.path.join(os.environ['SUMO_HOME'], 'tools')
# sys.path.append(tools)
# else:... | laplacecrame/simulatorConnection | HelloWorld.py | HelloWorld.py | py | 1,366 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Flask",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "flask_socketio.SocketIO",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask_socketio.emit",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "flask_socketio.... |
27661055110 | from .model_wrapper import ModelWrapper
from utils import one_hot_to_ints, cross_val_generator
import networkx as nx
import os
import sys
import torch
from dataclasses import dataclass
import numpy as np
import torch.utils.data
class DiffPoolWrapper(ModelWrapper):
repo_url = 'https://github.com/RexYing/dif... | nathanlucaussy/provably-powerful-GNNs | model_wrappers/diffpool_wrapper.py | diffpool_wrapper.py | py | 10,500 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "model_wrapper.ModelWrapper",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "torch.device",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "torch... |
13035350264 | from fastapi import APIRouter
from dbuniversity import *
from models import University, UpdateUniversity
from fastapi import HTTPException
Universities = APIRouter()
@Universities.get('/University')
async def get_Universitys():
University = await get_all_universities()
return University
@Universities.post('/... | jdacunag/ProyectoIngSoftware | Backend/services/University.py | University.py | py | 969 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "fastapi.APIRouter",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "models.University",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "models.University",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "models.Universit... |
18420092902 | #!/usr/bin/env python
# coding: utf-8
# Paso 0
# In[1]:
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import seaborn as sns
import numpy as np
from sklearn import datasets
from sklearn.cluster import KMeans
from sklearn.preprocessing import StandardScaler
from sklearn.me... | MaximoCabezasFernandez/MaximoCabezasFernandez-UCEMA-Introduccion-a-la-Informatica | Clase 14 Practica - Pandas (5).py | Clase 14 Practica - Pandas (5).py | py | 6,704 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "seaborn.pairplot",
"line_number": 70,
"usage_type": "call"
},
{
"api_name": "seaborn.histplot",
... |
31038075814 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import glob
import os.path as osp
import numpy as np
import json_tricks as json
import pickle
import logging
import os
import copy
import cv2
from .JointsDataset import JointsDataset
from virtualpose.utils.tra... | wkom/VirtualPose | virtualpose/dataset/mixed.py | mixed.py | py | 3,028 | python | en | code | 51 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "JointsDataset.JointsDataset",
"line_number": 80,
"usage_type": "name"
}
] |
36854982928 | import asyncio
import json
import logging
import pickle
import uuid
from functools import partial
from typing import Any, Callable, Dict, List, Union
from aio_pika import DeliveryMode, Message
from aio_pika.abc import (
AbstractIncomingMessage,
AbstractRobustChannel,
AbstractRobustExchange,
AbstractRob... | aprilahijriyan/rmq-rpc | rmq_rpc/client.py | client.py | py | 4,648 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "aio_pika.abc.AbstractRobustQueue",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "aio_pika.abc.ConsumerTag",
"line_number": 27,
"usage_type": "name"
},
{
"api_n... |
902038186 | from msilib.schema import Control
#Esto es usada para poder llevar un registro de exacto de la hora y fechade ingreso del cliente
from calendar import c
import datetime
#Esta la clase cliente la cual contiene los diferentes objetos requeridos para la solución del problema
class datosCliente:
def _init_(self, nombr... | Gregory9M/-NRC-6181-_KarlosChevez_Lab3 | [NRC-6181]_KarlosChevezlab3.py | [NRC-6181]_KarlosChevezlab3.py | py | 13,466 | python | es | code | 0 | github-code | 21 | [
{
"api_name": "datetime.datetime.now",
"line_number": 64,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 64,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime.strftime",
"line_number": 65,
"usage_type": "call"
},
{
"api_name"... |
26380529112 | from chaco.api import ArrayPlotData, Plot
import time
from chaco.tools.api import LegendTool
from enable.api import ComponentEditor
from pyface.api import GUI
from sbp.tracking import SBP_MSG_TRACKING_STATE
from traits.api import Instance, Dict, HasTraits, Float, List, Int, Bool
from traitsui.api import Item, View, HSp... | wangjiefjj/GNSS-recive | piksi_tools/console/tracking_view.py | tracking_view.py | py | 7,062 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "traits.api.HasTraits",
"line_number": 46,
"usage_type": "name"
},
{
"api_name": "traits.api.Dict",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "traits.api.Bool",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "traits.api.Bool"... |
34985223193 | #!/usr/bin/python3
""" mediamanger """
import os
import json
import datetime
import argparse
import requests
PARSER = argparse.ArgumentParser()
PARSER.add_argument("-filename", help="filename", required=True)
PARSER.add_argument("-url", help="url", required=True)
ARGS = PARSER.parse_args()
class API():
""" that... | ffsh/ffshTools | pyAPIUpdater/apiupdater/apiupdater.py | apiupdater.py | py | 1,503 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_n... |
14285732201 | #!/usr/bin/python3
##This code is a web spider, you need to give him a link with '-U' or '--URL'.
##He can also do this with tor network (-T, --Tor).
##At the default it get the link just from the website you give.
##If you want to scan also sublinks you need to type how many do you want with '-S' or '--Sub'.
##It wi... | Maor97/CSI_course_projects | WebProject/Spider.py | Spider.py | py | 6,407 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "tldextract.extract",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "os.system",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "time.sleep",
... |
38294810803 | import numpy as np
import ppxf.ppxf_util as util
import seaborn as sns; sns.set()
import matplotlib.pyplot as plt
import matplotlib as mpl
from astropy.io import fits
from matplotlib import gridspec
import os, glob, time, random, math
from astropy.table import Table
from scipy import ndimage, optimize
from sys import s... | vparkash2014/WiFeS_datacubes | WiFeS_function.py | WiFeS_function.py | py | 17,845 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "seaborn.set",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "astropy.io.fits.open",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "astropy.io.fits",
"line_number": 35,
"usage_type": "name"
},
{
"api_name": "numpy.arange",
"l... |
8818732219 | from django.urls import path
from .views import Index, About, Order, OrderConfirmation, Menu, MenuSearch, OrderSearch
from . import views
app_name = 'customer'
urlpatterns = [
path('', Index.as_view(), name='index'),
path('create-ad/', views.create_ad, name='create-ad'),
path('ad-list/', views.ad_list, na... | eddiemac1993/blessedone | customer/urls.py | urls.py | py | 1,013 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "views.Index.as_view",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "views.Index",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.urls.path",
... |
41752197866 | import datetime
import numpy as np
import multiprocessing as mp
from utils import logger
from utils.dataloader import DataLoader
from utils.results_plotter import plot
from utils.misc import set_global_seeds, make_arg_list
from models.nn import MLP, BinaryClassifier, PeerBinaryClassifier, SurrogateBinaryClassifier, D... | gohsyi/PeerLoss | run_nn.py | run_nn.py | py | 11,115 | python | en | code | 36 | github-code | 21 | [
{
"api_name": "multiprocessing.Pool",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "multiprocessing.cpu_count",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "utils.misc.make_arg_list",
"line_number": 25,
"usage_type": "call"
},
{
"api_name"... |
73229073014 | import os
import webapp2
import jinja2
from main import *
from model.model_user import *
import webapp2
import jinja2
from utils import *
from main import *
from model.model_post import *
from utils import *
from handler import *
from cache import *
import time
import logging
import sys
logging.error(sys.path)
class... | anubhavmaity/everyones-blog | new_post.py | new_post.py | py | 2,114 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "logging.error",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "logging.error",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "logging.error",
"line_n... |
14702867984 | import datetime
import json
import pathlib
import shutil
import subprocess
import tempfile
import zipfile
from collections import defaultdict
import flask
import sqlalchemy as sa
from bs4 import BeautifulSoup
from flask import current_app as app
from flask_login import current_user, login_required
import feedi.models... | facundoolano/feedi | feedi/routes.py | routes.py | py | 23,195 | python | en | code | 78 | github-code | 21 | [
{
"api_name": "flask.request.args.get",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "flask.request",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "flask.session.get",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "flask.ses... |
7575842106 | #!/usr/bin/env python
"""
Script to perform a search of supplied orgs, returning the repo list that return positives
"""
import configparser
import sys
from time import sleep
import alive_progress
from github3 import exceptions as gh_exceptions
from github3 import login
from github_scripts import utils
def parse_a... | MoCo-GHE-Admin/github-scripts | gh_file_search.py | gh_file_search.py | py | 6,002 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "github_scripts.utils.GH_ArgParser",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "github_scripts.utils",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "configparser.ConfigParser",
"line_number": 84,
"usage_type": "call"
},
{
"... |
4100604116 | from django.contrib.auth.models import User
from django.db import models
from django.utils.translation import gettext_lazy as _
from base.models import BaseModel
from order.models.managers import SupplierOrderList
class ProductOrder(BaseModel):
class OrderStatus(models.TextChoices):
ACTIVE = "active", _(... | tanjibpa/mednet | src/order/models/product_order.py | product_order.py | py | 1,399 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "base.models.BaseModel",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "django.db.models.TextChoices",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 10,
"usage_type": "name"
},
{
"api_name"... |
13602421086 | import logging
import uuid
from pathlib import Path
from telegram import Voice
from pymediainfo import MediaInfo
from exception import VoiceNotFound
logger = logging.getLogger(__name__)
class VoiceManager:
@staticmethod
def initial_voice_cache(delete: bool = True) -> None:
base_path = Path("voice"... | FrozenYogurtPuff/Telegram-ASR-Bot | voice_manager.py | voice_manager.py | py | 1,813 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "telegram.Voice",
"lin... |
28000288497 | from __future__ import absolute_import, print_function
from flask import Blueprint, current_app, redirect, request, url_for
from flask_babelex import lazy_gettext as _
from flask_login import current_user
from flask_menu import current_menu
from .proxies import current_admin
blueprint = Blueprint(
'invenio_admin... | N03/invenio | .virtualenvs/invenio/lib/python2.7/site-packages/invenio_admin/views.py | views.py | py | 2,756 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Blueprint",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask_login.current_user.is_authenticated",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "flask_login.current_user",
"line_number": 18,
"usage_type": "name"
},
... |
22511095925 | from sqlalchemy import Table
from sqlalchemy.sql.schema import MetaData
from refactored.data_vault.keys.id_column import id_column
from refactored.tables.zmc_table_definitions import zmc_table_definitions
from control_files.zmc_keys_and_sats import zmc_sats
def zmc_satellites(schema, engine, tags):
metadata = Meta... | SkinnyPigeon/new_dv_tests | refactored/prototyping/zmc_satellites.py | zmc_satellites.py | py | 986 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sqlalchemy.sql.schema.MetaData",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "control_files.zmc_keys_and_sats.zmc_sats",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "refactored.tables.zmc_table_definitions.zmc_table_definitions",
"line_... |
23716805032 | # -*- coding: utf-8 -*-
"""
Created on Mon Oct 26 18:24:43 2020
@author: Oleksiy
This is for now for testing the fitter via the JSON remote interface
"""
import socket
import json
import sys
import numpy as np
import random
HOST = "127.0.0.1"
PORT = 5757
BUFFER_SIZE = 2048
def receive_message(socket_in):
NUM... | shalevy1/realtimeplotter | mytest_sendlabcurves.py | mytest_sendlabcurves.py | py | 3,051 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numpy.loadtxt",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "socket.socket",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "socket.AF_INET",
"line_number": 59,
"usage_type": "attribute"
},
{
"api_name": "socket.SOCK_STREAM",
... |
25540417907 | import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from misc import scrub_it
import csv
df = scrub_it()
for i in range(len(df['Date'])):
a_string = df['Date'][i]
df['Date'][i] = a_string[12:16]
a = df['Origin'].value_counts()
new_frame = a.to_frame()
list5countries = new_frame.index.toli... | cryptomilk2021/98-space-missions | top_5_over_time.py | top_5_over_time.py | py | 1,257 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "misc.scrub_it",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.show",
... |
70748348533 | from github import Github
def create(repo1):
token='07ed9eed3e43b90e8e18c53790856746ca38c315'
g=Github(token)
user=g.get_user()
print(user)
repo=user.create_repo(repo1)
def main():
repo="RepoIvan"
create(repo)
if __name__ == "__main__":
main()
| Ivan-Ramadhan/RepoIvan | buat.py | buat.py | py | 281 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "github.Github",
"line_number": 6,
"usage_type": "call"
}
] |
43474825536 | from mega import Mega
import json
# import sys
# print(sys.argv)
# dataMechanical = {
# "Workshop" : "",
# }
mega = Mega()
master = mega.login('abjfark@knowledgemd.com', '1234@1234')
subFolder = ["assignments", "books", "notes", "pyq", "misc" ]
def createFolders(data):
for i in data:
... | VanceAlot/python-vala | website/init.py | init.py | py | 689 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "mega.Mega",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "mega.login",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 26,
"usage_type": "call"
}
] |
18113804035 | import cv2, pyexiv2, os, argparse
from cv2 import dnn_superres
if __name__ == "__main__":
argParser = argparse.ArgumentParser()
argParser.add_argument("-i", "--inputFolder", help="absolute path to folder of the images to scale")
argParser.add_argument("-o", "--outputFolder", help="absolute path to fol... | mcgunit/imagesUpascaler | upscaleImage.py | upscaleImage.py | py | 2,661 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "cv2.dnn_superres.DnnSuperResImpl_create",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "cv2.dnn_superres",
"line_number": 25,
"usage_type": "name"
},
{
"... |
72126321974 | import os
import errno
import numpy as np
from copy import deepcopy
from miscc.config import cfg
from scipy.io.wavfile import write
from torch.nn import init
import torch
import torch.nn as nn
import torchvision.utils as vutils
from wavefile import WaveWriter, Format
import RT60
from multiprocessing import Pool
####... | anton-jeran/FAST-RIR | code_new/miscc/utils.py | utils.py | py | 8,296 | python | en | code | 124 | github-code | 21 | [
{
"api_name": "torch.mean",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "torch.nn.BCELoss",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "torch.nn.parallel.data_parallel"... |
33900206143 | from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar
import attr
from ..models.service_type import ServiceType
if TYPE_CHECKING:
from ..models.currency import Currency
from ..models.shipping_promise_set import ShippingPromiseSet
from ..models.weight import Weight
T = TypeVar("T", bound="Ser... | milyord/sp-api | sp/shipping/models/service_rate.py | service_rate.py | py | 2,885 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "typing.TypeVar",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "models.service_type.ServiceType",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "ty... |
19039745164 | from django.urls import path
from.import views
urlpatterns=[
path('register/',views.Register),
path('user_login/',views.user_login),
path('profile/',views.profile),
path('user_logout/',views.user_logout),
# path('img/',views.Img),
]
| vjvijaykumarvj/company_project | Api_root/logregister_app/urls.py | urls.py | py | 255 | python | en | code | 0 | github-code | 21 | [
{
"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",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
43279808427 | from flask import Flask, render_template, request
import openai
app = Flask(__name__)
# Configuração da API OpenAI
openai.api_key = "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"
@app.route("/")
def index():
return render_template("index.html")
@app.route("/poema", methods=["POST"])
def gene... | prof-fabiosantos/geradorDePoesia | flask_app.py | flask_app.py | py | 907 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Flask",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "openai.api_key",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "flask.render_template",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask.request.for... |
42117010202 | """
This Python script evaluates the total time taken to execute "show version" on 4 network devices:
- 1 Cisco IOS device
- 2 Arista EOS devices
- 1 Juniper SRX device
It uses Netmiko & the "ProcessPoolExecutor" in Concurrent Futures
"""
from concurrent.futures import ProcessPoolExecutor
from datetime import datetim... | roywaterman/pynet-python | ssh_concurrency/ex6.py | ex6.py | py | 1,212 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "datetime.datetime.now",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "concurrent.futures.ProcessPoolExecutor",
"line_number": 22,
"usage_type": "call"
},
{
"ap... |
29111075482 | import queue
import random
import logging
import math
import numpy as np
import carla
from carla import VehicleLightState as vls
from .projection import *
MAX_RENDER_DEPTH_IN_METERS = 50
class KittiWorld:
def __init__(self, client) -> None:
self.client = client
self.world = client.get_world()
... | wuhanstudio/carla-tracking-dataset | utils/world.py | world.py | py | 22,507 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numpy.array",
"line_number": 81,
"usage_type": "call"
},
{
"api_name": "numpy.sqrt",
"line_number": 151,
"usage_type": "call"
},
{
"api_name": "numpy.allclose",
"line_number": 153,
"usage_type": "call"
},
{
"api_name": "numpy.allclose",
"line_nu... |
18259989397 | from p5 import *
from wall import Wall
from ray import Ray
from source import Source
from absl import flags, app
from util import remap_number_range
FLAGS = flags.FLAGS
flags.DEFINE_boolean('auto', False, 'Moves the source particle automatically')
flags.DEFINE_integer('rays', 45, 'Moves the source particle automatical... | Eoin-McMahon/raycast | src/main.py | main.py | py | 2,031 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "absl.flags.FLAGS",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "absl.flags",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "absl.flags.DEFINE_boolean",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "absl.flags",
... |
34307953651 | #!/usr/bin/python3
import sys, os, math, time, datetime, re, geohash
from collections import defaultdict
from collections import Counter
from operator import itemgetter
# SETTINGS
MINUTES = 60 # maximum tijdsinterval tweets binnen een GeoHash
N_TWEETS = 2 # minimale hoeveelheid tweets in cluster
HASH_AC... | daviddekleer/EventDetective | scripts/old-scripts/geo.py | geo.py | py | 5,611 | python | nl | code | 0 | github-code | 21 | [
{
"api_name": "collections.defaultdict",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path.isdir",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "os.makedirs",
... |
9900445861 | import csv
import datetime
from db import Users, Post, db_session
post_list = []
u = Users
with open ('blog.csv', 'r', encoding = 'utf-8') as file:
fields = ['title', 'image', 'published', 'content', 'email', 'first_name', 'last_name']
reader = csv.DictReader(file, fields, delimiter = ';')
for row in reader:
ro... | DLitvi/lesson5 | csv_db.py | csv_db.py | py | 724 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "db.Users",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "csv.DictReader",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.