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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
47467786 | import os.path
import attrdict
import importlist
import handlemail
from selenium import webdriver
userdata = attrdict.AttrDict(
run_path = "U:/repo/heartflow/clinical_uitest/features",
app_url = "https://stable-app.heartflow.us",
int_url = "https://stable-internal.heartflow.us",
api_url ... | null | clinical_uitest/features/environment.py | environment.py | py | 4,897 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "attrdict.AttrDict",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "attrdict.AttrDict",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path.path.join",
"line_number": 98,
"usage_type": "call"
},
{
"api_name": "os.path.path",
... |
386726842 | #!/usr/bin/env python
# -*- coding:utf-8 _*-
"""
:Author :weijinlong
:Time: :2019/10/29 16:29
:File :config.py
:content:
"""
import json
import os
from dbsync import config
from dbsync.bin.base import Command
class GenerateConfig(Command):
def add_arguments(self, parser):
opts... | null | dbsync/bin/config.py | config.py | py | 1,018 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "dbsync.bin.base.Command",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "os.path.exists",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "dbsync.config",
... |
398380033 | """
Now let's see how easy it is to relax integrity
constraints and turn a MIP into LP, solve and get
dual value (shadow price)
"""
from docplex.mp.model import Model
from docplex.mp.relax_linear import LinearRelaxer
def make_bus_model():
mdl = Model(name='buses')
nbbus40 = mdl.integer_var(name='nbBus40')
... | null | zoorelaxintegrity.py | zoorelaxintegrity.py | py | 1,560 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "docplex.mp.model.Model",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "docplex.mp.relax_linear.LinearRelaxer.make_relaxed_model",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "docplex.mp.relax_linear.LinearRelaxer",
"line_number": 26,
... |
639790686 | from libra_client.json_rpc.views import TransactionView, EventView
from libra_client.lbrtypes.account_state import AccountState
from libra_client.error.error import LibraError
from libra_client.lbrtypes.account_config import testnet_dd_account_address
from libra_client import Client, Wallet
from typing import List
from... | null | libra_client/test/test_client.py | test_client.py | py | 5,853 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "libra_client.Wallet.new",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "libra_client.Wallet",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "libra_client.a... |
148030091 | """
Helpers for interacting with specific nodes in a cluster.
"""
from typing import Callable
import click
def node_option(command: Callable[..., None]) -> Callable[..., None]:
"""
An option decorator for choosing a node.
"""
function = click.option(
'--node',
type=str,
defau... | null | src/dcos_e2e_cli/dcos_vagrant/commands/_nodes.py | _nodes.py | py | 789 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "typing.Callable",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "click.option",
"line_number": 14,
"usage_type": "call"
}
] |
139343782 | #!/usr/bin/env python3
import json
def flag_monthday(datestr):
"""a date in this range is likely a month/day entered by a user, but stored as a month/year by Wikidata; check to make sure this isn't the case"""
try:
y,m,d = [int(x) for x in datestr.split('T')[0].rsplit('-', 2)]
# is "year" in th... | null | wikidata/date_flagger.py | date_flagger.py | py | 842 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "json.load",
"line_number": 19,
"usage_type": "call"
}
] |
121754202 | import sqlite3
from django.shortcuts import render
from rater_reports.views import Connection
from rater_api.models import Game
def games_by_rating_list_reverse(request):
if request.method == 'GET':
with sqlite3.connect(Connection.db_path) as conn:
conn.row_factory = sqlite3.Row
db_... | null | rater_reports/views/games/reverse_gamesbyrating.py | reverse_gamesbyrating.py | py | 1,121 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sqlite3.connect",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "rater_reports.views.Connection.db_path",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "rater_reports.views.Connection",
"line_number": 8,
"usage_type": "name"
},
... |
58689298 | from django import forms
from region.models import Region
from commune.models import Commune
from building.models import Building
from condominium.models import Condominium
from realestate.models import RealEstate
from appraisal.models import Appraisal
from django.core.exceptions import ValidationError
import datetime
... | null | web/create/forms.py | forms.py | py | 8,288 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.forms.Form",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "django.forms.FileField",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "django.for... |
222862186 | from bs4 import BeautifulSoup;
import requests.exceptions
import requests.status_codes
import requests
import os
import os.path
import time
import wget
import sys
import shutil
import struct
from selenium.webdriver.common.keys import Keys
from wgety.wgety import Wgety
import hashlib
from Crypto.Cipher import DES3
from ... | null | Web Scraping/scrap.py | scrap.py | py | 8,446 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "Crypto.Random.new",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "Crypto.Random",
"line_number": 41,
"usage_type": "name"
},
{
"api_name": "Crypto.PublicKey.RSA.generate",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "Crypto.... |
12675889 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# author:owefsad
# software: PyCharm
# project: lingzhi-webapi
import logging
from dongtai.endpoint import UserEndPoint, R
from dongtai.models.hook_strategy import HookStrategy
from dongtai.utils import const
from django.utils.translation import gettext_lazy as _
from iast.... | null | iast/views/engine_hook_rule_type_enable.py | engine_hook_rule_type_enable.py | py | 2,185 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.getLogger",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "rest_framework.serializers.Serializer",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 18,
"usage_type": "name"
},
... |
486451176 | import pkg_resources
from html5tagger import E
from niceback.trace import extract_chain
style = pkg_resources.resource_string(__name__, "style.css").decode()
detail_show = "{display: inherit}"
symbols = dict(call="➤", warning="⚠️", error="💣")
niceback_show = """\
function niceback_show(id) {
document.getEleme... | null | niceback/html.py | html.py | py | 4,956 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pkg_resources.resource_string",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "niceback.trace.extract_chain",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "html5tagger.E.div",
"line_number": 25,
"usage_type": "call"
},
{
"api_n... |
117344244 | """Module for Users in platform."""
from flask import g
from flask_restful import Resource
from api.models import User, Cohort, Center
from api.utils.auth import token_required
from api.utils.helpers import add_extra_user_info
from api.utils.marshmallow_schemas import user_schema, basic_info_schema
class UserAPI(Res... | null | src/api/endpoints/users.py | users.py | py | 2,641 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "flask_restful.Resource",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "api.models.User.query.filter_by",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "api.models.User.query",
"line_number": 20,
"usage_type": "attribute"
},
{
... |
173437745 | import numpy as np
import keras as K
import matplotlib.pyplot as plt
import sys
def custom_accuracy(y_act, y_pred):
return K.backend.cast(K.backend.round(y_act), 'int32') == K.backend.cast(K.backend.round(y_pred), 'int32')
def main():
n_rounds = int(sys.argv[1])
print(n_rounds, "Round Direct Spe... | null | ML/Directo/Speck/Speck_tests_96.py | Speck_tests_96.py | py | 2,451 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "keras.backend.cast",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "keras.backend",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "keras.backend.round",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "sys.argv",
... |
383487732 | import os
from datetime import datetime
from sklearn.model_selection import StratifiedKFold
from sklearn.model_selection import cross_val_score
from .experiments import *
from .normalizer import *
def create_folders():
"""
Create folders for storing the plots and the graphs.
:return: The path to the cr... | null | src/utils.py | utils.py | py | 6,427 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.getcwd",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.mkdir",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"lin... |
52156508 | import argparse
def make_arg_parser():
parser = argparse.ArgumentParser(
description='Searches the websites provided for a product and displays the results.',
epilog='Example: pricecheck -q "Asus gl552vx" -n 5')
parser.add_argument('-q', '--query', help='The product to be searched.', type=str,... | null | argparser.py | argparser.py | py | 612 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 4,
"usage_type": "call"
}
] |
264404991 | from typing import Union, Tuple
import numpy as np
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
from sklearn import metrics
FeatureTable = Union[pd.DataFrame, np.ndarray]
TargetVector = Union[pd.Series, np.ndarray]
def fit_model(model_type: str, X_train: FeatureTable, y_train: TargetVecto... | null | src/why/models.py | models.py | py | 3,350 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "typing.Union",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "pandas.DataFrame",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "numpy.ndarray",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "typing.Union",
... |
612385158 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
from tokenize import tokenize,untokenize
from io import BytesIO
class SrcList():
def __init__(self, path):
self.path = path
self.read_file(path)
self._i = 0
def __len__(self):
return len(self.lines)
def __getitem__(self, index):
retu... | null | src/mylib/src.py | src.py | py | 1,713 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "tokenize.tokenize",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "io.BytesIO",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "tokenize.tokenize",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "io.BytesIO",
"line... |
590297380 | import time
import csv
import random
from . import api
from flask import request, jsonify
from log_manager import logger
from project.utils.response_code import RET
from yoozen_db.yc_database import panel_collection
from yoozen_db.yc_database import YcDataBase
yc_db = YcDataBase()
@api.route('/gen_csv')
def gen_csv(... | null | project/db/other/生成csv.py | 生成csv.py | py | 3,957 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "yoozen_db.yc_database.YcDataBase",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask.request.args.get",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "flask.request.args",
"line_number": 17,
"usage_type": "attribute"
},
{
"a... |
83575736 | from astroquery.alma import Alma
import six
alma = Alma()
alma.cache_location = Alma.cache_location = '.'
username = six.moves.input("Username: ")
alma.login(username)
results = alma.query(payload=dict(project_code='2017.1.01355.L'), public=False, cache=False)
data = alma.retrieve_data_from_uid(results['Member ous i... | null | reduction/retrieve_data.py | retrieve_data.py | py | 325 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "astroquery.alma.Alma",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "astroquery.alma.Alma.cache_location",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "astroquery.alma.Alma",
"line_number": 5,
"usage_type": "name"
},
{
"a... |
529966680 | from datetime import timedelta
from django.db import models
from django.contrib.auth import get_user_model
from django.utils.crypto import get_random_string
from django.utils import timezone
from django.utils.module_loading import import_string
from . import app_settings
User = get_user_model()
def generate_key()... | null | rest_email_manager/models.py | models.py | py | 1,928 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.contrib.auth.get_user_model",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "django.utils.crypto.get_random_string",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "django.db.models.Model",
"line_number": 19,
"usage_type": "attri... |
246354192 | #!/usr/bin/env python
"""
Use at your own risk. No compatibility or maintenance or other assurance of suitability is expressed or implied.
Update or modify as needed
"""
# Requires a python 2.7.5+ interpeter
import sys, argparse, os, sets
from io import BytesIO
from StringIO import StringIO
from argparse import Ra... | null | getPut/bin/countDiff.py | countDiff.py | py | 3,326 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sys.stderr",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "sys.stdout.flush",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "sys.stdout",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "sets.Set",
"line... |
610823968 | from scrapy import Spider
from scrapy.contrib.linkextractors import LinkExtractor
from scrapy.http import Request
from scrapy.selector import Selector
from url_lover.items import ImageItem
class ImageSpider(Spider):
name = 'image_spider'
start_urls = []
def __init__(self, *args, **kwargs):
super... | null | url_lover/spiders/image_spider.py | image_spider.py | py | 950 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "scrapy.Spider",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "scrapy.contrib.linkextractors.LinkExtractor",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "scrapy.selector.Selector",
"line_number": 27,
"usage_type": "call"
},
{
... |
342384788 | # coding: utf-8
from django.contrib import admin
from .models import Chat, Message, ClimeProvider, AboutPaymentSystem
class AdminMessage(admin.TabularInline):
model = Message
exclude = ('created_at',)
class AdminChat(admin.ModelAdmin):
list_display = ('title', 'created_at', 'reciever',)
# inlines = ... | null | payment_messages/admin.py | admin.py | py | 678 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.contrib.admin.TabularInline",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "models.Message",
"line_number": 7,
"usage_type": "name"
},
{
"api_name... |
316422506 | import findspark
findspark.init()
from pyspark.sql import SparkSession ... | null | 04_construct_sds_parquet.py | 04_construct_sds_parquet.py | py | 2,969 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "findspark.init",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "pyspark.sql.SparkSession.builder.getOrCreate",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "pyspark.sql.SparkSession.builder",
"line_number": 4,
"usage_type": "attribute"
... |
38626523 | ''' Grabs all IGM data from their websites and saves to survey_results.json '''
import urllib2
import re
from unidecode import unidecode
from pandas import DataFrame, Series
def clean_string(s):
''' Remove junk characters from question string'''
s = re.sub(r"[\t]", "", s)
s = re.sub(r"[\n]", " ", s)
... | null | read_surveypages.py | read_surveypages.py | py | 2,825 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "re.sub",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 14,
"usage_type"... |
219493642 | import unittest
from django.core.urlresolvers import reverse
from django.test import Client
from .models import Municipality, District, DistrictExceptions, AddressBlock, Subscription
from custom_user.models import EmailUser as User
from django.contrib.auth.models import Group
from django.contrib.contenttypes.models imp... | null | wheresyourtrash/apps/notifications/tests.py | tests.py | py | 11,373 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "custom_user.models.EmailUser.objects.create",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "custom_user.models.EmailUser.objects",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "custom_user.models.EmailUser",
"line_number": 14,
"... |
290097353 | #!/usr/bin/python3
import os
import sys
import json
import logging
import requests
import subprocess
def updateURL():
return os.environ.get('AMCLEAN_UPDATE_URL', 'https://111.229.167.6:8080/v1/probe/virus/db/file/')
if __name__ == '__main__':
logging.basicConfig(format='%(asctime)s %(levelname)s: %(message)s... | null | amclean/amclean_update.py | amclean_update.py | py | 2,361 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.environ.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "logging.basicConfig",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "logging.getLogger"... |
227257916 | # This quickly cobbled together script was used to create the Skepticoin Blockchain Explorer
# https://github.com/skepticoin/explorer/blob/master/README.md
from decimal import Decimal
from datetime import datetime, timezone
import os
from typing import Callable
import immutables
from collections import namedtuple
from... | null | skepticoin/explorer.py | explorer.py | py | 9,292 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "collections.namedtuple",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "decimal.Decimal",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "skepticoin.params.SASHIMI_PER_COIN",
"line_number": 28,
"usage_type": "name"
},
{
"api_nam... |
519204137 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests the local filesystem exporter."""
import unittest
import mock
from dftimewolf.lib import state
from dftimewolf.lib import errors
from dftimewolf.lib.exporters import scp_ex
from dftimewolf import config
class LocalFileSystemTest(unittest.TestCase):
"""Tests ... | null | tests/lib/exporters/scp_ex.py | scp_ex.py | py | 3,491 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "unittest.TestCase",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "dftimewolf.lib.state.DFTimewolfState",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "dftimewolf.lib.state",
"line_number": 20,
"usage_type": "name"
},
{
"... |
425175694 | #!/usr/bin/python3
''' App_views routes'''
from api.v1.views import app_views
from flask import jsonify, abort, make_response, request
from models import storage
from models import City
@app_views.route(
'/states/<state_id>/cities',
methods=['GET'],
strict_slashes=False)
def return_cities(state_id):
'... | null | api/v1/views/cities.py | cities.py | py | 2,815 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "models.storage.get",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "models.storage",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "flask.abort",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "models.storage.all",
... |
360544368 | try:
import aubio
except:
aubio = False
import pyaudio
import numpy as np
import time
from collections import deque
if aubio:
FORMAT = pyaudio.paFloat32
CHANNELS = 1
RATE = 44100
CHUNK = 512
BATCH_SECONDS = 15
class BpmDetector:
def __init__(self):
if aubio:
self.tempo_detector = aub... | null | Backend/bpm_detector.py | bpm_detector.py | py | 1,563 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pyaudio.paFloat32",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "aubio.tempo",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pyaudio.PyAudio",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "collections.deque"... |
581141914 | #!/usr/bin/python3
import sys, getopt, requests
from datetime import datetime
version = '2.0'
class C:
header = '\033[95m'
okblue = '\033[94m'
okgreen = '\033[92m'
warning = '\033[93m'
fail = '\033[91m'
endc = '\033[0m'
bold = '\033[1m'
underline = '\033[4m'
def usage(error = None):... | null | reverse.py | reverse.py | py | 3,218 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "getopt.getopt",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "getopt.GetoptError",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "sys.exit",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "sys.exit",
"line_n... |
228672353 | #!/usr/bin/env python3
# coding: utf-8
import urllib.request
import urllib.error
import shutil
import os
import argparse
def download_iperf(path):
try:
with urllib.request.urlopen('https://downloads.es.net/pub/iperf/iperf-3.1.3.tar.gz') \
as response, open(os.path.join(path, 'iperf-3.1.3.tar.gz'), 'wb') as out_... | null | iperf/common/install_patch.py | install_patch.py | py | 1,218 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "urllib.request.request.urlopen",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "urllib.request.request",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "urllib.request",
"line_number": 12,
"usage_type": "name"
},
{
"api_nam... |
396235750 | import datetime
def alarmclock():
"Show Time"
time = datetime.datetime.now()
print ("Current Time:")
new_time = time.strftime("%H:%M:%S")
print (new_time)
"Set Alarm"
print ('Please put your alarm time in single quotes')
alarm_time = eval(input("Set an alarm 'H:M:S' :"))
print("Th... | null | alarmclock.py | alarmclock.py | py | 384 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "datetime.datetime.now",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 6,
"usage_type": "attribute"
}
] |
654452927 | import cx_Oracle
import mybatis_mapper2sql
from day22survey.mylog import MyLog
class MyDaoSuser:
def __init__(self):
self.conn = cx_Oracle.connect('python/python@localhost:1521/xe')
self.cs = self.conn.cursor()
self.mapper = mybatis_mapper2sql.create_mapper(xml='mybatis_suser.xml')[0]
... | null | HELLOPYTHON/day21survey/mydao_suser.py | mydao_suser.py | py | 1,899 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "cx_Oracle.connect",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "mybatis_mapper2sql.create_mapper",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "mybatis_mapper2sql.get_child_statement",
"line_number": 12,
"usage_type": "call"
},
... |
353949546 | from django.conf.urls import patterns, url
from .views import finaid_edit, finaid_email, finaid_message, finaid_review, \
finaid_review_detail, finaid_status, finaid_download_csv
urlpatterns = patterns("", # noqa
url(r"^edit/$", finaid_edit, name="finaid_edit"),
url(r"^review/$", finaid_review, name="fi... | null | pycon/finaid/urls.py | urls.py | py | 803 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.conf.urls.patterns",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "views.finaid_edit",
"line_number": 8,
"usage_type": "argument"
},
{
"api_name": "dja... |
279088548 | import urllib.request
import re
import json
albumId = '5148720'
userId = '15387201'
page = 5
filePath = '/Users/cuiyn/Desktop/Lunyu/'
albumUrl = 'http://www.ximalaya.com/' + userId + '/album/' + albumId + '?page=' + str(page)
print('Url: ' + albumUrl)
response = urllib.request.urlopen(albumUrl).read().decode('UTF-8'... | null | main.py | main.py | py | 1,211 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "urllib.request.request.urlopen",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "urllib.request.request",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "urllib.request",
"line_number": 13,
"usage_type": "name"
},
{
"api_nam... |
318601439 | from django import forms
from .models import User
from .models import UserHistory
from .models import Team
from .models import Project
from .models import Activity
class TeamForm(forms.Form):
name = forms.CharField(label='Nombre del equipo')
user = forms.ModelMultipleChoiceField(
label='Integrantes',
... | null | app/forms.py | forms.py | py | 10,665 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.forms.Form",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "django.forms.CharField",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.forms... |
188706292 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import csv
import logging
import unicodedata
from Actions.db import create_sqlite_label_table
from Actions.label import Labeller
class OurInputSource(object):
"""
Imports documents from our corpus
"""
def __init__(self, xml):
self.xm... | null | Actions/ourinput.py | ourinput.py | py | 2,527 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.path.exists",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "os.walk",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "os.path.splitext",
"line_numb... |
240660268 | from django.http import JsonResponse, HttpResponse
from django.shortcuts import render, render_to_response
import numpy as np
import django_filters
from rest_framework import generics, serializers, filters
from rest_framework.pagination import PageNumberPagination
from rest_framework.response import Response
from api.... | null | autus_api/api/views.py | views.py | py | 7,530 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "rest_framework.serializers.ModelSerializer",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "rest_framework.serializers.SerializerMethodField",
"line_number": ... |
447587125 | import base64
import cStringIO
import zipfile
from common import Common
from vocabulary import Malware as m
from vocabulary import ThreatExchange as t
class Malware(Common):
_URL = t.URL + t.VERSION + t.MALWARE_ANALYSES
_DETAILS = t.URL + t.VERSION
_RELATED = t.URL + t.VERSION
_fields = [
m... | null | pytx/pytx/malware.py | malware.py | py | 1,769 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "common.Common",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "vocabulary.ThreatExchange.URL",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "vocabulary.ThreatExchange",
"line_number": 12,
"usage_type": "name"
},
{
"api_na... |
619621587 | import unittest
import os
import requests
from unittestreport import ddt,list_data
from common.handle_excel import HandlExcel
from common.handle_path import DATA_DIR
from common.handle_log import my_log
from common.handle_conf import conf
from common.tools import replace_data
@ddt
class TestLogin(unittest.TestCase):
... | null | testcase/test_login.py | test_login.py | py | 1,563 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "unittest.TestCase",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "common.handle_excel.HandlExcel",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "co... |
481887404 | import os
import glob
import pandas as pd
import xml.etree.ElementTree as ET
def xml_to_csv(path):
xml_list = []
print("This is the path to convert the file xml files to csv " + str(path))
for xml_file in glob.glob(path + '/*.xml'):
tree = ET.parse(xml_file)
root = tree.getroot()
f... | null | xmltocsv.py | xmltocsv.py | py | 1,615 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "glob.glob",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree.parse",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "pandas.Da... |
301914837 | import sys
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn import preprocessing
dataframe=pd.read_csv(str(sys.argv[1]),header=None)
dataframe[0]=preprocessing.scale(dataframe[0])
dataframe[1]=preprocessing.scale(dataframe[1])
alphas=[0.001, 0.005,0.01, 0.05, 0.1, 0.5, 1, ... | null | LinearRegression.py | LinearRegression.py | py | 1,626 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pandas.read_csv",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "sklearn.preprocessing.scale",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sklearn.prepro... |
254203865 |
import pandas as pd
import requests
import json
from pprint import pprint
import pandas as pd
import os
import errno
province_dict = {
'Country': None,
'City': None,
'City (ASCII)': None,
'Region': None,
'Region (ASCII)': None,
'Population': None,
'Longitude': None,
'Latitude': None,
... | null | Code/Load_Data_Province.py | Load_Data_Province.py | py | 2,223 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pandas.DataFrame",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 38,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"l... |
432918467 | from django.shortcuts import redirect, render
from django.forms import forms, HiddenInput
from django.forms.fields import CharField
from django.http import HttpResponseRedirect, HttpResponse
from django.core.urlresolvers import reverse
from django.forms.extras.widgets import Select
from models import *
from auctiondata... | null | CCA/views.py | views.py | py | 38,098 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.http.HttpResponseRedirect",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "django.http.HttpResponseRedirect",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "hashlib.sha512",
"line_number": 33,
"usage_type": "call"
},
{
"... |
120084051 | from django.shortcuts import render, redirect, get_object_or_404
from .models import Venue, Artist, Note, Show
from .forms import VenueSearchForm, NewNoteForm, ArtistSearchForm, UserRegistrationForm
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.contrib... | null | lmn/views_artists.py | views_artists.py | py | 2,201 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "models.Show.objects.filter",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "models.Show.objects",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "models.Show",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "model... |
439633646 | import json
import random
class TranslationDataBatch(object):
trainingSet = None
validationSet = None
testingSet = None
batch_size = None
sentence_len = None
def __init__(self, path, batch_size, sentence_len):
self.trainingSet = list(json.loads(open(path + 'training.txt', 'r').readlin... | null | MRes/DataUtils/TranslationDataBatch.py | TranslationDataBatch.py | py | 2,633 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "json.loads",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "random.choice",
"line_number": 2... |
470466351 | from flask import render_template, flash, redirect, g, url_for
from app2 import app, db, models
from .forms import SearchForm
from .models import Video
from config import VIDEOS_PER_PAGE
@app.before_request
def before_request():
g.search_form = SearchForm()
@app.route('/')
@app.route('/index')
@app.route('/index/... | null | app2/views.py | views.py | py | 1,403 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "flask.g.search_form",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "flask.g",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "forms.SearchForm",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "app2.app.before_reques... |
267640402 | import gi
gi.require_version('Gtk', '3.0')
import threading, time
from gi.repository import Gtk, Pango
class TextSet(Gtk.TextView):
def __init__(self, buttonBold, buttonItalic, buttonUnderline, interval=1):
# Textview Setup
Gtk.TextView.__init__(self)
self.set_vexpand(True)
self.s... | null | TextSet.py | TextSet.py | py | 7,964 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "gi.require_version",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "gi.repository.Gtk.TextView",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "gi.repository.Gtk",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "gi.... |
631201990 | from itertools import count
ispent = lambda n: ((24*n + 1)**0.5 + 1) % 6 == 0
pent = lambda n: (3*n**2 - n)/2
def answer():
for j in count(2):
pj = pent(j)
for k in range(j, 0, -1):
pk = pent(k)
if ispent(pj-pk) and ispent(pj+pk):
return pj-pk
'''
5482660
'... | null | pe044_slow.py | pe044_slow.py | py | 370 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "itertools.count",
"line_number": 7,
"usage_type": "call"
}
] |
382469431 | from django.contrib import admin
from api_2007scape_tools.spells.models import SpellRunes, Spell
class SpellRunesInline(admin.TabularInline):
model = SpellRunes
extra = 0
fields = (
"image_tag",
"rune",
"count",
)
readonly_fields = ("image_tag",)
verbose_name_plural = ... | null | api_2007scape_tools/spells/admin.py | admin.py | py | 804 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.contrib.admin.TabularInline",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "api_2007scape_tools.spells.models.SpellRunes",
"line_number": 7,
"usage_type":... |
233436146 | import logging
import os
import sys
import motor.motor_asyncio
from aiohttp import web
from cerberus import Validator
import virtool.config
import virtool.settings.schema
import virtool.setup.db
import virtool.setup.paths
import virtool.setup.proxy
import virtool.templates
import virtool.utils
from virtool.api.respon... | null | virtool/setup/handlers.py | handlers.py | py | 5,404 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.getLogger",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "virtool.api.response.json_response",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "aiohttp.web.Response",
"line_number": 29,
"usage_type": "call"
},
{
"api_nam... |
601351390 | import sys
import os
import time
import onnx
import onnx_caffe2.backend
import numpy as np
import cv2
def preprocess(img):
img = cv2.resize(img, (352, 352))
if len(img) == 2: # gray to color
img = cv2.merge(img, img, img)
img = img.astype(np.float32) / 255.0
img = img.transpose(2, 0, 1)[np.ne... | null | onnx_demo.py | onnx_demo.py | py | 1,706 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "cv2.resize",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "cv2.merge",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.float32",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "numpy.newaxis",
"line_num... |
293308356 | import pickle
import gzip
import os
import sys
import time
import ipdb
import numpy as np
import theano
import theano.tensor as T
from theano.tensor.signal import downsample
from theano.tensor.nnet import conv
from theano.tensor.shared_randomstreams import RandomStreams
from pylearn2.training_algorithms.learning_rule i... | null | experiments/rtdnn/rtdnn.py | rtdnn.py | py | 6,049 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.random.RandomState",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "numpy.prod",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "numpy.prod",
... |
206037612 | #!/usr/bin/env python3
import time
import signal
from multiprocessing import Pool, Queue, Event
import pdb # noqa
import rpyc
def echo_forever(main_queue, main_event):
# sys.stdout = open(os.devnull, 'w')
try:
count = 0
start = time.time()
delta = 0
cdelta = 0
_max = {... | null | demos/echo/client.py | client.py | py | 2,827 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "time.time",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "rpyc.connect",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 23,
... |
256086546 | #!/usr/bin/env python
# coding: utf-8
# In[1]:
from facebook_scraper import get_posts
import couchdb
import json
import time
# In[2]:
#importa la libreria de pymongo para usar el MongoCliente
from pymongo import MongoClient
#luego me conecto a MongoDB localmente
CLIENT_LIZ = MongoClient('mongodb://localhost:2... | null | 4.py | 4.py | py | 2,136 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "facebook_scraper.get_posts",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "pymongo.Mon... |
32737944 |
import collections
import os
import random
import sys
from pathlib import Path
import pytest
from file_utils.compression import *
from file_utils.encryption import *
sys.path.append(str(Path(__file__).parent))
from misc import *
class BinDict(collections.defaultdict):
def __init__(self, bins):
super()... | null | tests/real files tests/files_of_different_sizes.py | files_of_different_sizes.py | py | 2,541 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sys.path.append",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "pathlib.Path",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
... |
403391710 | import json
import os
import time
from flask import Flask, jsonify, request, redirect, url_for, Response
from redis import StrictRedis
from rq import Queue
from slackclient import SlackClient
from lib.pybot import count_words_at_url, heartbeat
app = Flask(__name__)
redis = StrictRedis(host='redis')
q = Queue(connect... | null | app.py | app.py | py | 1,295 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "flask.Flask",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "redis.StrictRedis",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "rq.Queue",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "flask.Response",
"line_num... |
322702404 | from PyQt5 import QtCore
from PyQt5.QtWidgets import QDialog, QHBoxLayout, QVBoxLayout, QPushButton, QTableWidgetItem
from ui.mainwindow_presenter import MainWindow, MainWindowPresenter
from ui.dialogs import Dialog, DialogResult
from ui.qttablewidgetfactory import QtTableWidgetFactory
class QtPlanetFileHider(Dialog)... | null | ui/qtplanetfilehider.py | qtplanetfilehider.py | py | 3,812 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "ui.dialogs.Dialog",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "ui.mainwindow_presenter.MainWindowPresenter",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtWidgets.QDialog",
"line_number": 13,
"usage_type": "name"
},
{
... |
299943283 | import numpy as np
import scipy.integrate as integrate
import argparse
parser=argparse.ArgumentParser()
parser.add_argument("--wavelength", type=float, help="Insert wavelength of the source in nm, default is 500nm", default=500)
args=parser.parse_args()
wl=args.wavelength
def find_nearest_index(array, value):
array =... | null | setups3.py | setups3.py | py | 3,858 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "numpy.asarray",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.abs",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.pi",
"line_n... |
527665293 | from jsonrpc import jsonrpc_method
from darksidenode import log, settings
@jsonrpc_method('node.whisper')
def whisper(request,owner_identity,from_identity,msg):
log.info(settings.NODE_URL + " DENTRO WHISPER DEL NODO QUI SONO IN REMOTO!!!")
log.info(owner_identity)
log.info(from_identity)
log.info(msg)
... | null | darksidenode/node/views/node.py | node.py | py | 352 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "darksidenode.log.info",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "darksidenode.log",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "darksidenode.settings.NODE_URL",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name"... |
522346137 | import os
import sys
path = '/home/tugrulv89/shopistproject'
if path not in sys.path:
sys.path.insert(0, path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'shopistproject.settings'
import django
django.setup()
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
import requests
from bs... | null | bs4cron/trackbrandblade.py | trackbrandblade.py | py | 6,758 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sys.path",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "sys.path.insert",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_numbe... |
285389554 |
import gym
import tensorflow as tf
import numpy as np
import random as ran
from gym import wrappers
game_name = 'LunarLander-v2'
env = gym.make(game_name).env
INPUT_SIZE = env.observation_space.shape[0]
OUTPUT_SIZE = env.action_space.n
REPLAY_QUEUE = []
HIDDEN_SIZES = [[30], [50], [100], [30, 30], [40, 20], [60, 6... | null | depricated/src/TESTBENCH.py | TESTBENCH.py | py | 8,447 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "gym.make",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.empty",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "numpy.empty",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "numpy.argmax",
"line_number": 52,... |
548478821 | #!/usr/bin/env python
#-*- coding:utf-8 -*-
import HTMLParser
import requests
import hashlib
def get_md5(data) :
md5=hashlib.md5()
md5.update(data)
return md5.hexdigest()
def save_poc(data) :
file_=open('poc/'+get_md5(data)+'.poc.html','w')
if file_ :
data=data.replace('/*patch me in poc*... | null | get_poc.py | get_poc.py | py | 544 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "hashlib.md5",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 21,
"usage_type": "call"
}
] |
71348946 | #Import the flask module
from flask import render_template, jsonify, abort, request
import docker, image_py, datetime
#Return the Containerview based on the displayType (Gridview or Tableview)
def container(containers, displayType):
error = ""
try:
#Get All Containers
conList = containers.li... | null | container_py.py | container_py.py | py | 8,882 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "docker.errors",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "flask.render_template",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "flask.... |
338074890 | # -*- coding: utf-8 -*
import json
import os
DEFAULT_ROOT_DIR = '/media/yytang/DATA/yytang/comics'
DEFAULT_ROOT_DIR = os.path.expanduser(DEFAULT_ROOT_DIR)
if os.path.isdir(DEFAULT_ROOT_DIR) is True:
root_dir = DEFAULT_ROOT_DIR
else:
_here = os.path.dirname(os.path.realpath(__file__))
root_dir = os.path.joi... | null | download_comics.py | download_comics.py | py | 1,676 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.path.expanduser",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "os.path.isdir",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number... |
434083171 | #!/usr/bin/env python
# Copyright (c) 2017, DIANA-HEP
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list ... | null | uproot/_connect/toarrowed.py | toarrowed.py | py | 10,036 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "re.compile",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "collections.OrderedDict",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "collections.OrderedDict",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "collection... |
181200378 | from flask import Flask
from flask import Flask, flash, redirect, render_template, request, session, abort
import os, mysql.connector
import json, datetime
from json import JSONEncoder
app = Flask(__name__)
@app.route('/')
def route():
return home()
class DateTimeEncoder(JSONEncoder):
#Override the defa... | null | app.py | app.py | py | 4,752 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "flask.Flask",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "json.JSONEncoder",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "datetime.date",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime",
... |
584507299 | import json
from google.cloud import bigquery
import os
import sys
import tempfile
def export_to_bigquery(
dict_records,
schema,
table_name,
table_description=None,
dataset_name="weisburd",
project_id="broad-dsp-spec-ops",
delete_table_if_exists=True,
verbose=True):
"""Takes sequen... | null | docker/base-scripts/utils/bigquery_utils.py | bigquery_utils.py | py | 3,931 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "google.cloud.bigquery.Client",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "google.cloud.bigquery",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "google.cloud.bigquery.Table",
"line_number": 33,
"usage_type": "call"
},
{
"ap... |
272775484 | # -*- coding: utf-8 -*-
"""
Created on Wed Mar 4 11:38:23 2020
@author: tianan.lai
"""
import pprint
import sklearn.preprocessing as preprocessing
from xgboost import XGBRegressor
import xgboost as xgb
import pandas as pd
from sklearn import metrics
from sklearn.model_selection import train_test_split, GridSearchCV,... | null | _10train_val_model.py | _10train_val_model.py | py | 7,679 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "datetime.datetime.now",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime.now",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "da... |
88725083 | import argparse
import ShotBoundaryDetection
import InterviewDetection
import InterviewSelection
def parser():
parser = argparse.ArgumentParser()
parser.add_argument("-i", type=str, help="input file name without extension", required=True)
parser.add_argument("-s", type=int, help="time length [sec] (default: 5)", re... | null | src/main.py | main.py | py | 631 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "ShotBoundaryDetection.ShotBoundaryDetection",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "InterviewDetection.InterviewDetection",
"line_number": 22,
"usage_type... |
65825277 | # -*- coding: utf-8 -*-
from django import forms
from service.models import ServiceCategory
from professional.models import Professional
class CreateServiceForm(forms.Form):
name = forms.CharField(max_length=255, required=True, label='',
widget=forms.TextInput(attrs={ 'placeholder':'Nombre' })
)
p... | null | service/forms.py | forms.py | py | 1,025 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.forms.Form",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.forms.CharField",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.forms"... |
477202922 | from datetime import datetime, time
from flask import Blueprint, request, jsonify
from sqlalchemy import or_, and_
from src import db
from src.models import Shop, Street
shop_blueprint = Blueprint('shop', __name__)
def insert_shop(shop: Shop):
try:
db.session.add(shop)
db.session.commit()
... | null | src/shop/views.py | views.py | py | 3,560 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "flask.Blueprint",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "src.models.Shop",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "src.db.session.add",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "src.db.session",
... |
349589991 | #coding:utf-8
import sys
import os
import xml.etree.ElementTree as ET
from os import getcwd
from Step2_kmeans import kmeans_anchors
classes = ['hole']
def convert_annotation(xml_path):
print(xml_path)
in_file = open(xml_path, encoding='utf-8')
tree=ET.parse(in_file)
root = tree.getroot()
annota... | null | 常用数据预处理脚本/kmeans/1/Step1_voc2kmeansTxt(no need to step2).py | Step1_voc2kmeansTxt(no need to step2).py | py | 1,696 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "xml.etree.ElementTree.parse",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "os.listdir",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "sys.argv... |
302258774 | #
# Copyright (C) 2011 Alex Smith
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WA... | null | SConstruct | SConstruct | 5,767 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "sys.path",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_n... | |
300461186 | import pandas as pd
from string import Template
import os
from sqlalchemy import create_engine
from lib_cinci.db import uri
from lib_cinci.config import load
import logging
import logging.config
import re
import logging
import logging.config
from lib_cinci.config import load
from lib_cinci.features import tables_in_sch... | null | model/features/feature_utils.py | feature_utils.py | py | 6,817 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "logging.config.dictConfig",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "logging.config",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "lib_cinci.config.load",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "l... |
542127795 | from django.shortcuts import render
from django.http import HttpResponse, HttpResponseRedirect
from django.core.files.storage import FileSystemStorage
from .vector import *
import pandas as pd
# Create your views here.
def home(request):
global company_data
global company_vec
if request.method == 'POST' an... | null | SimilarCompaniesPOC/SimilarityScore/views.py | views.py | py | 1,547 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "django.core.files.storage.FileSystemStorage",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "django.http.HttpResponseRedirect",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 20,
"usage_type": "... |
437573848 | import json
import pickle
import re
with open('./data/chase/dev_gold.txt', 'r') as f:
glist = []
gseq_one = []
for l in f.readlines():
if len(l.strip()) == 0:
glist.append(gseq_one)
gseq_one = []
else:
lstrip = l.strip().split('\t')
gseq_one.a... | null | Benchmark_Approaches/Editsql/test.py | test.py | py | 1,723 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pickle.load",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_number": 43,... |
76566256 | import telebot
from telebot import types
token = '1094865183:AAGH3s7ND6P0iH6oIWDsu4I9-QgW3SeChf4'
bot = telebot.TeleBot(token)
@bot.message_handler(commands=['start'])
def start_message(message):
bot.send_message(message.chat.id, 'Hello ,'
'I will help you find l... | null | final_project_intro.py | final_project_intro.py | py | 11,591 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "telebot.TeleBot",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "telebot.types.InlineKeyboardMarkup",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "telebot.types",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "teleb... |
80799158 | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from typing import Callable, Dict, List, Optional, Tuple, Type
import numpy as np
import torch
from ax.core.data impor... | null | ax/modelbridge/multi_objective_torch.py | multi_objective_torch.py | py | 10,837 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "ax.utils.common.logger.get_logger",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "ax.modelbridge.torch.TorchModelBridge",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 46,
"usage_type": "name"
},
... |
438091501 | # -*- coding: utf-8 -*-
import datetime
import pymqr
import uuid
@pymqr.documents.EmbededDocument()
class AcadameDetail(object):
def __init__(self):
self.RecId = str,None,None,uuid.uuid4
self.SeniorityFrom = str
self.SeniorityTo = str
self.Coefficient = str
self.Salary =float... | null | packages/models/categories/acadame.py | acadame.py | py | 1,030 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "uuid.uuid4",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "pymqr.do... |
45343992 | import numpy as np
from numpy.linalg import solve
from findMin import findMin
from scipy.optimize import approx_fprime
import utils
# Ordinary Least Squares
class LeastSquares:
def fit(self,X,y):
self.w = solve(X.T@X, X.T@y)
def predict(self, X):
return X@self.w
# Least squares where each sam... | null | code/linear_model.py | linear_model.py | py | 3,925 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "numpy.linalg.solve",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.linalg.solve",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "numpy.float128",
... |
202754296 | '''
Created on Apr 7, 2010
@author: sposs
'''
import DIRAC
import os, urllib, tarfile
TarBallURL = "http://www.cern.ch/lcd-data/software/"
def install(app, config, area):
""" Install the ILD soft
"""
os.chdir(area)
appName = app[0]
appVersion = app[1]
appName = appName.lower()
app_tar = DIRAC.gConf... | null | Core/Utilities/ILDsoft.py | ILDsoft.py | py | 1,459 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "os.chdir",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "DIRAC.gConfig.getValue",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "DIRAC.gConfig",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "DIRAC.gLogger.erro... |
56125683 | from OpenGL.GL import *
import numpy
import uniform
import pyrr
def get_arrow_triangles(vector, height=0.2):
normal = pyrr.vector3.normalize(vector)
base_v = pyrr.Vector3(vector) - normal * height
p_tmp = [0.0, 0.0, 0.0]
min_index = vector.index(min(vector))
p_tmp[min_index] = 1.0
p_tmp = py... | null | arrow.py | arrow.py | py | 2,852 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "pyrr.vector3.normalize",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pyrr.vector3",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "pyrr.Vector3",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pyrr.Vector3",
... |
106332570 | from rest_framework import serializers
from wip.models import Job
from .job_timing import JobTimingSerializer
class JobSerializer(serializers.ModelSerializer):
timing = JobTimingSerializer(read_only=True)
class Meta:
model = Job
fields = [
'id',
'title',
'... | null | wip/serializers/job.py | job.py | py | 566 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "rest_framework.serializers.ModelSerializer",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "job_timing.JobTimingSerializer",
"line_number": 8,
"usage_type":... |
647964112 | import matplotlib.pyplot as plt
import pylab
import numpy as np
import matplotlib.pyplot as plt
import math
from pylab import arange,pi,sin,cos,sqrt,savefig
golden_mean = (math.sqrt(5)-1.0)/2.0 # Aesthetic ratio
fig_width = 3+3/8 # width in inches
fig_height = fig_width*golden_mean ... | null | narrow/medio/analisis_narrow2.py | analisis_narrow2.py | py | 3,629 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "math.sqrt",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pylab.rcParams.update",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "pylab.rcParams",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "numpy.linspace",
... |
187039640 |
"""
from django.shortcuts import render
from .models import Contact
# Create your views here.
def index(request):
return render(request, 'mysite/index.html')
def portfolio(request):
return render(request, 'mysite/portfolio.html')
def contact(request):
if request.method == 'POST':
email_r = requ... | null | mysite/views.py | views.py | py | 2,575 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "requests.get",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "requests.get",
"l... |
242986415 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Jan 13 00:00:37 2019
@author: chenxingji
"""
import numpy as np
import pandas as pd
from sklearn.tree import DecisionTreeRegressor
#from sklearn.model_selection import ShuffleSplit, KFold, GridSearchCV
#from sklearn.metrics import make_scorer
import ma... | null | code_xingji/Code_xingji/1_dtree_main.py | 1_dtree_main.py | py | 4,221 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "numpy.arange",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "numpy.arange"... |
348948584 | # import sys
# sys.setrecursionlimit(10 ** 6)
# import bisect
# from collections import deque
from decorator import stop_watch
@stop_watch
def solve(X):
ans = 1
if X <= 1999:
ans = 1
if X <= 1799:
ans = 2
if X <= 1599:
ans = 3
if X <= 1399:
ans = 4
if X <= 1199:... | null | other/2020/mSolutionsProconOpen2020/A.py | A.py | py | 661 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "decorator.stop_watch",
"line_number": 8,
"usage_type": "name"
}
] |
327497846 | import os
import sys
import argparse
import hashlib
from query_yes_no import query_yes_no
from sqlitedict import SqliteDict
import subprocess
parser = argparse.ArgumentParser(description='genreate md5 files')
parser.add_argument(dest='path', help='root folder or filename')
parser.add_argument('--verify', dest="verify"... | null | generate-md5-files.py | generate-md5-files.py | py | 4,376 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "hashlib.md5",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "os.path.relpath",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "os.path",
"lin... |
637346114 | import hashlib
import os
import unittest
import werkzeug
from mock import patch, Mock
from pymongo import Connection
import app
class ClientTest(object):
@classmethod
def setUpClass(self):
app.app.config["CSRF_ENABLED"] = False
self.api = app.app.test_client()
class DatabaseTest(object):
... | null | test_app.py | test_app.py | py | 21,546 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "app.app",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "app.app.test_client",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "app.app",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "app.MONGO_URI.split",
... |
397140001 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun May 20 17:17:58 2018
@author: goncalves.fernandes.junior
"""
import xml.etree.ElementTree as ET
#Classe qui définit un argument extrait du fichier xml
class Argument:
#id_number : id qui permettra de récupérer dans le fichier l'argument souhaité.
... | null | code.py | code.py | py | 1,917 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "xml.etree.ElementTree.parse",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree",
"line_number": 35,
"usage_type": "name"
}
] |
300985968 | # -*- coding: utf-8 -*-
"""
Created on Thu May 2 12:20:27 2019
@author: esabn
"""
import pandas as pd
from Checker import ParserAndChecker as p
from matplotlib import pyplot as plt
class GaussSeidel:
def __init__(self, parser, epsilon = 0.00001, i_max = 50, initial = [0]):
self.parser = parser
... | null | New folder/GaussSeidelClass.py | GaussSeidelClass.py | py | 3,062 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 73,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 73,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.title",
"line_number": 74,
"usage_type": "call"
},
{
"api_name": "matp... |
258188425 |
import torch
from torch.nn.parallel import DistributedDataParallel as DDP
from torch.nn.parallel import DistributedDataParallelCPU as DDPC
from rlpyt.agents.base import BaseAgent, AgentStep
from rlpyt.utils.quick_args import save__init__args
from rlpyt.distributions.gaussian import Gaussian, DistInfo
from rlpyt.distr... | null | rlpyt/agents/mb/gp_mlp_agent.py | gp_mlp_agent.py | py | 7,031 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "rlpyt.utils.collections.namedarraytuple",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "rlpyt.agents.base.BaseAgent",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "rlpyt.models.qpg.mlp.MuMlpModel",
"line_number": 28,
"usage_type": "n... |
386174451 | # import gym
import os
import torch
import torch.optim as optim
import multiprocessing as mp
from worker import worker
from chief import chief
from model import Model
from args import Args, LSTMPredict
# from abr.load_bw_traces import load_trace
# from abr.load_viewport_trace import load_viewport_unit
class Counter... | null | abr/a2c/main.py | main.py | py | 2,952 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "multiprocessing.Value",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "multiprocessing.Lock",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 40,
"usage_type": "attribute"
},
{
"api_name": "torch.set_... |
33627133 | import base64
import copy
import unittest
import random
from algosdk import transaction
from algosdk import encoding
from algosdk import account
from algosdk import mnemonic
from algosdk import wordlist
from algosdk import error
from algosdk import constants
from algosdk import util
from algosdk import logic
from algos... | null | test_unit.py | test_unit.py | py | 59,859 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "unittest.TestCase",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "algosdk.transaction.PaymentTxn",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "algosdk.transaction",
"line_number": 21,
"usage_type": "name"
},
{
"api_nam... |
542781359 | import json
import pandas as pd
from .state_machines.actual_param import ActualParam
from .state_machines.root_expression import RootExpression
from .context import Ctx
class Scanner:
def __init__(self, log_path):
self.log_path = log_path
self.state_machines = []
self.trailing_ctx = None... | null | flor/log_scanner/scanner.py | scanner.py | py | 6,813 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "state_machines.actual_param.ActualParam",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "state_machines.root_expression.RootExpression",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "context.Ctx",
"line_number": 64,
"usage_type": "cal... |
465250586 | #!/usr/bin/env python3
# -*- encoding: utf-8
"""
Start a Suplemon instance in the current window
"""
import sys
try:
import argparse
except:
# Python < 2.7
argparse = False
from main import App, __version__
def main():
"""Handle CLI invocation"""
# Parse our CLI arguments
if argparse:
... | null | cli.py | cli.py | py | 978 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "main.__version__",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "sys.argv",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "main.App",
... |
482304208 | # coding: utf-8
import codecs
from random import choice, random
from random import randint
import datetime
class Tabela_wierszowa(list):
def __init__(self, nazwa_macierzy, importowany_plik = None):
self.nazwa_macierzy = nazwa_macierzy
if importowany_plik != None:
plik = codecs.open("%s.... | null | Generator.py | Generator.py | py | 14,147 | python | en | code | null | code-starcoder2 | 76 | [
{
"api_name": "codecs.open",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "codecs.open",
"line_number": 75,
"usage_type": "call"
},
{
"api_name": "codecs.open",
"line_number": 107,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.strptime",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.