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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9084085834 | import os
import logging, requests
from rdflib import Namespace, Literal, Graph
from rdflib.namespace import DCTERMS, RDF, RDFS
from rdflib.plugins.stores.sparqlstore import SPARQLUpdateStore
from rdflib.graph import DATASET_DEFAULT_GRAPH_ID as default
from oslcapi.api.helpers.service_api import get_bucket
log = log... | AlexVaPe/pyOSLC_GCP | oslcapi/api/helpers/service_events.py | service_events.py | py | 2,832 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "rdflib.Namespace",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "rdflib.Namespace",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"... |
32005535437 | import yaml
import os
import logging
from weight import Weight
from schema import Schema, SchemaError, Optional
from typing import Union
_LOGGER = logging.getLogger(__name__)
_LOGGER.setLevel(logging.DEBUG)
class KB_Chaos:
def __init__(self, chaos_path):
self.chaos_path = chaos_path
self.last_cha... | Fengrui-Liu/MicroCBR | microCBR/kb.py | kb.py | py | 9,333 | python | en | code | 6 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.listdir",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_... |
25409835667 | import cv2
import numpy as np
# Load video
cap = cv2.VideoCapture('lift.mp4')
# Define output video properties
output_file = 'output.avi'
fourcc = cv2.VideoWriter_fourcc(*'XVID')
fps = cap.get(cv2.CAP_PROP_FPS)
frame_size = (int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)), int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT)))
# Create Vi... | taoofstefan/BB-Tracking | main.py | main.py | py | 2,502 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.VideoWriter_fourcc",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "cv2.CAP_PROP_FPS",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "cv2.CAP_P... |
73673851706 | import time
# from seleniumwire import webdriver
from selenium import webdriver
from selenium.webdriver.edge.service import Service
import requests
import datetime
import lib
from fake_useragent import UserAgent
from pyvirtualdisplay import Display
ua = UserAgent()
driver_path = lib.driver_path
ex_path = lib.ex_path... | YoimiyaInUSTC/WSJ-Crawler | driver_init.py | driver_init.py | py | 2,879 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "fake_useragent.UserAgent",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "lib.driver_path",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "lib.ex_path",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "seleni... |
18091305999 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('account', '0051_auto_20150130_1145'),
]
operations = [
migrations.AlterField(
model_name='basicmemberinformation... | hongdangodori/slehome | slehome/account/migrations/0052_auto_20150130_1145.py | 0052_auto_20150130_1145.py | py | 531 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.AlterField",
"line_number": 14,
"usage_type": "call"
},
{... |
22456923071 | from django.core import paginator
from django.shortcuts import render, redirect
from django.http import HttpResponse
from django.contrib.auth.decorators import login_required
from django.contrib import messages
from .models import *
from .forms import *
from reacts.forms import CommentForm
from .utils import searchTask... | Kyrillos1/Ekhdm | tasks/views.py | views.py | py | 3,892 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "django.http.HttpResponse",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "utils.searchTasks",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "utils.paginateTasks",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "django... |
4605424135 | import argparse
from spherenet import OmniMNIST, OmniFashionMNIST
from spherenet import SphereConv2D, SphereMaxPool2D
import torch
from torch import nn
import torch.nn.functional as F
import numpy as np
class SphereNet(nn.Module):
def __init__(self):
super(SphereNet, self).__init__()
self.conv1 = ... | ChiWeiHsiao/SphereNet-pytorch | example.py | example.py | py | 6,671 | python | en | code | 106 | github-code | 6 | [
{
"api_name": "torch.nn.Module",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "spherenet.SphereConv2D",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "spherenet.Sphere... |
35207313249 | import shutil
from PyQt5.QtCore import QPropertyAnimation, QEasingCurve
import sys
from PyQt5.QtWidgets import QSlider, QLabel
from PyQt5.QtGui import QFont
from PyQt5.QtCore import QSignalMapper
from classes.FrequencyDomain import *
from classes.TimeGraph import *
from collections import namedtuple
from Dialog import ... | Zoz-HF/Ikoraiza | main.py | main.py | py | 14,129 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "collections.namedtuple",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets.QMainWindow",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtWidgets.QMainWindow.__init__",
"line_number": 23,
"usage_type": "call"
},
... |
11036089604 | import wx
import MapDisplay
class MapPreviewDialog(wx.Dialog):
def __init__(self, parent, id, map):
wx.Dialog.__init__(self, parent, id, "iPhone Preview")
self.map = map
self.display = MapDisplay.MapDisplay(self, -1, map)
self.display.SetMinSize((480, 320))
sizer = wx.Bo... | sdetwiler/pammo | editor/source/MapPreviewDialog.py | MapPreviewDialog.py | py | 436 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "wx.Dialog",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "wx.Dialog.__init__",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "wx.Dialog",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "MapDisplay.MapDisplay",... |
16408579191 | from pyscf import gto, scf
import asf
import numpy as np
from pyscf.mcscf import avas
ASF = asf.asf()
mol = gto.Mole()
mol.atom = """
C 0.00000 0.00000 0.00000
C 0.00000 0.00000 1.20000
"""
mol.basis = 'def2-svp'
mol.charge = 0
mol.spin = 0
mol.build()
# UHF for UNOs
mf =... | LDongWang/ActiveSpaceFinder | examples/avas/c2.py | c2.py | py | 889 | python | en | code | null | github-code | 6 | [
{
"api_name": "asf.asf",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pyscf.gto.Mole",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pyscf.gto",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "pyscf.scf.RHF",
"line_number": 18,
... |
40880843423 | import re
import dateutil.parser
class DateRegex:
def __init__(
self,
pattern,
):
self.pattern = pattern
def convert(
self,
date_string,
):
match = re.search(
pattern=self.pattern,
string=date_string,
flags=re.IGNOREC... | dhkron/whois | whois/parsers/converter.py | converter.py | py | 1,544 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "re.search",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "re.IGNORECASE",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "dateutil.parser.parser.parse",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "dateutil.pa... |
24106546856 | import os
import cv2
from flask import (
Flask,
Response,
render_template,
request,
session,
redirect,
send_file,
url_for,
)
from fas.inferer import face_detector, fas_model, infer_img, infer_video, infer_frame
# from fas.inferer import face_detector, fas_model, infer_img, infer_video
... | LananhTran302001/face-anti-spoofing-flaskapp | app.py | app.py | py | 10,387 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "fas.inferer",
"line_number": 42,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 46,... |
21251905362 | """Parse the discussion wiki and archive the data in the database."""
import re
import pathlib
from operator import ior
from functools import reduce
from string import punctuation
from database import DatabaseDiscussion
from parser_wiki import Parser, Discussion
DISCUSSION_ENTRY_PATH = "src\\queries\\discussion\\add_... | Manitary/r-anime-archive | src/parser_wiki_discussion.py | parser_wiki_discussion.py | py | 7,244 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "re.compile",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 25,
... |
9679183776 | '''
some useful spark bot suff
'''
import os
import requests
import json
API_TEMPLATE = 'https://api.ciscospark.com/v1/{}'
MENTION_REGEX = r'<spark-mention.*?data-object-id="(\w+)".*?spark-mention>'
PERSON_ID = os.environ['PERSON_ID']
HEADERS = {
"Authorization": "Bearer {}".format(os.environ['TOKEN']),
"C... | msiddorn/spark-bot | bot_helpers.py | bot_helpers.py | py | 1,510 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.environ",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"l... |
24987056441 | import csv
import datetime
import time
from datetime import date, timedelta
import netsvc
logger = netsvc.Logger()
if __name__ != '__main__':
from tools import config
else:
config={'addons_path':'/home/quentin/tinydev/cci/code/server/bin/addons'}
partner_dict = {}
partner_dict[''] = ''
dict_partner = {}
de... | factorlibre/openerp-extra-6.1 | account_bob_import/bob_import_step_2.py | bob_import_step_2.py | py | 34,361 | python | en | code | 9 | github-code | 6 | [
{
"api_name": "netsvc.Logger",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "tools.config",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "datetime.date",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "datetime.timedelta",
"lin... |
27765054450 | from django.test import RequestFactory
from django.test import Client
from test_plus.test import TestCase
from rest_framework.test import force_authenticate
from rest_framework.test import APIRequestFactory
from semillas_backend.users.factory import UserFactory
from wallet.factory import TransactionFactory
from wal... | sergimartnez/semillas_backend | wallet/tests/test_views.py | test_views.py | py | 3,513 | python | en | code | null | github-code | 6 | [
{
"api_name": "test_plus.test.TestCase",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "rest_framework.test.APIRequestFactory",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "semillas_backend.users.factory.UserFactory",
"line_number": 18,
"usage_type... |
8938995188 | from django.core.management.base import BaseCommand, CommandError
from django.core.cache import cache
from utils import cronlog
from pom.scrape import laundry, menus, printers
class Command(BaseCommand):
args = '<modules to scrape>'
help = 'Scrapes data and stores in memcached with a timestamp'
def handle... | epkugelmass/USG-srv-dev | tigerapps/pom/management/commands/pom_scrape.py | pom_scrape.py | py | 992 | python | en | code | null | github-code | 6 | [
{
"api_name": "django.core.management.base.BaseCommand",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "pom.scrape.laundry",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "pom.scrape.menus",
"line_number": 11,
"usage_type": "name"
},
{
"api_na... |
14566034034 | from rest_framework import status
from rest_framework.decorators import api_view
from rest_framework.response import Response
from rest_framework.views import APIView
from skill_quest_app.models import Course, CourseQuizResult, CourseQuiz, InterestQuiz, CourseEnrollment
from skill_quest_app.serializers import CourseSe... | HemitPatel/Skill_Quest_Backend | skill_quest_app/views.py | views.py | py | 4,263 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "rest_framework.views.APIView",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "skill_quest_app.models.Course.objects.filter",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "skill_quest_app.models.Course.objects",
"line_number": 14,
"usa... |
34453088360 | import random
import atexit
import sys
import argparse
import time
from tracemalloc import start
parser = argparse.ArgumentParser(description='Simulates coin flips')
parser.add_argument('--quiet','-q', action='store_true', help='Run in quiet mode. Do not print out new max streaks')
parser.add_argument('--total', '-t',... | bwu2018/pointless-coinflip | sim.py | sim.py | py | 1,868 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sys.tracebacklimit",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "random.randint",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "time.ti... |
2228249565 | import os
from pathlib import Path
import time
import random
class BuildTools():
def NewPlugin():
a = open('plugin.json', "w")
a.write('{\n\n\t"MyAddonName": "TestName",\n\t"LocalDependencies": "KoBashToolkit.engine.enginestart"\n}')
a.close()
def IDE(ide):
"""
Determines... | thekaigonzalez/kobash.old | KoBashToolkit/sharedtoolkits/buildTools/cus.py | cus.py | py | 1,503 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.mkdir",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 34... |
73477701627 | import functools
import pyopencl as cl
import numpy as np
from .sparsetensor import SparseFunction, SparseTensor
from .densetensor import GPUBuffer, DenseTensor
class GradData:
def __init__(self, data, xidx, yidx, shape):
self.data = data
self.xidx = xidx
self.yidx = yidx
self.shape = shape
def buff... | fpaboim/tinysparse | tinygrad/ops_gpusparse.py | ops_gpusparse.py | py | 32,916 | python | en | code | 9 | github-code | 6 | [
{
"api_name": "numpy.float32",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "densetensor.GPUBuffer",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pyopencl.Buffer"... |
18239861293 | #!/usr/bin/env python
import urllib2
from bs4 import BeautifulSoup
def main():
boys_limit = 265
boys_url = 'http://www.muslimnames.info/baby-boys/islamic-boys-names-'
girls_limit = 243
girls_url = 'http://www.muslimnames.info/baby-girls/islamic-girls-names-'
output_file = open('names.txt', 'a')
selector = 'boys'... | amazoedu0/Artificial-Intelligence | muslim-names-crawler-master/muslim-names-crawler-master/muslim_names_crawler.py | muslim_names_crawler.py | py | 763 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "urllib2.urlopen",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 23,
"usage_type": "call"
}
] |
21099019143 | # coding: utf-8
import blogSystem.models as blog_models
from django.shortcuts import render_to_response, RequestContext
import json
from django.db.models import Q
import time
from itertools import chain
import jieba
from django.core.paginator import Paginator
from django.core.paginator import EmptyPage
from django.cor... | zzlpeter/blog | blogSystem/search/views.py | views.py | py | 2,006 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "django.conf.settings.PAGE_SIZE",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "django.conf.settings",
"line_number": 24,
"usage_type": "name"
},
{
"api_na... |
20831073732 | import random
from string import ascii_letters
from socialnet.models import Account, Post, PostImages, Avatar, Image, Following
from posts.models import Comments, Tag, PostTags, Upvote, Downvote
from django.core.management.base import BaseCommand, CommandError
def random_string(length):
return "".join(random.choi... | YevheniiMorozov/social | gramm/socialnet/management/commands/fake_data.py | fake_data.py | py | 3,984 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "random.choices",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "string.ascii_letters",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "socialnet.models.Account",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "random.cho... |
38930994169 | # type: ignore
from inspect import getmembers, isfunction
import re, typing
import traceback
from typing import Callable
from PySide2.QtWidgets import QWidget, QSplitter, QVBoxLayout, QSizePolicy, QMenu, QPushButton, QAction, QScrollArea
from PySide2.QtGui import QIcon
from PySide2.QtCore import Signal, QSize
impo... | subski/DAMAKER | damaker_gui/widgets/FunctionListWidget.py | FunctionListWidget.py | py | 6,131 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "PySide2.QtWidgets.QSplitter",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "damaker_gui.widgets.ITabWidget",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "damaker_gui.widgets",
"line_number": 23,
"usage_type": "name"
},
{
... |
1693464120 | import discord
from discord.ext import commands
from discord import app_commands
class Ping(commands.Cog):
def __init__(self, client):
self.client = client
@app_commands.command()
async def ping(self, interaction: discord.Interaction):
"""Shows the latency of the bot (doesn't really matter... | megachickn101/nphc-discord-bot | cogs/ping.py | ping.py | py | 490 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "discord.ext.commands.Cog",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "discord.Interaction",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_nam... |
8659872785 | import argparse
import os
import sys
import time
from watchdog.observers import Observer
from watchdog.events import LoggingEventHandler
from watchdog.events import FileSystemEventHandler
#import multiprocessing as mp
from collections import OrderedDict
import re
import copy
import json
import subprocess
#import sched
... | MarkusHaak/dominION | dominion/dominion.py | dominion.py | py | 47,728 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "threading.RLock",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "threading.RLock",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "threading.RLock",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "threading.RLock",
... |
32841409829 | import sys
import pymysql
import pymongo
import re
import itertools
import pickle as pkl
import pandas as pd
from pymongo import MongoClient
from collections import defaultdict
from util.preprocessing import *
client = MongoClient('localhost', 27017)
database = client['research']
ptt_posts = database['2018_ptt_posts'... | kartd0094775/IdentifyKOL | preprocess_ptt.py | preprocess_ptt.py | py | 1,961 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sys.stdout.write",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "sys.stdo... |
71577995707 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Test that the ``Oxentiel`` class loads dictionaries correctly. """
from typing import Dict, Any
from hypothesis import given
from oxentiel import Oxentiel
from oxentiel.tests import strategies
# pylint: disable=no-value-for-parameter
@given(strategies.settings_dict... | langfield/oxentiel | oxentiel/tests/test_oxentiel.py | test_oxentiel.py | py | 1,960 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.Dict",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "typing.Any",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "oxentiel.Oxentiel",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "typing.Dict",
"line_numb... |
10129406269 | from aiogram import types
from aiogram.dispatcher.filters.builtin import CommandHelp
from loader import dp
@dp.message_handler(CommandHelp())
async def bot_help(message: types.Message):
text = ("Список команд: ",
"/start - Начать диалог",
"/help - Получить справку",
"/ref - По... | nekitmish/RefShop | handlers/users/help.py | help.py | py | 835 | python | ru | code | 0 | github-code | 6 | [
{
"api_name": "aiogram.types.Message",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "aiogram.types",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "loader.dp.message_handler",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "loade... |
11685423386 | import pandas as pd
import numpy as np
import random
import time
import os
import gc
import pickle
from sklearn.model_selection import StratifiedKFold
from sklearn.preprocessing import StandardScaler
from sklearn.metrics import roc_auc_score
import lightgbm as lgb
import matplotlib.pyplot as plt
import seaborn as sn... | leokri89/ml-codebase | models_sample/lightgbm.py | lightgbm.py | py | 3,278 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "warnings.simplefilter",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "random.seed",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "numpy.random.seed",... |
43975077800 | import mock
import uuid
from contextlib import contextmanager
import webtest
from pyramid.config import Configurator
from cliquet.events import (ResourceChanged, AfterResourceChanged,
ResourceRead, AfterResourceRead, ACTIONS)
from cliquet.storage.exceptions import BackendError
from cliquet... | mozilla-services/cliquet | cliquet/tests/resource/test_events.py | test_events.py | py | 16,885 | python | en | code | 65 | github-code | 6 | [
{
"api_name": "contextlib.contextmanager",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "cliquet.tests.support.BaseWebTest",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "pyramid.config.Configurator",
"line_number": 48,
"usage_type": "call"
},
... |
37788290307 | import yaml
from sigma.parser.condition import ConditionAND, ConditionOR
from sigma.config.exceptions import SigmaConfigParseError
from sigma.config.mapping import FieldMapping
# Configuration
class SigmaConfiguration:
"""Sigma converter configuration. Contains field mappings and logsource descriptions"""
def ... | socprime/soc_workflow_app_ce | soc_workflow_ce/server/translation_script/sigma/tools/sigma/configuration.py | configuration.py | py | 9,714 | python | en | code | 91 | github-code | 6 | [
{
"api_name": "yaml.safe_load",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "sigma.config.mapping.FieldMapping",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "sigma.config.exceptions.SigmaConfigParseError",
"line_number": 28,
"usage_type": "call"
... |
25136195461 | from sqlalchemy import create_engine, MetaData, Table, Column, Integer, String, DateTime, Float, and_, or_
from sqlalchemy.dialects import postgresql
from geoalchemy2 import Geometry
from geoalchemy2.functions import GenericFunction, ST_AsMVTGeom, ST_TileEnvelope
from sqlalchemy.dialects.postgresql import BYTEA, JSONB... | openhistorymap/tiles-api | app/api copy.py | api copy.py | py | 9,634 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.environ.get",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "os.environ.get",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_... |
24176860716 | # coding: utf-8
import re
import logging
from collections import OrderedDict
from copy import copy
logger = logging.getLogger(__name__)
try:
import xml.etree.cElementTree as ET
except ImportError:
import xml.etree.ElementTree as ET
from lxml import etree
def uniq_seq_merge(seq1, seq2):
new_seq = copy(s... | felixchr/xml_conf | xmlconf.py | xmlconf.py | py | 28,143 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "copy.copy",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number":... |
74436961468 | from matplotlib import colors
import matplotlib.pyplot as plt
fp = open('out', 'r')
lines = list(map(lambda x: [float(y)
for y in x.split(':')[1:]], fp.readlines()))
lines = list(map(lambda x: [x[0], x[1]*100], lines))
for line in lines:
print(line)
# For found
ns = [lines[x][0] for ... | dipeshkaphle/LabsAndAssignments | CSLR41-AlgosLab/Lab1/plot.py | plot.py | py | 912 | python | en | code | 7 | github-code | 6 | [
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "matpl... |
9767092930 | import numpy as np
# import networkx as nx
from collections import *
from itertools import *
from functools import *
import math
import re
from common.session import AdventSession
session = AdventSession(day=18, year=2020)
data = session.data.strip()
data = data.split('\n')
p1, p2 = 0, 0
def findmatch(expr, i):
... | smartspot2/advent-of-code | 2020/day18.py | day18.py | py | 1,777 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "common.session.AdventSession",
"line_number": 11,
"usage_type": "call"
}
] |
8665454584 | # -*- coding: utf-8 -*-
import os
import time
from boto3.dynamodb.conditions import Key
import settings
from db_util import DBUtil
from lambda_base import LambdaBase
from jsonschema import validate
from not_authorized_error import NotAuthorizedError
from user_util import UserUtil
class MeCommentsDelete(LambdaBase)... | AlisProject/serverless-application | src/handlers/me/comments/delete/me_comments_delete.py | me_comments_delete.py | py | 2,706 | python | en | code | 54 | github-code | 6 | [
{
"api_name": "lambda_base.LambdaBase",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "settings.parameters",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "user_util.UserUtil.verified_phone_and_email",
"line_number": 27,
"usage_type": "call"
}... |
14350976599 | from flask import Flask,request
from flask_restful import Resource, Api
from tensorflow import keras
import numpy as np
from flask_cors import CORS
COLUMNS = ['temp', 'wind', 'rain', 'FFMC', 'DMC', 'DC', 'ISI', 'RH', 'BUI', 'FWI']
app = Flask(__name__)
#
CORS(app)
# creating an API object
api = Api(app)
# Load model... | grab-bootcamp/API | app.py | app.py | py | 766 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask_cors.CORS",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask_restful.Api",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras.models.... |
74874760507 | import setuptools # Must be before Cython import
import Emma
with open("README.md", "r") as fp:
long_description = fp.read()
try:
from Cython.Compiler import Options
from Cython.Build import cythonize
Options.docstrings = True
Options.fast_fail = True
extension... | bmwcarit/Emma | setup.py | setup.py | py | 3,594 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "Cython.Compiler.Options.docstrings",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "Cython.Compiler.Options",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "Cython.Compiler.Options.fast_fail",
"line_number": 13,
"usage_type": "att... |
1584177491 | import os
from django.core.files.storage import FileSystemStorage
try:
FileNotFoundError
except:
FileNotFoundError = IOError
class BaseStorage(FileSystemStorage):
def _open(self, name, mode='rb'):
try:
return super(BaseStorage, self)._open(name, mode)
except FileNotFoundError:... | beniwohli/django-localdevstorage | localdevstorage/base.py | base.py | py | 1,602 | python | en | code | 50 | github-code | 6 | [
{
"api_name": "django.core.files.storage.FileSystemStorage",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "os.path.dirname",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 41,
"usage_type": "attribute"
},
{
"api_name... |
72532113149 | # pylint: disable=unused-variable
# pylint: disable=unused-argument
# pylint: disable=redefined-outer-name
import json
from copy import deepcopy
import httpx
import pytest
import respx
from fastapi import FastAPI
from respx import MockRouter
from simcore_service_api_server._meta import API_VTAG
from simcore_service_... | ITISFoundation/osparc-simcore | services/api-server/tests/unit/_with_db/test_api_user.py | test_api_user.py | py | 2,813 | python | en | code | 35 | github-code | 6 | [
{
"api_name": "fastapi.FastAPI",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "simcore_service_api_server.core.settings.ApplicationSettings",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "respx.mock",
"line_number": 28,
"usage_type": "call"
},
... |
1398543214 | """ Outlnies the methods to be used for the signUp app. """
from django.shortcuts import render, redirect
from django.core.mail import EmailMessage
from django.template.loader import render_to_string
from django.contrib.sites.shortcuts import get_current_site
from django.utils.http import urlsafe_base64_encode
from dja... | jjandrew/GroupEngineeringProjectGroup4 | technical-documents/source-code/signUp/views.py | views.py | py | 3,569 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "accounts.models.CustomUser.objects.get",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "accounts.models.CustomUser.objects",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "accounts.models.CustomUser",
"line_number": 29,
"usage_typ... |
43901468636 | import io
from PIL import Image
import pytesseract
from wand.image import Image as wi
pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe"
pdf = wi(filename = "AvradeepGupta.pdf", resolution = 300) # To read the pdf file and create a pdf object
pdfImage = pdf.convert('jpeg')... | AvradeepGupta/OCR | OCR.py | OCR.py | py | 1,516 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pytesseract.pytesseract",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "wand.image.Image",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "wand.image.Image",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "PIL.Imag... |
9063496529 | # -*- coding: utf-8 -*-
# ---
# @Software: PyCharm
# @Site:
# @File: num_clustering.py
# @Author: Alan D.Chen
# @E-mail: chense_mail@126.com
# @Time: 2020,八月 07
# ---
import pandas as pd
from sklearn.cluster import KMeans, MeanShift, AgglomerativeClustering, DBSCAN, spectral_clustering
from sklearn import metrics
from ... | Alan-D-Chen/CDIoU-CDIoUloss | anchor_generater/num_clustering.py | num_clustering.py | py | 6,580 | python | en | code | 25 | github-code | 6 | [
{
"api_name": "xml_extract2.xml_extract",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "sklearn.metrics.pairwise.pairwise_distances",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "sklearn.metrics.pairwise",
"line_number": 31,
"usage_type": "attribu... |
6465021088 | """
This module takes care of starting the API Server, Loading the DB and Adding the endpoints
"""
from flask import Flask, request, jsonify, url_for, Blueprint
from api.models import db, User, Family
from api.utils import generate_sitemap, APIException
api = Blueprint('api', __name__)
@api.route('/Family', method... | yasRF/apiFamily | src/api/routes.py | routes.py | py | 1,551 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "api.models",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "flask.Blueprint",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "api.models.Family.query.all",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "api.models.Famil... |
5329031446 | import torch
import copy
from torch.quantization.quantize import add_observer_
_RELU_BRANCH = {'son':None,'can_be_fused':True}
_BN_BRANCH = {'son': {torch.nn.ReLU:_RELU_BRANCH},'can_be_fused':True}
_NN_BRANCH = {'son': {torch.nn.ReLU:_RELU_BRANCH},'can_be_fused':False}
_CONV_BRANCH = {'son': {torch.nn.BatchNorm2d:_BN_... | HuDi2018/QTorch | utils/Quant.py | Quant.py | py | 1,941 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "torch.nn",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": ... |
5048789934 | from mesa import Agent
import random
class GameAgent(Agent):
""" An agent that is more likely to choose the mean option. """
def __init__(self, unique_id, model, home_cell=None):
super().__init__(unique_id, model)
self.score = 1
self.home_cell = home_cell
self.spouse = None
... | LouisSentinella/AgentBasedModelling | prisoners_dilemma/agents.py | agents.py | py | 14,250 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "mesa.Agent",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "random.choice",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "random.choice",
"line_number": 100,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_num... |
16551762444 | '''
Created on May 12, 2015
@author: wohlhart
'''
from tnetcore.layers.base import LayerParams, Layer
from tnetcore.util import readCfgIntNoneListParam, readCfgIntParam # @UnresolvedImport
import theano.tensor as T
import numpy
class CatLayerParams(LayerParams):
'''
Concatenation Layer Parameters
'''
... | paroj/ObjRecPoseEst | src/tnetcore/layers/catlayer.py | catlayer.py | py | 3,825 | python | en | code | 71 | github-code | 6 | [
{
"api_name": "tnetcore.layers.base.LayerParams",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "tnetcore.util.readCfgIntNoneListParam",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "tnetcore.util.readCfgIntParam",
"line_number": 32,
"usage_type": "... |
30052972082 | from django.conf.urls import include, url
from rest_framework import routers
from App.views import UserViewSet, GroupViewSet, BookViewSet
router = routers.DefaultRouter()
router.register('user',UserViewSet)
router.register('group',GroupViewSet)
router.register('book',BookViewSet)
urlpatterns = [
url('^drf/',inc... | chrisyuuuuu/Web- | Django/Drf案例/1-serializers/App/urls.py | urls.py | py | 340 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "rest_framework.routers.DefaultRouter",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "rest_framework.routers",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "App.views.UserViewSet",
"line_number": 7,
"usage_type": "argument"
},
{
... |
15183208796 | #! usr/bin/env python
# -*- coding : utf-8 -*-
import codecs
from sklearn import datasets, linear_model
from sklearn.metrics import mean_squared_error, make_scorer
import time
import numpy as np
np.random.seed(123)
from skopt import gp_minimize
import matplotlib.pyplot as plt
from random import uniform
from skopt.acqu... | aggarwalpiush/Hyperparameter-Optimization-Tutorial | model/svm_demo.py | svm_demo.py | py | 5,946 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "numpy.random.seed",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "codecs.open",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sklearn.linear_model.La... |
31866653355 | #python
import os
import socket
import time
import csv
from pathlib import Path
#django modules
from django.shortcuts import render, redirect
from django.views.generic.edit import CreateView
from django.views.generic import DetailView, FormView, ListView
#models
from apps.start_block.models import Session
from apps.a... | MeletChirino/Linky4Teens | new_gui/apps/start_block/views.py | views.py | py | 4,720 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.views.generic.DetailView",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "apps.start_block.models.Session",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "apps.start_block.models.Session.objects.get",
"line_number": 29,
"usage_t... |
8665069914 | import json
import os
import settings
from jsonschema import validate
from decimal_encoder import DecimalEncoder
from lambda_base import LambdaBase
class ArticlesEyecatch(LambdaBase):
def get_schema(self):
return {
'type': 'object',
'properties': {
'topic': setting... | AlisProject/serverless-application | src/handlers/articles/eyecatch/articles_eyecatch.py | articles_eyecatch.py | py | 1,738 | python | en | code | 54 | github-code | 6 | [
{
"api_name": "lambda_base.LambdaBase",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "settings.parameters",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "jsonschema.validate",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "o... |
5008945541 | """
This module contains a basic orchestrator for the execution of sequential data transformation stages.
"""
from __future__ import annotations
import typing as t
import types
from fontai.config.pipeline import Config as PipelineConfig, ConfigHandler as PipelineConfigHandler
from fontai.runners.base import Configura... | nestorSag/textfont-ai | src/fontai/fontai/runners/pipeline.py | pipeline.py | py | 3,542 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "typing.Any",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "types.GeneratorType",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "fontai.runners.base.ConfigurableTransform",
"line_number": 42,
"usage_type": "name"
},
{
... |
11370330174 | from Models import pi_net, weights_init_1st
import multiprocessing
import torch.optim as optim
import torch
from torch.distributions import Categorical
import torch.nn.functional as F
from torch import tanh
import numpy as np
from utils import get_state_repr_from_int, get_state_from_int, get_state_as_int, get_state_rep... | ssainz/reinforcement_learning_algorithms | fleet_simulator/FleetSimulatorAgentConcurrent.py | FleetSimulatorAgentConcurrent.py | py | 5,529 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "torch.FloatTensor",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "torch.LongTensor",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "torch.ByteTensor",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "Mo... |
30753464221 | from django.shortcuts import render
from fristapp.models import People, Aritcle
from django.http import HttpResponse
from django.template import Context, Template
# Create your views here.
def first_try(request):
person = People(name='Spork', job="officer")
html_string = '''
<html lang="en">
<head>
... | LTMana/code | Python/Django/fristsite/fristapp/views.py | views.py | py | 1,123 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "fristapp.models.People",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.template.Template",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "django.template.Context",
"line_number": 32,
"usage_type": "call"
},
{
"api_name":... |
18855352074 | from cloud.filestore.tests.python.lib.common import get_nfs_mount_path
import os
import pytest
import shutil
import tempfile
def pytest_addoption(parser):
parser.addoption(
"--target-dir",
action="store",
default="Path to target directory to run tests on",
)
@pytest.fixture
def targe... | ydb-platform/nbs | cloud/filestore/tools/testing/fs_posix_compliance/suite/python_tests/conftest.py | conftest.py | py | 1,362 | python | en | code | 32 | github-code | 6 | [
{
"api_name": "tempfile.mkdtemp",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "cloud.filestore.tests.python.lib.common.get_nfs_mount_path",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "shutil.rmtree",
"line_number": 23,
"usage_type": "call"
},
... |
21925605098 | from __future__ import annotations
import copy
from typing import Optional, Dict
from dlgo.gotypes import Player, Point
from dlgo import zobrist
from dlgo.scoring import compute_game_result
from dlgo.utils import MoveAge
__all__ = [
'Board',
'GameState',
'Move',
]
neighbor_tables = {}
corner_tables = {... | dbradf/dlgo | src/dlgo/goboard_fast.py | goboard_fast.py | py | 12,409 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "dlgo.gotypes.Point",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "dlgo.gotypes.Point",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "dlgo.gotypes.Point",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "dlgo.gotypes... |
4565273196 | import numpy as np
import matplotlib.pyplot as plt
import csv
import os
dirname = os.path.dirname(__file__)
t = 1
sig_x_est, sig_y_est, sig_vx_est, sig_vy_est = np.array([0.25, 0.25, 0.1, 0.1]) * 20
sig_x_mea, sig_y_mea, sig_vx_mea, sig_vy_mea = np.array([0.1, 0.1, 1, 1]) * 40
def predict(A, x, y, vx, vy):
X ... | C-12-14/AGV-Task-Round | Kalman-Filter/kalman.py | kalman.py | py | 2,456 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.path.dirname",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "numpy.array",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number"... |
37225811351 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import os, sys, glob, pickle
import numpy as np
import sqlite3
import matplotlib.pyplot as plt
from analysis import crosstalk, darknoise
from contrib import legend, natsort
from ROOT import TH1D, TF1
import ROOT
from matplotlib.backends.backend_pdf import P... | ntim/g4sipm | sample/plots/luigi/n_pe.py | n_pe.py | py | 4,397 | python | en | code | 26 | github-code | 6 | [
{
"api_name": "ROOT.Math.MinimizerOptions.SetDefaultMinimizer",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "ROOT.Math",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 17,
"usage_type": "call"
},
{
... |
24591311642 | import pygame
import math
class Bat:
def __init__(self, screen, startX, startY, speed, width=20, height=80):
self.startX = startX-(math.ceil(width/2))
self.startY = startY-(math.ceil(height/2))
self.screen = screen
self.speed = speed
self.width = width
self.height =... | BananenKraft/Pong | bat.py | bat.py | py | 706 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "math.ceil",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "math.ceil",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pygame.draw.rect",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pygame.draw",
"line_number": 1... |
29944782862 | from sklearn import datasets
digits = datasets.load_digits()
# Take the first 500 data points: it's hard to see 1500 points
X = digits.data[:500]
y = digits.target[:500]
print (X.shape, y.shape)
from sklearn.manifold import TSNE
tsne = TSNE(n_components=2, random_state=0)
X_2d = tsne.fit_transform(X)
'''
0 -> formu... | iamjanvijay/Background-Sound-Classification-in-Speech-Audio-Segments | utils/plot_tsne.py | plot_tsne.py | py | 914 | python | en | code | 4 | github-code | 6 | [
{
"api_name": "sklearn.datasets.load_digits",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "sklearn.datasets",
"line_number": 2,
"usage_type": "name"
},
{
"api_name": "sklearn.manifold.TSNE",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "mat... |
23497250977 | # coding: utf-8
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from builtins import * # pylint:disable=redefined-builtin,unused-wildcard-import,wildcard-import,wrong-import-order
from collections import deque
impor... | alexlyn/stb-tester | _stbt/motion.py | motion.py | py | 12,155 | python | en | code | null | github-code | 6 | [
{
"api_name": "types.Region.ALL",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "types.Region",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "stbt.frames",
"line_number": 78,
"usage_type": "call"
},
{
"api_name": "imgutils.limit_time",
... |
10432077002 | #!/usr/bin/env python
# Get a listings of the files in each dataset
# see get-dc0-file-lists.sh
import json
from pytablewriter import MarkdownTableWriter
# from https://stackoverflow.com/questions/1094841/get-human-readable-version-of-file-size
def sizeof_fmt(num, suffix="B"):
for unit in ["", "Ki", "Mi", "Gi", ... | CMB-S4/serverless-data-portal-cmb-s4 | buildpr4.py | buildpr4.py | py | 3,826 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pytablewriter.MarkdownTableWriter",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 70,
"usage_type": "call"
},
{
"api_name": "pytablewriter.MarkdownTableWriter",
"line_number": 92,
"usage_type": "call"
}
] |
24254079862 | from base import *
from fabric.api import cd, env, run
NOTIFICATION_SENDER = os.getenv('NOTIFICATION_SENDER')
# See: https://docs.djangoproject.com/en/dev/ref/settings/#managers
MANAGERS = ADMINS
########## END MANAGER CONFIGURATION
########## DEBUG CONFIGURATION
# See: https://docs.djangoproject.com/en/dev/ref/set... | toladata/TolaTables | tola/settings/local.py | local.py | py | 4,834 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "fabric.api.env.hosts",
"line_number": 126,
"usage_type": "attribute"
},
{
"api_name": "fabric.api.env",
"line_number": 126,
"usage_type": "name"
},
{
"api_name": "fabric.api.env.project_root",
"line_number": 129,
"usage_type": "attribute"
},
{
"api_... |
31249158545 | import os
from pathlib import Path
import random
import pandas as pd
from music21 import converter
from data_preparation import extract_notes
from preprocessing.preprocess_midi import preprocess_music21_song
from helpers.samplinghelpers import render_token_sequence
def prepare_annotations(labels_file: str) -> None:
... | Vitaliy1234/music_generation | data/music_midi/prepare_data.py | prepare_data.py | py | 4,890 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_numb... |
70640030589 | import chainer
from chainer import serializers, Variable, cuda
from flownets import FlowNetS
import cv2
import numpy as np
import argparse
### parameter ###
INPUT_FILE1 = 'samples/0000000-imgL.ppm'
INPUT_FILE2 = 'samples/0000000-imgR.ppm'
OUTPUT_FILE = './results/test'
ARROW_FREQ = 16
def preprocessing(img):
img ... | kou7215/opticalflow | run.py | run.py | py | 8,175 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "cv2.copyMakeBorder",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "cv2.BORDER_CONSTANT",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "cv2.copyMakeBorder",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "cv2.BO... |
25320255908 | from flask import Flask, render_template, request
app = Flask(__name__)
ENV = "debug"
if ENV == 'debug':
app.debug = True
app.config['SQLALCHEMY_TRACK_MODIFICATION'] = False
# set app source
@app.route('/')
def index():
return render_template('index.html')
if __name__ == '__main__':
app.run() | JakeSiewJK64/joekane_site1 | app.py | app.py | py | 316 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 16,
"usage_type": "call"
}
] |
10625323914 | import boto3
access_key = ''
secret_access_key = ''
def get_all_clusters():
ecs_client = boto3.client('ecs', aws_access_key_id=access_key, aws_secret_access_key=secret_access_key)
response = ecs_client.list_clusters()
cluster_arns = response['clusterArns']
return cluster_arns
# print(get_all_regions... | PrantaChakraborty/boto3 | s3/ecs.py | ecs.py | py | 462 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "boto3.client",
"line_number": 8,
"usage_type": "call"
}
] |
18515564727 | ###### UNIMIB - 2022 Indiegogo
######
import sys
import json
import pyspark
from pyspark.sql.functions import col, collect_list, array_join
from awsglue.transforms import *
from awsglue.utils import getResolvedOptions
from pyspark.context import SparkContext
from awsglue.context import GlueContext
from awsglue.job i... | mauropelucchi/unimib_masterbi_2022 | aws/aws_glue_job.py | aws_glue_job.py | py | 2,077 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "awsglue.utils.getResolvedOptions",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "pyspark.context.SparkContext",
"line_number": 25,
"usage_type": "call"
},
{
"api_n... |
27185060813 | """Core of the discord bot."""
import discord
from discord.ext import commands
from pretty_help import PrettyHelp
import config as c
__author__ = "Diabolica"
intents = discord.Intents.default()
intents.members = True
startup_extensions = ["config", "commands_miscellaneous", "commands_ticketing", "commands_rob... | Diabolicah/GPO-Bot | main.py | main.py | py | 3,653 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "discord.Intents.default",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "discord.Intents",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands.Bot",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "d... |
4697384472 | import numpy as np
from player import Player
from territory import Territory
from troop import Troop
import random
from enum import Enum
starting_troops = 25
usa_states = {"Alabama":["Mississippi","Tennessee","Florida","Georgia"],
"Alaska":["Hawaii","California","Arizona"],
"Arizona":["California","Nevada","Utah",... | ZeyadZanaty/risk-game-ai | server/game.py | game.py | py | 8,762 | python | en | code | 4 | github-code | 6 | [
{
"api_name": "territory.Territory",
"line_number": 109,
"usage_type": "call"
},
{
"api_name": "territory.Territory",
"line_number": 112,
"usage_type": "call"
},
{
"api_name": "player.Player",
"line_number": 118,
"usage_type": "call"
},
{
"api_name": "player.troop... |
8599562923 | import webbrowser
import msal
import logging
import requests
import json
from msal import PublicClientApplication
APPLICATION_ID = '31a4641c-9cae-4d30-a2d4-c104bf383785'
CLIENT_SECRET = '5M78Q~QVl-rib2HqHVJ4xhRe-XWcGySwtZMgPbjz'
authority_url = 'https://login.microsoftonline.com/common/'
base_url = 'https://graph.mi... | tvcastro1/projetos-analise-dados | citrix-podio/demitidos/emailer.py | emailer.py | py | 3,963 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "json.load",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "msal.ConfidentialClientApplication",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "logging.info",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "requests.po... |
19416806187 | """Determine potential of renewable electricity in each administrative unit.
* Take the (only technically restricted) raster data potentials,
* add restrictions based on scenario definitions,
* allocate the onshore potentials to the administrative units,
* allocate the offshore potentials to exclusive economic zones (... | timtroendle/possibility-for-electricity-autarky | src/potentials.py | potentials.py | py | 10,162 | python | en | code | 10 | github-code | 6 | [
{
"api_name": "enum.IntEnum",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "enum.Enum",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "src.technical_eligibility.Eligibility.ROOFTOP_PV",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_... |
20804943026 | import pickle
from sklearn import model_selection
from sklearn.linear_model import LinearRegression
model = LinearRegression()
loaded_model = pickle.load(open('model', 'rb'))
val = "sssfAfsDfe%%%{dInIisdChdh*e]DHSdbeTNhfhdyeSSWTTFSSSllfjdjs{\\#3fdas34df7adJHHstcsdDFur3sfj_1mdfneypcs0KJDsrsFs7sd4nfec3_sdrufdl35}453"
p... | MysterionRise/ai-ctf-2022-solutions | stegano-regression/stegano.py | stegano.py | py | 502 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sklearn.linear_model.LinearRegression",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 6,
"usage_type": "call"
}
] |
30763331030 | import sys
import torch
import ool.picture.models.thirdparty.space.model as spc
from ool.picture.models.thirdparty.space.model import Space
from oolexp import OOLLayeredBoxExp
class MultipleOptimizer(torch.optim.Optimizer):
def __init__(self, *optimisers):
self.opts = optimisers
self.defaults = ... | karazijal/clevrtex | experiments/space.py | space.py | py | 3,054 | python | en | code | 8 | github-code | 6 | [
{
"api_name": "torch.optim",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "oolexp.OOLLayeredBoxExp",
"line_number": 55,
"usage_type": "name"
},
{
"api_name": "ool.picture.models.thirdparty.space.model.arch",
"line_number": 69,
"usage_type": "attribute"
... |
6972201686 | import os
import argparse
#from tools import train_net
from tools.lib import init_lr
import random
import numpy as np
from tools.classification import classification
from tools.classification_multi import classification_multi
import torch
def seed_torch(seed=0):
random.seed(seed)
os.environ['PYTHON... | ada-shen/ICNN | demo.py | demo.py | py | 3,178 | python | en | code | 59 | github-code | 6 | [
{
"api_name": "random.seed",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "numpy.random.seed",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"lin... |
2894455012 | import numpy as np
import matplotlib.pyplot as plt
def gaussEliminationLS( m, n, a, x):
for i in range(m-1):
for k in range(m):
if abs(a[i][i]<abs(a[k][i])):
for j in range(n):
temp= a[i][j]
a[i][j]= a[k][j]
a[k][j]= te... | meheraj2325/CSE-3212-Numerical-Methods-Lab | lab4/cubic_spline2.py | cubic_spline2.py | py | 2,688 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.array",
"line_number": 71,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 72,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 76,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": ... |
73486867709 | '''
@Jailson
Data: 17-11-2022
'''
import requests
from csv import writer
from datetime import datetime
data_e_hora_atuais = datetime.now()
data_e_hora_em_texto = data_e_hora_atuais.strftime('%d/%m/%Y %H:%M')
#################################################################################
# Emon service info
emon_i... | marcelo-m7/EcoPool | varexternas.py | varexternas.py | py | 2,070 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "datetime.datetime.now",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "requests.get",
... |
37511806658 | from invimg.scripts.inference import invert
import math
import os
import torch
import torchvision
from tqdm import tqdm
import numpy as np
from optimclip.criteria.clip_loss import CLIPLoss
from optimclip.criteria.id_loss import IDLoss
from optimclip.models.stylegan2.model import Generator
import clip
from faceparsing.... | wangyuchi369/makeup-clip | test.py | test.py | py | 6,753 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "optimclip.models.stylegan2.model.Generator",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "torch.load",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "math.cos",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "math.p... |
16312489701 | from flask import Blueprint, render_template, request, flash, redirect
shared_file = Blueprint('shared_file', __name__)
@shared_file.route('/')
def get__():
from models import File, User
files = File.query.filter(File.shared).all()
users = list(User.get_by(id_=file.creator_id) for file in files)
list... | TheMasterOfMagic/ac | views/shared_file.py | shared_file.py | py | 1,156 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "flask.Blueprint",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "models.File.query.filter",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "models.File.query",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "models.F... |
23748731008 | # !/usr/bin/env python
# -*- coding: utf-8 -*-
"""Entry point for the server application."""
import json
import logging
import traceback
from datetime import datetime
from flask import Response, jsonify, current_app
from flask_jwt_simple import (JWTManager, jwt_required, get_jwt_identity, get_jwt)
from gevent.wsgi im... | zIPjahoda/Flask-Angular | backend/flask_app/server.py | server.py | py | 1,852 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "factory.create_app",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "flask_jwt_simple.JWTManager",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "fact... |
27566260651 | from django.shortcuts import render, HttpResponseRedirect
from .forms import MeetingCreateForm
from .models import Meeting
from django.contrib.auth.decorators import login_required
from django.urls import reverse
from django.contrib import messages
from datetime import datetime, timezone as tz
from django.utils import ... | Afeez1131/Django-online-meeting | onlinemeet/views.py | views.py | py | 3,327 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "forms.MeetingCreateForm",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "forms.MeetingCreateForm",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.HttpResponseRedirect",
"line_number": 21,
"usage_type": "call"
},
{
... |
72435188028 | import requests
import json
URL = "http://localhost:8000/auth/users/"
def post_data():
# data = {
# "emial":"adirokade15@gmail.com",
# "name":"AdityaRokade",
# "password":"djangoroot",
# "re_password":"djangoroot",
# "first_name":"adi",
# "last_name":"rokade"
... | adityarokade/social_book | social_book/myapp.py | myapp.py | py | 805 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.post",
"line_number": 31,
"usage_type": "call"
}
] |
22290772593 | import streamlit as st
import pandas as pd
st.title("Upload CSV project")
uploaded_csv = st.file_uploader('選擇CSV檔')
if uploaded_csv is not None:
df = pd.read_csv(uploaded_csv,encoding='utf-8')
st.header('CSV檔內容:')
st.dataframe(df) | chiangcw0410/mysql_test | test/upload.py | upload.py | py | 259 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "streamlit.title",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "streamlit.file_uploader",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "streamlit.header... |
27581741716 | # -*- coding: utf-8 -*-
"""
Created on Wed Oct 4 13:56:32 2017
@author: hannu
"""
import numpy as np
import matplotlib.pyplot as plt
import random
import scipy.constants as const
from constants import *
####### Functions for KMC ######
def f(sigma, x):
normal = (1/(2*const.pi*sigma**2))*np.exp(... | hpelttari/Kinetic-Monte-Carlo | Si_migration/functions.py | functions.py | py | 1,456 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "scipy.constants.pi",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "scipy.constants",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "numpy.exp",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.NaN",
"li... |
23113245409 | #-*- coding: utf-8 -*-
#-----------------------------------------------------------------------#
# Autor: Luis Enrique Rojas Desales #
#-----------------------------------------------------------------------#
# Este codigo esta liberado bajo licencia GPL. #
#... | ikiex/CFDIMasivo | CFDI/Controlador/lista.py | lista.py | py | 2,079 | python | es | code | 3 | github-code | 6 | [
{
"api_name": "PySide2.QtWidgets.QMainWindow",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "Interfaz.ListaRFC.Ui_MainWindow",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "Interfaz.ListaRFC",
"line_number": 25,
"usage_type": "name"
},
{
"a... |
35862928120 | import json
import redis
from flask import Flask, request, Response, make_response
import base64
from jwt.api_jwt import PyJWT
app = Flask(__name__)
d = {'write': '1', 'read': '2', 'delete': '3'}
HOST = 'rediska'
Key = '12345'
@app.route('/auth/')
def requestic4():
user = request.authorization.username
password = ... | ZharkovMihail/server_with_jwt | server.py | server.py | py | 2,843 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask.request.authorization",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "flask.reque... |
74743637626 | import re
from PyQt4 import QtGui
from PyQt4 import QtCore
from PyQt4.QtCore import Qt
from customeditor import CustomEditor
from camelot.view.art import Icon
import camelot.types
class VirtualAddressEditor(CustomEditor):
def __init__(self, parent=None, editable=True, address_type=None, **kwargs):
Custo... | kurtraschke/camelot | camelot/view/controls/editors/virtualaddresseditor.py | virtualaddresseditor.py | py | 7,474 | python | en | code | 4 | github-code | 6 | [
{
"api_name": "customeditor.CustomEditor",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "customeditor.CustomEditor.__init__",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "customeditor.CustomEditor",
"line_number": 14,
"usage_type": "name"
},
{... |
32640335090 | # AUTHOR: Louis Tsiattalou
# DESCRIPTION: Match list items to closest tf-idf match in second list.
import pandas as pd
from tfidf_matcher.ngrams import ngrams
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.neighbors import NearestNeighbors
def matcher(original=[], lookup=[], k_matches=5, ng... | LouisTsiattalou/tfidf_matcher | tfidf_matcher/matcher.py | matcher.py | py | 5,188 | python | en | code | 41 | github-code | 6 | [
{
"api_name": "tfidf_matcher.ngrams.ngrams",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "sklearn.feature_extraction.text.TfidfVectorizer",
"line_number": 65,
"usage_type": "call"
},
{
"api_name": "sklearn.neighbors.NearestNeighbors",
"line_number": 69,
"usag... |
14911244486 | import unittest
import time
import ddt
import json
from Public.cogfig import EXECL_PATH
from Interface.test_mock import test_mock_mi
test_send = test_mock_mi()
import math
from Public.read_excel import read_excel
from unittest import mock
wenjian = EXECL_PATH + '\\jekn.xlsx' #查询到对应的case文件
index_excel = read_excel(wenj... | LiuYaowei-Geek/deep | test_Case/mock.py | mock.py | py | 5,537 | python | zh | code | 1 | github-code | 6 | [
{
"api_name": "Interface.test_mock.test_mock_mi",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "Public.cogfig.EXECL_PATH",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "Public.read_excel.read_excel",
"line_number": 12,
"usage_type": "call"
},
{
... |
5366659164 | import datetime
import logging
import os.path
import x509
LOG = logging.getLogger(__name__)
class CertWatcher(object):
def __init__(self, key_path, cert_path, common_name, ca_driver,
on_refresh_success=None, on_refresh_failure=None,
refresh_window=None):
if not os.path... | takac/cathead | cathead/certwatch.py | certwatch.py | py | 2,756 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path.path.isfile",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path.path",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "os.path",
... |
23235971280 | """
__/\\\\\\\\\\\\______________________/\\\\\\\\\\\____/\\\________/\\\_
_\/\\\////////\\\__________________/\\\/////////\\\_\/\\\_______\/\\\_
_\/\\\______\//\\\________________\//\\\______\///__\/\\\_______\/\\\_
_\/\\\_______\/\\\_____/\\\\\______\////\\\_________\/\\\_______\/\\\_
_\/\\\_______\/\\\___/... | tsandrini/dosu | dosu/__main__.py | __main__.py | py | 3,242 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "actions.ValidateMonths",
"line_number": 62,
"usage_type": "name"
},
{
"api_name": "actions.ValidateYears",
"line_number": 70,
"usage_type": "name"
},
{
"api_name": "... |
17121698120 | import cv2
import numpy as np
# Load the source and kernel images
source_image = cv2.imread('/home/xpirr/workspace/python/DSP/HW2/Resim6_8.jpg', cv2.IMREAD_GRAYSCALE)
kernel_image = cv2.imread('/home/xpirr/workspace/python/DSP/HW2/EvrenIspiroglu.py', cv2.IMREAD_GRAYSCALE)
# Convert the kernel image to a numpy array o... | ispiroglu/DSP-HW2 | Demo3.py | Demo3.py | py | 1,091 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "cv2.imread",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.IMREAD_GRAYSCALE",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "cv2.imread",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cv2.IMREAD_GRAYSCALE",
... |
1277452974 | """Default settings."""
import logging
settings = {
'log': {
'level': "debug", # log level
},
'auth': {
'required': False, # set to `True` to enable authentication
'basic_auth': {
'path': '/dev/null', # path to htpasswd file
},
},
'server': {
... | t4k1t/qgisrv | qgisrv/settings.py | settings.py | py | 552 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.basicConfig",
"line_number": 22,
"usage_type": "call"
}
] |
34084173801 | from django.conf.urls.defaults import patterns, url
from django.template.defaultfilters import slugify
from rc.resources.views import ResourceItemListView
from rc.resources.apps.operations import models
def green_building_url(url_string, building_type, image_url=None,
image_alt=None, image_capt... | AASHE/django-irc | rc/resources/apps/operations/urls.py | urls.py | py | 12,244 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "rc.resources.apps.operations.models.CampusGreenBuilding",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "rc.resources.apps.operations.models",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "django.conf.urls.defaults.url",
"line_number":... |
16734122984 | from typing import Any
from fastapi import FastAPI, Response, Request
from pathlib import Path
from pydantic import BaseModel
from autogoal.utils._storage import inspect_storage
import uvicorn
from autogoal_remote.distributed.proxy import loads, dumps, encode, decode
class Body(BaseModel):
values: Any
app = Fas... | autogoal/autogoal-remote | autogoal_remote/production/server.py | server.py | py | 1,689 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "pydantic.BaseModel",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "typing.Any",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "fastapi.FastAPI",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "fastapi.Request",
"... |
62345004 | from django.urls import path, include
from core import views
urlpatterns = [
path('', views.index, name='index'),
path('register/',views.register, name='register'),
path('home/',views.home, name='home'),
path('history/', views.history, name='history'),
path('generate-new-label/', views.generate_ne... | lquresh52/shipping-label-generaor | core/urls.py | urls.py | py | 636 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "core.views.index",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "core.views",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "django.urls.path",
... |
24255720694 | import pandas as pd
import os
import time
from xlrd import XLRDError
start_time = time.time()
# list of paths to ebay files
ebay_files = []
# searching all excel files in the folder
for root, dirs, files in os.walk(r'D:\Projects\shopContent\ebay'):
ebay_files.extend([os.path.join(root, file) for file in files if fi... | bfesiuk/shopContent | creating.py | creating.py | py | 4,995 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "time.time",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.walk",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 13,
"u... |
42743009421 | from setuptools import find_packages
from setuptools import setup
package_name = 'camera_calibration'
setup(
name=package_name,
version='1.12.23',
packages=find_packages(exclude=['test']),
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
... | ahuizxc/ros2_camera_calibration | setup.py | setup.py | py | 1,118 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "setuptools.setup",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",
"line_number": 9,
"usage_type": "call"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.