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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
430753639 | import csv
from PipeSchedules import PipeSchedule
from pymongo import MongoClient
client = MongoClient('localhost', 27017)
db = client.conpancol
collection = db.schedules
result = collection.delete_many({})
nrow = 0
label = []
data = []
with open('data/pipe-schedules.csv', 'r', encoding='utf-8') as f:
reader = ... | null | MNMetalsDB/saveSchedules.py | saveSchedules.py | py | 1,573 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "PipeSchedules.PipeSchedule",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "csv.reader",... |
313491554 | from . import models, staff_views as views
from django.urls import path
urlpatterns = [
path('mailout/<int:mailout_id>', views.mailout, name='mailout'),
path('invitations/<int:event_id>',
views.InviteesView.as_view(), name='invitations'),
path('attendees/<int:event_id>',
views.AttendeesVi... | null | animportantdate/wedding/staff_urls.py | staff_urls.py | py | 1,171 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.urls.path",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
260308883 | import time
import keyboard
import pyttsx3 as pt
from selenium import webdriver
from selenium.webdriver.common.by import By
import os
def scrap(n):
try:
path = os.getcwd()
driver_path = path + '/chromedriver.exe'
chrome_options = webdriver.ChromeOptions()
chrome_op... | null | cryptoreader.py | cryptoreader.py | py | 1,479 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.getcwd",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.ChromeOptions",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "seleniu... |
495256632 | # To-do List
"""
Information
Name: Victor Qiu
OS: Mac OS
Github: https://github.com/vic025/todo
Summary
Functionality:
* To-do list
* 24 hour time
* US date format
* Requires an email to be entered
* Preferences
* Theme selector
* Help menu
* Calendar + Weather (general information)
* Stopwatch (st... | null | Victor Qiu.py | Victor Qiu.py | py | 39,784 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "tkinter.Tk",
"line_number": 106,
"usage_type": "call"
},
{
"api_name": "tkinter.Menu",
"line_number": 112,
"usage_type": "call"
},
{
"api_name": "tkinter.Menu",
"line_number": 115,
"usage_type": "call"
},
{
"api_name": "tkinter.Image",
"line_num... |
337757258 | from django import forms
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
from django.db import transaction
from macaddress.formfields import MACAddressField
from .models.users import Student, Teacher, User, WifiInfo
from .models.courses import Course, WeekDay
class CustomUserCreationForm(UserC... | null | attendancecontrol/control/forms.py | forms.py | py | 2,804 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.contrib.auth.forms.UserCreationForm",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "models.users.User",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "django.contrib.auth.forms.UserChangeForm",
"line_number": 16,
"usage_type": ... |
266554966 | """ Palantir tasks """
import itertools
from datetime import datetime
import copy
from collections import defaultdict
from steward_salt.tasks import salt_match, salt, salt_key
from steward_tasks.tasks import pub
from .models import CheckDisabled, MinionDisabled, CheckResult, Alert
from steward_tasks import celery, St... | null | steward_palantir/tasks.py | tasks.py | py | 7,289 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "models.CheckResult",
"line_number": 24,
"usage_type": "argument"
},
{
"api_name": "models.CheckResult.check.notin_",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "models.CheckResult.check",
"line_number": 25,
"usage_type": "attribute"
},
{
... |
606822095 | """Example program to show how to read a multi-channel time series from LSL."""
from pylsl import StreamInlet, resolve_stream, resolve_byprop,\
proc_clocksync, proc_dejitter, proc_monotonize
from psychopy import core
from collections import deque
import numpy as np
import pandas as pd
import threading
import serial
... | null | nfb_discrete_test.py | nfb_discrete_test.py | py | 4,482 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "itertools.product",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "pylsl.resolve_byprop",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "pylsl.proc_cl... |
236930811 | #! /usr/bin/env python
# coding: utf-8
import os, zipfile, re
from os.path import *
class FSpider(object):
"""File system spider."""
def __init__(self,
file_mode = 0, file_patterns = [],
dir_mode = 0, dir_patterns = []
):
self.file_mode = file_mode
self.file_patterns... | null | fspider/fspider.py | fspider.py | py | 8,646 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.path.isdir",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 49,
"usage_type": "attribute"
},
{
"api_name": "os.path.split",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number":... |
563350358 | #!/usr/bin/env python
import os
import sys
import glob
import fnmatch
import argparse
from importlib import reload
def recursive_glob(rootdir='.', pattern='*.json', in_dir=''):
files = []
for root, dirnames, filenames in os.walk(rootdir):
files.extend(glob.glob(root + "/" + pattern))
if in_dir:
... | null | bikes/startup.py | startup.py | py | 1,533 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.walk",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "importlib.reload",
"lin... |
27965667 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@Author : Jan Yang
@software: PyCharm Community Edition
"""
import requests
import json
import time
import pymongo
client = pymongo.MongoClient('localhost', 27017) # 连接Mongodb数据库
sense = client['sense'] ... | null | Python3/ch04/4.1-database.py | 4.1-database.py | py | 1,732 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "time.strftime",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "time.localtime",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "time.time",
"lin... |
509858986 | import os
import string
import pandas as pd
import nltk
from nltk import bigrams, trigrams
from nltk.tokenize import word_tokenize
from nltk.probability import FreqDist
from dotenv import load_dotenv
load_dotenv()
from typing import List
STOPWORDS = nltk.corpus.stopwords.words('finnish')
def tokenize(sen... | null | nlp/nlp.py | nlp.py | py | 1,308 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "nltk.corpus.stopwords.words",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "nltk.corpus",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "nltk.t... |
398860135 | # -*-coding:utf-8-*-
import logging
import time
import requests
from requests.compat import json as _json
from wechatpy.constants import WeChatErrorCode
from werobot.client import Client
from werobot.client import check_error
logger = logging.getLogger(__name__)
class WxClient(Client):
def request(self, method... | null | e2yun_addons/odoo12/wx_tools/basewechat/wxclient.py | wxclient.py | py | 2,795 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "werobot.client.Client",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "requests.compat.json.dumps",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "re... |
282591721 | from collections import defaultdict
import pytest
from procrastinate import __version__, cli
@pytest.fixture
def entrypoint(cli_runner):
def ep(args=""):
return cli_runner.invoke(cli.cli, args.split(), catch_exceptions=False)
return ep
@pytest.fixture
def click_app(mocker, app):
mocker.patch(... | null | tests/integration/test_cli.py | test_cli.py | py | 3,387 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "procrastinate.cli.cli",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "procrastinate.cli",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "pytest.fixture",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "pytes... |
639067768 | import torch
import torch.nn as nn
from torch.nn import functional as F
from .cross_entropy_with_uncertainty import CrossEntropyLossWithUncertainty
from .focal_loss import FocalLoss
from dataset import LabelMapper
def get_loss_fn(loss_fn_name,
device,
model_uncertainty,
... | null | eval/loss/get_loss_fn.py | get_loss_fn.py | py | 4,531 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "cross_entropy_with_uncertainty.CrossEntropyLossWithUncertainty",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "focal_loss.FocalLoss",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "torch.nn.BCEWithLogitsLoss",
"line_number": 42,
"usag... |
478004872 | from django.shortcuts import render, redirect
from django.contrib.auth.forms import UserCreationForm
# Create your views here.
def newAccount_view(request):
if request.method =='POST':
form = UserCreationForm(request.POST)
if form.is_valid():
form.save()
#log the user in
... | null | accounts/views.py | views.py | py | 623 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.contrib.auth.forms.UserCreationForm",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.redirect",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.forms.UserCreationForm",
"line_number": 18,
"usag... |
431485614 | import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from pandas_datareader import data
import datetime as dt
from pandas.plotting import register_matplotlib_converters
register_matplotlib_converters()
class Stock(object):
def __init__(self, ticker, start, name=""):
self.ticker = ticker... | null | project/Stock.py | Stock.py | py | 6,233 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pandas.plotting.register_matplotlib_converters",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "datetime.date.today",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 22,
"usage_type": "attribute"
},
{
... |
417194816 | import discord
from discord.ext import commands
import json
import requests
from googletrans import Translator
translator = Translator(service_urls=['translate.google.com'])
class filmes(commands.Cog):
def __init__(self, client):
self.client = client
@commands.command()
@commands.gui... | null | cogs/filmes.py | filmes.py | py | 2,878 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "googletrans.Translator",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "discord.ext.commands.Cog",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands",
"line_number": 9,
"usage_type": "name"
},
{
"api_name":... |
472579509 | """
Feature Module.
"""
from abc import ABCMeta, abstractmethod
import itertools as it
# import utils
from auxiliaryFunctionsNew1009 import split_datetime, time_delta
import pandas as pd
# import lobapi
import warnings
class base_feature:
__metaclass__ = ABCMeta
param_list = []
def __init__(self, name, ... | null | Research Platform/backtest_main_files/baseSignal.py | baseSignal.py | py | 4,514 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "abc.ABCMeta",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "warnings.warn",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "itertools.product",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"l... |
42962594 | import argparse
from train import VGG_GAP
import torch
import numpy as np
from PIL import Image
def get_args():
parser = argparse.ArgumentParser(description='Predict labels',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('--model', '-m', defaul... | null | weakly-supervised/DeepSeededRegionGrowing/classification/inference.py | inference.py | py | 1,412 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentDefaultsHelpFormatter",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "train.VGG_GAP",
"line_number": 21,
"usage_type": "call"
},
{
"a... |
477800920 | import torch
import torch.nn as nn
from torchvision import models
import torch.nn.functional as F
"""
Code was taken from https://github.com/ialhashim/DenseDepth
@article{Alhashim2018,
author = {Ibraheem Alhashim and Peter Wonka},
title = {High Quality Monocular Depth Estimation via Transfer Learning},
j... | null | fgbg/dense_depth_model.py | dense_depth_model.py | py | 2,958 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "torch.nn.Sequential",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "torch.nn.Conv2d",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"lin... |
67354007 | import requests
import json
from collections import deque
from datetime import timedelta
artists_json = {"artists" : []}
albums_json = {"albums" : []}
tracks_json = {"tracks" : []}
artists_queue = deque()
albums_queue = deque()
tracks_queue = deque()
scraped_artists = []
scraped_albums = []
scraped_tracks = []
ARTI... | null | scraper/scraper.py | scraper.py | py | 7,155 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "collections.deque",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "collections.deque",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "collections.deque",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "requests.get",
... |
134443046 | #!/usr/bin/env python
import rospy
import serial
import pynmea2
from std_msgs.msg import String
def calibrate(long,lat):
x = (float(long)/100) + 0.19429499999999678 # North Calibrator: 0.19429499999999678
y = (float(lat)/100) + 0.12900099997742132 # West Calibrator: 0.12900099997742132
return (x,-y)
def... | null | Rover/src/mrobot_gps/scripts/gps_origion.py | gps_origion.py | py | 1,319 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "rospy.Publisher",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "std_msgs.msg.String",
"line_number": 14,
"usage_type": "argument"
},
{
"api_name": "rospy.init_node",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "rospy.Rate",
... |
410131832 | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
# author: bigfoolliu
"""
边缘检测
"""
import cv2
from matplotlib import pyplot as plt
img = cv2.imread("../images/person.jpeg")
# 检测边缘之后的图像
edge_img = cv2.Canny(img, 100, 200)
edge_img1 = cv2.Canny(img, 100, 100)
edge_img2 = cv2.Canny(img, 200, 200)
images = [img, edge_im... | null | ai/opencv/image_processing/edge_dectection.py | edge_dectection.py | py | 468 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "cv2.imread",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "cv2.Canny",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "cv2.Canny",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "cv2.Canny",
"line_number": 18,
... |
31562271 | from datetime import timedelta
import pusher
import requests
from django.conf import settings
from django.contrib.auth import get_user_model, login, logout
from django.contrib.postgres.search import SearchVector
from django.db.models import Q, Case, BooleanField, Prefetch, When
from django.utils import timezone
from ... | null | api/apis.py | apis.py | py | 45,127 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.contrib.auth.get_user_model",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "pusher.Pusher",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "django.conf.settings.PUSHER_APP_ID",
"line_number": 42,
"usage_type": "attribute"
},
... |
651907944 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""
用降维算法对特征进行降维,并利用logistic回归验证降维效果。
"""
import numpy as np
from nltk.tokenize import word_tokenize
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.pipeline import Pipeline
from sk... | null | sklearn.decomposition/logistic_regression.py | logistic_regression.py | py | 1,923 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sklearn.datasets.fetch_20newsgroups",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "numpy.unique",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "sklearn.pipeline.Pipeline",
"line_number": 34,
"usage_type": "call"
},
{
"api_na... |
133388546 | from selenium import webdriver
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as ec
import pytest
@pytest.fixture
def browser():
driver = webdriver.Chrom... | null | ui_tests/answers/answers_03.py | answers_03.py | py | 2,516 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "pytest.fixture",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "selen... |
49537162 | import ingest
from pytorch_pretrained_bert import BertTokenizer, BertConfig
from keras.preprocessing.sequence import pad_sequences
from pytorch_pretrained_bert import BertTokenizer, BertConfig
from pytorch_pretrained_bert import BertAdam, BertForNextSentencePrediction
from tqdm import tqdm, trange
import torch
from tor... | null | huggs.py | huggs.py | py | 6,625 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pytorch_pretrained_bert.BertTokenizer.from_pretrained",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pytorch_pretrained_bert.BertTokenizer",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "pytorch_pretrained_bert.BertForNextSentencePrediction... |
642218245 | from __future__ import absolute_import, division, print_function, unicode_literals
import sys, re
from enum import Enum
if sys.version_info.major == 3:
from urllib.parse import quote_plus, urlencode
from urllib.request import urlopen, Request
from html.parser import HTMLParser
else:
from urllib import ... | null | getinspire/inspire.py | inspire.py | py | 4,789 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sys.version_info",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "HTMLParser.HTMLParser",
"line_number": 42,
"usage_type": "name"
},
{
"api_name": "HTMLParser.HTMLParser.__init__",
"line_number": 48,
"usage_type": "call"
},
{
"api_nam... |
378128844 | from matplotlib import mlab
import numpy as np
def estimate_decoder(time,s,r,dt,nfft=2**12):
'''
Estimates the decoding kernel K and reconstructs the original stimuls
Inputs: time: time vector
s: stimulus
r: response
dt: sampling period
nfft: number of ... | null | week_05/estimate_decoder.py | estimate_decoder.py | py | 1,634 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "matplotlib.mlab.csd",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "matplotlib.mlab",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "matplotlib.mlab.psd",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "matplotlib.ml... |
465142075 | import sqlite3
print(sqlite3.version)
print(sqlite3.sqlite_version)
# DB 생성 (오토 커밋)
conn = sqlite3.connect("test.db", isolation_level=None)
# 커서 획득
c = conn.cursor()
# 테이블 생성 (데이터 타입은 TEST, NUMERIC, INTEGER, REAL, BLOB 등)
c.execute("CREATE TABLE IF NOT EXISTS table1 \
(id integer PRIMARY KEY, name text, brithd... | null | Project/front/ui/sqltest.py | sqltest.py | py | 554 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sqlite3.version",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "sqlite3.sqlite_version",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "sqlite3.connect",
"line_number": 7,
"usage_type": "call"
}
] |
205878233 | # -*- coding: utf-8 -*-
version = '3.1.1'
release = False
#-----------------------------------------------------------------------------#
import sys
if (sys.version_info < (3, )):
from commands import getstatusoutput
else:
from subprocess import getstatusoutput # lint:ok
import datetime
import os
import glob
... | null | version.py | version.py | py | 2,235 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sys.version_info",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "subprocess.getstatusoutput",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "os.path"... |
586321799 | #!/usr/bin/env python
import argparse
import logging
import os
import sys
import configbetter
from telegram.ext import MessageHandler, Updater
from .config import AppConfig
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO)
def setup_bot(args: argparse.Namespace... | null | src/__init__.py | __init__.py | py | 1,192 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "logging.basicConfig",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "argparse.Namespace",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "config.... |
138268298 | """
Configuration file
"""
__author__ = 'Cesar'
import logging
# Logging
logging.basicConfig(format='%(asctime)s - [%(levelname)s]: %(message)s',
filename='/home/logs/middleware commands.log',
level=logging.DEBUG)
# XML Files directory
xml_root = '/home/ec2-user/middlewareCom... | null | config.py | config.py | py | 331 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "logging.basicConfig",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 11,
"usage_type": "attribute"
}
] |
436948166 | from collections import Counter, defaultdict
n = ["eat", "tea", "tan", "ate", "nat", "bat"]
s = "abcdefghijklmnopqrstuvwxyz"
d = dict(zip(list(s), range(len(s))))
dic = defaultdict(list)
for each in n:
data = [0 for each in range(26)]
for every in each:
data[d[every]] += 1
dic[tuple(data)].appe... | null | Archive/P/leetcode_random/group_anagrams.py | group_anagrams.py | py | 369 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "collections.defaultdict",
"line_number": 8,
"usage_type": "call"
}
] |
162803017 | import sys
import pandas as pd
import numpy as np
import string
import re
from Bio import SeqIO
from blister import *
def thread0(filename):
seqs = pd.DataFrame(np.array([['-bridge-', 'GCTGAGG'], ['-egdirb-', 'CCTCAGC'], ['-gatc-', 'GATC']]), columns=['name', 'seq'])
genome = '-genome-'
output_dir = blister_dir(... | null | archive/old_scripts/archive/anal_seqs_v2.py | anal_seqs_v2.py | py | 2,813 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pandas.DataFrame",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "Bio.SeqIO.parse",
"... |
139956790 | # -*- coding: utf-8 -*-
"""
Created on Fri Sep 4 19:07:23 2015
@author: Annaero
"""
from itertools import islice
from math import sqrt
from itertools import product
from dtw import dtw as lib_dtw
from numpy.linalg import lstsq
from sklearn.metrics import mean_squared_error
#Reciept from itertools documentation
def... | null | Sources/utils.py | utils.py | py | 7,521 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "itertools.islice",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "sklearn.metrics.mean_squared_error",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "dtw.dtw... |
328665569 | from sys import argv
from flask import Flask
from flask import render_template
import client
application = Flask(__name__)
def parse_description(description):
# I know this is messy but I couldn't think of another way to get rid of the annoying HTML symbols :(
description = description.replace(' ', ' ')
... | null | bot.py | bot.py | py | 2,580 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "flask.Flask",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "client.get_adoptable",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "client.get_organization",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "flask.render_... |
10413153 | from flask import render_template, flash, redirect, url_for, request
from flask_login import current_user, login_required
from app import current_app, db
from app.main.forms import InventoryForm, AddIngredientForm, AddRecipeForm, RecipeIngredientForm
from app.models import Ingredient, Recipe
from app.main import bp
fro... | null | app/main/routes.py | routes.py | py | 4,808 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "flask_login.current_user.username",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "flask_login.current_user",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "flask.render_template",
"line_number": 14,
"usage_type": "call"
},
{
... |
16114010 | from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class Hi(models.Model):
message = models.CharField(
max_length=200,
blank=False,
null=False,
)
hi = models.CharField(
default="hi",
editable="False",
max_lengt... | null | his/models.py | models.py | py | 530 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.db.models.Model",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "... |
382385913 | from random import randint
from tools.tools import mod_inverse
def sign(msghash, privkey, G, n):
msg = ('0x'+msghash).ljust(128)[:128]
k = randint(1, n - 1)
i = G.__rmul__(k).x
s1 = i % n
s2 = (mod_inverse(k, n) * (int(msg, 16) + s1 * privkey)) % n
return s1, s2
def verify(msghash, s1, s2, ... | null | crypto/dsa.py | dsa.py | py | 615 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "random.randint",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "tools.tools.mod_inverse",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "tools.tools.mod_inverse",
"line_number": 19,
"usage_type": "call"
}
] |
311284893 | """empty message
Revision ID: b1134f4b84c8
Revises: a30d2eaedc97
Create Date: 2020-09-05 14:04:04.362547
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'b1134f4b84c8'
down_revision = 'a30d2eaedc97'
branch_labels = None
depends_on = None
def upgrade():
# ... | null | migrations/versions/b1134f4b84c8_.py | b1134f4b84c8_.py | py | 888 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "alembic.op.drop_constraint",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "alembic.op.drop_column",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "alembic.... |
617855674 | from download_photos import get_file_ext, download_image
import requests
def get_space_photos(url='https://api.spacexdata.com/v3/launches/latest'):
response = requests.get(url)
if response.ok:
return response.json().get('links').get('flickr_images')
def fetch_spacex_last_launch(images_list, start=1)... | null | fetch_spacex.py | fetch_spacex.py | py | 777 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "requests.get",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "download_photos.get_file_ext",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "download_photos.download_image",
"line_number": 14,
"usage_type": "call"
}
] |
589849502 | #!/user/bin/env python3.5
from __future__ import division
import sys
import os
from typing import Callable
from datetime import datetime, timedelta
from multiprocessing import Pool
import logging
import warnings
from collections import Counter
from itertools import chain, compress, cycle
import numpy as np
import pytz
... | null | src/inferno.py | inferno.py | py | 10,336 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "logging.getLogger",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "logging.StreamHandler",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "sys.stdout"... |
7266386 | import requests,sys
import os,json
import time
device_list = sys.argv[1]
app = sys.argv[2]
test = sys.argv[3]
device_array = []
device=0
with open(device_list, "r") as f:
obj = json.loads(f.read())
print(len(obj))
for devices in obj:
device_array.append(devices['device'])
print(devices['device'])
BROWSERSTAC... | null | xcuitest/xcuitest_runner.py | xcuitest_runner.py | py | 1,637 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sys.argv",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "json.loads",
"line_number"... |
380901637 | from keras.datasets import reuters
from keras import models
from keras import layers
import numpy as np
import matplotlib.pyplot as plt
def vectorize_sequence(sequences, dimension=10000):
results = np.zeros((len(sequences), dimension))
for i, sequence in enumerate(sequences):
results[i,sequence] = 1.
... | null | Basics/news_classification.py | news_classification.py | py | 3,433 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "numpy.zeros",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "keras.datasets.reuters.load_data",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "keras.dataset... |
332476149 | from flask import render_template, Blueprint
from db import db
charity_blueprint = Blueprint('charity', __name__)
@charity_blueprint.route(r'/<params>')
def funct(params):
document = db.collection(u'users').document(params)
first_name = document.get().get('first')
last_name = document.get().get('last')
year_of_bi... | null | views.py | views.py | py | 569 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "flask.Blueprint",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "db.db.collection",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "db.db",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "flask.render_template",
"line... |
332667913 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import pytest
from psd_tools import PSDImage
from .utils import decode_psd
TEXTS = [
# filename, layer #, text
('text.psd', 0, 'Line 1\rLine 2\rLine 3 and text'),
('pen-text.psd', 2, 'Борис ельцин')
]
@pytest.mark.parametri... | null | tests/test_text.py | test_text.py | py | 642 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "psd_tools.PSDImage",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "utils.decode_psd",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pytest.mark.parametrize",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pytest.ma... |
125278845 | #!/usr/bin/env python
import env
import os
from config_descr import NAME, PROJECT
from common.shared_logger import g_logger
from common.config import get_global_property
from internal.report_builder import StepReporter
from common import descr_argument_parser
from common.description import Description
from internal... | null | Scripts/project/building/move_data_to_app.py | move_data_to_app.py | py | 2,336 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "common.description.Description",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "config_descr.NAME.platform",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "config_descr.NAME",
"line_number": 19,
"usage_type": "name"
},
{
"... |
603298285 | '''
Created on 5 feb. 2019
Clase tiempo con Datetime
@author: d18momoa
'''
from datetime import datetime, date, time, timedelta
import calendar
def crearTiempo(horas,minutos,segundos):
while(segundos >= 60):
segundos -=60
minutos += 1
while(minutos >= 60):
minutos -=60
... | null | ejerciciosHerencia/Tiempo2.py | Tiempo2.py | py | 1,267 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "datetime.time",
"line_number": 16,
"usage_type": "call"
}
] |
621718345 | from uuid import UUID
from django.http import Http404
from django.db.models import F, Q
from django.db import transaction
from django.utils.translation import ugettext_lazy as _
from django.utils.text import slugify
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_prot... | null | apps/escort/api/attachment/views.py | views.py | py | 5,623 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "utils.validators.get_model",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "rest_framework.pagination.PageNumberPagination",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "rest_framework.viewsets.ViewSet",
"line_number": 42,
"usage_typ... |
265038671 | """empty message
Revision ID: e34869365ae3
Revises: None
Create Date: 2016-08-03 21:02:13.447722
"""
# revision identifiers, used by Alembic.
revision = 'e34869365ae3'
down_revision = None
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###... | null | vagrant/catalog/migrations/versions/e34869365ae3_.py | e34869365ae3_.py | py | 2,593 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "alembic.op.create_table",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integ... |
434458829 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
from .. import base
logger = logging.getLogger(__name__)
# Module API
def process(conf, conn):
# Iterate over all hra publi... | null | processors/hra_linker/processor.py | processor.py | py | 1,459 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "logging.getLogger",
"line_number": 9,
"usage_type": "call"
}
] |
647634219 | import dynet as dy
import numpy as np
from collections import namedtuple
from xnmt.length_normalization import *
from xnmt.vocab import Vocab
# Output of the search
SearchOutput = namedtuple('SearchOutput', ['word_ids', 'attentions'])
class SearchStrategy(object):
'''
A template class to generate translation fro... | null | xnmt/search_strategy.py | search_strategy.py | py | 5,072 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "collections.namedtuple",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "xnmt.vocab.Vocab.ES",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "xnmt.vocab.Vocab",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "dynet... |
199243178 | import sys
import values
import main
ver = "graphic"
picnames = ["Play","Quit"]
try:
import pygame
x, y = values.map_x*12, values.map_y*8
pygame.init()
screen = pygame.display.set_mode((x, y))
pygame.display.set_caption("Dogs & Sheeps")
pygame.display.init()
#pygame.display.set_icon(pygam... | null | simulation.py | simulation.py | py | 2,171 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "values.map_x",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "values.map_y",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "pygame.init",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mo... |
321860125 | import importlib
import logging
import os
import pkgutil
import random
import sys
import astropy.units as u
import click
import numpy as np
from astropy.modeling.models import Gaussian1D
from qtpy.QtCore import QTimer, Qt, Signal
from qtpy.QtGui import QIcon
from qtpy.QtWidgets import QApplication, QDialog, QMainWindo... | null | specviz/app.py | app.py | py | 6,754 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "qtpy.QtWidgets.QApplication",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "qtpy.QtCore.Signal",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "qtpy.QtWidgets.QMainWindow",
"line_number": 26,
"usage_type": "argument"
},
{
"api... |
428876568 | import os
import platform
import shutil
import site
import subprocess
import sys
from glob import glob
from pathlib import Path
from typing import Optional
from pybind11.setup_helpers import Pybind11Extension
from pybind11.setup_helpers import build_ext as _build_ext
from setuptools import setup
is_windows = platform... | null | setup.py | setup.py | py | 2,678 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "platform.system",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "sys.prefix",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "pathlib.Path",
"line... |
386828587 | import gym
import gym.spaces
import math
from qlearning_template import QLearningAgent
import numpy as np
import time
def discretize_range(lower_bound, upper_bound, num_bins):
return np.linspace(lower_bound, upper_bound, num_bins + 1)[1:-1]
def discretize_value(value, bins):
return np.digitize(x=value, bins... | null | rl_3/cartpole_q_agent_template.py | cartpole_q_agent_template.py | py | 2,183 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "numpy.linspace",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.digitize",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "gym.make",
"line_number"... |
200083099 | import time
import traceback
from schema import Schema, And
from sqlalchemy import func
from cx_Oracle import DatabaseError
from utils.datetime_utils import *
from utils.offline_utils import *
from restful_api.views.base import PrivilegeReq
from utils.schema_utils import *
from utils.const import *
from models.oracle ... | null | restful_api/views/offline/self_service.py | self_service.py | py | 7,878 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "restful_api.views.base.PrivilegeReq",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "schema.Schema",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "schema.And",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "utils.cm... |
372342426 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Python Bindings Generator
Copyright (C) 2012 Matthias Bolte <matthias@tinkerforge.com>
Copyright (C) 2011 Olaf Lüke <olaf@tinkerforge.com>
generator_python.py: Generator for Python bindings
This program is free software; you can redistribute it and/or
modify it under... | null | python/generate_python_bindings.py | generate_python_bindings.py | py | 7,138 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sys.path.append",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "os.path.split",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_numbe... |
338083291 | # -*- coding: utf-8 -*-
from datetime import datetime
from datetime import timedelta
from dateutil import parser
import traceback
from queue import PriorityQueue
# thirdpart
import pandas as pd
from pymongo import MongoClient
import numpy as np
import const
import util
#统计整个财务数据中,-10%的出现次数,出现越多,说明卖点... | null | dividend/index/times.py | times.py | py | 2,573 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "util.LoadData",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 33,
"usage_type": "name"
},
{
"api_name": "util.Strin... |
467978296 | import networkx as nx
import matplotlib.pyplot as plt
class graf_analiz():
def grafs(self):
N = int(input("Введите количество вершин: "))
M = int(input("Введите количество рёбер: "))
g = {}
for i in range(N):
g[str(i)] = {}
for i in range(M):
... | null | glub.py | glub.py | py | 6,452 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "networkx.Graph",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "networkx.Graph",
"line_number": 70,
"usage_type": "call"
},
{
"api_name": "networkx.Graph",
"line_number": 108,
"usage_type": "call"
},
{
"api_name": "networkx.spring_layout"... |
580627920 | """Enrollment event model definitions"""
from typing import Literal, Union
from pydantic import Json
from ralph.models.selector import selector
from .base import AbstractBaseEventField, BaseContextField
from .browser import BaseBrowserEvent
from .server import BaseServerEvent
class EnrollmentEventField(AbstractBa... | null | src/ralph/models/edx/enrollment.py | enrollment.py | py | 6,345 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "base.AbstractBaseEventField",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "typing.Union",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "typing.Literal",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "typing.Union"... |
160418438 | # -*- coding: utf-8 -*-
import json
import random, string
import os, requests
rdata = {
"request_id": ''.join(random.sample(string.ascii_letters + string.digits, 32)),
"api_version": "1.6",
"uid": "",
"source_type": "app",
"ua": "Mozilla/5.0%20(iPhone%3B%20CPU%20iPhone%20OS%2010_2_1%20like%20Mac%20... | null | workspace/toutiao.py | toutiao.py | py | 1,827 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "random.sample",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "string.ascii_letters",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "string.digits",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "os.path.realp... |
477865090 | import sys
import cv2
import numpy as np
# 영상 불러오기
# 2장의 영상을 사용합니다.
# 객체가 검은색, 배경이 흰색이라 findcontour을 이용할 때 반전해서 이용해야 합니다.
# symbols 에서 spades를 찾아내는 것이 목적입니다.
obj = cv2.imread('spades.png', cv2.IMREAD_GRAYSCALE) # 찾고 싶은거
src = cv2.imread('symbols.png', cv2.IMREAD_GRAYSCALE) # 대상
if src is None or obj is None:
pr... | null | P16/matchShapes.py | matchShapes.py | py | 2,932 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "cv2.imread",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "cv2.IMREAD_GRAYSCALE",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "cv2.imread",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "cv2.IMREAD_GRAYSCALE",
... |
147397959 | # coding:utf-8
from flask import Blueprint, render_template, redirect, url_for
from flask_user import login_required, current_user
from ..model import user_role_admin
from .. import qinius
from ..flask_helper import json_response
from ..core import get_locale
from ..service import artifactService, bannerService
from ... | null | xinshangjia/frontend/index.py | index.py | py | 1,556 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "flask.Blueprint",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "core.get_locale",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "service.artifactService.paginate_id",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "s... |
67899952 | import json
from random import shuffle, random
import cv2
import mxnet as mx
import os
from demo import get_detector
from detect.detection import Detection, paint_detection, crop_from_detection
from extract_bbs_config import GPU_ENABLED, GPU_ID, IMAGES_PATH, NUM_IMAGES, EPOCH, NETWORK, DATA_SHAPE, NMS_THRESH, \
F... | null | extract_cars.py | extract_cars.py | py | 2,639 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "extract_bbs_config.GPU_ENABLED",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "mxnet.gpu",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "extract_bbs_config.GPU_ID",
"line_number": 19,
"usage_type": "argument"
},
{
"api_name":... |
384700308 | import pytest
from os import listdir, getcwd, mkdir, rmdir
from shutil import rmtree
from my_tools.create_filelist import get_filelist, get_files_from_dir, create_subset
def test_random_file_list_20_perc():
file_dataset = ['file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', 'file5.txt']
assert len(get_filel... | null | my_tools/test/test_create_filelist.py | test_create_filelist.py | py | 1,523 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "my_tools.create_filelist.get_filelist",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "my_tools.create_filelist.get_filelist",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "my_tools.create_filelist.get_filelist",
"line_number": 25,
"u... |
429168422 | from itertools import groupby, takewhile, izip, ifilter, imap
import math
class Node(object):
def __init__(self, value, chromosome, next=None, prev=None):
self.value = value
self.chromosome = chromosome
self.next = next
self.prev = prev
self.merged = False
def __iter__... | null | genome.py | genome.py | py | 5,917 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "itertools.imap",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "math.floor",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "itertools.izip",
"line_number": 155,
"usage_type": "call"
}
] |
305363039 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2018-08-07
# @Author : Li Yongqiang
# @Link :
# @Version : 0.0.1
"""
爬虫父类
"""
import os
import re
import time
import random
import json
import urllib.request
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver.chrome.o... | null | python_spider/news_spider/spider.py | spider.py | py | 1,423 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "selenium.webdriver.chrome.options.Options",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 32,
"usage_type": "name"
}
] |
241437909 | #!/usr/bin/python3
import sys
import getopt
import time
import os
import io
import shutil
from plyara import Plyara
from pathlib import Path
class YaraFilter(object):
def __init__(self):
self.base_dir = None
self.output_dir = "./output"
self.exclude_dir = None
self.verbose = False... | null | yarafilter.py | yarafilter.py | py | 10,478 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "plyara.Plyara",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "getopt.getopt",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "getopt.GetoptError",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "sys.exit",
"l... |
294700108 | import numpy as np
import cv2 as cv
#CBOX: 47
#CAR: 17
#ROOM: 5
#SPONZA: 28
from keras.models import *
from keras.callbacks import ModelCheckpoint
from keras.layers import *
from keras.optimizers import *
from keras.metrics import *
from keras.utils import *
from keras import backend as K
kernel = np.zeros((5, 5, 3,... | null | ML/eval.py | eval.py | py | 4,520 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "numpy.zeros",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "keras.backend.variable",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "keras.backend",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "keras.backend.conv2d... |
64218250 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thursday July 5 13:52:27 2018
@author: acharsr
"""
import pickle,sys,os,json,math,subprocess,string
from sys import platform as sys_pf
if sys_pf == 'darwin':
import matplotlib
matplotlib.use("TkAgg")
from pathlib import Path
import pickle
from itert... | null | programs/analysis/analysisGUI.py | analysisGUI.py | py | 3,675 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sys.platform",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "matplotlib.use",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sys.path.insert",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_numb... |
439905924 | # import libraries
import pandas as pd
from sklearn.model_selection import train_test_split
from clean_text import CleanText
from encode_text import EncodeText
from rnn import Bidirectional_GRU
from sklearn.utils import compute_class_weight
import numpy as np
df = pd.read_pickle('./data_2.pkl')
ct = CleanText()
encode... | null | run_rnn.py | run_rnn.py | py | 1,421 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pandas.read_pickle",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "clean_text.CleanText",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "encode_text.EncodeText",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sklear... |
615833210 | from beluga.bvpsol import BaseAlgorithm, BVPResult
import copy
from npnlp import minimize, kkt_multipliers
import numba
import numpy as np
import sys
class Pseudospectral(BaseAlgorithm):
"""
Pseudospectral algorithm for solving boundary-value problems.
:param args: Unused
:param kwargs: Additional pa... | null | beluga/bvpsol/Pseudospectral.py | Pseudospectral.py | py | 14,602 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "beluga.bvpsol.BaseAlgorithm",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "beluga.bvpsol.BaseAlgorithm.__init__",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "beluga.bvpsol.BaseAlgorithm",
"line_number": 31,
"usage_type": "name"
}... |
562529429 | # Princeton University licenses this file to You under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. You may obtain a copy of the License at:
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writin... | null | psyneulink/library/compositions/autodiffcomposition.py | autodiffcomposition.py | py | 26,411 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "logging.getLogger",
"line_number": 158,
"usage_type": "call"
},
{
"api_name": "psyneulink.core.compositions.composition.CompositionError",
"line_number": 166,
"usage_type": "name"
},
{
"api_name": "psyneulink.core.compositions.composition.Composition",
"line_nu... |
163639615 |
from django.http import HttpResponseRedirect, HttpResponse
from django_tables2 import RequestConfig
from django.shortcuts import get_object_or_404, render, redirect
from django.urls import reverse
from django.views import generic
from .tables import ActivityTable
from .forms import NameForm
# Create your views here.
f... | null | activities/views.py | views.py | py | 3,234 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "tables.ActivityTable",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "models.Activity.objects.all",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "models.Activity.objects",
"line_number": 18,
"usage_type": "attribute"
},
{
"api... |
7726111 | # Process_Data_NLP.py
# Imports
import pandas as pd
import re
import string
import matplotlib.pyplot as plt
import numpy as np
import spacy
from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer
"""Data Exploration and Cleaning"""
file_name = r"C:\Users\johnj\OneDrive\Documents\Lambda\Buil... | null | Med_Cabinet/Process_Data_NLP.py | Process_Data_NLP.py | py | 7,447 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pandas.read_csv",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "spacy.load",
"line_number": 94,
"usage_type": "call"
},
{
"api_name": "spacy.tokenizer.Tokenizer",
"line_number": 100,
"usage_type": "call"
},
{
"api_name": "sklearn.feature... |
375023638 | import sys
from pathlib import Path
import cv2
from PySide6.QtCore import QTimer, QUrl
from PySide6.QtGui import QImage, QPixmap
from PySide6.QtWidgets import QMainWindow, QApplication
from PySide6.QtNetwork import QNetworkRequest, QNetworkAccessManager
from face_catch import Ui_widget as DesktopUI
class Face_Get(Q... | null | qt_learn/face_get.py | face_get.py | py | 2,444 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "PySide6.QtWidgets.QMainWindow",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "face_catch.Ui_widget",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "cv2.CascadeClassifier",
"line_number": 16,
"usage_type": "call"
},
{
"api_name... |
437875406 | import cv2
import numpy as np
import scipy.ndimage.filters as filters
import scipy.misc as misc
import matplotlib.pyplot as plt
from get_interest_points import *
bei = misc.imread('/Users/adigregorio/VirtualEnviroments/compvis/sweater.png', flatten=1)
fwidth = 20
x,y = get_interest_points(bei, fwidth, .1)
plt.imshow(... | null | FeatureDetect/code/get_features.py | get_features.py | py | 1,619 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "scipy.misc.imread",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "scipy.misc",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.imshow",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot... |
387173426 | import os.path
from flask import Blueprint, render_template, request, redirect, url_for, current_app, jsonify
from flask_menu import register_menu
from flask_wtf import Form
from wtforms import StringField, TextAreaField, HiddenField
from wtforms.validators import DataRequired
from lesimo.common import SimpleContent... | null | lesimo/backend/lesimo/posts/admin.py | admin.py | py | 4,286 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "flask.Blueprint",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "lesimo.common.Module",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "lesimo.common.Page",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path.path.... |
84833106 | import logging
from math import cos
from operator import add
from re import L, VERBOSE
from numpy.lib.function_base import flip
from torch import optim
from torch.utils import data
import logger
import os
from configs import get_args_parser, get_model_classes, get_args, save_args
args = get_args_parser()
log = logger.... | null | src/run_withprior.py | run_withprior.py | py | 32,279 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "configs.get_args_parser",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "logger.setup_applevel_logger",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "configs.save_args",
"line_number": 18,
"usage_type": "call"
},
{
"api_name":... |
504605039 | #!/usr/bin/python3
import argparse
import os
import sys
from subprocess import Popen
def get_argparser():
parser = argparse.ArgumentParser()
parser.add_argument("-i", dest="dataset_dir", help="Path to directory containing the dataset variant ", required=True)
parser.add_argument("-o", dest="output_dir",... | null | code/gensim/script_word2vec.py | script_word2vec.py | py | 2,838 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 55,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
... |
445188222 | import pandas as pd
import seaborn as sns; sns.set()
import matplotlib.pyplot as plt
import os
import math
import numpy as np
import subprocess
vep = pd.read_csv('/mnt/Genoma/drobles/ccastaneda/gwas-reseq/passvep_stack_vep.csv', low_memory = False)
info = pd.read_csv('/mnt/Genoma/drobles/ccastaneda/gwas-reseq/filtere... | null | scripts/python_scripts/qc_6.py | qc_6.py | py | 1,322 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "seaborn.set",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line... |
541669279 | import numpy as np
import xgc
import math
import pylab as py
#import xgcjrm as xgc
from matplotlib.tri import Triangulation, LinearTriInterpolator
import matplotlib.pyplot as plt
import matplotlib.ticker as mtick
from scipy.interpolate import splrep, splev
from scipy.optimize import curve_fit
import sys
import cProfile... | null | core.py | core.py | py | 53,003 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "xgc.load",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "numpy.linspace",
"line_number": 99,
"usage_type": "call"
},
{
"api_name": "numpy.linspace",
"line_number": 100,
"usage_type": "call"
},
{
"api_name": "numpy.meshgrid",
"line_nu... |
422907810 | """
Example GameState for a top-down adventure game.
This is the client portion of the game.
"""
from renderer import AreaCamera
from rpg import GRAB, LIFT
from lib2d.client.gamestate import GameState
from lib2d.client.statedriver import driver as sd
from lib2d.client.buttons import *
from lib2d.client import gui
fro... | null | lib/worldstate.py | worldstate.py | py | 8,298 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "math.sqrt",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "lib2d.common.res.loadSound",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "lib2d.common.res",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "rpg.GRAB",
... |
129722194 | import numpy as np
import matplotlib.pylab as plt
import pandas as pd
from datetime import datetime
import calmap
import matplotlib.dates
"""
Module for visualization: For now only contains two scripts.
One of Calendar Maps and the other for errror plotting.
Further functions will be added. For any doubts contac... | null | Visual_Module_Marc.py | Visual_Module_Marc.py | py | 4,446 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "matplotlib.pylab.style.use",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "matplotlib.pylab.style",
"line_number": 46,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pylab",
"line_number": 46,
"usage_type": "name"
},
{
"api_name"... |
476271790 | from __future__ import absolute_import
from __future__ import print_function
import os
import sys
try:
import urllib.request
except ImportError:
import urllib
import shutil
import os.path
import subprocess
import zipfile
#Set input to raw_input
try:
input = raw_input
except NameError:
pass
""" WELCOME... | null | haxchi_installer_v1.2.py | haxchi_installer_v1.2.py | py | 17,761 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.system",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "os.name",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "os.system",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "os.name",
"line_number": 45,
... |
46740681 | import json
import uuid
from django.contrib import auth
from django.contrib.auth.models import User
from django.db.models import Sum
from django.http import JsonResponse, HttpResponse
from django.shortcuts import render, redirect, reverse
from App.alipay.alipay import AliPay
from App.models import *
from App... | null | App/views.py | views.py | py | 9,837 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.contrib.auth.models.User.objects.filter",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.models.User.objects",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.auth.models.User",
"line_number": ... |
355635604 | import json
import requests
octopus_server_uri = 'https://your.octopus.app/api'
octopus_api_key = 'API-YOURAPIKEY'
headers = {'X-Octopus-ApiKey': octopus_api_key}
def get_octopus_resource(uri):
response = requests.get(uri, headers=headers)
response.raise_for_status()
return json.loads(response.content.de... | null | REST/python/Projects/create-project.py | create-project.py | py | 1,283 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "requests.get",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 36,
"usage_type": "call"
}
] |
479666456 | import discord
import sys
from discord.ext import commands
import os
import aiohttp
import asyncio
if os.environ["USER"] == "mitch":
from dotenv import load_dotenv
load_dotenv()
TOKEN = os.getenv('DISCORD_TOKEN')
description = '''An example bot to showcase the discord.ext.commands extension
module.
There ar... | null | bot.py | bot.py | py | 4,369 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.environ",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "dotenv.load_dotenv",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "discord.ext.commands.Bot"... |
554798765 | import datetime
from flask import g
from app.ext import raw_db, db
from app.sqls import collection_sqls
from app.utils.time_utils import datetime_to_timestamp
from app.db_models.collection import Collection, CollectionItem
def collection_exist_or_not():
collection = Collection.query.filter_by(title = g.args.get(... | null | app/services/collection_services.py | collection_services.py | py | 2,819 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "app.db_models.collection.Collection.query.filter_by",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "app.db_models.collection.Collection.query",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "app.db_models.collection.Collection",
"lin... |
370429095 | #Build a script that can search through our Socrata Data Catalogue
#STRATEGY
# Filter for only original (derived_view=false) then for maps (type=map). print a list of those.
# Then search again for original (^) tables (type=table). of that list extract the u_id and
# then open each link to search for location data
#S... | null | socrata_search_api.py | socrata_search_api.py | py | 3,366 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "requests.get",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "requests.auth.HTTPBasicAuth",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "csv.DictWriter",
"line_number": 70,
"usage_type": "call"
}
] |
536233970 | import pandas as pd
df=pd.read_csv("data",encoding="latin-1")
import numpy as np
import re
from sklearn.feature_extraction.text import CountVectorizer
count = CountVectorizer()
def preprocessor(text):
text = re.sub('<[^>]*>', '', text)
emoticons = re.findall('(?::|;|=)(?:-)?(?:\)|\(|D|P)', text)
... | null | Recenzje/toy.py | toy.py | py | 2,085 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pandas.read_csv",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "sklearn.feature_extraction.text.CountVectorizer",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "... |
574078306 | from setuptools import find_packages, setup
requirements = [
'bcolz',
'enaml',
'joblib',
'json_tricks',
'numpy',
'palettable',
'pyqtgraph',
'scipy',
'pandas',
]
extras_require = {
'ni': ['pydaqmx'],
'docs': ['sphinx', 'sphinx_rtd_theme', 'pygments-enaml'],
'examples':... | null | setup.py | setup.py | py | 1,389 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "setuptools.setup",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",
"line_number": 32,
"usage_type": "call"
}
] |
237260717 | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html
import traceback
import pymysql
from twisted.internet import defer
from twisted.enterprise import adbapi
class HousePipeline... | null | pipelines.py | pipelines.py | py | 2,086 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pymysql.cursors",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "twisted.enterprise.adbapi.ConnectionPool",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "twisted.enterprise.adbapi",
"line_number": 27,
"usage_type": "name"
},
... |
263811920 | #!/usr/bin/python3
""" This module creates an engine for saving to database """
import os
from sqlalchemy.orm import sessionmaker
from sqlalchemy.orm import scoped_session
from sqlalchemy import (create_engine)
from models.base_model import BaseModel, Base
from models.amenity import Amenity
from models.city import City... | null | models/engine/db_storage.py | db_storage.py | py | 3,789 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.getenv",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 19,
... |
629895309 | from requests_html import HTMLSession
from multiprocessing import Pool
from bs4 import BeautifulSoup
import pandas as pd
import re
import os
LINKS_REGEX = r'(http|ftp|https)://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?'
INCELS_URL = "https://incels.co/forums/inceldom-discussion.2/page-"
INCELS_TH... | null | forums_tools/incels_co_loader.py | incels_co_loader.py | py | 6,184 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "requests_html.HTMLSession",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_... |
364100541 | import urllib.request
from bs4 import BeautifulSoup
def requestDetailBlog(url):
#print(url)
page = urllib.request.urlopen(url)
html = page.read()
soup = BeautifulSoup(html, "html.parser")
soup.prettify()
while True:
bbsBlock = soup.find(attrs={"class": "topic-fontBlock"})
... | null | requestDetail.py | requestDetail.py | py | 1,061 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "urllib.request.request.urlopen",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "urllib.request.request",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "urllib.request",
"line_number": 7,
"usage_type": "name"
},
{
"api_name":... |
403565461 | # coding=utf-8
from django.test import LiveServerTestCase
from tests.help.page.home import HomePage
from tests.help.acceptance.environment import handle_test_env
from tests.help.acceptance.auth import Auth as AcceptanceAuth
from tests.help.page.dashboard.dashboard_page import DashboardPage
from tests.help.method.catego... | null | src/tests/acceptance/dashboard/new_post/test_simple_post.py | test_simple_post.py | py | 6,173 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.test.LiveServerTestCase",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "tests.help.acceptance.auth.Auth",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "tests.help.page.home.HomePage",
"line_number": 24,
"usage_type": "call"
... |
470518802 | # coding: utf-8
import urllib.request as request
import datetime
import json
import csv
import os
import psycopg2
import dj_database_url
# Host = "ec2-3-224-165-85.compute-1.amazonaws.com"
# Database = "d72fu64h9l7mf9"
# User = "vupunhqxniorvk"
# Password = "fafc17d1483bcb3b61b96b5149647ef88480cc0a61e53a62cf875792a373... | null | main.py | main.py | py | 4,858 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.environ",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.environ.get",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.