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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11196792955 | from datetime import date
import logging
from pathlib import Path
BASE_DIR = Path(__file__).resolve().parent
class Logger:
def __init__(self):
log_date = date.today()
self.logger = logging.getLogger()
file_handler = logging.FileHandler(f'{BASE_DIR}/log/{log_date}.log', mode='a')
l... | doccommit/socketio230530 | server/logger.py | logger.py | py | 633 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pathlib.Path",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "datetime.date.today",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "logging.getLogger",
... |
33703345014 | import numpy as np
import scipy.stats
import warnings
import numba
import tqdm
def lik_log_gamma(params, y):
"""
Computes the log likelihood of a Gamma distribution with the given parameters
and data points.
Args:
params: [alpha, beta] for a Gamma distribution
Returns:
log likeli... | derekqin8/bebi103_ec | software/utils.py | utils.py | py | 3,310 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.inf",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "numpy.sum",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "scipy.stats.stats.gamma.logpdf",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "scipy.stats.s... |
4790980336 | from flask import abort, Blueprint, current_app, flash, jsonify, Markup, redirect, render_template, request, session, url_for
from flask_login import current_user, login_required, login_user, logout_user
from ..data import query_to_list
from ..helpers import generate_selection
from .forms import WardrobeForm, UppersFo... | rbed23/fashion-wardrobe-tracking | fashion_wardrobe_tracker/wardrobe/views.py | views.py | py | 7,096 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Blueprint",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "flask.current_app.logger.info",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "flask.current_app.logger",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_n... |
27054741012 | import matplotlib
import seaborn as sns
import warnings
from matplotlib import pyplot as plt
matplotlib.use("TkAgg")
warnings.filterwarnings("ignore")
def hist(df):
df.hist()
plt.tight_layout()
plt.show()
def hist_plot(df, params=None):
# sns.histplot(x='Pregnancies', data=df, color='red')
# sns.... | kalinVn/diabetes_prediction | visualization.py | visualization.py | py | 3,473 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "matplotlib.use",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "warnings.filterwarnings",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.tight_layout",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "m... |
5057360226 | import aiosqlite
from ChannelConfigObject import ChannelConfigObject
class DBInterface:
def __init__(self, db_fp):
self.conn = lambda: aiosqlite.connect(db_fp)
async def initialize_database(self):
# Create tables if first start and return all channels to monitor
async with self.conn(... | Roadcrosser/discord-dynamic-slowmode | DBInterface.py | DBInterface.py | py | 3,260 | python | en | code | 5 | github-code | 6 | [
{
"api_name": "aiosqlite.connect",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "ChannelConfigObject.ChannelConfigObject",
"line_number": 33,
"usage_type": "call"
}
] |
38517578940 |
from email import encoders
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.base import MIMEBase
import datetime
import logging
import logging.handlers
#esse import serve apenas para envio de logs de erro pelo telegram através do bot
from BotTelegram i... | bryansfzendron/Automacoes | Envios de Email/MandaEmail.py | MandaEmail.py | py | 2,451 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "datetime.datetime.now",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "logging.basicConfig",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "smtp... |
30510455005 | # coding=utf-8
from falcon import HTTPBadRequest
from ultros_site.base_route import BaseRoute
from ultros_site.database.schema.backup_code import BackupCode
from ultros_site.decorators import add_csrf, check_csrf
from ultros_site.message import Message
from ultros_site.tasks.__main__ import app as celery
__author__ =... | UltrosBot/Ultros-site | ultros_site/routes/mfa/disable.py | disable.py | py | 1,787 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "ultros_site.base_route.BaseRoute",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "falcon.HTTPBadRequest",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "ultros_site.message.Message",
"line_number": 26,
"usage_type": "call"
},
{
... |
23432903489 | #rob launcher
import matplotlib.pyplot as plt
import numpy as np
import json
#creat random map
#------------------------------------------
test=np.zeros(10000).reshape(100,100)
for i in range(1,len(test)):
if np.random.randint(2)==1:
random_stack=np.random.randint(3)
if random_stack==1:
... | rezashahabedin/emotional_navigation | rob_launcher.py | rob_launcher.py | py | 12,680 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.zeros",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.random.randint",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "numpy.random.randin... |
74354045308 | from django.core.management.base import BaseCommand
from classes.models import Branch,Semester,Subject,Lesson,Assignment,Submission
BRANCES = {
"CSE": "Computer Science and Engineering",
"ECE": "Electronics and Communication Engineering",
"EE": "Electrical Engineering",
"ME": "Mechanical Engineering",
... | aryaraj132/Takshashila | classes/management/commands/update_defaults.py | update_defaults.py | py | 1,131 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.core.management.base.BaseCommand",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "classes.models.Lesson.objects.all",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "classes.models.Lesson.objects",
"line_number": 32,
"usage_type"... |
34702782233 | import os
from flask import Flask, after_this_request, request, render_template
from flask_wtf import FlaskForm
from wtforms import FileField, SubmitField
from werkzeug.utils import secure_filename
from wtforms.validators import InputRequired
from firebase_admin import firestore
from main import main
from analysis impo... | prajwol-manandhar/resume-analysis-website | app.py | app.py | py | 4,090 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask_wtf.FlaskForm",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "wtforms.FileField",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "wtforms.validators.... |
33945297131 | import os
# import shutil
import matplotlib.pyplot as plt
import numpy as np
import torch
from torchvision.models import densenet121
import torchvision.models as models
import torch.nn as nn
from tqdm import tqdm
from dataset import CheXpertData
from torch.utils.data import DataLoader, Subset
from captum.attr import ... | pradeep1018/Reliable-Medical-Image-Classification-with-Saliency-Maps-and-Calibration | get_saliency_map.py | get_saliency_map.py | py | 3,763 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "dataset.CheXpertData",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "dataset.CheXpertData",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "os.path",
... |
7820678870 | from setuptools import setup
with open('README.md') as fp:
LONG_DESCRIPTION = fp.read()
setup(
name='pynetstim',
maintainer = 'Ehsan Tadyaon',
maintainer_email = 'sunny.tadayon@gmail.com',
version='0.2-alpha',
description='brain network stimulation',
long_description = LONG_DES... | EhsanTadayon/pynetstim | setup.py | setup.py | py | 1,522 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "setuptools.setup",
"line_number": 6,
"usage_type": "call"
}
] |
7818658682 | from sumy.parsers.plaintext import PlaintextParser
from sumy.nlp.tokenizers import Tokenizer
from sumy.summarizers.text_rank import TextRankSummarizer
def file_summary(decoded_file_data, length):
# For Strings
parser = PlaintextParser.from_string(decoded_file_data,Tokenizer("english"))
# Using TextRank
... | awg01/summarize | file_summary.py | file_summary.py | py | 980 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "sumy.parsers.plaintext.PlaintextParser.from_string",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "sumy.parsers.plaintext.PlaintextParser",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "sumy.nlp.tokenizers.Tokenizer",
"line_number": 7,
... |
35843659764 | from enum import Enum
directions_to_coords = {
"W": (-1, 0),
"E": (1, 0),
"N": (0, 1),
"S": (0, -1)
# "X": (0, 0) # 'X' represents stay
}
directions_to_coords_with_time = {
"X": (0, 0, 1), # 'X' represents stay
"W": (-1, 0, 1),
"E": (1, 0, 1),
"N": (0, 1, 1),
"S": (0, -1, 1)
... | Ysommer/SoGC2021_tech | controlCenter/defines.py | defines.py | py | 871 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "enum.Enum",
"line_number": 38,
"usage_type": "name"
},
{
"api_name": "enum.Enum",
"line_number": 45,
"usage_type": "name"
}
] |
14133974296 | #!/usr/bin/env python3
# file: utility_cost_calc.py
"""
Reads a csv file containing meeter readings.
The name of the csv file can be provided as a parameter.
If not parameter is provided, 'readings.csv' is the default.
Returns a report to standard output.
Typical usage:
./utility_cost_calc.py [input.csv] >> stat... | alexKleider/util_calc | utility_cost_calc.py | utility_cost_calc.py | py | 11,592 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "datetime.date",
"line_number": 200,
"usage_type": "call"
},
{
"api_name": "csv.DictReader",
"line_number": 225,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 248,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"li... |
20346685392 | import numpy as np
import pandas as pd
import nltk
nltk.download('stopwords')
from nltk.corpus import stopwords
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.ensemble import RandomForestClassifier, BaggingClassifier
import matplotlib.pyplot as plt
# Preprocessing of the dataset
w... | rkbrary/RedditProject | RandomForest.py | RandomForest.py | py | 2,080 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "nltk.download",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "nltk.corpus.stopwords.words",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "nltk.corpus.stopwords",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "numpy.... |
19377529500 | import pytest, json
from app import create_app
@pytest.fixture
def client():
app = create_app()
yield app.test_client()
def test_get_rates(client):
response = client.get('/rates')
assert response.status_code == 200
def test_put_rates(client):
fakeRate = {
"days": "mon,tues,thurs",
... | charlietlyons/prices-rates-api | test_app.py | test_app.py | py | 1,554 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "app.create_app",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "app.test_client",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pytest.fixture",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "json.dumps",
"lin... |
5309154990 | import heapq
from collections import defaultdict
lst = [[1, 4, 5], [1, 3, 4], [2, 6]]
# heapq 사용
def merge_list(lists):
result = []
heap = []
for idx, lst in enumerate(lists):
for val in lst:
heapq.heappush(heap, (val, idx))
while heap:
val = heapq.heappop(heap)
re... | louisuss/Algorithms-Code-Upload | Python/Tips/heap/list_merge+.py | list_merge+.py | py | 715 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "heapq.heappush",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "heapq.heappop",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 22,
"usage_type": "call"
}
] |
15211714840 | """
Lynden-Bell Luminosity function
-------------------------------
Figure 4.10.
An example of computing the luminosity function for two u-r color-selected
subsamples of SDSS galaxies using Lynden-Bell's C- method. The galaxies are
selected from the SDSS spectroscopic sample, with redshift in the range
0.08 < z < 0.12... | astroML/astroML_figures | book_figures/chapter4/fig_lyndenbell_gals.py | fig_lyndenbell_gals.py | py | 7,398 | python | en | code | 7 | github-code | 6 | [
{
"api_name": "astroML.plotting.setup_text_plots",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "astroML.datasets.fetch_sdss_specgals",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "astropy.cosmology.FlatLambdaCDM",
"line_number": 78,
"usage_type":... |
39437962325 | import datetime
import json
from django.contrib.auth import authenticate, login
from django.core.paginator import Paginator
from django.http import JsonResponse
from django.shortcuts import render, get_object_or_404, redirect
from django.views.generic import ListView
from .forms import AddressForm, LoginForm, Customer... | nurtileuabdikhalyk/electronics_store | store/views.py | views.py | py | 7,043 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "utils.cartData",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.get_object_or_404",
"line_number": 39,
"usage_type": "call"
},
{
"api_nam... |
39809193157 | import argparse
import yaml
from pathlib import Path
from torch.utils.data import DataLoader
from dataset import RSNA_BCD_Dataset, TrainBatchSampler, ValBatchSampler, TestBatchSampler
from model import RSNABCE
import albumentations as A
import torch
def main(cfg_path: str):
torch.backends.cudnn.benchmark = True
... | mawanda-jun/rsna-breast-cancer-detection | src/trainer.py | trainer.py | py | 3,401 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "torch.backends",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "yaml.safe_load",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "albumentations.Resize",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "albumentatio... |
39253635530 | from typing import List
from urllib.parse import urlparse
from mangaki.models import Work
from mangaki.utils.mal import client
def get_potential_posters(work: Work) -> List[str]:
posters = []
ext_urls = set()
if work.int_poster:
posters.append({
'current': True,
'url': wor... | mangaki/mangaki | mangaki/mangaki/utils/db.py | db.py | py | 893 | python | en | code | 137 | github-code | 6 | [
{
"api_name": "mangaki.models.Work",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "urllib.parse.urlparse",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "mangaki.utils.mal.client.get_entry_from_work",
"line_number": 22,
"usage_type": "call"
},
{
... |
73676843066 | #! /usr/bin/env python
# -*- coding: UTF-8 -*-
from time import time
import rospy,struct
from geometry_msgs.msg import Twist
from move_base_msgs.msg import MoveBaseActionResult
from move_base_msgs.msg import MoveBaseActionGoal
from actionlib_msgs.msg import GoalID
import serial
import sys
test_odom_rap_path =sys.argv... | caiyilian/INTELLIGENT-FOOD-DELIVERY-ROBOT | 树莓派代码/scripts/demo01_test.py | demo01_test.py | py | 2,529 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "sys.argv",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "serial.Serial",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "serial.Serial",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "actionlib_msgs.msg.GoalID",... |
74102131709 | #!/usr/bin/python3
# for this to work you need:
# - https://github.com/cathiele/goecharger
# - https://github.com/mchwalisz/pysenec
import sys
from goecharger import GoeCharger
import aiohttp
import pysenec
import asyncio
import logging
from pprint import pprint
logfile = '/var/www/html/pvload/pvload.log'
charger = ... | guruguruguru/pvload | pvload.py | pvload.py | py | 5,510 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "goecharger.GoeCharger",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "logging.basicConfig",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "sys.argv"... |
17468743089 |
from requests import get
from xml.etree import ElementTree
def currency_rates(cur):
currency_dict = {'USD': 'R01235', 'EUR': 'R01239', 'GBP': 'R01035'}
if cur not in currency_dict:
return None
currency = currency_dict[cur]
response = get(f'http://www.cbr.ru/scripts/XML_dynamic.asp?date_re... | Lumpik063/hello | DZ_4/utils.py | utils.py | py | 622 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.get",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree.fromstring",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree",
"line_number": 18,
"usage_type": "name"
}
] |
41419214646 | import time
import datetime
import serial
import numpy as np
com = serial.Serial("COM3", 9600, timeout=5)
buffer_size = 120
buffer = np.zeros(buffer_size, dtype=int)
data_pointer = 0
f = open(f'P_{datetime.datetime.now().strftime("%Y%m%d%H%M%S")}.bin', 'wb')
# 数据格式
# 气压(Pa) int4
# 时间(s) int4
# 时间(ms... | CyanideCN/PressureSensor | read_serial.py | read_serial.py | py | 937 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "serial.Serial",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
... |
34336600665 | #This program will scrape the phone numbers and emails from a pdf
#TO DO: create a regex for phone numbers
#regex for email addresses
#get text from clipboard
#extract email/phone from text
import re, pyperclip
#Regex for phone numbers
#types of phone numbers
#775-737-8248, 777-8248, (775) 737-8248, ext 1... | mirhossain8248/Python-Practice- | regularExpression_PhoneEmailScraper.py | regularExpression_PhoneEmailScraper.py | py | 1,519 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "re.compile",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "re.VERBOSE",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "re.compile",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "re.VERBOSE",
"line_number":... |
30526102685 | import matplotlib.pyplot as plt
from board import Board
from knight import Knight
class TKJ:
def __init__(self) -> None:
self.board = Board()
self.knights = [Knight([0, 0], 0), Knight([0, 0], 8)]
def traverse_board(self):
for i in self.knights:
i.move(self.board)
d... | mhaneman/eight_knights_journey | main.py | main.py | py | 579 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "board.Board",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "knight.Knight",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.show",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
... |
6207392 | # Create your views here.
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.http import JsonResponse
from django.shortcuts import render
from timeit import default_timer
from .Puissance import *
import json
def handler404(request, exception):
return render(request, "errors/404.html")
... | TonyLim658/ia_puissance5 | puissance5/views.py | views.py | py | 3,209 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.shortcuts.render",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 26,
"usage_type": "call"
},
{
"api_name"... |
72488281468 | # file contains services related to cart
import json
from collections import Counter
def increment_cart_item(tableNumber, itemId):
"""Given tableNumber and itemId, increment the amount of items by 1 in cart
Args:
tableNumber (int): # of table number cart to modify
itemId (int): id of item to i... | LuisZhang2000/Restaurant-Wait-System | backend/services/cart.py | cart.py | py | 4,693 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "json.load",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 44,
... |
38679562626 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from setuptools import setup, find_packages
import setuptools.command.install as _install
import subprocess
class install(_install.install):
def run(self):
subprocess.check_call(["make"])
... | ray-project/sandbox | src/plasma/setup.py | setup.py | py | 1,287 | python | en | code | 4 | github-code | 6 | [
{
"api_name": "setuptools.command.install.install",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "setuptools.command.install",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "subprocess.check_call",
"line_number": 13,
"usage_type": "call"
},
... |
43598383584 | import requests
from bs4 import BeautifulSoup as bs
#scrapes data from web using the link given by user
def scrape(link):
page=requests.get(link)
soup= bs(page.content,"html.parser")
img=[] #stores the image of the product
if soup.find_all("div",class_="imgTagWrapper")!=None:
for item in... | akanksha2305/planner | scrapper.py | scrapper.py | py | 1,369 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.get",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 6,
"usage_type": "call"
}
] |
34904502703 | import imutils
def image_pyramid(image,scale = 1.5,minSize = (224,224)):
"""
Parameters
----------
image : input image.
scale : resizing the scale of the image. The default is 1.5.
minSize : Controls the minimum size of an output image. The default is (224,224).
Returns
-------
Non... | AbdullahKarakiraz/CNN_Detector | Image_Pyramid.py | Image_Pyramid.py | py | 592 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "imutils.resize",
"line_number": 21,
"usage_type": "call"
}
] |
16511407128 | import json
import logging
import requests
from servicenow_pyclient.exceptions import SNException, SNEmptyContent
logger = logging.getLogger(__name__)
class SNClient:
def __init__(self, url: str, username: str, password: str, enable_push_changes=True):
"""
Initialize a new instance of the SNAPI... | juanbrena/servicenow-pyclient | servicenow_pyclient/__init__.py | __init__.py | py | 12,343 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "requests.Session",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "servicenow_pyclient.exceptions.SNException",
"line_number": 70,
"usage_type": "call"
},
{
"api_... |
72344003707 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections
import functools
import os
import numpy as np
import tensorflow as tf
import tensorflow_hub as hub
import datasets
from self_supervision.patch_utils import get_patch_representation
from tra... | google/revisiting-self-supervised | self_supervision/linear_eval.py | linear_eval.py | py | 5,902 | python | en | code | 349 | github-code | 6 | [
{
"api_name": "tensorflow.flags",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "collections.OrderedDict",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "utils.adaptive_pool",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "ten... |
70025148027 | __author__ = 'Felix Simkovic'
__date__ = '2019-05-11'
__license__ = 'MIT License'
from PyQt5.Qt import QRunnable
class Worker(QRunnable):
def __init__(self, fn, *args, **kwargs):
super().__init__()
self.fn = fn
self.args = args
self.kwargs = kwargs
def run(self):
self... | fsimkovic/taskwarrior-pomodoro | taskwpomo/worker.py | worker.py | py | 351 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "PyQt5.Qt.QRunnable",
"line_number": 8,
"usage_type": "name"
}
] |
34508806440 |
# https://leetcode.com/problems/longest-happy-prefix/discuss/547187/Python-Deterministic-Finite-Automaton-inspired-by-KMP
# https://practice.geeksforgeeks.org/problems/longest-prefix-suffix2527/1/?track=md-string&batchId=144#
# Given a string of characters, find the length of the longest proper prefix which is also... | ved93/deliberate-practice-challenges | code-everyday-challenge/n205_longest_prefix_suffix.py | n205_longest_prefix_suffix.py | py | 1,112 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "collections.Counter",
"line_number": 16,
"usage_type": "call"
}
] |
73363633788 | import imaplib
import email
import sys
import logging
import traceback
import re
from bs4 import BeautifulSoup
from jira import JIRA
# получить идентификатор задачи из темы письма
def getHPSMIdFromSubject(subject):
pattern = re.compile('(IM|C|T)\d{8}')
res = pattern.search(subject)
if res:
return ... | expo-lux/scripts | python/hpsm2jira.py | hpsm2jira.py | py | 6,114 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "re.compile",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "email.message_from_bytes",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "email.message",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "jira.search_is... |
16343214921 | from django.contrib import messages
from django.shortcuts import render, redirect
from django.http import HttpResponse
from .forms import *
from django.contrib.auth.decorators import login_required
from .models import *
from django.contrib.auth.models import User
# Create your views here.
def registration(request):
... | MungaiKeren/The_Gram_Master | instagram/views.py | views.py | py | 3,410 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "django.shortcuts.redirect",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.models.User.objects.all",
"line_number": 27,
"usage_type": "call"
... |
36786639261 | import time
from math import log
import numpy as np
from PyQt5.QtGui import QPainter, QPen, QPixmap, QImage
from PyQt5.QtWidgets import QWidget
from PyQt5.QtCore import Qt
from utils import QColor
from .processing import qimageview
def timechecker(orig_func):
def func(self, img: QImage):
res = img.width... | AzaubaevViktor/comp_vision | widgets/histogram.py | histogram.py | py | 4,390 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "PyQt5.QtGui.QImage",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "time.time",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets.QWidget",
... |
30096574292 | from flask import Flask, jsonify, request, abort
from sense_hat import SenseHat
from hat_manager import HatManager
app = Flask(__name__)
sense_hat = SenseHat()
hat_manager = HatManager(sense_hat)
@app.route('/')
def index():
return 'Welcome to the PI manager. Choose a route according to what you want to do.'
... | ylerjen/pir-hat | middleware/app.py | app.py | py | 979 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "sense_hat.SenseHat",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "hat_manager.HatManager",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "hat_manager.get_pr... |
41040005392 | from abc import ABC, abstractmethod
from enum import Enum, auto
from typing import Optional, List
from vega_sim.scenario.common.agents import VegaService
class Reward(Enum):
PNL = auto()
SQ_INVENTORY_PENALTY = auto()
UNIFIED_PNL = auto()
class BaseRewarder(ABC):
def __init__(
self,
... | vegaprotocol/vega-market-sim | vega_sim/reinforcement/v2/rewards.py | rewards.py | py | 2,934 | python | en | code | 19 | github-code | 6 | [
{
"api_name": "enum.Enum",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "enum.auto",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "enum.auto",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "enum.auto",
"line_number": 11,
"u... |
26056508973 | import pickle
import os
from br.bridge import Bridge
from pathlib import Path
import random
from parameters import *
'''
Kline return value:
1499040000000, # Open time
"0.01634790", # Open
"0.80000000", # High
"0.01575800", # Low
"0.01577100", # Close
"148976.11427815", # Volume
... | phimachine/bitman | pr/pruner.py | pruner.py | py | 6,781 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "br.bridge.Bridge",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "os.path.isfile",
"line_number": 64,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 64,
"usage_type": "attribute"
},
{
"api_name": "pickle.load",
"line_... |
21529873860 | import logging
import re
_PATTERN = re.compile('^//sqladmin\.googleapis\.com/projects/([^/]+)/instances/([^/]+)$', re.IGNORECASE)
def run(ctx):
m = _PATTERN.match(ctx.resource_id)
if not m:
raise ValueError("Invalid resource_id: {}".format(ctx.resource_id))
project_name = m.group(1)
instance_... | sonraisecurity/sonrai-bots | remediation/gcp/sql_networking_remove_global_access/bot.py | bot.py | py | 2,007 | python | en | code | 5 | github-code | 6 | [
{
"api_name": "re.compile",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "re.IGNORECASE",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "logging.debug",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "logging.info",
"line_nu... |
74281367867 | from __future__ import annotations
import torch
import torch.nn as nn
class ForTestModel(nn.Module):
def __init__(self):
super().__init__()
self.scale = nn.Parameter(torch.tensor(1.0))
self.criterion = nn.MSELoss()
def forward(self, x, y=None):
pred = x * self.scale
o... | Moka-AI/simpletrainer | tests/test_trainer/model.py | model.py | py | 468 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "torch.nn.Module",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "torch.nn.Parameter",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_n... |
21884491067 | """Create a 4D graph of radio transient objects."""
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.ticker as mticker
import numpy as np
import pandas as pd
import urllib.request
from matplotlib.markers import MarkerStyle
from frbpoppy import Frbcat, pprint
import frbpoppy.gal... | TRASAL/frbpoppy | tests/misc/radio_transients.py | radio_transients.py | py | 7,365 | python | en | code | 26 | github-code | 6 | [
{
"api_name": "frbpoppy.Frbcat",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "frbpoppy.galacticops.Redshift",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "frbpop... |
31309739970 | from bs4 import BeautifulSoup
import requests
import re
import time
from crawl import crawl_sub_categories, get_headlines
class BBC:
def __init__(self):
self.base_url = "https://www.bbc.com/"
self.home_html = requests.get(self.base_url)
self.soup = BeautifulSoup(
self.home_htm... | buddha231/bbc-web-crawler | bbc.py | bbc.py | py | 1,986 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.get",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "crawl.crawl_sub_categories"... |
30517365614 | import logging
from ..client import BaseClient
from ..errors import APIException
from ..rate_limit import demo_rate_limiter, insight_rate_limiter
logger = logging.getLogger("aionasa.insight")
class InSight(BaseClient):
"""Client for NASA Insight Mars weather data.
Parameters
----------
api_key: :cl... | nwunderly/aionasa | aionasa/insight/api.py | api.py | py | 2,030 | python | en | code | 7 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "client.BaseClient",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "rate_limit.insight_rate_limiter",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "ra... |
74501109629 | import networkx as nx
import matplotlib.pyplot as plt
import scipy
import numpy
count_of_add_node = 0
inf = float("inf")
def remove_edge(matrix, first_node, second_node):
matrix[first_node][second_node] = matrix[second_node][first_node] = inf
def add_edge(matrix, first_node, second_node, weight=inf):
matri... | lukYanovich/BSU | MMF/5sem/alg/lab5/graph.py | graph.py | py | 4,705 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "networkx.convert_matrix.from_numpy_matrix",
"line_number": 148,
"usage_type": "call"
},
{
"api_name": "networkx.convert_matrix",
"line_number": 148,
"usage_type": "attribute"
},
{
"api_name": "numpy.matrix",
"line_number": 148,
"usage_type": "call"
},
{... |
70465674107 | import os
import requests
import subprocess
from packaging import version
def get_latest_stable_version(
user_name:str,
repo_name:str,
timeout:int,
defalut_version:str)->version.Version:
try:
url = f"https://api.github.com/repos/{user_name}/{repo_name}/releases/latest"
response = re... | Zhaopudark/JetBrainsMonoNerdFonts | Utils/github_helper.py | github_helper.py | py | 576 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "requests.get",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "packaging.version.parse",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "packaging.version",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "packaging.vers... |
38673550474 | # -*- coding: utf-8 -*-
"""
Created on Thu May 9 03:35:51 2019
@author: kaust
"""
import pygame, random
pygame.init()
backgroundColor = 100,42,42 #brown background
running = True,
start = True
tutorial = False
margin = 2
rect_width = 50
rect_height = 50
num = 10
width, height = ((rect_width + ma... | harrisonteplitz/Farming-Simulator | farming_game.py | farming_game.py | py | 8,807 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pygame.init",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "pygame.image.... |
16631082470 | import requests
import urllib.request
from bs4 import BeautifulSoup
from selenium.webdriver import Chrome
from webdriver_manager.chrome import ChromeDriverManager
class Scraping(object):
""" Class used scraping resources"""
def rss(self, url: str = '') -> list:
article_list = []
try:
... | EdwinPuertas/WebScraping | scraping.py | scraping.py | py | 2,551 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.get",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "urllib.reque... |
16016756476 | from scarf import app
from core import redirect_back, SiteImage, NoImage, new_img
from main import page_not_found, PageData
from access import check_mod
import core
from flask import make_response, url_for, request, render_template, session, flash
import logging
import base64
logger = logging.getLogger(__name__)
@ap... | oamike/scarfage | scarf/image.py | image.py | py | 2,992 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "main.PageData",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "flask.request.method",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "flask.reque... |
8705059452 | import flask_blog.controller as controller
from flask import render_template, url_for, redirect, request
from flask_blog.users.forms import RegistrationForm, LoginForm, UpdateAccountForm
from flask_login import current_user, logout_user, login_required
from flask import Blueprint
users = Blueprint('users', __name__)
... | Guy-Ronen/blogapp-flask-updated | flask_blog/users/routes.py | routes.py | py | 1,828 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Blueprint",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask_blog.controller.check_if_user_is_authenticated",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "flask_blog.controller",
"line_number": 12,
"usage_type": "name"
},
... |
18921273222 | """Test the codeclimate JSON formatter."""
from __future__ import annotations
import json
import pathlib
import subprocess
import sys
import pytest
from ansiblelint.errors import MatchError
from ansiblelint.file_utils import Lintable
from ansiblelint.formatters import CodeclimateJSONFormatter
from ansiblelint.rules ... | ansible/ansible-lint | test/test_formatter_json.py | test_formatter_json.py | py | 5,405 | python | en | code | 3,198 | github-code | 6 | [
{
"api_name": "ansiblelint.rules.AnsibleLintRule",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "ansiblelint.errors.MatchError",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "ansiblelint.formatters.CodeclimateJSONFormatter",
"line_number": 22,
"usa... |
11779847770 | from typing import Optional, Literal
import os
from pathlib import Path
from utils.cluster import ClusterJobBaseArguments
from copy import deepcopy
class LayoutArgs(ClusterJobBaseArguments):
model: Literal['minilm', 'bertopic'] = 'minilm' # The embedding model to use.
file_in: Optional[str] = None # The fil... | TimRepke/twitter-climate | code/pipeline/04_01_layout.py | 04_01_layout.py | py | 8,134 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "utils.cluster.ClusterJobBaseArguments",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "typing.Literal",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "ty... |
18153910411 | from tkinter import (messagebox, filedialog, PhotoImage, Menu, Listbox, Tk, # Frame, Label, Scale, Button,
HORIZONTAL, LEFT, BOTTOM, X, W, SUNKEN, GROOVE, )
from tkinter.ttk import Button, Scale, Label, Frame
# import tkinter as tk
# from tkinter import ttk
from ttkthemes import themed_tk as tk
fr... | Yobmod/dmltests | tkinter/mplayer/mplay.py | mplay.py | py | 12,927 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.path.dirname",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"l... |
377965280 | import discord
import json
import os
import asyncio
import keep_alive
from discord.ext import commands
with open("./common/setting.json", "r", encoding="utf8") as jfile:
jdata = json.load(jfile)
COGS = os.listdir("./cogs")
intents = discord.Intents.all()
intents.message_content = True
bot = commands.Bot(command... | jefflin820915/discord_Bot | bot.py | bot.py | py | 734 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "json.load",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "discord.Intents.all",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "discord.Intents",
"line_... |
40423086127 | # Vinh Vu, 015347252
# Lab 4, Problem 1.3
# Normal R.V
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
mu=2.5
sigma=0.75
n=10000
x = np.random.normal(mu,sigma,n)
# Create bins and histograms
nbins = 30
edgecolor = 'w'
bins = [float(t) for t in np.linspace(1,4,nbins+1)]
h1, bin_edges = np.histogr... | vinhvu97/EE-381 | Project 4/lab4.1.3.py | lab4.1.3.py | py | 994 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "numpy.random.normal",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "numpy.linspace",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.histogram"... |
72464298427 | import dataclasses
import os
import re
from typing import Iterable, Optional
import pandas as pd
from . import exceptions
_DAYS_IN_ACCOUNTING_MONTH = 30
class PeriodRange:
"""A range of accounting months, with monthly resolution."""
def __init__(self, start_month: int, after_end_month: int):
self... | ftambara/sac | sac/models.py | models.py | py | 17,065 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.Iterable",
"line_number": 57,
"usage_type": "name"
},
{
"api_name": "dataclasses.dataclass",
"line_number": 140,
"usage_type": "attribute"
},
{
"api_name": "typing.Iterable",
"line_number": 183,
"usage_type": "name"
},
{
"api_name": "pandas.r... |
21347502575 | import os
import sys
parent_dir = os.path.abspath(os.path.dirname(__file__))
sys.path.append(os.path.dirname(parent_dir))
import logging
from dotenv import load_dotenv
from flask import Flask, render_template, request
from flask_admin import Admin
from flask_login import current_user, LoginManager
from admin_views i... | alex-belocki/bot_invest | adminka/flaskapp.py | flaskapp.py | py | 2,069 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.path.abspath",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "sys.path.append",
"line... |
74059057789 | #!/usr/bin/python3
# coding:utf-8
from time import sleep
from urllib.request import *
from lxml import etree
from bs4 import *
def spider_connect(url, header, xpath, data=None):
req = Request(url, data=data, headers=header)
with urlopen(req) as ope:
content = ope.read()
content = content.decod... | HarveyWang81/PythonScript | xuegod/spider/spider_image.py | spider_image.py | py | 1,226 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "lxml.etree.HTML",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "lxml.etree",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "time.sleep",
"line_number": 38,
"usage_type": "call"
}
] |
72496117949 | from django.urls import path, include
from main import views
urlpatterns = [
path("send-message", views.ApplicationCreateView.as_view(), name="send-message"),
path("get-filter-notification-count", views.GetFilterNotificationCount.as_view(), name="GetFilterNotificationCount"),
# List all applications for t... | Rahmet97/TestProjectBackend | main/urls.py | urls.py | py | 802 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.urls.path",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "main.views.ApplicationCreateView.as_view",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "main.views.ApplicationCreateView",
"line_number": 5,
"usage_type": "attribute"
... |
17509448283 | from pprint import pprint
from typing import List
from heapq import heapify, heappop, heappush
class Solution:
def kthSmallest(self, matrix: List[List[int]], k: int) -> int:
n = len(matrix)
arr = [(lis[0], row, 0) for row, lis in enumerate(matrix)]
pprint(arr)
heapify(arr)
fo... | soji-omiwade/cs | dsa/before_rubrik/kth_smallest_element_in_a_sorted_matrix_better.py | kth_smallest_element_in_a_sorted_matrix_better.py | py | 828 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.List",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "pprint.pprint",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "heapq.heapify",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "heapq.heappop",
"line_number... |
37438681769 | """adds table charger_sessions
Revision ID: 35a6e801cd17
Revises:
Create Date: 2023-06-24 11:17:47.338524
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '35a6e801cd17'
down_revision = None
branch_labels = None
depends_on = None
def upgrade() -> None:
# ... | HarryNguyen1998/mqtt-sample | api/migrations/versions/35a6e801cd17_adds_table_charger_sessions.py | 35a6e801cd17_adds_table_charger_sessions.py | py | 977 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "alembic.op.create_table",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integ... |
32506889563 | """Monitor the satellite receiver"""
import json
import logging
import math
import os
import sys
import threading
import time
from enum import Enum
from http.server import HTTPServer, BaseHTTPRequestHandler
import requests
from . import defs, config, monitoring_api
logger = logging.getLogger(__name__)
sats = [x['al... | Blockstream/satellite | blocksatcli/monitoring.py | monitoring.py | py | 17,903 | python | en | code | 949 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "enum.Enum",
"line_number": 81,
"usage_type": "name"
},
{
"api_name": "requests.post",
"line_number": 209,
"usage_type": "call"
},
{
"api_name": "requests.codes",
"line... |
10764609488 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Apr 1 08:26:28 2022
@author: paul
"""
from PHY_WORLD import *
from pygame.locals import (QUIT, KEYDOWN, K_ESCAPE)
import Box2D.b2 as b2
import pygame as py
phy = WORLD(g=0, walls_hidden=False)
def my_draw_polygon(polygon, body, fixture):
vertic... | paultat91/PHYENG | main.py | main.py | py | 2,380 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pygame.draw.polygon",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pygame.draw",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "Box2D.b2.polygonShape",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "Box2D... |
10588664706 | from flask import Blueprint, render_template, url_for
from ..models import User
home_bp = Blueprint('home_bp', __name__, template_folder='templates')
@home_bp.route('/')
@home_bp.route('/home')
def home():
return render_template('home.html', title='Home')
@home_bp.route('/users/')
def all_users():
users... | saachibhalla/geoguesser | GeoGuesser/home/home.py | home.py | py | 429 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "flask.Blueprint",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "models.User.query.all",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "models.Use... |
10423143511 | #-*- coding: utf-8 -*-
"""
@author: Martí Congost
@contact: marti.congost@whads.com
@organization: Whads/Accent SL
@since: February 2009
"""
from unittest import TestCase
from nose.plugins.skip import SkipTest
from cocktail.tests.persistence.tempstoragemixin import TempStorageMixin
class IncrementalIdTestCase(Te... | marticongost/cocktail | cocktail/tests/persistence/test_incrementalid.py | test_incrementalid.py | py | 4,129 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "cocktail.tests.persistence.tempstoragemixin.TempStorageMixin",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "unittest.TestCase",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "cocktail.persistence.incremental_id",
"line_number": 26,
"... |
29213780856 | import argparse
import datetime
import json
import os
import requests
import pandas as pd
from tqdm import tqdm
tqdm.pandas()
parser = argparse.ArgumentParser(description='Add reasons to metrics output Excel file.')
parser.add_argument('--input', dest='input', help='input Excel file', required=True)
parser.add_argu... | dest1n1s/brain-mturk-fudan-develop | make-decision-engine-output.py | make-decision-engine-output.py | py | 9,662 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "tqdm.tqdm.pandas",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "tqdm.tqdm",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"l... |
195335916 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='HelloWorldServiceComplete',
f... | xmaruto/mcord | xos/services/helloworldservice_complete/migrations/0001_initial.py | 0001_initial.py | py | 815 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.CreateModel",
"line_number": 14,
"usage_type": "call"
},
... |
3557284418 | from argparse import ArgumentParser
import os
import shutil
def create_parser():
parser = ArgumentParser()
parser.add_argument('--target-dir', type=str, default='/usr/src')
return parser
def patch_stand_makefile(args):
fname = os.path.join(args.target_dir, 'stand', 'efi', 'loader', 'Makefile')
... | sadaszewski/freebsd-patch-geli-password-from-tpm2 | apply_patch.py | apply_patch.py | py | 8,168 | python | en | code | 5 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"... |
4525974873 | import os
from functools import wraps
from flask import Flask, request
from dotenv import load_dotenv
from flask_sqlalchemy import SQLAlchemy
import json
# Load env
load_dotenv(override=True)
# Init App
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = os.getenv('DB_URI', '')
app.config['SQLALCHEMY_TRA... | kayecandy/tm-time-tracker | app.py | app.py | py | 1,325 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number... |
19886845960 | import os
import pytest
from hypothesis import strategies as st
from hypothesis_trio.stateful import initialize, rule, Bundle
from string import ascii_lowercase
def get_path(path):
return path[2:] if path[2:] else "/"
# The point is not to find breaking filenames here, so keep it simple
st_entry_name = st.text(... | bitlogik/guardata | tests/client/fs/test_fs_offline_restart_and_tree.py | test_fs_offline_restart_and_tree.py | py | 4,324 | python | en | code | 9 | github-code | 6 | [
{
"api_name": "hypothesis.strategies.text",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "hypothesis.strategies",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "string.ascii_lowercase",
"line_number": 13,
"usage_type": "name"
},
{
"api_name"... |
11523049612 | from django.contrib import admin
from inventory import models
MODELS = [models.Category,
models.ProductsIngredient,
models.Product,
models.Ingredient,
models.TransactionsList,
models.Transaction,
]
for MODEL in MODELS:
admin.site.register(MODEL)
| luqs1/TokoPOS | inventory/admin.py | admin.py | py | 311 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "inventory.models.Category",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "inventory.models",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "inventory.models.ProductsIngredient",
"line_number": 5,
"usage_type": "attribute"
},
{
... |
12062461790 | from lxml import etree
from queue import Queue
from urllib import request
import requests
import threading
import os
import re
class Producter(threading.Thread):
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36"
}
... | hireach/hireach | dayo2/day02demo2.py | day02demo2.py | py | 2,477 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "threading.Thread",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "lxml.etree.HTML",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "lxml.etree",
"... |
1654776474 | import requests
import os
def download_file_from_google_drive(id, destination):
def get_confirm_token(response):
for key, value in response.cookies.items():
if key.startswith('download_warning'):
return value
return None
def save_response_content(response, destinat... | talsperre/distracted-driving-snapchat | classifier_code/infer_pipeline/download.py | download.py | py | 1,790 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.Session",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 44,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 48,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_num... |
31126279283 | # import the necessary packages
from picamera.array import PiRGBArray
from picamera import PiCamera
import time
import cv2
import sys
import io
import numpy as np
import base64
import time
from pubsub import getCommand,publishImage,publishDistance
from flood import flood
camera = PiCamera()
camera.resolution = (320, 2... | gregorianrants/legobot-6 | vision/camera.py | camera.py | py | 2,903 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "picamera.PiCamera",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "picamera.array.PiRGBArray",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "time.time",
... |
23647455265 | from connection import db, create_app
from model.product import Product
from model.client import Client
from model.purchase import Purchase
from werkzeug.test import Client
from werkzeug.testapp import test_app
import unittest
import os
class TestApp(unittest.TestCase):
def setUp(self):
os.environ["SQLAL... | cesar-orozco-chr/tienda-online | backend/read/test.py | test.py | py | 1,064 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "unittest.TestCase",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "connection.create_app",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "connecti... |
70945155068 | # sangdata table을 출력 (서버로)
import MySQLdb
config = {
'host':'127.0.0.1', # dict type
'user':'root',
'password':'123',
'database':'test',
'port':3306,
'charset':'utf8',
'use_unicode':True
}
print('Content-Type:text/html;charset=utf-8\n')
print('<html><body><b>상품 자료</b><br>... | kangmihee/EX_python | pyweb/py_http_cgi/cgi-bin/product.py | product.py | py | 1,050 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "MySQLdb.connect",
"line_number": 20,
"usage_type": "call"
}
] |
40319391937 | from ansible.module_utils.basic import AnsibleModule
from ansible_collections.ansibleguy.opnsense.plugins.module_utils.helper.main import \
is_unset
from ansible_collections.ansibleguy.opnsense.plugins.module_utils.base.api import \
Session
from ansible_collections.ansibleguy.opnsense.plugins.module_utils.base... | ansibleguy/collection_opnsense | plugins/module_utils/main/cron.py | cron.py | py | 2,507 | python | en | code | 158 | github-code | 6 | [
{
"api_name": "ansible_collections.ansibleguy.opnsense.plugins.module_utils.base.cls.BaseModule",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "ansible.module_utils.basic.AnsibleModule",
"line_number": 37,
"usage_type": "name"
},
{
"api_name": "ansible_collections.ans... |
30509150355 | """Small DB fixes
Revision ID: cb71e666d941
Revises: 7d1f1b4bcd21
Create Date: 2017-05-06 16:55:53.510598
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'cb71e666d941'
down_revision = '7d1f1b4bcd21'
branch_labels = None
depends_on = None
def upgrade():
#... | UltrosBot/Ultros-site | migrations/versions/cb71e666d941_small_db_fixes.py | cb71e666d941_small_db_fixes.py | py | 649 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "alembic.op.create_unique_constraint",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "alembic.op.drop_constraint",
"line_number": 27,
"usage_type": "call"
},
{
"api_nam... |
6191466918 | #! /usr/bin/env python
"""
Numerically solves the Sturm-Liouville equation
-( p y' )' + qy = f
where p, q, and f are all functions of x, on the interval 0 < x < 1 with the
boundary conditions
y(0) = y_0
y'(1) = 0
Leon Hostetler, Apr. 26, 2017
USAGE: python 1D_boundary_value_problem.py
"""... | leonhostetler/undergrad-projects | numerical-analysis/14_pde/1D_boundary_value_problem.py | 1D_boundary_value_problem.py | py | 4,177 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.zeros",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "numpy.abs",
"line_number": 64,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 77,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 81... |
3974239797 | import logging
import re
from .error import *
from .key_seqv import KeySeqv
from .mappings import *
from .regex_groups import Groups, KEY_SEQV_REGEX, LINE_REGEX
LOG_FUN = {
logging.WARN: logging.warn,
logging.ERROR: logging.error,
logging.INFO: logging.info,
logging.DEBUG: logging.debug
}
class KeyS... | hungdojan/elastic-quacker | rd_client/parser/key_seqv_parser.py | key_seqv_parser.py | py | 15,826 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "logging.WARN",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "logging.ERROR",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "logging.INFO",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "logging.DEBUG"... |
37591888073 | # -*- coding: utf-8 -*-
from pprint import pprint
from googleapiclient import discovery
from oauth2client.client import GoogleCredentials
from oauth2client.client import ApplicationDefaultCredentialsError
def delete_instance(arguments):
credentials = get_credentials()
if credentials:
if arguments.pr... | otrenav/tabelog-scrapy | google_cloud/delete_instance.py | delete_instance.py | py | 1,455 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "googleapiclient.discovery.build",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "googleapiclient.discovery",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "pprint.pprint",
"line_number": 31,
"usage_type": "call"
},
{
"api_name"... |
74104140347 | import argparse
import random
import skimage.measure as measure
import torch.backends.cudnn as cudnn
import matplotlib.pyplot as plt
import torch.nn as nn
import torch.optim as optim
import pandas as pd
from torch.autograd import Variable
from torch.utils.data import DataLoader
from dataset.dataset_2d import DatasetF... | ethanyu68/CT_infection_diagnosis | main_2d3d.py | main_2d3d.py | py | 22,772 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 77,
"usage_type": "call"
},
{
"api_name": "torch.backends.cudnn.cuda.is_available",
"line_number": 94,
"usage_type": "call"
},
{
"a... |
7049240600 | from flask import current_app
from invenio_search.api import RecordsSearch
from werkzeug.local import LocalProxy
from ..api import IlsRecord
from ..documents_items.api import DocumentsWithItems
from ..members.api import Member
from ..organisations_members.api import OrganisationWithMembers
from .fetchers import patron... | rero/reroils-data-legacy | reroils_data/patrons/api.py | api.py | py | 5,567 | python | en | code | 5 | github-code | 6 | [
{
"api_name": "werkzeug.local.LocalProxy",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "flask.current_app.extensions",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "flask.current_app",
"line_number": 13,
"usage_type": "name"
},
{
"api... |
74592106108 | import os, random, sys
from engine import commands, events, items, entity
import data
def updateScreen():
data.x, data.y = os.get_terminal_size()
data.title = f"""{' '*(data.x//2-25//2)} _____ _____ __ _____
{' '*(data.x//2-25//2)}| | _ |__| | __|
{' '*(data.x//2-25//2)}| | | | | | ... | Harxi/majeNew | majeCommands.py | majeCommands.py | py | 3,259 | python | ru | code | 2 | github-code | 6 | [
{
"api_name": "data.x",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "data.y",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "os.get_terminal_size",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "data.title",
"line_numb... |
20445034413 | import cv2
import numpy as np
import time
# 讀取類別名稱
LABELS = open('./test2/project1101/obj.names').read().strip().split("\n")
nclass = len(LABELS)
# 為每個類別隨機產生顏色
np.random.seed(42)
COLORS = np.random.randint(0, 255, size=(nclass, 3), dtype='uint8')
# 使用yolov4設定檔及訓練好的模型
net = cv2.dnn.readNetFromDarknet('./test2/project... | hung0422/practice_test | YOLO/yolo_picture_test.py | yolo_picture_test.py | py | 3,018 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.random.seed",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "numpy.random.randint",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.random... |
38217834884 | import argparse
import imp
import numpy as np
import matplotlib.pyplot as plt
from utils.occ_map_utils import show_map, plot_occ_map, load_map, plot_grid_map_hmm
from data_loader import get_iters
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('-dataset', nargs='?')
pars... | stomachacheGE/bofmp | utils/visualize_ground_truth.py | visualize_ground_truth.py | py | 4,326 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "imp.load_source",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "data_loader.get_iters",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "numpy.r... |
5537433704 | import numpy as np
import pygame
import sys
WIDTH = 800
HEIGHT = 800
# setting up pygame window
pygame.init()
screen = pygame.display.set_mode((WIDTH, HEIGHT))
pygame.display.set_caption('Ulams Spiral')
def ulam_Spiral():
size = 201 #size of the array(row and col)
max_num = size*size
array... | RoshanDorkhande/Ulam-s-Spiral-of-Prime-Numbers | Ulam's_Spiral.py | Ulam's_Spiral.py | py | 2,097 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pygame.init",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "pygame.display... |
70488690427 | # accepted on coderun
import http.client
# task important pars:
VARS_Q = 4
method = 'MEW'
request_header = "X-Cat-Variable"
response_header = "X-Cat-Value"
def get_values():
names = get_pars()
print(f'names: {names}')
# connection establishing:
client_ = http.client.HTTPConnection('127.0.0.1', 7777... | LocusLontrime/Python | Yandex_fast_recruit_days/Medium/mew_http.py | mew_http.py | py | 1,987 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "http.client.client.HTTPConnection",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "http.client.client",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "http.client",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": ... |
2357894117 | #!/usr/local/bin/python3
import mne
import json
import os
from brainlife_apps_helper import helper
def head_pos(raw, param_compute_amplitudes_t_step_min,
param_compute_amplitudes_t_window,
param_compute_amplitudes_ext_order,
param_compute_amplitudes_tmin,
param... | brainlife/app-head-pos | head_pos.py | head_pos.py | py | 4,970 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "mne.chpi.compute_chpi_amplitudes",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "mne.chpi",
"line_number": 56,
"usage_type": "attribute"
},
{
"api_name": "mne.chpi.compute_chpi_locs",
"line_number": 63,
"usage_type": "call"
},
{
"api_nam... |
12476242968 | # -*-coding:utf-8 -*-
#
# Created on 2016-08-27, by felix
#
from django.db import models
from utils.DjangoUeditor.models import UEditorField
class About(models.Model):
content = UEditorField(verbose_name=u'正文', width=1200, height=800, imagePath='about/')
is_published = models.BooleanField(verbose_name=u'是否... | felixglow/shangjin | apps/about/models.py | models.py | py | 453 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.db.models.Model",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "utils.DjangoUeditor.models.UEditorField",
"line_number": 12,
"usage_type": "call"
},
{
... |
28643137587 | from telebot.types import Message
from loader import bot
@bot.message_handler(commands=['start'])
def bot_start(message: Message) -> None:
"""Хандлер, реагирующий на команду start"""
bot.send_message(message.from_user.id, f"Здравствуйте, {message.from_user.full_name}! \U0001F91D\n"
... | akorsunov23/telegram_bot | handlers/default_heandlers/start.py | start.py | py | 596 | python | ru | code | 0 | github-code | 6 | [
{
"api_name": "telebot.types.Message",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "loader.bot.send_message",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "loader.bot",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "loader.bot.mess... |
43506565806 | import wx
class win(wx.Frame):
def __init__(self,parent):
wx.Frame.__init__(self,parent,title="test")
self.SetSize(960,540)
self.panel = wx.Panel(self,wx.ID_ANY)
self.btn = wx.Button(self.panel,-1,label="Push",pos=(0,450))
self.timer = wx.Timer(self)
self.Bind(wx.EVT... | MogamiTsuchikawa/wxPython_WindowAnimationTest | window.py | window.py | py | 799 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "wx.Frame",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "wx.Frame.__init__",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "wx.Frame",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "wx.Panel",
"line_numbe... |
25559983329 | """
Elasticseach queries
"""
import re
import json
import logging
from datetime import datetime, timedelta
from elasticsearch_dsl import Search
log = logging.getLogger(__name__)
class ElasticQueryWrapper(object):
"""
Wrapper object for dynamically constructing elastic search queries.
"""
def __ini... | Amsterdam/parkeerscans | api/parkeerscans/metingen/queries.py | queries.py | py | 14,513 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "elasticsearch_dsl.Search",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "elasticsearch_dsl.Search",
"line_number": 41,
"usage_type": "name"
},
{
"api_name": "d... |
37882424100 | import sys
import random
from PySide6 import QtCore, QtWidgets, QtGui
from file_event_source import FileEventSource
from backlog import BACKLOGS
class MainWindow(QtWidgets.QWidget):
def __init__(self, backlogs):
super().__init__()
self.backlogs = backlogs
print()
print('*** Strateg... | co-stig/flowkeeper | flowkeeper-v2-python/ui.py | ui.py | py | 1,281 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "PySide6.QtWidgets.QWidget",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "PySide6.QtWidgets",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "PySide6.QtWidgets.QVBoxLayout",
"line_number": 20,
"usage_type": "call"
},
{
"api_... |
10614313738 | import pandas as pd
from matplotlib import pyplot as plt
#Importando dataset base
file_url = 'https://github.com/josueramalho/visualizacao-da-informacao/raw/master/src/dataset.csv'
dataset = pd.read_csv(file_url)
dataset = pd.DataFrame(dataset)
#Tratando dataset e selecionando os dados que serão usados
topic = 'Deaths... | josueramalho/visualizacao-da-informacao | grafico2.py | grafico2.py | py | 846 | python | pt | code | 1 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pandas.Series",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pandas.Series",
"lin... |
20774801582 | from nltk import word_tokenize
import re
from unidecode import unidecode
import codecs
import reader
class GeneratorInvertedList(object):
def __init__(self, file_list):
self.file_list = file_list
self.write_path = ""
self.read_paths = []
self.inverted_list = {}
self.document_id = None
self.no_stopwords_... | egbertocaetano/BRI-Final | generator_inverted_list.py | generator_inverted_list.py | py | 1,674 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "nltk.word_tokenize",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "unidecode.unidecode",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "codecs.open",
"line_number": 69,
"usage_type": "call"
},
{
"api_name": "reader.Reader",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.