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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
72045648072 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Event',
fields=[
('id', models.AutoField(verbos... | Valuehorizon/valuehorizon-events | events/migrations/0001_initial.py | 0001_initial.py | py | 1,556 | python | en | code | 2 | github-code | 27 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.CreateModel",
"line_number": 13,
"usage_type": "call"
},
... |
31657510410 | #!/usr/bin/env python3
import argparse
import datetime
import logging
import os
import re
import sys
import time
import boto3
if "AWS_DEFAULT_REGION" not in os.environ:
print("Please set the environment variable AWS_DEFAULT_REGION")
sys.exit(1)
from snapshots_tool_utils import *
# Initialize everything
LOGL... | mvasilenko/dr-rds-share-snapshot | dst_acc_copy_shared_rds_snapshot_to_local.py | dst_acc_copy_shared_rds_snapshot_to_local.py | py | 7,673 | python | en | code | 2 | github-code | 27 | [
{
"api_name": "os.environ",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "sys.exit",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 20,... |
41176699406 | import os
import reverse_geocoder
from datadog_api_client.v2 import ApiClient, ApiException, Configuration
from datadog_api_client.v2.api import logs_api
from datadog_api_client.v2.models import *
def get_more_info_from_coordinates(min_lat, min_lon, max_lat, max_lon):
# For now, let's only take the center of the ... | johanmorganti/osm-datadog | osmUtils.py | osmUtils.py | py | 2,760 | python | en | code | 12 | github-code | 27 | [
{
"api_name": "reverse_geocoder.search",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 45,
"usage_type": "attribute"
},
{
"api_name": "datadog_api_cl... |
18175859969 | import openpyxl as xl
from openpyxl.chart import Reference, BarChart
def process_workbook(filename):
wb = xl.load_workbook(filename)
sheet = wb['Sheet1']
corrected_cell_heading = sheet.cell(1, 4)
corrected_cell_heading.value = 'prices'
for row in range(2, sheet.max_row + 1):
first_price =... | shafeeralip/Spreadsheetautomation | bot.py | bot.py | py | 817 | python | en | code | 1 | github-code | 27 | [
{
"api_name": "openpyxl.load_workbook",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "openpyxl.chart.Reference",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "openpyxl.chart.BarChart",
"line_number": 22,
"usage_type": "call"
}
] |
31470321477 | import requests
from bs4 import BeautifulSoup
from fake_headers import Headers
import json
from pprint import pprint
HOST = "https://spb.hh.ru/search/vacancy?text=python&area=1&area=2"
def get_headers():
return(Headers(browser='chrome', os='win').generate())
hh_main_html = requests.get(HOST, headers=get_headers(... | Bogoslavskiy-Evgeniy/WEB-scrapping | main.py | main.py | py | 1,719 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "fake_headers.Headers",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "requests.get",
... |
12142948547 | from flask import Flask, request, Blueprint, jsonify, abort, redirect, session, Response, current_app
import requests
import urllib.parse
import secrets
import json
import os
from cstr import fhir_config
root_api = Blueprint('root_api', __name__, url_prefix='/api')
# Endpoint: /api/test
@root_api.route('/test')
def ... | COMP3000-2018/cstr-server | cstr/api.py | api.py | py | 5,774 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "flask.Blueprint",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask.jsonify",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "flask.session",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "flask.Response",
"lin... |
38734999853 | import os
from collections import deque
from datetime import datetime, timedelta
from functools import partial
from typing import Tuple, Union, Optional, Callable, Dict
import dateutil.parser
import dateutil.tz
from stp_core.common.log import getlogger
from plenum.common.constants import TXN_TYPE, VERSION, DATA, IDEN... | phillipgibb/blockchain | hyperledger_project/framework/Hyperledger_indy-node/indy_node/server/upgrader.py | upgrader.py | py | 21,259 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "stp_core.common.log.getlogger",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "plenum.server.has_action_queue.HasActionQueue",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "indy_node.__metadata__.__version__",
"line_number": 30,
"usag... |
474602617 | import unittest
import pathlib
from src.config import parser
class TestConfigMethods(unittest.TestCase):
def setUp(self):
self.path = pathlib.Path(".").joinpath("sample user files")
self.json_path = self.path.joinpath("config.json")
self.cfg_path = self.path.joinpath("config.ini")
def... | sobasudo/fpsql | tests/test_config.py | test_config.py | py | 1,881 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "unittest.TestCase",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "pathlib.Path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "src.config.parser.load_json",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "src.con... |
16457799580 | import pyqtgraph as pg
from PyQt5 import QtCore, QtGui, QtWidgets
import pyqtgraph.dockarea as da
import datetime
import numpy as np
import pandas as pd
from picbutton import PicButton
import time
import pyqtgraph.exporters
import webbrowser
import lmfit as lm
import satlas as sat
from backend.helpers import calcHist
i... | rubendegroote/Networked-Data-Acquisition | graph.py | graph.py | py | 36,027 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "PyQt5.QtWidgets.QWidget",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "PyQt5.QtWidgets",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtCore.pyqtSignal",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "... |
38809695771 | import urllib2
import json
import lxml.html
from lxml import etree
# import feedparser
def load_res(url):
res = urllib2.urlopen(url)
return res.read()#.decode('UTF-8')
def get_full_post(page_url):
'get_full_post', page_url
page = load_res(page_url)
html = lxml.html.fromstring(page)
content = html.xpath('.//div[... | tmshv/lotoflol | feed/blendernation/blendernation.py | blendernation.py | py | 1,306 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "urllib2.urlopen",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "lxml.html.html.fromstring",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "lxml.html.html",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "lxml.htm... |
14665721824 | import os
import asyncio
from resources.modules import dirListner as dlist
from resources.modules import player as pl
async def updateFileList():
global flist
flist = dlist.DirListner("music").getFiles()
await asyncio.sleep(3)
async def playStream():
while True:
try:
for file in ... | apels1n/tg-stream-ffmpeg | main.py | main.py | py | 676 | python | en | code | 2 | github-code | 27 | [
{
"api_name": "resources.modules.dirListner.DirListner",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "resources.modules.dirListner",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "asyncio.sleep",
"line_number": 10,
"usage_type": "call"
},
{
"... |
4183488715 | from flask import Flask, render_template, request, redirect, url_for, session, jsonify, Blueprint, abort
from flask_cors import CORS, cross_origin
from subsidiary_functions import *
from flask_login import LoginManager, UserMixin, login_required, login_user, logout_user, current_user
from log_config import logging
impo... | hardlanebakura/PythonFlaskVirtualPiano | routing/routes_profile.py | routes_profile.py | py | 2,486 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "flask.Blueprint",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask_login.current_user.username",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "flask_login.current_user",
"line_number": 13,
"usage_type": "name"
},
{
"ap... |
15866462684 | import json
import pika
class RabbitMQ:
def __init__(self, host='localhost'):
"""
RabbitMQ connector initializer.
Parameters:
host: The host of the RabbitMQ server.
"""
self.connection = None
self.channel = None
self.host = host
def __ente... | OfriShapira/eshop-automation-qa-project | utils/rabbitmq/rabbitmq_send.py | rabbitmq_send.py | py | 4,226 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "pika.BlockingConnection",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "pika.ConnectionParameters",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 62,
"usage_type": "call"
}
] |
72607958151 | """
Created by adam on 11/6/16
"""
__author__ = 'adam'
# import MySQLdb
import sqlalchemy
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import scoped_session
from CommonTools.Credentialing.CredentialTools import CredentialLoader
from CommonTools.Utili... | AdamSwenson/TwitterProject | TwitterDatabase/DatabaseAccessObjects/DataConnections.py | DataConnections.py | py | 6,696 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "sqlalchemy.ext.declarative.declarative_base",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.create_engine",
"line_number": 51,
"usage_type": "name"
},
{
"api_name": "CommonTools.Credentialing.CredentialTools.CredentialLoader",
"line_numbe... |
41825220826 | from asyncio import wait, FIRST_COMPLETED
from discord import Embed, Member, Status, Activity, File
from discord.ext.commands import Cog, group, command, Greedy
from functools import partial
from os import environ, execv, remove
from requests import post
from sys import executable, argv
from cogs.converters import Com... | xastrobyte/Omega-Psi | cogs/developer/developer.py | developer.py | py | 51,342 | python | en | code | 4 | github-code | 27 | [
{
"api_name": "discord.ext.commands.Cog",
"line_number": 36,
"usage_type": "name"
},
{
"api_name": "util.database.database.database.bot.get_usage_data",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "util.database.database.database.bot",
"line_number": 57,
"usa... |
42217920390 | """
This module provides an implementation of the Todd-Coxeter
algorithm for coset enumeration. The solve function accepts
the presentation of a group and subgroup, and outputs the
completed table of cosets of the subgroup. The coxeter and
schlafli functions perform the same task, but accept the
coxeter graph and the s... | qifanyyy/JupyterNotebook | new_algs/Abstract+algebra/Todd-Coxeter+algorithm/toddcox.py | toddcox.py | py | 4,794 | python | en | code | 8 | github-code | 27 | [
{
"api_name": "typing.List",
"line_number": 156,
"usage_type": "name"
}
] |
5864929705 | import json
import os
import requests
from Reuse import environment
from Reuse import report_writer
# from Reuse import directories_and_files
# Reporting for: https://api.dynatrace.com/spec/
# Creating an OAuth Client:
# Old UI: Person Icon > Account Settings > Pick Account if needed > Identity & access management >... | Dynatrace-Dave-Mauney/Automation | Reporting/AccountManagementAPI/report_account_management.py | report_account_management.py | py | 20,556 | python | en | code | 3 | github-code | 27 | [
{
"api_name": "os.getenv",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "Reuse.environment.get_boolean_environme... |
1264679828 | import laspy
import numpy as np
import os
def extract_points_by_coordinates(input_file, output_file, min_x, max_x, min_y, max_y, min_z, max_z):
# LASファイルを読み込みます
inFile = laspy.file.File(input_file, mode='r')
# 座標範囲に基づいてポイントをフィルタリングします
x_range = np.logical_and(inFile.x >= min_x, inFile.x <= max_x)
... | feles-ao42/obj_clop_tool | las.py | las.py | py | 1,755 | python | ja | code | 0 | github-code | 27 | [
{
"api_name": "laspy.file.File",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "laspy.file",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "numpy.logical_and",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.logical_and",
... |
17942628716 | # submission link: https://leetcode.com/submissions/detail/261651753/
from collections import defaultdict
class Solution:
def search_from_map(self, m, a, b, target):
if target not in m:
return False
cnt = m[target]
if target in (a, b) and cnt >= 2 and target != 0:... | Drifter-J/Algorithm-Lickers | mcjung/3sum.py | 3sum.py | py | 1,296 | python | en | code | 7 | github-code | 27 | [
{
"api_name": "collections.defaultdict",
"line_number": 19,
"usage_type": "call"
}
] |
12587947175 | import numpy as np
import matplotlib.pyplot as plt
from pathlib import Path
import torch
from torch import nn
import os
from personalization_tools.personalizer import Personalizer
from personalization_tools.sensor_recorder_data_reader import SensorRecorderDataReader
from personalization_tools.dataset import Dataset, R... | Alexsogge/MasterProject | Webserver/personalization.py | personalization.py | py | 7,158 | python | en | code | 3 | github-code | 27 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "personalization_tools.s... |
16513184420 | import math
from typing import Dict
import numpy as np
import torch
import torch.nn as nn
from .base import SequentialBuilder, ContextPolicyMixin
from ..utils import *
class InverseDynamicsMLP(SequentialBuilder):
def __init__(self, config):
super().__init__(config)
self.z = None
# for compati... | magenta1223/skill-basedGCRL | LVD/modules/subnetworks.py | subnetworks.py | py | 6,299 | python | en | code | 1 | github-code | 27 | [
{
"api_name": "base.SequentialBuilder",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "torch.cat",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "base.ContextPolicyMixin",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "base.Sequent... |
71973773191 | """ This code is shared for review purposes only. Do not copy, reproduce, share, publish,
or use for any purpose except to review our ICML submission. Please delete after the review process.
The authors plan to publish the code deanonymized and with a proper license upon publication of the paper. """
from pathlib impo... | aodongli/Latent-Outlier-Exposure | ntl/utils.py | utils.py | py | 4,635 | python | en | code | 1 | github-code | 27 | [
{
"api_name": "pathlib.Path",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "yaml.load",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "yaml.FullLoader",
"line_number":... |
29216919237 | # This script attempts to find global minimum by iteratively finding local minimum and randomizing the coordinates
# Rus using: python randomized_optimization.py [potential] [number of particles] [iterations] [output file]
import numpy as np
from scipy.optimize import minimize
import utils
import potentials
from sys... | oboril/programming-assignment | excercise4_potentials/randomized_optimization.py | randomized_optimization.py | py | 3,091 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "sys.argv",
"line_number": 14,
"usage_type": "argument"
},
{
"api_name": "sys.argv",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "potentials.potentials",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "potentials.potential... |
29944440315 | #!/usr/bin/env python3
""" Babal use in get text """
from flask import (
Flask,
render_template,
request,
)
from flask_babel import (
Babel,
gettext,
)
from typing import Any
class Config(object):
""" config class for babel """
LANGUAGES = ["en", "fr"]
BABEL_DEFAULT_LOCALE = "en"
B... | Jesulayomy/alx-backend | 0x02-i18n/3-app.py | 3-app.py | py | 909 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "flask.Flask",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "flask_babel.Babel",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "flask.request.accept_languages.best_match",
"line_number": 30,
"usage_type": "call"
},
{
"api_name"... |
37599954353 | # 测试批标准化
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
import matplotlib.cm as cm
class dateset():
def __init__(self,images,labels):
self.num_examples=len(images) # 样本数量
self.images=np.reshape(images/255.,[-1,28*28]) # 图片归一化加扁平化
self.labels=np... | one-leaf/tensorflow | book/deeplearning/code/08-2.py | 08-2.py | py | 4,815 | python | en | code | 11 | github-code | 27 | [
{
"api_name": "numpy.reshape",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.eye",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.random.choice",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_... |
11696322287 | import testtools
from hashlib import md5
from swiftclient.service import SwiftService, SwiftError
import swiftclient
class TestSwiftPostObject(testtools.TestCase):
def setUp(self):
self.spo = swiftclient.service.SwiftPostObject
super(TestSwiftPostObject, self).setUp()
def test_create(self):... | UTSA-ICS/openstack-cvrm | python-swiftclient/tests/unit/test_service.py | test_service.py | py | 4,482 | python | en | code | 1 | github-code | 27 | [
{
"api_name": "testtools.TestCase",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "swiftclient.service",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "swiftclient.service.SwiftError",
"line_number": 22,
"usage_type": "argument"
},
{
... |
19773356719 | from django.urls import include, path
from parts.app.views import item_class, partsnumber
app_name = "partsnumber"
urlpatterns = [
# Parts Pattern
path(
"", partsnumber.PartNumberTemplateView.as_view(), name="parts_number_index_view"
),
path(
"create",
partsnumber.PartNumberCr... | heljhumenad/parts-arrival | parts/app/partsnumber/urls.py | urls.py | py | 1,600 | python | en | code | 1 | github-code | 27 | [
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "parts.app.views.partsnumber.PartNumberTemplateView.as_view",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "parts.app.views.partsnumber.PartNumberTemplateView",
"line_number"... |
19231725212 | import pyttsx3
import datetime
import speech_recognition as sr
import wikipedia
import smtplib
import webbrowser as wb
import os
import pyjokes
engine = pyttsx3.init()
def speak(bol):
engine.say(bol)
engine.runAndWait()
def time():
Time=datetime.datetime.now().strftime("%I:%M:%S")
sp... | craj26/AI-ASSISTANT | jarvis.py | jarvis.py | py | 1,901 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "pyttsx3.init",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "datetime.da... |
18930673967 | """Class of TwitterAuthWebClientInterceptor."""
from threading import Lock
from typing import List, Optional
from stweet.auth import AuthTokenProvider, SimpleAuthTokenProvider
from stweet.exceptions.too_many_requests_exception import \
TooManyRequestsException
from stweet.http_request import (RequestDetails, Reque... | markowanga/stweet | stweet/twitter_api/twitter_auth_web_client_interceptor.py | twitter_auth_web_client_interceptor.py | py | 3,764 | python | en | code | 530 | github-code | 27 | [
{
"api_name": "stweet.http_request.WebClient.WebClientInterceptor",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "stweet.http_request.WebClient",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 22,
"usage_type": ... |
72407162313 | import os
from xlsxwriter import Workbook
from view.work_sheet_creator import WorkSheetCreator
from utils.constant import Constant
class ExcelViewer:
def __init__(self, data_dict: dict, file_path: str):
self._data_dict = data_dict
self._file_path = file_path
def generate_view(self):
... | Ascend/att | profiler/compare_tools/view/excel_view.py | excel_view.py | py | 572 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "xlsxwriter.Workbook",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "view.work_sheet_creator.WorkSheetCreator",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.chmod",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": ... |
27906797672 | ############## 1.PyTorch-Transformersの基本 ##############
# PyTorch-Transformersのモデル
import torch
from pytorch_transformers import BertForMaskedLM
msk_model = BertForMaskedLM.from_pretrained('bert-base-uncased') # 訓練済みパラメータの読み込み
print(msk_model)
from pytorch_transformers import BertForSequenceClassification
sc_model ... | tomohirok8/MachineLearning | scripts/BERT_exercise.py | BERT_exercise.py | py | 8,823 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "pytorch_transformers.BertForMaskedLM.from_pretrained",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pytorch_transformers.BertForMaskedLM",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "pytorch_transformers.BertForSequenceClassification.from_p... |
73291660872 | import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
import numpy as np
import matplotlib.pyplot as plt
from random import randrange
def loadData():
with np.load('notMNIST.npz') as dataset:
Data, Target = dataset['images'], dataset['labels']
posClass = 2
negClass = 9
dataIndx ... | akyildizdeniz/Machine-Learning | A1/starter.py | starter.py | py | 10,990 | python | en | code | 1 | github-code | 27 | [
{
"api_name": "tensorflow.compat.v1.disable_v2_behavior",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "tensorflow.compat.v1",
"line_number": 2,
"usage_type": "name"
},
{
"api_name": "numpy.load",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": ... |
40031598687 | import argparse
from PIL import Image
from . import term_colors
class GreyShades:
terminal_colors = {
'BL': 234, 'DG': 340, 'LG': 247, 'WH': 254, 'ER': 1
}
def __init__(self, black, dark_grey, light_grey, white):
self.colors = [black, dark_grey, light_grey, white]
self.color_map... | vfournier11/pokemon-red-clone | tools/tile_map_generator/tile_map_generator/generate_tile_map.py | generate_tile_map.py | py | 9,097 | python | en | code | 5 | github-code | 27 | [
{
"api_name": "PIL.Image.open",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 66,
"usage_type": "name"
},
{
"api_name": "PIL.Image.open",
"line_number": 129,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number... |
69915523272 | import numpy as np
import operator
import matplotlib.pyplot as plt
dataSet = [['sunny', 'hot', 'high', 'FALSE', 'no'],
['sunny', 'hot', 'high', 'TRUE', 'no'],
['overcast', 'hot', 'high', 'FALSE', 'yes'],
['rainy', 'mild', 'high', 'FALSE', 'yes'],
['rainy', 'cool', 'normal', ... | chouzz/machine-learning | my_DecisionTree/my_DecisionTree.py | my_DecisionTree.py | py | 9,353 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "numpy.log2",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "operator.itemgetter",
"line_number": 70,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 161,
"usage_type": "call"
},
{
"api_name": "matplotlib.p... |
22807367362 | from bifrost import npm, node
import streamlit as st
# Create a Streamlit app
st.title("Machine Learning App")
# Create dropdowns for model and dataset selection
selected_model = st.selectbox("Select ML Model", ["Model A", "Model B", "Model C", "Custom"])
selected_dataset = st.selectbox("Select Dataset", ["... | Bobliuuu/DAG | backend/taipy/run.py | run.py | py | 666 | python | en | code | 1 | github-code | 27 | [
{
"api_name": "streamlit.title",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "streamlit.selectbox",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "streamlit.selectbox",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "streamlit.write... |
6752473586 | """
Train Class1 pan-allele models.
"""
import argparse
import os
from os.path import join
import signal
import sys
import time
import traceback
import random
import pprint
import hashlib
import pickle
import uuid
from functools import partial
import numpy
import pandas
import yaml
import tqdm # progress bar
tqdm.mon... | openvax/mhcflurry | mhcflurry/train_pan_allele_models_command.py | train_pan_allele_models_command.py | py | 24,454 | python | en | code | 173 | github-code | 27 | [
{
"api_name": "tqdm.monitor_interval",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "local_parallelism.add_local_parallelism_args",
"line_number": 131,
"usage_type": "call... |
42668177970 | # Aula 02 - Pratica 3: Figura Geometrica
#Bibliotecas:
import cairo
import math
# Fução
surface=cairo.ImageSurface(cairo.FORMAT_ARGB32,512,256)
# Variavel
c=cairo.Context(surface)
# Função Pintar
c.paint()
# Função Cor
c.set_source_rgb(0,0,1)
# Função Espessura
c.set_line_width(6)
# Função retangulo
c.rect... | caduleite/computacao-grafica | pratica3.py | pratica3.py | py | 681 | python | pt | code | 0 | github-code | 27 | [
{
"api_name": "cairo.ImageSurface",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "cairo.FORMAT_ARGB32",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "cairo.Context",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "math.pi",
... |
43740221065 | import matplotlib.pyplot as plt
import numpy as np
from gridlod_on_perturbations.data import restore_all_data
from gridlod_on_perturbations.visualization_tools import drawCoefficient_origin, draw_f, draw_indicator
from matplotlib import cm
import matplotlib
# matplotlib.style.use('ggplot')
matplotlib.rc('font', family=... | gridlod-community/gridlod-on-perturbations | 2d_applications/data/HeKeMa_2019/plot.py | plot.py | py | 5,242 | python | en | code | 1 | github-code | 27 | [
{
"api_name": "matplotlib.rc",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "matplotlib.rcParams",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.rcParams",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "gridlo... |
10800705798 | import numpy as np
import os
import sys
import matplotlib.pyplot as plt
from interpolate import imageInterpolate
patharg = sys.argv[1]
framePath = patharg+"/imagedata.npy"
avePath = patharg+"/avgtemp.npy"
allframe = np.load(framePath)
avetemp = np.load(avePath)
diff_queues = []
for i in range(len(allframe)):
diff_q... | grid-eye/grideye | countpeople/analyseSequence.py | analyseSequence.py | py | 1,080 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "sys.argv",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "numpy.load",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.load",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 14... |
71451726472 | from pvleopard import create
from nltk.tag import pos_tag
from nltk.tokenize import word_tokenize
leopard = create(access_key="nk9fLX10chKKm7GoLD5LXM9C/R+Wluajw4p7mgmSA3gCEL11u6DVVA==")
def is_guessable(text):
"""Return a boolean whether the text provides at the very least some information to make it gue... | ComputerMachine/name-that-episode | scripts/sr.py | sr.py | py | 974 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "pvleopard.create",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "nltk.tag.pos_tag",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "nltk.tokenize.word_tokenize",
"line_number": 10,
"usage_type": "call"
}
] |
73495120713 | import json
import os
import requests
from .cache import cached
from .utils import norm_title
_API_URL = 'http://ws.audioscrobbler.com/2.0/'
_API_KEY = os.environ.get('API_KEY')
@cached
def api_call(method, **params):
"""Return JSON result of calling the LastFM API `method` with `params`."""
if _API_KEY is No... | itamaro/make-my-music-metadata-great-again | mmmmga/musicapi.py | musicapi.py | py | 1,726 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "os.environ.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "cache.cached",
"line_... |
41443969913 | import random
import pickle
import torch as th
import numpy as np
import pandas as pd
from tqdm import tqdm
from collections import *
import scipy.sparse as ssp
def group_pointwise_df(df: pd.DataFrame) -> pd.DataFrame:
res = df.groupby("sess_id").agg(list)
res['next_item'] = res['product_id'].apply(lambda x:... | Xiuchen519/Amazon-KDDCUP-23 | simple_method/graph/co_occur_graph.py | co_occur_graph.py | py | 10,493 | python | en | code | 4 | github-code | 27 | [
{
"api_name": "pandas.DataFrame",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "pandas.DataFrame",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "pandas.DataFrame",
"line_number": 40,
"usage_type": "attribute"
},
{
"api_name": "pan... |
73869115273 | """Tools for supporting iterations (iterable, iterators, generators, etc.).
"""
# standard imports
from typing import Generator, Iterable
import os
# toolbox imports
from ..typing import Protocol
class SizedIterable(Protocol):
"""An :py:class:`Iterable` with a known length.
"""
def __len__(self):
... | CogSciUOS/DeepLearningToolbox | dltb/util/itertools.py | itertools.py | py | 3,684 | python | en | code | 7 | github-code | 27 | [
{
"api_name": "typing.Protocol",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "typing.Generator",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "typing.Generator",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "typing.Iterable",
... |
33961420001 | """ implement rankedCUCB bandit algorithm
Lily Xu
July 2021 """
import numpy as np
import gurobipy as gp
from gurobipy import GRB
import sys
from ranked_cucb import RankedCUCB
def compute_target_rank(group_distrib):
""" for naive prioritization baseline, precompute the rank metric for each target
uses the r... | lily-x/rankedCUCB | ranked_linear.py | ranked_linear.py | py | 11,509 | python | en | code | 1 | github-code | 27 | [
{
"api_name": "numpy.zeros",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "ranked_cucb.RankedCUCB",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "numpy.sqrt",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "numpy.log",
"line_n... |
26718288347 | from collections import deque
import sys
input = sys.stdin.readline
N, M = map(int, input().split())
matrix = [[0] * N for _ in range(N)]
union, start = deque(), deque()
for i in range(1, M+1):
x, y = map(int, input().split())
x -= 1; y -= 1
union.append((x, y))
matrix[x][y] = i
parent = [i... | tnpfldyd/TIL | 백준/Platinum/14868. 문명/문명.py | 문명.py | py | 1,473 | python | en | code | 3 | github-code | 27 | [
{
"api_name": "sys.stdin",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "collections.deque",
"line_number": 7,
"usage_type": "call"
}
] |
23787484855 | import socket
import subprocess
import argparse
import threading
import queue
def port_scan(target_port):
connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
connection.connect((args.target_address,target_port))
with lock:
print ('PORT {} IS OPEN'.format(target_port))
connection.close()
e... | madawaladw/DW-Python3Scripts | Port-Scanner.py | Port-Scanner.py | py | 939 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "socket.socket",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "socket.AF_INET",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "socket.SOCK_STREAM",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "subprocess.cal... |
1833232924 | import sys
import re
from typing import ForwardRef
from jinja2 import Template
class Field:
name: str
def __init__(self, name: str, type: str):
self.name = name
self.type = type
def dump(self):
print("\t" + self.name)
class Clazz:
name: str
compat_clazz: 'Clazz'... | rsveldema/dyna_sw_update_arch | metagen/metagen.py | metagen.py | py | 6,258 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "re.split",
"line_number": 125,
"usage_type": "call"
},
{
"api_name": "re.match",
"line_number": 130,
"usage_type": "call"
},
{
"api_name": "re.match",
"line_number": 131,
"usage_type": "call"
},
{
"api_name": "jinja2.Template",
"line_number": 14... |
26776734158 | import traceback
from typing import Any
import pandas as pd
import pyarrow.parquet as pq
import s3fs
from metadata.ingestion.source.database.datalake.utils import (
read_from_avro,
read_from_json,
)
from metadata.utils.constants import CHUNKSIZE
from metadata.utils.logger import utils_logger
logger = utils_l... | surenganne/metadata | ingestion/src/metadata/utils/s3_utils.py | s3_utils.py | py | 2,933 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "metadata.utils.logger.utils_logger",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "typing.Any",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "typing.Any",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "pandas.read_... |
34200375478 | #%% PERCEBTILE OF SWBGT
import xarray as xr
import matplotlib.pyplot as plt
import time
import numpy as np
from scipy import stats
import plotfunctions as plotfunc
import matplotlib.gridspec as gridspec
output_dtype = float
timestart = "1900-01-01"
timeend = "2010-12-31"
city = "kiel"
rolling_window = 4*365
latitude_... | nilsnevertree/Trends-in-Heat-Stress-over-Europe | Scripts/Timeseries/timeseries.py | timeseries.py | py | 8,638 | python | en | code | 1 | github-code | 27 | [
{
"api_name": "numpy.array",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.exp",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "xarray.apply_ufunc",
"line_num... |
35109068151 | import pandas as pd
import numpy as np
import time
from cassandra.cluster import Cluster
import datetime
def get_session(cluster):
try:
return cluster.connect()
except:
return None
print("Starting ELT Process")
# Configuration de la connexion à Cassandra
cluster = Cluster(['cassandra'])
sess... | SanaHassen/Elastic-Search-Project | src/etl.py | etl.py | py | 4,153 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "cassandra.cluster.Cluster",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "pandas.melt",
... |
11411801169 | from django.http import HttpResponse
from django.template import loader
from django.shortcuts import render
from django.shortcuts import redirect
from .models import Shop
from .models import Rubric
from django.views.generic.edit import CreateView
from django.urls import reverse_lazy
from .forms import ShopForm
def in... | RuSlan0605/justcode1 | shop/views.py | views.py | py | 1,265 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "django.template.loader.get_template",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "django.template.loader",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "models.Rubric.objects.all",
"line_number": 14,
"usage_type": "call"
},
{
... |
15453308277 | import time
from selenium.webdriver.common.by import By
from utilities.customlogger import LogGenerator
from utilities.reusablecomponents import scroll_to_end
class cart:
add_to_cart = "//button[@class='_2KpZ6l _2U9uOA _3v1-ww']"
remove_button = "//div[contains(text(),'Remove')]"
remove_button_alert = "d... | Geethapasala/pytestpractice | pages/cart_page.py | cart_page.py | py | 1,103 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "utilities.customlogger.LogGenerator.loggen",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "utilities.customlogger.LogGenerator",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.common.by.By.XPATH",
"line_number": 23,
... |
40308709034 | # paddle.py
import pygame
from utils.colors import WHITE
from .game_object import GameObject
from config import HEIGHT
class Paddle(GameObject):
"""Player for pong"""
def __init__(self, obj_id, x, y, width, height, controls):
GameObject.__init__(self, obj_id, x, y)
self.controls = controls
... | cmcummings/pong | objects/paddle.py | paddle.py | py | 1,340 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "game_object.GameObject",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "game_object.GameObject.__init__",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "game_object.GameObject",
"line_number": 12,
"usage_type": "name"
},
{
"api_... |
28785827904 | from __future__ import annotations
import csv
from pathlib import Path
from typing import List
from ooodev.dialog.msgbox import MsgBox, MessageBoxType, MessageBoxButtonsEnum, MessageBoxResultsEnum
from ooodev.utils.lo import Lo
from ooodev.office.write import Write
from ooodev.utils.gui import GUI
from ooodev.utils.fi... | Amourspirit/python-ooouno-ex | ex/auto/writer/odev_make_table/start.py | start.py | py | 2,850 | python | en | code | 7 | github-code | 27 | [
{
"api_name": "pathlib.Path",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "csv.reader",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "typing.List",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number":... |
14078895814 |
# coding: utf-8
# In[2]:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn import linear_model
from sklearn.linear_model import LinearRegression
#from sklearn.linear_model import Ridge
from sklearn.linear_model import Lasso
from sklearn.model_selection import ... | Nirmal1313/Regression-Methods | lasso_regression_housing price.py | lasso_regression_housing price.py | py | 11,183 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "pandas.read_csv",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "pandas.concat",
"line_number": 79,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figur... |
74234073326 | import os
import random
import torch
from torchvision.datasets import ImageFolder
from torchvision import transforms
from torch.utils.data.dataloader import DataLoader
from utils import default_device, constants
from utils.image_folder_with_path import ImageFolderWithPaths
torch.manual_seed(constants.RANDOM_SEED)
d... | DoVanDung98/interview_wowAI | data_loader.py | data_loader.py | py | 2,326 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "torch.manual_seed",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "utils.constants.RANDOM_SEED",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "utils.constants",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "ut... |
3223726306 | from pathlib import Path
from secrets import token_bytes
from typing import Any, Dict, List, Optional
from blspy import G2Element
from littlelambocoin.clvm.spend_sim import SimClient, SpendSim
from littlelambocoin.consensus.default_constants import DEFAULT_CONSTANTS
from littlelambocoin.types.announcement import Annou... | BTCgreen-Network/LLC-NFT-minting-tool | tests/cli_clients.py | cli_clients.py | py | 7,899 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "littlelambocoin.types.blockchain_format.program.Program.to",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "littlelambocoin.types.blockchain_format.program.Program",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "littlelambocoin.clvm.spend_sim... |
27878463909 | from tensorflow.keras.models import load_model as load
import cv2
import numpy as np
MIN_AREA = 200 # like 10x20 pixels for one number
MAX_AREA = 7200 # like 60x120 pixels for one number
OUTPUT_SIZE = (28, 28)
def load_model(path: str):
model = load(path)
return model
def predict(recognition_model, filt... | yinozemcev/phone_recognition | recognition_utility.py | recognition_utility.py | py | 4,753 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "tensorflow.keras.models.load_model",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.argmax",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "cv2.cvtCo... |
74331044552 | #!/usr/bin/python
#coding:utf-8
import requests
import json
from config import *
import sys
reload(sys)
sys.setdefaultencoding('utf8')
def ChatWithTuling(Content,Openid):
inputText = {'text': Content}
userInfo = {'apiKey': TulingApiKey, 'userId': Openid}
perception = {'inputText': inputText}
data = {... | JEVEM624/Techbelife_Wechat | ChatRobot.py | ChatRobot.py | py | 615 | python | en | code | 2 | github-code | 27 | [
{
"api_name": "sys.setdefaultencoding",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 18,
"usage_type": "call"
}
] |
21923056683 | from pydrive2.drive import GoogleDrive
from pydrive2.auth import GoogleAuth
filepath_json = f'/Users/radioproducer/Documents/verslibre-mixcloud/credentials.json'
local_base_path = '/Users/radioproducer/Documents/verslibre-mixcloud'
folderid_profiles = "1t7JgNd4U1oQEYw4NTdHPUFAIxd9YJWq3"
local_temp=f"{local_base_path}/... | mjoes/verslibre-mixcloud | src/mixcloud/config.py | config.py | py | 1,254 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "pydrive2.auth.GoogleAuth",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "pydrive2.drive.GoogleDrive",
"line_number": 35,
"usage_type": "call"
}
] |
16961335540 | import time
from twisted.internet.defer import Deferred
# configure pydra and django environment
from pydra.config import configure_django_settings, load_settings
configure_django_settings()
load_settings()
from pydra.cluster.constants import *
from pydra.cluster.master import scheduler
from pydra.cluster.module imp... | MostAwesomeDude/pydra | pydra/tests/cluster/master/test_scheduler.py | test_scheduler.py | py | 39,789 | python | en | code | 5 | github-code | 27 | [
{
"api_name": "pydra.config.configure_django_settings",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pydra.config.load_settings",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pydra.models.TaskInstance",
"line_number": 42,
"usage_type": "call"
},
... |
4639653358 | from django.contrib.auth.models import User
from django.template import Library
from object_permissions.models import Group
from object_permissions.registration import get_user_perms, get_users_all
register = Library()
@register.filter
def permissions(user, object):
"""
Returns the list of permissions a use... | klpdotorg/KLP-MIS | klpmis/object_permissions/templatetags/object_permission_tags.py | object_permission_tags.py | py | 1,567 | python | en | code | 4 | github-code | 27 | [
{
"api_name": "django.template.Library",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "object_permissions.models.Group",
"line_number": 28,
"usage_type": "argument"
},
{
"api_name": "django.contrib.auth.models.User",
"line_number": 44,
"usage_type": "name"
},... |
39888864777 | import os
import cv2
from skimage.feature import hog
# Define HOG parameters
orientations = 9
pixels_per_cell = (8, 8)
cells_per_block = (3, 3)
visualize = False
transform_sqrt = False
feature_vector = True
# Define directory containing images
directory = 'PlantVillage\Potato___healthy'
# Loop over all images in dir... | vivekbiragoni/sem4 | IT258-DS/dataan.py | dataan.py | py | 1,280 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "os.listdir",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "os.path.isfile",
"line_numbe... |
25334517455 | import json
import logging
from copy import deepcopy
from datetime import datetime, timedelta
from flask import request
from flask.views import MethodView
from flask import make_response, jsonify, render_template
from typing import Any, Dict, List
from dynaconf import settings
from service.redis_service import redis... | guanfeix/tem_image_filter | views/statistics_view.py | statistics_view.py | py | 4,672 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "flask.views.MethodView",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "flask.request.args.get",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "flask.request.args",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": ... |
23753467370 | from unittest.mock import Mock
from model_bakery import baker
import pytest
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from booking.models import GiftVoucher, MembershipType, GiftVoucherType
from booking.tests.helpers import make_data_privacy_agreement, make_online_discl... | rebkwok/sunshine | conftest.py | conftest.py | py | 4,466 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "pytest.fixture",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.models.User.objects.create_user",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.models.User.objects",
"line_number": 20,
"usage_ty... |
28759786014 | #!/usr/bin/env python
import argparse
from config import AppConfig, read_config
from app_cmd.build_lo_test import builder
def _create_parser(name: str) -> argparse.ArgumentParser:
return argparse.ArgumentParser(description=name)
def _args_test(parser: argparse.ArgumentParser, config: AppConfig) -> None:
parse... | Amourspirit/python-ooouno | app.py | app.py | py | 1,315 | python | en | code | 2 | github-code | 27 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "attribute"
},
{
"ap... |
36444373477 | #!python3
import os
import datetime
import shutil
import struct
import argparse
import yaml
import asyncio
from bleak import BleakClient, BleakError, BleakScanner
import pickle
import json
import functools
from appdirs import user_config_dir
import telegram_send
IS_LINUX = os.name == 'posix'
IS_WINDOWS = os.name == 'n... | backslashV/idasen-controller | idasen_controller/main.py | main.py | py | 17,974 | python | en | code | null | github-code | 27 | [
{
"api_name": "os.name",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.name",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "struct.pack",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "struct.pack",
"line_number"... |
31501256294 | """
Minimal example running ACV on a Potts model analyzing
Philly crime data. Currently, the leave-one-out folds are
sequentially processed but using parallel computing, like
Pool from multiprocessing, is straightforward.
"""
# standard libraries
import numpy as np
import matplotlib.pyplot as plt
from tqdm import... | SoumyaTGhosh/structured-infinitesimal-jackknife | leave_within_structure_mrf.py | leave_within_structure_mrf.py | py | 1,780 | python | en | code | 1 | github-code | 27 | [
{
"api_name": "structij.utils.genMRFdatafolds",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "structij.models.potts.Potts",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 33,
"usage_type": "call"
},
{
"api_name":... |
14786559497 | from pygame import Vector2
import pygame
from TD.entity import Entity, EntityType
from TD.gui import GUIPanel, GUILabel, MenuCursor
from TD.assetmanager import asset_manager
from TD.config import SCREEN_RECT
from TD.scenes.main_menu.components import StartButton, StartButtonGroup, SoundsButton, MusicButton
from TD i... | chrisrossx/TotalDestruction | TD/scenes/level/pause_menu.py | pause_menu.py | py | 3,878 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "TD.gui.GUIPanel",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "TD.entity.EntityType.DIALOG",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "TD.entity.EntityType",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": ... |
6172837768 | import pandas as pd
from sklearn import tree
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import OneHotEncoder
enc = OneHotEncoder(handle_unknown='ignore')
def main():
df = pd.read_csv(r"TypeWeather.csv")
#y_one_hot_encoder = LabelBinarizer()
#print(df.shape)
#pri... | cobywissing/weatherLearning | typeWeather.py | typeWeather.py | py | 2,243 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "sklearn.preprocessing.OneHotEncoder",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 24,
"usage_type": "call"
},... |
18709900061 | import os
import glob
import datetime
import logging
import psycopg2
from airflow import DAG
from airflow.utils.dates import days_ago
from airflow.operators.python import PythonOperator
# from airflow.operators.postgres_operator import PostgresOperator
from airflow.providers.postgres.operators.postgres import Postgres... | vinkrish/data-engineering | Data Modeling with Postgres/dag/demo.py | demo.py | py | 3,393 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "datetime.timedelta",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "airflow.DAG",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "datetime.datetim... |
23371366137 | import argparse
import csv
import constants
from models.model import Model
import pandas as pd
from typing import Dict
import json
from utils import Stats
import numpy as np
import matplotlib.pyplot as plt
import os
import datetime
def parse_args():
parser = argparse.ArgumentParser()
return parser.parse_args... | Dhrumilsoni/rmds | e2e/evaluation.py | evaluation.py | py | 7,128 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pandas.Series",
"line_number": 41,
"usage_type": "attribute"
},
{
"api_name": "utils.Stats",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "pandas.concat"... |
28876117757 | import json
import rasa_sdk.endpoint as ep
from typing import Sequence
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace import ReadableSpan
from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanExporter
def test_server_webhook_custom_action_is_instrumented(
... | RasaHQ/rasa-sdk | tests/tracing/instrumentation/test_tracing.py | test_tracing.py | py | 2,334 | python | en | code | 274 | github-code | 27 | [
{
"api_name": "opentelemetry.sdk.trace.TracerProvider",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "opentelemetry.sdk.trace.export.in_memory_span_exporter.InMemorySpanExporter",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "rasa_sdk.endpoint.create_app",... |
16405872250 | import tkinter
from datetime import datetime
from difflib import SequenceMatcher
from tkinter import *
import pyperclip
import wikipedia
import webbrowser, re, ModuleFile, SearchMod
from idlelib.colorizer import ColorDelegator
from idlelib.percolator import Percolator
import tk as tk
from customtkinter impo... | OWAIS086-web/fyp | main.py | main.py | py | 28,538 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "ModuleFile.words",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "hashlib.md5",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "tkinter.ttk.Notebook",
"line_number": 83,
"usage_type": "call"
},
{
"api_name": "tkinter.ttk",
... |
24764084129 | import bpy
import numpy as np
import bmesh
def ZugzTriTemplate(N = 3):
templateList = []
def AddFace(A, B, C):
nonlocal templateList
templateList += [A[0], A[1], B[0], B[1], C[0], C[1]]
def Vect2DirectRatioPoint(A, B, r = 1 / 3):
A = np.array(A)
B = np.array(B)
AB... | rdfzZFWANG/ZFWANG_FractalTriangle | Export/Blender.py | Blender.py | py | 5,301 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "numpy.array",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": ... |
20532886208 | import face_recognition
import cv2
import numpy as np
from .gaze_tracking import GazeTracking
from App.MongoDBConnection import db
import os, json
class Recognition:
def __init__(self):
self.video_capture = cv2.VideoCapture(0)
self.blinkDetectNum=10
self.__running=True
def eyeTrack(se... | mustafasanli0/MultipleAuthenticationSystem | Modules/FaceRecognition.py | FaceRecognition.py | py | 5,326 | python | en | code | 4 | github-code | 27 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "gaze_tracking.GazeTracking",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "cv2.putText",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "cv2.FONT_HERS... |
16355883637 | from django.shortcuts import render,HttpResponse
from .models import Candidate,Voter,Official,Voted
import pytesseract
import cv2
from time import sleep
from django.db.models import F
# Scanning image to extract aadhar number from aadhar card
def aadharscanning():
key = cv2. waitKey(1)
webcam = cv2.VideoCaptur... | bhudolbhardwaj/E-votingSystem | Evoting_app/views.py | views.py | py | 4,556 | python | en | code | 1 | github-code | 2 | [
{
"api_name": "cv2.waitKey",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pytesseract.image_to_string",... |
7309521234 | from django.urls import path
from dashboard.views import indexDashboardAtlet, indexDashboardPelatih, indexDashboardUmpire
app_name = 'dashboard'
urlpatterns = [
path('dashboard_atlet/', indexDashboardAtlet, name='dashboard_atlet'),
path('dashboard_pelatih/', indexDashboardPelatih, name='dashboard_pelatih'),
... | dhiwarya/tk-basdat-kel9 | dashboard/urls.py | urls.py | py | 398 | python | en | code | 1 | github-code | 2 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "dashboard.views.indexDashboardAtlet",
"line_number": 7,
"usage_type": "argument"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name":... |
18213621761 | from rdflib import Graph, URIRef, RDFS
def orchestrate_extraction(source_ontology_file: str, top_class_uri_str: str, extracted_ontology_file: str):
source_ontology = Graph()
source_ontology = source_ontology.parse(source=source_ontology_file, format='n3')
top_class = URIRef(top_class_uri_str)
extract... | UrbanOnto/urbanonto | urbanonto_tools/ontology_initial_import/modularisation/ontology_extractor.py | ontology_extractor.py | py | 1,630 | python | en | code | 2 | github-code | 2 | [
{
"api_name": "rdflib.Graph",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "rdflib.URIRef",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "rdflib.Graph",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "rdflib.URIRef",
"line_numbe... |
36561630249 | import os
import argparse
import datetime
import calendar
import shutil
#os.chdir
# os.path.exists(test_path)
# os.listdir(picture_path)
# os.path.getsize(filePath),
# print(datetime.datetime.fromtimestamp(os.path.getctime(f))) # time of creation
# print(os.stat(f).st_mode)
class File:
def __init__(self, fName,... | Traxiny/FileSorter | sorter.py | sorter.py | py | 2,915 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "os.path.dirname",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "os.path.realpath",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"l... |
39579829162 |
from django.urls import path,include
from . import views
app_name='store'
urlpatterns = [
path('', views.index, name='inicio'),
#paypal
path('product/pay/paypal/<int:pk>', views.make_pay_paypal, name='make_pay_paypal'),
path('product/pay/paypal/<int:pk>/<str:code>', views.make_pay_paypal, nam... | jhondil/djangoVue | applications/store/urls.py | urls.py | py | 1,261 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
37373300517 | import math
import helper
import posenet
import numpy as np
from tensorflow.keras.optimizers import Adam
from scipy.spatial.transform import Rotation
directory = 'D:\\keras-posenet-master\\datasets\\rgb_real\\'
dataset_train_direct = 'dataset_train.txt'
dataset_test_direct = 'dataset_test.txt'
model_arc="posenet"
if ... | efesthefirst/posenet_pose_estimation | test.py | test.py | py | 5,436 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "posenet.create_posenet",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras.optimizers.Adam",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "posenet.euc_loss1x",
"line_number": 34,
"usage_type": "attribute"
},
{
"a... |
15231893955 | """
Data preprocessing:
- Missing value imputation
- Remove the outliers
- Smooth and filter the data
- Add new features to the dataset
- Cut the dataset and reduce its size if necessary
"""
# In[] Import the libraries
import os
import pickle
import pandas as pd
from utils import preprocessing as preProc... | mustafa-sarshar/SmartGait | Design-models-from-scratch/SmartGait_01/02_Data_Preprocessing.py | 02_Data_Preprocessing.py | py | 3,242 | python | en | code | 6 | github-code | 2 | [
{
"api_name": "os.listdir",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "pandas.options",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "utils.preprocessing.datase... |
29905843948 | import xml.etree.cElementTree as et
import os
from os.path import isfile
import codecs
import cleaning as cl
import re
def validXml(text):
text = re.sub("<","<",text)
text = re.sub(">", ">", text)
text = re.sub('"', """, text)
text = re.sub("'", "'", text)
text = re.sub("&... | RymaBmzz/TAL-Project | xmlGenerator.py | xmlGenerator.py | py | 3,214 | python | en | code | 1 | github-code | 2 | [
{
"api_name": "re.sub",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 11,
"usage_type": ... |
73603250606 | import copy
import os
import time
import sys
import tqdm
from baselines.common.vec_env.dummy_vec_env import DummyVecEnv
from pytorch_rl.a2c.envs import make_env
sys.path.append(os.path.dirname(__file__))
from pytorch_rl.a2c.model import CNNPolicy, MLPPolicy
from pytorch_rl.a2c.storage import RolloutStorage
from pytor... | ethanluoyc/pytorch-rl | pytorch_rl/a2c/agent.py | agent.py | py | 11,171 | python | en | code | 1 | github-code | 2 | [
{
"api_name": "sys.path.append",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_num... |
26455246537 | from keras.models import Sequential
from keras.layers import Dense
from keras.layers import LSTM
from keras.layers import Dropout
from keras.layers import Activation, LSTM, Merge, TimeDistributed, Bidirectional
from keras.optimizers import SGD
import config
#
# this script is for defining different models for testing
... | grayy921013/SmartRing | model.py | model.py | py | 3,040 | python | en | code | 1 | github-code | 2 | [
{
"api_name": "keras.models.Sequential",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "keras.models.Sequential",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "keras.layers.LSTM",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "con... |
27410960492 | from torch import nn
from torchvision import models
def load_model(config):
"""
The function of loading a model by name from a configuration file
:param config:
:return:
"""
arch = config.model.arch
num_classes = config.dataset.num_of_classes
if arch.startswith('resnet'):
model... | AlexanderParkin/MCS2022.Baseline | models/models.py | models.py | py | 536 | python | en | code | 9 | github-code | 2 | [
{
"api_name": "torchvision.models.__dict__",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "torchvision.models",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "torch.nn.Linear",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "t... |
4462653798 | r"""
The file creates a pickle file where the values needed for loading of dataset is stored and the model can load it
when needed.
Parameters from hparam.py will be used
"""
import argparse
import os
import sys
import time
import torch
from torch.utils.data import DataLoader
from tqdm import tqdm
from src.hparams i... | shivammehta25/Neural-HMM | generate_data_properties.py | generate_data_properties.py | py | 6,678 | python | en | code | 136 | github-code | 2 | [
{
"api_name": "torch.cuda.is_available",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "torch.max",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "torch.zeros",
"... |
3030877175 | #!/usr/bin/env python
# This example follow the guidelines explained at:
# https://docs.obspy.org/tutorial/code_snippets/trigger_tutorial.html
from obspy.core import read
from filterpicker import filterpicker as FP
# Read the trace
st = read("https://examples.obspy.org/ev0_6.a01.gse2")
st = st.select(component="Z")
... | mbagagli/filterpicker | examples_tests/obspy_script.py | obspy_script.py | py | 599 | python | en | code | 24 | github-code | 2 | [
{
"api_name": "obspy.core.read",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "filterpicker.filterpicker.FilterPicker",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "filterpicker.filterpicker",
"line_number": 15,
"usage_type": "name"
}
] |
2691501310 | from conan.tools.microsoft import msvc_runtime_flag
from conans import CMake, ConanFile, tools
from conans.errors import ConanInvalidConfiguration
import os
required_conan_version = ">=1.43.0"
class LibtorrentConan(ConanFile):
name = "libtorrent"
description = (
"libtorrent is a feature complete C++ ... | orgTestCodacy11KRepos110MB/repo-4943-conan-center-index | recipes/libtorrent/all/conanfile.py | conanfile.py | py | 9,627 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "conans.ConanFile",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "conans.tools.Version",
"line_number": 81,
"usage_type": "call"
},
{
"api_name": "conans.tools",
"line_number": 81,
"usage_type": "name"
},
{
"api_name": "conans.errors.Conan... |
19751933234 | import os
import argparse
import joblib
# ...
from azureml.core import Run, Dataset
from azureml.core.run import _OfflineRun
import utils
def main(dataset_name, model_name, output_dir):
run = Run.get_context()
ws = utils.retrieve_workspace()
# Get dataset
dataset = Dataset.get_by_name(ws, name=data... | sramayanam/mlopstoolkit | src/train.py | train.py | py | 2,254 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "azureml.core.Run.get_context",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "azureml.core.Run",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "utils.retrieve_workspace",
"line_number": 14,
"usage_type": "call"
},
{
"api_name":... |
34270654174 | import requests
import os
import json
import firebase_admin
from firebase_admin import credentials
from firebase_admin import firestore
import re
# To set your enviornment variables in your terminal run the following line:
# export 'BEARER_TOKEN'='<your_bearer_token>'
def create_headers(bearer_token):
headers = ... | coltonmack/Champion_SmartPatch | twitter-bot.py | twitter-bot.py | py | 4,003 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "requests.get",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number":... |
2663657239 | import base64
inp = '72bca9b68fc16ac7beeb8f849dca1d8a783e8acf9679bf9269f7bf'
res = []
for i in range(int(len(inp)/2)):
print(i)
chunk = inp[2*i: 2*i+2]
chunk_int = int(chunk, 16)
print(chunk, chunk_int)
res.append(chunk_int)
print(base64.b64encode((bytearray(res))))
| ClemensFMN/PythonStuff | cryptohack/general_3.py | general_3.py | py | 291 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "base64.b64encode",
"line_number": 14,
"usage_type": "call"
}
] |
28904010140 | from flask import render_template, jsonify
from app import app
import random
import tweepy
import TextBlob
#login twitter - auth code
consumer_key = ''
consumer_secret = ''
access_token = ''
access_secret = ''
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token,access_secret... | jonokay1/MakeMoneyWithMachineLearning | Week 2/flask-boilerplate-master/app/views/main.py | main.py | py | 1,316 | python | en | code | 1 | github-code | 22 | [
{
"api_name": "tweepy.OAuthHandler",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "tweepy.API",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "app.app.route",
... |
72888958135 | from typing import TYPE_CHECKING, Any, Dict, Optional, Sequence, Set, Tuple
import dace
from dace.frontend.python.common import SDFGConvertible
from gt4py.cartesian.backend.dace_backend import SDFGManager
from gt4py.cartesian.backend.dace_stencil_object import DaCeStencilObject, add_optional_fields
from gt4py.cartesi... | GridTools/gt4py | src/gt4py/cartesian/backend/dace_lazy_stencil.py | dace_lazy_stencil.py | py | 2,521 | python | en | code | 92 | github-code | 22 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "gt4py.cartesian.lazy_stencil.LazyStencil",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "dace.frontend.python.common.SDFGConvertible",
"line_number": 16,
"usage_typ... |
11073732301 | from __future__ import annotations
import sys
from dataclasses import dataclass
from functools import reduce
assert sys.platform.startswith("win"), f"{__name__} requires Windows"
import ctypes.wintypes # noqa: E402
LPVOID = ctypes.wintypes.LPVOID
# Invalid handle value.
INVALID_HANDLE_VALUE = ctypes.c_void_p(-1).v... | gorakhargosh/watchdog | src/watchdog/observers/winapi.py | winapi.py | py | 11,586 | python | en | code | 6,043 | github-code | 2 | [
{
"api_name": "sys.platform.startswith",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "sys.platform",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "ctypes.wintypes.wintypes",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": ... |
17810823966 | from django.db import models
from django.shortcuts import redirect, render
from .models import Dojos, Ninjas
def index(request):
context = {
'dojos' : Dojos.objects.all(),
'ninjas' : Ninjas.objects.all(),
}
return render(request, "home.html", context)
def add_dojo(request):
name =... | JansenRachel/Dojos_Ninjas_Template | dojo_ninjas_proj/dojo_ninjas_app/views.py | views.py | py | 897 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "models.Dojos.objects.all",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "models.Dojos.objects",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "models.Dojos",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "models.N... |
15925830645 | import asyncio
import logging
import os
from typing import TYPE_CHECKING
import aiohttp
import genshin
from aiohttp import web
from discord import Locale
from dotenv import load_dotenv
from genshin.errors import GenshinException
from genshin.utility import geetest
from hoyo_buddy.bot.logging import setup_logging
from... | seriaati/hoyo-buddy | web_server.py | web_server.py | py | 8,088 | python | en | code | 3 | github-code | 2 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "logging.getLogger",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "dotenv.load_dotenv",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "os.environ"... |
31391574020 | import json
definition = """chinese+china,mexican,italian,indian+india,german,jewish,spanish,canadian+french can,japanease,asian,irish,caribbean,middle east,indonesian,vietnamese,polish,russian,british+english,hungarian+hungary,oriental,thai+thailand,greek,turkish,american+so. america+america+new orleans+new york,kore... | sarnthil/thesis | miscellaneous/classifying/prepare_data.py | prepare_data.py | py | 1,244 | python | en | code | 3 | github-code | 22 | [
{
"api_name": "json.loads",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 19,
"usage_type": "call"
}
] |
12650104608 | from PySide6.QtWidgets import QApplication, QMainWindow, QLabel
from PySide6.QtCore import Qt, QPoint
class ExampleApp(QMainWindow):
def __init__(self):
super().__init__()
class DraggableLabel(QLabel):
def __init__(self, text, parent):
super().__init__(text, parent)
... | KatrinBnk/WaterDispenser | test.py | test.py | py | 1,523 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "PySide6.QtWidgets.QMainWindow",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "PySide6.QtWidgets.QLabel",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "PySide6.QtCore.QPoint",
"line_number": 14,
"usage_type": "call"
},
{
"api_na... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.