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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
21705447470 | from glob import glob
from os import makedirs
from shutil import copy2
from tqdm import tqdm
SINGER = 'mixed'
RELEASE_DIR = 'release/mixed_---'
PATH_QUESTION = 'conf/jp_qst001_nnsvs_simple_4-4_mix.hed'
NAME_EXPERIMENT = 'simple_4-4_mix'
def copy_question(path_question, release_dir):
"""
hedファイル(question)をコピ... | oatsu-gh/nnsvs_mixed_db | recipe/00-svs-world/make_it_for_release.py | make_it_for_release.py | py | 1,761 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.makedirs",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "shutil.copy2",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.makedirs",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 2... |
29214803056 | from django.views.generic.simple import direct_to_template
from django.db.models import get_app, get_models, get_model
from django.http import HttpResponse
from django.template.loader import render_to_string
from django.forms import ModelForm
from django.forms.models import modelform_factory
from django.forms import Mo... | dest81/test_dm | dynamic_models/views.py | views.py | py | 1,631 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "django.db.models.get_model",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.forms.TextInput",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "django.forms.models.modelform_factory",
"line_number": 17,
"usage_type": "call"
},
... |
74118290427 | import os
import sys
import yt_dlp
from tqdm import tqdm
def download_videos(links_file):
if not os.path.exists(links_file):
print("Error: The links file '{}' does not exist.".format(links_file))
return
ydl_opts = {
'format': 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/bes... | vishnu012/Personal-Scripts | pydownload/downloader.py | downloader.py | py | 961 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.path.exists",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "yt_dlp.YoutubeDL",
"line_number": 20,
"usage_type": "call"
}
] |
8209601687 | import os
import pytest
import requests_mock
from newsApi.models.request import EverythingRequestModel, Language, TopHeadlinesRequestModel, SourcesRequestModel
from newsApi.models.response import EverythingResponseModel, TopHeadlinesResponseModel, SourcesResponseModel
from newsApi.service import NewsAPIService
@pytes... | roachseb/NewsAPI-Python-Client | tests/test_news_service.py | test_news_service.py | py | 1,664 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "newsApi.service.NewsAPIService",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "pytest.fix... |
11773636601 | import requests
import json
from pprint import pprint
access_token='<put your access token here>'
page_id='<put your page id here>'
url='https://graph.facebook.com/v2.0/'+page_id+'?feed&access_token='+access_token
r = requests.get(url)
try:
response_json = json.loads(r.text)
except (ValueError, KeyError, TypeError... | mehta-a/FacebookDataExtraction | src/extract.py | extract.py | py | 367 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "requests.get",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pprint.pprint",
"line_number": 17,
"usage_type": "call"
}
] |
39627561667 | import time
import json
import math
import csv
import serial # conda install pyserial
import sys
import glob
# pygame needs python 3.6, not available for 3.7
import pygame # conda install -c cogsci pygame; maybe because it only is supplied for earlier python, might need conda install -c evindunn pygame ; sudo apt-get i... | SensorsINI/DeltaGRU-cartpole | cartpole_robot/python_controller/control.py | control.py | py | 19,414 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sys.platform.startswith",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "sys.platform",
"line_number": 50,
"usage_type": "attribute"
},
{
"api_name": "sys.platform.startswith",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "sys... |
12066160544 | import enum
from typing import Dict, List, Tuple
# --------------------------
# Basic (string, float, int)
# --------------------------
name: str = "Tay May"
weight: float = 60.2
age: int = 16
print(name)
print(weight)
print(age)
# --------------------------
# List
# --------------------------
thanhvien_cs102: List[... | Greninja2021/Steam2022 | Lesson_1_CS102-CrazyRobot/example_typing.py | example_typing.py | py | 1,344 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "typing.List",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "typing.Tuple",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "typing.Dict",
"line_number": 34,
"usage_type": "name"
},
{
"api_name": "enum.Enum",
"line_number": 4... |
30347048151 | #from exam_word import word_04
from .exam_func import TEST, MEAN,EXAMPLE, EXAMPLE_test, SIMILAR
import json
from collections import OrderedDict
from .W2V_word import W2V
import random
# word = word_04
def REMOVE(st):
row = ' '.join(s for s in st)
remove = "}"
for x in range(len(remove)):
row1 = row.... | GeulNoon/server | geulnoon/Word/test04.py | test04.py | py | 1,699 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "exam_func.TEST",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "exam_func.MEAN",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "W2V_word.W2V",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "exam_func.TEST",
"line... |
40327669141 | from easy_pyechart import _funnel_base_config, constants
from pyecharts import options as opts
from pyecharts.commons.utils import JsCode
from typing import Any, Optional
from pyecharts.charts import Funnel
import os
import sys
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
'''漏斗图'''
c... | jayz2017/easy_pyechart.py | easy_pyechart/easy_funnel.py | easy_funnel.py | py | 1,050 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "sys.path.append",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number... |
44284258376 | import sys, dpkt, socket
from dpkt.compat import compat_ord
class Statistics: #Statistic Class: Used just to store global stats of the following info
connCount = 0
rstCount = 0
openCount = 0
closeCount = 0
duration = 0
minDuration = 0
meanDuration = 0
maxDuratio... | dmahw/CSC_361_TCPTrafficAnalysis | TCPTrafficAnalysis.py | TCPTrafficAnalysis.py | py | 17,576 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "dpkt.compat.compat_ord",
"line_number": 121,
"usage_type": "call"
},
{
"api_name": "socket.inet_ntop",
"line_number": 124,
"usage_type": "call"
},
{
"api_name": "socket.AF_INET",
"line_number": 124,
"usage_type": "attribute"
},
{
"api_name": "sys.ar... |
39468004248 |
__doc__ = "this module contains varoous tools"
from datetime import date, datetime
# built in modules:
# import sys
# import os
# modules from pypi (install using `pip install module_name`)
# paramiko
# requests
def input_int(num_range: tuple):
"""
`range`: tuple like (from, to)
"""
frm, to = num_r... | MrPupik/python-examples | zero_to_hero/tools.py | tools.py | py | 753 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "datetime.datetime.now",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 32,
"usage_type": "name"
}
] |
27516705586 | from typing import Literal
ver_num = "3.2.2"
online_message = "Oh no, pas encore..."
mods = {}
def enable_module(mod):
mods[mod] = "✅"
def disable_module(mod):
mods[mod] = "❌"
def get_modules():
return mods
ban_domain = ["twitter", "deezer", "spotify"]
values = Literal[1, 2, 3, 4, 5, 6, 7... | Tintin361/Kiri-Chan | tools/variables.py | variables.py | py | 2,005 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.Literal",
"line_number": 19,
"usage_type": "name"
}
] |
44091065220 | import os
import gc
import re
import sys
import copy
import time
import random
import tempfile
import logging
import cPickle as cp
import multiprocessing
import subprocess
import deepity
import numpy as np
import numpy.random as npr
import smat as sm
import scipy
import scipy.stats
from . import std
from . impor... | jisraeli/DeepBind | code/libs/deepity/deepity/hypertrain.py | hypertrain.py | py | 25,376 | python | en | code | 85 | github-code | 6 | [
{
"api_name": "copy.deepcopy",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "copy.deepcopy",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "copy.deepcopy",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_numb... |
26529063971 | from copy import deepcopy
from flask import abort
from flask import Blueprint
from flask import request
from flask_api import status
from oneview_redfish_toolkit.api.event import Event
from oneview_redfish_toolkit.api.event_service import EventService
from oneview_redfish_toolkit.blueprints.util.response_builder impor... | HewlettPackard/oneview-redfish-toolkit | oneview_redfish_toolkit/blueprints/event_service.py | event_service.py | py | 3,130 | python | en | code | 16 | github-code | 6 | [
{
"api_name": "flask.Blueprint",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "oneview_redfish_toolkit.api.event_service.EventService",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "oneview_redfish_toolkit.util.get_delivery_retry_attempts",
"line_numbe... |
27277101793 | from flask import Flask, redirect, render_template, request, url_for, session, flash
import sqlite3
import random
import datetime
import smtplib
from email.mime.text import MIMEText
# sqlite3 connection
conn = sqlite3.connect('mydatabase.db')
cursor = conn.cursor()
cursor.execute('''
CREATE TABLE IF NOT EXISTS us... | Jordan1570/ID-proj | app.py | app.py | py | 7,120 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sqlite3.connect",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "flask.request.method",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
... |
10247855105 | #-*- coding: utf-8 -*-
from itertools import chain
from os.path import dirname, splitext
from sys import platform
from typing import Dict, List, Set, Union
from backend.converters import FileConverter, rar_executables
from backend.db import get_db
from backend.files import scan_files
from backend.volumes import Volum... | Casvt/Kapowarr | backend/conversion.py | conversion.py | py | 5,191 | python | en | code | 221 | github-code | 6 | [
{
"api_name": "typing.Dict",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "backend.converters.FileConverter",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "backend.converters.FileConverter.__subclasses__",
"line_number": 15,
"usage_type": "call"
... |
2001310411 | # -*- coding: utf-8 -*-
from django.db import models
from django.conf import settings
from .base import BaseModel
from .user_group import UserGroup
class Event(BaseModel):
TYPE_1, TYPE_2 = xrange(2)
SOURCE_GROUP, SOURCE_INDIVIDUAL = xrange(2)
EVENT_TYPES = (
(TYPE_1, 'Collecting'),
(TYPE... | luhonghai/expense | expense/apps/mobile_api/models/event.py | event.py | py | 2,818 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "base.BaseModel",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "django.db.models.ForeignKey",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "user_group.UserGroup",
"line_number": 24,
"usage_type": "argument"
},
{
"api_name": "dj... |
34832289590 | import cv2
import numpy as np
cap = cv2.VideoCapture(0) #取得視訊鏡頭的畫面
#不同顏色的筆
pen_color_HSV = [[86, 121, 205, 111, 245, 255],
[46, 78, 172, 71, 255, 255],
[22, 70, 214, 31, 255, 255]
]
#不同顏色的筆對應的筆尖
pen_color_BGR = [[255, 0, 0],
[0, 255, 0],
... | jim2832/Image-Recognition | virtual_pen.py | virtual_pen.py | py | 2,304 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2HSV",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "numpy.array",
... |
2103471277 | import numpy as np
import pandas as pd
from sklearn.preprocessing import OneHotEncoder
from sklearn.model_selection import train_test_split
import matplotlib.pyplot as plt
import seaborn as sns
plt.rcParams['pdf.fonttype'] = 42
plt.rcParams['ps.fonttype'] = 42
sns.set_context(rc={'figure.figsize': (9, 9)}, font_scale=2... | IBM/sensitive-subspace-robustness | utils.py | utils.py | py | 7,600 | python | en | code | 13 | github-code | 6 | [
{
"api_name": "matplotlib.pyplot.rcParams",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.rcParams",
"line_number": 8,
"usage_type": "attribute"
},
{
"ap... |
24746745289 | # -*- coding: utf-8 -*-
import json
import urllib
from django.contrib import auth
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.conf import settings
from common import utils, page
from www.misc... | lantianlz/zx | www/admin/views_topic.py | views_topic.py | py | 4,554 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "www.question.models.Topic.state_choices",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "www.question.models.Topic",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "django.shortcuts.render_to_response",
"line_number": 22,
"usage_ty... |
15038954927 | import tkinter
from PIL import Image
import time
import pygame
# Ссылка на гугл диск, на котором файл с музыкой. Он не прошла по размеру на github. https://drive.google.com/drive/folders/1RzTOtOH4LLt6UE6C6TCYG-0Quf38lkTE
pygame.init()
pygame.mixer.music.load("music.wav")
pygame.mixer.music.play(-1)
def game()... | PashaSeleznev/Lab_4 | main.py | main.py | py | 2,652 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pygame.init",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pygame.mixer.music.load",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pygame.mixer",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "pygame.mixer.music... |
40534220786 | from dataclasses import dataclass, field
from typing import List
from frater.component import ComponentState, IOComponent, IOComponentConfig, ComponentBuilder
from frater.stream import InputStream, OutputStream, StreamConfig, StreamState
@dataclass
class SummationComponentState(ComponentState):
total: int = 0
... | Frater-SDK/frater | docs/source/getting_started/examples/io_component_example.py | io_component_example.py | py | 1,530 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "frater.component.ComponentState",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "dataclasses.dataclass",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "frater.component.IOComponent",
"line_number": 13,
"usage_type": "name"
},
{
"... |
20674612571 | import logging
import sys
from tracker import LogawareMixin, getenv_or_fail
from tracker.fetch.online import JsonEndpointFetcher
from tracker.metadata.retriever import LiftMetadataRetriever
from tracker.metadata.store import LiftMetadataDatabaseRecorder
class LiftMetadataInserter(LogawareMixin):
def __init__(sel... | dachrisch/dolomiti-lift-queue | tracker/metadata/insert.py | insert.py | py | 1,298 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "tracker.LogawareMixin",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "tracker.metadata.retriever.LiftMetadataRetriever",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "tracker.metadata.store.LiftMetadataDatabaseRecorder",
"line_number": 1... |
10649208417 | """
Example
Description: Showcasing the use of Example Images from 'Images.py'
"""
from IMAGES import *
import pygame,sys
pygame.init()
w,h = (1920,1080)
win = pygame.display.set_mode([w,h])
img1 = Rock((255,255,255),(0,0))
img2 = Testing((255,255,255),(0,0))
while True:
for e in pygame.event.get():
if e... | LandenTy/GeometricEngine | CustomTexturer/Example Images/Example.py | Example.py | py | 487 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pygame.init",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "pygame.event.g... |
34673770578 | import typed_args as ta
from typing import List, Callable
@ta.argument_parser()
class Args(ta.TypedArgs):
"""
Process some integers.
"""
integers: List[int] = ta.add_argument(
metavar='N', type=int, nargs='+',
# help='an integer for the accumulator'
)
"""
an integer for th... | SunDoge/typed-args | examples/prog.py | prog.py | py | 611 | python | en | code | 11 | github-code | 6 | [
{
"api_name": "typed_args.TypedArgs",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "typing.List",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "typed_args.add_argument",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "typing.C... |
44313582014 | from tkinter import *
import sqlite3
from PIL import ImageTk, Image
from backend import Database
import requests
database=Database("books.db")
class Window(object):
def __init__(self,window):
self.window=window
self.window.title("Bookstore")
self.window.configure(bg='#856ff8')
#T... | mertwithamouth/Py_Projects | Book Store/bookstore.py | bookstore.py | py | 5,422 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "backend.Database",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 116,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 116,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_n... |
74874759867 | import sys
import os
import argparse
from pypiscout.SCout_Logger import Logger as sc
import gprof2dot # pylint: disable=unused-import
# Rationale: Not directly used, but later we do a sys-call wich needs the library. This is needed to inform the user to install the package.
sys.path.append("../... | bmwcarit/Emma | genDoc/genReadmeHtmlFromMd.py | genReadmeHtmlFromMd.py | py | 6,000 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "sys.path.append",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "argparse.Argument... |
24168954856 | import asyncio
import importlib
import re
from contextlib import closing, suppress
from uvloop import install
from pyrogram import filters, idle
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, Message
from Yukinon.menu import *
from Yukinon import *
from Yukinon.plugins import ALL_MODULES
from Yu... | TechShreyash/Yukinon_Robot | Yukinon/__main__.py | __main__.py | py | 13,537 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "asyncio.get_event_loop",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "lang.get_command",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "lang.get_command",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "Yukinon.plug... |
21124445086 | import linecache
import math
import os
# numpy and revise it with numpy
# multiple sets of 100 test cases
# cosine similarity
# 100 test cases for sum squared errors
# 100 test cases for Average
# small standard deviation -> good prediction
# smaller mean -> the better -> (mean = better prediction)
# transpose m... | R3xKyle-CP/cpe400 | jester/prediction2.py | prediction2.py | py | 12,781 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "linecache.getline",
"line_number": 65,
"usage_type": "call"
},
{
"api_name": "linecache.getline",
"line_number": 78,
"usage_type": "call"
},
{
"api_name": "linecache.getline",
"line_number": 93,
"usage_type": "call"
},
{
"api_name": "linecache.getli... |
1909503331 | import unittest
import mock
from hpOneView.connection import connection
from hpOneView.resources.networking.sas_logical_interconnects import SasLogicalInterconnects
from hpOneView.resources.resource import ResourceClient
class SasLogicalInterconnectsTest(unittest.TestCase):
def setUp(self):
self.host = '... | HewlettPackard/python-hpOneView | tests/unit/resources/networking/test_sas_logical_interconnects.py | test_sas_logical_interconnects.py | py | 5,962 | python | en | code | 86 | github-code | 6 | [
{
"api_name": "unittest.TestCase",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "hpOneView.connection.connection",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "hpOneView.resources.networking.sas_logical_interconnects.SasLogicalInterconnects",
"lin... |
21917306491 | from django.shortcuts import render, redirect
from .models import *
from hashlib import sha1
from django.http import JsonResponse, HttpResponseRedirect
from . import user_decorator
from df_goods.models import *
def register(request):
return render(request, 'df_user/register.html')
def register_handle(request):
... | junjie0825/dailyfresh | dailyfresh/df_user/views.py | views.py | py | 4,210 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.shortcuts.render",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.redirect",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "hashlib.sha1",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "django... |
20398018702 | import wx
[wxID_NUMBERINGPANEL, wxID_NUMBERINGPANELALPHA, wxID_NUMBERINGPANELALPHA_PAD,
wxID_NUMBERINGPANELALPHA_UC, wxID_NUMBERINGPANELASC,
wxID_NUMBERINGPANELCOUNT, wxID_NUMBERINGPANELCOUNTBYDIR,
wxID_NUMBERINGPANELDESC, wxID_NUMBERINGPANELDIGIT,
wxID_NUMBERINGPANELDIGIT_AUTOPAD, wxID_NUMBERINGPANELDIGIT_PAD,
w... | metamorphose/metamorphose1 | numbering.py | numbering.py | py | 25,919 | python | en | code | 7 | github-code | 6 | [
{
"api_name": "wx.NewId",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "wx.Panel",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "wx.BoxSizer",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "wx.HORIZONTAL",
"line_number":... |
27672728231 | from typing import Optional
import torch
from torch import nn
from config import dt_config
from block import TransformerBlock
class DecisionTransformer(nn.Module):
def __init__(self,
cfg: dt_config,
state_dim: int,
action_dim: int) -> None:
super().__init... | zzmtsvv/rl_task | decision_transformer/model.py | model.py | py | 3,401 | python | en | code | 8 | github-code | 6 | [
{
"api_name": "torch.nn.Module",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "config.dt_config",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "torch.nn.Dropout",
"... |
25328118850 | import cv2
import numpy as np
from scipy.spatial import cKDTree
from sklearn.decomposition import PCA
def sample_to_heatmap(points, x_adjust=0, y_adjust=0, z_threshold=None, nearest_k=3):
# If a threshold is provided, keep only points with a z-coordinate above this threshold
if z_threshold is not None:
... | jichengzhi/cube-sampling | heatmap.py | heatmap.py | py | 2,657 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sklearn.decomposition.PCA",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.mean",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.min",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "numpy.max",
"line_... |
20801228142 | from itertools import chain
y, x = [int(i) for i in input().split()]
matrix = [[] for _ in range(y)]
for i in range(y):
s = input()
for u in s:
if u == ".":
matrix[i].append(True)
elif u == "#":
matrix[i].append(False)
def step(y, x, matrix):
matrix[y][x] = True
... | michbogos/olymp | eolymp/dynamic_programming/cut_paper.py | cut_paper.py | py | 915 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "itertools.chain.from_iterable",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "itertools.chain",
"line_number": 35,
"usage_type": "name"
}
] |
21987190006 | import pytest
@pytest.fixture(name="fixer")
def fixer_fixture(two_to_three_test_case):
return two_to_three_test_case("methodattrs")
attrs = ["func", "self", "class"]
def test(fixer):
for attr in attrs:
b = "a.im_%s" % attr
if attr == "class":
a = "a.__self__.__class__"
... | ryanwersal/crosswind | fixer_suites/two_to_three/tests/test_methodattrs.py | test_methodattrs.py | py | 847 | python | en | code | 11 | github-code | 6 | [
{
"api_name": "pytest.fixture",
"line_number": 4,
"usage_type": "call"
}
] |
27104562564 | import os
import pickle
import uvicorn
from fastapi import FastAPI
FAKE_HASH_TABLE_DB = './database/FakeHashTable.pickle'
class FakeHashTable:
def __init__(self, bit_limitation=10):
self.limitation = 2 ** bit_limitation
self.hashtable = dict()
self.id_list = set()
self.history = ... | hoangperry/system-design-implementation | unique-id-generator/hash_service.py | hash_service.py | py | 2,812 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "pickle.dump",
"line_number": 69,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 74,
"usage_type": "call"
},
{
"api_name": "fastapi.FastAPI",
"line_number": 78,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_nu... |
6673888762 | import bs4
import requests
url = 'https://id.carousell.com/carousell_id'
contents = requests.get(url)
response = bs4.BeautifulSoup(contents.text, 'html.parser')
data = response.find('div', attrs={'class': 'D_apq D_eZ M_gF D_fb M_gH'})
datas = data.findAll('div', attrs={'class': 'D_jg', 'class': 'D_qq', 'class': '... | AlfaRiza/ScrapingCarousell | getImg.py | getImg.py | py | 748 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.get",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 22,
"usage_type": "call"
}
] |
1798043180 | import time
import json
import board
import busio
import adafruit_ads1x15.ads1015 as ADS
from adafruit_ads1x15.analog_in import AnalogIn
max_val = None
min_val = None
# Create the I2C bus
i2c = busio.I2C(board.SCL, board.SDA)
# Create the ADC object using the I2C bus
ads = ADS.ADS1015(i2c)
# Create single-ended input ... | pdany1116/is-iot-collector | helpers/light_intensity_moisture_calibration.py | light_intensity_moisture_calibration.py | py | 1,305 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "busio.I2C",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "board.SCL",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "board.SDA",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "adafruit_ads1x15.ads1015.ADS1... |
2374031473 | from torchvision import models
import torch
import torch.nn as nn
from PIL import ImageGrab
import cv2
import torch.nn.functional as F
# import albumentations as A
# from albumentations.pytorch import ToTensorV2
from torchvision import transforms
import numpy as np
from PIL import Image
from input_keys import PressKey,... | DH-an/Metaverse_Autonomous_Driving_AI_Project | Data_Collecting/ingame_testing.py | ingame_testing.py | py | 3,032 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "torchvision.transforms.Compose",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "torchvision.transforms",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "torchvision.transforms.Resize",
"line_number": 30,
"usage_type": "call"
},
{
... |
43166848463 | '''A simple blockchain implementation.
Inspired by https://medium.com/crypto-currently/lets-build-the-tiniest-blockchain-e70965a248b'''
from __future__ import print_function
import hashlib
import datetime
class Block:
'''Blocks of data that will create the Blockchain'''
def __init__(self, index, timestamp, da... | William-Hill/UVI_Teaching_2018 | blockchain/cruzan_coin.py | cruzan_coin.py | py | 1,722 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "hashlib.sha256",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "datetime.... |
36388169565 | from fastapi import APIRouter
from api.docker.models import DockerStatsModel
from api.docker.retrieval import get_container_stats, ping_docker
router = APIRouter(
prefix="/docker",
tags=["Docker"],
)
@router.get("/", tags=["Ping"])
def get_docker_health():
status = ping_docker()
return {"status": "o... | noahtigner/homelab | api/docker/router.py | router.py | py | 462 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "fastapi.APIRouter",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "api.docker.retrieval.ping_docker",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "api.docker.retrieval.get_container_stats",
"line_number": 20,
"usage_type": "call"
},... |
6969826416 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import torch
class EMA_FM():
def __init__(self, decay=0.9, first_decay=0.0, channel_size=512, f_map_size=196, is_use = False):
self.decay = decay
self.first_decay = first_decay
self.is_use = is_use
self.shadow = {}
... | ada-shen/icCNN | utils/utils.py | utils.py | py | 4,582 | python | en | code | 18 | github-code | 6 | [
{
"api_name": "torch.zeros",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "torch.float",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "torch.ones",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "torch.float",
"line_numbe... |
71601955069 | import datetime
dogdict = {
"american staffordshire terrier": True,
"pitbull terrier": True,
"bullterrier": True,
"bullmastiff": True,
"staffordshire bullterrier": True,
"cane corso": True,
"dogo argentino": True,
"bordeaux dogge": True,
"fila brasileiro": True,
"mastin espanol"... | MHin504/OZG-Hundesteuer | Server.py | Server.py | py | 4,498 | python | de | code | 0 | github-code | 6 | [
{
"api_name": "datetime.date",
"line_number": 103,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 106,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 106,
"usage_type": "attribute"
},
{
"api_name": "da... |
72779432828 | import requests
import optparse
from progressbar import *
CHUNK_SIZE = 1024
widgets = ['Downloading : ', Percentage(),
' ', Bar(marker='#',left='[',right=']'),
' ', ETA(), ' ', FileTransferSpeed()]
def download_file(url, file_name=None):
response = requests.head(url)
total_size = int(... | bitst0rm/video-stream-downloader | vid_single.py | vid_single.py | py | 1,158 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.head",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "optparse.OptionParser",
"line_number": 38,
"usage_type": "call"
}
] |
24966970253 | #!/usr/bin/env python
from netCDF4 import Dataset
import copyNCVariable as copync
import sys, os
import random
import pdb
import numpy as np
import datetime as dt
#
#
#
def usage():
print("Usage")
print(" "+sys.argv[0]+" [filename] [dim name]")
exit(1)
def change_time_units(var):
"""Change the ti... | NCAR/rda-dataset-curation | common/removeDimension.py | removeDimension.py | py | 8,646 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "sys.argv",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.utcfromtimestamp",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "da... |
25377227491 | import profile
from django.urls import path
from . import views
from django.conf import settings
from django.conf.urls.static import static
from django.contrib.auth import views as auth_views
from .views import PostListView,PostDetailView,PostCreateView,PostUpdateView, PostDeleteView, ProfileView, AddFollower,RemoveFol... | Njoro410/Insta-clone | insta/urls.py | urls.py | py | 1,566 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.urls.path",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "views.index",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "django.urls.path",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "views.ProfileView.... |
40026671586 | import requests
from lxml import etree
BASE_DOMIN = 'https://ygdy8.net'
URL = []
HEADERS = {
'Referer': 'https://c.02kdid.com/b/1/1754/22432/960X90/960X90.html',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36'
}
def get_detai... | mirrorthink/python | douban/douban.py | douban.py | py | 2,668 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.get",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "lxml.etree.HTML",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "lxml.etree",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_numb... |
39746911520 | import threading
from flask import jsonify
from dophon_cloud import enhance, micro_cell_list
a = enhance(import_name=__name__,
properties={'111': 'aaa', 'service_name': 'dxh-service', 'host': '0.0.0.0', 'port': 80,
'reg_url': 'http://127.0.0.1:8301/reg/service/'})
m_c_list = micr... | Ca11MeE/dophon_cloud | dophon_cloud/a_test.py | a_test.py | py | 912 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "dophon_cloud.enhance",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "dophon_cloud.micro_cell_list",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask.jsonify",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "flask.... |
18842905496 | import logging
try:
from settings import DEBUG
except ImportError:
DEBUG = True
from raven.handlers.logging import SentryHandler
from clean.infra.log.utils.colors import color_style
class RequireDebugFalse(logging.Filter):
def filter(self, record):
return not DEBUG
class RequireDebugTrue(logging... | bahnlink/pyclean | clean/infra/log/utils/__init__.py | __init__.py | py | 1,182 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "settings.DEBUG",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "logging.Filter",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "settings.DEBUG",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "logging.Filter",
... |
18672735980 | import numpy as np
import pickle
import scipy.signal as sp
import matplotlib.pyplot as plt
with open('datasave', 'rb') as file:
datasym =pickle.load(file)
dataf = np.zeros((91, 1024, 1024))
ref = np.mean(datasym[:17, :, :],axis=0)
for z1 in range(1024):
for z2 in range(1024):
value1 =datasym[30:121, z1,... | jialanxin/UED-Analysis | load.py | load.py | py | 615 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pickle.load",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numpy.mean",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.multiply",
"line_number": 1... |
43918816491 | from cleverhans.attacks import CarliniWagnerL2
from tools.cleverhans.adversarial_attack import AdversarialAttack
class CarliniWagnerAttack(AdversarialAttack):
def __init__(self, model, targeted=False, confidence=0, batch_size=1, learning_rate=5e-3, binary_search_steps=5,
max_iterations=1000, abo... | GianmarcoMidena/adversarial-ML-benchmarker | tools/cleverhans/carlini_wagner_attack.py | carlini_wagner_attack.py | py | 1,845 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "tools.cleverhans.adversarial_attack.AdversarialAttack",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "cleverhans.attacks.CarliniWagnerL2",
"line_number": 20,
"usage_type": "call"
}
] |
33272740574 | from random import random
import numpy
from copy import deepcopy
from texttable import Texttable
class Ant:
def __init__(self, size):
self._size = size
self._representation = [[] for i in range(size * 2)]
self._graph = [self._representation]
self._freeSpots = size - ... | CMihai998/Artificial-Intelligence | Lab4 - ACO/models/ant.py | ant.py | py | 5,321 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "copy.deepcopy",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "copy.deepcopy",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "numpy.random.choice",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"l... |
22666826531 | from torchmetrics import Accuracy, F1Score, Precision, Recall, AUROC
class Configs:
def __init__(self, dataset="EMG"):
# preprocess configs
if dataset == "EMG":
self.dataset_config = EMGGestureConfig()
elif dataset == "NINA":
self.dataset_config = NinaproDB5Config()... | 3rd-Musketeer/UAF-PyTorch | configs/TSTCC_configs.py | TSTCC_configs.py | py | 4,479 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "torchmetrics.Accuracy",
"line_number": 101,
"usage_type": "call"
},
{
"api_name": "torchmetrics.F1Score",
"line_number": 106,
"usage_type": "call"
},
{
"api_name": "torchmetrics.Precision",
"line_number": 111,
"usage_type": "call"
},
{
"api_name": "... |
14807523398 | import multiprocessing
import time
import os
'''
import os
print("work进程编号",os.getpid())
'''
def dance(nums,names):
print("dance进程id:"+str(os.getpid()))
print("dance父进程id:"+str(os.getppid()))
for i in range(nums):
print(names+"跳舞")
time.sleep(0.5)
def sing(nums,names):
print("sing进程i... | kids0cn/leetcode | Python语法/python多线程多进程/3.获取进程编号.py | 3.获取进程编号.py | py | 808 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.getpid",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.getppid",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.getpid",
"line_number": 19,
... |
23399964442 | import nextcord
from nextcord.ext import commands, application_checks
from nextcord import Interaction, SlashOption
from config.config_handler import ConfigHandler
from middlewares.server_verification import ServerVerification
from components.modals.nuke_model import NukeModel
from middlewares.bot_permissions i... | Worcer/ASF | amanecer sin fronteras/src/commands/raid/nuke.py | nuke.py | py | 1,639 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "nextcord.ext.commands.Cog",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "nextcord.ext.commands",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "config.config_handler.ConfigHandler",
"line_number": 13,
"usage_type": "call"
},
... |
70279501309 | import os
import six
import logging
from django.utils import timezone
logger = logging.getLogger(__name__)
def queryset_csv_export(qs, fields, cache_funcs=None, filepath=None, fileobj=None, delimiter='|'):
import csv
import inspect
from django.db.models.query import QuerySet
if not filepath:
... | mirusresearch/mirus_django_csv | mirus_django_csv.py | mirus_django_csv.py | py | 4,477 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "os.path.exists",
"l... |
4272453202 |
from django.shortcuts import render, get_object_or_404
from django.http import JsonResponse
from .models import Pokemon
def pokemon_list(request):
pokemon = Pokemon.objects.all()
data = {"results": list(pokemon.values(
"name",
"apiId",
"chainId",
"healtPoint",
"attack"... | hitolv4/poketest | pokemon/views.py | views.py | py | 1,667 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "models.Pokemon.objects.all",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "models.Pokemon.objects",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "models.Pokemon",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "dj... |
38390581306 | import logging
from queue import Queue
from logging.handlers import QueueListener, QueueHandler, RotatingFileHandler
from contextlib import contextmanager
from django.conf import settings
@contextmanager
def prepare_background_logging(log_path):
logger = logging.getLogger()
logger.handlers = []
log_queue ... | Shvidkiy-Dima/checker | background_service/utils.py | utils.py | py | 1,090 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "queue.Queue",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "logging.handlers.QueueHandler",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "logging.I... |
8214750417 | from flask import request
from flask_restx import Resource, Namespace, abort
from marshmallow import ValidationError
from implemented import user_service
from tools.jwt_token import JwtSchema, JwtToken
from views.users import LoginValidator
auth_ns = Namespace('auth')
@auth_ns.route('/')
class AuthView(Resource):
... | Mariyatm/-lesson19_project_hard_source | views/auth.py | auth.py | py | 1,256 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask_restx.Namespace",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask_restx.Resource",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "views.users.LoginValidator",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "... |
75066299708 | import argparse
def parse_args():
# description
parser = argparse.ArgumentParser(
description='Compares two configuration files and shows a difference.')
# positional arguments:
parser.add_argument('first_file')
parser.add_argument('second_file')
# optional arguments:
parser.add_... | slovohot/python-project-50 | gendiff/logic/argparser.py | argparser.py | py | 620 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 6,
"usage_type": "call"
}
] |
25006136605 | from typing import TYPE_CHECKING, List, NamedTuple, Optional
import boto3
if TYPE_CHECKING:
from mypy_boto3_ec2.type_defs import FilterTypeDef
from typing_extensions import TypedDict
from aec.util.config import Config
class Image(TypedDict, total=False):
Name: Optional[str]
ImageId: str
CreationDa... | DENE-dev/dene-dev | RQ1-data/exp2/552-seek-oss@aec-dc5825f8ca2f88df7f4eba38362ffbcf90bf17bb/src/aec/command/ami.py | ami.py | py | 4,241 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "typing_extensions.TypedDict",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "typin... |
19303998344 | # -*- coding: utf-8 -*-
import pygame, os, sys
import pygame_functions as pyf
import constants as c
import time
import shuffle
import bfs
import dfs
import it_dfs
import a_star
import utils
class Game_Interface:
def __init__(self, nmax, filename):
# Variaveis de Controle
self.nmax = nmax
se... | pHgon/8Puzzle-FIA | Interface/main.py | main.py | py | 13,432 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "shuffle.Shuffle",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "constants.IMAGE_SIZE",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "pygame_functions.screenSize",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": ... |
2542885352 | from os import path
import warnings
import copy
import cv2
from PIL import Image
from infy_field_extractor.internal.constants import Constants
class ExtractorHelper():
"""Helper class for data extraction"""
@staticmethod
def extract_with_text_coordinates(
image, bboxes_text, get_text_provider,... | Infosys/Document-Extraction-Libraries | infy_field_extractor/src/infy_field_extractor/internal/extractor_helper.py | extractor_helper.py | py | 26,643 | python | en | code | 6 | github-code | 6 | [
{
"api_name": "infy_field_extractor.internal.constants.Constants.BB_Y",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name": "infy_field_extractor.internal.constants.Constants",
"line_number": 36,
"usage_type": "name"
},
{
"api_name": "infy_field_extractor.internal.const... |
23158389057 | import os
import argparse
import torch
from torchvision import datasets, transforms
from torch.utils.data.sampler import WeightedRandomSampler
from sklearn.model_selection import train_test_split
from collections import Counter
import numpy as np
# Transform and to normalize the data [0.0, 1.0]
transform_train = trans... | minkeshtu/Imbalanced-Cifar-10-classification | dataset/cifar10Loader.py | cifar10Loader.py | py | 8,218 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "torchvision.transforms.Compose",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "torchvision.transforms",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "torchvision.transforms.RandomCrop",
"line_number": 12,
"usage_type": "call"
},
... |
26889276534 | import torch
def iou_score(output, target):
smooth = 1e-5
if torch.is_tensor(output):
output = torch.sigmoid(output).data.cpu().numpy()
if torch.is_tensor(target):
target = target.data.cpu().numpy()
output_ = output > 0.5
target_ = target > 0.5
intersection = (output_ & targe... | krishnakaushik25/Medical-Image-Segmentation-DL | modular_code/src/ML_Pipeline/iou.py | iou.py | py | 423 | python | en | code | 7 | github-code | 6 | [
{
"api_name": "torch.is_tensor",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "torch.sigmoid",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "torch.is_tensor",
"line_number": 10,
"usage_type": "call"
}
] |
72966516669 | # encoding=utf8
from Source import *
import logging,re,mylex
logging.basicConfig(format=' %(filename)s[line:%(lineno)d] %(levelname)s %(message)s',
datefmt='%a, %d %b %H:%M:%S',level=logging.DEBUG)
index=0
# token_stream="""INT IDENTIFIER '(' ')' '{' IDENTIFIER ';' IDENTIFIER '=' CONSTANT ';' WHI... | zhaoguoquan94/compiler_syntax_analysor | systax_analysisor.py | systax_analysisor.py | py | 4,919 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "logging.basicConfig",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "mylex.get_s",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "logging.error",
... |
1558159854 | from enum import IntEnum
SCALE_2X: bool = False
WORLD_SCALE: int = 32
OBJECT_SCALE: int = WORLD_SCALE // 2
SPRITE_SCALE: int = WORLD_SCALE * 2
ANIMATION_NUM_FRAMES: int = 4
RESOLUTION_X: int = WORLD_SCALE * 20
RESOLUTION_Y: int = int(RESOLUTION_X * 0.625) # 640x400 aspect ratio
SPRITE_CLOTHES_COLORS = ['#42200f',... | cgloeckner/prehistoric_guy | core/constants.py | constants.py | py | 713 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "enum.IntEnum",
"line_number": 21,
"usage_type": "name"
}
] |
27264929540 | #!/usr/bin/env python
# PYTHON_ARGCOMPLETE_OK
import argparse
import configparser
import json
import logging
import textwrap
import argcomplete
from las import Client, Credentials
from las.credentials import MissingCredentials, read_from_file
from .__version__ import __version__
from .util import NotProvided
from .p... | LucidtechAI/las-cli | lascli/__main__.py | __main__.py | py | 3,452 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentDefaultsHelpFormatter",
"line_number": 38,
"usage_type": "attribute"
},
{
"api_name": "textwrap.dedent",
"line_number": 39,
"usage_type": "call"
},
{
... |
36766531397 | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import os
import time
data = pd.read_csv('C:/Users/SwetaMankala/Desktop/Assignments/EAI6000/ma_statewide_2020_04_01.csv',low_memory= False)
data.head(10)
# Checking the shape of the data set
data.shape
data['location'].uni... | anirudh0809/fundamentals_of_ai | linear_models/eda.py | eda.py | py | 9,689 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.number",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "pandas.DataFrame",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pandas.Series",
... |
39509933349 | import argparse
from torch.nn import BatchNorm2d
from cifar.norm_layers import MyBatchNorm, BatchInstance, MyLayerNorm, MyGroupNorm, MyInstanceNorm
from cifar.dataset import get_data_loaders,get_default_device
from cifar.train import train
from cifar.model import MyResnet
# python3 train_cifar.py --normaliz... | aps1310/COL_870 | Assignment 1/2020MCS2448_2020MCS2468/train_cifar.py | train_cifar.py | py | 1,757 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "cifar.norm_layers.MyBatchNorm",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "cifar.norm_layers.MyInstanceNorm",
"line_number": 26,
"usage_type": "name"
},
{... |
40033915805 | #import necessary modules
import numpy as np
from numpy import load
from sklearn.model_selection import StratifiedKFold
from sklearn.svm import SVC
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import Normalizer, LabelEncoder, MinMaxScaler, StandardScaler
from sklearn.metrics import accur... | karth1ksr/Face-Recognition-with-Facenet | cross validation.py | cross validation.py | py | 1,907 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.load",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.StratifiedKFold",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.Normalizer",
"line_number": 26,
"usage_type": "call"
},
{
... |
35428261847 | """
This script detects laughter within all audio files contained in the directory
`root_dir/audio/raw`, and save one pickle file for each audio file with
laughter timecodes in the directory `root_dir/audio/laughter`.
"""
import argparse
import os
import os.path as osp
import pickle
from laughter_detection.core.laug... | robincourant/FunnyNet | laughter_detection/scripts/detect_laughters.py | detect_laughters.py | py | 1,990 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 51,
"usage_type": "name"
},
{
"api_name": "os.path.exists",
"li... |
11833093627 | import qrcode
from django.db import models
from django.utils.text import slugify
from django.utils.html import mark_safe
from cms.models import Title
from django.contrib.sites.models import Site
import uuid
class QrCodeUrlPost(models.Model):
TITLE_URLS = [(o.path, o.title) for o in Title.objects.filter(publisher_... | vazvieirafrederic67/qrCodePlugin | models.py | models.py | py | 1,878 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.db.models.Model",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "cms.models.Title.objects.filter",
"line_number": 11,
"usage_type": "call"
},
{
"api_... |
13006866992 | import numpy as np
import pandas as pd
import cv2
from PIL import Image
import joblib
import cv2
import numpy as np
import time
import pandas as pd
import imagehash
import multiprocessing as mp
import logging
import os
from dataclasses import dataclass, field
from typing import List, Dict
from slideext... | shex1627/slideextract | src/slideextract/slide_extractors/baseSlideExtractor.py | baseSlideExtractor.py | py | 4,003 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "slideextract.config.DATA_FILE_PATH",
"line_number": 42,
"usage_type": "argument"
},
{
"api_name": ... |
26869499538 |
from flask import Flask, redirect, request, session, Response, jsonify
from flask_login import LoginManager
from flask_mail import Mail
from myapp.models.base import db
# 初始化 Loginmanager
login_manager = LoginManager()
mail = Mail()
def create_app():
app = Flask(__name__)
app.config.from_object('myapp.secur... | 102244653/WebByFlask | myapp/__init__.py | __init__.py | py | 1,159 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask_login.LoginManager",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask_mail.Mail",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "myapp.models.base.... |
34105917071 | import cv2 as cv
import numpy as np
def diferenca():
captura = cv.VideoCapture(0)
while True:
ret, frame = captura.read()
frame = cv.cvtColor(frame, cv.COLOR_BGR2GRAY)
cv.imshow("Video", np.subtract(frame, quarto))
k = cv.waitKey(30) & 0xff
if k == 27:
br... | gabrielga-dev/visao-computacional-2022 | s6/main.py | main.py | py | 419 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "cv2.imshow",
... |
23856904095 | '''
Created by Han Xu
email:736946693@qq.com
'''
import xml.etree.ElementTree as ET
def read_configuration(xml_file):
# 解析 XML 文件
tree = ET.parse(xml_file)
root = tree.getroot()
# 获取camvid数据集路径
camvid_path = root.find('camvid_path').text
# 获取模型路径
HANet_oneHAM_path = root.find('HANet_oneH... | UnderTurrets/HeightDriven_DoubleAttentions_Net | conf/__init__.py | __init__.py | py | 1,167 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "xml.etree.ElementTree.parse",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "os.path.dirname",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "os.... |
40017294295 | import mysql.connector
import matplotlib.pyplot as plt
import argparse
import os
import random
import pandas as pd
import datetime
import numpy as np
from sklearn.decomposition import PCA
from sklearn.preprocessing import MinMaxScaler
def createDatabase(dataBase="smartBottle"):
"""连接数据库,创建database"""
mydb = mysql.c... | YuTheon/NUS_AIOT_web2 | setMysqlData.py | setMysqlData.py | py | 7,386 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "mysql.connector.connector.connect",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "mysql.connector.connector",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "mysql.connector",
"line_number": 15,
"usage_type": "name"
},
{
"... |
74535254588 | import seaborn as sns
from matplotlib import pyplot as plt
import tools
import numpy as np
import pandas as pd
def plot_missrate_comp():
processed_row = tools.load_pkl('outputs/feature_explore[ards@origin]/row_missrate.pkl').flatten()
processed_col = tools.load_pkl('outputs/feature_explore[ards@origin]/col_mis... | on1262/sepsisdataprocessing | test.py | test.py | py | 1,239 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "tools.load_pkl",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "tools.load_pkl",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "tools.load_pkl",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "tools.load_pkl",
"line... |
3989954821 | from typing import TYPE_CHECKING, Any, Dict, List, Self, Union, cast
from attrs import define as _attrs_define
from attrs import field as _attrs_field
from ..types import UNSET, Unset
if TYPE_CHECKING:
from ..schemas.deposit import Deposit
from ..schemas.recent_2_result_type_1 import Recent2ResultType1
@_a... | tlg7c5/kraken-connector | kraken_connector/schemas/recent_2.py | recent_2.py | py | 3,654 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "typing.Union",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "types.Unset",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "types.UNSET",
"line_... |
32661755491 | """
A basic CNN model
/**
* @author Xinping Wang
* @email [x.wang3@student.tue.nl]
* @create date 2021-09-11 09:32:41
* @modify date 2021-09-11 09:32:41
* @desc [description]
*/
"""
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torchvision
from torchvision... | CillianWang/ENN | Library/Models/CNN.py | CNN.py | py | 1,777 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "torch.nn.Module",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "torch.nn.Conv1d",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_nu... |
10623839028 | import random
from discord import Colour
"""
These are some presets configs, that are predefined
and normally dont need any changes (Thats why they are not in the config file
"""
bottest = True # decides if the bot checks other bots messages
ignorfiles = ['image/gif', 'image/jpeg'] # Content types to ignor. Check... | veni-vidi-code/VirusTotalDiscordBot | Cogs/settings.py | settings.py | py | 599 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "discord.Colour",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 18,
"usage_type": "call"
}
] |
72255274108 | from __future__ import annotations
import asyncio
import datetime
import time
from typing import TYPE_CHECKING, List, Optional, Tuple, Union
import asyncpg
import discord
from discord.ext import commands
from utils import (
AvatarsPageSource,
AvatarView,
FieldPageSource,
Pager,
format_bytes,
... | LeoCx1000/fish | src/cogs/discord_/user.py | user.py | py | 12,878 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "_base.CogBase",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "cogs.context.Context",
"line_number": 35,
"usage_type": "name"
},
{
"api_name": "typing.Option... |
40693675853 | import argparse
import glob
import os
import shutil
import subprocess # noqa: S404
import sys
from collections import namedtuple
from types import MappingProxyType
from typing import Iterable, List, Optional
HOST_BUILD_CTX = '/tmp/magma_orc8r_build' # noqa: S108
HOST_MAGMA_ROOT = '../../../.'
IMAGE_MAGMA_ROOT = os.p... | magma/magma | orc8r/cloud/docker/build.py | build.py | py | 10,627 | python | en | code | 1,605 | github-code | 6 | [
{
"api_name": "os.path.join",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "types.MappingProxyType",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "collections.namedtup... |
72532300669 | # pylint: disable=redefined-outer-name
# pylint: disable=unused-argument
import json
from pathlib import Path
from typing import Any, Iterable
from unittest.mock import AsyncMock, call
from uuid import UUID, uuid4
import pytest
from models_library.projects import NodesDict, ProjectID
from models_library.projects_netw... | ITISFoundation/osparc-simcore | services/director-v2/tests/unit/test_modules_project_networks.py | test_modules_project_networks.py | py | 7,545 | python | en | code | 35 | github-code | 6 | [
{
"api_name": "pydantic.BaseModel",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "typing.Any",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "typing.Any",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "pydantic.BaseModel",
"li... |
4452602501 | import os
import sys
import mock
import unittest
import pkg_resources
from pybkick.kick import kick, main as kick_main, MissingSourceCode
from pybkick.pyboard import Pyboard
class TestKick(unittest.TestCase):
"""Test that we can kick code over to the PyBoard
"""
def testBasicKick(self):
test_d... | salimfadhley/pybkick | src/pybkick_tests/test_kick.py | test_kick.py | py | 1,878 | python | en | code | 5 | github-code | 6 | [
{
"api_name": "unittest.TestCase",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "pkg_resources.resource_filename",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pybkick.kick.kick",
"line_number": 16,
"usage_type": "call"
},
{
"api_name"... |
13523037639 | from flask import Flask
import os.path
app = Flask(__name__)
@app.route("/")
def hello():
if os.path.exists('/volume/test'):
return "Hello from pvc!"
return "Hello World!"
if __name__ == "__main__":
app.run()
| prgcont/workshop-OKD | cz/lekce-2/demoapp/app.py | app.py | py | 236 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "os.path.path.exists",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "os.path",
"line_nu... |
13923936476 | import os
import random
from os import listdir
from os.path import splitext
from tqdm import tqdm
import numpy as np
import cv2
from utils.FileOperator import *
# img_tf_flip(r'E:\Project\Unet-vanilla\data\img_backup',r'E:\Project\Unet-vanilla\data\mask_backup')
# img_tf_flip(r'../data/backup/img', r'../data/backup... | ssocean/UNet-Binarization | utils/Augmentation.py | Augmentation.py | py | 2,259 | python | en | code | 4 | github-code | 6 | [
{
"api_name": "tqdm.tqdm",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "cv2.threshold",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "cv2.THRESH_BINARY",
"line_numb... |
34382591529 | from django.contrib import admin
app_name = 'admin'
# Register your models here.
#当前目录下models
from myapp.models import Grades, Students
#创建班级的时候同时创建2个学生
class StudentInfo(admin.TabularInline):
model = Students
extra = 2
@admin.register(Grades)
class GradesAdmin(admin.ModelAdmin):
inlines = [StudentInfo,]
... | pyslin/project01 | myapp/admin.py | admin.py | py | 1,071 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.contrib.admin.TabularInline",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "myapp.models.Students",
"line_number": 9,
"usage_type": "name"
},
{
"a... |
35987644586 |
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import argopandas as argo
wmos = [4902596, 4902597]
var_names = ['PRES', 'TEMP', 'PSAL', 'DOXY', 'CHLA', 'BBP700']
for wmo in wmos:
ix = argo.float(wmo).synthetic_prof
up = ix.subset_direction('asc')
down = ix.subset_directio... | cgrdn/argo-sci | src/pac-provor/initial_plot.py | initial_plot.py | py | 951 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "argopandas.float",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "seaborn... |
33689496961 | from string import ascii_lowercase
from behave import given, then
from toolium.utils.dataset import map_param
from common.utils import assert_arrays_equal, payload_to_table_format, replace_param
@given("there is {chore_types:d} chore type")
@given("there are {chore_types:d} chore types")
def step_create_chore_types... | sralloza/chore-management-api | test/steps/aliases/chore_types.py | chore_types.py | py | 1,503 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "string.ascii_lowercase",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "string.ascii_lowercase",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "common.utils.payload_to_table_format",
"line_number": 22,
"usage_type": "call"
},
{
... |
16708430730 | import networkx as nx
import matplotlib.pyplot as plt
import pandas as pd
# nodes=['A','B','C','D','E','F','1']
dataset = pd.read_csv("./topology.csv", header=None)
lenth = dataset.shape[0]
G=nx.Graph()
edges=[]
for i in range(lenth):
edges.append((dataset.values[i, 0], dataset.values[i, 1]))
r=G.... | GAVIN-YAN/FinTechauthon2022 | topology/topology.py | topology.py | py | 712 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "networkx.Graph",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "networkx.spring_layout",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "networkx.draw",
... |
43585654615 | """fitnesspro URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-ba... | sanjaymurali1910/fitnessclub | fitnesspro/urls.py | urls.py | py | 4,115 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.urls.re_path",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "django.contrib.admin.site",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 26,
"usage_type": "name"
},
{
"api_name"... |
72096598268 | import pygame
import random
import rospy
import math
from geometry_msgs.msg import TwistStamped
from geometry_msgs.msg import PoseStamped
from armf import armtakeoff
rospy.init_node('make_a_circle', anonymous=True)
current_pos = PoseStamped()
def main():
pygame.init()
screen = pygame.display.set_mode((640, 4... | DarkcrusherX/indoor_nav | src/transmitter.py | transmitter.py | py | 5,866 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "rospy.init_node",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "geometry_msgs.msg.PoseStamped",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pygame.init",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pygame.displ... |
6323653516 | import asyncio
from typing import *
from urllib.parse import urlencode
from datetime import datetime
from pprint import pformat as pf
import logging
logging.basicConfig(format='%(asctime)s %(message)s')
import jikanpy
from enum import Enum
from copy import copy, deepcopy
from pprint import pprint
import traceback
impo... | zp33dy/inu | inu/utils/rest/my_anime_list.py | my_anime_list.py | py | 6,129 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "logging.basicConfig",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "core.getLogger",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "enum.Enum",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "enum.Enum",
"line_num... |
26529327586 | #유기농 배추
from collections import deque
def bfs(x,y):
queue = deque()
queue.append((x,y))
graph[x][y] = 0
while queue:
x, y = queue.popleft()
for i in range(4):
nx = x + dx[i]
ny = y + dy[i]
if 0<=nx<n and 0<=ny<m and graph[nx][ny] == 1:
... | Jaeheon-So/baekjoon-algorithm | DFS, BFS/1012.py | 1012.py | py | 822 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "collections.deque",
"line_number": 4,
"usage_type": "call"
}
] |
18100605374 | """
https://leetcode.com/problems/maximum-ice-cream-bars/
1833. Maximum Ice Cream Bars
It is a sweltering summer day, and a boy wants to buy some ice cream bars.
At the store, there are n ice cream bars. You are given an array costs of length n, where costs[i] is the price of the ith ice cream bar in coins. The boy in... | hirotake111/leetcode_diary | leetcode/1833/solution.py | solution.py | py | 1,538 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.List",
"line_number": 14,
"usage_type": "name"
}
] |
41457482585 | from sqlite3 import IntegrityError, Connection
import schema
from flask import g
from flask import request
from flask import Blueprint
from flask.views import MethodView
from werkzeug.exceptions import abort
from flaskr import settings
from flaskr.utils.auth import login_required
from flaskr.utils.db import get_db, g... | MioYvo/unlimited-level-messages | backend/flaskr/views/post.py | post.py | py | 5,566 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Blueprint",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "flask.Blueprint",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "flask.Blueprint",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "flask.views.MethodVie... |
5026987486 | # -*- coding:utf-8 -*-
my_name = "分数"
import pygame
pygame.init()
my_font = pygame.font.SysFont("simSun", 66)
name_surface = my_font.render(u'分数', True, (0, 0, 0), (255, 255, 255))
pygame.image.save(name_surface, "name.png")
enemy_hit_dict = dict()
score = 0
ENEMY_SCORE = 100
# enemy_hit_dict = pygame.sprite.grou... | xinlongOB/python_docment | 飞机大战/字体.py | 字体.py | py | 737 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pygame.init",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pygame.font.SysFont",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pygame.font",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "pygame.image.save",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.