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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
30411100957 | import validators
from .logger import setup_logging
class ConnectedObject:
'''
'''
def __init__(self, host='0.0.0.0', port=4242):
'''
'''
setup_logging()
self._host = None
self._port = None
@property
def host(self):
return self._host
@host.set... | RomainFeron/clusterpolice | clusterpolice/connected_object.py | connected_object.py | py | 1,310 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logger.setup_logging",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "validators.domain",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "validators.ip_address.ipv4",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "val... |
24599918132 | from PyQt4 import QtGui
from datetime import datetime
class FiberPropertiesWindow(QtGui.QDialog):
def __init__(self, fibers, parent=None, *args, **kwargs):
super().__init__(parent, *args, **kwargs)
self._fibers = fibers
self.setWindowTitle(self.tr("Fiber Properties"))
self.nameIn... | cbrunet/fibermodes | fibermodesgui/fibereditor/fiberproperties.py | fiberproperties.py | py | 2,520 | python | en | code | 15 | github-code | 97 | [
{
"api_name": "PyQt4.QtGui.QDialog",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "PyQt4.QtGui",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "PyQt4.QtGui.QLineEdit",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "PyQt4.QtGui"... |
11022831813 | import collections
import math
import copy
import pyexcel_ods3
import pyexcel_xls
from openglider.glider.cell import DiagonalRib
from openglider.utils.table import Table
class GliderSpreadsheet(object):
"""
Tabular representation of a glider for easy manipulation
"""
def __init__(self, glider2d):
... | booya-at/OpenGlider | openglider/glider/parametric/spreadsheet.py | spreadsheet.py | py | 9,504 | python | en | code | 60 | github-code | 97 | [
{
"api_name": "collections.OrderedDict",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "openglider.utils.table.Table",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "openglider.utils.table.Table",
"line_number": 20,
"usage_type": "call"
},
{
... |
11105990391 | import io
import os
import random
from unittest.mock import patch, MagicMock
import pytest
from peek import __file__ as package_root
from peek.es_api_spec.kspec_js import JsSpecParser, JsSpecEvaluator, build_js_specs
package_root = os.path.dirname(package_root)
kibana_dir = os.path.join(package_root, 'specs', 'kiban... | ywangd/peek | tests/es_api_spec/test_spec_js.py | test_spec_js.py | py | 2,439 | python | en | code | 16 | github-code | 97 | [
{
"api_name": "peek.__file__",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "os.path.dirname",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_n... |
42399274174 |
from email import header
from django.shortcuts import render, redirect
from django.views.generic import View
from django.core.exceptions import ObjectDoesNotExist
from django.contrib import messages
import requests
import math
import random
from django.conf import settings
from payments.models import OrderAddress
from... | isayaeli/afrogulio | payments/views.py | views.py | py | 3,894 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.conf.settings.SWAHILIES_SECRET_KEY",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "django.conf.settings",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "django.views.generic.View",
"line_number": 20,
"usage_type": "name"
... |
20281787516 | import datetime
class Task():
def __init__(self, task, priority, deadline=0):
self.task = task
self.priority = priority
self.deadline = deadline
self.date = datetime.datetime.now()
self.id = int(self.get_id()) +1
def get_id(self):
with open('../homework 4/id_cou... | lestor94/homework1 | Homework 7/Task.py | Task.py | py | 593 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "datetime.datetime.now",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 8,
"usage_type": "attribute"
}
] |
27325428823 | # -*- encoding: utf-8 -*-
from odoo import api, models
import logging
_logger = logging.getLogger(__name__)
class ReporteCompras(models.AbstractModel):
_name = 'report.l10n_gt_extra.reporte_compras'
def lineas(self, datos):
totales = {}
totales['num_facturas'] = 0
totale... | justorivera23/drizquierdoaddons | addons/l10n_gt_extra2/l10n_gt_extra/report/reporte_compras.py | reporte_compras.py | py | 7,525 | python | pt | code | 0 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "odoo.models.AbstractModel",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "odoo.models",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "odoo.api.mo... |
28258923381 | from ReText import settings
import re
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QColor, QFont, QSyntaxHighlighter, QTextCharFormat
reHtmlTags = re.compile('<[^<>@]*>')
reHtmlSymbols = re.compile(r'&#?\w+;')
reHtmlStrings = re.compile('"[^"<]*"(?=[^<]*>)')
reHtmlComments = re.compile('<!--[^<>]*-->')
r... | liyongming1982/retext | ReText/highlighter.py | highlighter.py | py | 4,872 | python | en | code | null | github-code | 97 | [
{
"api_name": "re.compile",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 10,
... |
28608198368 | import csv
from django.conf import settings
from django.core.management.base import BaseCommand
from reviews.models import Comment, Review
from users.models import User
class Command(BaseCommand):
def handle(self, *args, **options) -> None:
print('Importing data from:', settings.DATA_IMPORT_LOCATION)
... | Starkiller2000Turbo/api_yamdb | api_yamdb/reviews/management/commands/import_comments.py | import_comments.py | py | 1,379 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.core.management.base.BaseCommand",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "django.conf.settings.DATA_IMPORT_LOCATION",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "django.conf.settings",
"line_number": 12,
"usage_t... |
23826427465 | #!/usr/bin/env python3
import os
import os.path
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.base import MIMEBase
from email import encoders
email = ''
password = ''
to = '@kindle.com'
group = 5
def send_email(s, i, paths):
msg = MIMEMultipart()
msg['Subject'] = 'Kindle docs ... | wujek-srujek/various | mail_books.py | mail_books.py | py | 1,494 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "email.mime.multipart",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "email.mime.multipart.MIMEMultipart",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "email.mime.multipart",
"line_number": 19,
"usage_type": "name"
},
{
"api_... |
5879766930 | import json
from pytils.translit import slugify
from django.core.management.base import BaseCommand
from my import models
def load_json():
with open('./delivery/data/data.txt', encoding='utf-8') as f:
data = json.loads(f.read())
return data
class Command(BaseCommand):
he... | hackoffme/parse_barui | load.py | load.py | py | 1,789 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "json.loads",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.core.management.base.BaseCommand",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "my.models.Categories.objects.create",
"line_number": 21,
"usage_type": "call"
},
{... |
73136296000 | import streamlit as st
from langchain.callbacks.base import BaseCallbackHandler
from langchain.chains import RetrievalQAWithSourcesChain
from langchain.chains import RetrievalQA
from langchain.chains import ConversationalRetrievalChain,LLMChain, RetrievalQA
import os
from dotenv import load_dotenv
import qdrant_client... | Azure/intro-to-intelligent-apps | labs/04-deploy-ai/04-streamlit/app.py | app.py | py | 3,563 | python | en | code | 50 | github-code | 97 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number":... |
86656167407 | #encoding=utf8
import nltk,json
from tool import ner_stanford,cut_stanford
def get_stanfrod_ner_nodes(parent):
date = ''
org = ''
loc = ''
for node in parent:
if type(node) is nltk.Tree:
if node.label() == 'DATE':
date = date+' '+''.join([i[0] for i in node])
... | JustLonggg/NLP_notes | 分词、词性标注以及命名实体识别/命名实体识别/rules.py | rules.py | py | 1,880 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "nltk.Tree",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "nltk.RegexpParser",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "tool.ner_stanford",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"... |
15221378426 | from django.shortcuts import render
from itertools import chain
from author.models import Author
from .models import Book
from django.contrib.auth.decorators import login_required
from operator import attrgetter
@login_required(login_url='login')
def searchBooks(request):
query = request.GET.get('query')
if n... | dima-lkv/POM-Django-Forms-om-39-team_33 | library/book/views.py | views.py | py | 2,979 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "models.Book.objects.all",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "models.Book.objects",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "models.Book",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "models.B... |
6999632837 | # -*- coding: utf-8 -*-
import pandas as pd
import numpy as np
import re
import config
import logging
logger = logging.getLogger('QQ')
def changeFace(ans):
ans = str(ans)
val = re.sub("Face Amount: ", ' ', ans)
val = re.sub(",", ' ', val)
val = str(re.sub(" ", '', val))
index = (val.find('$'))
if(index != -1)... | ajaykrprajapati/Underwriter-System-Using-ML-AI-and-NLP | QuickQuote-master/PreProcess.py | PreProcess.py | py | 2,752 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 16,
"u... |
37162107878 | from sqlalchemy import between
from nanohttp import context, HTTPBadRequest
class FilteringMixin:
@classmethod
def filter_by_request(cls, query=None):
# noinspection PyUnresolvedReferences
query = query or cls.query
# noinspection PyUnresolvedReferences
for c in cls.iter_dict... | meyt/microhttp-restful | microhttp_restful/mixins/filtering.py | filtering.py | py | 2,566 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "nanohttp.context.query",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "nanohttp.context",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "nanohttp.context.query",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name... |
34123569962 | """manosBackend URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='hom... | edwardtony/manosApp | manosBackend/manosBackend/urls.py | urls.py | py | 1,458 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "rest_framework.routers.DefaultRouter",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "rest_framework.routers",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "django.conf.urls.url",
"line_number": 34,
"usage_type": "call"
},
{
"... |
75162015358 | from helper import *
from data import game_data
if __name__ == "__main__":
"""
Prints battleship info and rules
Instantiates two player objects. If is_computer=True, that player will act as a computer
Plays battleship between the two players with ships in data.json
"""
print_battleship_info()
... | lisanka93/Battleship_OOP | main.py | main.py | py | 511 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "data.game_data",
"line_number": 15,
"usage_type": "name"
}
] |
9009423262 | import calendar
from datetime import datetime as dt
from datetime import timedelta as td
"""
Python utility library for payroll calendars - weekly, biweekly, semimonthly
and monthly
https://payroll.unca.edu/sites/default/files/2016%20Payroll%20Calendar.pdf`
"""
def add_one_month(t):
"""Return a `datetime.date` ... | fogcitymarathoner/sherees-commissions | rrg/lib/reminders.py | reminders.py | py | 4,522 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "datetime.timedelta",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "datetime.timedelta",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "datetime.timedelta",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "datetime.tim... |
74949864320 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Marvin with a simple menu to start up with.
Marvin doesnt do anything, just presents a menu with some choices.
You should add functinoality to Marvin.
"""
def meImagex():
"""
Store my ascii image in a separat variabel as a raw string
"""
return r"""... | erikwi2000/python | me/kmom04/marvin3/marvin.py | marvin.py | py | 15,667 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "random.uniform",
"line_number": 176,
"usage_type": "call"
},
{
"api_name": "math.pi",
"line_number": 235,
"usage_type": "attribute"
},
{
"api_name": "math.sqrt",
"line_number": 242,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_n... |
70084879038 | from PIL import Image
class getPixelsInImage():
def __init__(self, image):
self.image = image
def getPixelsHealth(self):
im = Image.open(self.image)
red = 0
for pixel in im.getdata():
if pixel == (219, 79, 79):
red += 1
if red > 0... | icaromh/Tibia-Simple-Healers | RGB.py | RGB.py | py | 669 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "PIL.Image.open",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "PIL.Image.open",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number"... |
17786828706 | from urllib.request import urlopen
import requests
from bs4 import BeautifulSoup
import urllib.request
class Sandro:
def get_info(self, page_url):
response = requests.get(page_url)
html = response.text
soup = BeautifulSoup(html, 'html.parser')
name = soup.select_one("#title").text
... | 21october/my_first_repository | streamlit_tn/utils2/save_info.py | save_info.py | py | 2,890 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "urllib.request.urlopen",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "requests.get",
... |
25152207446 | #!/usr/bin/env python
'Explore project results'
## Copyright (C) 2010 University of Texas at Austin
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the Licen... | ahay/src | user/fomels/Mwxresults.py | Mwxresults.py | py | 5,267 | python | en | code | 237 | github-code | 97 | [
{
"api_name": "sys.stderr.write",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "sys.stderr",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "sys.exit",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "wx.Frame",
"line_number... |
31323390213 | '''
Created on 12 de abr de 2017
@author: Thiago
'''
from analytics import minhash_util
from math import sqrt
def check(dirToScreens):
import os
from os import path
files = []
for f in os.listdir(dirToScreens):
if f.endswith(".csv"):
files.append(f)
return files
def classifica... | thiagonobrega/BAP | scratch/generateSimDataLengthResults.py | generateSimDataLengthResults.py | py | 7,470 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.listdir",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "analytics.minhash_util.getDataType",
"line_number": 68,
"usage_type": "call"
},
{
"api_name": "analytics.minhash_util",
"line_number": 68,
"usage_type": "name"
},
{
"api_name": "... |
16822025187 | #!/usr/bin/env python
#
# tournament.py -- implementation of a Swiss-system tournament
#
# All Functions created by ApTr13 for obtaining the results of a Swiss Tournamnet
import psycopg2
from contextlib import contextmanager
def connect():
"""Connect to the PostgreSQL database. Returns a database con... | ApTr13/Tournament-Results | tournament.py | tournament.py | py | 4,497 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "psycopg2.connect",
"line_number": 13,
"usage_type": "call"
}
] |
36824776502 | """ https://leetcode.com/problems/minimum-speed-to-arrive-on-time/ """
from typing import List
from math import ceil
class Solution:
def minSpeedOnTime(self, dist: List[int], hour: float) -> int:
if len(dist) - 1 >= hour:
return -1
def find_time(speed: int) -> float:
retur... | YashinIlya1996/leet_code_problems | minimum_speed_to_arrive_on_time_1870.py | minimum_speed_to_arrive_on_time_1870.py | py | 1,012 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "typing.List",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "math.ceil",
"line_number": 12,
"usage_type": "call"
}
] |
14878519101 | # type: ignore
import setuptools
# read description from README.md
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
data_files = []
setuptools.setup(
name="zxlive",
version="0.1",
author="Aleks Kissinger",
author_email="aleks0@gmail.com",
description="An inte... | pandey-tushar/zxlive | setup.py | setup.py | py | 1,030 | python | en | code | null | github-code | 97 | [
{
"api_name": "setuptools.setup",
"line_number": 11,
"usage_type": "call"
}
] |
34901679280 | import harris
from PIL import Image
import numpy as np
import matplotlib.pyplot as plt
infile1 = '../Images/opencv-feature-matching-image.jpg'
infile2 = '../Images/opencv-feature-matching-template.jpg'
im1 = np.array(Image.open(infile1).convert('L'))
im2 = np.array(Image.open(infile2).convert('L'))
wid = 5
harrisim =... | huylb289/OpenCV-Python | CHAPTER2-Local Image Descriptors/harris_test_match_descriptor.py | harris_test_match_descriptor.py | py | 1,086 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.array",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "numpy.array",
"line_number": 9,... |
23444372181 |
from flask_restful import Resource
from flask import request, jsonify, make_response
from api.models import User
from api.models import Project
from api.models import Task
from api.maiin import app
from flask_login import LoginManager
from flask_login import login_user, current_user,login_required,logout_user
from fla... | hugompfer/RestFull-Web-APP | MiniP4/api/views.py | views.py | py | 9,643 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask_login.LoginManager",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "api.maiin.app",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "api.maiin.app",
"line_number": 15,
"usage_type": "argument"
},
{
"api_name": "api.models.U... |
71360650879 | import argparse
import ast
import os, sys
import os.path as osp
import shutil
from tqdm import tqdm
import numpy as np
import pandas as pd
sys.path.append("/home/data1/yw/competetion_tools/iterative-stratification")
from iterstrat.ml_stratifiers import MultilabelStratifiedKFold
def analyze_xml(file_name, max_col):
... | lyw615/code_accumulation | data_operation/iterstrat_split_fold.py | iterstrat_split_fold.py | py | 11,408 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "sys.path.append",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.path.basename",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_nu... |
24849504439 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from users.midlerdamanager import MidlerManager
from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class Configuracion(models.Model):
""" """
tasa_financiamiento = models.CharField('% tasa', max_l... | soru13/vendimia | vendimia/articulos/models.py | models.py | py | 1,349 | python | en | code | 0 | github-code | 97 | [
{
"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": "django.db.models.CharField",
"line_number": 12,
"usage_type": "call"
},
{
"api_name"... |
32920749827 | print('Importando as bibliotecas necessárias...')
# Importando as bibliotecas necessárias
from bs4 import BeautifulSoup
import urllib.request as urllib_request
import pandas as pd
import datetime
import time
from urllib.request import Request, urlopen
from urllib.error import URLError, HTTPError
import matplotlib.pyplo... | ViniViniAntunes/Praticando_Web_Scrap | rank_bancos_digitais_app_store.py | rank_bancos_digitais_app_store.py | py | 7,299 | python | pt | code | 4 | github-code | 97 | [
{
"api_name": "pandas.read_csv",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "urllib.r... |
8896298042 | '''
A GRU layer capable of teacher forcing at train time, and sampling from a softmax at test time.
# Example of use:
tgru = TerminalGRU(NCHARS, rnd_seed=42, return_sequences=True, activation='softmax', temperature=0.01, name='tgru_layer')
## Overview of code: main differences from regular GRU
- Takes in two inputs:... | aspuru-guzik-group/chemical_vae | chemvae/tgru_k2_gpu.py | tgru_k2_gpu.py | py | 17,006 | python | en | code | 434 | github-code | 97 | [
{
"api_name": "keras.backend.backend",
"line_number": 69,
"usage_type": "call"
},
{
"api_name": "keras.backend",
"line_number": 69,
"usage_type": "name"
},
{
"api_name": "keras.layers.recurrent.GRU",
"line_number": 76,
"usage_type": "name"
},
{
"api_name": "keras.... |
31392945539 | # -*- coding: utf-8 -*-
from crypt import methods
from os import access
from posixpath import split
from unicodedata import category
import requests
import time
import json
import numpy as np
import json
import ast
import os
import fnmatch
import sys
from flask_cors import *
from flask import Flask,render_template,requ... | openeuler-mirror/stortrace | vis/server.py | server.py | py | 8,519 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask.Flask",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "flask.render_... |
2177549564 | import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as ec
from selenium.webdriver.support.ui import Select
import pandas as pd
#read account from textfile
account = open... | rubydiao/Selenium-py-automation | test_acme_selenium.py | test_acme_selenium.py | py | 5,830 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.support.ui.WebDriverWait",
"line_number": 31,
"usage_type": "call"
},
... |
43860030335 | import sqlite3
from Course import Course
courses = []
roughCourses = []
def load():
conn = sqlite3.connect('classes2.db')
c = conn.cursor()
rough = []
roughCourses = c.execute('''SELECT * FROM Courses2''')
for r in roughCourses:
rough.append(r)
q = [0,1,2]
if "Fall" in r[4]... | plutztom/WhenIfGroup6 | loadCourses.py | loadCourses.py | py | 1,022 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "sqlite3.connect",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "Course.Course",
"line_number": 28,
"usage_type": "call"
}
] |
74124466558 | import cv2
import numpy as np
from os import listdir
from os.path import isfile, join
import matplotlib.image as mpimg
def calibrate_camera(camera_directory, columns, rows):
"""
Calibrates camera
:param camera_directory: directory containing only checkerboard images for calibration
:param columns: num... | squared9/Self-driving-Car | Advanced_Lane_Detection/camera.py | camera.py | py | 4,756 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "os.listdir",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path.isfile",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number... |
73639496960 | import torch
import pandas as pd
import torch.nn as nn
from data.dataset import MNISTDataset
from sklearn.model_selection import train_test_split
from torch.utils.data import DataLoader
from torch.autograd import Variable
import numpy as np
import matplotlib.pyplot as plt
EPOCHS = 20
class Linear_forward(nn.Module):
... | hobbsaustin/resume | machine-learning/digit-recongnizer/linear-forward.py | linear-forward.py | py | 2,723 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "torch.nn.Module",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "torch.nn.Sequential",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"lin... |
2206537037 | import discord
from discord.ext import commands
import database
import utils
class Misc(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command(aliases=["p"])
async def ping(self, ctx):
await ctx.send(
embed=utils.generate_embed("Pong", f"{self.bot.latency * ... | LoganHaug/reminder-bot | cogs/misc.py | misc.py | py | 403 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "discord.ext.commands.Cog",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "utils.generate_embed",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": ... |
18107242673 | from bar import views
from django.urls import path
from django.conf import settings
from django.conf.urls.static import static
from django.views.defaults import page_not_found, server_error
app_name = "Bar"
urlpatterns = [
path('', views.bar, name="bar"),
path('expenses', views.bar_expenses, name="bar_expense... | misha12390/povarDashboardREFACTORING | bar/urls.py | urls.py | py | 2,899 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.urls.path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "bar.views.bar",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "bar.views",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "django.urls.path",
... |
22851229835 | import json
import unittest
import contentstack_management
from tests.cred import get_credentials
credentials = get_credentials()
username = credentials["username"]
password = credentials["password"]
api_key = credentials["api_key"]
host = credentials["host"]
organization_uid = credentials["organization_uid"]
user_id... | contentstack/contentstack-management-python | tests/api/organizations/test_org_api.py | test_org_api.py | py | 3,357 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "tests.cred.get_credentials",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "unittest.TestCase",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "contentstack_management.Client",
"line_number": 20,
"usage_type": "call"
},
{
"a... |
70542612480 | import json, urllib.request
import requests
import textwrap
from django.shortcuts import render
from django.http import HttpResponse, FileResponse
from django.core.files.storage import FileSystemStorage
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework.permissions... | dburneo/planilla-visitas | planillavisitas/dailyforms/views.py | views.py | py | 9,996 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "urllib.request.request.urlopen",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "urllib.request.request",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "urllib.request",
"line_number": 24,
"usage_type": "name"
},
{
"api_nam... |
11087402538 | __author__ = 'Aayush Bhardwaj'
from test_sheet import dict
import json
required_keys=["row_number","test_flag","cloudprofile","deliveryprofile","securityprofile","serverprofile","slaprofile","run_tests"]
dict2=[]
for x in range(len(dict)):
specific_dict={}
if 'subtiers' in dict[x].keys():
continue
... | aayush-bhardwaj/aayush-repo | Dict_to_CSV/filter_dictionary.py | filter_dictionary.py | py | 581 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "test_sheet.dict",
"line_number": 8,
"usage_type": "argument"
},
{
"api_name": "test_sheet.dict",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "test_sheet.dict",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "test_sheet.dict",
... |
71157462720 | #!/usr/bin/env python3
import argparse
import asmmetadata
import logging
import os
import os.path
import requests
parser = argparse.ArgumentParser()
parser.add_argument("datafile")
parser.add_argument("dataroot")
args = parser.parse_args()
entry_data = asmmetadata.parse_file(open(args.datafile))
folder_data = reques... | Barro/assembly-entries-metadata | lib/grab-galleriafi.py | grab-galleriafi.py | py | 5,109 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "asmmetadata.parse_file",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path.j... |
39036454150 | # This is simple telemetry intake emulator used to debug communication protocol
import http.server
import socketserver
from http import HTTPStatus
from datetime import datetime
PORT = 8126
req_types = [
'app-started',
'app-dependencies-loaded',
'app-integrations-change',
'app-closing',
'app-heartbeat',
'g... | Owenxh/dd-trace-java | telemetry/src/test/resources/telemetry_intake_emu.py | telemetry_intake_emu.py | py | 2,020 | python | en | code | null | github-code | 97 | [
{
"api_name": "datetime.datetime.now",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "http.server.server",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "http.... |
41055143098 | import numpy as np
import pickle
import theano
import time
import constants as c
import scipy.constants as sc
import scipy.interpolate as spi
import eigen
import starry
import progressbar
import theano
import theano.tensor as tt
import mc3.stats as ms
from numba import njit
def initsystem(fit, ydeg):
'''
Uses ... | rychallener/theresa | theresa/lib/utils.py | utils.py | py | 17,997 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "starry.Primary",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "starry.Map",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "starry.kepler.Secondary",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "starry.kepler",
... |
26319691624 | """Tests for the legacy Protocol API module core implementations."""
import pytest
from decoy import Decoy
from opentrons.types import Location, Point
from opentrons.drivers.types import HeaterShakerLabwareLatchStatus
from opentrons.hardware_control import SynchronousAdapter, SyncHardwareAPI
from opentrons.hardware_co... | Opentrons/opentrons | api/tests/opentrons/protocol_api/core/legacy/test_heater_shaker_core.py | test_heater_shaker_core.py | py | 12,841 | python | en | code | 363 | github-code | 97 | [
{
"api_name": "opentrons.hardware_control.SynchronousAdapter",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "opentrons.hardware_control.modules.HeaterShaker",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "decoy.Decoy",
"line_number": 32,
"usage_typ... |
1517313308 | from langchain.agents import create_csv_agent, create_pandas_dataframe_agent
from langchain.chat_models import ChatOpenAI
import pandas as pd
from langchain.agents.agent_types import AgentType
########################################################################################################################
df = ... | jayzobalia/WitAI_Interface_Think360 | tools/OpenAI.py | OpenAI.py | py | 1,451 | python | de | code | 0 | github-code | 97 | [
{
"api_name": "pandas.read_csv",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "langchain.agents.create_pandas_dataframe_agent",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "langchain.chat_models.ChatOpenAI",
"line_number": 11,
"usage_type": "call"
... |
73327444799 | import requests
import json
import math
import time
from discord_webhook import DiscordWebhook, DiscordEmbed
from bs4 import BeautifulSoup
heromc1 = "https://discord.com/api/webhooks/1139597208669405254/0IxmwgJ5jXjFaVoXacJ3IJhYZDxZy16m3Tt_6dWBCfdCg1DfE4SR-mRO87fsFUTiB_Pw"
ofuckmc1 = "https://discord.com/api/webhooks/1... | ducchet/heromc-bantracker | main.py | main.py | py | 7,760 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "discord_webhook.DiscordWebhook",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "discord_webhook.DiscordEmbed",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 14,
"usage_type": "call"
},
{
"api_name":... |
15172939520 | from django.urls import path
from . import views
urlpatterns = [
path('', views.index),
path('register', views.register),
path('login', views.login),
path('logout', views.logout),
path('shows', views.shows),
path('shows/<id>/edit', views.edit),
path('shows/<id>/destroy', views.destroy),
... | mbensan/tv_shows | main/urls.py | urls.py | py | 427 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.urls.path",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
33220087695 | # Recomendação : Use apenas se seu computador/celular for bom.
# Autor : Kiny
# Pix : (61) 9603-5417
# Github : https://github.com/Kiny-Kiny
# WhatsApp : http://wa.me/552179180533
# Telegram : @K_iny
# Instagram : @parziovanni
# Twitter : @KinyBruno
################################... | Kiny-Kiny/WordlistCreator | main.py | main.py | py | 2,504 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "sys.stdout.write",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "sys.stdout",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "time.sleep",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "sys.stdout.flush",
"line_n... |
26302750007 | import networkx as nx
import matplotlib.pyplot as plt
G = nx.Graph()
list_nodes = [0, 1, 2, 3, 4]
G.add_nodes_from(list_nodes)
G.add_edge(1, 2, weight=2.0)
G.add_edge(2, 1, weight=1.0)
G.add_edge(2, 3, weight=2.0)
G.add_edge(4, 3, weight=4.0)
G.add_edge(0, 4, weight=2.0)
G.add_edge(0, 1, weight=5.0)
G.add_... | Aeglos007/ShortestGraphWayAlgorithms | 2D_Dijkstra/main.py | main.py | py | 1,463 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "networkx.Graph",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "networkx.dijkstra_path",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "networkx.get_node_attributes",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "net... |
31055382778 |
import numpy as np
import matplotlib.pyplot as plt
np.random.seed(123)
x1 = np.random.normal(0, 1, size=1000)
x2 = np.random.normal(-2, 3, size=1000)
x3 = np.random.normal(3, 2.5, size=1000)
x4 = np.random.normal(4, 2.5, size=1000)
x5 = np.random.normal(5, 3, size=1000)
x6 = np.random.normal(4, 2, size=1000)
# 当在同... | Sammas03/project_attn_article | statistic/test.py | test.py | py | 849 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.random.seed",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "numpy.random.normal",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.random",
... |
42321038216 | import requests
from bs4 import BeautifulSoup
def get_brands():
response = requests.get("https://www.autocaros.pl/cars/brands/")
soup = BeautifulSoup(response.text, 'html.parser')
soup = soup.findAll('div', attrs={'class':'tecdocBrands__item'})
brands = {}
for x in soup:
y=0
x=x.f... | cieply19/workshop | cars/views.py | views.py | py | 392 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 6,
"usage_type": "call"
}
] |
74686351037 | import requests
class File(object):
def __init__(self, args, nargs):
#ссылка на репозиторий с заданиями, параметр1 = занятие, параметр2 = задача
repository = lambda lesson, task: f'https://raw.githubusercontent.com/AngryBro/inf_ege_files/main/{lesson}/{task}.txt'
#имя тестового файла по умо... | AngryBro/lessonfiles | lessonfiles.py | lessonfiles.py | py | 3,557 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 35,
"usage_type": "call"
}
] |
27943531644 | from PIL import Image, ImageFont, ImageDraw
from random import randrange
from io import BytesIO
import sys
def draw_stats(img: Image, name: str):
drawer = ImageDraw.Draw(img)
# 이름 쓰기
name_coord = (25, 47)
drawer.text(name_coord, name, (255, 255, 255),
ImageFont.truetype('./fonts/HANDot... | cjh980402/Soyabot | util/python/maple_stat_dice.py | maple_stat_dice.py | py | 853 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "PIL.Image",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "PIL.ImageDraw.Draw",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "PIL.ImageDraw",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "PIL.ImageFont.truetype",
... |
25067214177 | # -*- coding: utf-8 -*-
#
# © 2016 Krux Digital, Inc.
#
#
# Standard libraries
#
from __future__ import absolute_import
#
# Third party libraries
#
import botocore
#
# Internal libraries
#
from krux.logging import get_logger
from krux.stats import get_stats
from krux.cli import get_parser, get_group
from krux_bot... | krux/python-krux-boto-iam | krux_iam/iam.py | iam.py | py | 5,453 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "krux.cli.get_parser",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "krux.logging.get_logger",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "krux.stats.get_stats",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "krux... |
39224745995 | import argparse
import logging
import os
import random
import numpy as np
import tensorflow as tf
from model.utils import Params
from model.model_fn import build_model
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('--model_dir', default='experiments/test',
... | 10zinten/Indian-Currency-Recognition | predict.py | predict.py | py | 2,438 | python | en | code | 16 | github-code | 97 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "model.utils.Params"... |
74754930238 | import matplotlib.pyplot as plt
import seaborn as sns
from moabb.analysis.meta_analysis import (
collapse_session_scores,
compute_dataset_statistics,
find_significant_differences,
)
import pandas as pd
import numpy as np
# import ptitprince as pt
import os
import joblib
import matplotlib
# ++++++++++++++++... | carraraig/ACM-in-Reduced-Dataset-Setting | MOABB_Plot/MOABB_Plot.py | MOABB_Plot.py | py | 6,900 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "moabb.analysis.meta_analysis.find_significant_differences",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 32,
"usage_type": "call"
}... |
38009258820 | import arcade
import math
from src.classes.story_manager import StoryManager
class GameManager(object):
"""Base class for the game manager.
Singleton."""
instance = None
def __new__(cls, *args, **kwargs):
if not cls.instance: # :=
cls.instance = super(GameManager, cls).__new__(... | MrTanoshii/PyWeek-35 | src/classes/managers/game_manager.py | game_manager.py | py | 2,364 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "arcade.SpriteList",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "arcade.SpriteList",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "arcade.SpriteList",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "arcade.Spr... |
11019232593 | import json
import warnings
warnings.filterwarnings('ignore')
import numpy as np
import pandas as pd
# 시각화를 위한 라이브러리
import matplotlib.pyplot as plt
import seaborn as sns; sns.set()
dataset_path = '../data'
anns_file_path = dataset_path + '/' + 'train_all.json'
# Read annotations
with open(anns_file_path, 'r') as... | boostcampaitech4lv23cv2/level2_semanticsegmentation_cv-level2-cv-12 | EDA.py | EDA.py | py | 2,032 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "seaborn.set",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line... |
42554005710 | import os
import hug
from model_server_rest.domain.model_predict import ModelPredict
class ModelEndpoint:
@staticmethod
@hug.get()
def predict(mod: str, data_path: str, data_key: str,
client_id: str = 'unknown') -> dict:
model_predict = ModelPredict(client_id=client_id)
... | garethjns/sklearn-model-server | Model-Server-REST/model_server_rest/application/model_endpoint.py | model_endpoint.py | py | 846 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "model_server_rest.domain.model_predict.ModelPredict",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 15,
"usage_type": "attribute"
},
{
"api... |
42734668807 | from django.test import TestCase
from django.core.cache import cache
from .utils import SetUpMixin
class PostsURLTests(SetUpMixin, TestCase):
def test_urls_uses_correct_template(self):
"""URL uses correct template."""
cache.clear()
response_templates_dict = {
self.author_clien... | airsofter/hw05_final | yatube/posts/tests/test_urls.py | test_urls.py | py | 1,577 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "utils.SetUpMixin",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.test.TestCase",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.core.cache.cache.clear",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "dja... |
6338274823 | from flask import Blueprint, render_template, request
bp = Blueprint('query', __name__, url_prefix='/query')
@bp.route('/', methods=('GET'))
def list():
if request.method == 'GET':
return render_template("query.html")
@bp.route('/sql', methods=('POST'))
def sql():
param = request.json
sql_str = ... | shadowinlife/TiCube | query/views.py | views.py | py | 334 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask.Blueprint",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "flask.request.method",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "flask.render_tem... |
28043085850 | # Implement the PCY algorithm for frequent itemset mining
import sys
import itertools
import time
import math
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import style
style.use('ggplot')
# Read the data from the file
def readData(filename):
data = []
with open(filename) as f:
fo... | rahulvarma5297/semester5 | ML/LAB/LAB-13/pcy.py | pcy.py | py | 2,144 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "matplotlib.style.use",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "matplotlib.style",
"line_number": 10,
"usage_type": "name"
}
] |
74621728319 | from flask import render_template, request, Flask, flash, url_for, redirect
from werkzeug.utils import secure_filename
import os
import time
from predict import prediction, detect_eyes
import sys
import json
UPLOAD_FOLDER = './static/temp'
ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg'}
IMAGE_FILE = ''
# App definition
a... | PJBWFG/pinky | app.py | app.py | py | 1,809 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask.Flask",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "flask.request.method",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "flask.render_temp... |
8537570397 | import os
import pandas as pd
from scipy.integrate import odeint
from scipy.interpolate import interp1d
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
import time
import matplotlib.pyplot as plt
from symbolic_RLC import fxu_ODE, fxu_ODE_mod
from neuralode import NeuralODE, Running... | forgi86/sysid-neural-structures-fitting | examples/RLC_example/old/RLC_ident_sat_fit_minibatch_OE_test.py | RLC_ident_sat_fit_minibatch_OE_test.py | py | 4,591 | python | en | code | 17 | github-code | 97 | [
{
"api_name": "pandas.read_csv",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "numpy.array",
"line_num... |
32849217398 | # -*- coding: utf-8 -*-
import logging
from odoo import fields, models, api
from authing.authing import Authing
from odoo.exceptions import UserError
_logger = logging.getLogger(__name__)
class AuthingUsers(models.TransientModel):
_name = 'get.authing.users'
_description = '获取用户列表'
def get_authing_users... | niulinlnc/odooExtModel | authing_login/models/res_users.py | res_users.py | py | 2,799 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "odoo.models.TransientModel",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "odoo.models",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "odoo.exc... |
23644580724 | import requests
from bs4 import BeautifulSoup
# URL da página da B3 com as cotações
url = 'https://www.b3.com.br/pt_br/market-data-e-indices/servicos-de-dados/market-data/cotacoes/'
# Fazendo uma requisição GET para a URL
response = requests.get(url)
# Verificando se a requisição foi bem-sucedida
if response.status_... | ruan332/cotacao-ativos-b3 | main.py | main.py | py | 877 | python | pt | code | 0 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 13,
"usage_type": "call"
}
] |
23599413016 | from PIL import Image
import imageio
import numpy as np
import random
import math
#########################################################################################################
def create_base_image_film(n):
'''
Create a np array of size (n,n) filled with all ones
Input Parameters : n -> Size of ... | mohd-adnaan/Image-Compression | test_case_generator.py | test_case_generator.py | py | 8,064 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.ones",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "imageio.imwrite",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 67,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_... |
31498845466 | import json
import sys
import math
from fractions import Fraction
from typing import Dict, List
import hashlib
import os.path
ZERO = Fraction(0)
ONE = Fraction(1)
class Vector:
def __init__(self, x: Fraction, y: Fraction):
self.x = x
self.y = y
@staticmethod
def from_str(s: str):
... | hasipon/icfpc2016 | hasi/convex/solve.py | solve.py | py | 5,973 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "fractions.Fraction",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "fractions.Fraction",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "fractions.Fraction",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "fractions.Fr... |
73410555839 | import os
import yaml
import subprocess
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from utils import run_sequence
RUN_FILE = './main'
PARAMS_MOD = 'params_mod.yaml'
RESULT_FILE = 'build/result_tracking_timings.csv'
os.nice(1)
# load the default parameters, this file won't be modified, ... | cdebeunne/benchmark_klt_matching | compare_klt_strats.py | compare_klt_strats.py | py | 2,245 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.nice",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "yaml.safe_load",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
... |
29509340252 | import random
import math
import numpy as np
from PIL import Image
import cv2
class RandomErasing(object):
""" Randomly selects a rectangle region in an image and erases its pixels.
'Random Erasing Data Augmentation' by Zhong et al.
See https://arxiv.org/pdf/1708.04896.pdf
Args:
proba... | ant-research/Diverse-and-Compact-Transformer | datasets/preprocessing.py | preprocessing.py | py | 3,808 | python | en | code | 13 | github-code | 97 | [
{
"api_name": "random.uniform",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "random.uniform",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "random.uniform",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_nu... |
2824887259 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2021/8/17 1:34 AM
# @Author : Swift
# @File : evaluate-reverse-polish-notation.py
# @Brief : 150. 逆波兰表达式求值
# @Method : https://leetcode-cn.com/problems/evaluate-reverse-polish-notation/
from typing import List
class Solution:
def evalRPN(self, tok... | TransformersWsz/leetcode | codetop/evaluate-reverse-polish-notation.py | evaluate-reverse-polish-notation.py | py | 1,175 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "typing.List",
"line_number": 13,
"usage_type": "name"
}
] |
1524912522 | from django.shortcuts import render
from django.views.generic import View
from .models import About, Funcionario
from categories.models import EstadoDeConservacao, Categoria
class Index(View):
def get(self, *args, **kwargs):
personalizacoes = About.objects.filter(
publicado_about=True).order_... | italosilvaf/SiteJMcars | about/views.py | views.py | py | 832 | python | pt | code | 0 | github-code | 97 | [
{
"api_name": "django.views.generic.View",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "models.About.objects.filter",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "models.About.objects",
"line_number": 10,
"usage_type": "attribute"
},
{
"ap... |
13073631321 | from __future__ import unicode_literals
import smtplib
from email.mime.text import MIMEText
from email.header import Header
from email.utils import formataddr
import time
import sys
import os
import spider
from eprc1 import EPRCPRI
sys.path.append(r'C:\Users\Administrator\Desktop\eprc')
sys.path.append(r'c:\programdat... | q870108424/code | Printing_procedure_for_eprc/Timing_EPRC/Timing.py | Timing.py | py | 3,601 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sys.path.append",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "sys.path.append",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_nu... |
6616348186 | from django.urls import path
from . import views
from .views import CreatePost, PostDetail, getAllPosts, EditPost, DeletePost
urlpatterns = [
path('',views.base, name = 'base'),
path('register', views.createUser, name = 'register'),
path('index', views.index, name= 'index'),
path('post/<int:pk>/',Post... | ptran068/django_mysql_blog | posts/urls.py | urls.py | py | 954 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "views.base",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "views.createUser",
... |
3159364549 | #!/usr/bin/env python3
import os
import copy
import argparse
import pickle
import numpy as np
import multiprocessing
from fourdvel import fourdvel
from display import display
import matplotlib.pyplot as plt
import collections
def createParser():
parser = argparse.ArgumentParser( description='driver of fourdvel... | mzzhong/fourDvel2 | fourdvel/output.py | output.py | py | 59,705 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "fourdvel.fourdvel",
"line_number": 40,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "os.path",
... |
71733538238 | # Import the course packages
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import scipy.io
import h5py
from sas7bdat import SAS7BDAT
from sqlalchemy import create_engine
import pickle
# %% 1. Introduction and flat files
# %% 1.1 Welcome to the course!
filename = 'data/16/seaslug.txt'
file = ... | Aranaur/DataCamp-Data-Scientist-with-Python | 16 - Introduction to Importing Data in Python.py | 16 - Introduction to Importing Data in Python.py | py | 12,575 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "numpy.loadtxt",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "numpy.loadtxt",
"line_number": 70,
"usage_type": "call"
},
{
"api_name": "numpy.reshape",
"line_number": 77,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.imshow",
... |
16688125060 | __all__ = ()
import keyring
import getpass
import webbrowser
from datetime import datetime, date
from collections import defaultdict
from difflib import ndiff
from typing import DefaultDict
from .sync import EntrySync
from .menu import Menu
from .toggl import TogglTrack
from . import moneybird as mb
from rich.text i... | rdb/toggl2moneybird | toggl2moneybird/commands.py | commands.py | py | 22,252 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "datetime.date",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "getpass.getuser",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "keyring.get_password",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "toggl.TogglTrack.l... |
794644772 | from flask import Flask, request, json
from pymongo import MongoClient
import redis
import pika
client = MongoClient("mongodb://mongo_database", 27017)
redis_client = redis.Redis(host='redis_cache', port=6379)
db = client.user_database
table = db.user_table
post_id = 1
comment_id = 1
app = Flask(__name__)
"""
{
... | vijaivir/socia-media-app | app/api.py | api.py | py | 2,636 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "redis.Redis",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "flask.request.json",
"l... |
40984748480 | from flask import Flask
from routes.temperature_get import temperature_get
from routes.cache import cache
import json
import time
from models.models import Weather, ListOfWeathers
def test_temperature_get():
'''
GIVEN a city name for querying
WHEN requesting via GET method
THEN weather is returned
... | teddsords/back-end-challenge | tests/test_temperature_get.py | test_temperature_get.py | py | 2,076 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask.Flask",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "routes.temperature_get.temperature_get",
"line_number": 16,
"usage_type": "argument"
},
{
"api_name": "routes.cache.cache.init_app",
"line_number": 18,
"usage_type": "call"
},
{
... |
3679373826 | #!/usr/bin/env python
# coding: utf-8
# In[114]:
def isCount(sentence):
import nltk
# nltk.download('stopwords')
# nltk.download('punkt')
from nltk.corpus import stopwords
from nltk.tokenize import RegexpTokenizer
import pandas as pd
import numpy as np
import re
import string... | rohitshantarampatil/sql-nlp | Code/isCount.py | isCount.py | py | 1,882 | python | en | code | 5 | github-code | 97 | [
{
"api_name": "nltk.corpus.stopwords.words",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "nltk.corpus.stopwords",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "pandas.read_csv",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "nlt... |
42755424846 | from flask.ext.restful import Resource
from . import api
from flask_restful import reqparse
from extension import mysql
import time
import datetime
from server import app
class MerchantFetchmetrics(Resource):
def post(self):
try:
conn = mysql.connect()
cursor = con... | codepopsicle/MyCode | Python/Whizzbuy_Work/android_webapp/API/MerchantFetchMetrics/merchant_fetch_metrics.py | merchant_fetch_metrics.py | py | 1,797 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask.ext.restful.Resource",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "extension.mysql.connect",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "extension.mysql",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "fl... |
33496549749 | import argparse
import pickle as pkl
import torch
import os
import ipdb
from allennlp.modules import Elmo
from torch.utils.data import DataLoader
from tqdm import tqdm
from classes import CareerEncoderLSTM, CareerEncoderRNN
from utils import ProfileDatasetElmo
from utils.Utils import transform_for_elmo_lj, collate_prof... | clara-gdef/seq2seq | pre_proc/representations/build_elmo_profile_reps.py | build_elmo_profile_reps.py | py | 6,349 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.path.join",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "pickle.load",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number... |
19837469538 | from urllib.request import urlopen
import html2text
def get_site(address):
print("get")
if not address.startswith('http://'):
address = "".join(['http://',address])
with urlopen(address) as stream :
html = stream.read().decode('utf8')
return str(html)
def count_word(str_input, word... | ghallberg/super5 | super5.py | super5.py | py | 724 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "urllib.request.urlopen",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "html2text.HTML2Text",
"line_number": 19,
"usage_type": "call"
}
] |
28227670959 | # Average group velocity of a given frequency
import numpy as np
import matplotlib.pyplot as plt
class ParticipationRatio(object):
"""Read Participation Ratio array"""
def readdata(self,fvelocity_data):
self.filename = fvelocity_data
self.data = np.loadtxt(self.filename)
x = self.data[:,0] #THz
y = self... | eastsheng/Tools | GroupVelocity/PlotParticipationRatio.py | PlotParticipationRatio.py | py | 1,967 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "numpy.loadtxt",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.rc",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot... |
19465504409 | import re
import botlog
from bbot.Utils import *
from bbot.StatsParser import StatsParser
S = SPACE_REGEX
N = NUM_REGEX
class PreTurnsParser(StatsParser):
def __init__(self):
StatsParser.__init__(self)
self.buymenu = True
self.recordevents = False
def get_patterns(self):
retur... | AlwaysTraining/bbot | bbot/PreTurnsParser.py | PreTurnsParser.py | py | 2,832 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "bbot.StatsParser.StatsParser",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "bbot.StatsParser.StatsParser.__init__",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "bbot.StatsParser.StatsParser",
"line_number": 11,
"usage_type": "name"
... |
42819360 | from PIL import Image
from numpy import dot,linalg, zeros, uint8, log, array
from math import cos, sin, tan, pi, floor, inf, sqrt, acos
from pickle import *
from sys import stdout
from time import time
"""
Global
"""
def lire_rendu():
return rendu
def lire_rendu_objets():
return rendu_objets
... | EmettGabrielH/Rasterization | Bibliotheque_fonctions_3d_et_2d.py | Bibliotheque_fonctions_3d_et_2d.py | py | 9,220 | python | fr | code | 1 | github-code | 97 | [
{
"api_name": "numpy.uint8",
"line_number": 36,
"usage_type": "argument"
},
{
"api_name": "PIL.Image.fromarray",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 40,
"usage_type": "name"
},
{
"api_name": "PIL.Image.fromarray",
... |
26328555211 | #!/usr/bin/env python2.7
# coding: latin-1
# (c) Massachusetts Institute of Technology 2015-2016
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your... | LivingComputingProject/cytoflow | cytoflow/views/scatterplot.py | scatterplot.py | py | 10,837 | python | en | code | null | github-code | 97 | [
{
"api_name": "traits.api.HasStrictTraits",
"line_number": 36,
"usage_type": "name"
},
{
"api_name": "traits.api.Str",
"line_number": 80,
"usage_type": "name"
},
{
"api_name": "traits.api.Str",
"line_number": 81,
"usage_type": "name"
},
{
"api_name": "cytoflow.uti... |
24596445299 | from flask import Flask
from flask import render_template
from pymongo import MongoClient
import json
import os
app = Flask(__name__)
MONGODB_URI = os.getenv('MONGODB_URI')
DBS_NAME = os.getenv('MONGO_DB_NAME')
@app.route('/')
def index():
return render_template("index.html")
@app.route("/api/austria")
def aust... | NielMc/F1 | F1.py | F1.py | py | 2,096 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask.Flask",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_numbe... |
9022631160 | from django.shortcuts import render
from markdown2 import Markdown
from . import util
from django import forms
from django.http import HttpResponseRedirect
from django.urls import reverse
import random
class NewPage(forms.Form):
Subject = forms.CharField(widget=forms.TextInput(attrs={'class' : 'form-control col-m... | ShaswatGhimire/cs50-s-wiki | encyclopedia/views.py | views.py | py | 3,303 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.forms.Form",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "django.forms.CharField",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.forms... |
26022669928 | from typing import List
class Solution:
def dailyTemperatures(self, temperatures: List[int]) -> List[int]:
n = len(temperatures)
result = [0] * n # Initialize the result list with zeros
stack = [] # Use a stack to keep track of indices
for i in range(n):
while stack a... | inshayaqoob/Leetcode-Problems | Daily-Temperatures.py | Daily-Temperatures.py | py | 742 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "typing.List",
"line_number": 4,
"usage_type": "name"
}
] |
18859775587 | import logging
import os
import random
import subprocess
from twilio.rest import Client as TwilioClient
from werkzeug.middleware.proxy_fix import ProxyFix
from flask import (
Flask,
redirect,
request,
url_for,
)
from calls import commands
from calls.models import db
from calls.utils import (
pars... | dtcooper/bmir-calls | calls/__init__.py | __init__.py | py | 4,094 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "flask.Flask",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_num... |
31749784756 | import html
import time
from pyrogram import filters
class HTMLStr(str):
pass
def command(command):
return filters.text & filters.outgoing & filters.command(command, prefixes="sg!") & ~filters.forwarded
def generate_tree(dictionary, level=0):
lines = []
if isinstance(dictionary, list):
di... | OctoNezd/spyglass | utils.py | utils.py | py | 1,288 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pyrogram.filters.text",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "pyrogram.filters",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "pyrogram.filters.outgoing",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_na... |
42046679788 | import os
import numpy as np
import math
import bpy
from rprblender.engine.context import RPRContext, RPRContext2
from rprblender.properties.light import MAX_LUMINOUS_EFFICACY
from . import mesh, image, object
from rprblender.utils.conversion import convert_kelvins_to_rgb
from rprblender.utils import logging
log = ... | GPUOpen-LibrariesAndSDKs/RadeonProRenderBlenderAddon | src/rprblender/export/light.py | light.py | py | 7,465 | python | en | code | 451 | github-code | 97 | [
{
"api_name": "rprblender.utils.logging.Log",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "rprblender.utils.logging",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "bpy.types",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "... |
29516049151 | import torch
from disprcnn.modeling.roi_heads.mask_head.inference import Masker
from disprcnn.structures.bounding_box import BoxList
from disprcnn.structures.disparity import DisparityMap
from disprcnn.structures.segmentation_mask import SegmentationMask, BinaryMaskList
from disprcnn.utils.stereo_utils import expand_b... | zju3dv/disprcnn | disprcnn/modeling/psmnet/inference.py | inference.py | py | 5,519 | python | en | code | 209 | github-code | 97 | [
{
"api_name": "disprcnn.structures.bounding_box.BoxList",
"line_number": 12,
"usage_type": "argument"
},
{
"api_name": "disprcnn.structures.bounding_box.BoxList",
"line_number": 13,
"usage_type": "argument"
},
{
"api_name": "disprcnn.structures.bounding_box.BoxList",
"line_nu... |
20645757971 | from typing import List, Optional, Union
from numpy.core.defchararray import replace
import pytorch_lightning as pl
from omegaconf import DictConfig
from torch.utils.data import DataLoader, Subset
import numpy as np
# our import
from torchvision.transforms import transforms
from src.common.utils import get_number_o... | andreabac3/study-transfer-learning-covid-19 | src/pl_data_modules.py | pl_data_modules.py | py | 6,476 | python | en | code | 10 | github-code | 97 | [
{
"api_name": "numpy.random.seed",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "pytorch_lightning.LightningDataModule",
"line_number": 20,
"usage_type": "attribute"
},
{
"ap... |
32213282596 | #!/usr/bin/env python3
from apiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
drive_service = build('drive','v3')
flow = InstalledAppFlow.from_client_secret_file(
'client_secret.json',
scopes=['https://www.googleapis.com/auth/drive.metadata.readonly']
)
if __name__ == 'm... | ChrisChrisLoLo/driveCLI | app.py | app.py | py | 346 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "apiclient.discovery.build",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "google_auth_oauthlib.flow.InstalledAppFlow.from_client_secret_file",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "google_auth_oauthlib.flow.InstalledAppFlow",
"line... |
4847124352 | import serial
import csv
import os
#Open serial port
ser = serial.Serial('COM3', 115200, timeout = 10)
#this is the header that is used in the csv file
header = ['Order ID','Pizza Name','Order Status']
#checks where the csv file is located
pizzFileName = os.path.join(os.path.dirname(__file__), 'pizzaData.csv')
while... | bogdan2002VS/University-Projects | Pizza-Shop-group/arduinoCatch.py | arduinoCatch.py | py | 1,439 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "serial.Serial",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_nu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.