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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
37796032374 | """Public customer interface without
HIS authentication or authorization.
"""
from flask import request
from hinews.messages.image import NoSuchImage
from hinews.messages.public import MissingAccessToken, InvalidAccessToken
from wsgilib import JSON, Binary
from hievents.messages.event import NoSuchEvent
from hievents... | homeinfogmbh/hievents | hievents/wsgi/public.py | public.py | py | 2,348 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "flask.request.args",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "hinews.messages.public.MissingAccessToken",
"line_number": 22,
"usage_type": "call"
},
{
"a... |
21672220802 | from django.urls import path
from .views import (
create_seller_account, update_seller_account,
create_company_seller, update_company_seller
)
app_name = "seller"
urlpatterns = [
path('seller-create', create_seller_account, name='create_seller'),
pat... | DemoDomo1234/myshop | seller/urls.py | urls.py | py | 530 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.urls.path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "views.create_seller_account",
"line_number": 10,
"usage_type": "argument"
},
{
"api_name": "django.urls.path",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "vie... |
18315797570 | #!/usr/bin/env python3
from hanzi_util import is_zhs, is_terminator
import jieba
from copy import deepcopy
import os
import pickle
STOP_FILE = 'stopwords.txt'
TYCC_FILE = 'TYCCL.txt'
TRAIN_COPS = 'train.txt'
#TRAIN_COPS = 'C08-财经.txt'
#TRAIN_COPS = 'all.txt'
#
# { '单词': [{'意项1': W1, W2, ...}, {'意项2': W1, W2, ...},... | taozhijiang/chinese_nlp | recyle/disamb/disamb_v2.py | disamb_v2.py | py | 9,289 | python | en | code | 162 | github-code | 7 | [
{
"api_name": "hanzi_util.is_terminator",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "jieba.cut",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "hanzi_util.is_zhs",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "hanzi_util.is_zh... |
16674343518 | import sys
import copy
from typing import List, Generator, NamedTuple, Callable
from collections import namedtuple,defaultdict
class Point(NamedTuple):
x: int
y: int
origin = Point(x=1,y=1)
def manhattanDistance(a: Point,b: Point)->int:
distance = abs(a.x - b.x) + abs(a.y - b.y)
return distance
delt... | jmcda001/AdventOfCode2019 | day3_CrossedWires/wireJumble.py | wireJumble.py | py | 6,226 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "typing.NamedTuple",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "typing.Generator",
"line... |
23544635797 | # -*- coding: utf-8 -*-
import logging
import phonenumbers
from datetime import datetime, timedelta
from dateutil import tz
from djmoney.money import Money
from django.conf import settings
from django.contrib.auth.models import Group
from django.contrib.auth import authenticate
from django.db.models import Q, Prefetch
... | over55/workery-django | workery/tenant_api/serializers/order_crud/invoice_second_section_update.py | invoice_second_section_update.py | py | 13,522 | python | en | code | 10 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "rest_framework.serializers.Serializer",
"line_number": 38,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 38,
"usage_type": "name"
},
... |
27937529385 | from collections import OrderedDict
from enum import Enum
# Applet fields with offset and width in to the applet header data
# (usually located at the start of the applet).
APPLET_HEADER_FORMAT = {
'size': 0x84, # The total size of the header
'fields': OrderedDict([
('signature', (0x00, 4, int)), # ... | lykahb/neotools | neotools/applet/constants.py | constants.py | py | 4,335 | python | en | code | 23 | github-code | 7 | [
{
"api_name": "collections.OrderedDict",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "collections.OrderedDict",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "enum.Enum",
"line_number": 66,
"usage_type": "name"
},
{
"api_name": "enum.Enum",
... |
17147632731 | import numpy as np
import numpy.testing as npt
import rasterio
from open_data import open_dataset_readers, stack_bands
def test_open_dataset_readers(tmp_path):
band_file_info = {}
for band_name in ["band1", "band2"]:
tmp_path.mkdir(parents=True, exist_ok=True)
file_path = tmp_path / f"{band_na... | Taraman12/Solarpark-detection | src/preprocessing/app/tests/test_open_data.py | test_open_data.py | py | 2,747 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "rasterio.open",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.ones",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "open_data.open_dataset_readers",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "rasterio.Data... |
24831857197 | import numpy as np
import random
import pytest
import torch
import raf
import mxnet as mx
from raf.testing import get_testable_devices, randn, randn_torch, check, run_vm_model, to_torch_dev
class TestModel(raf.Model):
def build(self, op, **kwargs):
self.op = op # pylint: disable=attribute-defined-outside... | awslabs/raf | tests/python/op/tvm/test_tvm_algorithm.py | test_tvm_algorithm.py | py | 5,551 | python | en | code | 133 | github-code | 7 | [
{
"api_name": "raf.Model",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "raf.model",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "raf.testing.randn",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "raf._op",
"line_n... |
34912954992 |
import sys,os,unittest,shutil,random,pdb
## Datetime import
import datetime
##scipy import
import scipy as spy
## vtools import.
from vtools.data.timeseries import rts,its
from vtools.data.timeseries import prep_binary
from vtools.data.vtime import ticks,number_intervals
from vtools.data.vtime import... | CADWRDeltaModeling/vtools | vtools/functions/test_merge.py | test_merge.py | py | 7,598 | python | en | code | 8 | github-code | 7 | [
{
"api_name": "unittest.TestCase",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "vtools.data.vtime.time_interval",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "vtools.data.vtime.time_interval",
"line_number": 38,
"usage_type": "call"
},
{... |
37491882153 | from django.urls import path, re_path
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('list', views.list_meetings, name='list'),
re_path(r'^m/(?P<slug>\w+)$', views.unbreakout, name='meeting'),
path('create', views.create, name='create'),
path('clear', views.clear, ... | mitmedialab/unbreakout | meetings/urls.py | urls.py | py | 1,329 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.re_path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.urls.path",... |
7336640666 | import re
import argparse
def clean( file_in, file_out ):
re_pattern = "\d{1,20}, "*7
re_pattern += "\d{1,20}"
with open( file_in, "r+" ) as f:
lines = f.readlines()
with open( file_out, "w+" ) as f:
f.write( "Set,Way,Physical Address,Victim Address,Program Counter,Type,Hit,Cache Frie... | saching6/15740_Project | convert_to_csv.py | convert_to_csv.py | py | 942 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "re.search",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 23,
"usage_type": "call"
}
] |
30882490333 | import logging
from ops.charm import CharmBase
from ops.main import main
from ops.model import ActiveStatus
from ops.pebble import ChangeError, ExecError, Layer, PathError, ProtocolError
logger = logging.getLogger(__name__)
class TorObfs4Bridge(CharmBase):
"""Charm the application."""
_container_name = _la... | sed-i/tor-obfs4-bridge-k8s-operator | src/charm.py | charm.py | py | 1,912 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "ops.charm.CharmBase",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "ops.model.ActiveStatus",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "ops.pebbl... |
26016382498 | from django.shortcuts import render, redirect
from django.contrib.auth import login, logout
from .forms import UserLoginForm, CreateAccountForm
from django.contrib import messages
from django import forms
# Create your views here.
def home(request):
return render(request=request, template_name='main/index.html'... | ilovecocolade/TuDu_prototype | TuDu_prototype/main/views.py | views.py | py | 1,388 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.shortcuts.render",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "forms.CreateAccountForm",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.login",
"line_number": 23,
"usage_type": "call"
},
{
"api_nam... |
35005569096 | import xml.etree.ElementTree as ET
import os
import io
folder_path = "data"
def thing(file, filename):
tree = ET.parse(file)
root = tree.getroot()
records=[]
for record in root.iter('{http://www.openarchives.org/OAI/2.0/}metadata'):
fields = {}
for field in record.iter():
... | hollyjudge/customBuiltSearchEngine | processing.py | processing.py | py | 1,166 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "xml.etree.ElementTree.parse",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "xml.etree.ElementTree.Element",
"line_number": 24,
"usage_type": "call"
},
{
"api... |
19754988003 | import warnings, pandas as pd, numpy as np
import gensim.corpora
from gensim.models import LdaModel
warnings.filterwarnings('ignore')
def display_topics(H, W, feature_names, documents, no_top_words, no_top_documents):
f = open('LDA/result.txt', 'w')
for topic_idx, topic in enumerate(H):
print('\nTopic ... | Boscoaran/Sistemas-de-Apoyo-a-la-Decision | LDA/LDA_gensim.py | LDA_gensim.py | py | 2,156 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "numpy.argsort",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "gensim.corpora.c... |
36038257257 | """Analysis of spot detection gridsearch"""
import os
from pathlib import Path
from typing import *
import pandas as pd
from gertils import ExtantFile, ExtantFolder
from detect_spots import Parameters
from detect_spots_gridsearch import ParamIndex
def read_config_file(fp: Union[str, Path]) -> Parameters:
fp = E... | gerlichlab/looptrace | analysis__ad_hoc/analyse_spot_detection_parameterisations.py | analyse_spot_detection_parameterisations.py | py | 2,814 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pathlib.Path",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 14,
"usage_type": "argument"
},
{
"api_name": "gertils.ExtantFile",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "gertils.ExtantFile.f... |
8234290830 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Python pointcloud viewer application for MKE sensors
"""
__author__ = 'Sujay Jayashankar', 'Kiran NV', 'Karthik Raja S'
__copyright__ = 'Copyright (c) 2021, Magik-Eye Inc.'
# =============================================================================
from PySi... | MagikEyeInc/SDK | pymkeviewer/pymkeviewer/pymkeviewer/pymkeviewer.py | pymkeviewer.py | py | 48,222 | python | en | code | 13 | github-code | 7 | [
{
"api_name": "os.environ",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "PySide2.QtWidgets.QMainWindow",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "PySide2.QtWidgets",
"line_number": 37,
"usage_type": "name"
},
{
"api_name": "... |
3937930488 | #! /usr/bin/env python3
import os
import time
import h5py
import argparse
import datetime
from helixer.export.exporter import HelixerExportController
parser = argparse.ArgumentParser()
parser.add_argument('--main-folder', type=str, default='', required=True,
help='Main single genome folder. Expects... | weberlab-hhu/helixer_scratch | data_scripts/merge-single-genomes-into-training-dataset.py | merge-single-genomes-into-training-dataset.py | py | 1,719 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "h5py.File",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_num... |
15544992750 | import sys
from feed.models import Exercise, Favorisation
from django.contrib import auth
from .forms import SignUpForm
from django.shortcuts import render, redirect
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth import login, authenticate
from django.contrib.auth.decorators import logi... | sigrunnu/programvareutviklingV2020 | profile_page/views.py | views.py | py | 1,785 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "sys.path.append",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.auth.get_user",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "django.contr... |
11504168900 | #!/usr/bin/env python3
import os
import re
import requests
import posixpath
import argparse
from git import Repo
parser = argparse.ArgumentParser('gitlab-clone-group.py')
parser.add_argument('group_id', help='id of group to clone (including subgroups)')
parser.add_argument('directory', help='directory to clone repos i... | adroste/gitlab-clone-group | gitlab-clone-group.py | gitlab-clone-group.py | py | 1,696 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "posixpath.join",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path.commonpref... |
26200413615 | from logging import getLogger
import falcon
from snooze.utils.functions import authorize
from snooze.plugins.core.basic.falcon.route import Route
from snooze.utils.condition import get_condition
log = getLogger('snooze-api')
class SnoozeRoute(Route):
'''Pre-process the time_constraints field for sorting purpose... | snoozeweb/snooze | snooze/plugins/core/snooze/falcon/route.py | route.py | py | 1,967 | python | en | code | 11 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "snooze.plugins.core.basic.falcon.route.Route",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "snooze.utils.functions.authorize",
"line_number": 13,
"usage_type": "name"
... |
27359814283 | import bpy
from os import path
from mv import fd_types, unit, utils
from . import mv_closet_defaults as props_closet
from . import common_parts
from . import common_prompts
from . import common_lists
LOCK_DRAWER_TYPES=[('None','None','None'),
('Top','Top','Top'),
('Left','Left','L... | CCDevNelson/Snap-Updates | library_scripts/Library-Classy_Closets/data_drawers.py | data_drawers.py | py | 67,901 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "mv.fd_types.Assembly",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "mv.fd_types",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "mv.unit.inch",
"line_number": 204,
"usage_type": "call"
},
{
"api_name": "mv.unit",
"li... |
71543837024 | import telebot
import json
from telebot.types import ReplyKeyboardMarkup, InlineKeyboardMarkup, InlineKeyboardButton
from bot_key import bot_key
from send import send
bot = telebot.TeleBot(bot_key)
with open('../db/settings.json') as file:
settings = json.load(file)
id = settings["telegram"]["id"]
@bot.messag... | itKillerWhale/day_planner | bot/bot.py | bot.py | py | 4,822 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "telebot.TeleBot",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "bot_key.bot_key",
"line_number": 9,
"usage_type": "argument"
},
{
"api_name": "json.load",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_num... |
9357895819 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from setuptools import setup
with open('requirements.txt') as infile:
requirements = infile.read()
setup(
version='v0.1.0',
name='reddit_get_top_images',
description='Download top images from any subreddit',
licence='MIT',
author='nagracks',
... | nagracks/reddit_get_top_images | setup.py | setup.py | py | 636 | python | en | code | 36 | github-code | 7 | [
{
"api_name": "setuptools.setup",
"line_number": 11,
"usage_type": "call"
}
] |
4925042218 | import argparse, os
import torch
import random
import torch.backends.cudnn as cudnn
import torch.nn as nn
import torch.optim as optim
from torch.autograd import Variable
from torch.utils.data import DataLoader
from model import Net
from dataset import DatasetFromHdf5
import time
import numpy as np
import re
# Training ... | wdd614/3DSRCNN-pytorch | main.py | main.py | py | 6,576 | python | en | code | 6 | github-code | 7 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name": "rando... |
34378446613 | from pathlib import Path
import os
import random
import codecs
import re
class Word:
def __init__(self):
top_dir = Path(os.getcwd()).parent
file_name = top_dir / "Data" / "Words.txt"
with codecs.open(file_name, 'r', "utf-8") as f:
self.words = [x.rstrip() for x in f.readlines()... | Aqudi/Word_Worrier | lib/word.py | word.py | py | 1,816 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pathlib.Path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.getcwd",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "codecs.open",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "random.randrange",
"line_numbe... |
18163896045 | """Add random reverb to the audio stems based on DDSP library."""
import os
import numpy as np
import glob
import argparse
import librosa
import ddsp
from tqdm import tqdm
from utils.file_utils import get_config
from utils.file_utils import pickle_load, pickle_dump
from midi_ddsp.utils.audio_io import save_wav
from mi... | lukewys/chamber-ensemble-generator | audio_augmentation.py | audio_augmentation.py | py | 3,429 | python | en | code | 48 | github-code | 7 | [
{
"api_name": "librosa.load",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_nu... |
22312389836 | import h_transport_materials as htm
from datetime import date
import json
citations_data = {"date": str(date.today()), "dois": {}}
for i, prop in enumerate(htm.database):
if prop.doi not in citations_data["dois"]:
citations_data["dois"][prop.doi] = prop.nb_citations
print(i)
with open("htm_dashbo... | RemDelaporteMathurin/h-transport-materials-dashboard | htm_dashboard/cache_citations.py | cache_citations.py | py | 407 | python | en | code | 9 | github-code | 7 | [
{
"api_name": "datetime.date.today",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "h_transport_materials.database",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "js... |
25907292294 | import cv2
# Load the face cascade classifier
face_cascade = cv2.CascadeClassifier('FaceDetectionTraining.xml')
# Load the image
image = cv2.imread('a2.bmp')
# Convert the image to grayscale
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
# Perform face detection
faces = face_cascade.detectMultiScale(gray, scaleFact... | ahmedatef2023/Face-Recognition | image.py | image.py | py | 940 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "cv2.CascadeClassifier",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY",
... |
4765619279 | #######################################################################
# -*- coding: utf-8 -*- #
# #
# Form implementation generated from reading ui file 'fileos.ui' #
# GUI created by PYQT v5.2 ... | cardbug/Linux-FileManager | fileos.py | fileos.py | py | 6,517 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "PyQt5.QtCore.QSize",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtCore",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtWidgets.QWidget",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidge... |
7040304738 |
from __future__ import print_function
import matplotlib.pyplot as plt
import mpl_toolkits
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
from numpy import linspace
import numpy as np
import cv2
import math
import os
from multiprocessing.dummy import Pool as ThreadPool
import glob
import pickle
impor... | eugeniu1994/Stereo-Camera-LiDAR-calibration | MonoChess.py | MonoChess.py | py | 20,377 | python | en | code | 13 | github-code | 7 | [
{
"api_name": "numpy.set_printoptions",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "cv2.TERM_CRITERIA_EPS",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "cv2.TERM_CRITERIA_COUNT",
"line_number": 22,
"usage_type": "attribute"
},
{
"ap... |
1672183832 | import json
import numpy as np
class score_keeper():
def __init__(self):
self.score = 0
def calc_score(img1, img2):
centrePoint = [0, 0]
frameCount = -1
avgErr = []
for keyPointInd in range(1, numKeypoints):
overallInd = frameInd*numKeypoints + keyPointInd
tgtKP = targetKeypointsDiv... | Martin0xFF/poser | poser/poseJSONDecoder.py | poseJSONDecoder.py | py | 1,099 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "json.loads",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.max",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "numpy.abs",
"line_number": 30,
... |
74068690144 | import re
import sys
import pandas as pd
import urllib.request # URL을 가져오기 위한 파이썬 모듈
import os
import cv2
import random
import numpy as np
import matplotlib.pyplot as plt
import glob
import math
from PyQt5 import uic
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import QApplication, QWidget
from PyQt5.QtCore i... | bsy3764/python-qt | prescription/drug1.py | drug1.py | py | 5,639 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "PyQt5.uic.loadUiType",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "PyQt5.uic",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "pandas.read_csv",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
... |
24416349031 | import nltk
import string
import os
import json
from bs4 import BeautifulSoup
from nltk.corpus import stopwords
from nltk.tokenize import word_tokenize
from nltk.stem import PorterStemmer
# Download nltk libraries if not available locally.
nltk.download('punkt')
nltk.download('stopwords')
#nltk.download('stem.porter'... | Poompoomi/CSI4107 | a1/preprocess.py | preprocess.py | py | 3,110 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "nltk.download",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "nltk.download",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_numbe... |
22497007228 | #!/bin/python3
# %%
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import sys
file_name = sys.argv[1]
f = open(file_name)
f_rec = open(sys.argv[2])
line = f.readline()
i = 0
fig, ax = plt.subplots()
plt.rcParams["figure.figsize"] = [100, 100]
while len(line) > 0:
array = ... | shenjiangqiu/new_gcn | draw_graph.py | draw_graph.py | py | 900 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "sys.argv",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "matplotlib.pypl... |
27364255479 | # Import libraries
import numpy as np
import pandas as pd
import os as os
from sklearn import preprocessing
from sklearn.linear_model import LinearRegression
from sklearn.linear_model import LogisticRegression
from sklearn.naive_bayes import GaussianNB
from sklearn import svm
from sklearn.model_selection impor... | CalmEnigma/EmployeeRetention | Retention_Case_modelling.py | Retention_Case_modelling.py | py | 8,687 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "os.chdir",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 81,
"usage_type": "call"
},
{
"api_name": "statsmodels.stats.outliers_... |
74065123424 | # -*- coding:utf-8 -*-
#Import models
from django.core.management.base import BaseCommand
from ...models import Youtube_Video, Game_Tag
#import modules
import pprint
import datetime
class Command(BaseCommand):
help = '--youtube_video_org_id [id] : update or create specific video info '
MOBILE_TAG = ['mobi... | k-ysu/raptor-public | raptor/streamer/management/commands/update_video_category.py | update_video_category.py | py | 3,952 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.core.management.base.BaseCommand",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.now",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 30,
"usage_type": "attribute"
},
{
... |
5822181275 | import requests
import parsel
from tqdm import tqdm
url = 'http://biqugse.com/8820/'
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36'
}
response = requests.get(url, headers).text
selector = parsel.Selector(response)
novel_na... | xiaoxu123195/Reptile_Collection | 小说下载器/笔趣阁.py | 笔趣阁.py | py | 1,074 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "requests.get",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "parsel.Selector",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "tqdm.tqdm",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number... |
26347987013 | # encoding=utf-8
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
class WaitPageElement(object):
def __init__(self, driver):
self.driver = driver
self.locTypeDict={'id': By.ID,
... | luoest/KeyPlusDataFrameWork | utilities/WaitElement.py | WaitElement.py | py | 2,359 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "selenium.webdriver.common.by.By.ID",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "selenium.webdriver.common.by.By",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.common.by.By.NAME",
"line_number": 10,
"usage_ty... |
8064164525 | #!/usr/bin/env python
# coding: utf-8
# Cloning the github repo!
# In[1]:
# Clone the repo
# !git clone https://github.com/qubvel/segmentation_models.git
# In[2]:
get_ipython().run_line_magic('cd', 'segmentation_models')
# In[3]:
# Visualise dependencies
# !cat requirements.txt
# In[4]:
# Install depend... | rydwy01/CS-230-Solar-Digital | solar-digtial-main/Segmentation_Solar.py | Segmentation_Solar.py | py | 8,096 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pandas.read_csv",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 64,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 64,
"usage_type": "name"
},
{
"api_name": "numpy.array",
"line_numb... |
21321635933 | import pygame as pg
import sys, time
from gvars import *
from entities import Player, Magic, Student, Cat, Banner, Night
screen = None
redline = None
clock = None
player = None
magic_sprites = None
player_sprites = None
student_sprites = None
cat_sprites = None
banner_sprites = None
night_sprites = None
font_score = ... | lanranranM/SquidGame-CovidLife | main.py | main.py | py | 9,782 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "pygame.mixer.Channel",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "pygame.mixer",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name": "pygame.mixer.Sound",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "pygame.tran... |
23631931525 | import argparse
from server import Server
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--host", default="localhost", help="Host address to bind to")
parser.add_argument("--port", type=int, default=1423, help="Port number to bind to")
args = parser.p... | mrshn/aid-delivery-system-445 | main.py | main.py | py | 499 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "server.Server",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "server.start",
"line_number": 12,
"usage_type": "call"
}
] |
30273086976 | """Tests the functions in day08"""
from typing import List
import pytest
from pytest import fixture
from ..day08 import (
Operation,
Instruction,
parse_instruction,
negate_instruction,
determine_accumulator,
swapped_instructions,
)
def test_parse_instruction():
assert parse_instruction("... | raui100/AdventOfCode | 2020/python/src/tests/test_day08.py | test_day08.py | py | 3,021 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "day08.parse_instruction",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "day08.Instruction",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "day08.Operation.JUMP",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "d... |
29062256045 | from django.db import models
from django.contrib.auth.models import User
from allauth.account.models import EmailAddress
from datetime import datetime
from django.utils import timezone
#from allauth.socialaccount.models import SocialAccount
#import hashlib
today = datetime.now()
class UserProfile(models.Model):
u... | fedehenzenn/iwsefe | sitio/models.py | models.py | py | 1,147 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "datetime.datetime.now",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "django.db.models.Model",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "dja... |
8034378101 | import re
import pandas as pd
import pretty_errors
import pycountry
from geonamescache import GeonamesCache
import json
# Create an instance of the GeonamesCache class
gc = GeonamesCache()
# Get a dictionary of all countries and their information, including capital cities
geo_countries = gc.get_countries()
d... | 0JCRG0/Crawler-remote-jobs | sql/clean_loc.py | clean_loc.py | py | 4,213 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "geonamescache.GeonamesCache",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pycountry.countries... |
2065308506 | from flask import Flask
from flask import Blueprint, flash, g, redirect, render_template, request, url_for
import rr_main
from datetime import date
today = date.today()
current_year = date.today().strftime('%Y')
import numpy as np
import pandas as pd
import random
ratings = pd.read_csv('datasets/ratings-s.csv')
users... | tamccullough/recipeeze | main.py | main.py | py | 1,663 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "datetime.date.today",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "datetime.date.today",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "datetime.date",
... |
4163973881 | from typing import Any, Optional
class Knot:
def __init__(self, value: Optional[Any] = None, next_value: Optional['Knot'] = None) -> None:
self.value = value
self.next_value = next_value
def __str__(self) -> str:
return 'Knot [{value}]'.format(
value=str(self.value)
... | alexei915/Skillbox | Module26/06_linked_list/main.py | main.py | py | 2,478 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "typing.Optional",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "typing.Any",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "typing.Any",
"line_number": 32,
"usage_type": "name"
}
] |
18468985084 | # -*- coding:utf-8 -*-
from typing import List
class Solution:
def maximalRectangle(self, matrix: List[List[str]]) -> int:
if len(matrix) == 0: return 0
m, n = len(matrix), len(matrix[0])
dp = [[0 for j in range(n)] for i in range(m)]
for i in range(m):
for j in range(... | weizhixiaoyi/leetcode | dp/85.maximal-rectangle.py | 85.maximal-rectangle.py | py | 1,629 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "typing.List",
"line_number": 7,
"usage_type": "name"
}
] |
13441237753 | import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(0, 10, 100)
f = (np.exp((-x)/10))*np.sin(np.pi*x)
g = x*np.exp(-x/3)
plt.figure()
plt.plot(x, f,label='f')
plt.plot(x, g,label='g')
plt.xlabel('X')
plt.ylabel('Y')
plt.legend()
plt.show()
| MehradShahmiri/Python-class | Ex10_3_1_mehrad Shahmiri.py | Ex10_3_1_mehrad Shahmiri.py | py | 275 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "numpy.linspace",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "numpy.exp",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.sin",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.pi",
"line_number": 6,
... |
42943175271 | # pylint: disable=W0621,C0116,R0903,E0401,W0703,W1201,missing-function-docstring,E0401,C0114,W0511,W1203,C0200,C0103,W1203
import logging
from models.section import Section
from repository.persist_fs import PersistFS as persist_fs
from tests.moke.process_fs import ProcessFS as process_fs
def test_init(get_config_map... | obar1/0to100 | zero_to_one_hundred/tests/test_section.py | test_section.py | py | 975 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "models.section.Section",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "repository.persist_fs.PersistFS",
"line_number": 10,
"usage_type": "argument"
},
{
"api_name": "tests.moke.process_fs.ProcessFS",
"line_number": 10,
"usage_type": "argument"
... |
33928086758 | import os
import pickle
import rosbag
import numpy as np
from .timestamp_series import TimestampSeries
from .tools import *
DefaultTopic = '/device_time'
def guessTopics(bagFile):
with rosbag.Bag(bagFile) as bag:
found = []
for topic, value in bag.get_type_and_topic_info().topics.items() :
if value... | ethz-asl/cuckoo_time_translator | cuckoo_time_translator_python/python/cuckoo_time_translator_python/device_time_bags.py | device_time_bags.py | py | 1,634 | python | en | code | 87 | github-code | 7 | [
{
"api_name": "rosbag.Bag",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path.realpath",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "os.path.exists",
"line_n... |
29363450024 | import click
import openai
from skainet import utils
from skainet.data import CONFIG
DEFAULT_CHAT_MODEL = CONFIG["moderation"]["model"]
@click.command()
@click.argument("input", type=utils.Prompt(), default="")
@click.option(
"-m",
"--model",
type=str,
default=DEFAULT_CHAT_MODEL,
help=f"Model se... | zachmorr/skainet | src/skainet/moderate.py | moderate.py | py | 687 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "skainet.data.CONFIG",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "openai.Moderation.create",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "openai.Moderation",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "op... |
40692444152 | #import art
import random
from art import logo, vs
from game_data import data
from replit import clear
def get_random_account():
"""Get data from random account"""
return random.choice(data)
def format_data(account):
"""format the acct dat into printable formats."""
account_name = account['name']
... | Queena805/100-Days-Python | Day14/HigherLowerGame.py | HigherLowerGame.py | py | 2,135 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "random.choice",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "game_data.data",
"line_number": 10,
"usage_type": "argument"
},
{
"api_name": "art.logo",
"line_number": 30,
"usage_type": "argument"
},
{
"api_name": "art.vs",
"line_numb... |
42868778033 | from container import Container
import subprocess
import threading
import requests
import json
from job import Job
import re
containers = [
Container(1, "172.18.0.2"),
Container(2, "172.18.0.3"),
Container(3, "172.18.0.4")
]
jobs = []
stop = False
def docker_compose_up():
# process = subprocess.Popen([... | AliNazariii/load-balancer | main.py | main.py | py | 2,324 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "container.Container",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "container.Container",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "container.Container",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "subproces... |
31317463336 | from flask import Flask
app = Flask(__name__)
def get_fibonacci_numbers(n):
numbers = [1, 1]
for i in range(2, n):
numbers.append(numbers[i - 1] + numbers[i - 2])
return numbers
def get_fib(n):
a, b = 1, 1
for _ in range(n):
yield a
a, b = b, a + b
@app.route("/fibonac... | windn19/UchiPro4-1 | tasks/task2.py | task2.py | py | 558 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "flask.Flask",
"line_number": 3,
"usage_type": "call"
}
] |
14855709833 | import pygame
import os
import math
import random
import time
from player import Player
from pipe import Pipe
from population import Population
population = 100 # set initial population
config = [
# 3 input: bird y position, top pipe position and bottom pipe position
{"nodeCount": 3, "type": "input"},
... | polowis/neatevo | main.py | main.py | py | 4,921 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pygame.font.init",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "pygame.font",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name": "pygame.font.SysFont",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "pygame.font",
... |
74656567263 | from datetime import datetime
import numpy as np
import json
from pandas import read_csv
from pandas import datetime
from matplotlib import pyplot
from sklearn.model_selection import train_test_split
from statsmodels.tsa.arima_model import ARIMA
from sklearn.metrics import mean_squared_error
with open("../Data/compani... | QMIND-Team/Financial-Tech-2019-2020 | Models/ARIMA-income.py | ARIMA-income.py | py | 1,980 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "json.load",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pandas.datetime",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "nu... |
22666875349 |
from flask import Flask, request
from flask import Response
from flask import jsonify
import json
import threading
import requests
import sys
import queue
import time
import pandas as pd
import utils_balance as ub
from concurrent.futures import ThreadPoolExecutor
from csv import writer
import os
from datetime import d... | josemorin98/TSSD_proyecto_final | cbNodo/app.py | app.py | py | 29,712 | python | es | code | 0 | github-code | 7 | [
{
"api_name": "flask.Flask",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "numpy.power",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "utils_balance.conc",
"line_... |
38760050373 | """Main module."""
# -----------------------------------------------------------------------------
# Imports
# -----------------------------------------------------------------------------
import spikedetekt2
import logging
import imp
import os.path as op
import numpy as np
import tables as tb
from .progressbar impo... | sapphire008/Python | Spikes/spikedetekt2/spikedetekt2/core/main.py | main.py | py | 12,436 | python | en | code | 14 | github-code | 7 | [
{
"api_name": "os.path.basename",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "os.path.splitext",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number"... |
70861526305 | import requests
from datetime import datetime
import json
from config import API_KEY
class WeatherInfo:
# Constructor for the class
def __init__(self, cityName, lat = None, lon = None):
# location info
self.lat = lat
self.lon = lon
self.cityName = cityName
# weather inf... | TomNguyen10101/Weather-Daily-Lookup | weather.py | weather.py | py | 3,240 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "config.API_KEY",
"line_number": 36,
"usage_type": "name"
},
{
"api_name": "config.API_KEY",
"line_number": 38,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_num... |
71933595423 | from django.conf import settings
from django.db import models
from django.contrib.auth.models import AbstractUser
from django.utils.translation import ugettext_lazy as _
from utilities.media import write_file
from utilities.media import remove_old_file
from utilities.image_base64 import encode_image, image_exists... | arcanoix/alondracms | alondra/src/user/models.py | models.py | py | 2,854 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.db.models.options",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "django.contrib.auth.models.AbstractUser",
"line_number": 12,
"usage_type": "name"
},
{... |
5667266866 | #version: 1.0
#author: Jan Kurpas
#
#
#Tool to create finding charts, with objects marked.
#Start script with:
#
#python fctool.py IMAGE OBJECTS WINDOWSIZE
#
#
#IMAGE: FITS IMAGE showing the sky
#OBJECTS: ASCII File, where the first row gives the plots title, and the following rows give the objects position and name. ... | mcbernadich/PoCaS-ULX | fc_tool.py | fc_tool.py | py | 12,447 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "numpy.arccos",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "numpy.sin",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "numpy.pi",
"line_number": 54,
"usage_type": "attribute"
},
{
"api_name": "numpy.cos",
"line_number": 5... |
9536296619 | from ..schemas import AudioWordsSchema, AudioImageSchema
from . import audio, MethodView, abort, basepath
from ..models import Word, User
from .. import db
from sqlalchemy.exc import IntegrityError
from flask_jwt_extended import jwt_required, get_jwt_identity
from flask import current_app
import base64, os
from werkzeu... | wjceizo/DiaProject | backend/app/audio/words.py | words.py | py | 3,934 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "base64.b64encode",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "models.User.query.filter_by",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "models.User.query",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "m... |
25269038688 | import cobble.command
import cobble.validations
import discord
import databaseManager as dbm
from customcommands.customvalidations import *
import neatTables
class ILBoardCommand(cobble.command.Command):
def __init__(self, bot: cobble.bot.Bot):
"""
Parameters:
bot - The bot object the ... | William-Carter/ThatOtherLeaderboard | customcommands/ILBoard.py | ILBoard.py | py | 1,898 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "cobble.command.command",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "cobble.command",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "cobble.command.bot",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "cobb... |
8640895237 | # -*- coding: utf-8 -*-
import boto3
import json
import os
import subprocess
import sys
import urllib.parse
from base64 import b64decode
from boto3.dynamodb.conditions import Key, Attr
from datetime import datetime
from datetime import timedelta
ENCRYPTED = os.environ['ENCRYPTED_GOOGLE_API_KEY']
os.environ['GOOGLE_A... | semnil/TSGIS | lambda/steamGameTest/lambda_function.py | lambda_function.py | py | 2,532 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "os.environ",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "boto3.client",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "base64.b64decode",
"... |
71949142622 | import base64
from datetime import datetime
from typing import Optional
import discord
from discord.ext import commands
from configuration import Config
config = Config()
class Encuesta(commands.Cog):
def __init__(self, bot):
self.bot = bot
# FIXME: Here the problem is that with app_commands I co... | python-discord-es/bot | comandos/encuesta.py | encuesta.py | py | 4,086 | python | en | code | 7 | github-code | 7 | [
{
"api_name": "configuration.Config",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "discord.ext.commands.Cog",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands",
"line_number": 13,
"usage_type": "name"
},
{
"api_name"... |
29703630058 | from bs4 import BeautifulSoup
with open("index.html") as file:
html_code = file.read()
soup = BeautifulSoup(html_code, "html.parser")
# Udělá list všech odkazů
all_a = soup.find_all("a")
print(all_a)
for one_a in all_a:
# nebo místo string napsat gettext
# print(one_a.string)
# Printuje jen odkazy
... | ZdenekBudicek/WebScraping_Lekce | web_scraping2.py | web_scraping2.py | py | 353 | python | cs | code | 0 | github-code | 7 | [
{
"api_name": "bs4.BeautifulSoup",
"line_number": 6,
"usage_type": "call"
}
] |
38427418473 | from typing import NamedTuple
import flax
import jax
import jax.numpy as jnp
import jax.tree_util as jtu
from flax.core.frozen_dict import FrozenDict
import energy
import models
class MetaModule:
def __init__(self):
pass
def __call__(self, meta_state, x, method=None):
pass
def reset_hp... | smonsays/contrastive-meta-learning | bandit/meta/module.py | module.py | py | 5,144 | python | en | code | 9 | github-code | 7 | [
{
"api_name": "typing.NamedTuple",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "flax.core.frozen_dict.FrozenDict",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "flax.core.frozen_dict.FrozenDict",
"line_number": 29,
"usage_type": "name"
},
{
... |
38737995116 | from PySide2.QtCore import Qt, QPointF, QMimeData, QAbstractListModel, QModelIndex
from PySide2.QtWidgets import QListView
from sortedcontainers import SortedDict
from nfb_studio.serial import mime, hooks
class Toolbox(QAbstractListModel):
"""A list of scheme nodes that can be dragged to the scheme.
"""
... | bioelectric-interfaces/nfb_studio | nfb_studio/scheme/toolbox.py | toolbox.py | py | 3,364 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "PySide2.QtCore.QAbstractListModel",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "sortedcontainers.SortedDict",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "PySide2.QtWidgets.QListView",
"line_number": 21,
"usage_type": "call"
},
... |
12093066243 | import pytest
from broker.tasks.cloudfront import (
create_distribution,
disable_distribution,
wait_for_distribution_disabled,
delete_distribution,
)
from broker.extensions import db
from broker.models import CDNServiceInstance, Operation
from tests.lib import factories
@pytest.fixture
def service_i... | cloud-gov/external-domain-broker | tests/integration/test_cloudfront_idempotency.py | test_cloudfront_idempotency.py | py | 5,122 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "tests.lib.factories.CDNServiceInstanceFactory.create",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "tests.lib.factories.CDNServiceInstanceFactory",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "tests.lib.factories",
"line_number": ... |
1217232146 | import sys
import numpy as np
import json
import pandas as pd
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
def existsOR( data, keys ):
ret = False
for k in keys:
ret = ret or (k in data)
return ret
def existsAND( data, keys ):
ret = True
for k in keys:
ret = ret and (k in... | akeolab/traxxs | samples/python/plot_json.py | plot_json.py | py | 4,050 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "matplotlib.pyplot.ion",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "sys.argv",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
... |
39003570688 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from utils.base_solver import BaseSolver
import os, logging, importlib, re, copy, random, tqdm, argparse
import os.path as osp
import cPickle as pickle
import numpy as np
from collections import defaultdict
... | DirtyHarryLYL/SymNet | test_symnet_multi.py | test_symnet_multi.py | py | 2,561 | python | en | code | 48 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "run_symnet_multi.make_parser",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "utils.utils.display_args",
"line_number": 34,
"usage_type": "call"
},
{
"api_name"... |
33004039535 | import matplotlib.pyplot as plt
import numpy as np
x = np.arange(0, 1,0.00001)
y = np.sqrt(1 - x**2)
plt.plot(x, y,'y')
plt.plot(x, -y,'y')
plt.gca().set_aspect('equal')
plt.show()
| Justdosth/python-course | session 30/2.py | 2.py | py | 183 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "numpy.arange",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "numpy.sqrt",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"... |
18213816975 | #!/usr/bin/env python3
import os
import logging
import numpy as np
def sigmoid(x, derivative=False):
return x*(1-x) if derivative else 1/(1+np.exp(-x))
def _get_pipe_model_name(pipe, name):
for n, m in pipe.steps:
if n == name:
return m
return None
def _get_pipe_model_idx(pipe, idx):... | jianwei76/SoliAudit | va/vul-predict/utils.py | utils.py | py | 5,454 | python | en | code | 11 | github-code | 7 | [
{
"api_name": "numpy.exp",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 59,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_numb... |
33236022445 | # "x.py" as in "execute"
import os
import sys
import subprocess
import requests
from datetime import datetime, timedelta
from threading import Thread, Event
token = "{{ token }}"
logs_url = "{{ logs_url }}"
heartbeat_url = "{{ heartbeat_url }}"
class HeartbeatThread(Thread):
def __init__(self, event):
Thr... | BerkeleyBiostats/tlapp | templates/cluster_scripts/x.py | x.py | py | 1,092 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "threading.Thread",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "threading.Thread.__init__",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "threading.Thread",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "requests.... |
69976268062 | import scrapy
from scrapy import log
from scrapy.spiders import CrawlSpider, Rule
from scrapy.linkextractors import LinkExtractor
from rcbi.items import Part
import copy
import json
import re
import os.path
import urlparse
import urllib
VARIANT_JSON_REGEX = re.compile("product: ({.*}),")
MANUFACTURERS = []
CORRECT =... | rcbuild-info/scrape | rcbi/rcbi/spiders/MiniQuadBros.py | MiniQuadBros.py | py | 2,914 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "re.compile",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "scrapy.spiders.CrawlSpider",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "scrapy.spiders.Rule",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "scrapy.link... |
40418389695 | import argparse
import json
import os
import tempfile
from pathlib import Path
import openai
from dotenv import load_dotenv
from langchain.chains.combine_documents.stuff import StuffDocumentsChain
from langchain.chains.llm import LLMChain
from langchain.chat_models import ChatOpenAI
from langchain.document_loaders imp... | OlofHarrysson/iths-data-engineering-group-alphago | src/newsfeed/summarize.py | summarize.py | py | 7,153 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "openai.api_key",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "langchain.document_l... |
11575480702 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Apr 25 03:15:21 2019
@author: ishan
"""
import matplotlib.pyplot as plt
import numpy as np
show_animation = True
# Creating obstacle map
ox,oy = [],[]
explore_x,explore_y = [],[]
backtrack = []
obstacle = np.zeros(shape=(250,150))
for x in range (... | Ip-umd/Implementation-of-Dijkstra-and-Astar | obs_map.py | obs_map.py | py | 1,812 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "numpy.zeros",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 74,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 74,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplo... |
15218370255 | #!/usr/bin/env python3
import argparse
import sys
import pyperclip
from tabulate import tabulate
from tqdm import tqdm
import lime_comb
from lime_comb.commands.config import ConfigCommand
from lime_comb.commands.decrypt import DecryptCommand
from lime_comb.commands.encrypt import EncryptCommand
from lime_comb.command... | n0npax/lime-comb | cli/lime_comb/main.py | main.py | py | 4,046 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "lime_comb.commands.keys.KeysCommand",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "lime_comb.commands.encrypt.EncryptCommand",
"line_number": 47,
"usage_type": ... |
72859524702 | import os
from copy import deepcopy
import numpy as np
import argparse
from .utils import load_data
from .model import Model
import torch
def initialize_data(config, train=False, test=False):
print("Initializing data source...")
train_source, test_source = load_data(**config['data'], cache=(train or test))
... | Ascend/ModelZoo-PyTorch | PyTorch/contrib/cv/classification/GaitSet/model/initialization.py | initialization.py | py | 1,967 | python | en | code | 31 | github-code | 7 | [
{
"api_name": "utils.load_data",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "copy.deepcopy",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.prod",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "model.Model",
"line_numb... |
43998575259 | # -*- coding: utf-8 -*-
"""
Created on Wed Nov 25 18:13:27 2015
@author: NigmatullinR
"""
#пример связ с Гаусовским импульсом
import numpy as np
import pylab as plb
import scipy.signal as sgn
M=2 # decimation factor
t = np.linspace(-0.75, 0.75, 2 * 100, endpoint=False)#носитель на кот строится ГИ
g = sgn.gausspulse(... | GarageInc/old-university-projects | Python/COS/lab8/lab8/decimation_upsampling.py | decimation_upsampling.py | py | 1,091 | python | ru | code | 3 | github-code | 7 | [
{
"api_name": "numpy.linspace",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "scipy.signal.gausspulse",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "scipy.signal",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "pylab.plot",
... |
23376056185 | import os
from Nude import Nude
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser(description='Detect nudity in images.')
parser.add_argument('files', metavar='image', nargs='+',
help='Images you wish to test')
parser.add_argument('-r', '--resize', act... | CFWLoader/Toys | IsThatNude/tests.py | tests.py | py | 946 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path.isfile",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "Nude.Nude",
"l... |
36845867949 | import sys # 기본적으로 가져와야함, 시스템 쉘 정보등을 담고있음.
# QTWidgets 에 대부분의 기본 기능을 갖고있음. 버튼, 툴팁텍스트 추가 등등
from PyQt5.QtWidgets import QApplication, QWidget # 기본적으로 가져와야 할 2가지 모듈
# QWidget 을 상속받아 클래스 생성. (나만의 창을 만들기 위한)
class Exam(QWidget):
# 생성자 만들기
def __init__(self):
super().__init__() # super(): ... | lyj911111/PyQT5-Tutorial | 1_기본 위젯창 만들기, 창 이름설정, 버튼만들기, 마우스 테그 만들기/1_가장 기본 위젯창 만들기.py | 1_가장 기본 위젯창 만들기.py | py | 1,258 | python | ko | code | 0 | github-code | 7 | [
{
"api_name": "PyQt5.QtWidgets.QWidget",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtWidgets.QApplication",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "sys... |
23250427720 | import torch
import os
import argparse
import random
import numpy as np
from datetime import datetime
import torch.distributed as dist
from torch.nn.parallel import DistributedDataParallel as ddp
import logging
import sys
import time
from utils.data.data_dir import default_dir
from utils.data.augment import hard_trans... | iChenning/nas | ea_nas/step1_supertrain_ddp.py | step1_supertrain_ddp.py | py | 12,436 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "torch.tensor",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "torch.tensor",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "torch.max",
"line_number": 49... |
74065189664 | from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse
from django.template import loader
from django.http import Http404
from django.utils.translation import gettext as _
#models
from ..models import Streamer
from ..models import Game
#utility
import pprint
from ..utilit... | k-ysu/raptor-public | raptor/streamer/views/ranking.py | ranking.py | py | 4,493 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.http.Http404",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "django.http.Http404",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "djang... |
71109351903 | """
Este problema foi utilizado em 94 Dojo(s).
Dado uma letra ('A' a 'Z'), exiba um diamante iniciando em 'A' e tendo a letra fornecida com o ponto mais distante.
Por exemplo, dado a letra 'E' temos:
A
B B
C C
D D
E E
D D
C C
B B
A
Dado a letra 'C' temos:
A
B B
C C
B B... | amaurirg/Dojo_Puzzles | diamantes/diamantes.py | diamantes.py | py | 1,333 | python | pt | code | 0 | github-code | 7 | [
{
"api_name": "string.ascii_uppercase",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "curses.initscr",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "curses.endwin",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "curses.endwi... |
18300660880 | # Импортирование модулей
from aiogram import Dispatcher, Bot, types, executor
from aiogram.types import ReplyKeyboardMarkup, InlineKeyboardButton, InlineKeyboardMarkup, KeyboardButton
from aiogram.types.input_file import InputFile
import configure
# Создание экземпляра бота
bot = Bot(configure.config['API'])
update = ... | Masloyka/TelegramBOTEGE | telegram v1.1.py | telegram v1.1.py | py | 6,181 | python | ru | code | 2 | github-code | 7 | [
{
"api_name": "aiogram.Bot",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "configure.config",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "aiogram.Dispatcher",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "aiogram.types.Messa... |
19264538993 | import pygame as pg
import random
import os
import threading
# INFO: This code is a little bit messy
# TODO: Optimize code or cleaning
pg.init()
screen = pg.display.set_mode((800, 800))
clock = pg.time.Clock()
running = True
dt = 0
width = screen.get_width()
height = screen.get_height()
player_pos = pg.Vector2(... | zisakmc/onePiecePyGame | play.py | play.py | py | 3,776 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pygame.init",
"line_number": 8,
"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.time.Cl... |
36542788283 | from django.urls import path
from . import api
app_name = 'api'
urlpatterns = [
#path('apps/', api.app),
path('apps/<int:pk>/', api.app_details, name='api'),
path('all/', api.all_apps, name='all_api')
] | VSofficial/pystore | api/urls.py | urls.py | py | 216 | python | en | code | 6 | github-code | 7 | [
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
}
] |
70733603102 | import xml.etree.ElementTree as etree
maxdepth = 0
def depth(elem: etree.Element, level: int):
global maxdepth
currentDepth = level + 1
maxdepth = max(maxdepth, currentDepth)
for child in elem:
depth(child, currentDepth)
standard_input = """6
<feed xml:lang='en'>
<title>HackerRank</tit... | binh1298/hackerrank_practice | xml/2_find_max_depth.py | 2_find_max_depth.py | py | 733 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "xml.etree.ElementTree.Element",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "xml.etree.ElementTree",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "xml.etree.ElementTree",
"line_number": 25,
"usage_type": "name"
},
{
"api_... |
18064158919 | import requests
from flask import Flask
from flask import request
import os
import json
app = Flask(__name__)
## переносим таблицы с телефона локально
def get_remote_table():
r = requests.post(url = "http://192.168.0.72:8095/?mode=SQLQueryText&query=SELECT * FROM RS_barcodes¶ms=", #SELECT name FROM sqlite_m... | Lebowsky/simple_keep | Database_copy.py | Database_copy.py | py | 1,338 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "flask.Flask",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.getcwd",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "flask.request.files",
"line_nu... |
34216357976 | import torch
import os
from glob import glob
import cv2
from torchvision import transforms
import numpy as np
from itertools import chain
class dataset(torch.utils.data.IterableDataset):
def __init__(self,config,mode='train'):
self.mode = mode
self.config = config
self.basep... | rish-av/ganvo | dataset.py | dataset.py | py | 4,565 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "torch.utils",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "glob.glob",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": ... |
33209907866 | from django.urls import path
from .views import index, contato, produto, consulta1
urlpatterns = [
path('', index, name='index'),
path('contato/', contato, name='contato'),
path('produto/', produto, name='produto'),
path('consulta/<int:pk>', consulta1, name='consulta1'),
]
| allandiamante/django2-CRUD2 | core/urls.py | urls.py | py | 302 | python | pt | code | 0 | github-code | 7 | [
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "views.index",
"line_number": 6,
"usage_type": "argument"
},
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "views.contato",
"l... |
32900178728 | #!/usr/bin/env python
# Code samples for blog post
# http://mikethetechie.com/post/6975966936/controlling-the-environment-cloud-control-apis
#
# Note - I couldn't get this to work. For more info, see http://mikethetechie.com/private/6969971577/tumblr_lng0mzd5bg1qf6p57
import secrets # import user name RACKSPACE_USER an... | MikeTheTechie/rackspace-cloudfiles-loader | libcloud-load.py | libcloud-load.py | py | 1,016 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "libcloud.storage.providers.get_driver",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "libcloud.storage.types.Provider.CLOUDFILES_UK",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "libcloud.storage.types.Provider",
"line_number": 15,... |
73434176863 | import pyqrcode
import os
import wx
from tkfilebrowser import askopenfilename
from profile import Profile
class MainWindow(wx.Frame):
def __init__(self, parent, title):
super(MainWindow, self).__init__()
self.parent = parent
self.png = pyqrcode.QRCode
self.bitmap = wx.StaticBitmap... | hammer1812/QRCode_Ticketautomat2 | qrcode_ticketautomat.py | qrcode_ticketautomat.py | py | 3,126 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "wx.Frame",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "pyqrcode.QRCode",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "wx.StaticBitmap",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "profile.Profil... |
15901094948 | import json
import re
import urllib.request
from Bot.Plugins.Base import PluginBase
class YouTubePlugin(PluginBase):
"""
This plugin annotates links to YouTube videos with their title in channel messages. The channel message is modified
so that plugins that are executed at any later stage receive the ann... | TeamspykBot/Plugins | Plugins/YouTubePlugin.py | YouTubePlugin.py | py | 2,998 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "Bot.Plugins.Base.PluginBase",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "re.compile",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "re.finditer",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "urllib.request.requ... |
40980688411 | #https://codingcompetitions.withgoogle.com/codejam/round/0000000000876ff1/0000000000a4621b
import os
abspath = os.path.abspath(__file__)
dname = os.path.dirname(abspath)
os.chdir(dname)
filename = "input/input00.txt"
f=open(filename,'r')
# Enter your code here. Read input from STDIN. Print output to STDOUT
import s... | wherby/code | contest/gcj2022/ks/rd/q3/q31.py | q31.py | py | 2,085 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "os.path.abspath",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number"... |
20083912993 | import datetime
import hashlib
import sys
import uuid
from typing import List, Tuple
from api.schemas.internal import (
Article,
ImportStockUpdate,
Product,
ProductArticle,
StockUpdate,
)
def _hash_name(value: str) -> str:
"""Helper for hashing product to numeric string"""
return str(
... | mratajczyk/warehouse | backend/api/services/prepare_import.py | prepare_import.py | py | 2,125 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "hashlib.md5",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sys.byteorder",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "typing.List",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "api.schemas.internal.Impor... |
39470431001 | import ply.lex as lex
import ply.yacc as yacc
import sys
import re
from collections import OrderedDict
from collections import deque
#Listas de tokens y errores
tokError=[] #Global, si esta vacio no hay errores
errores_sintacticos=[]
errores_contexto=[]
tokensList=[]
# Lista de nombres de palabras reservadas
reserved... | AuriCA32/Basic-Tran-Parser | main.py | main.py | py | 69,633 | python | es | code | 1 | github-code | 7 | [
{
"api_name": "sys.exc_info",
"line_number": 194,
"usage_type": "call"
},
{
"api_name": "collections.deque",
"line_number": 255,
"usage_type": "call"
},
{
"api_name": "collections.deque",
"line_number": 256,
"usage_type": "call"
},
{
"api_name": "collections.Order... |
33412099090 | #!/usr/bin/env python
# coding:utf-8
"""
This module documents most elements of a processing request.
"""
# -- standard library --------------------------------------------------------
from datetime import datetime
from socket import getfqdn
import logging
import os
# -- project-specific ----------------------------... | crim-ca/Service | VestaService/request.py | request.py | py | 6,711 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "os.path.dirname",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "celery.utils.log.get_task_logger",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "request... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.