code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('layerindex', '0006_change_branch_meta'), ] operations = [ migrations.AlterField( model_name='layeritem', ...
[ "django.db.models.CharField" ]
[((358, 470), 'django.db.models.CharField', 'models.CharField', ([], {'default': '"""N"""', 'choices': "[('N', 'New'), ('P', 'Published'), ('X', 'No update')]", 'max_length': '(1)'}), "(default='N', choices=[('N', 'New'), ('P', 'Published'), (\n 'X', 'No update')], max_length=1)\n", (374, 470), False, 'from django.d...
from marshmallow import Schema, fields class POST(Schema): num = fields.Integer( required=True, description="num", ) timeout = fields.Integer( required=True, description="timeout", )
[ "marshmallow.fields.Integer" ]
[((71, 119), 'marshmallow.fields.Integer', 'fields.Integer', ([], {'required': '(True)', 'description': '"""num"""'}), "(required=True, description='num')\n", (85, 119), False, 'from marshmallow import Schema, fields\n'), ((157, 209), 'marshmallow.fields.Integer', 'fields.Integer', ([], {'required': '(True)', 'descript...
import unittest from unittest.mock import patch from tmc import points from tmc.utils import load, load_module, reload_module, get_stdout from functools import reduce import os import textwrap from random import choice, randint exercise = 'src.course_grading_part_2' def f(d): return '\n'.join(d) def w(x): ...
[ "unittest.main", "tmc.utils.get_stdout", "unittest.mock.patch", "tmc.utils.reload_module", "tmc.points", "tmc.utils.load_module" ]
[((357, 390), 'tmc.points', 'points', (['"""6.course_gradind_part_2"""'], {}), "('6.course_gradind_part_2')\n", (363, 390), False, 'from tmc import points\n'), ((6727, 6742), 'unittest.main', 'unittest.main', ([], {}), '()\n', (6740, 6742), False, 'import unittest\n'), ((495, 606), 'unittest.mock.patch', 'patch', (['""...
import os from django.core.wsgi import get_wsgi_application from dj_static import Cling # Fix django closing connection to MemCachier after every request (#11331) from django.core.cache.backends.memcached import BaseMemcachedCache BaseMemcachedCache.close = lambda self, **kwargs: None assert os.environ['DJANGO_SETTIN...
[ "django.core.wsgi.get_wsgi_application" ]
[((353, 375), 'django.core.wsgi.get_wsgi_application', 'get_wsgi_application', ([], {}), '()\n', (373, 375), False, 'from django.core.wsgi import get_wsgi_application\n')]
from anytree import RenderTree, search, LevelOrderIter, PostOrderIter from Blockchain_classes.Block import Block import inspect import logging import sqlite3 import sys class Blockchain(): __root = None __stored = [] __last_added = None __added_to_db = 0 __delete_db = True def __check_dele...
[ "anytree.search.find", "logging.debug", "anytree.PostOrderIter", "anytree.RenderTree", "anytree.LevelOrderIter", "sqlite3.connect", "inspect.currentframe", "Blockchain_classes.Block.Block" ]
[((634, 691), 'sqlite3.connect', 'sqlite3.connect', (['"""blockchain.db"""'], {'check_same_thread': '(False)'}), "('blockchain.db', check_same_thread=False)\n", (649, 691), False, 'import sqlite3\n'), ((3796, 3819), 'anytree.RenderTree', 'RenderTree', (['self.__root'], {}), '(self.__root)\n', (3806, 3819), False, 'from...
"""Advent of Code 2019 Day 4.""" from collections import defaultdict puzzle = '246515-739105' def main(puzzle=puzzle): start, end = [int(num) for num in puzzle.split('-')] runs = ( ('standard requirements', (is_not_decreasing, has_double_digit)), ('at least one digit repeated exactly twice',...
[ "collections.defaultdict" ]
[((1423, 1439), 'collections.defaultdict', 'defaultdict', (['int'], {}), '(int)\n', (1434, 1439), False, 'from collections import defaultdict\n')]
# coding: utf-8 """ LogicMonitor REST API LogicMonitor is a SaaS-based performance monitoring platform that provides full visibility into complex, hybrid infrastructures, offering granular performance monitoring and actionable data and insights. logicmonitor_sdk enables you to manage your LogicMonitor account...
[ "six.iteritems" ]
[((9067, 9100), 'six.iteritems', 'six.iteritems', (['self.swagger_types'], {}), '(self.swagger_types)\n', (9080, 9100), False, 'import six\n')]
from collections import deque def normal_war(ns, ks): c = 0 while ns: n = ns.pop() if ks[-1] < n: ks.pop(0) c += 1 else: i = 0 while n > ks[i]: i += 1 ks.pop(i) return c def deceitful_war(ns, ks): while...
[ "collections.deque" ]
[((592, 601), 'collections.deque', 'deque', (['ns'], {}), '(ns)\n', (597, 601), False, 'from collections import deque\n'), ((603, 612), 'collections.deque', 'deque', (['ks'], {}), '(ks)\n', (608, 612), False, 'from collections import deque\n')]
from typing import List, Optional, Union from fedot.core.dag.node_operator import NodeOperator class GraphNode: """ Class for node definition in the DAG-based structure :param nodes_from: parent nodes which information comes from :param content: dict for the content in node The possible para...
[ "fedot.core.dag.node_operator.NodeOperator" ]
[((907, 925), 'fedot.core.dag.node_operator.NodeOperator', 'NodeOperator', (['self'], {}), '(self)\n', (919, 925), False, 'from fedot.core.dag.node_operator import NodeOperator\n')]
""" Face Wall! """ from pathlib import Path import random from loguru import logger import cv2 import numpy as np import fire FACE_FOLDER = './faces' def get_faces(folder_path:str, extensions=['.png', '.jpg'], size=(72, 72)) -> list: return [cv2.resize(cv2.imread(img_path.absolute().as_posix()), size) for img_...
[ "cv2.imwrite", "pathlib.Path", "random.choice", "fire.Fire" ]
[((823, 851), 'cv2.imwrite', 'cv2.imwrite', (['save_path', 'wall'], {}), '(save_path, wall)\n', (834, 851), False, 'import cv2\n'), ((895, 924), 'fire.Fire', 'fire.Fire', (['generate_face_wall'], {}), '(generate_face_wall)\n', (904, 924), False, 'import fire\n'), ((328, 345), 'pathlib.Path', 'Path', (['folder_path'], {...
"""This module defines a HooksManager class for handling (de)installation of decorators.""" import sys from typing import Optional from functools import partial from metapandas.util import vprint, friendly_symbol_name, snake_case, mangle class HooksManager: """A hooks class.""" @classmethod def _genera...
[ "functools.partial", "metapandas.util.friendly_symbol_name", "metapandas.util.snake_case", "metapandas.util.mangle" ]
[((2290, 2315), 'metapandas.util.friendly_symbol_name', 'friendly_symbol_name', (['obj'], {}), '(obj)\n', (2310, 2315), False, 'from metapandas.util import vprint, friendly_symbol_name, snake_case, mangle\n'), ((2347, 2417), 'metapandas.util.mangle', 'mangle', ([], {'prefix': 'mangled_prefix', 'name': 'method_name', 's...
""" logs cog """ from datetime import datetime as dt import logging logging.basicConfig( handlers=[logging.FileHandler('discord.log', 'a', 'utf-8')], level=logging.INFO ) # region -----LOGS def commandinfo(ctx): # log when a command it's used now = dt.now().strftime('%m/%d %H:%M') logging.info(f'...
[ "logging.info", "datetime.datetime.now", "logging.FileHandler" ]
[((305, 449), 'logging.info', 'logging.info', (['f"""{now} COMMAND USED; Guild_id: {ctx.message.guild.id} Author_id: {ctx.message.author.id} Invoke: {ctx.message.content}"""'], {}), "(\n f'{now} COMMAND USED; Guild_id: {ctx.message.guild.id} Author_id: {ctx.message.author.id} Invoke: {ctx.message.content}'\n )\n"...
import logging from lbryschema.base import b58encode_with_checksum, b58decode_strip_checksum from lbryum.util import rev_hex, int_to_hex, is_extended_pubkey from lbryum.lbrycrd import deserialize_xkey, bip32_public_derivation from lbryum.lbrycrd import CKD_pub, bip32_private_key from lbryum.account import Account lo...
[ "lbryum.lbrycrd.CKD_pub", "lbryum.account.Account.dump", "lbryum.lbrycrd.deserialize_xkey", "lbryum.lbrycrd.bip32_private_key", "lbryum.util.is_extended_pubkey", "lbryum.account.Account.__init__", "lbryum.lbrycrd.bip32_public_derivation", "lbryschema.base.b58encode_with_checksum", "lbryschema.base.b...
[((324, 351), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (341, 351), False, 'import logging\n'), ((419, 444), 'lbryum.account.Account.__init__', 'Account.__init__', (['self', 'v'], {}), '(self, v)\n', (435, 444), False, 'from lbryum.account import Account\n'), ((2941, 2959), 'lbryum.a...
import os import ubelt as ub import numpy as np import netharn as nh import torch import torchvision import itertools as it import utool as ut import glob from collections import OrderedDict import parse def _auto_argparse(func): """ Transform a function with a Google Style Docstring into an `argparse.Argum...
[ "ubelt.ProgIter", "argparse.ArgumentParser", "glob.glob", "pandas.set_option", "torch.load", "torch.Tensor", "numpy.linspace", "ubelt.ensuredir", "pandas.concat", "parse.log.setLevel", "ubelt.argval", "xdoctest.docscrape_google.split_google_docblocks", "netharn.examples.siam_ibeis.setup_harn...
[((545, 569), 'inspect.getargspec', 'inspect.getargspec', (['func'], {}), '(func)\n', (563, 569), False, 'import inspect\n'), ((1006, 1115), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': 'description', 'formatter_class': 'argparse.ArgumentDefaultsHelpFormatter'}), '(description=description,...
"""Jahnke, Student ID: 0808831 <EMAIL> / <EMAIL> CSCI 160, Spring 2022, Lecture Sect 02, Lab Sect L03 Lab 09 Create a module that prompts the user for a string and checks if that string is a palindrome. Functions: reverse_by_index(string) Reverses a string via indexing. reverse_via_join(string) ...
[ "random.choice" ]
[((2274, 2299), 'random.choice', 'choice', (['reverse_functions'], {}), '(reverse_functions)\n', (2280, 2299), False, 'from random import choice\n')]
# -*- coding: utf-8 -*- import collections class SetValuesMixin(object): """Provide set_value related functionality to statement classes. Note: This class is not to be instantiated directly. """ def __init__(self, **kwargs): """Constructor Keyword Arguments: **k...
[ "collections.OrderedDict" ]
[((440, 465), 'collections.OrderedDict', 'collections.OrderedDict', ([], {}), '()\n', (463, 465), False, 'import collections\n'), ((493, 518), 'collections.OrderedDict', 'collections.OrderedDict', ([], {}), '()\n', (516, 518), False, 'import collections\n')]
#!/usr/bin/env python ''' Tiger ''' import json import os import subprocess import time import re from collections import OrderedDict from lib.timespan import get_timespan from lib.logger import get_logger from tasks.base_tasks import (ColumnsTask, TempTableTask, TableTask, TagsTask, Carto2TempTableTask, ...
[ "tasks.util.shell", "tasks.meta.OBSTag", "luigi.LocalTarget", "luigi.Parameter", "os.path.join", "tasks.tags.BoundaryTags", "tasks.meta.OBSColumn", "lib.logger.get_logger", "tasks.tags.SubsectionTags", "os.path.dirname", "tasks.meta.current_session", "tasks.tags.LicenseTags", "collections.Or...
[((891, 911), 'lib.logger.get_logger', 'get_logger', (['__name__'], {}), '(__name__)\n', (901, 911), False, 'from lib.logger import get_logger\n'), ((1453, 1467), 'luigi.IntParameter', 'IntParameter', ([], {}), '()\n', (1465, 1467), False, 'from luigi import Task, WrapperTask, Parameter, LocalTarget, IntParameter\n'), ...
# -*- coding: utf-8 -*- """ File Name: split-array-into-consecutive-subsequences.py Author : jynnezhang Date: 2020/12/4 2:19 下午 Description: https://leetcode-cn.com/problems/split-array-into-consecutive-subsequences/ """ import collections import heapq class Solution: def isPossible(self, nums=[])...
[ "collections.defaultdict", "heapq.heappush", "heapq.heappop" ]
[((406, 435), 'collections.defaultdict', 'collections.defaultdict', (['list'], {}), '(list)\n', (429, 435), False, 'import collections\n'), ((527, 547), 'heapq.heappop', 'heapq.heappop', (['queue'], {}), '(queue)\n', (540, 547), False, 'import heapq\n'), ((564, 601), 'heapq.heappush', 'heapq.heappush', (['mp[x]', '(pre...
import tensorflow as tf from tensorflow.keras.layers.experimental.preprocessing \ import PreprocessingLayer from chemmltoolkit.tensorflow.graph.tensorGraph import map_edge_features from chemmltoolkit.tensorflow.utils import register_keras_custom_object @register_keras_custom_object class AddSelfLoops(Preprocessin...
[ "tensorflow.shape", "chemmltoolkit.tensorflow.graph.tensorGraph.map_edge_features" ]
[((933, 965), 'chemmltoolkit.tensorflow.graph.tensorGraph.map_edge_features', 'map_edge_features', (['inputs', '_call'], {}), '(inputs, _call)\n', (950, 965), False, 'from chemmltoolkit.tensorflow.graph.tensorGraph import map_edge_features\n'), ((849, 872), 'tensorflow.shape', 'tf.shape', (['edge_features'], {}), '(edg...
from direct.directnotify import DirectNotifyGlobal from toontown.classicchars.DistributedMickeyAI import DistributedMickeyAI from toontown.toonbase import ToontownGlobals class DistributedWitchMinnieAI(DistributedMickeyAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedWitchMinnieAI') def w...
[ "direct.directnotify.DirectNotifyGlobal.directNotify.newCategory" ]
[((238, 309), 'direct.directnotify.DirectNotifyGlobal.directNotify.newCategory', 'DirectNotifyGlobal.directNotify.newCategory', (['"""DistributedWitchMinnieAI"""'], {}), "('DistributedWitchMinnieAI')\n", (281, 309), False, 'from direct.directnotify import DirectNotifyGlobal\n')]
import tkinter from tkinter import messagebox import mysql.connector as back myform=tkinter.Tk(className="Add") name=tkinter.Label(text="Roll") Add=tkinter.Label(text="Course",bg="Red",fg="white") name.grid(row=0) Add.grid(row=1) nm=tkinter.Entry() ad=tkinter.Entry() nm.grid(row=0,column=1) ad.grid(row=1,column=1) de...
[ "mysql.connector.connect", "tkinter.Button", "tkinter.Entry", "tkinter.messagebox.showinfo", "tkinter.Label", "tkinter.Tk" ]
[((86, 113), 'tkinter.Tk', 'tkinter.Tk', ([], {'className': '"""Add"""'}), "(className='Add')\n", (96, 113), False, 'import tkinter\n'), ((119, 145), 'tkinter.Label', 'tkinter.Label', ([], {'text': '"""Roll"""'}), "(text='Roll')\n", (132, 145), False, 'import tkinter\n'), ((150, 200), 'tkinter.Label', 'tkinter.Label', ...
''' graph2stats.py - calculate statistics for a (redundant) graph ============================================================= :Author: <NAME> :Release: $Id$ :Date: |today| :Tags: Python Purpose ------- This script reads a :term:`graph` in :term:`edge list` format and computes stats on each edges. This only make ...
[ "CGAT.Histogram.Calculate", "CGAT.Experiment.OptionParser", "CGAT.Histogram.Normalize", "CGAT.Experiment.Stop", "CGAT.Histogram.Print", "CGAT.Experiment.Start", "sys.stdin.readlines", "CGAT.Histogram.Cumulate", "CGAT.Histogram.Combine" ]
[((724, 748), 'CGAT.Histogram.Combine', 'Histogram.Combine', (['hists'], {}), '(hists)\n', (741, 748), True, 'import CGAT.Histogram as Histogram\n'), ((802, 860), 'CGAT.Histogram.Print', 'Histogram.Print', (['combined_histogram'], {'nonull': 'options.nonull'}), '(combined_histogram, nonull=options.nonull)\n', (817, 860...
import requests from src.meal.meal import Meal resp = requests.get("https://www.themealdb.com/api/json/v1/1/search.php?s=Arrabiata") meal = Meal() resp = meal.get_meal('Arrabiata') print(resp['meals'])
[ "src.meal.meal.Meal", "requests.get" ]
[((55, 133), 'requests.get', 'requests.get', (['"""https://www.themealdb.com/api/json/v1/1/search.php?s=Arrabiata"""'], {}), "('https://www.themealdb.com/api/json/v1/1/search.php?s=Arrabiata')\n", (67, 133), False, 'import requests\n'), ((144, 150), 'src.meal.meal.Meal', 'Meal', ([], {}), '()\n', (148, 150), False, 'fr...
from django import forms from django.utils.translation import ugettext_lazy as _ from django.core import validators import decimal recipient_validator = validators.RegexValidator('CT-[0-9]{7}', message=_( 'Неверно указан получатель' )) class SendMoneyForm(forms.Form): recipient = forms.CharField(lab...
[ "django.forms.TextInput", "django.utils.translation.ugettext_lazy", "decimal.Decimal" ]
[((204, 234), 'django.utils.translation.ugettext_lazy', '_', (['"""Неверно указан получатель"""'], {}), "('Неверно указан получатель')\n", (205, 234), True, 'from django.utils.translation import ugettext_lazy as _\n'), ((323, 338), 'django.utils.translation.ugettext_lazy', '_', (['"""Получатель"""'], {}), "('Получатель...
#!/usr/bin/env python3 import sys from unitypack.asset import Asset from PIL import Image MAX_HEIGHT = 20000 def main(filename, outpath): f = open(filename, 'rb') tabledata = Asset.from_file(f) # find the terrain height map indx = 0 for k, v in tabledata.objects.items(): if v.type == 'TerrainData': indx =...
[ "PIL.Image.new", "sys.exit", "unitypack.asset.Asset.from_file" ]
[((180, 198), 'unitypack.asset.Asset.from_file', 'Asset.from_file', (['f'], {}), '(f)\n', (195, 198), False, 'from unitypack.asset import Asset\n'), ((680, 782), 'PIL.Image.new', 'Image.new', (['"""RGB"""', "(terrainData['m_Heightmap']['m_Width'], terrainData['m_Heightmap']['m_Height'])"], {}), "('RGB', (terrainData['m...
import numpy as np from opt_einsum import contract from ..symbol import Symbols from ..base import simplify a, b, c = Symbols("abc") def test_einsum(): contract("i->", np.array([a, b]), backend="qop") simplify( contract( "ijk,i->jk", c * np.ones([3, 3, 3]), np.array([a, b, c]), backend="q...
[ "numpy.array", "numpy.ones" ]
[((175, 191), 'numpy.array', 'np.array', (['[a, b]'], {}), '([a, b])\n', (183, 191), True, 'import numpy as np\n'), ((289, 308), 'numpy.array', 'np.array', (['[a, b, c]'], {}), '([a, b, c])\n', (297, 308), True, 'import numpy as np\n'), ((269, 287), 'numpy.ones', 'np.ones', (['[3, 3, 3]'], {}), '([3, 3, 3])\n', (276, 2...
from tasks import add result = add.delay(30000, 1337) print(result.ready()) print(result.get()) print(result.ready())
[ "tasks.add.delay" ]
[((31, 53), 'tasks.add.delay', 'add.delay', (['(30000)', '(1337)'], {}), '(30000, 1337)\n', (40, 53), False, 'from tasks import add\n')]
#!/usr/bin/python # -*- coding: utf-8 -*- import os import re # relpath def relpath( path_, start="." ) : """Return a relative version of a path_""" if not path_ : raise ValueError("no path_ specified") # start_list = os.path.abspath(start).split("/") # path_list = os.path.abspath(path...
[ "os.path.commonprefix", "os.path.join" ]
[((728, 751), 'os.path.join', 'os.path.join', (['*rel_list'], {}), '(*rel_list)\n', (740, 751), False, 'import os\n'), ((568, 613), 'os.path.commonprefix', 'os.path.commonprefix', (['[start_list, path_list]'], {}), '([start_list, path_list])\n', (588, 613), False, 'import os\n')]
from django.test import TestCase from django.conf import settings from slackclient import SlackClient import os import logging from nlp.slackutils import SlackUtil class slackutilsTestCase(TestCase): def setUp(self): self.slack_token = os.environ['SLACK_TOKEN'] def test_list_channels_page(self): ...
[ "nlp.slackutils.SlackUtil" ]
[((337, 364), 'nlp.slackutils.SlackUtil', 'SlackUtil', (['self.slack_token'], {}), '(self.slack_token)\n', (346, 364), False, 'from nlp.slackutils import SlackUtil\n'), ((532, 559), 'nlp.slackutils.SlackUtil', 'SlackUtil', (['self.slack_token'], {}), '(self.slack_token)\n', (541, 559), False, 'from nlp.slackutils impor...
from typing import List from os import path ERROR_ARGUMENT = 1 SUCCESS = 0 class Options: def __init__(self, argv: List[str]) -> None: self.argv = argv self.argc = len(argv) self.options = ".md" self.path: str # COMMANDES def process_argument(self) -> bool: """ ...
[ "os.path.isdir", "os.path.isfile" ]
[((1581, 1595), 'os.path.isfile', 'path.isfile', (['s'], {}), '(s)\n', (1592, 1595), False, 'from os import path\n'), ((1692, 1705), 'os.path.isdir', 'path.isdir', (['s'], {}), '(s)\n', (1702, 1705), False, 'from os import path\n')]
import sys from sftools.encryption_keys.encrypt_data import encrypt_data from sftools.encryption_keys.generate_personal_keys import generate_personal_keys from sftools.protocol.validate_data import main as validate_data from sftools.protocol.run_protocol import main as run_protocol def main(): if len(sys.argv) < ...
[ "sftools.protocol.run_protocol.main", "sftools.protocol.validate_data.main", "sftools.encryption_keys.encrypt_data.encrypt_data", "sftools.encryption_keys.generate_personal_keys.generate_personal_keys" ]
[((498, 522), 'sftools.encryption_keys.generate_personal_keys.generate_personal_keys', 'generate_personal_keys', ([], {}), '()\n', (520, 522), False, 'from sftools.encryption_keys.generate_personal_keys import generate_personal_keys\n'), ((571, 585), 'sftools.encryption_keys.encrypt_data.encrypt_data', 'encrypt_data', ...
#!/usr/bin/python3 # -*- coding: utf-8 -*- from xy.device import Device from numpy import row_stack def main(args): from modules.utils import get_paths_from_file as get fn = args.fn paths = row_stack(get(fn, spatial_sort=False, spatial_concat=False)) with Device(scale=0.99, drawing_speed=10, penup=1) as ...
[ "xy.device.Device", "modules.utils.get_paths_from_file", "argparse.ArgumentParser" ]
[((416, 441), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (439, 441), False, 'import argparse\n'), ((212, 261), 'modules.utils.get_paths_from_file', 'get', (['fn'], {'spatial_sort': '(False)', 'spatial_concat': '(False)'}), '(fn, spatial_sort=False, spatial_concat=False)\n', (215, 261), True...
# ---------------------------------------------------------------------------- # cocos2d # Copyright (c) 2008-2012 <NAME>, <NAME>, <NAME>, # <NAME> # Copyright (c) 2009-2019 <NAME>, <NAME> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provid...
[ "math.radians", "math.cos", "math.sin" ]
[((7221, 7255), 'math.radians', 'math.radians', (['self.target.rotation'], {}), '(self.target.rotation)\n', (7233, 7255), False, 'import math\n'), ((7351, 7362), 'math.sin', 'math.sin', (['r'], {}), '(r)\n', (7359, 7362), False, 'import math\n'), ((7370, 7381), 'math.cos', 'math.cos', (['r'], {}), '(r)\n', (7378, 7381)...
from pages.factories import ConditionPageFactory from .base import ContentAPIBaseTestCase class GetByUrlPathTestCase(ContentAPIBaseTestCase): """ Tests getting a page by its path. """ def setUp(self): super().setUp() self.page = ConditionPageFactory(title='Page') def test_get(sel...
[ "pages.factories.ConditionPageFactory" ]
[((264, 298), 'pages.factories.ConditionPageFactory', 'ConditionPageFactory', ([], {'title': '"""Page"""'}), "(title='Page')\n", (284, 298), False, 'from pages.factories import ConditionPageFactory\n')]
from fastapi import FastAPI from fastapi.routing import APIRoute app = FastAPI() @app.get("/items/") async def read_items(): return [{"item_id": "Foo"}] def use_route_names_as_operation_ids(app: FastAPI) -> None: """ Simplify operation IDs so that generated API clients have simpler function names. ...
[ "fastapi.FastAPI" ]
[((72, 81), 'fastapi.FastAPI', 'FastAPI', ([], {}), '()\n', (79, 81), False, 'from fastapi import FastAPI\n')]
import StringIO import json import logging import falcon import google.cloud.storage import qrcode from google.appengine.api import app_identity class GoogleCloudStorage(object): storage = google.cloud.storage.Client(app_identity.get_application_id()) @property def bucket(self): return self.stor...
[ "google.appengine.api.app_identity.get_application_id", "logging.debug", "json.dumps", "falcon.API", "qrcode.QRCode", "StringIO.StringIO", "falcon.HTTPMovedPermanently" ]
[((2051, 2063), 'falcon.API', 'falcon.API', ([], {}), '()\n', (2061, 2063), False, 'import falcon\n'), ((224, 257), 'google.appengine.api.app_identity.get_application_id', 'app_identity.get_application_id', ([], {}), '()\n', (255, 257), False, 'from google.appengine.api import app_identity\n'), ((764, 872), 'qrcode.QRC...
# vim:ts=4:sts=4:sw=4:expandtab from kolejka.common.cgroups import ControlGroupSystem from kolejka.common.http_socket import HTTPUnixServer, HTTPUnixConnection from kolejka.common.parse import TimeAction, MemoryAction, parse_time, parse_memory from kolejka.common.config import KolejkaConfig, kolejka_config, client_co...
[ "kolejka.client.client.config_parser", "argparse.ArgumentParser", "logging.basicConfig", "kolejka.worker.config_parser", "kolejka.observer.server.config_parser", "setproctitle.setproctitle", "kolejka.foreman.foreman.config_parser" ]
[((558, 594), 'setproctitle.setproctitle', 'setproctitle.setproctitle', (['"""kolejka"""'], {}), "('kolejka')\n", (583, 594), False, 'import setproctitle\n'), ((608, 654), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""KOLEJKA"""'}), "(description='KOLEJKA')\n", (631, 654), False, 'impor...
# encoding: utf-8 __author__ = '<NAME>' """ utils.py Created by lex at 2019-03-24. """ import random import string def randomString(stringLength=10): """Generate a random string of fixed length """ letters = string.ascii_lowercase return ''.join(random.choice(letters) for i in range(stringLength)) def ...
[ "random.choice" ]
[((261, 283), 'random.choice', 'random.choice', (['letters'], {}), '(letters)\n', (274, 283), False, 'import random\n')]
import asyncio from pyppeteer import launch async def render_js(url): browser = await launch(headless=True) # 1 page = await browser.newPage() # 2 await page.setViewport({'height': 1000, 'width': 1200}) response = await page.goto(url, waitUntil='networkidle0') # 3 content = await page.content() # 3...
[ "pyppeteer.launch", "asyncio.get_event_loop" ]
[((470, 494), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (492, 494), False, 'import asyncio\n'), ((91, 112), 'pyppeteer.launch', 'launch', ([], {'headless': '(True)'}), '(headless=True)\n', (97, 112), False, 'from pyppeteer import launch\n')]
"""Logging related mixin classes""" import json import logging from python_utils.django.serializer.json import DjangoWithFileJSONEncoder from rest_framework import status LOGGER = logging.getLogger(__name__) class LoggingMixin(): """Log Mixin only when one of the following methods is being performed""" all...
[ "rest_framework.status.is_server_error", "rest_framework.status.is_client_error", "logging.getLogger", "json.dumps" ]
[((182, 209), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (199, 209), False, 'import logging\n'), ((1081, 1116), 'rest_framework.status.is_server_error', 'status.is_server_error', (['status_code'], {}), '(status_code)\n', (1103, 1116), False, 'from rest_framework import status\n'), ((1...
#!/usr/bin/env python import pandas as pd import geopandas as gpd out_file='../hackathon4good2021/data/measurements_Mg.csv' csv_files=['../data/IM_Metingen_2020/IM-Metingen_2020_1_mnd01tm-04.csv','../data/IM_Metingen_2020/IM-Metingen_2020_2_mnd05tm-07.csv','../data/IM_Metingen_2020/IM-Metingen_2020_3_mnd08tm-09.csv'...
[ "pandas.read_csv", "pandas.merge", "geopandas.points_from_xy" ]
[((664, 735), 'pandas.read_csv', 'pd.read_csv', (['"""../data/Meetlocaties_2020/Meetlocaties_2020.csv"""'], {'sep': '""";"""'}), "('../data/Meetlocaties_2020/Meetlocaties_2020.csv', sep=';')\n", (675, 735), True, 'import pandas as pd\n'), ((746, 842), 'pandas.merge', 'pd.merge', (['df_ft', "df_ml[['Meetobject.code', 'x...
from acondbs import auth ##__________________________________________________________________|| def test_true(app): token = '90b2ee5fed25506df04fd37343bb68d1803dd97f' environ_base = {'HTTP_AUTHORIZATION': f'Bearer {token}'} with app.test_request_context(environ_base=environ_base): assert auth.is_si...
[ "acondbs.auth.is_signed_in" ]
[((310, 329), 'acondbs.auth.is_signed_in', 'auth.is_signed_in', ([], {}), '()\n', (327, 329), False, 'from acondbs import auth\n'), ((632, 651), 'acondbs.auth.is_signed_in', 'auth.is_signed_in', ([], {}), '()\n', (649, 651), False, 'from acondbs import auth\n'), ((857, 876), 'acondbs.auth.is_signed_in', 'auth.is_signed...
import json import os import re import sys from jsonschema import validate, exceptions from icon_validator.rules.validator import KomandPluginValidator from icon_validator.exceptions import ValidationException class OutputValidator(KomandPluginValidator): def __init__(self): super().__init__() s...
[ "sys.path.append", "jsonschema.validate", "json.load", "json.loads", "os.path.basename", "os.walk", "os.path.exists", "re.findall", "icon_validator.exceptions.ValidationException", "os.path.join" ]
[((724, 755), 'sys.path.append', 'sys.path.append', (['spec.directory'], {}), '(spec.directory)\n', (739, 755), False, 'import sys\n'), ((786, 809), 'os.walk', 'os.walk', (['spec.directory'], {}), '(spec.directory)\n', (793, 809), False, 'import os\n'), ((1301, 1333), 're.findall', 're.findall', (['output_pattern', 'te...
""" 该DCGAN结构更加符合论文 """ import math import matplotlib.pyplot as plt import numpy as np from data_loader import DataLoader from keras.layers import Dense, Reshape, Conv2D, UpSampling2D, BatchNormalization, ReLU, Activation, Input, LeakyReLU, \ Flatten, Dropout from keras.models import Sequential, Model from keras.o...
[ "numpy.ones", "keras.models.Model", "tensorflow.ConfigProto", "numpy.random.normal", "keras.layers.Input", "keras.layers.Reshape", "matplotlib.pyplot.close", "keras.layers.Flatten", "data_loader.DataLoader", "numpy.add", "matplotlib.pyplot.subplots", "keras.layers.LeakyReLU", "math.ceil", ...
[((460, 476), 'tensorflow.ConfigProto', 'tf.ConfigProto', ([], {}), '()\n', (474, 476), True, 'import tensorflow as tf\n'), ((528, 553), 'tensorflow.Session', 'tf.Session', ([], {'config': 'config'}), '(config=config)\n', (538, 553), True, 'import tensorflow as tf\n'), ((782, 796), 'keras.backend.mean', 'K.mean', (['y_...
"""This module contains templates and classes for generating type specific versions of various sort functions. WARNING: This module exists solely as a mechanism to generate a portion of numarray and is not intended to provide any post-installation functionality. """ from basecode import CodeGenerator, template, all...
[ "basecode.CodeGenerator.__init__", "basecode.all_types" ]
[((15113, 15154), 'basecode.CodeGenerator.__init__', 'CodeGenerator.__init__', (['self', '*components'], {}), '(self, *components)\n', (15135, 15154), False, 'from basecode import CodeGenerator, template, all_types, _HEADER\n'), ((15385, 15396), 'basecode.all_types', 'all_types', ([], {}), '()\n', (15394, 15396), False...
# -*- coding: utf-8 -*- import tos import unittest from requests.structures import CaseInsensitiveDict class TosTestCase(unittest.TestCase): def __init__(self, *args, **kwargs): super(TosTestCase, self).__init__(*args, **kwargs) self.bucket_name = 'test_bucket' self.key_name = 'test_key' ...
[ "tos.Auth", "requests.structures.CaseInsensitiveDict" ]
[((706, 763), 'requests.structures.CaseInsensitiveDict', 'CaseInsensitiveDict', (["{'x-tos-request-id': '021633693288'}"], {}), "({'x-tos-request-id': '021633693288'})\n", (725, 763), False, 'from requests.structures import CaseInsensitiveDict\n'), ((494, 525), 'tos.Auth', 'tos.Auth', (['"""ak"""', '"""sk"""', '"""beij...
# -*- coding: utf-8 -*- from django.core.validators import MinValueValidator, MaxValueValidator from django.db import models import uuid import os def get_file_path(instance, filename): ext = filename.split('.')[-1] filename = "%s.%s" % (uuid.uuid4(), ext) return os.path.join('uploads/buildingmap/', filen...
[ "uuid.uuid4", "django.db.models.CharField", "django.db.models.ForeignKey", "django.core.validators.MinValueValidator", "django.db.models.AutoField", "django.db.models.ImageField", "django.db.models.IntegerField", "os.path.join", "django.core.validators.MaxValueValidator" ]
[((278, 324), 'os.path.join', 'os.path.join', (['"""uploads/buildingmap/"""', 'filename'], {}), "('uploads/buildingmap/', filename)\n", (290, 324), False, 'import os\n'), ((386, 428), 'django.db.models.ImageField', 'models.ImageField', ([], {'upload_to': 'get_file_path'}), '(upload_to=get_file_path)\n', (403, 428), Fal...
from time import sleep n1 = int(input('Digite um número: ')) n2 = int(input('Digite outro número: ')) opcao = 0 while opcao != 1 | opcao != 2 | opcao != 3 | opcao != 4 | opcao != 5: mensagem = print('Escolha a operação a ser realizada:' '\n[1] para adição' '\n[2] ...
[ "time.sleep" ]
[((834, 842), 'time.sleep', 'sleep', (['(3)'], {}), '(3)\n', (839, 842), False, 'from time import sleep\n')]
import subprocess import shutil import argparse import os SYMBOL = 'CppHint' CANDIDATE_FILE = '/tmp/candidate.cpp' VARIABLE_FILE = '/tmp/variable.cpp' EXECUTABLE = '/tmp/cpphinter' class NameMap: def __init__(self): self.map = {} self.terminate = False def __str__(self): return str(se...
[ "subprocess.Popen", "os.path.abspath", "os.path.join", "argparse.ArgumentParser" ]
[((388, 413), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (411, 413), False, 'import argparse\n'), ((1504, 1534), 'os.path.join', 'os.path.join', (['build_dir', '"""bin"""'], {}), "(build_dir, 'bin')\n", (1516, 1534), False, 'import os\n'), ((1908, 1938), 'os.path.abspath', 'os.path.abspath'...
#!/usr/bin/env python # coding: utf-8 from __future__ import absolute_import, division, print_function import datetime import json import os import threading import tornado.escape import tornado.gen import tornado.httpclient import tornado.httpserver import tornado.ioloop import tornado.log import tornado.options im...
[ "os.listdir", "threading.Thread.__init__", "json.load", "brorig.log.error", "json.loads", "brorig.log.warning", "brorig.processor.NetworkProcess", "os.path.dirname", "os.path.exists", "brorig.log.debug", "brorig.user.UserList", "json.dumps", "datetime.datetime.utcfromtimestamp", "brorig.pr...
[((10571, 10581), 'brorig.user.UserList', 'UserList', ([], {}), '()\n', (10579, 10581), False, 'from brorig.user import User, UserList\n'), ((768, 799), 'os.path.join', 'os.path.join', (['custom.dir', '"""www"""'], {}), "(custom.dir, 'www')\n", (780, 799), False, 'import os\n'), ((811, 835), 'os.path.exists', 'os.path....
from django import template from ...product.templatetags.product_images import get_thumbnail register = template.Library() @register.simple_tag() def get_benefit_thumbnail(instance, size, method): image_file = None if instance and instance.image: image_file = instance.image return get_thumbnail(...
[ "django.template.Library" ]
[((106, 124), 'django.template.Library', 'template.Library', ([], {}), '()\n', (122, 124), False, 'from django import template\n')]
from django import template from sleep.models import * import datetime register = template.Library() @register.inclusion_tag('inclusion/graph_per_day.html') def graphPerDay(user, interval=None): sleeper = Sleeper.objects.get(pk=user.pk) if interval == None: s = datetime.date.min else: s = datetime.date.tod...
[ "datetime.time", "django.template.Library", "datetime.timedelta", "datetime.date.today" ]
[((82, 100), 'django.template.Library', 'template.Library', ([], {}), '()\n', (98, 100), False, 'from django import template\n'), ((303, 324), 'datetime.date.today', 'datetime.date.today', ([], {}), '()\n', (322, 324), False, 'import datetime\n'), ((327, 355), 'datetime.timedelta', 'datetime.timedelta', (['interval'], ...
from typing import Union import re from azfs.error import ( AzfsInputError ) class BlobPathDecoder: def __init__(self, path: Union[None, str] = None): self.storage_account_name = None # blob: blob or data_lake: dfs self.account_type = None self.container_name = None sel...
[ "azfs.error.AzfsInputError", "re.match" ]
[((733, 760), 're.match', 're.match', (['url_pattern', 'path'], {}), '(url_pattern, path)\n', (741, 760), False, 'import re\n'), ((1007, 1056), 'azfs.error.AzfsInputError', 'AzfsInputError', (['f"""not matched with {url_pattern}"""'], {}), "(f'not matched with {url_pattern}')\n", (1021, 1056), False, 'from azfs.error i...
# encoding: utf-8 """ @author: <NAME> @contact: <EMAIL> """ from torch.utils.data.sampler import SequentialSampler from torch.utils.data.sampler import RandomSampler def build_sampler(cfg, data_source, num_classes, set_name="train", is_train=True): if cfg.DATA.DATALOADER.SAMPLER == "sequential": sampler...
[ "torch.utils.data.sampler.RandomSampler", "torch.utils.data.sampler.SequentialSampler" ]
[((323, 353), 'torch.utils.data.sampler.SequentialSampler', 'SequentialSampler', (['data_source'], {}), '(data_source)\n', (340, 353), False, 'from torch.utils.data.sampler import SequentialSampler\n'), ((422, 467), 'torch.utils.data.sampler.RandomSampler', 'RandomSampler', (['data_source'], {'replacement': '(False)'})...
from opinion import api if __name__ == '__main__': api.download_media_ids('all_media.csv')
[ "opinion.api.download_media_ids" ]
[((57, 96), 'opinion.api.download_media_ids', 'api.download_media_ids', (['"""all_media.csv"""'], {}), "('all_media.csv')\n", (79, 96), False, 'from opinion import api\n')]
from youtube_search import YoutubeSearch from youtubesearchpython import CustomSearch, VideoSortOrder, ChannelsSearch, Search, Video, ChannelSearch, StreamURLFetcher from youtubesearchpython.internal.constants import ResultMode from pytube import YouTube def normal_results(search_term): results = YoutubeSear...
[ "youtube_search.YoutubeSearch", "youtubesearchpython.Video.getInfo", "pytube.YouTube" ]
[((438, 462), 'youtubesearchpython.Video.getInfo', 'Video.getInfo', (['video_url'], {}), '(video_url)\n', (451, 462), False, 'from youtubesearchpython import CustomSearch, VideoSortOrder, ChannelsSearch, Search, Video, ChannelSearch, StreamURLFetcher\n'), ((798, 816), 'pytube.YouTube', 'YouTube', (['video_url'], {}), '...
#TODO: # - Database stuff (remove it) # - deployment # # - fix image links in the html docs # - should i use trailing slash for url definitions or not? # URL mappings # Home (/) # Background '/<analysis>/background' # Analysis Input '/<anaysis>/analyze' # Analysis Output '/<analysis>/results' # Code (/code) # Contact...
[ "flask.redirect", "flask.Flask", "sqlite3.connect", "flask.render_template" ]
[((528, 543), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (533, 543), False, 'from flask import Flask, render_template, request, redirect, url_for\n'), ((1151, 1190), 'sqlite3.connect', 'sqlite3.connect', (["app.config['DATABASE']"], {}), "(app.config['DATABASE'])\n", (1166, 1190), False, 'import sqlite...
"""Figure 1F""" """This script is used to create the Repertoire Dendrogram of the Rudqvist_2017 dataset.""" from DeepTCR.DeepTCR import DeepTCR_U # Instantiate training object DTCRU = DeepTCR_U('Rep_Dendrogram',device='/device:GPU:1') #Load Data from directories DTCRU.Get_Data(directory='../../Data/Rudqvist',Load_P...
[ "matplotlib.pyplot.scatter", "matplotlib.pyplot.figure", "DeepTCR.DeepTCR.DeepTCR_U" ]
[((187, 238), 'DeepTCR.DeepTCR.DeepTCR_U', 'DeepTCR_U', (['"""Rep_Dendrogram"""'], {'device': '"""/device:GPU:1"""'}), "('Rep_Dendrogram', device='/device:GPU:1')\n", (196, 238), False, 'from DeepTCR.DeepTCR import DeepTCR_U\n'), ((937, 949), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (947, 949), True,...
# Copyright 2019 École Polytechnique F<NAME>. 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 ap...
[ "tensorflow.contrib.persona.persona_ops", "tensorflow.contrib.gate.unix_timestamp", "tensorflow.contrib.persona.pipeline.local_write_pipeline", "multiprocessing.cpu_count", "tensorflow.contrib.gate.log_events", "tensorflow.contrib.persona.pipeline.join", "tensorflow.contrib.persona.pipeline.local_read_p...
[((1011, 1043), 'tensorflow.contrib.persona.persona_ops', 'tf.contrib.persona.persona_ops', ([], {}), '()\n', (1041, 1043), True, 'import tensorflow as tf\n'), ((1147, 1187), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.DEBUG'}), '(level=logging.DEBUG)\n', (1166, 1187), False, 'import logging\n...
#imports from extra import common import time import csv,cv2, os import numpy as np import matplotlib.pyplot as plt from scipy.ndimage import gaussian_filter1d from sklearn.neighbors import NearestNeighbors import pandas as pd os_path = str(os.path) if 'posix' in os_path: import posixpath as path elif 'nt' in os_pa...
[ "scipy.ndimage.gaussian_filter1d", "matplotlib.pyplot.figure", "extra.common.save_image", "numpy.unique", "pandas.DataFrame", "cv2.cvtColor", "time.clock", "sklearn.neighbors.NearestNeighbors", "numpy.int32", "cv2.resize", "ntpath.join", "csv.writer", "extra.common.displayCoordinates", "nu...
[((655, 667), 'time.clock', 'time.clock', ([], {}), '()\n', (665, 667), False, 'import time\n'), ((1020, 1074), 'extra.common.call_preprocessing', 'common.call_preprocessing', (['firstImage', 'smoothingmethod'], {}), '(firstImage, smoothingmethod)\n', (1045, 1074), False, 'from extra import common\n'), ((2131, 2155), '...
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name='gym-anm', version='1.0.1', url='http://github.com/robinhenry/gym-anm', author='<NAME>', description="A framework to build Reinforcement Learning environments for Active Network M...
[ "setuptools.find_packages" ]
[((523, 549), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (547, 549), False, 'import setuptools\n')]
""" PyTorch script for model training (Variational Autoencoder). Copyright (C) 2020 by <NAME> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any...
[ "pytorch_model.VariationalAutoEncoder", "torch.nn.MSELoss", "common.logger.info", "os.makedirs", "common.yaml_load", "torch.utils.data.DataLoader", "common.logger.exception", "common.file_to_vector_array", "common.command_line_chk", "torchsummary.summary", "torch.cuda.is_available", "common.se...
[((1007, 1034), 'common.yaml_load', 'com.yaml_load', (['"""./vae.yaml"""'], {}), "('./vae.yaml')\n", (1020, 1034), True, 'import common as com\n'), ((4051, 4073), 'common.command_line_chk', 'com.command_line_chk', ([], {}), '()\n', (4071, 4073), True, 'import common as com\n'), ((4176, 4228), 'os.makedirs', 'os.makedir...
from django.urls import include, path from .. import views from ..controllers import CommentAPIHandler, RecipeAPIHandler recipe_handler = RecipeAPIHandler.instance() comment_handler = CommentAPIHandler.instance() app_name = 'koocook_core' urlpatterns = [ path('', views.index, name='index'), path('posts/', inc...
[ "django.urls.path", "django.urls.include" ]
[((261, 296), 'django.urls.path', 'path', (['""""""', 'views.index'], {'name': '"""index"""'}), "('', views.index, name='index')\n", (265, 296), False, 'from django.urls import include, path\n'), ((589, 660), 'django.urls.path', 'path', (['"""comments/<int:item_id>"""', 'comment_handler.handle'], {'name': '"""comments"...
#!/usr/bin/env python3 mqtt_host = 'mqtt.home' import paho.mqtt.client as paho from threading import Timer import datetime import dateutil.parser import time from pytz import timezone import math import os import sys import json import re from PIL import Image from PIL import ImageDraw from PIL import ImageFont ...
[ "threading.Timer", "PIL.Image.new", "math.fmod", "datetime.today", "datetime.time", "math.floor", "epd7in5.EPD", "math.sin", "datetime.datetime.now", "math.acos", "datetime.datetime.strptime", "datetime.timedelta", "pytz.timezone", "math.cos", "PIL.ImageDraw.Draw", "paho.mqtt.client.Cl...
[((1961, 1986), 'pytz.timezone', 'timezone', (['"""Europe/London"""'], {}), "('Europe/London')\n", (1969, 1986), False, 'from pytz import timezone\n'), ((13033, 13046), 'paho.mqtt.client.Client', 'paho.Client', ([], {}), '()\n', (13044, 13046), True, 'import paho.mqtt.client as paho\n'), ((446, 459), 'epd7in5.EPD', 'ep...
#!/bin/python import time while True: time.sleep(1)
[ "time.sleep" ]
[((49, 62), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (59, 62), False, 'import time\n')]
#!/home/fodl/asafmaman/anaconda3/envs/pet/bin/python import argparse import os import torch from common.constants import DATASETS_DIRS from pet.tasks import PROCESSORS, load_examples, UNLABELED_SET from pet.utils import Timer import pet import log logger = log.get_logger('root') def generate_soft_labels(args): ...
[ "argparse.ArgumentParser", "pet.generate_soft_labels", "os.path.exists", "torch.cuda.device_count", "pet.tasks.load_examples", "log.get_logger", "pet.tasks.PROCESSORS.keys", "torch.cuda.is_available", "pet.utils.Timer" ]
[((262, 284), 'log.get_logger', 'log.get_logger', (['"""root"""'], {}), "('root')\n", (276, 284), False, 'import log\n'), ((331, 350), 'pet.utils.Timer', 'Timer', (['"""end-to-end"""'], {}), "('end-to-end')\n", (336, 350), False, 'from pet.utils import Timer\n'), ((795, 820), 'torch.cuda.device_count', 'torch.cuda.devi...
from .IO import read as _read from .QC import qc as _qc from .normalization import normalize as _normalize from .imputation import impute as _impute from .reshaping import reshape as _reshape from .modeling import buildmodel as _buildmodel from .interpretation import explain as _explain import pandas as pd import numpy...
[ "pandas.DataFrame", "captum.attr.visualization.visualize_image_attr", "numpy.random.choice", "pandas.concat", "sys.exit" ]
[((794, 847), 'numpy.random.choice', 'np.random.choice', (['n_all'], {'size': 'n_select', 'replace': '(False)'}), '(n_all, size=n_select, replace=False)\n', (810, 847), True, 'import numpy as np\n'), ((539, 550), 'sys.exit', 'sys.exit', (['(0)'], {}), '(0)\n', (547, 550), False, 'import sys\n'), ((6035, 6110), 'pandas....
"""Retrieving Google Calendar information.""" from __future__ import print_function import datetime from datetime import timedelta import pickle import os.path from googleapiclient.discovery import build from google_auth_oauthlib.flow import InstalledAppFlow from google.auth.transport.requests import Request from auth...
[ "pickle.dump", "google.auth.transport.requests.Request", "_redis.open_redis_connection", "datetime.datetime.now", "datetime.datetime.utcnow", "pickle.load", "datetime.timedelta", "google_auth_oauthlib.flow.InstalledAppFlow.from_client_secrets_file", "googleapiclient.discovery.build" ]
[((1713, 1755), 'googleapiclient.discovery.build', 'build', (['"""calendar"""', '"""v3"""'], {'credentials': 'creds'}), "('calendar', 'v3', credentials=creds)\n", (1718, 1755), False, 'from googleapiclient.discovery import build\n'), ((3489, 3512), '_redis.open_redis_connection', 'open_redis_connection', ([], {}), '()\...
import asyncio import pytest from n2yo.n2yo import N2YO @pytest.mark.asyncio async def test_get_satellite_positions(): n2yo = N2YO( api_key='<KEY>', latitude=45.4642, longitude=9.1900, altitude=0 ) info, ans = await n2yo.get_satellite_positions(25544, 60) assert info['satid'] == 2554...
[ "n2yo.n2yo.N2YO" ]
[((134, 201), 'n2yo.n2yo.N2YO', 'N2YO', ([], {'api_key': '"""<KEY>"""', 'latitude': '(45.4642)', 'longitude': '(9.19)', 'altitude': '(0)'}), "(api_key='<KEY>', latitude=45.4642, longitude=9.19, altitude=0)\n", (138, 201), False, 'from n2yo.n2yo import N2YO\n')]
############################################################################### # Copyright (c) 2015-2019, Lawrence Livermore National Security, LLC. # # Produced at the Lawrence Livermore National Laboratory # # LLNL-CODE-716457 # # All rights reserved. # # This file is part of Ascent. # # For details, see: http://asc...
[ "os.path.split", "os.path.join" ]
[((2355, 2413), 'os.path.join', 'pjoin', (['""".."""', '""".."""', '""".."""', '"""src"""', '"""tests"""', '"""baseline_images"""'], {}), "('..', '..', '..', 'src', 'tests', 'baseline_images')\n", (2360, 2413), True, 'from os.path import join as pjoin\n'), ((2420, 2446), 'os.path.join', 'pjoin', (['baseline_dir', 'fnam...
import argparse import json import os import pickle from typing import List import numpy as np import rasterio as rio from rasterio.merge import merge def load_file(path: str): if path.endswith("pkl"): with open(path, "rb") as f: return pickle.load(f) with open(path) as j: return...
[ "rasterio.open", "json.load", "os.remove", "argparse.ArgumentParser", "os.path.basename", "rasterio.transform.from_bounds", "os.path.dirname", "os.path.exists", "pickle.load", "rasterio.merge.merge", "os.path.join" ]
[((3878, 3903), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (3901, 3903), False, 'import argparse\n'), ((321, 333), 'json.load', 'json.load', (['j'], {}), '(j)\n', (330, 333), False, 'import json\n'), ((1334, 1369), 'os.path.join', 'os.path.join', (['directory', '"""bbox.pkl"""'], {}), "(dir...
""" File used to test the requester - replyer connection pair """ import subprocess from connection_testing_utils import get_exec_command_for_python_program RUN_REP_FILE_PATH = './tests/connection_integration_tests/data/request_replyer_test/run_replyer.sh' RUN_REQ_FILE_PATH = './tests/connection_integration_tests/dat...
[ "connection_testing_utils.get_exec_command_for_python_program", "subprocess.run", "subprocess.Popen" ]
[((534, 588), 'connection_testing_utils.get_exec_command_for_python_program', 'get_exec_command_for_python_program', (['RUN_REQ_FILE_PATH'], {}), '(RUN_REQ_FILE_PATH)\n', (569, 588), False, 'from connection_testing_utils import get_exec_command_for_python_program\n'), ((607, 661), 'connection_testing_utils.get_exec_com...
""" Text GAN Adverserial networks applied to language models using Gumbel Softmax. Can be used as pure language model. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import functools from collections import namedtuple import tensorflow as tf from ten...
[ "data_loader.preprocess", "tensorflow.logging.info", "tensorflow.make_template", "tensorflow.get_collection", "layers.mean_loss_by_example_layer", "data_loader.build_vocab", "tensorflow.zeros_like", "tensorflow.assign", "layers.dense_layer", "tensorflow.reduce_max", "layers.sigmoid_cross_entropy...
[((652, 770), 'collections.namedtuple', 'namedtuple', (['"""Generator"""', "['rnn_outputs', 'flat_logits', 'probs', 'loss', 'embedding_matrix',\n 'output_projections']"], {}), "('Generator', ['rnn_outputs', 'flat_logits', 'probs', 'loss',\n 'embedding_matrix', 'output_projections'])\n", (662, 770), False, 'from c...
import librosa import pathlib import numpy as np from sklearn.model_selection import train_test_split def get_log_mel_spectrogram(path, n_fft, hop_length, n_mels): """ Extract log mel spectrogram 1) The length of the raw audio used is 8s long, 2) and then get the MelSpectrogram, 2) fin...
[ "numpy.full", "numpy.size", "sklearn.model_selection.train_test_split", "numpy.zeros", "numpy.append", "pathlib.Path", "librosa.load", "numpy.array", "librosa.amplitude_to_db", "librosa.feature.melspectrogram" ]
[((436, 476), 'librosa.load', 'librosa.load', (['path'], {'sr': '(16000)', 'duration': '(8)'}), '(path, sr=16000, duration=8)\n', (448, 476), False, 'import librosa\n'), ((496, 506), 'numpy.size', 'np.size', (['y'], {}), '(y)\n', (503, 506), True, 'import numpy as np\n'), ((630, 722), 'librosa.feature.melspectrogram', ...
""" Copyright (c) Microsoft Corporation. Licensed under the MIT license. """ import os import numpy as np import matplotlib.pyplot as plt import logging from typing import * from typing import List from ilp_common_classes import * logger = logging.getLogger('matplotlib') logger.setLevel(logging.WARNING) def visulai...
[ "os.path.join", "matplotlib.pyplot.close", "numpy.where", "numpy.array", "numpy.mean", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.subplots", "logging.getLogger", "matplotlib.pyplot.grid" ]
[((243, 274), 'logging.getLogger', 'logging.getLogger', (['"""matplotlib"""'], {}), "('matplotlib')\n", (260, 274), False, 'import logging\n'), ((546, 580), 'matplotlib.pyplot.subplots', 'plt.subplots', (['(1)', '(1)'], {'figsize': '(8, 4)'}), '(1, 1, figsize=(8, 4))\n', (558, 580), True, 'import matplotlib.pyplot as p...
from pm4py.models.petri import semantics from copy import copy from threading import Thread from pm4py.filtering.tracelog.variants import variants_filter as variants_module MAX_REC_DEPTH = 50 MAX_IT_FINAL = 10 MAX_REC_DEPTH_HIDTRANSENABL = 5 MAX_POSTFIX_SUFFIX_LENGTH = 20 MAX_NO_THREADS = 1000 class NoConceptNameExce...
[ "pm4py.models.petri.semantics.is_enabled", "pm4py.filtering.tracelog.variants.variants_filter.get_variants_sorted_by_count", "threading.Thread.__init__", "pm4py.filtering.tracelog.variants.variants_filter.get_variants_from_log", "copy.copy", "pm4py.models.petri.semantics.enabled_transitions", "pm4py.mod...
[((10751, 10764), 'copy.copy', 'copy', (['marking'], {}), '(marking)\n', (10755, 10764), False, 'from copy import copy\n'), ((15418, 15438), 'copy.copy', 'copy', (['initialMarking'], {}), '(initialMarking)\n', (15422, 15438), False, 'from copy import copy\n'), ((20240, 20253), 'copy.copy', 'copy', (['marking'], {}), '(...
import argparse import datetime import io import pathlib import piexif LATITUDE = ((39, 1), (58, 1), (431, 100)) LATITUDE_REF = b'N' LONGITUDE = ((86, 1), (8, 1), (4346, 100)) LONGITUDE_REF = b'W' def _parse_args(): parser = argparse.ArgumentParser(description='renames and assigns EXIF attributes to downloaded P...
[ "io.BytesIO", "piexif.load", "argparse.ArgumentParser", "piexif.dump" ]
[((232, 356), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""renames and assigns EXIF attributes to downloaded Procare photos and videos"""'}), "(description=\n 'renames and assigns EXIF attributes to downloaded Procare photos and videos'\n )\n", (255, 356), False, 'import argparse...
# -*- coding: utf-8 -*- """ Created on Mon Nov 23 17:36:54 2015 @author: pre """ import mapapi.MapClasses as MapHierarchy import warnings class SimpleValve(MapHierarchy.MapComponent): """Representation of AixLib.Fluid.Actuators.Valves.SimpleValve """ def init_me(self): self.fluid_two_port() ...
[ "mapapi.molibs.MSL.Blocks.Continuous.LimPID.LimPID", "mapapi.molibs.MSL.Blocks.Sources.Constant.Constant", "mapapi.molibs.MSL.Thermal.HeatTransfer.Sensors.TemperatureSensor.TemperatureSensor" ]
[((1583, 1615), 'mapapi.molibs.MSL.Blocks.Continuous.LimPID.LimPID', 'LimPID', (['self.project', 'None', 'self'], {}), '(self.project, None, self)\n', (1589, 1615), False, 'from mapapi.molibs.MSL.Blocks.Continuous.LimPID import LimPID\n'), ((1983, 2017), 'mapapi.molibs.MSL.Blocks.Sources.Constant.Constant', 'Constant',...
# Copyright 2020-2021 Axis Communications AB. # # For a full list of individual contributors, please see the commit history. # # 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...
[ "uuid.uuid4", "json.loads", "suite_starter.suite_starter.SuiteStarter", "mock.patch", "etos_lib.lib.config.Config", "eiffellib.events.EiffelTestExecutionRecipeCollectionCreatedEvent", "logging.getLogger" ]
[((996, 1022), 'logging.getLogger', 'logging.getLogger', (['"""TESTS"""'], {}), "('TESTS')\n", (1013, 1022), False, 'import logging\n'), ((3579, 3632), 'mock.patch', 'patch', (['"""suite_starter.suite_starter.Job._load_config"""'], {}), "('suite_starter.suite_starter.Job._load_config')\n", (3584, 3632), False, 'from mo...
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-09-17 13:48 from __future__ import unicode_literals from django.db import migrations, models import logpipe.settings class Migration(migrations.Migration): dependencies = [ ('logpipe', '0004_auto_20170502_1403'), ] operations = [ ...
[ "django.db.models.CharField" ]
[((428, 1258), 'django.db.models.CharField', 'models.CharField', ([], {'choices': "[('us-east-1', 'US East (N. Virginia)'), ('us-east-2', 'US East (Ohio)'), (\n 'us-west-1', 'US West (N. California)'), ('us-west-2',\n 'US West (Oregon)'), ('ap-south-1', 'Asia Pacific (Mumbai)'), (\n 'ap-northeast-2', 'Asia Pac...
import unittest from dialog_api import peers_pb2, messaging_pb2, definitions_pb2 from dialog_api.peers_pb2 import PEERTYPE_PRIVATE from mock import patch from dialog_bot_sdk.entities.ListLoadMode import ListLoadMode from dialog_bot_sdk.entities.Peer import Peer from dialog_bot_sdk.entities.UUID import UUID from dialog...
[ "dialog_api.messaging_pb2.MessageContent", "tests.test_classes.messaging.Messaging", "tests.bot.bot.messaging.load_message_history", "unittest.main", "dialog_bot_sdk.entities.media.ImageMedia.ImageLocation", "tests.bot.bot.messaging.delete", "dialog_bot_sdk.entities.Peer.Peer", "tests.bot.bot.messagin...
[((947, 958), 'tests.test_classes.messaging.Messaging', 'Messaging', ([], {}), '()\n', (956, 958), False, 'from tests.test_classes.messaging import Messaging\n'), ((986, 995), 'tests.test_classes.updates.Updates', 'Updates', ([], {}), '()\n', (993, 995), False, 'from tests.test_classes.updates import Updates\n'), ((103...
#!/usr/bin/python import logging from logging.handlers import RotatingFileHandler from threading import Lock from datetime import datetime, time from flask import Flask, request, jsonify from flask.json import JSONEncoder import handler from const import KEY class CustomJSONEncoder(JSONEncoder): def default(sel...
[ "handler.list_config", "handler.power_off", "handler.last_command", "threading.Lock", "flask.jsonify", "handler.send_command", "handler.send_last_command", "handler.get_index" ]
[((934, 940), 'threading.Lock', 'Lock', ([], {}), '()\n', (938, 940), False, 'from threading import Lock\n'), ((1026, 1048), 'handler.get_index', 'handler.get_index', (['app'], {}), '(app)\n', (1043, 1048), False, 'import handler\n'), ((1151, 1175), 'handler.list_config', 'handler.list_config', (['app'], {}), '(app)\n'...
from time import time from typing import * import torch from ..datastruct import Diagnostic from ..pipeline import Pipeline def append_ellapsed_time(func): """append the elapsed time to the diagnostics""" def wrapper(*args, **kwargs): start_time = time() diagnostics = func(*args, **kwargs) ...
[ "torch.no_grad", "time.time" ]
[((2251, 2266), 'torch.no_grad', 'torch.no_grad', ([], {}), '()\n', (2264, 2266), False, 'import torch\n'), ((269, 275), 'time.time', 'time', ([], {}), '()\n', (273, 275), False, 'from time import time\n'), ((366, 372), 'time.time', 'time', ([], {}), '()\n', (370, 372), False, 'from time import time\n')]
import RO.Wdg import Tkinter import TUI.Inst.ExposeModel as ExposeModel from TUI.Inst.ExposeStatusWdg import ExposeStatusWdg class ScriptClass(object): """Take a series of DIS darks with user input. """ def __init__(self, sr): """Display exposure status and a few user input widgets. """ ...
[ "Tkinter.Frame", "TUI.Inst.ExposeStatusWdg.ExposeStatusWdg", "Tkinter.StringVar", "TUI.Inst.ExposeModel.getModel" ]
[((454, 503), 'TUI.Inst.ExposeStatusWdg.ExposeStatusWdg', 'ExposeStatusWdg', ([], {'master': 'sr.master', 'instName': '"""DIS"""'}), "(master=sr.master, instName='DIS')\n", (469, 503), False, 'from TUI.Inst.ExposeStatusWdg import ExposeStatusWdg\n'), ((626, 650), 'Tkinter.Frame', 'Tkinter.Frame', (['sr.master'], {}), '...
import asyncio import zmq from zmq.asyncio import Context from time import sleep from abc import ABC, abstractmethod from fedrec.utilities import registry from global_comm_stream import CommunicationStream class AbstractComManager(ABC): @abstractmethod def send_message(self): pass @abstractmetho...
[ "zmq.asyncio.Context.instance", "fedrec.utilities.registry.load" ]
[((422, 463), 'fedrec.utilities.registry.load', 'registry.load', (['"""communications"""', '"""ZeroMQ"""'], {}), "('communications', 'ZeroMQ')\n", (435, 463), False, 'from fedrec.utilities import registry\n'), ((566, 584), 'zmq.asyncio.Context.instance', 'Context.instance', ([], {}), '()\n', (582, 584), False, 'from zm...
# Copyright 2022 Quantapix 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 l...
[ "torch.cat", "torch.arange", "torch.device", "torch.ones", "torch.zeros", "torch.matmul", "torch.logsumexp", "torch.topk", "math.sqrt", "torch.any", "torch.einsum", "torch.max", "torch.unsqueeze", "torch.sum", "torch.ones_like", "torch.nn.ReLU", "transformers.utils.logging.get_logger...
[((1200, 1228), 'transformers.utils.logging.get_logger', 'logging.get_logger', (['__name__'], {}), '(__name__)\n', (1218, 1228), False, 'from transformers.utils import logging\n'), ((8902, 8937), 'torch.nn.functional.softmax', 'F.softmax', (['attention_scores'], {'dim': '(-1)'}), '(attention_scores, dim=-1)\n', (8911, ...
import cronjobs from olympia.addons.models import Addon from olympia.tags.models import AddonTag, Tag @cronjobs.register def tag_jetpacks(): # A temporary solution for singling out jetpacks on AMO. See bug 580827 tags = ( ('jetpack', { '_current_version__files__jetpack_version__isnull': ...
[ "olympia.tags.models.Tag.objects.get", "olympia.tags.models.AddonTag.objects.filter", "olympia.tags.models.AddonTag.objects.create", "olympia.addons.models.Addon.objects.values_list" ]
[((446, 488), 'olympia.addons.models.Addon.objects.values_list', 'Addon.objects.values_list', (['"""id"""'], {'flat': '(True)'}), "('id', flat=True)\n", (471, 488), False, 'from olympia.addons.models import Addon\n'), ((528, 557), 'olympia.tags.models.Tag.objects.get', 'Tag.objects.get', ([], {'tag_text': 'tag'}), '(ta...
#!/usr/bin/env python3 # # Author: <NAME> # Copyright 2015-present, NASA-JPL/Caltech # import os import glob import datetime import numpy as np import isce, isceobj import mroipac from mroipac.ampcor.Ampcor import Ampcor from isceobj.Alos2Proc.Alos2ProcPublic import topo from isceobj.Alos2Proc.Alos2ProcPublic import...
[ "os.remove", "numpy.sum", "argparse.ArgumentParser", "mroipac.ampcor.Ampcor.Ampcor", "os.path.join", "os.path.abspath", "isceobj.Alos2Proc.Alos2ProcPublic.geo2rdr", "StackPulic.loadTrack", "isceobj.Alos2Proc.Alos2ProcPublic.topo", "isceobj.Alos2Proc.Alos2ProcPublic.cullOffsets", "StackPulic.acqu...
[((881, 985), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""estimate offset between a pair of SLCs for a number of dates"""'}), "(description=\n 'estimate offset between a pair of SLCs for a number of dates')\n", (904, 985), False, 'import argparse\n'), ((3369, 3392), 'StackPulic.acq...
# Copyright (C) 2014 Universidad Politecnica de Madrid # # 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 la...
[ "keystone.common.wsgi.render_response", "keystone.openstack.common.log.getLogger" ]
[((724, 747), 'keystone.openstack.common.log.getLogger', 'log.getLogger', (['__name__'], {}), '(__name__)\n', (737, 747), False, 'from keystone.openstack.common import log\n'), ((1240, 1318), 'keystone.common.wsgi.render_response', 'wsgi.render_response', (['body'], {'status': "(301, 'Moved Permanently')", 'headers': '...
from tkinter import Tk, StringVar, OptionMenu, Frame, LEFT, Label from Agents.Agent import Agent class PlayerSelectionView: HUMAN = 'Human' RANDOM = 'Random' SMART_RANDOM = 'Smart Random' BOARD_HEURISTIC = 'Consecutive Pieces Heuristic' MOVE_HEURISTIC = 'Num Wins Heuristic' PLAYER_TYPES = [...
[ "tkinter.StringVar", "tkinter.OptionMenu", "tkinter.Label", "tkinter.Frame" ]
[((514, 531), 'tkinter.StringVar', 'StringVar', (['window'], {}), '(window)\n', (523, 531), False, 'from tkinter import Tk, StringVar, OptionMenu, Frame, LEFT, Label\n'), ((619, 632), 'tkinter.Frame', 'Frame', (['window'], {}), '(window)\n', (624, 632), False, 'from tkinter import Tk, StringVar, OptionMenu, Frame, LEFT...
import pysolr from django.conf import settings from django.core.management import BaseCommand from document.indexer import DocumentIndexer from document.models import Document class Command(BaseCommand): help = 'Index documents.' def handle(self, *args, **options): solr_core = getattr(settings, "SOL...
[ "document.indexer.DocumentIndexer", "pysolr.Solr", "document.models.Document.objects.all" ]
[((455, 476), 'pysolr.Solr', 'pysolr.Solr', (['solr_url'], {}), '(solr_url)\n', (466, 476), False, 'import pysolr\n'), ((610, 635), 'document.indexer.DocumentIndexer', 'DocumentIndexer', (['document'], {}), '(document)\n', (625, 635), False, 'from document.indexer import DocumentIndexer\n'), ((553, 575), 'document.mode...
__author__ = '<NAME>' import sys def win_patterns_generator(board_len): """Generator of winning position pattern""" win_patterns = [ [[i, i] for i in range(board_len)], [[i, board_len - 1 - i] for i in range(board_len)] ] win_patterns_append = win_patterns.append for i in range...
[ "sys.exit", "sys.stdin.readlines" ]
[((934, 955), 'sys.stdin.readlines', 'sys.stdin.readlines', ([], {}), '()\n', (953, 955), False, 'import sys\n'), ((1145, 1156), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (1153, 1156), False, 'import sys\n')]
import numpy as np import matplotlib.pyplot as plt from config import config import logging def plot_from_csv(file_path, output_dir, metric, savefig=True): """ Plot the metric saved in the file_path file """ logging.info("Plotting metrics...") x = np.loadtxt(file_path, delimiter=',') epochs =...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "logging.info", "matplotlib.pyplot.figure", "numpy.array", "numpy.loadtxt", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.savefig" ]
[((227, 262), 'logging.info', 'logging.info', (['"""Plotting metrics..."""'], {}), "('Plotting metrics...')\n", (239, 262), False, 'import logging\n'), ((271, 307), 'numpy.loadtxt', 'np.loadtxt', (['file_path'], {'delimiter': '""","""'}), "(file_path, delimiter=',')\n", (281, 307), True, 'import numpy as np\n'), ((343,...
import json import os import os.path import unittest from click.testing import CliRunner from doodledashboard.cli import start, view from doodledashboard.component import StaticComponentSource, DataFeedCreator from doodledashboard.datafeeds.text import TextFeed from doodledashboard.secrets_store import SecretNotFound...
[ "unittest.main", "doodledashboard.secrets_store.SecretNotFound", "doodledashboard.datafeeds.text.TextFeed", "json.loads", "doodledashboard.component.StaticComponentSource.add", "click.testing.CliRunner" ]
[((8001, 8016), 'unittest.main', 'unittest.main', ([], {}), '()\n', (8014, 8016), False, 'import unittest\n'), ((1344, 1390), 'doodledashboard.component.StaticComponentSource.add', 'StaticComponentSource.add', (['SecretLeakerCreator'], {}), '(SecretLeakerCreator)\n', (1369, 1390), False, 'from doodledashboard.component...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Mar 5 10:15:25 2021 @author: lenakilian """ import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt import copy as cp from matplotlib import cm from matplotlib.lines import Line2D from matplotlib import rc wd = ...
[ "pandas.DataFrame", "pandas.read_csv", "copy.copy", "pandas.read_excel", "matplotlib.pyplot.rcParams.update" ]
[((479, 534), 'matplotlib.pyplot.rcParams.update', 'plt.rcParams.update', (["{'font.family': 'Times New Roman'}"], {}), "({'font.family': 'Times New Roman'})\n", (498, 534), True, 'import matplotlib.pyplot as plt\n'), ((1018, 1090), 'pandas.read_excel', 'pd.read_excel', (["(wd + '/data/processed/LCFS/Meta/lcfs_desc_ann...
import torch import torch.nn as nn import torchvision.models as models import torchvision.transforms as transforms from torch.autograd import Variable from PIL import Image import glob # Import ResNet-152 resnet152 = models.resnet152(pretrained=True) modules=list(resnet152.children())[:-1] resnet152...
[ "torch.nn.Sequential", "torchvision.transforms.ToTensor", "PIL.Image.open", "glob.glob", "torchvision.models.resnet152", "torchvision.transforms.Resize" ]
[((235, 268), 'torchvision.models.resnet152', 'models.resnet152', ([], {'pretrained': '(True)'}), '(pretrained=True)\n', (251, 268), True, 'import torchvision.models as models\n'), ((321, 344), 'torch.nn.Sequential', 'nn.Sequential', (['*modules'], {}), '(*modules)\n', (334, 344), True, 'import torch.nn as nn\n'), ((45...
from .test_abelfunctions import AbelfunctionsTestCase import abelfunctions import numpy import unittest from abelfunctions.abelmap import AbelMap, Jacobian from numpy.linalg import norm from sage.all import I class TestDivisors(AbelfunctionsTestCase): def setUp(self): # cache some items for performance ...
[ "abelfunctions.abelmap.AbelMap", "numpy.array", "abelfunctions.abelmap.Jacobian", "numpy.linalg.norm" ]
[((347, 365), 'abelfunctions.abelmap.Jacobian', 'Jacobian', (['self.X11'], {}), '(self.X11)\n', (355, 365), False, 'from abelfunctions.abelmap import AbelMap, Jacobian\n'), ((634, 644), 'abelfunctions.abelmap.AbelMap', 'AbelMap', (['D'], {}), '(D)\n', (641, 644), False, 'from abelfunctions.abelmap import AbelMap, Jacob...
import requests from collections import namedtuple from typing import List, Union from azure.batch import BatchServiceClient from azure.storage.blob import BlockBlobService from azure.batch.models import CloudPool BatchAccountInfo = namedtuple('BatchAccountInfo', ['account', 'key', 'endpoint']) SourceControlInfo = na...
[ "azure.storage.blob.BlockBlobService", "azure.batch.BatchServiceClient", "collections.namedtuple", "requests.get", "azure.batch.batch_auth.SharedKeyCredentials" ]
[((235, 297), 'collections.namedtuple', 'namedtuple', (['"""BatchAccountInfo"""', "['account', 'key', 'endpoint']"], {}), "('BatchAccountInfo', ['account', 'key', 'endpoint'])\n", (245, 297), False, 'from collections import namedtuple\n'), ((318, 368), 'collections.namedtuple', 'namedtuple', (['"""SourceControlInfo"""'...
import os import sacc from .parser import ( _parse_sources, _parse_systematics, _parse_two_point_statistics, _parse_likelihood) from ._ccl import compute_loglike, write_stats # noqa def parse_config(analysis): """Parse a nx2pt analysis. Parameters ---------- analysis : dict ...
[ "os.path.expandvars" ]
[((1182, 1223), 'os.path.expandvars', 'os.path.expandvars', (["analysis['sacc_data']"], {}), "(analysis['sacc_data'])\n", (1200, 1223), False, 'import os\n')]
from django.urls import path from . import views urlpatterns = [ path('view-profile/', views.view_profile, name='view_profile'), path('estate-create/', views.CreateEstate.as_view(), name='create-estate'), path('estate-view/', views.ListEstate.as_view(), name='list_estate'), path('update-estate/<int:pk...
[ "django.urls.path" ]
[((71, 133), 'django.urls.path', 'path', (['"""view-profile/"""', 'views.view_profile'], {'name': '"""view_profile"""'}), "('view-profile/', views.view_profile, name='view_profile')\n", (75, 133), False, 'from django.urls import path\n')]