code stringlengths 22 1.05M | apis listlengths 1 3.31k | extract_api stringlengths 75 3.25M |
|---|---|---|
# -*- coding: utf-8 -*- #
# Copyright 2021 Google LLC. All Rights Reserved.
#
# Licensed 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 requir... | [
"googlecloudsdk.api_lib.dataproc.util.IsClientHttpException",
"googlecloudsdk.api_lib.dataproc.exceptions.JobError",
"googlecloudsdk.core.log.warning",
"googlecloudsdk.api_lib.dataproc.exceptions.JobTimeoutError"
] | [((2577, 2645), 'googlecloudsdk.api_lib.dataproc.exceptions.JobTimeoutError', 'exceptions.JobTimeoutError', (['"""Timed out while waiting for batch job."""'], {}), "('Timed out while waiting for batch job.')\n", (2603, 2645), False, 'from googlecloudsdk.api_lib.dataproc import exceptions\n'), ((1918, 1951), 'googleclou... |
#!/usr/bin/env python3
import turtle
t = turtle.Pen()
for x in range(400):
t.forward(x)
t.left(90)
input("press enter to exit")
| [
"turtle.Pen"
] | [((41, 53), 'turtle.Pen', 'turtle.Pen', ([], {}), '()\n', (51, 53), False, 'import turtle\n')] |
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import os
from datadog_checks.utils.common import get_docker_hostname
HERE = os.path.dirname(os.path.abspath(__file__))
# Networking
HOST = get_docker_hostname()
GITLAB_TEST_PASSWORD = "<PASSWORD>"
GI... | [
"os.path.abspath",
"datadog_checks.utils.common.get_docker_hostname"
] | [((259, 280), 'datadog_checks.utils.common.get_docker_hostname', 'get_docker_hostname', ([], {}), '()\n', (278, 280), False, 'from datadog_checks.utils.common import get_docker_hostname\n'), ((211, 236), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (226, 236), False, 'import os\n')] |
from __future__ import annotations
import argparse
import bisect
import os
from .extension.extract import extract_omop
def extract_omop_program() -> None:
parser = argparse.ArgumentParser(
description="An extraction tool for OMOP v5 sources"
)
parser.add_argument(
"omop_source", type=st... | [
"argparse.ArgumentParser"
] | [((172, 249), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""An extraction tool for OMOP v5 sources"""'}), "(description='An extraction tool for OMOP v5 sources')\n", (195, 249), False, 'import argparse\n')] |
# Generated by Django 3.2.7 on 2021-09-16 12:38
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("chains", "0026_chain_l2"),
]
operations = [
migrations.AddField(
model_name="chain",
name="description",
... | [
"django.db.models.CharField"
] | [((327, 371), 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'max_length': '(255)'}), '(blank=True, max_length=255)\n', (343, 371), False, 'from django.db import migrations, models\n')] |
import random
import time
print("\n\nWelcome..\n")
time.sleep(2)
print('''
_______
---' ____)
(_____)
(_____)
(____)
---.__(___)
''')
print('''
_______
---' ____)____
______)
_______)
_______)
---.__________)
''')
print('''
_______
---' ____)____
... | [
"random.randint",
"time.sleep"
] | [((51, 64), 'time.sleep', 'time.sleep', (['(2)'], {}), '(2)\n', (61, 64), False, 'import time\n'), ((836, 856), 'random.randint', 'random.randint', (['(0)', '(2)'], {}), '(0, 2)\n', (850, 856), False, 'import random\n')] |
# -*- coding: utf-8 -*-
import json
from rest_framework import generics
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework.parsers import MultiPartParser, FormParser
from rest_framework_jwt.authentication import JSONWebTokenAuthentication
from rest_framework.decora... | [
"documents.models.Document.objects.get",
"documents.models.FolderClient.objects.filter",
"utils.helpers.RequestInfo",
"documents.models.Document.objects.filter",
"documents.models.UserClient.objects.get",
"documents.models.UserClient.objects.all",
"pudb.set_trace",
"json.dumps",
"documents.models.Do... | [((765, 782), 'rest_framework.decorators.api_view', 'api_view', (["['GET']"], {}), "(['GET'])\n", (773, 782), False, 'from rest_framework.decorators import api_view, permission_classes\n'), ((1521, 1538), 'rest_framework.decorators.api_view', 'api_view', (["['GET']"], {}), "(['GET'])\n", (1529, 1538), False, 'from rest... |
from django.shortcuts import render
from django.views.decorators.csrf import csrf_exempt
from billing.utils import initiate_transaction
PAYTM_MERCHANT_ID = 'SNeEfa79194346659805'
PAYTM_MERCHANT_KEY = '<KEY>'
def initiate(request):
order_id = request.session['order_id']
response = initiate_transaction(order_... | [
"django.shortcuts.render",
"billing.utils.initiate_transaction"
] | [((293, 323), 'billing.utils.initiate_transaction', 'initiate_transaction', (['order_id'], {}), '(order_id)\n', (313, 323), False, 'from billing.utils import initiate_transaction\n'), ((476, 530), 'django.shortcuts.render', 'render', (['request', '"""billing/show_payments.html"""', 'context'], {}), "(request, 'billing/... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'ipetrash'
# TODO: использовать http://www.cbr.ru/scripts/Root.asp?PrtId=SXML или разобраться с данными от query.yahooapis.com
# непонятны некоторые параметры
# TODO: сделать консоль
# TODO: сделать гуй
# TODO: сделать сервер
import requests
rs = requests.... | [
"requests.get"
] | [((311, 524), 'requests.get', 'requests.get', (['"""https://query.yahooapis.com/v1/public/yql?q=select+*+from+yahoo.finance.xchange+where+pair+=+%22USDRUB,EURRUB%22&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback="""'], {}), "(\n 'https://query.yahooapis.com/v1/public/yql?q=select+*+from+ya... |
import abc
import logging
from datetime import datetime
from .log_adapter import adapt_log
LOGGER = logging.getLogger(__name__)
class RunnerWrapper(abc.ABC):
""" Runner wrapper class """
log = adapt_log(LOGGER, 'RunnerWrapper')
def __init__(self, func_runner, runner_id, key, tracker, log_exception=Tru... | [
"logging.getLogger",
"datetime.datetime.now"
] | [((102, 129), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (119, 129), False, 'import logging\n'), ((1642, 1656), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (1654, 1656), False, 'from datetime import datetime\n'), ((1965, 1979), 'datetime.datetime.now', 'datetime.now', (... |
import scipy.stats as stat
import pandas as pd
import plotly.graph_objs as go
from hidrocomp.graphics.distribution_build import DistributionBuild
class GenPareto(DistributionBuild):
def __init__(self, title, shape, location, scale):
super().__init__(title, shape, location, scale)
def cumulative(se... | [
"plotly.graph_objs.layout.XAxis",
"scipy.stats.genpareto.pdf",
"scipy.stats.genpareto.ppf",
"pandas.DataFrame",
"plotly.graph_objs.layout.YAxis"
] | [((602, 638), 'plotly.graph_objs.layout.XAxis', 'go.layout.XAxis', ([], {'title': '"""Vazão(m³/s)"""'}), "(title='Vazão(m³/s)')\n", (617, 638), True, 'import plotly.graph_objs as go\n'), ((659, 697), 'plotly.graph_objs.layout.YAxis', 'go.layout.YAxis', ([], {'title': '"""Probabilidade"""'}), "(title='Probabilidade')\n"... |
import traceback
import copy
import gc
from ctypes import c_void_p
import itertools
import array
import math
import numpy as np
from OpenGL.GL import *
from PyEngine3D.Common import logger
from PyEngine3D.Utilities import Singleton, GetClassName, Attributes, Profiler
from PyEngine3D.OpenGLContext import OpenGLContex... | [
"PyEngine3D.Common.logger.error",
"traceback.format_exc",
"PyEngine3D.OpenGLContext.OpenGLContext.glGetTexImage",
"PyEngine3D.Utilities.GetClassName",
"PyEngine3D.Common.logger.warn",
"math.log2",
"PyEngine3D.Utilities.Attributes",
"numpy.array",
"copy.copy",
"numpy.fromstring",
"PyEngine3D.Comm... | [((964, 1042), 'PyEngine3D.Common.logger.error', 'logger.error', (['"""Cannot convert to numpy dtype. UNKOWN DATA TYPE(%s)"""', 'data_type'], {}), "('Cannot convert to numpy dtype. UNKOWN DATA TYPE(%s)', data_type)\n", (976, 1042), False, 'from PyEngine3D.Common import logger\n'), ((3639, 3651), 'PyEngine3D.Utilities.A... |
"""Find stars that are both in our sample and in Shull+21"""
import numpy as np
import get_data
from matplotlib import pyplot as plt
data = get_data.get_merged_table()
shull = get_data.get_shull2021()
matches = [name for name in data["Name"] if name in shull["Name"]]
print(len(matches), " matches found")
print(matche... | [
"get_data.get_merged_table",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.colorbar",
"numpy.isin",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.title",
"get_data.get_shull2021",
"matplotlib.pyplot.show"
] | [((142, 169), 'get_data.get_merged_table', 'get_data.get_merged_table', ([], {}), '()\n', (167, 169), False, 'import get_data\n'), ((178, 202), 'get_data.get_shull2021', 'get_data.get_shull2021', ([], {}), '()\n', (200, 202), False, 'import get_data\n'), ((806, 816), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\... |
import numpy as np
import matplotlib.pyplot as plt
from collections import Iterable
mrkr1 = 12
mrkr1_inner = 8
fs = 18
# FUNCTION TO TURN NESTED LIST INTO 1D LIST
def flatten(lis):
for item in lis:
if isinstance(item, Iterable) and not isinstance(item, str):
for x in flatten(item):
... | [
"numpy.radians",
"matplotlib.pyplot.text",
"matplotlib.pyplot.Circle",
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.cm.flag",
"numpy.binary_repr",
"matplotlib.pyplot.cm.hsv",
"matplotlib.pyplot.yticks",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.xlim",
"matplotlib... | [((4339, 4353), 'matplotlib.pyplot.xticks', 'plt.xticks', (['[]'], {}), '([])\n', (4349, 4353), True, 'import matplotlib.pyplot as plt\n'), ((4358, 4372), 'matplotlib.pyplot.yticks', 'plt.yticks', (['[]'], {}), '([])\n', (4368, 4372), True, 'import matplotlib.pyplot as plt\n'), ((7847, 7857), 'matplotlib.pyplot.ylim', ... |
import pytest
import wtforms
from dmutils.forms.fields import DMBooleanField
from dmutils.forms.widgets import DMSelectionButtonBase
class BooleanForm(wtforms.Form):
field = DMBooleanField()
@pytest.fixture
def form():
return BooleanForm()
def test_value_is_a_list(form):
assert isinstance(form.field... | [
"dmutils.forms.fields.DMBooleanField",
"dmutils.forms.widgets.DMSelectionButtonBase"
] | [((182, 198), 'dmutils.forms.fields.DMBooleanField', 'DMBooleanField', ([], {}), '()\n', (196, 198), False, 'from dmutils.forms.fields import DMBooleanField\n'), ((574, 611), 'dmutils.forms.widgets.DMSelectionButtonBase', 'DMSelectionButtonBase', ([], {'type': '"""boolean"""'}), "(type='boolean')\n", (595, 611), False,... |
# -*- coding: utf-8 -*-
from bs4 import BeautifulSoup, SoupStrainer
import bs4
import requests
import csv
import pandas as pd
import os
import re
"""
Module 3 : retrieve text from each article & basic preprocess
"""
ignore_sents = ['Les associations Vikidia', 'Répondre au sondage', 'Aller à :',
'Récupérée de « ht... | [
"os.path.exists",
"os.makedirs",
"pandas.read_csv",
"requests.get",
"re.sub"
] | [((3919, 3985), 'pandas.read_csv', 'pd.read_csv', (['f'], {'sep': '"""\t"""', 'encoding': '"""utf-8"""', 'quoting': 'csv.QUOTE_NONE'}), "(f, sep='\\t', encoding='utf-8', quoting=csv.QUOTE_NONE)\n", (3930, 3985), True, 'import pandas as pd\n'), ((3840, 3864), 'os.path.exists', 'os.path.exists', (['"""corpus"""'], {}), "... |
import io
import os
from svgutils import transform as svg_utils
import qrcode.image.svg
from cwa_qr import generate_qr_code, CwaEventDescription
class CwaPoster(object):
POSTER_PORTRAIT = 'portrait'
POSTER_LANDSCAPE = 'landscape'
TRANSLATIONS = {
POSTER_PORTRAIT: {
'file': 'poster/p... | [
"os.path.abspath",
"cwa_qr.generate_qr_code",
"io.BytesIO"
] | [((682, 717), 'cwa_qr.generate_qr_code', 'generate_qr_code', (['event_description'], {}), '(event_description)\n', (698, 717), False, 'from cwa_qr import generate_qr_code, CwaEventDescription\n'), ((803, 815), 'io.BytesIO', 'io.BytesIO', ([], {}), '()\n', (813, 815), False, 'import io\n'), ((913, 938), 'os.path.abspath... |
# pdaggerq - A code for bringing strings of creation / annihilation operators to normal order.
# Copyright (C) 2020 <NAME>
#
# This file is part of the pdaggerq package.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may... | [
"numpy.abs",
"numpy.reciprocal",
"numpy.einsum",
"numpy.linalg.norm",
"diis.DIIS"
] | [((13236, 13255), 'numpy.reciprocal', 'np.reciprocal', (['e_ai'], {}), '(e_ai)\n', (13249, 13255), True, 'import numpy as np\n'), ((13274, 13295), 'numpy.reciprocal', 'np.reciprocal', (['e_abij'], {}), '(e_abij)\n', (13287, 13295), True, 'import numpy as np\n'), ((959, 980), 'numpy.einsum', 'einsum', (['"""ii"""', 'f[o... |
"""DNS Authenticator for deSEC."""
import json
import logging
import time
import requests
import zope.interface
from certbot import errors
from certbot import interfaces
from certbot.plugins import dns_common
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
@zope.interface.implementer(interfaces.... | [
"logging.getLogger",
"certbot.errors.PluginError",
"requests.Session",
"time.sleep"
] | [((220, 247), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (237, 247), False, 'import logging\n'), ((3296, 3314), 'requests.Session', 'requests.Session', ([], {}), '()\n', (3312, 3314), False, 'import requests\n'), ((3944, 3964), 'time.sleep', 'time.sleep', (['cooldown'], {}), '(cooldow... |
# -*- coding: utf-8 -*-
#
# fumi deployment tool
# https://github.com/rmed/fumi
#
# The MIT License (MIT)
#
# Copyright (c) 2016 <NAME> <<EMAIL>>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Soft... | [
"types.MethodType",
"fumi.util.cprint"
] | [((5424, 5471), 'types.MethodType', 'types.MethodType', (['deployments.prepare', 'deployer'], {}), '(deployments.prepare, deployer)\n', (5440, 5471), False, 'import types\n'), ((4964, 4983), 'fumi.util.cprint', 'cprint', (['m.DEP_LOCAL'], {}), '(m.DEP_LOCAL)\n', (4970, 4983), False, 'from fumi.util import cprint\n'), (... |
import math
import unittest
from scipy import integrate
from ..problem import Problem
from ..algorithm_genetic import NSGAII
from ..algorithm_sweep import SweepAlgorithm
from ..benchmark_functions import Booth
from ..results import Results
from ..operators import LHSGenerator
from ..surrogate_scikit import SurrogateM... | [
"sklearn.tree.DecisionTreeRegressor",
"scipy.integrate.quad",
"sklearn.ensemble.ExtraTreesRegressor",
"math.sqrt",
"math.log",
"math.cos",
"unittest.main"
] | [((15380, 15395), 'unittest.main', 'unittest.main', ([], {}), '()\n', (15393, 15395), False, 'import unittest\n'), ((7312, 7348), 'sklearn.ensemble.ExtraTreesRegressor', 'ExtraTreesRegressor', ([], {'n_estimators': '(10)'}), '(n_estimators=10)\n', (7331, 7348), False, 'from sklearn.ensemble import ExtraTreesRegressor\n... |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import ... | [
"pulumi.getter",
"pulumi.set",
"pulumi.get"
] | [((6350, 6380), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""httpPath"""'}), "(name='httpPath')\n", (6363, 6380), False, 'import pulumi\n'), ((6631, 6661), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""httpsSni"""'}), "(name='httpsSni')\n", (6644, 6661), False, 'import pulumi\n'), ((6912, 6956), 'pulumi.ge... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from logging import config
config.dictConfig({
'version': 1,
'disable_existing_loggers': True,
'formatters': {
'standard': {
'format': '%... | [
"logging.config.dictConfig"
] | [((178, 576), 'logging.config.dictConfig', 'config.dictConfig', (["{'version': 1, 'disable_existing_loggers': True, 'formatters': {'standard':\n {'format':\n '%(asctime)s| %(name)s/%(process)d: %(message)s @%(funcName)s:%(lineno)d #%(levelname)s'\n }}, 'handlers': {'console': {'formatter': 'standard', 'class':... |
# coding: utf-8
import fnmatch
import pathlib
import os.path
import re
import logging
logging.basicConfig(level=logging.INFO)
INCLUDED_SOURCES = ("*.py", )
EXCLUDED_SOURCES = ("__*__.py", )
INCLUDED_SOURCES_REGEX = tuple(re.compile(fnmatch.translate(pattern))
for pattern in INCLUDED_SO... | [
"logging.basicConfig",
"logging.info",
"fnmatch.translate",
"pathlib.Path"
] | [((87, 126), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO'}), '(level=logging.INFO)\n', (106, 126), False, 'import logging\n'), ((1062, 1097), 'logging.info', 'logging.info', (['"""Creating index file"""'], {}), "('Creating index file')\n", (1074, 1097), False, 'import logging\n'), ((2015,... |
# Copyright 2021 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0
import argparse
import os
from githubDataExtraction import GithubDataExtractor
def getRepos(access_token, organization, reaction):
"""
Method to extract data for all repositories in organization
"""
extractor = GithubDataExtractor(a... | [
"githubDataExtraction.GithubDataExtractor",
"argparse.ArgumentParser"
] | [((299, 332), 'githubDataExtraction.GithubDataExtractor', 'GithubDataExtractor', (['access_token'], {}), '(access_token)\n', (318, 332), False, 'from githubDataExtraction import GithubDataExtractor\n'), ((739, 772), 'githubDataExtraction.GithubDataExtractor', 'GithubDataExtractor', (['access_token'], {}), '(access_toke... |
#!/usr/bin/python35
import calc
from calc import mult
print(calc.add(1, 2))
print(calc.dec(2, 3))
print(calc.div(1, 2))
print(mult(2, 3))
| [
"calc.div",
"calc.mult",
"calc.dec",
"calc.add"
] | [((62, 76), 'calc.add', 'calc.add', (['(1)', '(2)'], {}), '(1, 2)\n', (70, 76), False, 'import calc\n'), ((84, 98), 'calc.dec', 'calc.dec', (['(2)', '(3)'], {}), '(2, 3)\n', (92, 98), False, 'import calc\n'), ((106, 120), 'calc.div', 'calc.div', (['(1)', '(2)'], {}), '(1, 2)\n', (114, 120), False, 'import calc\n'), ((1... |
"""
Genetic solution to the 0/1 Knapsack Problem.
usage: knapsack01.py [-h] [--data-file DATA_FILE]
[--population-size POPULATION_SIZE]
[--iterations MAX_ITERATIONS] [--mutation MUTATION_PROB]
[--crossover CROSSOVER_PROB] [--seed SEED]
... | [
"levis.crossover.single_point_bin",
"levis.configuration.merge",
"random.shuffle",
"levis.mutation.toggle",
"levis.configuration.write_file",
"random.triangular",
"levis.configuration.read_file",
"levis.configuration.get_parser",
"math.log",
"levis.crossover.uniform_bin",
"os.path.abspath",
"r... | [((794, 815), 'os.path.abspath', 'os.path.abspath', (['""".."""'], {}), "('..')\n", (809, 815), False, 'import os\n'), ((4382, 4414), 'levis.configuration.write_file', 'configuration.write_file', (['config'], {}), '(config)\n', (4406, 4414), False, 'from levis import configuration, crossover, mutation, FitnessLoggingGA... |
# -*- coding: utf-8 -*-
"""
@date Created on Tue Jan 12 13:54:56 2016
@copyright (C) 2015-2016 EOMYS ENGINEERING.
@author pierre_b
"""
from os.path import join
from unittest import TestCase
import matplotlib.pyplot as plt
from numpy import array, pi, zeros
from pyleecan.Classes.Frame import Frame
from pyleecan.Class... | [
"matplotlib.pyplot.gcf",
"pyleecan.Classes.SlotW60.SlotW60",
"os.path.join",
"pyleecan.Classes.WindingCW2LT.WindingCW2LT",
"matplotlib.pyplot.close",
"pyleecan.Classes.LamSlotWind.LamSlotWind",
"pyleecan.Classes.Machine.Machine"
] | [((1407, 1423), 'matplotlib.pyplot.close', 'plt.close', (['"""all"""'], {}), "('all')\n", (1416, 1423), True, 'import matplotlib.pyplot as plt\n'), ((1443, 1452), 'pyleecan.Classes.Machine.Machine', 'Machine', ([], {}), '()\n', (1450, 1452), False, 'from pyleecan.Classes.Machine import Machine\n'), ((1478, 1553), 'pyle... |
import json
import math
import re
from django.urls import reverse
from django.http.response import HttpResponse, HttpResponseRedirect
from django.shortcuts import redirect, render
from django.template.defaultfilters import slugify
from django.db.models import Q, F
from haystack.query import SQ, SearchQuerySet
from dja... | [
"haystack.query.SQ",
"django.http.QueryDict",
"django.http.response.HttpResponse",
"django.http.response.HttpResponseRedirect",
"search.forms.job_searchForm",
"pjob.views.get_page_number",
"django.urls.reverse",
"re.search",
"django.shortcuts.render",
"peeldb.models.JobPost.objects.filter",
"mpc... | [((3293, 3313), 'search.forms.job_searchForm', 'job_searchForm', (['data'], {}), '(data)\n', (3307, 3313), False, 'from search.forms import job_searchForm\n'), ((4827, 4869), 'mpcomp.views.get_prev_after_pages_count', 'get_prev_after_pages_count', (['page', 'no_pages'], {}), '(page, no_pages)\n', (4853, 4869), False, '... |
# Importing default django packages:
from django.db import models
from django.template.defaultfilters import slugify
# Importing models from the research core:
from research_core.models import Topic
# Importing 3rd party packages:
from tinymce import models as tinymce_models
class BlogPost(models.Model):
"""The ... | [
"django.db.models.ForeignKey",
"django.db.models.DateTimeField",
"django.template.defaultfilters.slugify",
"django.db.models.SlugField",
"tinymce.models.HTMLField",
"django.db.models.ImageField",
"django.db.models.CharField"
] | [((1849, 1894), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(250)', 'unique': '(True)'}), '(max_length=250, unique=True)\n', (1865, 1894), False, 'from django.db import models\n'), ((1916, 2003), 'django.db.models.ImageField', 'models.ImageField', ([], {'upload_to': '"""blog/thumbnails"""', '... |
from contextlib import contextmanager
import torch
import torch.nn.functional as F
from torch.nn import Module, Parameter
from torch.nn import init
_WN_INIT_STDV = 0.05
_SMALL = 1e-10
_INIT_ENABLED = False
def is_init_enabled():
return _INIT_ENABLED
@contextmanager
def init_mode():
global _INIT_ENABLED
... | [
"torch.nn.functional.linear",
"torch.nn.functional.conv2d",
"torch.rand",
"torch.nn.init.ones_",
"torch.Tensor",
"torch.nn.init.zeros_",
"torch.clamp",
"torch.zeros",
"torch.no_grad",
"torch.randn",
"torch.nn.init.normal_",
"torch.ones"
] | [((9450, 9465), 'torch.no_grad', 'torch.no_grad', ([], {}), '()\n', (9463, 9465), False, 'import torch\n'), ((10218, 10267), 'torch.randn', 'torch.randn', (['bs', 'in_features'], {'dtype': 'torch.float64'}), '(bs, in_features, dtype=torch.float64)\n', (10229, 10267), False, 'import torch\n'), ((10641, 10705), 'torch.ra... |
import pytest
from google.protobuf import json_format
import verta.code
from verta._internal_utils import _git_utils
class TestGit:
def test_no_autocapture(self):
code_ver = verta.code.Git(_autocapture=False)
# protobuf message is empty
assert not json_format.MessageToDict(
... | [
"google.protobuf.json_format.MessageToDict",
"pytest.skip",
"verta._internal_utils._git_utils.get_git_repo_root_dir"
] | [((281, 359), 'google.protobuf.json_format.MessageToDict', 'json_format.MessageToDict', (['code_ver._msg'], {'including_default_value_fields': '(False)'}), '(code_ver._msg, including_default_value_fields=False)\n', (306, 359), False, 'from google.protobuf import json_format\n'), ((505, 539), 'verta._internal_utils._git... |
from django import forms
class PostForm(forms.Form):
title = forms.CharField(max_length=30, label='タイトル')
content = forms.CharField(label='内容', widget=forms.Textarea()) | [
"django.forms.Textarea",
"django.forms.CharField"
] | [((65, 109), 'django.forms.CharField', 'forms.CharField', ([], {'max_length': '(30)', 'label': '"""タイトル"""'}), "(max_length=30, label='タイトル')\n", (80, 109), False, 'from django import forms\n'), ((161, 177), 'django.forms.Textarea', 'forms.Textarea', ([], {}), '()\n', (175, 177), False, 'from django import forms\n')] |
from django.urls import path
from django.conf.urls import url
from django.urls import path,include
import grievance.views as VIEWS
from django.conf.urls.static import static
from django.conf import settings
app_name = 'grievance'
urlpatterns =[
# path('', VIEWS.HomeView.as_view())
path('level1/', VIEWS.level1HomeVi... | [
"grievance.views.level1HomeView.as_view",
"grievance.views.studentHomeView.as_view",
"grievance.views.websiteAdminHomePageView.as_view",
"grievance.views.ViewOnlyPSDStudentPageView.as_view",
"grievance.views.level1StudentView.as_view",
"django.urls.include",
"grievance.views.level1RequestView.as_view",
... | [((1332, 1393), 'django.conf.urls.static.static', 'static', (['settings.MEDIA_URL'], {'document_root': 'settings.MEDIA_ROOT'}), '(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)\n', (1338, 1393), False, 'from django.conf.urls.static import static\n'), ((302, 332), 'grievance.views.level1HomeView.as_view', 'VIEWS... |
from time import sleep
from cores import *
print(f'{cores["azul"]}Em breve a queima de fogos irá começar...{limpar}')
for c in range(10, -1, -1):
print(c)
sleep(1)
print(f'{cores["vermelho"]}{fx["negrito"]}Feliz ano novo!{limpar} 🎆 🎆')
| [
"time.sleep"
] | [((163, 171), 'time.sleep', 'sleep', (['(1)'], {}), '(1)\n', (168, 171), False, 'from time import sleep\n')] |
from optparse import make_option
from django.apps import apps
from django.conf import settings
from django.core.files.storage import default_storage
from django.core.management.base import BaseCommand
from django.db.models import FileField, ImageField
from database_files.models import File
class Command(BaseCommand... | [
"database_files.models.File.objects.exclude",
"django.core.files.storage.default_storage.delete",
"django.apps.apps.get_models",
"optparse.make_option"
] | [((498, 672), 'optparse.make_option', 'make_option', (['"""--dryrun"""'], {'action': '"""store_true"""', 'dest': '"""dryrun"""', 'default': '(False)', 'help': '"""If given, only displays the names of orphaned files and does not delete them."""'}), "('--dryrun', action='store_true', dest='dryrun', default=False,\n he... |
from spectacles import utils
from spectacles.logger import GLOBAL_LOGGER as logger
from unittest.mock import MagicMock
import pytest
import unittest
TEST_BASE_URL = "https://test.looker.com"
def test_compose_url_one_path_component():
url = utils.compose_url(TEST_BASE_URL, ["api"])
assert url == "https://test... | [
"spectacles.utils.human_readable",
"spectacles.utils.compose_url",
"unittest.mock.MagicMock",
"spectacles.utils.log_duration",
"pytest.mark.parametrize",
"spectacles.utils.get_detail",
"spectacles.utils.chunks"
] | [((1562, 1631), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""elapsed,expected"""', 'human_readable_testcases'], {}), "('elapsed,expected', human_readable_testcases)\n", (1585, 1631), False, 'import pytest\n'), ((1922, 1987), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""fn_name,expected"""'... |
'''
Service class for utility functions that I need throught the app
'''
class Utilities:
@staticmethod
def clickedOn(onScreenCoordinates, grid, cell, clickCoords):
i, j = cell
cellX, cellY = onScreenCoordinates[i][j]
x, y = clickCoords
import math, constants
radius = math.sqrt((cellX - x) * (cellX - x)... | [
"math.sqrt"
] | [((285, 349), 'math.sqrt', 'math.sqrt', (['((cellX - x) * (cellX - x) + (cellY - y) * (cellY - y))'], {}), '((cellX - x) * (cellX - x) + (cellY - y) * (cellY - y))\n', (294, 349), False, 'import math, constants\n')] |
import pytest
from unittest.mock import Mock
from datacrunch.http_client.http_client import HTTPClient
BASE_URL = "https://api-testing.datacrunch.io/v1"
ACCESS_TOKEN = "<PASSWORD>"
CLIENT_ID = "0123456789xyz"
@pytest.fixture
def http_client():
auth_service = Mock()
auth_service._access_token = ACCESS_TOKEN
... | [
"datacrunch.http_client.http_client.HTTPClient",
"unittest.mock.Mock"
] | [((267, 273), 'unittest.mock.Mock', 'Mock', ([], {}), '()\n', (271, 273), False, 'from unittest.mock import Mock\n'), ((350, 373), 'unittest.mock.Mock', 'Mock', ([], {'return_value': '(True)'}), '(return_value=True)\n', (354, 373), False, 'from unittest.mock import Mock\n'), ((401, 424), 'unittest.mock.Mock', 'Mock', (... |
import asyncio
import re
from base64 import b64encode
# pattern taken from:
# https://mybuddymichael.com/writings/a-regular-expression-for-irc-messages.html
IRC_MSG_PATTERN = "^(?:[:](\S+) )?(\S+)(?: (?!:)(.+?))?(?: [:](.+))?$"
# class adapted from a sample kindly provided by https://github.com/emersonveenstra
class ... | [
"re.split",
"re.search"
] | [((1121, 1156), 're.split', 're.split', (["'\\r\\n'", 'self._read_buffer'], {}), "('\\r\\n', self._read_buffer)\n", (1129, 1156), False, 'import re\n'), ((1941, 1972), 're.search', 're.search', (['IRC_MSG_PATTERN', 'msg'], {}), '(IRC_MSG_PATTERN, msg)\n', (1950, 1972), False, 'import re\n')] |
"""Module containing definitions of arithmetic functions used by perceptrons"""
from abc import ABC, abstractmethod
import numpy as np
from NaiveNeurals.utils import ErrorAlgorithm
class ActivationFunction(ABC):
"""Abstract function for defining functions"""
label = ''
@staticmethod
@abstractmeth... | [
"numpy.power",
"numpy.tanh",
"numpy.exp",
"numpy.sum",
"numpy.array"
] | [((1650, 1662), 'numpy.tanh', 'np.tanh', (['arg'], {}), '(arg)\n', (1657, 1662), True, 'import numpy as np\n'), ((2432, 2445), 'numpy.array', 'np.array', (['arg'], {}), '(arg)\n', (2440, 2445), True, 'import numpy as np\n'), ((3232, 3244), 'numpy.sum', 'np.sum', (['exps'], {}), '(exps)\n', (3238, 3244), True, 'import n... |
# alevel.py Test/demo program for Adafruit ssd1351-based OLED displays
# Adafruit 1.5" 128*128 OLED display: https://www.adafruit.com/product/1431
# Adafruit 1.27" 128*96 display https://www.adafruit.com/product/1673
# The MIT License (MIT)
# Copyright (c) 2018 <NAME>
# Permission is hereby granted, free of charge, ... | [
"writer.CWriter.set_textpos",
"ssd1351.SSD1351.rgb",
"machine.SPI",
"pyb.Accel",
"utime.sleep_ms",
"machine.Pin",
"nanogui.refresh",
"writer.CWriter",
"ssd1351.SSD1351",
"gc.collect",
"nanogui.Dial",
"nanogui.Pointer"
] | [((1810, 1856), 'machine.Pin', 'machine.Pin', (['"""X1"""', 'machine.Pin.OUT_PP'], {'value': '(0)'}), "('X1', machine.Pin.OUT_PP, value=0)\n", (1821, 1856), False, 'import machine\n'), ((1863, 1909), 'machine.Pin', 'machine.Pin', (['"""X2"""', 'machine.Pin.OUT_PP'], {'value': '(1)'}), "('X2', machine.Pin.OUT_PP, value=... |
import logging
from django.db import models
logger = logging.getLogger(__name__)
class PostmarkWebhook(models.Model):
received_at = models.DateTimeField(auto_now_add=True)
body = models.JSONField()
headers = models.JSONField()
note = models.TextField(blank=True)
class Status(models.TextChoices):... | [
"logging.getLogger",
"django.db.models.TextField",
"django.db.models.JSONField",
"django.db.models.DateTimeField",
"django.db.models.CharField"
] | [((54, 81), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (71, 81), False, 'import logging\n'), ((139, 178), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now_add': '(True)'}), '(auto_now_add=True)\n', (159, 178), False, 'from django.db import models\n'), ((190, 2... |
"""GUI elements for use in the sidebar of the main window.
Classes
-------
**InfoWidget** - Sidebar widget for basic file information.
**MetaWidget** - Sidebar widget for basic metadata.
**ConsoleWidget** - Sidebar widget for basic text output.
"""
from PySide2.QtCore import QSize
from PySide2.QtWidgets import QForm... | [
"PySide2.QtWidgets.QTextEdit.__init__",
"PySide2.QtWidgets.QScrollArea.__init__",
"PySide2.QtWidgets.QFrame",
"PySide2.QtWidgets.QFrame.__init__",
"PySide2.QtWidgets.QLineEdit",
"PySide2.QtWidgets.QFormLayout",
"PySide2.QtWidgets.QLabel",
"PySide2.QtWidgets.QVBoxLayout"
] | [((590, 611), 'PySide2.QtWidgets.QFrame.__init__', 'QFrame.__init__', (['self'], {}), '(self)\n', (605, 611), False, 'from PySide2.QtWidgets import QFormLayout, QFrame, QLabel, QLineEdit, QScrollArea, QSizePolicy, QTextEdit, QVBoxLayout\n'), ((748, 761), 'PySide2.QtWidgets.QLineEdit', 'QLineEdit', (['""""""'], {}), "('... |
import string
import spacy
from text_studio.utils.timer import timer
from text_studio.transformer import Transformer
class SpacyTokenizer(Transformer):
def setup(self, stopwords=None, punct=None, lower=True, strip=True):
spacy.cli.download("en_core_web_sm")
self.nlp = spacy.load(
"en_... | [
"spacy.load",
"spacy.cli.download"
] | [((236, 272), 'spacy.cli.download', 'spacy.cli.download', (['"""en_core_web_sm"""'], {}), "('en_core_web_sm')\n", (254, 272), False, 'import spacy\n'), ((292, 357), 'spacy.load', 'spacy.load', (['"""en_core_web_sm"""'], {'disable': "['parser', 'tagger', 'ner']"}), "('en_core_web_sm', disable=['parser', 'tagger', 'ner']... |
from OpenGL import GL
from PIL import Image
from pathlib import Path
import numpy as np
import gc
import os
import ctypes
GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1
VBO = None
VAO = None
TEXTURE = None
SHADER = None
vertexData = [
-1.0, -1.0, 0.0, 0.0, 1.0,
-1.0, 1.0, 0.0, 0.0, 0.0,
1.0, 1.0, 0.0, 1.0,... | [
"OpenGL.GL.glTexParameter",
"OpenGL.GL.glDeleteProgram",
"ctypes.c_void_p",
"OpenGL.GL.glAttachShader",
"OpenGL.GL.glCreateShader",
"OpenGL.GL.glDrawArrays",
"OpenGL.GL.glDeleteBuffers",
"OpenGL.GL.glGenTextures",
"pathlib.Path",
"OpenGL.GL.glBindVertexArray",
"OpenGL.GL.glGenBuffers",
"OpenGL... | [((575, 614), 'numpy.fromstring', 'np.fromstring', (['tex.data'], {'dtype': 'np.uint8'}), '(tex.data, dtype=np.uint8)\n', (588, 614), True, 'import numpy as np\n'), ((1089, 1109), 'OpenGL.GL.glCreateProgram', 'GL.glCreateProgram', ([], {}), '()\n', (1107, 1109), False, 'from OpenGL import GL\n'), ((1122, 1160), 'OpenGL... |
import os
'''
path and dataset parameter
配置文件
'''
DATA_PATH = 'data'
PASCAL_PATH = os.path.join(DATA_PATH, 'pascal_voc')
CACHE_PATH = os.path.join(PASCAL_PATH, 'cache')
OUTPUT_DIR = os.path.join(PASCAL_PATH, 'output') # 存放输出文件的地方,data/pascal_voc/output
WEIGHTS_DIR = os.path.join(PASCAL_PATH, 'weights') # ... | [
"os.path.join"
] | [((85, 122), 'os.path.join', 'os.path.join', (['DATA_PATH', '"""pascal_voc"""'], {}), "(DATA_PATH, 'pascal_voc')\n", (97, 122), False, 'import os\n'), ((136, 170), 'os.path.join', 'os.path.join', (['PASCAL_PATH', '"""cache"""'], {}), "(PASCAL_PATH, 'cache')\n", (148, 170), False, 'import os\n'), ((184, 219), 'os.path.j... |
from os.path import join, splitext
from uuid import uuid4
import datetime
from django.db import models
#from django.utils.encoding import python_2_unicode_compatible
from django.utils import timezone
from django.urls import reverse
from django.contrib.auth.models import User
# Create your models here.
#@... | [
"django.db.models.DateField",
"django.db.models.FloatField",
"django.db.models.TextField",
"django.db.models.ForeignKey",
"django.db.models.IntegerField",
"django.db.models.NullBooleanField",
"os.path.splitext",
"os.path.join",
"django.db.models.FileField",
"django.db.models.BooleanField",
"uuid... | [((435, 479), 'django.db.models.TextField', 'models.TextField', ([], {'max_length': 'None', 'null': '(True)'}), '(max_length=None, null=True)\n', (451, 479), False, 'from django.db import models\n'), ((504, 548), 'django.db.models.TextField', 'models.TextField', ([], {'max_length': 'None', 'null': '(True)'}), '(max_len... |
import binascii
from winsniffer.gui.parsing.default_parser import DefaultParser
def prettify_mac_address(mac_address):
return ':'.join(map(binascii.hexlify, mac_address))
def get_protocol_stack(frame):
protocols = []
while hasattr(frame, 'data'):
protocols.append(frame.__class__.__name__)
... | [
"traceback.format_exc",
"winsniffer.gui.parsing.default_parser.DefaultParser"
] | [((579, 594), 'winsniffer.gui.parsing.default_parser.DefaultParser', 'DefaultParser', ([], {}), '()\n', (592, 594), False, 'from winsniffer.gui.parsing.default_parser import DefaultParser\n'), ((981, 1003), 'traceback.format_exc', 'traceback.format_exc', ([], {}), '()\n', (1001, 1003), False, 'import traceback\n')] |
# Copyright 2014 <NAME> <<EMAIL>>
#
# Licensed 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 ag... | [
"logging.getLogger",
"logging.StreamHandler",
"files.list_files",
"files.RevisionInfo",
"files.page_exists",
"aiohttp.web.Application",
"files.strip_prefix",
"dataclasses_json.dataclass_json",
"jinja2.FileSystemBytecodeCache",
"aiohttp.web.FileResponse",
"os.listdir",
"dataclasses.asdict",
"... | [((1243, 1271), 'appconf.load_conf', 'appconf.load_conf', (['conf_path'], {}), '(conf_path)\n', (1260, 1271), False, 'import appconf\n'), ((1332, 1353), 'logging.getLogger', 'logging.getLogger', (['""""""'], {}), "('')\n", (1349, 1353), False, 'import logging\n'), ((3073, 3092), 'aiohttp.web.RouteTableDef', 'web.RouteT... |
import io
import torchvision.transforms as transforms
from PIL import Image
import onnxruntime as ort
import numpy as np
class_map = {
0: "10 Reais Frente",
1: "10 Reais Verso",
2: "20 Reais Frente",
3: "20 Reais Verso",
4: "2 Reais Frente",
5: "2 Reais Verso",
6: "50 Reais Frente",
... | [
"onnxruntime.InferenceSession",
"numpy.argmax",
"io.BytesIO",
"torchvision.transforms.Normalize",
"torchvision.transforms.Resize",
"torchvision.transforms.ToTensor"
] | [((1044, 1097), 'onnxruntime.InferenceSession', 'ort.InferenceSession', (['"""app/models/banknote_best.onnx"""'], {}), "('app/models/banknote_best.onnx')\n", (1064, 1097), True, 'import onnxruntime as ort\n'), ((669, 692), 'io.BytesIO', 'io.BytesIO', (['image_bytes'], {}), '(image_bytes)\n', (679, 692), False, 'import ... |
import arcpy
arcpy.env.workspace = "c:/temp/Donnees.gdb"
arcpy.env.overwriteOutput = True
listes = arcpy.ListDatasets()
for d in listes:
print(d) | [
"arcpy.ListDatasets"
] | [((100, 120), 'arcpy.ListDatasets', 'arcpy.ListDatasets', ([], {}), '()\n', (118, 120), False, 'import arcpy\n')] |
import random
import socket
import time
class client:
def __init__(self, name, address, socket, color):
self.name = name
self.address = address
self.socket = socket
self.color = color
sep = '\n'
def dice_roll():
return (str(random.randint(1, 6)) + ',' + str(random.randint(1... | [
"time.sleep",
"random.randint",
"random.shuffle",
"socket.socket"
] | [((579, 601), 'random.shuffle', 'random.shuffle', (['Colors'], {}), '(Colors)\n', (593, 601), False, 'import random\n'), ((617, 632), 'socket.socket', 'socket.socket', ([], {}), '()\n', (630, 632), False, 'import socket\n'), ((1652, 1675), 'random.shuffle', 'random.shuffle', (['clients'], {}), '(clients)\n', (1666, 167... |
import os
import numpy as np
from matplotlib import pyplot as plt
class DrawGraphs:
def __init__(self,path_ONLY):
self.path_ONLY=path_ONLY
if not os.path.exists("./MakeGraph/graphs/"):
os.makedirs("./MakeGraph/graphs/")
def DrawEmotion(self,emotiondataarray):
colors = ["#... | [
"os.path.exists",
"matplotlib.pyplot.figure",
"os.makedirs"
] | [((618, 630), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (628, 630), True, 'from matplotlib import pyplot as plt\n'), ((169, 206), 'os.path.exists', 'os.path.exists', (['"""./MakeGraph/graphs/"""'], {}), "('./MakeGraph/graphs/')\n", (183, 206), False, 'import os\n'), ((220, 254), 'os.makedirs', 'os.mak... |
#!/usr/bin/env python
from setuptools import setup
from os.path import abspath, dirname, join
from codecs import open
here = abspath(dirname(__file__))
long_description = ''
with open(join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='flask_logging_decorator',
versi... | [
"os.path.join",
"os.path.dirname",
"setuptools.setup"
] | [((268, 879), 'setuptools.setup', 'setup', ([], {'name': '"""flask_logging_decorator"""', 'version': '"""0.0.5"""', 'description': '"""Simple logging decorator for Flask."""', 'long_description': 'long_description', 'long_description_content_type': '"""text/markdown"""', 'url': '"""https://github.com/sgykfjsm/flask-log... |
from web3 import Web3
import contracts.doe_token_abi as doe_token_abi
def get_main_balance(w3, wallet):
contract_address = "0xf8E9F10c22840b613cdA05A0c5Fdb59A4d6cd7eF"
contract = w3.eth.contract(address=contract_address, abi=doe_token_abi.get_abi())
balanceOf = contract.functions.balanceOf(wallet).call()
... | [
"web3.Web3.fromWei",
"contracts.doe_token_abi.get_abi"
] | [((331, 363), 'web3.Web3.fromWei', 'Web3.fromWei', (['balanceOf', '"""ether"""'], {}), "(balanceOf, 'ether')\n", (343, 363), False, 'from web3 import Web3\n'), ((623, 655), 'web3.Web3.fromWei', 'Web3.fromWei', (['balanceOf', '"""ether"""'], {}), "(balanceOf, 'ether')\n", (635, 655), False, 'from web3 import Web3\n'), (... |
import os, sys
thisdir = os.path.dirname(os.path.abspath(__file__))
libdir = os.path.abspath(os.path.join(thisdir, '../../../'))
if libdir not in sys.path:
sys.path.insert(0, libdir)
| [
"os.path.abspath",
"sys.path.insert",
"os.path.join"
] | [((41, 66), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (56, 66), False, 'import os, sys\n'), ((93, 127), 'os.path.join', 'os.path.join', (['thisdir', '"""../../../"""'], {}), "(thisdir, '../../../')\n", (105, 127), False, 'import os, sys\n'), ((161, 187), 'sys.path.insert', 'sys.path.inse... |
import datetime as dt
import re
from abc import ABC, abstractmethod
from decimal import Decimal
from typing import Any, Callable, Generator, Optional
from uuid import UUID
from aiochclient.exceptions import ChClientError
try:
import ciso8601
datetime_parse = date_parse = ciso8601.parse_datetime
... | [
"datetime.datetime.strptime",
"aiochclient.exceptions.ChClientError",
"re.compile"
] | [((593, 624), 're.compile', 're.compile', (['"""^Tuple\\\\((.*)\\\\)$"""'], {}), "('^Tuple\\\\((.*)\\\\)$')\n", (603, 624), False, 'import re\n'), ((636, 667), 're.compile', 're.compile', (['"""^Array\\\\((.*)\\\\)$"""'], {}), "('^Array\\\\((.*)\\\\)$')\n", (646, 667), False, 'import re\n'), ((682, 716), 're.compile', ... |
from space_api.utils import generate_find, AND
from space_api.transport import Transport
from space_api.response import Response
class Update:
"""
The DB Update Class
::
from space_api import API, AND, OR, COND
api = API("My-Project", "localhost:4124")
db = api.mongo() # For a Mon... | [
"space_api.utils.AND"
] | [((1201, 1217), 'space_api.utils.AND', 'AND', (['*conditions'], {}), '(*conditions)\n', (1204, 1217), False, 'from space_api.utils import generate_find, AND\n')] |
#!/usr/bin/python
import socket
import struct
import math
import time
import Keithley_PS228xS_Sockets_Driver as ps
echoCmd = 1
#===== MAIN PROGRAM STARTS HERE =====
ipAddress1 = "192.168.127.12"
ipAddress2 = "172.16.17.32"
ipAddress3 = "192.168.127.12"
port = 5025
timeout = 20.0
t1 = time.time()
#ps.instrConnect(... | [
"Keithley_PS228xS_Sockets_Driver.PowerSupply_MeasureVoltage",
"socket.socket",
"Keithley_PS228xS_Sockets_Driver.PowerSupply_GetCurrent",
"Keithley_PS228xS_Sockets_Driver.PowerSupply_Connect",
"Keithley_PS228xS_Sockets_Driver.PowerSupply_SetOutputState",
"Keithley_PS228xS_Sockets_Driver.PowerSupply_GetOutp... | [((289, 300), 'time.time', 'time.time', ([], {}), '()\n', (298, 300), False, 'import time\n'), ((362, 411), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)\n', (375, 411), False, 'import socket\n'), ((424, 492), 'Keithley_PS228xS_Sockets_Driver.Pow... |
from django.db.models import Q
from hier.search import SearchResult
from hier.grp_lst import search as hier_search
from hier.params import get_search_mode
from .models import app_name, Task
def search(user, query):
result = SearchResult(query)
search_mode = get_search_mode(query)
lookups = None
if (se... | [
"django.db.models.Q",
"hier.grp_lst.search",
"hier.params.get_search_mode",
"hier.search.SearchResult"
] | [((229, 248), 'hier.search.SearchResult', 'SearchResult', (['query'], {}), '(query)\n', (241, 248), False, 'from hier.search import SearchResult\n'), ((268, 290), 'hier.params.get_search_mode', 'get_search_mode', (['query'], {}), '(query)\n', (283, 290), False, 'from hier.params import get_search_mode\n'), ((727, 761),... |
# Script used to read all help text from Neato.
# Simply connect Neato, update your port
# name ('/dev/neato') and run this script.
# All help markdown is written to a file in the
# same directory called neato_help.md
# Author: <NAME> <EMAIL>
# License: MIT
# Run this script: python api.py
# Note: This script does n... | [
"neato_driver.init",
"neato_driver.Help"
] | [((452, 488), 'neato_driver.init', 'robot.init', (['"""/dev/tty.usbmodem14601"""'], {}), "('/dev/tty.usbmodem14601')\n", (462, 488), True, 'import neato_driver as robot\n'), ((1212, 1224), 'neato_driver.Help', 'robot.Help', ([], {}), '()\n', (1222, 1224), True, 'import neato_driver as robot\n'), ((2535, 2554), 'neato_d... |
import sublime, sublime_plugin
import json
import useutil
class UseImportJumpCommand(sublime_plugin.TextCommand):
def description(self):
return 'Jump to File (Use-Import)'
def is_enabled(self):
return self.is_javascript_view()
def is_visible(self):
return self.is_javascrip... | [
"useutil.get_abs_filepath",
"json.loads",
"useutil.is_javascript_syntax",
"useutil.parse_use_import_name"
] | [((992, 1033), 'useutil.is_javascript_syntax', 'useutil.is_javascript_syntax', (['file_syntax'], {}), '(file_syntax)\n', (1020, 1033), False, 'import useutil\n'), ((2142, 2161), 'json.loads', 'json.loads', (['rawdata'], {}), '(rawdata)\n', (2152, 2161), False, 'import json\n'), ((1201, 1239), 'useutil.parse_use_import_... |
#创建数据库并把txt文件的数据存进数据库
import sqlite3 #导入sqlite3
cx = sqlite3.connect('FaceRes.db') #创建数据库,如果数据库已经存在,则链接数据库;如果数据库不存在,则先创建数据库,再链接该数据库。
cu = cx.cursor() #定义一个游标,以便获得查询对象。
#cu.execute('create table if not exists train4 (id integer primary key,name text)') #创建表
fr = open('log.txt') #打开要读取的txt文件
for line... | [
"sqlite3.connect"
] | [((59, 88), 'sqlite3.connect', 'sqlite3.connect', (['"""FaceRes.db"""'], {}), "('FaceRes.db')\n", (74, 88), False, 'import sqlite3\n')] |
from wsgiref.simple_server import make_server
from nlabel.io.carenero.schema import create_session_factory, \
Text, ResultStatus, Result, Tagger, Vector, Vectors
from nlabel.io.carenero.common import ExternalKey
from nlabel.io.common import ArchiveInfo, text_hash_code
from nlabel.io.carenero.common import json_to_... | [
"falcon.HTTPConflict",
"sqlalchemy.orm.load_only",
"click.option",
"json.dumps",
"sqlalchemy.orm.lazyload",
"nlabel.io.guid.text_guid",
"nlabel.io.carenero.schema.create_session_factory",
"nlabel.io.guid.tagger_guid",
"click.command",
"wsgiref.simple_server.make_server",
"nlabel.io.common.Archiv... | [((7833, 7848), 'click.command', 'click.command', ([], {}), '()\n', (7846, 7848), False, 'import click\n'), ((7905, 7967), 'click.option', 'click.option', (['"""--port"""'], {'default': '(8000)', 'help': '"""Port to serve on."""'}), "('--port', default=8000, help='Port to serve on.')\n", (7917, 7967), False, 'import cl... |
# -*- coding: utf-8 -*-
# * Copyright (c) 2009-2018. Authors: see NOTICE file.
# *
# * Licensed 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... | [
"logging.basicConfig",
"cytomine.Cytomine",
"logging.getLogger",
"cytomine.models.ImageGroupImageInstanceCollection",
"cytomine.models.AnnotationCollection",
"argparse.ArgumentParser",
"cytomine.models.Annotation",
"shapely.geometry.box",
"shapely.geometry.Point",
"cytomine.models.AnnotationLink",... | [((1072, 1093), 'logging.basicConfig', 'logging.basicConfig', ([], {}), '()\n', (1091, 1093), False, 'import logging\n'), ((1103, 1139), 'logging.getLogger', 'logging.getLogger', (['"""cytomine.client"""'], {}), "('cytomine.client')\n", (1120, 1139), False, 'import logging\n'), ((1211, 1264), 'argparse.ArgumentParser',... |
# Copyright 2015 Cray
# Copyright 2016 FUJITSU LIMITED
# Copyright 2017 Hewlett Packard Enterprise Development LP
#
# Licensed 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/lic... | [
"oslo_db.sqlalchemy.engines.create_engine",
"sqlalchemy.delete",
"time.sleep",
"sqlalchemy.MetaData",
"datetime.datetime",
"monasca_api.common.repositories.sqla.models.create_sad_model",
"sqlalchemy.insert",
"fixtures.MonkeyPatch",
"monasca_api.common.repositories.sqla.models.create_mdd_model",
"m... | [((1055, 1081), 'oslo_db.sqlalchemy.engines.create_engine', 'create_engine', (['"""sqlite://"""'], {}), "('sqlite://')\n", (1068, 1081), False, 'from oslo_db.sqlalchemy.engines import create_engine\n'), ((1421, 1495), 'fixtures.MonkeyPatch', 'fixtures.MonkeyPatch', (['"""sqlalchemy.create_engine"""', '_fake_engine_from... |
"""ГОСТ Р 51777-2001 Кабели для установок погружных электронасосов.
Общие технические условия (с Поправкой) """
import math
from scipy.optimize import fsolve
# TODO реализовать нормально ГОСТ, отрефакторить, учитывать разные формы кабеля
# TODO толщины слоев сделать
# TODO рисунок кабеля при инициализации
class ... | [
"scipy.optimize.fsolve",
"math.log"
] | [((6163, 6194), 'scipy.optimize.fsolve', 'fsolve', (['calc_temp_cable', 'delta0'], {}), '(calc_temp_cable, delta0)\n', (6169, 6194), False, 'from scipy.optimize import fsolve\n'), ((3764, 3814), 'math.log', 'math.log', (['(self.D_round_cable_mm / self.Dc_twist_mm)'], {}), '(self.D_round_cable_mm / self.Dc_twist_mm)\n',... |
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
import vplot
import scipy.signal as sig
#plt.rcParams["text.usetex"]=True
#plt.rcParams["text.latex.unicode"]=True
plt.rcParams.update({'font.size':16,'legend.fontsize':15})
import sys
# Check correct number of arguments
if (len(sys.argv) != ... | [
"numpy.abs",
"matplotlib.pyplot.semilogy",
"vplot.make_pretty",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.close",
"matplotlib.pyplot.rcParams.update",
"numpy.array",
"matplotlib.... | [((191, 252), 'matplotlib.pyplot.rcParams.update', 'plt.rcParams.update', (["{'font.size': 16, 'legend.fontsize': 15}"], {}), "({'font.size': 16, 'legend.fontsize': 15})\n", (210, 252), True, 'import matplotlib.pyplot as plt\n'), ((595, 612), 'vplot.GetOutput', 'vplot.GetOutput', ([], {}), '()\n', (610, 612), False, 'i... |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, division
import array
import numpy as np
from numcodecs.compat import buffer_tobytes
def test_buffer_tobytes():
bufs = [
b'adsdasdas',
bytes(20),
np.arange(100),
array.array('l', b'qwertyuiqwertyui'... | [
"numcodecs.compat.buffer_tobytes",
"array.array",
"numpy.arange"
] | [((260, 274), 'numpy.arange', 'np.arange', (['(100)'], {}), '(100)\n', (269, 274), True, 'import numpy as np\n'), ((284, 321), 'array.array', 'array.array', (['"""l"""', "b'qwertyuiqwertyui'"], {}), "('l', b'qwertyuiqwertyui')\n", (295, 321), False, 'import array\n'), ((361, 380), 'numcodecs.compat.buffer_tobytes', 'bu... |
from app.cache import get_from_cache, set_into_cache, delete_from_cache
import logging as _logging
import hashlib, json
logging = _logging.getLogger("matrufsc2_decorators_cacheable")
logging.setLevel(_logging.DEBUG)
__author__ = 'fernando'
CACHE_CACHEABLE_KEY = "cache/functions/%s/%s"
def cacheable(consider_only=No... | [
"logging.getLogger",
"json.dumps",
"app.cache.delete_from_cache",
"app.cache.set_into_cache",
"app.cache.get_from_cache"
] | [((131, 183), 'logging.getLogger', '_logging.getLogger', (['"""matrufsc2_decorators_cacheable"""'], {}), "('matrufsc2_decorators_cacheable')\n", (149, 183), True, 'import logging as _logging\n'), ((570, 605), 'json.dumps', 'json.dumps', (['filters'], {'sort_keys': '(True)'}), '(filters, sort_keys=True)\n', (580, 605), ... |
import warnings
from dataclasses import dataclass
from typing import List, Optional
import torch
from falkon.utils.stream_utils import sync_current_stream
from falkon.mmv_ops.utils import _get_gpu_info, create_output_mat, _start_wait_processes
from falkon.options import FalkonOptions, BaseOptions
from falkon.utils i... | [
"torch.cuda.device",
"falkon.kernels.tiling_red.TilingGenred",
"falkon.utils.helpers.calc_gpu_block_sizes",
"dataclasses.dataclass",
"torch.empty_like",
"falkon.mmv_ops.utils._get_gpu_info",
"pykeops.torch.Genred",
"falkon.utils.helpers.sizeof_dtype",
"falkon.mmv_ops.utils._start_wait_processes",
... | [((442, 464), 'dataclasses.dataclass', 'dataclass', ([], {'frozen': '(True)'}), '(frozen=True)\n', (451, 464), False, 'from dataclasses import dataclass\n'), ((4159, 4192), 'torch.device', 'torch.device', (['f"""cuda:{device_id}"""'], {}), "(f'cuda:{device_id}')\n", (4171, 4192), False, 'import torch\n'), ((7039, 7179)... |
'''
node.py
ancilla
Created by <NAME> (<EMAIL>) on 01/14/20
Copyright 2019 FrenzyLabs, LLC.
'''
import time
from .api import Api
from ..events import Event
from ...data.models import Service, Printer, Camera, ServiceAttachment, CameraRecording, Node
from ..response import AncillaError, AncillaResponse
import re... | [
"os.path.getsize",
"math.ceil",
"re.match"
] | [((7819, 7844), 'math.ceil', 'math.ceil', (['(cnt / per_page)'], {}), '(cnt / per_page)\n', (7828, 7844), False, 'import math\n'), ((12243, 12267), 'os.path.getsize', 'os.path.getsize', (['fp.name'], {}), '(fp.name)\n', (12258, 12267), False, 'import os\n'), ((12743, 12798), 're.match', 're.match', (['"""bytes=(?P<star... |
import codecs
import sys
RAW_DATA = "../data/ptb/ptb.train.txt"
VOCAB = "data/ptb.vocab"
OUTPUT_DATA = "data/ptb.train"
# 读取词汇表并建立映射
with codecs.open(VOCAB, "r", "utf-8") as f_vocab:
vocab = [w.strip() for w in f_vocab.readlines()]
word_to_id = {k: v for (k, v) in zip(vocab, range(len(vocab)))}
# 如果出现了被删除的低频词,替换... | [
"codecs.open"
] | [((428, 463), 'codecs.open', 'codecs.open', (['RAW_DATA', '"""r"""', '"""utf-8"""'], {}), "(RAW_DATA, 'r', 'utf-8')\n", (439, 463), False, 'import codecs\n'), ((471, 509), 'codecs.open', 'codecs.open', (['OUTPUT_DATA', '"""w"""', '"""utf-8"""'], {}), "(OUTPUT_DATA, 'w', 'utf-8')\n", (482, 509), False, 'import codecs\n'... |
# -*- coding: utf-8 -*-
from flask import Blueprint, render_template
bp_error = Blueprint("bp_error", __name__, url_prefix="/error")
# Specific Error Handlers
@bp_error.route("/default")
def default():
return render_template(
"error/error_base.html",
error_code=500,
header_n... | [
"flask.render_template",
"flask.Blueprint"
] | [((86, 138), 'flask.Blueprint', 'Blueprint', (['"""bp_error"""', '__name__'], {'url_prefix': '"""/error"""'}), "('bp_error', __name__, url_prefix='/error')\n", (95, 138), False, 'from flask import Blueprint, render_template\n'), ((227, 366), 'flask.render_template', 'render_template', (['"""error/error_base.html"""'], ... |
import time
import datetime
from waveshare_epd import epd7in5_V2
from PIL import Image, ImageDraw, ImageFont
import calendar
import random
import os
picdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'pic')
fontdir = os.path.join(os.path.dirname(os.path.dirname(os.path.rea... | [
"time.strptime",
"datetime.time",
"PIL.Image.new",
"time.strftime",
"os.path.join",
"time.sleep",
"os.path.realpath",
"datetime.datetime.now",
"PIL.ImageDraw.Draw",
"waveshare_epd.epd7in5_V2.EPD",
"calendar.TextCalendar",
"random.randint"
] | [((356, 372), 'waveshare_epd.epd7in5_V2.EPD', 'epd7in5_V2.EPD', ([], {}), '()\n', (370, 372), False, 'from waveshare_epd import epd7in5_V2\n'), ((1147, 1178), 'datetime.time', 'datetime.time', (['start_hour', '(0)', '(0)'], {}), '(start_hour, 0, 0)\n', (1160, 1178), False, 'import datetime\n'), ((1192, 1221), 'datetime... |
import logging
import sys
import classes.iDb as db
# Set Logging Level
logging.basicConfig(level=logging.INFO)
class Friend:
def __init__(self, User, Friend):
self.user_id = User.user_id
self.friend_id = Friend.user_id
pass
def addFriend(self):
pass
def removeFriend(self)... | [
"logging.basicConfig",
"classes.iDb.dbQuery.callDbFetch",
"logging.debug",
"sys.exc_info",
"classes.iDb.dbQuery"
] | [((72, 111), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO'}), '(level=logging.INFO)\n', (91, 111), False, 'import logging\n'), ((708, 723), 'classes.iDb.dbQuery', 'db.dbQuery', (['sql'], {}), '(sql)\n', (718, 723), True, 'import classes.iDb as db\n'), ((746, 787), 'classes.iDb.dbQuery.call... |
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from .views import PostListView, PostDetailView
urlpatterns = patterns('',
# URL pattern for the PostListView # noqa
url(
regex=r'^$',
view=PostListVi... | [
"django.conf.urls.url"
] | [((1340, 1418), 'django.conf.urls.url', 'url', ([], {'regex': '"""^add/comment/$"""', 'view': '"""post.views.add_comment"""', 'name': '"""add_comment"""'}), "(regex='^add/comment/$', view='post.views.add_comment', name='add_comment')\n", (1343, 1418), False, 'from django.conf.urls import patterns, url\n')] |
from setuptools import find_packages, setup
setup(
name='django-studentsdb-app',
version='1.0',
author=u'<NAME>',
author_email='<EMAIL>',
packages=find_packages(),
license='BSD licence, see LICENCE.txt',
description='Students DB application',
long_description=open('README.txt').read(),
... | [
"setuptools.find_packages"
] | [((168, 183), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (181, 183), False, 'from setuptools import find_packages, setup\n')] |
#!/usr/bin/env python
import pathlib
import matplotlib.pyplot as plt
import torch
import pyro
from state_space import state_space_model
SEED = 123
torch.manual_seed(SEED)
pyro.set_rng_seed(SEED)
def main():
figdir = pathlib.Path('./figures')
figdir.mkdir(exist_ok=True)
# demo predictive capacity
... | [
"torch.manual_seed",
"matplotlib.pyplot.savefig",
"pyro.clear_param_store",
"pathlib.Path",
"pyro.infer.autoguide.AutoDiagonalNormal",
"pyro.infer.Trace_ELBO",
"pyro.optim.Adam",
"pyro.set_rng_seed",
"pyro.infer.Predictive",
"state_space.state_space_model",
"torch.empty",
"matplotlib.pyplot.su... | [((152, 175), 'torch.manual_seed', 'torch.manual_seed', (['SEED'], {}), '(SEED)\n', (169, 175), False, 'import torch\n'), ((176, 199), 'pyro.set_rng_seed', 'pyro.set_rng_seed', (['SEED'], {}), '(SEED)\n', (193, 199), False, 'import pyro\n'), ((227, 252), 'pathlib.Path', 'pathlib.Path', (['"""./figures"""'], {}), "('./f... |
#!/usr/bin/env python3
# import additional code to complete our task
import shutil
import os
# move into the working directory
os.chdir("/home/student/mycode/")
# copy the fileA to fileB
shutil.copy("5g_research/sdn_network.txt", "5g_research/sdn_network.txt.copy")
# copy the entire directoryA to directoryB
shutil.... | [
"os.chdir",
"shutil.copytree",
"shutil.copy"
] | [((129, 162), 'os.chdir', 'os.chdir', (['"""/home/student/mycode/"""'], {}), "('/home/student/mycode/')\n", (137, 162), False, 'import os\n'), ((190, 268), 'shutil.copy', 'shutil.copy', (['"""5g_research/sdn_network.txt"""', '"""5g_research/sdn_network.txt.copy"""'], {}), "('5g_research/sdn_network.txt', '5g_research/s... |
from typing import Any, List, Mapping, Sequence
import jsonschema
from dataclasses import dataclass, field
from sqlalchemy.orm import scoped_session
from vardb.datamodel.jsonschemas.load_schema import load_schema
from vardb.datamodel import annotation
@dataclass
class ConverterConfig:
elements: Sequence[Mapping[s... | [
"vardb.datamodel.annotation.AnnotationConfig",
"dataclasses.dataclass",
"vardb.datamodel.annotation.AnnotationConfig.id.desc",
"vardb.datamodel.jsonschemas.load_schema.load_schema",
"jsonschema.validate",
"dataclasses.field"
] | [((333, 354), 'dataclasses.dataclass', 'dataclass', ([], {'init': '(False)'}), '(init=False)\n', (342, 354), False, 'from dataclasses import dataclass, field\n'), ((614, 635), 'dataclasses.dataclass', 'dataclass', ([], {'init': '(False)'}), '(init=False)\n', (623, 635), False, 'from dataclasses import dataclass, field\... |
#!/usr/bin/env python
# coding: utf-8
import pandas as pd
def get_age(name):
df = pd.read_excel("test.xlsx", sheet_name="Sheet1", headers=True)
print("*"*20)
print(df)
print("*"*20)
rows, cols = df[df['Name']==name].shape
print(rows, cols, "^^^")
if rows==1:
age = df[df['Name... | [
"pandas.read_excel"
] | [((89, 150), 'pandas.read_excel', 'pd.read_excel', (['"""test.xlsx"""'], {'sheet_name': '"""Sheet1"""', 'headers': '(True)'}), "('test.xlsx', sheet_name='Sheet1', headers=True)\n", (102, 150), True, 'import pandas as pd\n'), ((429, 490), 'pandas.read_excel', 'pd.read_excel', (['"""test.xlsx"""'], {'sheet_name': '"""She... |
import tensorflow as tf
import numpy as np
import cv2
import os
import rospy
from timeit import default_timer as timer
from styx_msgs.msg import TrafficLight
CLASS_TRAFFIC_LIGHT = 10
MODEL_DIR = 'light_classification/models/'
IMG_DIR = 'light_classification/img/'
DEBUG_DIR = 'light_classification/result/'
class TL... | [
"cv2.rectangle",
"numpy.array",
"os.path.exists",
"tensorflow.Graph",
"tensorflow.Session",
"numpy.asarray",
"tensorflow.GraphDef",
"tensorflow.ConfigProto",
"numpy.squeeze",
"cv2.cvtColor",
"tensorflow.import_graph_def",
"cv2.imread",
"rospy.loginfo",
"cv2.imwrite",
"numpy.copy",
"ten... | [((1463, 1501), 'cv2.imread', 'cv2.imread', (["(IMG_DIR + 'image_test.jpg')"], {}), "(IMG_DIR + 'image_test.jpg')\n", (1473, 1501), False, 'import cv2\n'), ((1908, 1959), 'cv2.imwrite', 'cv2.imwrite', (["(IMG_DIR + 'pred_image.png')", 'pred_image'], {}), "(IMG_DIR + 'pred_image.png', pred_image)\n", (1919, 1959), False... |
from api import app
if __name__ == '__main__':
with open('urls.json', 'w') as fj:
fj.write('')
app.run() | [
"api.app.run"
] | [((112, 121), 'api.app.run', 'app.run', ([], {}), '()\n', (119, 121), False, 'from api import app\n')] |
# -*- coding: utf-8 -*-
"""
@author: <NAME>, <NAME>, <NAME>, <NAME>
"""
from Processor.Processor import Processor
from WebScrapper.Scrapper import Scrapper
import json
import os
print("The Data is being scrapped please wait!!!!!!!!!!")
start=0
flag = 1
scrap = Scrapper()
p = Processor()
print("Creati... | [
"os.path.exists",
"WebScrapper.Scrapper.Scrapper",
"Visualization.Featuresandvisual.Visualization",
"Processor.Processor.Processor",
"os.remove"
] | [((278, 288), 'WebScrapper.Scrapper.Scrapper', 'Scrapper', ([], {}), '()\n', (286, 288), False, 'from WebScrapper.Scrapper import Scrapper\n'), ((294, 305), 'Processor.Processor.Processor', 'Processor', ([], {}), '()\n', (303, 305), False, 'from Processor.Processor import Processor\n'), ((481, 519), 'os.path.exists', '... |
# ========================= eCAL LICENSE =================================
#
# Copyright (C) 2016 - 2019 Continental Corporation
#
# Licensed 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... | [
"ecal.core.core.finalize",
"ecal.core.core.initialize",
"time.sleep",
"ecal.core.core.getversion",
"ecal.core.core.getdate",
"ecal.core.core.ok",
"ecal.core.service.Client",
"ecal.core.core.set_process_state"
] | [((1008, 1067), 'ecal.core.core.initialize', 'ecal_core.initialize', (['sys.argv', '"""py_minimal_service_client"""'], {}), "(sys.argv, 'py_minimal_service_client')\n", (1028, 1067), True, 'import ecal.core.core as ecal_core\n'), ((1095, 1143), 'ecal.core.core.set_process_state', 'ecal_core.set_process_state', (['(1)',... |
"""Created on Sat Oct 01 2015 16:24.
@author: <NAME>
"""
import numpy as np
def coe2mee(COE, mu=1.):
"""
Convert classical orbital elements to modified equinoctial elements.
Parameters
----------
COE : ndarray
mx6 array of elements ordered as [p e i W w nu].
mu : float
Standa... | [
"numpy.tan",
"numpy.cos",
"numpy.concatenate",
"numpy.sin",
"numpy.mod"
] | [((852, 881), 'numpy.mod', 'np.mod', (['(W + w + nu)', '(2 * np.pi)'], {}), '(W + w + nu, 2 * np.pi)\n', (858, 881), True, 'import numpy as np\n'), ((888, 925), 'numpy.concatenate', 'np.concatenate', (['(p, f, g, h, k, L)', '(1)'], {}), '((p, f, g, h, k, L), 1)\n', (902, 925), True, 'import numpy as np\n'), ((669, 682)... |
#
# Copyright (c) 2015 Red Hat
# Licensed under The MIT License (MIT)
# http://opensource.org/licenses/MIT
#
"""
Use the provided metadata generator if you wish to support OPTIONS requests on
list url of resources that support bulk operations. The only difference from
the generator provided by REST Framework is that it... | [
"rest_framework.request.clone_request"
] | [((1516, 1546), 'rest_framework.request.clone_request', 'clone_request', (['request', 'method'], {}), '(request, method)\n', (1529, 1546), False, 'from rest_framework.request import clone_request\n')] |
from django import template
register = template.Library()
@register.inclusion_tag('templatetags/form_field.html')
def show_form_field(field, icon=False):
return {'field': field, 'icon': icon}
@register.inclusion_tag('templatetags/learning_resource.html')
def show_resource(resource):
return {'resource': resou... | [
"django.template.Library"
] | [((40, 58), 'django.template.Library', 'template.Library', ([], {}), '()\n', (56, 58), False, 'from django import template\n')] |
import random
from music_theory.note import Note
class Mode:
def __init__(self):
self._modes = [
# Major oriented
"Ionian",
"Dorian",
"Phrygian",
"Lydian",
"Mixo",
"Aeolian",
"Locrian",
# Melodic ... | [
"music_theory.note.Note"
] | [((996, 1002), 'music_theory.note.Note', 'Note', ([], {}), '()\n', (1000, 1002), False, 'from music_theory.note import Note\n'), ((641, 647), 'music_theory.note.Note', 'Note', ([], {}), '()\n', (645, 647), False, 'from music_theory.note import Note\n')] |
import torch
from src import config, models
from src.models import WGANGPGModel, WGANGPDModel
from src.datasets import PositiveDataset
from ._base import Base
class WGANGP(Base):
def __init__(self):
super().__init__(WGANGPGModel(), WGANGPDModel())
def _fit(self):
d_optimizer = torch.optim.Ad... | [
"src.datasets.PositiveDataset",
"src.models.WGANGPGModel",
"src.models.WGANGPDModel"
] | [((231, 245), 'src.models.WGANGPGModel', 'WGANGPGModel', ([], {}), '()\n', (243, 245), False, 'from src.models import WGANGPGModel, WGANGPDModel\n'), ((247, 261), 'src.models.WGANGPDModel', 'WGANGPDModel', ([], {}), '()\n', (259, 261), False, 'from src.models import WGANGPGModel, WGANGPDModel\n'), ((605, 622), 'src.dat... |
import pickle
from sys import intern
from numpy import uint32
import numpy as np
import zarr
from napari_plugin_engine import napari_hook_implementation
from qtpy.QtWidgets import QWidget, QHBoxLayout, QPushButton
from magicgui import magic_factory
import pathlib
import napari
def viterbrain_reader(path: str) -> lis... | [
"numpy.mean",
"pathlib.Path",
"pickle.load",
"zarr.open",
"magicgui.magic_factory"
] | [((965, 1060), 'magicgui.magic_factory', 'magic_factory', ([], {'call_button': '"""Trace"""', 'start_comp': "{'max': 2 ** 20}", 'end_comp': "{'max': 2 ** 20}"}), "(call_button='Trace', start_comp={'max': 2 ** 20}, end_comp={\n 'max': 2 ** 20})\n", (978, 1060), False, 'from magicgui import magic_factory\n'), ((419, 4... |
#!/usr/bin/env python
# encoding: utf8
#
# Copyright © <NAME> <burak at arskom dot com dot tr>,
# Arskom Ltd. http://www.arskom.com.tr
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#... | [
"logging.basicConfig",
"twisted.python.log.startLoggingWithObserver",
"twisted.internet.task.deferLater",
"logging.getLogger",
"spyne.server.twisted.TwistedWebResource",
"logging.debug",
"spyne.rpc",
"twisted.python.log.PythonLoggingObserver",
"time.sleep",
"spyne.Iterable.Push",
"twisted.intern... | [((3037, 3067), 'spyne.rpc', 'rpc', (['Integer'], {'_returns': 'Integer'}), '(Integer, _returns=Integer)\n', (3040, 3067), False, 'from spyne import Unicode, Integer, Double, ByteArray, Iterable, rpc, ServiceBase, Application\n'), ((3267, 3297), 'spyne.rpc', 'rpc', (['Integer'], {'_returns': 'Unicode'}), '(Integer, _re... |
import pandas as pd
import re
import numpy as np
import os
import sys
from collections import OrderedDict, defaultdict
import matplotlib as mpl
import matplotlib.pyplot as plt
import seaborn as sns
# from theano import *
# load state data
az_year = pd.read_csv("data/csv/price_expenditures/sector/az/price/teacd.csv", e... | [
"pandas.read_csv"
] | [((367, 490), 'pandas.read_csv', 'pd.read_csv', (['"""data/csv/price_expenditures/sector/az/price/teacd.csv"""'], {'engine': '"""c"""', 'low_memory': '(True)', 'date_parser': 'az_year'}), "('data/csv/price_expenditures/sector/az/price/teacd.csv', engine\n ='c', low_memory=True, date_parser=az_year)\n", (378, 490), T... |
#!/usr/local/CyberCP/bin/python
import os
import os.path
import sys
import django
sys.path.append('/usr/local/CyberCP')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "CyberCP.settings")
django.setup()
import json
from plogical.acl import ACLManager
import plogical.CyberCPLogFileWriter as logging
from plogical.virtual... | [
"plogical.csf.CSF.fetchCSFSettings",
"firewall.models.FirewallRules",
"time.sleep",
"plogical.processUtilities.ProcessUtilities.outputExecutioner",
"sys.path.append",
"os.remove",
"os.environ.setdefault",
"django.shortcuts.render",
"plogical.processUtilities.ProcessUtilities.executioner",
"os.path... | [((82, 119), 'sys.path.append', 'sys.path.append', (['"""/usr/local/CyberCP"""'], {}), "('/usr/local/CyberCP')\n", (97, 119), False, 'import sys\n'), ((120, 187), 'os.environ.setdefault', 'os.environ.setdefault', (['"""DJANGO_SETTINGS_MODULE"""', '"""CyberCP.settings"""'], {}), "('DJANGO_SETTINGS_MODULE', 'CyberCP.sett... |
import re
import markdown
from django.contrib import messages
from django.db.models import Q
from django.shortcuts import render, get_object_or_404, redirect
from django.utils.text import slugify
from django.views.generic import ListView, DetailView
from markdown.extensions.toc import TocExtension
from pure_pagination.... | [
"django.shortcuts.render",
"django.shortcuts.redirect",
"markdown.extensions.toc.TocExtension",
"django.contrib.messages.add_message",
"django.db.models.Q",
"re.search"
] | [((2914, 2974), 'django.shortcuts.render', 'render', (['request', '"""blog/index.html"""', "{'post_list': post_list}"], {}), "(request, 'blog/index.html', {'post_list': post_list})\n", (2920, 2974), False, 'from django.shortcuts import render, get_object_or_404, redirect\n'), ((1652, 1723), 're.search', 're.search', ([... |
import os
KEY = os.environ['KEY']
from urllib.parse import parse_qs, urlparse
import requests
def getid(url):
if url.startswith("http"):
try:
url_data = urlparse(url)
query = parse_qs(url_data.query)
return query["v"][0]
except KeyError:
return ur... | [
"urllib.parse.parse_qs",
"urllib.parse.urlparse",
"requests.get"
] | [((565, 597), 'requests.get', 'requests.get', (['url'], {'params': 'params'}), '(url, params=params)\n', (577, 597), False, 'import requests\n'), ((870, 902), 'requests.get', 'requests.get', (['url'], {'params': 'params'}), '(url, params=params)\n', (882, 902), False, 'import requests\n'), ((182, 195), 'urllib.parse.ur... |
# pylint: disable=redefined-outer-name
# pylint: disable=unused-argument
# pylint: disable=unused-import
import json
import subprocess
import sys
from pathlib import Path
from typing import Callable, Dict
import pytest
import models_library
pytest_plugins = [
"pytest_simcore.repository_paths",
"pytest_simcor... | [
"pytest.fixture",
"json.dumps",
"subprocess.run",
"pathlib.Path"
] | [((337, 368), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""session"""'}), "(scope='session')\n", (351, 368), False, 'import pytest\n'), ((490, 521), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""session"""'}), "(scope='session')\n", (504, 521), False, 'import pytest\n'), ((698, 729), 'pytest.fixture'... |
# Copyright (c) 2017, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only
# under the conditions described in the aforementioned license. The license
# is also available online at http://www.ent... | [
"cellular_automata.rules.forest.BurnGrovesRule",
"matplotlib.pyplot.plot",
"numpy.log",
"numpy.logspace",
"joblib.Parallel",
"matplotlib.pyplot.subplot",
"cellular_automata.rules.forest.MoldRule",
"numpy.linspace",
"numpy.random.seed",
"cellular_automata.automata_recorder.AutomataRecorder",
"job... | [((2204, 2224), 'numpy.random.seed', 'np.random.seed', (['None'], {}), '(None)\n', (2218, 2224), True, 'import numpy as np\n'), ((2254, 2319), 'cellular_automata.rules.change_state_rule.ChangeStateRule', 'ChangeStateRule', ([], {'from_state': 'EMPTY', 'to_state': 'TREE', 'p_change': '(0.0025)'}), '(from_state=EMPTY, to... |