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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
19464389995 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Feb 11 12:23:17 2019
@author: samas
"""
from keras.layers import Conv2D, MaxPooling2D, ZeroPadding2D
from keras.layers import Dense, Activation, Dropout, Flatten
from keras import optimizers
from keras.models import Sequential,load_model
from keras.pre... | JavaSamas/ExilantWorks | Code/ModelGeneration.py | ModelGeneration.py | py | 2,334 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "time.time",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "keras.preprocessing.image.ImageDataGenerator",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "keras.models.Sequential",
"line_number": 48,
"usage_type": "call"
},
{
"ap... |
6835009471 | # set the matplotlib backend so figures can be saved in the background
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import numpy as np
import argparse
import cv2
import os
import torch
from torch import nn
from torch import optim
import torch.nn.functional as F
from torchvision import datas... | Dilipchauhan1998/IrisSpoofDetection | test_knn.py | test_knn.py | py | 7,628 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "matplotlib.use",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "torch.nn.Module",
"line_number": 38,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",... |
1811910446 | # -*- coding: utf-8 -*-
from selenium import webdriver
from.htmltestrunner import HTMLTestRunner
class Common(object):
@classmethod
def get_chrome_driver(cls):
return webdriver.Chrome()
@classmethod
def create_report(cls, fileName, revT, revD, revTest):
with open('../TestReport/' + fi... | SalingerMa/PythonStudy | python_selenium/mod/common.py | common.py | py | 605 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "htmltestrunner.HTMLTestRunner",
"line_number": 14,
"usage_type": "call"
}
] |
74897171424 | # -*- coding: utf-8 -*-
"""
Created on Tue Sep 21 19:06:54 2021
@author: Bishop
"""
class mongoProcess:
def get_database():
from pymongo import MongoClient
import pymongo
# Provide the mongodb atlas url to connect python to mongodb using pymongo
#CONNECTION_STRING = "mongodb+s... | allapptest/flaskapi | modules/mongodb.py | mongodb.py | py | 1,540 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "{'MongoClient': 'pymongo.MongoClient', 'pymongo': 'pymongo'}.get_database",
"line_number": 44,
"usage_type": "call"
}
] |
39800192670 | """
before doing this, need to do the following:
1. clone https://github.com/mcordts/cityscapesScripts.git
2. run cityscapesScripts/cityscapesscripts/preparation/createTrainIdLabelImgs.py
```
CITYSCAPES_DATASET=xxxxxx python cityscapesscripts/preparation/createTrainIdLabelImgs.py
```
"""
from pathlib import Path
from ... | khaosjdr/simss | tools/prepare_data/create_cityscapes_ss.py | create_cityscapes_ss.py | py | 1,894 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pathlib.Path",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "tqdm.tqdm",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "shutil.copy",
"line_number": ... |
19374339468 | # -*- coding: PYTHON3 -*-
# @Author: Santosh
# @Last Modified by: Santosh
""" Fourier transform of musical instruments"""
import matplotlib.pyplot as plt
import numpy as np
import math
# READING DATA FROM PIANO.TXT AND STORING IT IN ARRAY
f1 = open('piano.txt', 'r')
lines = f1.readlines()
y_piano = []
for line in... | santosh235/com_phy | HW4/3/3.py | 3.py | py | 1,975 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "numpy.array",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.linspace",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "math.pi",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "numpy.fft.rfft",
"line_nu... |
74923015581 | import pint
import numpy as np
def buck5v8a():
"""
Cálculo de fuente switching tipo buck de 5v x 8A.
Basada en LTC1624 de Analog Devices, usando ecuaciones y modelos
de fuente buck de:
Christophe Basso. 2008. Switch-Mode Power Supplies Spice
Simulations and Practical Designs (1st. ed.).... | hidmic/airi-hw | design/electrical/calc/buck5v8a.py | buck5v8a.py | py | 7,759 | python | es | code | 0 | github-code | 7 | [
{
"api_name": "pint.UnitRegistry",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.sqrt",
"line_number": 72,
"usage_type": "call"
},
{
"api_name": "numpy.sqrt",
"line_number": 84,
"usage_type": "call"
},
{
"api_name": "numpy.pi",
"line_number":... |
27997747731 | from torch.nn.modules.loss import L1Loss
import torch
import torch.nn as nn
import torch.optim as optim
import torchvision
import torchvision.transforms as transforms
import numpy as np
import torch.nn.functional as F
import matplotlib.pyplot as plt
from torchvision import transforms
import pandas as pd
from torchsum... | erfanzar/Cnn-Custom-Object-Detection | layerCreator.py | layerCreator.py | py | 5,215 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "torch.nn.Module",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "torch.nn.ModuleList",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"lin... |
33444564783 | from fastapi import FastAPI
import datetime
from pydantic import BaseModel
from pydantic import BaseModel, Field
from typing import Optional
tags_metadata = [
{
"name": "users",
"description": "Operations with users. The **login** logic is also here.",
},
{
"name": "item... | hizuki-ishin/learn-fastapi | main.py | main.py | py | 1,319 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "fastapi.FastAPI",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "pydantic.BaseModel",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "pydantic.Field",
... |
2168090659 | from relationalai import LocalConnection
import os
import tempfile
import unittest
class TestInstallSource(unittest.TestCase):
def testInstallSource(self):
conn = LocalConnection(dbname="python-sdk")
conn.debug_level = 1
self.assertTrue(conn.create_database(overwrite=True))
self.a... | RelationalAI-oss/relationalai-sdk-python | integration_tests/test_install_source.py | test_install_source.py | py | 825 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "unittest.TestCase",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "relationalai.LocalConnection",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "tempfile.mkstemp",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "o... |
36558753482 | # Explanation and format of stats files:
#
# stored in %PROGRAMDATA%\Locktime\NetLimiter\4\Stats\*
# contains 4 files:
# * nlstatsV6.db - transfer stats per app, for IPv6 addresses
# * nlstatsV4.db - transfer stats per app, for IPv4 addresses
# * nlstats-apps.lst - known app list
# * nlstats-users.lst - known... | Spavid04/netlimiter4_stats_parser | netlimiter_stats_parser.py | netlimiter_stats_parser.py | py | 17,644 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "datetime.datetime",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "datetime.timezone",
"line_number": 50,
"usage_type": "attribute"
},
{
"api_name": "datetime.timedelta",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "datetime.... |
19547941249 | from itertools import combinations_with_replacement
def solution(n, info):
score = -1
answer = [-1]
i = list(combinations_with_replacement(range(0,11),n))
for a in i:
tmp = calculate(a, info, n)
if tmp[0] > score:
score = tmp[0]
answer = tmp[1]
return answer
... | MinHoon-LEE/Ps_Sql | Programmers/Algorithm/Python/92342/92342.py | 92342.py | py | 719 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "itertools.combinations_with_replacement",
"line_number": 6,
"usage_type": "call"
}
] |
8212636329 | from __future__ import annotations
import argparse
from pathlib import Path
import vortex.manage.cli as cli
from tornado.tasks.all import AllGroup
self_path = Path(__file__).parent.parent.parent
if __name__ == "__main__":
tasks = AllGroup(self_path / "source")
parser = argparse.ArgumentParser(
des... | binp-dev/tornado | tornado/manage/__main__.py | __main__.py | py | 784 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pathlib.Path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "tornado.tasks.all.AllGroup",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "vorte... |
74261190622 | from os import makedirs, path, umask
from time import time
from moviepy.video.io.ImageSequenceClip import ImageSequenceClip
from moviepy.editor import AudioFileClip
OUTPUT_DIR = "videos"
class VideoMaker:
def __init__(self, audio_path: str, images_path: str, duration: float, number_of_images: int, user_name: str)... | LuanEdCosta/insta-to-video | src/video.py | video.py | py | 1,165 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "os.path.exists",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "os.umask",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.makedirs",
"line_number": 21,
... |
70796232862 | #!/bin/python
# Importing Sqlite3 module
import sqlite3
# Creating Connection to movies database file with sqlite3
conn = sqlite3.connect('Find-All-Tarantino-Movies.db')
# Creating Cursor
c = conn.cursor()
# Creating Table
# c.execute("CREATE TABLE movies( title text, year integer, director text)")
# Creating List... | aniketchavan2211/aniketchavan2211 | SQL/Find All Tarantino Movies/Find-All-Tarantino-Movies.py | Find-All-Tarantino-Movies.py | py | 1,027 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "sqlite3.connect",
"line_number": 7,
"usage_type": "call"
}
] |
45702921684 | from flask import render_template, redirect, url_for, flash, session, request, make_response
from server import app, bcrypt
from server.models import *
from config import *
from server.forms import RegistrationForm, LoginForm
import datetime
from datetime import date, timedelta
import jwt
from dateutil.relative... | PikoLab/todays-outfit | 02_Web/server/routes.py | routes.py | py | 22,109 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "flask.session.get",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "flask.session",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "jwt.decode",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "server.app.config",
"l... |
22026746807 | from datetime import date
import os
import zipfile
import data
from tqdm import tqdm
import img_file.img_tif
import yandex_disk
from yandex_disk import Yadisk, local_path_yadisk
from pyinputplus import inputMenu
import send_mail
from img_file.img_tif import CheckImage
from calculation import Banner
def write_file_txt... | Sapov/tif_file | main.py | main.py | py | 6,929 | python | ru | code | 0 | github-code | 7 | [
{
"api_name": "datetime.date.today",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "os.path.isfile",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_... |
7402195969 | import numpy as np
from tensorflow.keras.models import Sequential
from tensorflow.keras.optimizers import Adam
from tensorflow.keras.layers import Activation, Input, Dropout
from tensorflow.keras.models import Model, load_model
from tensorflow.keras.layers import BatchNormalization, Concatenate, Lambda, Flatten, Dens... | sgottsch/Tab2KG | src/main/python/column_matching/column_matcher_batch.py | column_matcher_batch.py | py | 3,481 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "tensorflow.keras.layers.Input",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras.layers.Input",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras.models.Sequential",
"line_number": 29,
"usage_type": "call"
... |
2371096885 | from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render
from managment.models import CoreSettings
from .forms import ParticipantsForm, TeamsForm
def index(request):
settings = CoreSettings.objects.all()
return render(request, "base.html", {"settings": settings})
def r... | ghettoDdOS/hackaton-rsue | team_managment/views.py | views.py | py | 1,629 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "managment.models.CoreSettings.objects.all",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "managment.models.CoreSettings.objects",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "managment.models.CoreSettings",
"line_number": 9,
"usa... |
33887032127 | # coding=utf-8
# filename: benchmark.py
"""
This file includes the procedure to process the data from iperf3 with single
thread, i.e. "iperf3 -c hostname [-i time]" and draws a LINE CHART for it.
"""
import json
import numpy as np
import matplotlib.pyplot as plt
from pylab import *
import re
import statsmodels.api as ... | K9A2/my-final-year-project | python/throughput.py | throughput.py | py | 4,763 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "itertools.chain",
"line_number": 73,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 115,
"usage_type": "call"
},
{
"api_name": "numpy.average",
"line_number": 127,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.plot",
... |
40380570983 | import logging
from gi.repository import Adw
from gi.repository import Gtk, GLib, GObject
from gettext import gettext as _
logger = logging.getLogger("Vanilla:Container")
@Gtk.Template(resource_path='/org/vanillaos/ControlCenter/gtk/container.ui')
class VanillaApxContainer(Adw.ActionRow):
__gtype_name__ = "Vanil... | Vanilla-OS/vanilla-control-center | vanilla_control_center/container.py | container.py | py | 1,572 | python | en | code | 25 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "gi.repository.Adw.ActionRow",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "gi.repository.Adw",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "g... |
70336501664 | """Module containing the tests for the default scenario."""
# Standard Python Libraries
import os
# Third-Party Libraries
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ["MOLECULE_INVENTORY_FILE"]
).get_hosts("all")
def test_falcon_sensor_install... | cisagov/ansible-role-crowdstrike | molecule/default/tests/test_default.py | test_default.py | py | 823 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "testinfra.utils.ansible_runner.utils.ansible_runner.AnsibleRunner",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "testinfra.utils.ansible_runner.utils",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "testinfra.utils.ansible_runner",
"l... |
28233781778 | import allure
from allure_commons.types import AttachmentType
from locators.manager_locators import ManagerLocators
import pytest
from enums.errors_enums import ErrorMassages
from allure import severity_level
@allure.story('Scope of tests "manager page"')
class TestManagerPageElements:
buttons_locator_list = [
... | EkaterynaRuslanovna/UI | tests/test_elements/test_manager_page_elements.py | test_manager_page_elements.py | py | 1,524 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "locators.manager_locators.ManagerLocators.HOME_BUTTON",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "locators.manager_locators.ManagerLocators",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "locators.manager_locators.ManagerLocators.AD... |
16956798901 | # main.py
#
# Programmeertheorie
# Merel Florian, Michael Verdel, Joshua van Zanten
#
# - Implements several algorithms to connect houses to batteries with capacity.
from code.algorithms.random_greedy import RandomGreedy
from code.classes.smartgrid import Smartgrid
from code.algorithms.hillclimber import Hillclimber
... | Mika34a/theorie | main.py | main.py | py | 3,537 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "time.time",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 23,
"usage_type": "argument"
},
{
"api_name": "sys.argv",
"line_number": 27,
"usage_type": "argument"
},
{
"api_name": "sys.argv",
"line_number": 28,... |
7335481188 | # All rights reserved by forest fairy.
# You cannot modify or share anything without sacrifice.
# If you don't agree, keep calm and don't look at code bellow!
__author__ = "VirtualV <https://github.com/virtualvfix>"
__date__ = "$Apr 13, 2014 8:47:25 PM$"
import re
from config import CONFIG
from tests.exceptions impor... | VirtualVFix/AndroidTestFramework | src/tests/benchmarks/tools/bench/Vellamo3.py | Vellamo3.py | py | 3,221 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "tests.benchmarks.tools.base.OnlineBenchmark",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "tests.benchmarks.tools.base.OnlineBenchmark.__init__",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "tests.benchmarks.tools.base.OnlineBenchmark",
... |
15139418759 | __author__ = 'yutao'
from pymongo import MongoClient
col = MongoClient(host="166.111.7.105")["douban"]["photo"]
f_in = open("ids.txt")
ids = []
cnt = 0
for line in f_in:
print(cnt)
cnt += 1
x = line.strip()
if not col.find_one({"movie_id": line.strip()}):
ids.append(x)
f_out = open("ids.txt",... | neozhangthe1/scraper | douban/photo/photo/get_new_ids.py | get_new_ids.py | py | 380 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 5,
"usage_type": "call"
}
] |
29494466420 | # Utility file
import datetime as dt
import time
# GCP wants YYYY-MM-DD HH-MM-SS.SSSSS format (ISO format is close, but no T and want fractional seconds)
def fmt_to_std_time(date_time):
return date_time.strftime("%Y-%m-%d %H:%M:%S.%f").rstrip('0')
def micro_sec_to_std_time(raw_str_time):
date_time = dt.dat... | jonhpowell/samples | projects/kafka_consumer_to_bigquery_poc/time_utils.py | time_utils.py | py | 1,713 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "datetime.datetime.fromtimestamp",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime.fromtimestamp",
"line_number": 18,
"usage_type": "call"
},
{... |
4328098934 | import nltk
import re
import unicodedata
import string
from bs4 import BeautifulSoup
from nltk.corpus import stopwords
import warnings
warnings.filterwarnings("ignore")
def strip_html_tags(text: str):
try:
soup = BeautifulSoup(text, "html.parser")
stripped_text = soup.get_text()
except Except... | deshmukhps95/content-based-movie-recommendation-system | src/data_preprocessor.py | data_preprocessor.py | py | 2,005 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "unicodedata.normalize",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "re.sub... |
71570497183 | import itertools
from functools import wraps, partial
from app import db
from app.history_meta import create_history
def transactional(func):
@wraps(func)
def commit_or_rollback(*args, **kwargs):
from flask import current_app
try:
res = func(*args, **kwargs)
db.session... | govau/notify | api/app/dao/dao_utils.py | dao_utils.py | py | 1,378 | python | en | code | 17 | github-code | 7 | [
{
"api_name": "app.db.session.commit",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "app.db.session",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "app.db",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "flask.current_app.lo... |
1426468415 | from django.shortcuts import render
from django.http import HttpResponse, JsonResponse
from django.views.generic import View
import json
from . import Clean
from .forms import SymptomForm
from .store import getsymptoms
def home(request):
context = {'b':'Helloworld'}
return render(request,'main.html'... | manojkumarsanam/Disease-Prediction-System | website/predict/views.py | views.py | py | 1,052 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.shortcuts.render",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.views.generic.View",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "store.getsymptoms",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "d... |
19654521883 | import os.path
import csv
from csv import Dialect
import pika
import json
import unicodecsv
from flatten_json import flatten
from rabbitmq import RabbitMQProducer
from rabbitmq.RabbitMQConsumer import RabbitMQConsumer
from mdm_logging import *
from RabbitMQConsumer import *
from RabbitMQProducer import *
import sys
s... | KimJRem/MDMImport_Modules | traffic/TrafficJsonToCsv.py | TrafficJsonToCsv.py | py | 4,697 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "os.path.stat",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "csv.DictWriter",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "os.path.stat",
"line_number":... |
282120957 | from ckeditor.fields import RichTextField
from django.contrib.auth.models import User
from django.db import models
from django.db.models import Sum
from overflow.models import QuestionModel
class AnswerModel(models.Model):
answer = RichTextField(max_length=120)
views = models.PositiveIntegerField(default=0)
... | purkayasta/StackOverFlowLite | overflow/models/AnswerModel.py | AnswerModel.py | py | 1,300 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "django.db.models.Model",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "ckeditor.fields.RichTextField",
"line_number": 10,
"usage_type": "call"
},
{
"api_name... |
30013327128 | """
Converts MethodSchema's (data configurations) into Deform schemas. There is also a helper function
(get_method_schema_preview) for turning the created schema into HTML for preview purposes on the methods page.
"""
from collections import namedtuple
from datetime import date
from beaker.cache import cache_r... | jcu-eresearch/dc24-rich-data-capture | jcudc24provisioning/controllers/method_schema_scripts.py | method_schema_scripts.py | py | 7,697 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "jcudc24provisioning.models.DBSession.query",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "jcudc24provisioning.models.project.MethodSchema",
"line_number": 54,
"usage_type": "argument"
},
{
"api_name": "jcudc24provisioning.models.DBSession",
"line_n... |
9635000787 | import datetime
import gzip
import json
import urllib.request
import jsonschema
def get_indy_ada_daily_closing_prices() -> dict[datetime.date, float]:
"""Return all daily closing prices of INDY, denominated in ADA.
Closing price for e.g. 2023-03-25 is the price at 2023-03-26 00:00.
"""
ada_usd = get... | IndigoProtocol/indy-rewards | indy_rewards/coingecko_api.py | coingecko_api.py | py | 4,440 | python | en | code | 5 | github-code | 7 | [
{
"api_name": "datetime.date",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "datetime.date",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "datetime.date",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "datetime.date... |
13781791901 | from flask.helpers import flash
from server import result
from mysqlconnection import connectToMySQL
import re
class Dojo():
def __init__(self,data):
self.id = data['id']
self.name = data['name']
self.location = data['location']
self.language = data['language']
self.comment... | alsanta/Dojo_survey | dojo.py | dojo.py | py | 1,272 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "mysqlconnection.connectToMySQL",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "server.result",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "mysqlconnection.connectToMySQL",
"line_number": 29,
"usage_type": "call"
},
{
"api_n... |
4230774650 | import os
import secrets
import shutil
import subprocess
import tempfile
from fakeredis import FakeRedis
import pytest
from sirendb.core.db import db as db_
from sirendb.core.redis import redis as redis_
from sirendb.web.flask import create_app
@pytest.fixture(autouse=True)
def redis(app, client):
yield
if... | staticfox/sirendb | tests/fixtures.py | fixtures.py | py | 3,110 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "sirendb.core.redis.redis.__local",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "sirendb.core.redis.redis",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "fakeredis.FakeRedis",
"line_number": 19,
"usage_type": "name"
},
{
... |
11530065435 | from datetime import datetime
import env_var
from ApplicationService import request_info_service, reply_service
from repositories import (
user_match_repository,
user_repository,
match_repository,
hanchan_repository,
)
class ReplyHistoryUseCase:
def execute(self) -> None:
req_line_id = re... | fezzlk/mahjong-manager-bot | src/use_cases/personal_line/ReplyHistoryUseCase.py | ReplyHistoryUseCase.py | py | 4,294 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "ApplicationService.request_info_service.req_line_user_id",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "ApplicationService.request_info_service",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "repositories.user_repository.find",
"li... |
70996196063 | """
@author : MG
@Time : 2021/1/27 11:15
@File : reversion_rights_md.py
@contact : mmmaaaggg@163.com
@desc : 用于产生复权行情数据
"""
import logging
import typing
from datetime import timedelta
from enum import Enum
import pandas as pd
from ibats_utils.db import with_db_session, bunch_insert_on_duplicate_update
from ... | DataIntegrationAlliance/data_integration_celery | tasks/ifind/future/reversion_rights_md.py | reversion_rights_md.py | py | 7,441 | python | en | code | 275 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "enum.Enum",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
... |
25037150015 | """Send a notification when an async job fails."""
from email.utils import formataddr
import datetime
import logging
import os
import socket
import thread
from Products.CMFCore.utils import getToolByName
from collective.salesforce.fundraising.utils import get_settings
log = logging.getLogger(__name__)
msg_templat... | innocenceproject/collective.salesforce.fundraising | collective/salesforce/fundraising/asyncfail.py | asyncfail.py | py | 1,890 | python | en | code | 20 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "email.utils.formataddr",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "collective.salesforce.fundraising.utils.get_settings",
"line_number": 51,
"usage_type": "call"
... |
72658245022 | from django.urls import path
from hasta_la_vista_money.loan.views import (
LoanCreateView,
LoanView,
PaymentMakeView,
)
app_name = 'loan'
urlpatterns = [
path('', LoanView.as_view(), name='list'),
path('create/', LoanCreateView.as_view(), name='create'),
path('payment/create/', PaymentMakeView.... | TurtleOld/hasta-la-vista-money | hasta_la_vista_money/loan/urls.py | urls.py | py | 357 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.urls.path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "hasta_la_vista_money.loan.views.LoanView.as_view",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "hasta_la_vista_money.loan.views.LoanView",
"line_number": 10,
"usage_ty... |
74126652703 | from django.shortcuts import render
from django.views.generic import (ListView, CreateView, DeleteView,
UpdateView, DetailView)
from django.urls import reverse, reverse_lazy
from django.http import HttpResponseRedirect, HttpResponse
from django.contrib.auth.models import User
from dj... | hackmeupRuben/hackmeup | articulos/views.py | views.py | py | 4,991 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.views.generic.ListView",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "models.Articles",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "forms.SearchForm",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "forms.... |
28276746514 | # 13-5. Sideways Shooter Part 2: We’ve come a long way since Exercise 12-6,
# Sideways Shooter. For this exercise, try to develop Sideways Shooter to the
# same point we’ve brought Alien Invasion to. Add a fleet of aliens, and make
# them move sideways toward the ship. Or, write code that places aliens at
# random posi... | shaoda06/python_work | part_II_projects/exercises/exercise_13_5_sideways_shooter_part_2.py | exercise_13_5_sideways_shooter_part_2.py | py | 5,267 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "pygame.init",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "pygame.image.... |
21570388303 | import matplotlib
import numpy as np
import pygame
from abm.projects.visual_flocking.vf_agent import vf_supcalc
from abm.agent.agent import Agent
from abm.projects.visual_flocking.vf_contrib import vf_params
from abm.contrib import colors
import importlib
class VFAgent(Agent):
def __init__(self, **kwargs):
... | scioip34/ABM | abm/projects/visual_flocking/vf_agent/vf_agent.py | vf_agent.py | py | 14,058 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "abm.agent.agent.Agent",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "importlib.reload",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "abm.projects.visual_flocking.vf_agent.vf_supcalc",
"line_number": 15,
"usage_type": "argument"
}... |
22672771826 | import ctypes
from ctypes import *
import torch
import numpy as np
import os
import time
class PyScheduler:
def __init__(self, sched_lib, num_clients):
torch.cuda.set_device(0)
self._scheduler = sched_lib.sched_init()
self._sched_lib = sched_lib
self._num_clients = num_clients
... | eth-easl/orion | src/scheduler_frontend.py | scheduler_frontend.py | py | 4,575 | python | en | code | 12 | github-code | 7 | [
{
"api_name": "torch.cuda.set_device",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "torch.cuda.synchronize",
"line_number": 73,
"usage_type": "call"
},
{
"api_name": "torch.cu... |
27251939996 | # Day 35 - Rain Alert
import requests
from config import API_KEY, account_sid, auth_token, from_num, to_num
from twilio.rest import Client
MY_LAT = 40.643501
MY_LONG = -74.076202
parameters = {
'lat': MY_LAT,
'lon': MY_LONG,
'appid': API_KEY,
'exclude': 'current,minutely,daily'
}
response = requests... | CMatador/100DaysOfCode | Intermediate+/Rain_Alert/main.py | main.py | py | 896 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "config.API_KEY",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "twilio.rest.Client",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "config.account_sid",
... |
72885580383 | import builtins
import pytest
from dp_builder.requirements import Requirements
@pytest.fixture
def requirements():
return Requirements()
@pytest.mark.parametrize(
'version, expected',
[
('0.0.1', True),
('10.21.34', True),
('21.23', False),
('adb', False),
('a.1... | lexover/django_project_builder | tests/unit/test_requirements.py | test_requirements.py | py | 1,617 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "dp_builder.requirements.Requirements",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pytest.fixture",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "pytest.mark.parametrize",
"line_number": 13,
"usage_type": "call"
},
{
"a... |
6737459219 | import argparse
import utils.Audit as Audit
import utils.Purification as Forget
import sys
def parser():
"""
:return: args
"""
parser = argparse.ArgumentParser(prog='AFS')
subparsers = parser.add_subparsers(help='sub-command help')
parser_audit = subparsers.add_parser('audit')
parser_aud... | JoshuaChou2018/AFS | afs.py | afs.py | py | 6,218 | python | en | code | 5 | github-code | 7 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "utils.Audit.one_command_api",
"line_number": 132,
"usage_type": "call"
},
{
"api_name": "utils.Audit",
"line_number": 132,
"usage_type": "name"
},
{
"api_name": "uti... |
30202302404 | from typing import *
import collections
from torch.utils.data import Dataset
class EnumeratedDictDataset(Dataset[Dict]):
"""
A dataset of enumerated of dictionaries, i.e. with an index added to
each dictionary marking it's position in the dataset.
"""
source: Dataset[Dict[Any, Any]]
key: str... | wschella/ilsp | assessors/packages/torch_datatools/ops/enumerated_dict.py | enumerated_dict.py | py | 1,135 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "torch.utils.data.Dataset",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "torch.utils.data.Dataset",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "torch.utils.data.Dataset",
"line_number": 15,
"usage_type": "name"
},
{
"api_nam... |
70676685662 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Application is the glue between one or more service definitions, interface and protocol choices.
from spyne import Application
# @rpc decorator exposes methods as remote procedure calls
# and declares the data types it accepts and returns
from spyne import rpc
# ... | challenzhou/RESTful | restful/restful_server.py | restful_server.py | py | 2,202 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "spyne.ServiceBase",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "spyne.rpc",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "spyne.Integer",
"line_number": 22,
"usage_type": "argument"
},
{
"api_name": "spyne.Iterable",
"l... |
20073371029 | #Exercício101
def voto(idade):
"""
Função para descobrir se uma pessoa pode votar com a idade de acordo com o ano de nascimento.
Idade: É calculado o ano que vocês nasceu menos o ano atual.
"""
from datetime import datetime
atual = datetime.now().year - idade
if atual < 16:
... | ADMVicli/curso-em-video-python | Mundo 03/Desafio101.py | Desafio101.py | py | 614 | python | pt | code | 2 | github-code | 7 | [
{
"api_name": "datetime.datetime.now",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 14,
"usage_type": "name"
}
] |
33720803489 | from flask import Flask, render_template, request
from flask_mail import Mail,Message # pip install flask_mail
app = Flask(__name__) #Initialise app
# Config
app.config['MAIL_SERVER'] = 'smtp.gmail.com'
app.config['MAIL_PORT'] = 465
app.config['MAIL_USERNAME'] = 'yourmail@gmail.com'
app.config['MAIL_PASSWO... | Brighterbees/Python-Flask-Series-Code | Flask Ep04/app.py | app.py | py | 1,034 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "flask.Flask",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "flask_mail.Mail",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "flask.request.method",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
... |
27787742179 | import functools
import pkg_resources
import warnings
from google.oauth2 import service_account
import google.api_core.client_options
import google.api_core.gapic_v1.client_info
import google.api_core.gapic_v1.config
import google.api_core.gapic_v1.method
import google.api_core.gapic_v1.routing_header
import google.ap... | twistedpair/google-cloud-sdk | google-cloud-sdk/lib/googlecloudsdk/third_party/logging_v2/gapic/logging_service_v2_client.py | logging_service_v2_client.py | py | 36,791 | python | en | code | 55 | github-code | 7 | [
{
"api_name": "google.oauth2.service_account.Credentials.from_service_account_file",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "google.oauth2.service_account.Credentials",
"line_number": 62,
"usage_type": "attribute"
},
{
"api_name": "google.oauth2.service_account"... |
29647231523 | from datetime import datetime
from pytube import YouTube
import urllib.request
import urllib.error
import traceback
import ffmpeg
import multiprocessing
import re
import sys
import time
import os
def getPageHtml(url):
print ('[-] ' + url )
try:
yTUBE = urllib.request.urlopen(url).read().decode('utf-8')... | ZaidAfane3/DL-YT-PlayList | ytPlaylistDL.py | ytPlaylistDL.py | py | 3,808 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "urllib.request.request.urlopen",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "urllib.request.request",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "urllib.request",
"line_number": 16,
"usage_type": "name"
},
{
"api_nam... |
71432492384 | # Step 1
import sqlite3
# Connecting to the DB
conn = sqlite3.connect('DB_sub.db')
# Step 2
# creating a table in for the DB
with conn:
cur = conn.cursor()
# Step 2.1 - an auto-increment primary integer field
# Step 2.2 - a data type 'string' field
cur.execute("CREATE TABLE IF NOT EXISTS txt_files(ID ... | Klous-jan/Python-Projects | Database Submission Assignment/Database Submission Assignment.py | Database Submission Assignment.py | py | 1,281 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "sqlite3.connect",
"line_number": 5,
"usage_type": "call"
}
] |
1775974742 | from nltk.util import ngrams
from collections import defaultdict
import shap
import json
import pickle
import os
import itertools
import re
import time
import sys
import threading
if __name__ == "__main__":
ngramm = 3
how_many_shap_files = 139
corpora = 'Shapely/' # place your computed shap files address... | menya-edmond/EpidBioELECTRA | EpidShapCompute/main.py | main.py | py | 2,760 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "itertools.cycle",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "sys.stdout.write",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "sys.stdout",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "sys.stdout.flush",
... |
3422773907 | from collections import namedtuple
Point = namedtuple("Point", ["x", "y"])
RectSize = namedtuple("RectSize", ["width", "height"])
Rect = namedtuple("Rect", ["left", "top", "width", "height"])
def rect_to_xxyy(rect):
return [
rect.left,
rect.left + rect.width,
rect.top,
rect.top + ... | noshiro-pf/python_cropper_gui | src/typedefs.py | typedefs.py | py | 627 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "collections.namedtuple",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "collections.namedtuple",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "collections.namedtuple",
"line_number": 5,
"usage_type": "call"
}
] |
13710861980 | from airflow import DAG
from airflow.sensors.filesystem import FileSensor
from airflow.operators.python_operator import PythonOperator
from airflow.operators.bash_operator import BashOperator
from airflow_clickhouse_plugin.operators.clickhouse_operator import ClickHouseOperator
from datetime import datetime, timed... | Mishgun605/airflow_pipeline_project | dags/data.py | data.py | py | 6,573 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "datetime.datetime",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "datetime.timedelta",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "datetime.datetim... |
17154836551 | import operator
import sqlite3
from pathlib import Path
from queue import PriorityQueue
from typing import Tuple
db_path = f'{str(Path.home())}/.tasks.db'
Item = Tuple[int, int, str]
class Queue:
def __init__(self):
self.queue = PriorityQueue()
self.curr_id = 1
@property
def size(self) ... | tung491/pomop_queue | pomop_queue/task_queue.py | task_queue.py | py | 3,823 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pathlib.Path.home",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "typing.Tuple",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "queue.PriorityQueue",
"l... |
35061120288 | import torch
import torch.optim as optim
import torch.nn.functional as F
# Define loss function
from torch import nn
class MarginLoss(nn.Module):
def __init__(self, m_pos=0.9, m_neg=0.1, lambda_=0.5):
super(MarginLoss, self).__init__()
self.m_pos = m_pos
self.m_neg = m_neg
... | JavierMaldonado7/DeepCaps | DeepCaps/MarginLoss.py | MarginLoss.py | py | 907 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "torch.nn.Module",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "torch.eye",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "torch.sqrt",
"line_number":... |
7071191321 | import sys
from xlrd import open_workbook
import xlrd as xd
import pandas as pd
from pylab import *
from time import time
print('Network starts running')
wb = open_workbook('excel1.xlsx')
sheet = wb.sheet_by_name('Sheet1')
initdata = []
for r in range(sheet.nrows):
data1 = []
for c in range(sheet.ncols):
... | yoyofighting/MTCSsharecode | incircle1.py | incircle1.py | py | 2,307 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "xlrd.open_workbook",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "xlrd.open_workbook",
"line_number": 22,
"usage_type": "call"
}
] |
23344160855 | """
CPEN 400Q work
Helper functions to calculate the metrics such as KL-divergence of the models
Author : @abhishekabhishek
"""
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.colors
from pennylane import numpy as pnp
from jax import numpy as jnp
def filter_probs(probs, data):
"""
filte... | abhishekabhishek/UnsupGenModbyMPS | metrics.py | metrics.py | py | 5,745 | python | en | code | null | github-code | 7 | [
{
"api_name": "jax.numpy.dot",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "jax.numpy",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "jax.numpy.arange",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "pennylane.numpy.tensor",
... |
1655704991 | import os
import pytest
from sticker import Config, Sentence
def test_config(tests_root):
Config(os.path.join(tests_root, "sticker.conf"))
def test_bogus_config(tests_root):
with pytest.raises(ValueError):
Config(os.path.join(tests_root, "bogus.conf"))
def test_missing_config(tests_root):
with p... | stickeritis/sticker-python | tests/test_config.py | test_config.py | py | 1,376 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "sticker.Config",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "pytest.raises",
"line_numbe... |
37730869969 | import json, os
processed_files_path = "project/additional_files/processed_articles"
main_content_path = "project/additional_files/main_content" #abstract and data/methods
other_content_path = "project/additional_files/other_content"
if not os.path.exists(main_content_path):
os.makedirs(main_content_path)
if not... | dice-group/rich-context-competition | project/preprocessing/preprocessing_dataset_extraction.py | preprocessing_dataset_extraction.py | py | 1,283 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "os.path.exists",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "os.makedirs",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_numbe... |
36534704980 | import torch
from LightningFunc.utils import writeCSV, write_Best_model_path
from LightningFunc.optimizer import get_lr
def training_step(self, batch, batch_idx):
# training_step defined the train loop.
# It is independent of forward
x, y = batch
self.reference_image = x
out = self.forward... | Leyan529/ImageClassificationPL | LightningFunc/step.py | step.py | py | 3,612 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "torch.max",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "torch.stack",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "torch.stack",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "torch.rand",
"line_number": 30,... |
25568672345 | #!/usr/bin/env python3
from argparse import ArgumentParser
from itertools import cycle
from os import path
from sys import exit, stderr
import matplotlib
from matplotlib import pyplot as plt
from matplotlib.ticker import AutoMinorLocator
from pandas import read_csv
THRESH = 'Threshold'
MARKERS = [None]
# List of mat... | qxcv/comp2560 | scripts/plot_pck.py | plot_pck.py | py | 4,869 | python | en | code | 5 | github-code | 7 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 56,
"usage_type": "name"
},
{
"api_name": "pandas.read_csv",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_n... |
30863948253 | from Orange.widgets import widget
from pyspark.ml import Model
import pyspark
from .spark_transformer import SparkTransformer
class SparkEstimator(SparkTransformer):
class Outputs:
DataFrame = widget.Output("DataFrame", pyspark.sql.DataFrame)
Model = widget.Output('Model', Model)
def _appl... | ShahriarVelayat/weta | weta/gui/spark_estimator.py | spark_estimator.py | py | 754 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "spark_transformer.SparkTransformer",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "Orange.widgets.widget.Output",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "Orange.widgets.widget",
"line_number": 11,
"usage_type": "name"
},
{
... |
3697869504 | import numpy as np
import torch
from torch import nn
from torch.autograd import Variable
import torch.optim as optim
from torch.utils.data import DataLoader
from types import SimpleNamespace
import inspect
from quantumdraw.solver.torch_utils import DataSet, Loss, ZeroOneClipper
from quantumdraw.solver.solver_base imp... | NLESC-JCER/QuantumDraw | quantumdraw/solver/neural_solver.py | neural_solver.py | py | 5,716 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "quantumdraw.solver.solver_base.Solver",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "types.SimpleNamespace",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "torch.save",
"line_number": 43,
"usage_type": "call"
},
{
"api_name":... |
42692660896 | #!/usr/bin/evn python
#coding:utf-8
import os
try:
import xml.etree.cElementTree as ET
except ImportError:
import xml.etree.ElementTree as ET
import sys
PATH_XML = "D:\\opt\\codework\\python3code\\ssd\\SSD-Tensorflow-master\\VOC2007\\Annotations\\"
files_dict = {}
files = os.listdir(PATH_XML)
obkect_dict=... | LRJliurj/karticmath | model/ssd/SSD-Tensorflow-master/datasets/XmlUtil1.py | XmlUtil1.py | py | 919 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "os.listdir",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree.parse",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree",
"line_number": 26,
"usage_type": "name"
}
] |
35481249719 | # -*- coding: utf-8 -*-
"""Console script for sxm_player."""
import os
from multiprocessing import set_start_method
from pathlib import Path
from typing import Optional, Type
import psutil
import typer
from sxm import QualitySize, RegionChoice
from sxm.cli import (
OPTION_HOST,
OPTION_PASSWORD,
OPTION_POR... | AngellusMortis/sxm-player | sxm_player/cli.py | cli.py | py | 5,592 | python | en | code | 24 | github-code | 7 | [
{
"api_name": "typer.Option",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "typer.Option",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "typer.Option",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "typer.Option",
"line_numbe... |
42849498719 | import logging
from aiogram import types, Router, F
from aiogram.filters import Command, CommandObject
from Config import ADMIN_ID
from keyboards import ReplyKeyboard, InlineKeyboard
from .CallbackHandlers import userCallbackRout
from .CallbackData import ChangeSheduleCallbackData
from lexicon.Lexicon import weekday_na... | kulushik/ChatBotParser | handlers/UserHandlers.py | UserHandlers.py | py | 7,446 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "aiogram.Router",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "CallbackHandlers.userCallbackRout",
"line_number": 14,
"usage_type": "argument"
},
{
"api_name": "aiogram.types.Message",
"line_number": 17,
"usage_type": "attribute"
},
{
"a... |
38927042880 | # import io
# import os
# Imports the Google Cloud client library
from google.cloud import speech
from google.cloud.speech import enums
from google.cloud.speech import types
# Instantiates a client
client = speech.SpeechClient()
# # The name of the audio file to transcribe
# file_name = os.path.join(
# os.path.d... | nfrumkin/ElMingle | google API/speechtotext.py | speechtotext.py | py | 1,250 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "google.cloud.speech.SpeechClient",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "google.cloud.speech",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "google.cloud.speech.types.RecognitionAudio",
"line_number": 24,
"usage_type": "call"... |
40573403578 | import tkinter
import matplotlib
matplotlib.use('TkAgg')
import csv
import random
def Euler_dis(node1, node2):
distance=0.0
for i in range(len(node1)):
distance += (node1[i]-node2[i])**2
return distance
class node:
def __init__(self, data):
self.input = data[1:]
self.true_lab... | reroze/data_analyse | KMEANS/kmeans.py | kmeans.py | py | 6,565 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "matplotlib.use",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "random.sample",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 135,
"usage_type": "call"
},
{
"api_name": "sklearn.decomposition.PCA",
... |
38012098703 | from django.conf.urls import url, include
from django.views.generic.base import RedirectView
from findingaids.fa import views as fa_views
TITLE_LETTERS = '[a-zA-Z]'
title_urlpatterns = [
url('^$', fa_views.browse_titles, name='browse-titles'),
url(r'^(?P<letter>%s)/$' % TITLE_LETTERS, fa_views.titles_by_lett... | emory-libraries/findingaids | findingaids/fa/urls.py | urls.py | py | 2,263 | python | en | code | 6 | github-code | 7 | [
{
"api_name": "django.conf.urls.url",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "findingaids.fa.views.browse_titles",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "findingaids.fa.views",
"line_number": 9,
"usage_type": "name"
},
{
"ap... |
70079737185 | import sys
sys.path.append('./')
import time
import torch
import json
import logging
from tqdm import tqdm
from common.const import *
from common.utils import *
from torch.utils.data.distributed import DistributedSampler
from torch import nn
from torch.optim import lr_scheduler
from module.common.common_executor impor... | Asfalas/ccks_2021_ee | module/joint/joint_executor.py | joint_executor.py | py | 12,882 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "sys.path.append",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "torch.log_softmax",
"line_number": 80,
"usage_type": "call"
},
{
"api_name": "torch.argmax",
"lin... |
36370130682 | import json
import logging
from pathlib import Path
from geopandas import GeoSeries
from pystac import Catalog, Extent, SpatialExtent, TemporalExtent, Asset, MediaType, STAC_IO
from pystac.extensions.eo import Band
from sac_stac.adapters.repository import S3Repository, NoObjectError
from sac_stac.domain.model import ... | SatelliteApplicationsCatapult/pda-stac-creator | src/sac_stac/service_layer/services.py | services.py | py | 9,150 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "logging.basicConfig",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sac_stac.load_config.LOG_LEVEL",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "sac_stac.load_config.LOG_FORMAT",
"line_number": 15,
"usage_type": "name"
},
{
... |
17881109650 | import logging
from django.core.urlresolvers import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions
from horizon import forms
from horizon import messages
# from openstack_dashboard import api
from a10_horizon.dashboard.api import scaling as api
from a10_neutroncli... | a10networks/a10-horizon | a10_horizon/dashboard/a10networks/a10scaling/forms.py | forms.py | py | 5,837 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "horizon.forms.SelfHandlingForm",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "horizon.forms",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "h... |
5449511521 | import base64
import json
import subprocess
import logging
import os
from datetime import datetime, timezone
import time
import requests
import schedule
import toml
class ConsumerMonitor():
def __init__(self,
config_file: str="config.toml"):
"""
Read in the config file settings.
... | hyphacoop/cosmos-consumer-monitor | consumer_monitor.py | consumer_monitor.py | py | 17,377 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "toml.load",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "logging.error",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "logging.info",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "subprocess.run",
"line_numbe... |
36756820967 | # Data Science
# Term project - Cricket World Cup Matches Prediction
# Name : Jo Byeong Geun, Choi Ji Won, Jeong Da Hee
# Student Number : 201835528, 201835538, 201931889
# Class : Mon 5678
# Date : 2021.05.26
# Update : 2021.06.11
import pandas as pd
impo... | Jiwon116/Data-Science | project.py | project.py | py | 25,560 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "warnings.catch_warnings",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "warnings.filterwarnings",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "warnings.simplefilter",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": ... |
30507528636 | """
Python script to read compute and plot Vorticity (zeta) output from MITgcm
"""
import numpy as np
import MITgcmutils as mit
from MITgcmutils import rdmds
import matplotlib.pyplot as plt
from matplotlib import cm
import matplotlib.colors as colors
#import cv2 as cv
plt.ion()
class MidpointNormalize(colors.Normali... | gycrystle/mitgcm_postp | python/ke_plot.py | ke_plot.py | py | 7,234 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "matplotlib.pyplot.ion",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "matplotlib.colors.Normalize",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name... |
8305524871 | from __future__ import annotations
from moviepy.video.VideoClip import VideoClip, ColorClip
from moviepy.video.compositing.CompositeVideoClip import CompositeVideoClip
from .duration import Duration
from .track import Track, VisualTrack
class Scene:
def __init__(self, *tracks: Track) -> None:
super().__in... | Kieran-Lock/Reddit-GOD | shorts/video/scene.py | scene.py | py | 1,005 | python | en | code | 7 | github-code | 7 | [
{
"api_name": "track.Track",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "duration.Duration.UNDEFINED",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "duration.Duration",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "duratio... |
41297188576 | from django.conf.urls import url
from django.urls import path
from . import views, api
urlpatterns = [
path('', views.main, name='main'),
path('home/', views.home, name='home'),
path('view/<int:recipe_id>/', views.recipe, name='recipe'),
path('api/ingredients_all/', api.IngredientsAll.as_view(), name="... | smitra33/Deliveready | Deliveready/recipes/urls.py | urls.py | py | 1,313 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
21143657466 | #!/usr/bin/env python
# coding: utf-8
# ## Use MCCE method without using the Data or RandomForest class
# In[15]:
import warnings
warnings.filterwarnings('ignore')
import sys
import os
# Tricks for loading data and libraries from parent directories.
grandparent = os.path.abspath('.')
parent = os.path.abspath('./m... | alexaoh/tabular-diffusion-for-counterfactuals | mccepy/examples/Example_notebook_scratch.py | Example_notebook_scratch.py | py | 7,691 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath"... |
72648560863 | import torch
import torch.nn as nn
import torchvision
from torch.nn.utils.rnn import pack_padded_sequence
from .utils import BeamSearcher
class ImageEncoder(nn.Module):
def __init__(self, encoded_wh=14):
super(ImageEncoder, self).__init__()
self.encoded_wh = encoded_wh
resnet = tor... | hhcaz/image-caption-homework | models/showAttendTell.py | showAttendTell.py | py | 16,034 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "torch.nn.Module",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "torchvision.models.resnet101",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torchvision.... |
10252961040 | import requests
from pyquery import PyQuery as pq
import re
import os
import time
#获得初始html
headers = {'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3192.0 Safari/537.36'}
def get_html(url):
try:
r = requests.get(url,headers=headers)
if r.stat... | Hbiaohua/meizitu | spider.py | spider.py | py | 2,216 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "requests.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pyquery.PyQuery",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "pyquery.PyQuery",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_n... |
26559004068 | import pygame
import time
import sys
# Initialize Pygame
pygame.init()
# Define window dimensions
screen = pygame.display.Info()
width, height = screen.current_w, screen.current_h-50
# Set up the window display
window = pygame.display.set_mode((width, height))
pygame.display.set_caption("EEG Test Program")
# Define... | player1s/Enhance-MI-Speller | instructorProgram.py | instructorProgram.py | py | 5,841 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pygame.init",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pygame.display.Info",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "pygame.display.set_m... |
1534523180 | from django.contrib.auth.models import User
from django.shortcuts import render, redirect
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from .forms import UserRegisterForm, UserUpdateForm, ProfileUpdateForm
from .models import *
# Create your views here.
def home(request... | ywsoliman/web-project | library/views.py | views.py | py | 2,461 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.shortcuts.render",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "forms.UserRegisterForm",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "django.contrib.messages.success",
"line_number": 17,
"usage_type": "call"
},
{
"ap... |
73683679582 | from sys import stdin, setrecursionlimit
input = stdin.readline
from bisect import bisect_left, bisect_right
from collections import deque
from functools import lru_cache, reduce
from heapq import heappush, heappop
from math import sqrt, ceil, floor, log2
def rl(t = int):
return list(map(t, input().split()))
n,... | grawlixes/codeforces | contest/1661/d/main.py | main.py | py | 740 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "sys.stdin.readline",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "sys.stdin",
"line_number": 2,
"usage_type": "name"
},
{
"api_name": "collections.deque",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "math.ceil",
"li... |
72735003423 | import os
import time
from flask import render_template
from sqlalchemy import and_, or_
from sqlalchemy import desc
import hashlib
from flask import url_for, redirect, request, make_response,flash
from app.models import Users,Files
from app import app,APP_ROOT,uploadFolder
# import utility
from app import db
from fla... | anujbansal16/DropBox-App | app/views.py | views.py | py | 11,683 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "app.app.after_request",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "app.app",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "flask.session.get",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "flask.session",
... |
39994679666 | """
UI Main window functionality
"""
import sys
import os
import cv2
import pickle
import threading
import numpy as np
import PyQt5.QtGui as QtGui
import PyQt5.QtCore as QtCore
import PyQt5.QtWidgets as QtWidgets
import vat_core as vc
import vat_widgets as vw
import vat_utilities as vu
import vat_fixtracking as vft
im... | flybrains/video-annotation-tool | vat_ui.py | vat_ui.py | py | 27,750 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "PyQt5.QtWidgets.QMainWindow",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "PyQt5.QtWidgets",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtCore.pyqtSignal",
"line_number": 30,
"usage_type": "call"
},
{
"api_name... |
22672613116 | import time
from torchvision import models, datasets, transforms
import torch
import torch.nn.functional as F
from nasnet.nasnet import NASNetALarge
from nasnet.nasnet_mobile import NASNetAMobile
from utils.sync_control import *
def train_wrapper(sync_info, tid: int, model_config, shared_config):
device = torch.d... | eth-easl/orion | related/baselines/nasnet/train_nasnet.py | train_nasnet.py | py | 1,875 | python | en | code | 12 | github-code | 7 | [
{
"api_name": "torch.device",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "torch.cuda.Stream",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "nasnet.nasnet.NASNetAL... |
29286185097 | # encoding: utf-8
"""
@author: l1aoxingyu
@contact: sherlockliao01@gmail.com
"""
import os
import torch
from torch._six import container_abcs, string_classes, int_classes
from torch.utils.data import DataLoader
from fastreid.utils import comm
from . import samplers
from .common import CommDataset
from .datasets imp... | zengwb-lx/Yolov5-Deepsort-Fastreid | fast_reid/fastreid/data/build.py | build.py | py | 3,651 | python | en | code | 240 | github-code | 7 | [
{
"api_name": "os.getenv",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "datasets.DATASET_REGISTRY.get",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "datasets.DATASET_REGISTRY",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "fas... |
31726792658 | import os
from datetime import date
class ApplicantMenu(object):
def __init__(self,DB):
self.DB = DB
def createNewApplication(self):
newApplicationMenuState = 'NewApplicationMainMenuState'
newApplicationMenu = True
jobApplyDict = {'PositionApplied':'', 'DateApplied':... | kickaxxdestro/TelegramChatBot | ApplicantMenu.py | ApplicantMenu.py | py | 15,591 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "datetime.date.today",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 20,
"usage_type": "name"
}
] |
38847919273 | from itertools import product
def load_instructions(fname):
with open(fname) as fid:
lines = fid.readlines()
instructions = []
for line in lines:
if line.startswith('mask'):
mask = line.split('=')[1].strip()
instructions.append(('mask', mask))
elif line.... | nhodgson/adventofcode | day14/advent_day14.py | advent_day14.py | py | 2,582 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "itertools.product",
"line_number": 46,
"usage_type": "call"
}
] |
71586248225 | """
Solution managers actually walk a model through all the steps to solve
"""
import multiprocess
import numpy as np
import tqdm
from srlife import solverparams, thermal
def merge_dicts(idict):
"""
Merge an iterator over dictionaries into a single dict
"""
return {k: v for d in idict for k, v in ... | Argonne-National-Laboratory/srlife | srlife/managers.py | managers.py | py | 9,266 | python | en | code | 6 | github-code | 7 | [
{
"api_name": "srlife.solverparams.ParameterSet",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "srlife.solverparams",
"line_number": 49,
"usage_type": "name"
},
{
"api_name": "tqdm.tqdm",
"line_number": 107,
"usage_type": "call"
},
{
"api_name": "srlif... |
74033009823 | from selenium import webdriver
import pyautogui,time
class Duck:
def __init__(self,driver):
self.driver=driver
self.url='https://duckduckgo.com'
self.search_bar_id="search_form_input_homepage"
self.search_button="btnK"
self.first_link_class="result__url__domain"
... | HenriqueDomiciano/Projetos-Pessoais | seleniumtests.py | seleniumtests.py | py | 1,246 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pyautogui.typewrite",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Firefox",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "selenium.we... |
4391894975 | from PyQt5.QtWidgets import QSizePolicy
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.figure import Figure
from matplotlib import ticker
import numpy as np
import Meta
import Utils
class MatplotlibWidget(FigureCanvas):
def __init__(self, parent=None, wid... | jdparkins/MasiPlot | matplotlibwidget.py | matplotlibwidget.py | py | 2,059 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "matplotlib.figure.Figure",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg.__init__",
... |
30187458893 | from DataEngine.Data import get_pro_stock_basic, get_pro_daily, get_pro_monthly
import prettytable as pt
from time import sleep
def CycleObservation(code='600900.SH',sdate='20100101',edate='20210101',name='万科A'):
data = get_pro_daily(code, sdate, edate)
date = list(data['trade_date'])
date.reverse()
cl... | HustWolfzzb/Quantify | Strategy/Cycle.py | Cycle.py | py | 1,975 | python | en | code | 59 | github-code | 7 | [
{
"api_name": "DataEngine.Data.get_pro_daily",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "prettytable.PrettyTable",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "DataEngine.Data.get_pro_stock_basic",
"line_number": 35,
"usage_type": "call"
},
... |
19260240368 | """
Пожалуйста, приступайте к этой задаче после того, как вы сделали и получили ревью ко всем остальным задачам
в этом репозитории. Она значительно сложнее.
Есть набор сообщений из чата в следующем формате:
```
messages = [
{
"id": "efadb781-9b04-4aad-9afe-e79faef8cffb",
"sent_at": datetime.datet... | OlgaBastrakova/Lesson3 | PROJECT/lesson3/123.py | 123.py | py | 5,629 | python | ru | code | 0 | github-code | 7 | [
{
"api_name": "collections.Counter",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "typing.List",
"line_number": 56,
"usage_type": "name"
},
{
"api_name": "typing.Dict",
"line_number": 56,
"usage_type": "name"
},
{
"api_name": "typing.Any",
"line_nu... |
43243137179 | import requests
from datetime import datetime
import smtplib
import time
MY_LAT = -6.263623 # Your latitude
MY_LONG = 106.891586 -0.127758 # Your longitude
MY_GMAIL=""
MY_PW=""
def cek_posisi_iss():
response = requests.get(url="http://api.open-notify.org/iss-now.json")
response.raise_for_status()
data = re... | adrianrufy/python- | api iss satelite/main.py | main.py | py | 1,789 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "requests.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
... |
4303848500 | import cv2
import matplotlib.pyplot as plt
def main():
imgpath="C:\\Users\\ASH\\Downloads\\Compressed\\standard_test_images\\lena_color_256.tif"
img=cv2.imread(imgpath,1)
plt.imshow(img)
plt.title('Image with Default ColorMap') #giving title to plot
plt.xticks([])
plt.... | ash264/OpenCV_practice | COLORSPACES(Correcting color issue bw matplotlib and cv2).py | COLORSPACES(Correcting color issue bw matplotlib and cv2).py | py | 823 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "cv2.imread",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.imshow",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.