code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2016, Anaconda, Inc. All rights reserved. # # Licensed under the terms of the BSD 3-Clause License. # The full license is in the file LICENSE.txt, distributed with this software. # -------------------...
[ "os.rename", "uuid.uuid4", "os.remove" ]
[((660, 680), 'os.rename', 'os.rename', (['src', 'dest'], {}), '(src, dest)\n', (669, 680), False, 'import os\n'), ((1034, 1057), 'os.rename', 'os.rename', (['dest', 'backup'], {}), '(dest, backup)\n', (1043, 1057), False, 'import os\n'), ((1091, 1111), 'os.rename', 'os.rename', (['src', 'dest'], {}), '(src, dest)\n', ...
import socket HOST = '127.0.0.1' PORT = 65432 def menu(): print("\n---- Calculadora Estatística Descritiva----") print("---- Escolha uma opção: ") print("---- 1) Média ") print("---- 2) Mediana ") print("---- 3) Moda") print("---- 4) Variância") pri...
[ "socket.socket" ]
[((510, 559), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)\n', (523, 559), False, 'import socket\n')]
# -*- coding: utf-8 -*- """IdentityServicesEngineAPI hotspot_portal API fixtures and tests. Copyright (c) 2021 Cisco and/or its affiliates. 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 Software without...
[ "pytest.raises", "pytest.mark.skipif" ]
[((1426, 1527), 'pytest.mark.skipif', 'pytest.mark.skipif', (["(IDENTITY_SERVICES_ENGINE_VERSION != '3.1.0')"], {'reason': '"""version does not match"""'}), "(IDENTITY_SERVICES_ENGINE_VERSION != '3.1.0', reason=\n 'version does not match')\n", (1444, 1527), False, 'import pytest\n'), ((2298, 2352), 'pytest.raises', ...
def load_data(logfile=None): import datetime import time import numpy as np import csv from datetime import datetime from keras.preprocessing.sequence import pad_sequences vocabulary = list() csvfile = open(logfile, 'r') if "receipt" in logfile: # For Receipt Dataset l...
[ "csv.reader", "numpy.log", "keras.preprocessing.sequence.pad_sequences", "datetime.datetime.strptime", "numpy.mean", "numpy.array", "numpy.unique" ]
[((2377, 2436), 'numpy.mean', 'np.mean', (['[item for sublist in timeseqs for item in sublist]'], {}), '([item for sublist in timeseqs for item in sublist])\n', (2384, 2436), True, 'import numpy as np\n'), ((4099, 4121), 'numpy.array', 'np.array', (['prefix_sizes'], {}), '(prefix_sizes)\n', (4107, 4121), True, 'import ...
# Made by Mr. Have fun! # Version 0.3 by H1GHL4ND3R import sys from ru.catssoftware.gameserver.model.quest import State from ru.catssoftware.gameserver.model.quest import QuestState from ru.catssoftware.gameserver.model.quest.jython import QuestJython as JQuest qn = "217_TestimonyOfTrust" MARK_OF_TRUST_ID = 2734 LETT...
[ "ru.catssoftware.gameserver.model.quest.jython.QuestJython.__init__" ]
[((2004, 2042), 'ru.catssoftware.gameserver.model.quest.jython.QuestJython.__init__', 'JQuest.__init__', (['self', 'id', 'name', 'descr'], {}), '(self, id, name, descr)\n', (2019, 2042), True, 'from ru.catssoftware.gameserver.model.quest.jython import QuestJython as JQuest\n')]
# Copyright 2006 <NAME> and contributors # Copyright (C) 2009 <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 re...
[ "pyjamas.DOM.createImg", "pyjamas.DOM.eventGetType", "MouseListener.MouseHandler.__init__", "pyjamas.Factory.registerClass", "pyjamas.DOM.setElemAttribute", "ClickListener.ClickHandler.__init__", "Widget.Widget.__init__", "Widget.Widget.onBrowserEvent" ]
[((2237, 2285), 'pyjamas.Factory.registerClass', 'Factory.registerClass', (['"""pyjamas.ui.Image"""', 'Image'], {}), "('pyjamas.ui.Image', Image)\n", (2258, 2285), False, 'from pyjamas import Factory\n'), ((1212, 1243), 'Widget.Widget.__init__', 'Widget.__init__', (['self'], {}), '(self, **kwargs)\n', (1227, 1243), Fal...
#!/usr/bin/env python import logging import os import sys from argparse import ArgumentParser from pprint import pformat import yaml from future.utils import lfilter, lmap from foxylib.tools.collections.collections_tool import lchain, DictTool from foxylib.tools.env.env_tool import EnvTool from foxylib.tools.env.yam...
[ "foxylib.tools.collections.collections_tool.DictTool.filter_keys", "yaml.load", "foxylib.tools.log.foxylib_logger.FoxylibLogger.attach_stderr2loggers", "foxylib.tools.log.foxylib_logger.FoxylibLogger.func_level2logger", "foxylib.tools.env.yaml.filepath2envvars.Filepath2Envvar.args2value_wrapper", "foxylib...
[((919, 971), 'foxylib.tools.log.foxylib_logger.FoxylibLogger.func_level2logger', 'FoxylibLogger.func_level2logger', (['main', 'logging.DEBUG'], {}), '(main, logging.DEBUG)\n', (950, 971), False, 'from foxylib.tools.log.foxylib_logger import FoxylibLogger\n'), ((1297, 1345), 'foxylib.tools.env.yaml.filepath2envvars.Fil...
# Copyright 2019 The TensorFlow Authors. 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 required by applica...
[ "benchmark.BenchmarkRunner", "mock.Mock" ]
[((994, 1005), 'mock.Mock', 'mock.Mock', ([], {}), '()\n', (1003, 1005), False, 'import mock\n'), ((1145, 1178), 'benchmark.BenchmarkRunner', 'benchmark.BenchmarkRunner', (['config'], {}), '(config)\n', (1170, 1178), False, 'import benchmark\n'), ((1207, 1218), 'mock.Mock', 'mock.Mock', ([], {}), '()\n', (1216, 1218), ...
from abc import ABCMeta import json import jsonpickle try: from .numpy_handlers import NPReadable from .numpy_handlers import register_numpy_handlers np_readable = NPReadable() register_numpy_handlers() except: np_readable = None class JSONer(object): """The abstract class **JSONer** adds to...
[ "jsonpickle.decode", "json.dumps", "jsonpickle.encode" ]
[((1934, 1982), 'jsonpickle.encode', 'jsonpickle.encode', (['self'], {'unpicklable': 'unpicklable'}), '(self, unpicklable=unpicklable)\n', (1951, 1982), False, 'import jsonpickle\n'), ((3578, 3606), 'jsonpickle.decode', 'jsonpickle.decode', (['json_data'], {}), '(json_data)\n', (3595, 3606), False, 'import jsonpickle\n...
from rest_framework.serializers import ModelSerializer,HyperlinkedIdentityField,SerializerMethodField from posts.models import Post from comments.api.serializers import CommentSerializer from comments.models import Comment from accounts.api.serializers import UserDetailSerializer class PostCreateUpdateSerializer(ModelS...
[ "rest_framework.serializers.HyperlinkedIdentityField", "rest_framework.serializers.SerializerMethodField", "comments.models.Comment.objects.filter_by_instance", "comments.api.serializers.CommentSerializer", "accounts.api.serializers.UserDetailSerializer" ]
[((436, 511), 'rest_framework.serializers.HyperlinkedIdentityField', 'HyperlinkedIdentityField', ([], {'view_name': '"""posts-api:detail"""', 'lookup_field': '"""slug"""'}), "(view_name='posts-api:detail', lookup_field='slug')\n", (460, 511), False, 'from rest_framework.serializers import ModelSerializer, HyperlinkedId...
import inspect import imp import os import sys import types import time import importlib import pico _mtimes = {} def module_dict(module): module_dict = {} pico_exports = getattr(module, 'pico_exports', None) members = inspect.getmembers(module) def function_filter(x): (name, f) = x ...
[ "inspect.ismethod", "importlib.import_module", "inspect.isclass", "time.ctime", "sys.path.insert", "inspect.getargspec", "sys.path.__contains__", "imp.new_module", "inspect.isfunction", "inspect.getmembers" ]
[((235, 261), 'inspect.getmembers', 'inspect.getmembers', (['module'], {}), '(module)\n', (253, 261), False, 'import inspect\n'), ((2083, 2104), 'inspect.getargspec', 'inspect.getargspec', (['f'], {}), '(f)\n', (2101, 2104), False, 'import inspect\n'), ((2795, 2831), 'importlib.import_module', 'importlib.import_module'...
from django.shortcuts import render from django.http import HttpResponse from django.shortcuts import get_object_or_404 from .models import Movie def home(request): searchTerm = request.GET.get('searchMovie') if searchTerm: movies = Movie.objects.filter(title__icontains=searchTerm) else: mo...
[ "django.shortcuts.render", "django.shortcuts.get_object_or_404", "django.http.HttpResponse" ]
[((358, 432), 'django.shortcuts.render', 'render', (['request', '"""home.html"""', "{'searchTerm': searchTerm, 'movies': movies}"], {}), "(request, 'home.html', {'searchTerm': searchTerm, 'movies': movies})\n", (364, 432), False, 'from django.shortcuts import render\n'), ((464, 510), 'django.http.HttpResponse', 'HttpRe...
import ast import _peg_parser as peg_parser import unittest from typing import Any, Union, Iterable, Tuple from textwrap import dedent from test import support TEST_CASES = [ ('annotated_assignment', 'x: int = 42'), ('annotated_assignment_with_tuple', 'x: tuple = 1, 2'), ('annotated_assignment_with_parens...
[ "textwrap.dedent", "ast.dump", "_peg_parser.parse_string" ]
[((19758, 19772), 'textwrap.dedent', 'dedent', (['source'], {}), '(source)\n', (19764, 19772), False, 'from textwrap import dedent\n'), ((20857, 20888), '_peg_parser.parse_string', 'peg_parser.parse_string', (['source'], {}), '(source)\n', (20880, 20888), True, 'import _peg_parser as peg_parser\n'), ((20916, 20963), '_...
""" Saves preprocessed text so external scorers can operate on files. BLEU and METEOR are flexible about where things are located, but ROUGE is more strict, so we follow rouge conventions. """ # builtins import code import shutil import os import tempfile from typing import Optional # local from textmetrics.common i...
[ "shutil.rmtree", "tempfile.mkdtemp", "os.path.join" ]
[((1574, 1592), 'tempfile.mkdtemp', 'tempfile.mkdtemp', ([], {}), '()\n', (1590, 1592), False, 'import tempfile\n'), ((2246, 2281), 'shutil.rmtree', 'shutil.rmtree', (["references['tmpdir']"], {}), "(references['tmpdir'])\n", (2259, 2281), False, 'import shutil\n'), ((1264, 1282), 'tempfile.mkdtemp', 'tempfile.mkdtemp'...
from ckan import plugins from ckanext.ytp_tasks import logic from .cli import get_commands class YtpTasksPlugin(plugins.SingletonPlugin): plugins.implements(plugins.IConfigurable) plugins.implements(plugins.IActions) plugins.implements(plugins.IAuthFunctions) plugins.implements(plugins.IClick) d...
[ "ckan.plugins.implements" ]
[((145, 186), 'ckan.plugins.implements', 'plugins.implements', (['plugins.IConfigurable'], {}), '(plugins.IConfigurable)\n', (163, 186), False, 'from ckan import plugins\n'), ((191, 227), 'ckan.plugins.implements', 'plugins.implements', (['plugins.IActions'], {}), '(plugins.IActions)\n', (209, 227), False, 'from ckan i...
#!/usr/local/bin/python3.5 from time import sleep from multiprocessing import Lock import logging import pychromecast import bot POLL_INTERVAL = 1800 class ChromecastListener(object): def __init__(self, player, bot): self._song = None self._player = player self._bot = bot self._l...
[ "logging.error", "logging.exception", "logging.debug", "logging.basicConfig", "multiprocessing.Lock", "bot.Bot", "time.sleep", "logging.info", "pychromecast.get_chromecasts" ]
[((1787, 1817), 'pychromecast.get_chromecasts', 'pychromecast.get_chromecasts', ([], {}), '()\n', (1815, 1817), False, 'import pychromecast\n'), ((2707, 2746), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO'}), '(level=logging.INFO)\n', (2726, 2746), False, 'import logging\n'), ((326, 332), ...
import os import scipy.misc import numpy as np from partAE_model import PAE import tensorflow as tf import h5py flags = tf.app.flags flags.DEFINE_integer("epoch", 100, "Epoch to train") flags.DEFINE_float("learning_rate", 0.001, "Learning rate for adam") flags.DEFINE_float("beta1", 0.5, "Momentum term of adam [0.5]"...
[ "tensorflow.ConfigProto", "tensorflow.Session", "tensorflow.app.run", "partAE_model.PAE" ]
[((1199, 1215), 'tensorflow.ConfigProto', 'tf.ConfigProto', ([], {}), '()\n', (1213, 1215), True, 'import tensorflow as tf\n'), ((1778, 1790), 'tensorflow.app.run', 'tf.app.run', ([], {}), '()\n', (1788, 1790), True, 'import tensorflow as tf\n'), ((1265, 1294), 'tensorflow.Session', 'tf.Session', ([], {'config': 'run_c...
##################################################################### # # # This code writen by <NAME> # # Using the tutorial from Web Scraping with Python # # You may use this code to retrieve info...
[ "bs4.BeautifulSoup", "csv.writer", "re.compile", "urllib.request.urlopen" ]
[((2806, 2827), 'csv.writer', 'csv.writer', (['file_data'], {}), '(file_data)\n', (2816, 2827), False, 'import csv\n'), ((1415, 1433), 'urllib.request.urlopen', 'urlopen', (['firstLink'], {}), '(firstLink)\n', (1422, 1433), False, 'from urllib.request import urlopen\n'), ((1443, 1477), 'bs4.BeautifulSoup', 'BeautifulSo...
""" Extended Room Evennia Contribution - Griatch 2012 This is an extended Room typeclass for Evennia. It is supported by an extended `Look` command and an extended `@desc` command, also in this module. Features: 1) Time-changing description slots This allows to change the full description text the room shows depe...
[ "evennia.gametime.gametime", "evennia.utils.crop", "django.conf.settings.SEARCH_AT_RESULT.rsplit", "datetime.datetime.fromtimestamp", "evennia.utils.make_iter", "re.compile" ]
[((2791, 2844), 're.compile', 're.compile', (['"""<morning>(.*?)</morning>"""', 're.IGNORECASE'], {}), "('<morning>(.*?)</morning>', re.IGNORECASE)\n", (2801, 2844), False, 'import re\n'), ((2861, 2918), 're.compile', 're.compile', (['"""<afternoon>(.*?)</afternoon>"""', 're.IGNORECASE'], {}), "('<afternoon>(.*?)</afte...
from path import Path import cv2 from tqdm import tqdm import numpy as np import matplotlib.pyplot as plt root =Path('/home/roit/aws/aprojects/xdr94_mono2/mc_test_gt') out_p = Path('./plasma_gt') out_p.mkdir_p() files = root.files() def main(): cnt=0 for item in tqdm(files): img = cv2.imread(item) ...
[ "tqdm.tqdm", "cv2.cvtColor", "cv2.imread", "path.Path", "numpy.mean", "matplotlib.pyplot.imsave" ]
[((112, 167), 'path.Path', 'Path', (['"""/home/roit/aws/aprojects/xdr94_mono2/mc_test_gt"""'], {}), "('/home/roit/aws/aprojects/xdr94_mono2/mc_test_gt')\n", (116, 167), False, 'from path import Path\n'), ((176, 195), 'path.Path', 'Path', (['"""./plasma_gt"""'], {}), "('./plasma_gt')\n", (180, 195), False, 'from path im...
from gnutools.fs import listfiles, name import wave import contextlib from tqdm import tqdm import json from asr_deepspeech.audio import duration class JSUTManifest(dict): def __init__(self, root): super(JSUTManifest, self).__init__() self.__root=root self.__labels = set() def build(se...
[ "asr_deepspeech.audio.duration", "gnutools.fs.name", "gnutools.fs.listfiles" ]
[((345, 377), 'gnutools.fs.listfiles', 'listfiles', (['self.__root', "['.wav']"], {}), "(self.__root, ['.wav'])\n", (354, 377), False, 'from gnutools.fs import listfiles, name\n'), ((471, 518), 'gnutools.fs.listfiles', 'listfiles', (['self.__root', "['transcript_utf8.txt']"], {}), "(self.__root, ['transcript_utf8.txt']...
""" Copyright 2020 The OneFlow Authors. 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 required by applicable law or agr...
[ "oneflow_api.distribute.auto", "oneflow_api.oneflow.core.job.placement.ParallelConf", "oneflow.python.eager.boxing_util.BoxingTo", "oneflow.python.lib.core.enable_if.condition", "oneflow.python.eager.blob_register.GetDefaultBlobRegister", "oneflow.scope.mirrored_view_enabled", "oneflow.python.eager.vm_u...
[((1670, 1713), 'oneflow.python.eager.blob_register.GetDefaultBlobRegister', 'blob_register_util.GetDefaultBlobRegister', ([], {}), '()\n', (1711, 1713), True, 'import oneflow.python.eager.blob_register as blob_register_util\n'), ((1835, 1904), 'oneflow.python.lib.core.enable_if.condition', 'enable_if.condition', (['(h...
from __future__ import absolute_import import jwt, time from plivo.utils.validators import * """ Class to represent plivo token for endpoint authentication """ class AccessToken: auth_id = '' username = '' valid_from = 0 lifetime = 86400 key = '' grants = {} uid = 0 @validate_args( ...
[ "jwt.encode", "time.time" ]
[((1342, 1353), 'time.time', 'time.time', ([], {}), '()\n', (1351, 1353), False, 'import jwt, time\n'), ((2837, 2885), 'jwt.encode', 'jwt.encode', (['claims', 'self.key', 'algorithm', 'headers'], {}), '(claims, self.key, algorithm, headers)\n', (2847, 2885), False, 'import jwt, time\n'), ((2145, 2156), 'time.time', 'ti...
from fastapi import APIRouter, Depends from app.models.user import Token, User, UserCreate from app.services.user import UserService router = APIRouter(prefix="/users", tags=["Users"]) @router.post("/login", response_model=Token) def login(): return UserService().login_user(form_data) @router.get("/me", respo...
[ "app.services.user.UserService", "fastapi.APIRouter" ]
[((144, 186), 'fastapi.APIRouter', 'APIRouter', ([], {'prefix': '"""/users"""', 'tags': "['Users']"}), "(prefix='/users', tags=['Users'])\n", (153, 186), False, 'from fastapi import APIRouter, Depends\n'), ((258, 271), 'app.services.user.UserService', 'UserService', ([], {}), '()\n', (269, 271), False, 'from app.servic...
import rpyc c = rpyc.connect_by_service("TIME") print( "server's time is", c.root.get_time())
[ "rpyc.connect_by_service" ]
[((18, 49), 'rpyc.connect_by_service', 'rpyc.connect_by_service', (['"""TIME"""'], {}), "('TIME')\n", (41, 49), False, 'import rpyc\n')]
""" General purpose rational polynomial tools """ __classification__ = "UNCLASSIFIED" __author__ = "<NAME>" import logging from typing import List, Sequence import numpy from numpy.polynomial import polynomial from scipy.linalg import lstsq, LinAlgError from sarpy.compliance import SarpyError logger = logging.getL...
[ "numpy.stack", "numpy.ndindex", "numpy.power", "numpy.polynomial.polynomial.polyval2d", "numpy.polynomial.polynomial.polyval3d", "numpy.max", "numpy.min", "numpy.array", "numpy.polynomial.polynomial.polyval", "scipy.linalg.lstsq", "logging.getLogger" ]
[((308, 335), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (325, 335), False, 'import logging\n'), ((2705, 2733), 'numpy.ndindex', 'numpy.ndindex', (['shape_details'], {}), '(shape_details)\n', (2718, 2733), False, 'import numpy\n'), ((15941, 15957), 'numpy.min', 'numpy.min', (['array']...
# Unless explicitly stated otherwise all files in this repository are licensed # under the 3-clause BSD style license (see LICENSE). # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2019 Datadog, Inc. from typing import Optional, List, Dict from datadog_sync.utils.base_re...
[ "datadog_sync.utils.resource_utils.ResourceConnectionError", "datadog_sync.utils.base_resource.ResourceConfig" ]
[((606, 798), 'datadog_sync.utils.base_resource.ResourceConfig', 'ResourceConfig', ([], {'resource_connections': "{'monitors': ['monitor_ids'], 'synthetics_tests': []}", 'base_path': '"""/api/v1/slo"""', 'excluded_attributes': "['creator', 'id', 'created_at', 'modified_at']"}), "(resource_connections={'monitors': ['mon...
# encoding: utf-8 from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC browser = webdriver.Chrome() def search(): browser.get('https://www.taobao.com/') # input = We...
[ "selenium.webdriver.Chrome" ]
[((227, 245), 'selenium.webdriver.Chrome', 'webdriver.Chrome', ([], {}), '()\n', (243, 245), False, 'from selenium import webdriver\n')]
import sys import os import argparse from grammar import Grammar parser = argparse.ArgumentParser() parser.add_argument("--check_vocab", type=str, default=None, help="location of vocab file to check entries against") parser.add_argument("--grammars", type=str, help="directory containing grammars")...
[ "os.mkdir", "argparse.ArgumentParser", "os.path.basename", "os.path.isdir", "grammar.Grammar", "os.path.join", "os.listdir" ]
[((76, 101), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (99, 101), False, 'import argparse\n'), ((356, 384), 'os.path.isdir', 'os.path.isdir', (['args.grammars'], {}), '(args.grammars)\n', (369, 384), False, 'import os\n'), ((467, 480), 'grammar.Grammar', 'Grammar', (['args'], {}), '(args)\...
import math import numpy as np from download_mnist import load import operator import time # classify using kNN # x_train = np.load('../x_train.npy') # y_train = np.load('../y_train.npy') # x_test = np.load('../x_test.npy') # y_test = np.load('../y_test.npy') x_train, y_train, x_test, y_test = load() x...
[ "numpy.count_nonzero", "numpy.argmax", "download_mnist.load", "numpy.zeros", "time.time", "numpy.argsort", "numpy.linalg.norm" ]
[((311, 317), 'download_mnist.load', 'load', ([], {}), '()\n', (315, 317), False, 'from download_mnist import load\n'), ((1385, 1396), 'time.time', 'time.time', ([], {}), '()\n', (1394, 1396), False, 'import time\n'), ((709, 740), 'numpy.zeros', 'np.zeros', (['(test_len, train_len)'], {}), '((test_len, train_len))\n', ...
import datetime import logging from django.core.management.base import BaseCommand from main.models import Announcement logger = logging.getLogger(__name__) class Command(BaseCommand): help = 'Deletes announcements for which eol_datetime is older than current datetime.' def handle(self, **options): ...
[ "datetime.datetime.now", "main.models.Announcement.objects.all", "logging.getLogger" ]
[((131, 158), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (148, 158), False, 'import logging\n'), ((336, 362), 'main.models.Announcement.objects.all', 'Announcement.objects.all', ([], {}), '()\n', (360, 362), False, 'from main.models import Announcement\n'), ((479, 523), 'datetime.date...
from datetime import datetime, timedelta import logging from time import sleep from django.core.management.base import BaseCommand, CommandError from django.db.models import Q from django.utils import timezone from whoare.whoare import WhoAre from dominios.models import Dominio, PreDominio from zonas.models import Zona...
[ "dominios.models.PreDominio.objects.get_or_create", "logging.getLogger" ]
[((332, 359), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (349, 359), False, 'import logging\n'), ((1106, 1155), 'dominios.models.PreDominio.objects.get_or_create', 'PreDominio.objects.get_or_create', ([], {'dominio': 'dominio'}), '(dominio=dominio)\n', (1138, 1155), False, 'from domin...
from crispy_forms.helper import FormHelper from crispy_forms.layout import * from crispy_forms.bootstrap import * from crispy_forms.layout import Layout, Submit, Reset from django import forms from .models import CustomDashboard, DashboardTheme, DashboardComponent, ComponentDataSource class CustomDashboardCreateForm(...
[ "crispy_forms.layout.Reset", "crispy_forms.helper.FormHelper", "crispy_forms.layout.Submit" ]
[((637, 649), 'crispy_forms.helper.FormHelper', 'FormHelper', ([], {}), '()\n', (647, 649), False, 'from crispy_forms.helper import FormHelper\n'), ((1716, 1728), 'crispy_forms.helper.FormHelper', 'FormHelper', ([], {}), '()\n', (1726, 1728), False, 'from crispy_forms.helper import FormHelper\n'), ((2592, 2604), 'crisp...
import argparse import os import random import sys from pathlib import Path import numpy as np import toml import torch import torch.distributed as dist from torch.utils.data import DataLoader, DistributedSampler sys.path.append(os.path.abspath(os.path.join(__file__, "..", "..", ".."))) # without installation, add /...
[ "numpy.random.seed", "torch.distributed.init_process_group", "torch.utils.data.DataLoader", "argparse.ArgumentParser", "os.path.basename", "torch.manual_seed", "torch.utils.data.DistributedSampler", "pathlib.Path", "random.seed", "audio_zen.utils.initialize_module", "torch.cuda.set_device", "o...
[((470, 511), 'torch.manual_seed', 'torch.manual_seed', (["config['meta']['seed']"], {}), "(config['meta']['seed'])\n", (487, 511), False, 'import torch\n'), ((540, 578), 'numpy.random.seed', 'np.random.seed', (["config['meta']['seed']"], {}), "(config['meta']['seed'])\n", (554, 578), True, 'import numpy as np\n'), ((5...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Top-level module for librosa""" import warnings import re from .version import version as __version__ from .version import show_versions # And all the librosa sub-modules from ._cache import cache from . import core from . import beat from . import decompose from . imp...
[ "re.escape" ]
[((857, 876), 're.escape', 're.escape', (['__name__'], {}), '(__name__)\n', (866, 876), False, 'import re\n')]
# ----------------------------------------------------------------------------- # @author: # <NAME> # @brief: # generate the videos into the same directory # ----------------------------------------------------------------------------- import env_wrapper import numpy as np import argparse import glob im...
[ "numpy.load", "os.path.abspath", "argparse.ArgumentParser", "cv2.VideoWriter_fourcc", "env_wrapper.make_env", "os.path.join" ]
[((509, 571), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Plot results from a dir"""'}), "(description='Plot results from a dir')\n", (532, 571), False, 'import argparse\n'), ((1282, 1343), 'env_wrapper.make_env', 'env_wrapper.make_env', ([], {'args': 'args', 'rand_seed': '(1)', 'allo...
# -*- coding:utf-8 -*- from __future__ import unicode_literals from django.db import models from ..overridable.abstract_models import AbstractArticle as BaseArticle class AbstractArticle(BaseArticle): extract = models.TextField( blank=True) class Meta: abstract = True
[ "django.db.models.TextField" ]
[((221, 249), 'django.db.models.TextField', 'models.TextField', ([], {'blank': '(True)'}), '(blank=True)\n', (237, 249), False, 'from django.db import models\n')]
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Currency' db.create_table(u'currencies_currency', ( ...
[ "south.db.db.delete_table", "south.db.db.send_create_signal" ]
[((1071, 1121), 'south.db.db.send_create_signal', 'db.send_create_signal', (['u"""currencies"""', "['Currency']"], {}), "(u'currencies', ['Currency'])\n", (1092, 1121), False, 'from south.db import db\n'), ((1198, 1237), 'south.db.db.delete_table', 'db.delete_table', (['u"""currencies_currency"""'], {}), "(u'currencies...
import pkg_resources import inspect from cklib.logging import log from typing import List, Optional from cklib.args import ArgumentParser from cklib.baseplugin import BasePlugin, BaseCliPlugin, PluginType plugins = {} initialized = False class PluginLoader: """Cloudkeeper Plugin Loader""" def __init__(self...
[ "inspect.isclass", "inspect.isabstract", "pkg_resources.iter_entry_points", "cklib.logging.log.debug" ]
[((1605, 1633), 'cklib.logging.log.debug', 'log.debug', (['"""Finding plugins"""'], {}), "('Finding plugins')\n", (1614, 1633), False, 'from cklib.logging import log\n'), ((1661, 1715), 'pkg_resources.iter_entry_points', 'pkg_resources.iter_entry_points', (['"""cloudkeeper.plugins"""'], {}), "('cloudkeeper.plugins')\n"...
import copy import itertools import re from typing import Any, Callable, Dict, Generator, Iterator, List, Optional, Union import numpy as np import torch from omegaconf import DictConfig from torch.nn.utils.rnn import pad_sequence from torch.utils.data import IterableDataset from classy.data.data_drivers import Class...
[ "copy.deepcopy", "classy.utils.commons.flatten", "classy.utils.commons.chunks", "re.sub", "torch.nn.utils.rnn.pad_sequence", "torch.is_tensor", "classy.utils.log.get_project_logger", "numpy.random.shuffle" ]
[((514, 542), 'classy.utils.log.get_project_logger', 'get_project_logger', (['__name__'], {}), '(__name__)\n', (532, 542), False, 'from classy.utils.log import get_project_logger\n'), ((635, 703), 'torch.nn.utils.rnn.pad_sequence', 'pad_sequence', (['tensors'], {'batch_first': '(True)', 'padding_value': 'padding_value'...
from hadooplib.mapper import MapperBase from hadooplib.inputformat import KeyValueInput class TFIDFMapper1(MapperBase): """ keep only the word in the key field remove filename from key and put it into value (word filename, number) -> (word, filename number) e.g. (dog 1.txt, 1) -> (dog, 1.txt 1) ...
[ "hadooplib.mapper.MapperBase.__init__" ]
[((358, 383), 'hadooplib.mapper.MapperBase.__init__', 'MapperBase.__init__', (['self'], {}), '(self)\n', (377, 383), False, 'from hadooplib.mapper import MapperBase\n')]
#!/usr/bin/env python # coding: utf-8 # In[1]: import numpy as np # In[2]: from sklearn.tree import DecisionTreeClassifier from sklearn.ensemble import RandomForestClassifier from sklearn.linear_model import LogisticRegression from sklearn.model_selection import KFold from sklearn.metrics import accuracy_score ...
[ "sklearn.ensemble.RandomForestClassifier", "numpy.empty", "sklearn.metrics.accuracy_score", "sklearn.model_selection.KFold", "sklearn.tree.DecisionTreeClassifier", "numpy.mean" ]
[((408, 429), 'sklearn.model_selection.KFold', 'KFold', ([], {'n_splits': 'folds'}), '(n_splits=folds)\n', (413, 429), False, 'from sklearn.model_selection import KFold\n'), ((986, 1001), 'numpy.mean', 'np.mean', (['scores'], {}), '(scores)\n', (993, 1001), True, 'import numpy as np\n'), ((1184, 1200), 'numpy.empty', '...
from PIL import Image import pandas as pd import numpy as np import time import os import random import inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) import warnings warnings.simplefilter(action='ignore', category=FutureWarning) from config import CONFIG def parse_co...
[ "pandas.DataFrame", "warnings.simplefilter", "os.makedirs", "os.path.exists", "time.time", "numpy.cumsum", "random.random", "numpy.array", "inspect.currentframe", "os.path.join", "os.listdir" ]
[((216, 278), 'warnings.simplefilter', 'warnings.simplefilter', ([], {'action': '"""ignore"""', 'category': 'FutureWarning'}), "(action='ignore', category=FutureWarning)\n", (237, 278), False, 'import warnings\n'), ((346, 380), 'os.path.join', 'os.path.join', (['currentdir', '"""assets"""'], {}), "(currentdir, 'assets'...
from django.contrib.auth.decorators import login_required from django.http import Http404, HttpResponseRedirect from django.urls import reverse from cradmin_legacy.crinstance import reverse_cradmin_url from devilry.apps.core.models import Delivery @login_required def show_delivery(request, delivery_id): try: ...
[ "cradmin_legacy.crinstance.reverse_cradmin_url", "django.http.Http404", "devilry.apps.core.models.Delivery.objects.select_related" ]
[((511, 520), 'django.http.Http404', 'Http404', ([], {}), '()\n', (518, 520), False, 'from django.http import Http404, HttpResponseRedirect\n'), ((580, 760), 'cradmin_legacy.crinstance.reverse_cradmin_url', 'reverse_cradmin_url', ([], {'instanceid': '"""devilry_student_group"""', 'appname': '"""deliveries"""', 'roleid'...
from ldpc.utils import FramesManager from bitstring import Bits # Frames shouldn't be instantiated on their own, but instead using the manager fm = FramesManager() # using the manager to crete a frame bits = Bits(bytes=b"\x01\x02") tx_frame = fm.create_frame(bits) # create a copy of the tx_frame to simulate rx rx_fram...
[ "ldpc.utils.FramesManager", "bitstring.Bits" ]
[((149, 164), 'ldpc.utils.FramesManager', 'FramesManager', ([], {}), '()\n', (162, 164), False, 'from ldpc.utils import FramesManager\n'), ((209, 232), 'bitstring.Bits', 'Bits', ([], {'bytes': "b'\\x01\\x02'"}), "(bytes=b'\\x01\\x02')\n", (213, 232), False, 'from bitstring import Bits\n')]
from setuptools import find_packages, setup setup( name='eurito_funding', packages=find_packages(), version='0.1.0', description='EURITO: Advanced R&I funding analytics pilot', author='nesta', license='MIT', )
[ "setuptools.find_packages" ]
[((92, 107), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (105, 107), False, 'from setuptools import find_packages, setup\n')]
import math # from settings import * from numba import njit @njit(fastmath=True)#, cache=True) def mod_vec3_n(vec, n): return (vec[0] % n, vec[1] % n, vec[2] % n) @njit(fastmath=True)#, cache=True) def length_vec3(vec): return math.sqrt(vec[0] ** 2 + vec[1] ** 2 + vec[2] ** 2) @njit(fastmath=...
[ "math.sin", "numba.njit", "math.cos", "math.sqrt" ]
[((66, 85), 'numba.njit', 'njit', ([], {'fastmath': '(True)'}), '(fastmath=True)\n', (70, 85), False, 'from numba import njit\n'), ((180, 199), 'numba.njit', 'njit', ([], {'fastmath': '(True)'}), '(fastmath=True)\n', (184, 199), False, 'from numba import njit\n'), ((306, 325), 'numba.njit', 'njit', ([], {'fastmath': '(...
import numpy as np import queue def stdin_input(): N, Q = map(int, input().split()) a, b = [], [] for i in range(N - 1): line = input() a.append(int(line.split()[0]) - 1) b.append(int(line.split()[1]) - 1) c, d = [], [] for i in range(Q): line = input() c.ap...
[ "queue.Queue" ]
[((1519, 1532), 'queue.Queue', 'queue.Queue', ([], {}), '()\n', (1530, 1532), False, 'import queue\n')]
from PyQt5.QtWidgets import QAction, QFileDialog, QMenu, QPushButton from inselect.lib.user_template import UserTemplate from inselect.lib.utils import debug_print from .user_template_choice import user_template_choice from .utils import load_icon, reveal_path class UserTemplatePopupButton(QPushButton): "User t...
[ "PyQt5.QtWidgets.QMenu", "PyQt5.QtWidgets.QAction", "inselect.lib.utils.debug_print" ]
[((619, 626), 'PyQt5.QtWidgets.QMenu', 'QMenu', ([], {}), '()\n', (624, 626), False, 'from PyQt5.QtWidgets import QAction, QFileDialog, QMenu, QPushButton\n'), ((1401, 1456), 'PyQt5.QtWidgets.QAction', 'QAction', (['"""Reveal template"""', 'self'], {'triggered': 'self.reveal'}), "('Reveal template', self, triggered=sel...
import os, shutil def main(): # Will contain all directories of files that need to be sorted sortableFiles = [] # Will contain all directories of folders that are within the directory to be sorted unsortableFiles = [] # Will be populated with filepaths of all the items inside a given directory directoryPaths = ...
[ "os.mkdir", "os.path.isdir", "os.path.isfile", "os.path.splitext", "shutil.move", "os.path.join", "os.listdir" ]
[((686, 716), 'os.path.isdir', 'os.path.isdir', (['chosenDirectory'], {}), '(chosenDirectory)\n', (699, 716), False, 'import os, shutil\n'), ((748, 775), 'os.listdir', 'os.listdir', (['chosenDirectory'], {}), '(chosenDirectory)\n', (758, 775), False, 'import os, shutil\n'), ((1474, 1508), 'os.path.splitext', 'os.path.s...
"""Shim for executing the openapi spec validator.""" import re import sys from openapi_spec_validator.__main__ import main if __name__ == "__main__": sys.argv[0] = re.sub(r"(-script\.pyw|\.exe)?$", "", sys.argv[0]) sys.exit(main())
[ "re.sub", "openapi_spec_validator.__main__.main" ]
[((172, 223), 're.sub', 're.sub', (['"""(-script\\\\.pyw|\\\\.exe)?$"""', '""""""', 'sys.argv[0]'], {}), "('(-script\\\\.pyw|\\\\.exe)?$', '', sys.argv[0])\n", (178, 223), False, 'import re\n'), ((236, 242), 'openapi_spec_validator.__main__.main', 'main', ([], {}), '()\n', (240, 242), False, 'from openapi_spec_validato...
import json import pandas as pd from collections import Counter from keras.optimizers import Adam from keras.models import Sequential from keras.callbacks import ModelCheckpoint from keras.layers import Conv2D, MaxPool2D, Flatten, Dense from keras.preprocessing.image import ImageDataGenerator from keras.applications.vg...
[ "keras.preprocessing.image.ImageDataGenerator", "json.dump", "pandas.read_csv", "keras.callbacks.ModelCheckpoint", "keras.layers.MaxPool2D", "keras.layers.Flatten", "keras.optimizers.Adam", "keras.layers.Dense", "keras.layers.Conv2D", "keras.models.Sequential" ]
[((817, 862), 'pandas.read_csv', 'pd.read_csv', (['csv_file_training'], {'delimiter': '""","""'}), "(csv_file_training, delimiter=',')\n", (828, 862), True, 'import pandas as pd\n'), ((1150, 1314), 'keras.preprocessing.image.ImageDataGenerator', 'ImageDataGenerator', ([], {'preprocessing_function': 'preprocess_input', ...
#!/usr/bin/env python #coding=utf-8 from pyecharts import WordCloud def test_wordcloud(): # wordcloud_0 name = ['<NAME>', 'Macys', '<NAME>', 'Jurassic World', 'Charter Communications', '<NAME>', 'Planet Fitness', 'Pitch Perfect', 'Express', 'Home', '<NAME>', '<NAME>', '<NAME>', 'KXAN'...
[ "pyecharts.WordCloud" ]
[((570, 603), 'pyecharts.WordCloud', 'WordCloud', ([], {'width': '(1300)', 'height': '(620)'}), '(width=1300, height=620)\n', (579, 603), False, 'from pyecharts import WordCloud\n'), ((768, 801), 'pyecharts.WordCloud', 'WordCloud', ([], {'width': '(1300)', 'height': '(620)'}), '(width=1300, height=620)\n', (777, 801), ...
#!/usr/bin/env python ''' Tests for gtfutils / junctions ''' import os import unittest import StringIO import ngsutils.gtf.junctions from ngsutils.gtf import GTF # >test1 # 1 2 3 4 5 6 7 8 9 100 # 123456789012345678901234567890123456789...
[ "unittest.main", "os.path.dirname", "StringIO.StringIO" ]
[((561, 586), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (576, 586), False, 'import os\n'), ((4343, 4358), 'unittest.main', 'unittest.main', ([], {}), '()\n', (4356, 4358), False, 'import unittest\n'), ((1315, 1336), 'StringIO.StringIO', 'StringIO.StringIO', (['""""""'], {}), "('')\n", (1...
import logging from contextlib import contextmanager from typing import NamedTuple import ixmp import message_ix from d2ix.core import MessageInterface logger = logging.getLogger(__name__) RUN_CONFIG = '../config/run_config_server.yml' class TechnologyOut(NamedTuple): technology: str commodity: str le...
[ "d2ix.core.MessageInterface", "message_ix.Scenario", "logging.getLogger" ]
[((164, 191), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (181, 191), False, 'import logging\n'), ((1238, 1271), 'd2ix.core.MessageInterface', 'MessageInterface', (['self.run_config'], {}), '(self.run_config)\n', (1254, 1271), False, 'from d2ix.core import MessageInterface\n'), ((1865,...
import common as com import matplotlib.pyplot as plt import os import numpy as np def get_xy(file): import csv import numpy as np x = [] y = [] with open(file, 'r') as fh: open_file = csv.reader(fh, delimiter='\t') for line in open_file: x_ = line[0] ...
[ "matplotlib.pyplot.title", "matplotlib.rc", "csv.reader", "argparse.ArgumentParser", "matplotlib.pyplot.figure", "os.path.isfile", "numpy.exp", "common.plot_hysteresis", "matplotlib.pyplot.axvline", "common.saveplot", "common.get_path", "matplotlib.pyplot.show", "common.normalize", "common...
[((1114, 1149), 'common.print_running_message', 'com.print_running_message', (['__file__'], {}), '(__file__)\n', (1139, 1149), True, 'import common as com\n'), ((1187, 1212), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (1210, 1212), False, 'import argparse\n'), ((2263, 2289), 'common.read_ya...
"""A simple timer implementation. Copyright 2018 The AdaNet Authors. 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 https://www.apache.org/licenses/LICENSE-2.0 Unless re...
[ "time.time" ]
[((1053, 1064), 'time.time', 'time.time', ([], {}), '()\n', (1062, 1064), False, 'import time\n'), ((1220, 1231), 'time.time', 'time.time', ([], {}), '()\n', (1229, 1231), False, 'import time\n')]
import sqlite3 conn = sqlite3.connect('food.db') curs = conn.cursor() query = 'SELECT * FROM food' curs.execute(query) names = [f[0] for f in curs.description] for row in curs.fetchall(): for pair in zip(names,row): print ('%s:%s' % pair) print()
[ "sqlite3.connect" ]
[((23, 49), 'sqlite3.connect', 'sqlite3.connect', (['"""food.db"""'], {}), "('food.db')\n", (38, 49), False, 'import sqlite3\n')]
""" Tests of noise input. """ import unittest import numpy as np from chspy import CubicHermiteSpline from neurolib.models.aln import ALNModel from neurolib.utils.stimulus import ( ConcatenatedStimulus, ExponentialInput, LinearRampInput, OrnsteinUhlenbeckProcess, RectifiedInput, SinusoidalInpu...
[ "neurolib.utils.stimulus.RectifiedInput", "neurolib.utils.stimulus.StepInput", "neurolib.utils.stimulus.SinusoidalInput", "neurolib.utils.stimulus.OrnsteinUhlenbeckProcess", "numpy.around", "numpy.mean", "neurolib.utils.stimulus.LinearRampInput", "unittest.main", "neurolib.utils.stimulus.Exponential...
[((580, 612), 'numpy.array', 'np.array', (['[-0.214062, -0.215043]'], {}), '([-0.214062, -0.215043])\n', (588, 612), True, 'import numpy as np\n'), ((632, 662), 'numpy.array', 'np.array', (['[0.193429, 0.073445]'], {}), '([0.193429, 0.073445])\n', (640, 662), True, 'import numpy as np\n'), ((21803, 21818), 'unittest.ma...
import argparse from collections import defaultdict import base64 import requests import uncurl from vwh_importable_data import POST_RESP_BODY_2, POST_RESP_HEADERS_2, OPTIONS_RESP_BODY_2, \ POST_RESP_BODY_1, OPTIONS_RESP_HEADERS_2, POST_RESP_HEADERS_1, OPTIONS_RESP_BODY_1, \ OPTIONS_RESP_HEADERS_1, POST_REQ_2, OPTI...
[ "collections.defaultdict", "requests.Session", "argparse.ArgumentParser", "base64.b64decode" ]
[((397, 422), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (420, 422), False, 'import argparse\n'), ((1535, 1553), 'requests.Session', 'requests.Session', ([], {}), '()\n', (1551, 1553), False, 'import requests\n'), ((2994, 3018), 'collections.defaultdict', 'defaultdict', (['(lambda : [])'], ...
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER # Copyright (c) 2018 Juniper Networks, Inc. # All rights reserved. # Use is subject to license terms. # # Author: cklewar import abc import lib.constants as c from lib.processor import BackendClientProcessor class Service(object): def __init__(self,...
[ "lib.processor.BackendClientProcessor" ]
[((500, 573), 'lib.processor.BackendClientProcessor', 'BackendClientProcessor', ([], {'exchange': '""""""', 'routing_key': 'c.AMQP_RPC_BACKEND_QUEUE'}), "(exchange='', routing_key=c.AMQP_RPC_BACKEND_QUEUE)\n", (522, 573), False, 'from lib.processor import BackendClientProcessor\n')]
import megengine as mge import megengine.random as rand import megengine.functional as F import numpy as np from config import config from det_opr.bbox_opr import box_overlap_opr, bbox_transform_opr import pdb def fpn_rpn_reshape(pred_cls_score_list, pred_bbox_offsets_list): final_pred_bbox_offsets_list = [] f...
[ "megengine.functional.argmax", "megengine.tensor", "megengine.functional.linspace", "megengine.functional.equal", "megengine.random.uniform", "megengine.functional.ones", "megengine.functional.minimum", "det_opr.bbox_opr.bbox_transform_opr", "det_opr.bbox_opr.box_overlap_opr", "megengine.functiona...
[((1268, 1311), 'megengine.functional.concat', 'F.concat', (['final_pred_cls_score_list'], {'axis': '(0)'}), '(final_pred_cls_score_list, axis=0)\n', (1276, 1311), True, 'import megengine.functional as F\n'), ((1342, 1388), 'megengine.functional.concat', 'F.concat', (['final_pred_bbox_offsets_list'], {'axis': '(0)'}), ...
from os import path import click from .settings import NEW_BUILDS_DIRNAME from .util import print_and_run, read_version_data def _wait_for_build(filename): click.echo('Build the client in another window, and return here afterwards') version = read_version_data()['version'] filename = path.join(NEW_BUIL...
[ "click.confirm", "click.echo", "os.path.exists", "click.command" ]
[((574, 589), 'click.command', 'click.command', ([], {}), '()\n', (587, 589), False, 'import click\n'), ((164, 240), 'click.echo', 'click.echo', (['"""Build the client in another window, and return here afterwards"""'], {}), "('Build the client in another window, and return here afterwards')\n", (174, 240), False, 'imp...
# Download the helper library from https://www.twilio.com/docs/python/install import os from twilio.rest import Client # Your Account Sid and Auth Token from twilio.com/console # and set the environment variables. See http://twil.io/secure account_sid = os.environ['TWILIO_ACCOUNT_SID'] auth_token = os.environ...
[ "twilio.rest.Client" ]
[((352, 383), 'twilio.rest.Client', 'Client', (['account_sid', 'auth_token'], {}), '(account_sid, auth_token)\n', (358, 383), False, 'from twilio.rest import Client\n')]
import untangle from src.Data_Model.State import State from src.SCXML_Parser.State_parsor import State_parsor class Scxml_parsor(object): def __init__(self, file): self._tree = untangle.parse(file).scxml self._first = State_parsor(self._tree).obtain_Initial() self._states = [] ...
[ "src.SCXML_Parser.State_parsor.State_parsor", "untangle.parse" ]
[((194, 214), 'untangle.parse', 'untangle.parse', (['file'], {}), '(file)\n', (208, 214), False, 'import untangle\n'), ((376, 395), 'src.SCXML_Parser.State_parsor.State_parsor', 'State_parsor', (['state'], {}), '(state)\n', (388, 395), False, 'from src.SCXML_Parser.State_parsor import State_parsor\n'), ((244, 268), 'sr...
from .. import combinators as c from .. import maybeerror as me import unittest as u m = me.MaybeError l = c.ConsList def good(rest, state, result): return m.pure({'rest': rest, 'state': state, 'result': result}) iz1 = c.basic iz2 = c.position iz3 = c.count class Checks(u.TestCase): def testCheckFunctio...
[ "unittest.main" ]
[((15867, 15875), 'unittest.main', 'u.main', ([], {}), '()\n', (15873, 15875), True, 'import unittest as u\n')]
import sys from docxtpl import DocxTemplate import jinja2 import json import os import ast files=sys.argv[1] # print(files) # print(sys.argv[2]) context = eval(sys.argv[2]) print(type(context)) doc = DocxTemplate(files+'\Http\Controllers\Full_Auth\Full_AuthComplete.docx') doc.render(context) do...
[ "docxtpl.DocxTemplate" ]
[((219, 297), 'docxtpl.DocxTemplate', 'DocxTemplate', (["(files + '\\\\Http\\\\Controllers\\\\Full_Auth\\\\Full_AuthComplete.docx')"], {}), "(files + '\\\\Http\\\\Controllers\\\\Full_Auth\\\\Full_AuthComplete.docx')\n", (231, 297), False, 'from docxtpl import DocxTemplate\n')]
# Generated by Django 3.2.2 on 2021-05-25 09:07 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('background', '0002_auto_20210524_1900'), ] operations = [ migrations.RenameField( model_name='concrete_flight', old_...
[ "django.db.models.CharField", "django.db.migrations.RenameField" ]
[((238, 339), 'django.db.migrations.RenameField', 'migrations.RenameField', ([], {'model_name': '"""concrete_flight"""', 'old_name': '"""flight"""', 'new_name': '"""flight_number"""'}), "(model_name='concrete_flight', old_name='flight',\n new_name='flight_number')\n", (260, 339), False, 'from django.db import migrat...
# Generated by Django 3.2.3 on 2021-05-23 19:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('covid', '0011_auto_20210522_2141'), ] operations = [ migrations.AddField( model_name='service', name='consent', ...
[ "django.db.models.BooleanField" ]
[((334, 542), 'django.db.models.BooleanField', 'models.BooleanField', ([], {'default': '(False)', 'help_text': '"""I acknowledge that the details entered by me are correct. In case of spam reports against this posting, I am bound to being banned from this platform."""'}), "(default=False, help_text=\n 'I acknowledge...
import ndspy import ndspy.rom import ndspy.narc import code import io import os import os.path from os import path import json import copy import re # code.interact(local=dict(globals(), **locals())) ######################### FILE SPECIFIC CONSTANTS ############################# def set_global_vars(): global ROM_N...
[ "json.dump", "copy.deepcopy", "io.BytesIO", "json.load", "os.makedirs", "os.path.exists", "re.sub" ]
[((3141, 3157), 'io.BytesIO', 'io.BytesIO', (['data'], {}), '(data)\n', (3151, 3157), False, 'import io\n'), ((3688, 3706), 'copy.deepcopy', 'copy.deepcopy', (['raw'], {}), '(raw)\n', (3701, 3706), False, 'import copy\n'), ((528, 546), 'json.load', 'json.load', (['outfile'], {}), '(outfile)\n', (537, 546), False, 'impo...
#!/usr/bin/env python3 # Copyright 2020 The Bazel Authors. 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 r...
[ "unittest.main", "rules_python.python.runfiles.runfiles.Create", "os.path.basename", "csv.DictReader", "subprocess.check_output", "os.path.splitext", "os.path.join" ]
[((9800, 9815), 'unittest.main', 'unittest.main', ([], {}), '()\n', (9813, 9815), False, 'import unittest\n'), ((1376, 1393), 'rules_python.python.runfiles.runfiles.Create', 'runfiles.Create', ([], {}), '()\n', (1391, 1393), False, 'from rules_python.python.runfiles import runfiles\n'), ((1950, 2022), 'subprocess.check...
# Copyright 2017 AT&T Intellectual Property. All other 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 required...
[ "mock.patch.object", "deckhand.engine.document_validation.DocumentValidation" ]
[((9630, 9690), 'mock.patch.object', 'mock.patch.object', (['document_validation', '"""LOG"""'], {'autospec': '(True)'}), "(document_validation, 'LOG', autospec=True)\n", (9647, 9690), False, 'import mock\n'), ((10146, 10206), 'mock.patch.object', 'mock.patch.object', (['document_validation', '"""LOG"""'], {'autospec':...
import importlib import os import traceback from typing import Dict, Any, List import unittest from bblfsh_sonar_checks.utils import ( get_checks_dir, get_languages, run_default_fixture, get_fixtures_dir, list_checks, run_check, get_check_description, get_methods, Method, JClass, JClassField, A...
[ "os.listdir", "bblfsh_sonar_checks.utils.run_check", "bblfsh_sonar_checks.utils.get_fixtures_dir", "bblfsh_sonar_checks.utils.get_check_description", "bblfsh_sonar_checks.utils.list_checks", "bblfsh_sonar_checks.utils.run_checks", "bblfsh_sonar_checks.utils.get_languages", "bblfsh_sonar_checks.utils.g...
[((417, 437), 'bblfsh_sonar_checks.utils.get_checks_dir', 'get_checks_dir', (['lang'], {}), '(lang)\n', (431, 437), False, 'from bblfsh_sonar_checks.utils import get_checks_dir, get_languages, run_default_fixture, get_fixtures_dir, list_checks, run_check, get_check_description, get_methods, Method, JClass, JClassField,...
import tensorflow as tf import logging from typing import Tuple import tensorflow_hub as hub import sys logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) class MultiHopAttentionModel: def __init__( self, images: tf.Tensor, captions: tf.Tensor, captions_l...
[ "tensorflow.reduce_sum", "tensorflow.trainable_variables", "tensorflow_hub.Module", "tensorflow.maximum", "tensorflow.reshape", "tensorflow.diag_part", "tensorflow.matmul", "tensorflow.Variable", "tensorflow.nn.bidirectional_dynamic_rnn", "tensorflow.tables_initializer", "tensorflow.reduce_max",...
[((105, 144), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO'}), '(level=logging.INFO)\n', (124, 144), False, 'import logging\n'), ((154, 181), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (171, 181), False, 'import logging\n'), ((1368, 1419), 'tensorflow.Var...
# 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.get", "pulumi.getter", "pulumi.ResourceOptions", "pulumi.set" ]
[((2111, 2148), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""childInstanceId"""'}), "(name='childInstanceId')\n", (2124, 2148), False, 'import pulumi\n'), ((2491, 2534), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""childInstanceRegionId"""'}), "(name='childInstanceRegionId')\n", (2504, 2534), False, 'impo...
import time,os from tester import counter, measure_handler from jobs import Contextual_Job_processor from multiprocessing import Process manager = Contextual_Job_processor() handler = Process(target = measure_handler, args = [manager.result_queue]) handler.daemon = True handler.start() for i in range(4): manager.e...
[ "os.getcwd", "multiprocessing.Process", "time.sleep", "jobs.Contextual_Job_processor" ]
[((148, 174), 'jobs.Contextual_Job_processor', 'Contextual_Job_processor', ([], {}), '()\n', (172, 174), False, 'from jobs import Contextual_Job_processor\n'), ((185, 245), 'multiprocessing.Process', 'Process', ([], {'target': 'measure_handler', 'args': '[manager.result_queue]'}), '(target=measure_handler, args=[manage...
# -*- coding: utf-8 -*- # import numpy import pytest import quadpy from quadpy.nball.helpers import integrate_monomial_over_unit_nball from helpers import check_degree @pytest.mark.parametrize( "scheme,tol", [(quadpy.disk.Albrecht(k), 1.0e-14) for k in range(1, 9)] + [(quadpy.disk.CoolsHaegemans(k), 1.0e...
[ "quadpy.disk.Stroud", "quadpy.disk.HaegemansPiessens", "quadpy.disk.WissmannBecker", "quadpy.disk.integrate", "quadpy.disk.Peirce1957", "quadpy.disk.Lether", "quadpy.disk.CoolsHaegemans", "quadpy.disk.CoolsKim", "quadpy.disk.Albrecht", "quadpy.disk.show", "quadpy.disk.HammerStroud", "quadpy.di...
[((2025, 2049), 'quadpy.disk.show', 'quadpy.disk.show', (['scheme'], {}), '(scheme)\n', (2041, 2049), False, 'import quadpy\n'), ((2142, 2165), 'quadpy.disk.Albrecht', 'quadpy.disk.Albrecht', (['(8)'], {}), '(8)\n', (2162, 2165), False, 'import quadpy\n'), ((1974, 1995), 'quadpy.disk.Lether', 'quadpy.disk.Lether', (['(...
from LucidDynamodb import DynamoDb import os AWS_ACCESS_KEY_ID = os.getenv("AWS_ACCESS_KEY_ID") AWS_SECRET_ACCESS_KEY = os.getenv("AWS_SECRET_ACCESS_KEY") db = DynamoDb(region_name="us-east-1", aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY)
[ "LucidDynamodb.DynamoDb", "os.getenv" ]
[((65, 95), 'os.getenv', 'os.getenv', (['"""AWS_ACCESS_KEY_ID"""'], {}), "('AWS_ACCESS_KEY_ID')\n", (74, 95), False, 'import os\n'), ((120, 154), 'os.getenv', 'os.getenv', (['"""AWS_SECRET_ACCESS_KEY"""'], {}), "('AWS_SECRET_ACCESS_KEY')\n", (129, 154), False, 'import os\n'), ((160, 279), 'LucidDynamodb.DynamoDb', 'Dyn...
# NOTE: this example needs gepetto-gui to be installed # usage: launch gepetto-gui and then run this test import pinocchio as pin import numpy as np import sys import os from os.path import dirname, join, abspath from pinocchio.visualize import GepettoVisualizer # Load the URDF model. # Conversion with str seems to ...
[ "os.path.abspath", "pinocchio.JointModelFreeFlyer", "pinocchio.neutral", "os.path.join", "pinocchio.visualize.GepettoVisualizer", "sys.exit" ]
[((463, 517), 'os.path.join', 'join', (['pinocchio_model_dir', '"""example-robot-data/robots"""'], {}), "(pinocchio_model_dir, 'example-robot-data/robots')\n", (467, 517), False, 'from os.path import dirname, join, abspath\n'), ((784, 839), 'pinocchio.visualize.GepettoVisualizer', 'GepettoVisualizer', (['model', 'colli...
import setuptools with open("requirements.txt") as f: required_dependencies = f.read().strip().split("\n") with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="sappears", version="0.0.2", author="<NAME>", author_email="<EMAIL>", description="A package to...
[ "setuptools.find_packages" ]
[((506, 532), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (530, 532), False, 'import setuptools\n')]
import copy import datetime from dataclasses import asdict from patient_abm import PATIENT_ABM_DIR from patient_abm.agent.patient import ( PatientAgent, PatientRecordEntry, wrap_fhir_resource, ) from patient_abm.data_handler.fhir import FHIRHandler, create_fhir_bundle from patient_abm.utils import string_t...
[ "copy.deepcopy", "dataclasses.asdict", "datetime.datetime.now", "patient_abm.agent.patient.wrap_fhir_resource", "patient_abm.agent.patient.PatientAgent.load", "patient_abm.agent.patient.PatientAgent", "patient_abm.utils.string_to_datetime", "patient_abm.agent.patient.PatientRecordEntry" ]
[((601, 738), 'patient_abm.agent.patient.PatientAgent', 'PatientAgent', ([], {'patient_id': 'patient_id', 'gender': 'gender', 'birth_date': 'birth_date', 'start_time': 'start_time', 'id_': 'agent_id', 'created_at': 'created_at'}), '(patient_id=patient_id, gender=gender, birth_date=birth_date,\n start_time=start_time...
#!/usr/bin/env python import re import os import helix.azure_storage import helix.event import helix.settings import helix.logs log = helix.logs.get_logger() acceptableXUnitFileNames = [ "testResults.xml", "test-results.xml", "test_results.xml" ] class HelixHelper: def __init__(self, settings): ...
[ "os.path.basename", "os.walk", "os.path.join", "re.compile" ]
[((1600, 1619), 'os.walk', 'os.walk', (['search_dir'], {}), '(search_dir)\n', (1607, 1619), False, 'import os\n'), ((2455, 2483), 're.compile', 're.compile', (['"""total="(\\\\d+)\\""""'], {}), '(\'total="(\\\\d+)"\')\n', (2465, 2483), False, 'import re\n'), ((1396, 1423), 'os.path.basename', 'os.path.basename', (['fil...
from django.apps import apps from django.http import HttpResponseRedirect from django.shortcuts import render, get_object_or_404 def explore(request): peoples_fetch_qs = apps.get_model('star_wars_test', 'PeopleFetch').objects.all().order_by('-fetching_date') context = {"collections": peoples_fetch_qs} ret...
[ "django.shortcuts.render", "django.shortcuts.get_object_or_404", "django.http.HttpResponseRedirect", "django.apps.apps.get_model" ]
[((324, 364), 'django.shortcuts.render', 'render', (['request', '"""explore.html"""', 'context'], {}), "(request, 'explore.html', context)\n", (330, 364), False, 'from django.shortcuts import render, get_object_or_404\n'), ((475, 522), 'django.apps.apps.get_model', 'apps.get_model', (['"""star_wars_test"""', '"""People...
import chess import chess.pgn import math from collections.abc import Mapping import json from random import randrange import berserk import time import itertools client = berserk.Client() upgradeToBot = False if upgradeToBot: client.account.upgrade_to_bot() token = "" with open('.apitoken') as f: token = ...
[ "chess.Move.from_uci", "math.sqrt", "berserk.Client", "chess.Board", "chess.pgn.Game", "berserk.TokenSession" ]
[((174, 190), 'berserk.Client', 'berserk.Client', ([], {}), '()\n', (188, 190), False, 'import berserk\n'), ((358, 390), 'berserk.TokenSession', 'berserk.TokenSession', (["('' + token)"], {}), "('' + token)\n", (378, 390), False, 'import berserk\n'), ((400, 423), 'berserk.Client', 'berserk.Client', (['session'], {}), '...
# Copyright © 2021 Province of British Columbia # # 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 agr...
[ "copy.deepcopy", "json.loads", "flask.current_app.config.get", "json.dumps", "flask.current_app.logger.debug", "requests.request", "flask.current_app.logger.info", "flask.current_app.logger.error" ]
[((4459, 4500), 'flask.current_app.config.get', 'current_app.config.get', (['"""PAYMENT_SVC_URL"""'], {}), "('PAYMENT_SVC_URL')\n", (4481, 4500), False, 'from flask import current_app\n'), ((7252, 7291), 'copy.deepcopy', 'copy.deepcopy', (['PAYMENT_REQUEST_TEMPLATE'], {}), '(PAYMENT_REQUEST_TEMPLATE)\n', (7265, 7291), ...
import os import cv2 import sys import time import collections import torch import argparse import numpy as np import torch.nn as nn import torch.nn.functional as F from config import * from torch.autograd import Variable from torch.utils import data from dataLoader import TestLoader import fpn_resnet as models #impor...
[ "torch.cuda.synchronize", "os.path.isfile", "cv2.boxPoints", "cv2.minAreaRect", "shutil.rmtree", "os.path.join", "torch.utils.data.DataLoader", "cv2.imwrite", "torch.load", "os.path.exists", "torch.sign", "cv2.resize", "torch.jit.trace", "fpn_resnet.resnet50", "torch.cuda.is_available", ...
[((5724, 5753), 'cv2.imwrite', 'cv2.imwrite', (['output_path', 'img'], {}), '(output_path, img)\n', (5735, 5753), False, 'import cv2\n'), ((5827, 5854), 'os.path.exists', 'os.path.exists', (['output_Path'], {}), '(output_Path)\n', (5841, 5854), False, 'import os\n'), ((5895, 5919), 'os.makedirs', 'os.makedirs', (['outp...
# *- coding: utf-8 -* from django.utils.translation import ugettext_lazy as _ import re from django import template from django.core.urlresolvers import reverse, NoReverseMatch from django.contrib.humanize.templatetags.humanize import intcomma register = template.Library() @register.simple_tag(takes_context=True) def...
[ "django.template.Library", "re.match", "django.core.urlresolvers.reverse" ]
[((256, 274), 'django.template.Library', 'template.Library', ([], {}), '()\n', (272, 274), False, 'from django import template\n'), ((531, 554), 're.match', 're.match', (['pattern', 'path'], {}), '(pattern, path)\n', (539, 554), False, 'import re\n'), ((391, 418), 'django.core.urlresolvers.reverse', 'reverse', (['patte...
""" qm8 dataset loader. """ import os import deepchem import logging logger = logging.getLogger(__name__) DEFAULT_DIR = deepchem.utils.get_data_dir() GDB8_URL = 'http://deepchem.io.s3-website-us-west-1.amazonaws.com/datasets/gdb8.tar.gz' QM8_CSV_URL = 'http://deepchem.io.s3-website-us-west-1.amazonaws.com/...
[ "deepchem.utils.get_data_dir", "deepchem.feat.WeaveFeaturizer", "deepchem.data.SDFLoader", "deepchem.splits.RandomSplitter", "os.path.join", "deepchem.utils.download_url", "deepchem.utils.save.load_dataset_from_disk", "deepchem.feat.RawFeaturizer", "deepchem.feat.CircularFingerprint", "os.path.exi...
[((86, 113), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (103, 113), False, 'import logging\n'), ((131, 160), 'deepchem.utils.get_data_dir', 'deepchem.utils.get_data_dir', ([], {}), '()\n', (158, 160), False, 'import deepchem\n'), ((2625, 2665), 'os.path.join', 'os.path.join', (['save_...
# ===================================================================================== # # Module for solving Ising models exactly. # # Distributed with ConIII. # # NOTE: This code needs cleanup. # # Author : <NAME>, <EMAIL> # ===================================================================================== # # ...
[ "numpy.set_printoptions", "numpy.sum", "os.makedirs", "numpy.log", "numpy.abs", "os.path.isdir", "mpmath.log", "numpy.zeros", "time.strftime", "numpy.ones", "numpy.append", "numpy.array", "numpy.exp", "numpy.argwhere", "re.sub", "numpy.all" ]
[((1545, 1587), 'numpy.set_printoptions', 'np.set_printoptions', ([], {'threshold': 'sys.maxsize'}), '(threshold=sys.maxsize)\n', (1564, 1587), True, 'import numpy as np\n'), ((12751, 12770), 'numpy.zeros', 'np.zeros', (['(n, n, n)'], {}), '((n, n, n))\n', (12759, 12770), True, 'import numpy as np\n'), ((3451, 3490), '...
from validation.value_validation import ValidateValue def risk_classification(patient): classification = RiskFactorAssessment(patient).result_risk_classification() return classification def total_risk_factors(patient): total = RiskFactorAssessment(patient).net_risk_factors() return total class Patien...
[ "validation.value_validation.ValidateValue" ]
[((614, 632), 'validation.value_validation.ValidateValue', 'ValidateValue', (['sex'], {}), '(sex)\n', (627, 632), False, 'from validation.value_validation import ValidateValue\n'), ((673, 691), 'validation.value_validation.ValidateValue', 'ValidateValue', (['age'], {}), '(age)\n', (686, 691), False, 'from validation.va...
import pandas as pd from riskiq.api import Client from urllib.parse import urlparse import requests import base64 import json API_SECRET="<KEY>" API_KEY="/<KEY>" client = Client(API_SECRET, API_KEY) df= pd.read_csv('./LengthOfDomains.csv') domains= df['0'] errors=0 results=[] url_to_scan = '' url = f'https:/...
[ "json.loads", "pandas.read_csv", "riskiq.api.Client", "requests.get", "urllib.parse.urlparse" ]
[((173, 200), 'riskiq.api.Client', 'Client', (['API_SECRET', 'API_KEY'], {}), '(API_SECRET, API_KEY)\n', (179, 200), False, 'from riskiq.api import Client\n'), ((206, 242), 'pandas.read_csv', 'pd.read_csv', (['"""./LengthOfDomains.csv"""'], {}), "('./LengthOfDomains.csv')\n", (217, 242), True, 'import pandas as pd\n'),...
from __future__ import unicode_literals from actstream.models import Action from mayan.apps.common.tests import GenericViewTestCase from ..events import event_tag_created, event_tag_edited from ..models import Tag from ..permissions import permission_tag_create, permission_tag_edit from .mixins import TagTestMixin,...
[ "actstream.models.Action.objects.count", "actstream.models.Action.objects.first" ]
[((493, 515), 'actstream.models.Action.objects.count', 'Action.objects.count', ([], {}), '()\n', (513, 515), False, 'from actstream.models import Action\n'), ((832, 854), 'actstream.models.Action.objects.count', 'Action.objects.count', ([], {}), '()\n', (852, 854), False, 'from actstream.models import Action\n'), ((104...
import argparse import os import shutil import time import torch import torchvision.datasets as datasets import torchvision.transforms as transforms from torchvision.models.resnet import resnet18 from pytorch_nndct import Pruner from pytorch_nndct import InputSpec parser = argparse.ArgumentParser() parser.add_argume...
[ "argparse.ArgumentParser", "torch.utils.data.DataLoader", "torchvision.transforms.RandomHorizontalFlip", "torchvision.transforms.Resize", "torch.load", "torch.nn.CrossEntropyLoss", "torchvision.transforms.RandomResizedCrop", "time.time", "torch.save", "torchvision.models.resnet.resnet18", "pytor...
[((277, 302), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (300, 302), False, 'import argparse\n'), ((1516, 1543), 'torch.save', 'torch.save', (['state', 'filename'], {}), '(state, filename)\n', (1526, 1543), False, 'import torch\n'), ((3363, 3374), 'time.time', 'time.time', ([], {}), '()\n',...
#------------------------------------------------------------------------------ # Modeling backend setups __all__ = [] # Preload functions: # Some backends depend on more complicated modules and thus on a preload # function. def __numcosmo_preload(): import gi gi.require_version("NumCosmoMath", "1.0")...
[ "gi.require_version" ]
[((279, 320), 'gi.require_version', 'gi.require_version', (['"""NumCosmoMath"""', '"""1.0"""'], {}), "('NumCosmoMath', '1.0')\n", (297, 320), False, 'import gi\n'), ((325, 362), 'gi.require_version', 'gi.require_version', (['"""NumCosmo"""', '"""1.0"""'], {}), "('NumCosmo', '1.0')\n", (343, 362), False, 'import gi\n')]
import logging import theano from theano.gradient import disconnected_grad from theano import tensor from blocks.graph import ComputationGraph from blocks.filter import VariableFilter from blocks.bricks import Linear, NDimensionalSoftmax from blocks.bricks.base import application from blocks.roles import OUTPUT, add_r...
[ "theano.tensor.tensor3", "blocks.bricks.Linear", "theano.tensor.ones_like", "theano.tensor.addbroadcast", "theano.tensor.concatenate", "theano.tensor.inc_subtensor", "theano.tensor.set_subtensor", "theano.tensor.zeros_like", "theano.tensor.arange", "theano.gradient.disconnected_grad", "blocks.ro...
[((481, 508), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (498, 508), False, 'import logging\n'), ((781, 826), 'blocks.bricks.Linear', 'Linear', ([], {'output_dim': '(1)', 'name': '"""value_prediction"""'}), "(output_dim=1, name='value_prediction')\n", (787, 826), False, 'from blocks.b...
from abc import ABC import numpy as np from pydyn.base.expr import Expression, Expr, Manifold from pydyn.operations.transpose import Transpose from pydyn.utils.errors import UndefinedCaseError, ExpressionMismatchError class MatrixExpr(Expr, ABC): def __init__(self): super().__init__() self.type =...
[ "pydyn.operations.transpose.Transpose", "pydyn.base.vectors.TSO3", "numpy.empty", "pydyn.operations.geometry.Delta", "pydyn.base.vectors.Vector", "pydyn.operations.multiplication.MVMul", "pydyn.operations.multiplication.MMMul", "pydyn.operations.multiplication.SMMul", "pydyn.operations.addition.MAdd...
[((494, 511), 'pydyn.operations.addition.MAdd', 'MAdd', (['self', 'other'], {}), '(self, other)\n', (498, 511), False, 'from pydyn.operations.addition import MAdd\n'), ((610, 627), 'pydyn.operations.addition.MAdd', 'MAdd', (['self', 'other'], {}), '(self, other)\n', (614, 627), False, 'from pydyn.operations.addition im...
#!/usr/bin/env python from __future__ import print_function from pyomo.environ import * from pyomo.core.base import Constraint, Objective, Suffix, minimize from pyomo.opt import ProblemFormat, SolverFactory from nmpc_mhe.dync.DynGenv2 import DynGen from sample_mods.bfb.nob5_hi_t import bfb_dae from snapshots.snap_shot...
[ "nmpc_mhe.dync.DynGenv2.DynGen", "pyomo.opt.ReaderFactory", "os.getcwd", "itertools.product" ]
[((1953, 2060), 'nmpc_mhe.dync.DynGenv2.DynGen', 'DynGen', (['bfb_dae', '(800 / nfe_mhe)', 'states', 'u'], {'k_aug_executable': '"""/home/dav0/k2/KKT_matrix/src/k_aug/k_aug"""'}), "(bfb_dae, 800 / nfe_mhe, states, u, k_aug_executable=\n '/home/dav0/k2/KKT_matrix/src/k_aug/k_aug')\n", (1959, 2060), False, 'from nmpc_...
#!/usr/bin/env python from obfsproxy.transports.base import BaseTransport import obfsproxy.common.log as logging from obfsproxy.network.buffer import Buffer from bananaphone import rh_build_encoder_factory, rh_decoder log = logging.get_obfslogger() class BananaphoneTransport(BaseTransport): def __init__(self,...
[ "bananaphone.rh_decoder", "obfsproxy.common.log.get_obfslogger", "bananaphone.rh_build_encoder_factory" ]
[((228, 252), 'obfsproxy.common.log.get_obfslogger', 'logging.get_obfslogger', ([], {}), '()\n', (250, 252), True, 'import obfsproxy.common.log as logging\n'), ((1130, 1186), 'bananaphone.rh_build_encoder_factory', 'rh_build_encoder_factory', (['encodingSpec', 'modelName', '*args'], {}), '(encodingSpec, modelName, *arg...
import statistics power_arr = [4, 5, 2, 6, 3, 7, 8, 9, 6, 5, 2] median = statistics.median(power_arr) print("The median is", median)
[ "statistics.median" ]
[((73, 101), 'statistics.median', 'statistics.median', (['power_arr'], {}), '(power_arr)\n', (90, 101), False, 'import statistics\n')]
from __future__ import unicode_literals, print_function import pickle import random from pathlib import Path import spacy from spacy.util import minibatch, compounding def ner_trainig(): with open (r'C:\Users\Akash\Desktop\be_proj\Data\NER_training_data.pickle', 'rb') as fp: TRAIN_DATA = pickle.load(fp) ...
[ "pickle.load", "random.shuffle", "spacy.blank", "spacy.util.compounding" ]
[((351, 368), 'spacy.blank', 'spacy.blank', (['"""en"""'], {}), "('en')\n", (362, 368), False, 'import spacy\n'), ((301, 316), 'pickle.load', 'pickle.load', (['fp'], {}), '(fp)\n', (312, 316), False, 'import pickle\n'), ((887, 913), 'random.shuffle', 'random.shuffle', (['TRAIN_DATA'], {}), '(TRAIN_DATA)\n', (901, 913),...