code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
#!/usr/bin/env python import os import sys import bed import generalUtils import argparse import random parser = argparse.ArgumentParser(description='get insert sizes of a bed file') parser.add_argument('-i', required=True, help='input') parser.add_argument('-o', nargs='?', type=argparse.FileType('w'), default=sys.std...
[ "bed.bed", "argparse.FileType", "bed.read", "argparse.ArgumentParser" ]
[((114, 183), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""get insert sizes of a bed file"""'}), "(description='get insert sizes of a bed file')\n", (137, 183), False, 'import argparse\n'), ((508, 524), 'bed.bed', 'bed.bed', (['bedFile'], {}), '(bedFile)\n', (515, 524), False, 'import ...
#!/usr/bin/env python3 # merge_sources_to_master.py # Loads three sources; normalizes author names; retains only columns present # in all sources; concatenates them to create a master fiction metadata file. import numpy as np import pandas as pd import random, sys, os, csv # import utils currentdir = os.path.dirnam...
[ "csv.field_size_limit", "pandas.read_csv", "os.path.join", "os.path.dirname", "pandas.concat", "sys.path.append" ]
[((306, 331), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (321, 331), False, 'import random, sys, os, csv\n'), ((342, 376), 'os.path.join', 'os.path.join', (['currentdir', '"""../lib"""'], {}), "(currentdir, '../lib')\n", (354, 376), False, 'import random, sys, os, csv\n'), ((377, 401), 's...
"""Exception types Exception hierarchy:: AiosfstreamException AuthenticationError ClientError ClientInvalidOperation TransportError TransportInvalidOperation TransportTimeoutError TransportConnectionClosed ServerError ReplayEr...
[ "asyncio.iscoroutinefunction", "typing.cast", "functools.wraps", "typing.TypeVar" ]
[((530, 561), 'typing.TypeVar', 'TypeVar', (['"""Func"""'], {'bound': 'FuncType'}), "('Func', bound=FuncType)\n", (537, 561), False, 'from typing import Generator, Callable, TypeVar, Any, cast\n'), ((4346, 4357), 'functools.wraps', 'wraps', (['func'], {}), '(func)\n', (4351, 4357), False, 'from functools import wraps\n...
# -*- coding: utf-8 -*- """ Created on Tue Mar 22 11:53:09 2022 @author: Oliver """ import numpy as np from matplotlib import pyplot as plt import cv2 as cv from PIL import Image from PIL.ImageOps import grayscale from .pattern_tools import patchmaker, align_pattern, microns_into_pattern def histogram_patches(patch...
[ "PIL.Image.open", "matplotlib.pyplot.hist", "matplotlib.pyplot.savefig", "cv2.drawContours", "matplotlib.pyplot.clf", "cv2.boundingRect", "cv2.contourArea", "PIL.ImageOps.grayscale", "numpy.array", "cv2.findContours", "matplotlib.pyplot.xlim", "matplotlib.pyplot.show" ]
[((541, 553), 'numpy.array', 'np.array', (['[]'], {}), '([])\n', (549, 553), True, 'import numpy as np\n'), ((695, 726), 'matplotlib.pyplot.hist', 'plt.hist', (['brightness'], {'bins': 'bins'}), '(brightness, bins=bins)\n', (703, 726), True, 'from matplotlib import pyplot as plt\n'), ((731, 745), 'matplotlib.pyplot.xli...
# Copyright 2019 The PlaNet 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...
[ "collections.namedtuple", "planet.control.wrappers.ActionRepeat", "planet.control.wrappers.LimitDuration", "gym.spaces.Dict", "dm_control.suite.load", "gym.spaces.Box", "numpy.array", "planet.envs.carla.env.CarlaEnv", "functools.partial", "planet.control.wrappers.ConvertTo32Bit", "planet.control...
[((884, 962), 'collections.namedtuple', 'collections.namedtuple', (['"""Task"""', '"""name, env_ctor, max_length, state_components"""'], {}), "('Task', 'name, env_ctor, max_length, state_components')\n", (906, 962), False, 'import collections\n'), ((1215, 1303), 'functools.partial', 'functools.partial', (['_dm_control_...
# vim: set et sw=4 sts=4 fileencoding=utf-8: # # Raspberry Pi Sense HAT Emulator library for the Raspberry Pi # Copyright (c) 2016 Raspberry Pi Foundation <<EMAIL>> # # This package is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the ...
[ "collections.namedtuple", "io.open" ]
[((1578, 1739), 'collections.namedtuple', 'namedtuple', (['"""DataRecord"""', "('timestamp', 'pressure', 'ptemp', 'humidity', 'htemp', 'ax', 'ay', 'az',\n 'gx', 'gy', 'gz', 'cx', 'cy', 'cz', 'ox', 'oy', 'oz')"], {}), "('DataRecord', ('timestamp', 'pressure', 'ptemp', 'humidity',\n 'htemp', 'ax', 'ay', 'az', 'gx',...
import sys import tkinter as tk import tkinter.ttk as ttk from tkinter.constants import * import Proyect def main(*args): '''Main entry point for the application.''' global root root = tk.Tk() root.protocol( 'WM_DELETE_WINDOW' , root.destroy) # Creates a toplevel widget. global _top1, _w1 ...
[ "Proyect.start_up", "tkinter.Tk", "Proyect.Toplevel1" ]
[((199, 206), 'tkinter.Tk', 'tk.Tk', ([], {}), '()\n', (204, 206), True, 'import tkinter as tk\n'), ((343, 367), 'Proyect.Toplevel1', 'Proyect.Toplevel1', (['_top1'], {}), '(_top1)\n', (360, 367), False, 'import Proyect\n'), ((420, 438), 'Proyect.start_up', 'Proyect.start_up', ([], {}), '()\n', (436, 438), False, 'impo...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Mar 10 09:21:31 2020 @author: djoghurt """ import torch.nn as nn from torch import sigmoid, tanh class Net(nn.Module): def __init__(self, upscale_factor): super(Net, self).__init__() self.conv1 = nn.Conv2d(1, 64, (5, 5), (1, 1), (2...
[ "torch.nn.PixelShuffle", "torch.nn.Conv2d" ]
[((285, 325), 'torch.nn.Conv2d', 'nn.Conv2d', (['(1)', '(64)', '(5, 5)', '(1, 1)', '(2, 2)'], {}), '(1, 64, (5, 5), (1, 1), (2, 2))\n', (294, 325), True, 'import torch.nn as nn\n'), ((347, 388), 'torch.nn.Conv2d', 'nn.Conv2d', (['(64)', '(32)', '(3, 3)', '(1, 1)', '(1, 1)'], {}), '(64, 32, (3, 3), (1, 1), (1, 1))\n', (...
#%% import argparse import time import math import os import torch import torch.nn as nn import torch.onnx from collections import Counter import data import model import utils args_cuda = torch.cuda.is_available() device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') # Hyper-parameters args_train_ba...
[ "torch.nn.CrossEntropyLoss", "torch.cuda.is_available", "math.exp", "utils.get_batch", "data.Corpus", "utils.batchify", "model.zero_grad", "utils.repackage_hidden", "torch.save", "model.eval", "time.time", "model.train", "torch.manual_seed", "model.parameters", "model.init_hidden", "to...
[((191, 216), 'torch.cuda.is_available', 'torch.cuda.is_available', ([], {}), '()\n', (214, 216), False, 'import torch\n'), ((748, 776), 'torch.manual_seed', 'torch.manual_seed', (['args_seed'], {}), '(args_seed)\n', (765, 776), False, 'import torch\n'), ((818, 840), 'data.Corpus', 'data.Corpus', (['args_data'], {}), '...
# File: main.py # # Author: <NAME> # Date: 2018-11-30 import argparse import sys import os import xlsxwriter import time from DoodleParser import DoodleParser from Solver import Solver CONFIG_FILE = "config.in" CONF = dict() def error(string): """ Print error message. Parameters: ----------- ...
[ "argparse.ArgumentParser", "DoodleParser.DoodleParser", "os.path.join", "Solver.Solver", "time.time", "xlsxwriter.Workbook" ]
[((4623, 4655), 'xlsxwriter.Workbook', 'xlsxwriter.Workbook', (['output_file'], {}), '(output_file)\n', (4642, 4655), False, 'import xlsxwriter\n'), ((9170, 9190), 'Solver.Solver', 'Solver', (['problem_name'], {}), '(problem_name)\n', (9176, 9190), False, 'from Solver import Solver\n'), ((9844, 9855), 'time.time', 'tim...
import dash_bootstrap_components as dbc from dash import html from .util import make_subheading spinner = html.Div( [ make_subheading("Spinner", "spinner"), html.Div( [ dbc.Spinner(color=col) for col in [ "primary", ...
[ "dash_bootstrap_components.Spinner" ]
[((219, 241), 'dash_bootstrap_components.Spinner', 'dbc.Spinner', ([], {'color': 'col'}), '(color=col)\n', (230, 241), True, 'import dash_bootstrap_components as dbc\n'), ((549, 584), 'dash_bootstrap_components.Spinner', 'dbc.Spinner', ([], {'color': 'col', 'type': '"""grow"""'}), "(color=col, type='grow')\n", (560, 58...
"""Script to verify permissions have transferred post groups/guardian. "docker-compose run --rm web python3 -m scripts.remove_after_use.verify_groups_guardian_migration" """ import logging from random import randint from website.app import setup_django setup_django() from django.apps import apps from django.contrib....
[ "logging.getLogger", "logging.basicConfig", "website.app.setup_django", "osf.models.Contributor.objects.count", "osf.models.preprint.PreprintGroupObjectPermission.objects.count", "django.contrib.auth.models.Group.objects.filter", "osf.models.Contributor.objects.get", "osf.models.node.NodeGroupObjectPe...
[((255, 269), 'website.app.setup_django', 'setup_django', ([], {}), '()\n', (267, 269), False, 'from website.app import setup_django\n'), ((698, 725), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (715, 725), False, 'import logging\n'), ((726, 765), 'logging.basicConfig', 'logging.basicC...
# Generated by Django 3.0.1 on 2019-12-23 04:21 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('club', '0015_event_attendance_code'), ] operations = [ migrations.AddField( model_name='member', name='grade', ...
[ "django.db.models.CharField" ]
[((333, 582), 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'choices': "[('Fr', 'Freshman'), ('So', 'Sophomore'), ('Ju', 'Junior'), ('Se', 'Senior'\n ), ('G', 'Graduate'), ('F', 'Faculty')]", 'help_text': '"""The grade of the student (or faculty status)"""', 'max_length': '(2)', 'null': ...
# PyLinuxToolkit # Copyright (C) 2022 JWCompDev # # str_utils.py # Copyright (C) 2022 JWCompDev <<EMAIL>> # # This program is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by # the Apache Software Foundation; either version 2.0 of the License, or # (at your...
[ "random.Random", "os.urandom", "binascii.hexlify", "pystdlib.regex.Patterns.ANSI_BASIC_ESCAPE.sub", "pystdlib.utils.check_argument_type", "pystdlib.utils.check_argument", "pystdlib.utils.InvalidInputError" ]
[((3414, 3477), 'pystdlib.utils.check_argument_type', 'check_argument_type', (['default', '"""default"""', '(int, float, NoneType)'], {}), "(default, 'default', (int, float, NoneType))\n", (3433, 3477), False, 'from pystdlib.utils import check_argument, InvalidInputError, check_argument_type\n'), ((4191, 4254), 'pystdl...
import json dindin = {123: 123} dados = json.loads(f'{dindin}') print(dados)
[ "json.loads" ]
[((40, 63), 'json.loads', 'json.loads', (['f"""{dindin}"""'], {}), "(f'{dindin}')\n", (50, 63), False, 'import json\n')]
import sys def update_progresswtime(progress, totime, operation, remainops): estime = totime * remainops barLength = 40 # Modify this to change the length of the progress bar status = "" if isinstance(progress, int): progress = float(progress) status = ('Estimated time to completion:...
[ "sys.stdout.flush", "sys.stdout.write" ]
[((841, 863), 'sys.stdout.write', 'sys.stdout.write', (['text'], {}), '(text)\n', (857, 863), False, 'import sys\n'), ((869, 887), 'sys.stdout.flush', 'sys.stdout.flush', ([], {}), '()\n', (885, 887), False, 'import sys\n'), ((1557, 1579), 'sys.stdout.write', 'sys.stdout.write', (['text'], {}), '(text)\n', (1573, 1579)...
# Copyright (C) 2015 Nippon Telegraph and Telephone Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ "lib.gobgp.GoBGPContainer", "inspect.getmembers", "lib.base.local", "lib.noseplugin.OptionParser", "time.sleep", "sys.exit", "lib.exabgp.ExaBGPContainer" ]
[((15038, 15100), 'lib.base.local', 'local', (['"""which docker 2>&1 > /dev/null ; echo $?"""'], {'capture': '(True)'}), "('which docker 2>&1 > /dev/null ; echo $?', capture=True)\n", (15043, 15100), False, 'from lib.base import BGP_FSM_ESTABLISHED, local\n'), ((1281, 1301), 'time.sleep', 'time.sleep', (['interval'], {...
from collections import Counter import numpy as np import tensorflow as tf from copy import copy from constraint.dfa import DFA class Constraint(object): def __init__(self, name, dfa_string, is_hard, violation_reward=None, tran...
[ "constraint.dfa.DFA.from_string", "numpy.eye", "numpy.ones", "numpy.array", "numpy.zeros", "numpy.stack", "numpy.isnan", "numpy.argwhere" ]
[((431, 458), 'constraint.dfa.DFA.from_string', 'DFA.from_string', (['dfa_string'], {}), '(dfa_string)\n', (446, 458), False, 'from constraint.dfa import DFA\n'), ((1507, 1528), 'numpy.zeros', 'np.zeros', (['num_actions'], {}), '(num_actions)\n', (1515, 1528), True, 'import numpy as np\n'), ((3368, 3392), 'numpy.ones',...
from collections import namedtuple class PackageError(Exception): """Exception to be raised when user wants to exit on error.""" class RecipeError(Exception): """Exception to be raised when user wants to exit on error.""" class Error(namedtuple('Error', ['file', 'code', 'message'])): """Error class cr...
[ "collections.namedtuple" ]
[((248, 296), 'collections.namedtuple', 'namedtuple', (['"""Error"""', "['file', 'code', 'message']"], {}), "('Error', ['file', 'code', 'message'])\n", (258, 296), False, 'from collections import namedtuple\n')]
from pyexcel_io.sheet import SheetReader import pyexcel_io.utils as utils from itertools import chain class QuerysetsReader(SheetReader): def __init__(self, query_sets, column_names, **keywords): SheetReader.__init__(self, query_sets, **keywords) self.__column_names = column_names self.__...
[ "itertools.chain", "pyexcel_io.utils._get_complex_attribute", "pyexcel_io.utils._get_simple_attribute", "pyexcel_io.sheet.SheetReader.to_array", "pyexcel_io.sheet.SheetReader.__init__" ]
[((211, 261), 'pyexcel_io.sheet.SheetReader.__init__', 'SheetReader.__init__', (['self', 'query_sets'], {}), '(self, query_sets, **keywords)\n', (231, 261), False, 'from pyexcel_io.sheet import SheetReader\n'), ((518, 544), 'pyexcel_io.sheet.SheetReader.to_array', 'SheetReader.to_array', (['self'], {}), '(self)\n', (53...
"""Benchmarks the file handler""" from logbook import Logger, FileHandler from tempfile import NamedTemporaryFile log = Logger('Test logger') def run(): f = NamedTemporaryFile() with FileHandler(f.name) as handler: for x in xrange(500): log.warning('this is handled')
[ "logbook.FileHandler", "logbook.Logger", "tempfile.NamedTemporaryFile" ]
[((122, 143), 'logbook.Logger', 'Logger', (['"""Test logger"""'], {}), "('Test logger')\n", (128, 143), False, 'from logbook import Logger, FileHandler\n'), ((165, 185), 'tempfile.NamedTemporaryFile', 'NamedTemporaryFile', ([], {}), '()\n', (183, 185), False, 'from tempfile import NamedTemporaryFile\n'), ((195, 214), '...
import os import zipfile import csv import pandas as pd import requests import json from itertools import islice import sklearn.preprocessing from lightfm.data import Dataset import pandas import numpy as np from lightfm import LightFM # restaurant_metadata = pd.read_json('rating_final.json', lines=True) from scipy...
[ "pandas.Series", "lightfm.data.Dataset", "lightfm.LightFM", "json.load", "pandas.read_json", "numpy.arange" ]
[((5044, 5057), 'json.load', 'json.load', (['ff'], {}), '(ff)\n', (5053, 5057), False, 'import json\n'), ((5070, 5083), 'json.load', 'json.load', (['df'], {}), '(df)\n', (5079, 5083), False, 'import json\n'), ((5091, 5103), 'json.load', 'json.load', (['f'], {}), '(f)\n', (5100, 5103), False, 'import json\n'), ((5114, 5...
# coding: utf-8 """ Some photometry tools for stellar spectroscopists """ from __future__ import (division, print_function, absolute_import, unicode_literals) import numpy as np from scipy import interpolate from astropy.io import ascii from .robust_polyfit import polyfit import logging import ...
[ "logging.getLogger", "numpy.abs", "numpy.log10", "numpy.sqrt", "numpy.logical_and", "numpy.where", "scipy.interpolate.griddata", "numpy.log", "numpy.argmax", "scipy.interpolate.interp1d", "numpy.sum", "numpy.polyval", "numpy.ravel", "numpy.vectorize", "astropy.io.ascii.read" ]
[((343, 370), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (360, 370), False, 'import logging\n'), ((5600, 5625), 'numpy.vectorize', 'np.vectorize', (['_gmr_to_BmV'], {}), '(_gmr_to_BmV)\n', (5612, 5625), True, 'import numpy as np\n'), ((11620, 11650), 'numpy.vectorize', 'np.vectorize',...
"""Dataclass responsible to pass window data among modules""" from dataclasses import dataclass @dataclass(frozen=True, slots=True) class Window: """ A window dataclass composed of a pid and a handle """ pid: 0 handle: 0
[ "dataclasses.dataclass" ]
[((100, 134), 'dataclasses.dataclass', 'dataclass', ([], {'frozen': '(True)', 'slots': '(True)'}), '(frozen=True, slots=True)\n', (109, 134), False, 'from dataclasses import dataclass\n')]
import os main_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) empty_python_output = """\ # -*- encoding: utf-8 -*- # This file has been generated by prophyc. import sys import prophy """ def test_showing_version(call_prophyc): ret, out, err = call_prophyc(["--version"]) ...
[ "os.path.exists", "some_codecs.b.B", "os.path.join", "os.path.realpath", "os.mkdir" ]
[((3383, 3401), 'os.mkdir', 'os.mkdir', (['"""output"""'], {}), "('output')\n", (3391, 3401), False, 'import os\n'), ((14469, 14495), 'os.path.exists', 'os.path.exists', (['"""input.py"""'], {}), "('input.py')\n", (14483, 14495), False, 'import os\n'), ((13817, 13843), 'os.path.exists', 'os.path.exists', (['"""input.py...
import uuid import datetime from typing import List, Union, Dict from plugins.adversary.app.engine.database import EncryptedDictField from plugins.adversary.app.engine.objects import Log from plugins.adversary.app.util import tz_utcnow version = 1.1 class Operation(dict): def __init__(self): super().__i...
[ "plugins.adversary.app.util.tz_utcnow", "datetime.datetime.fromisoformat", "uuid.uuid4" ]
[((4920, 4968), 'datetime.datetime.fromisoformat', 'datetime.datetime.fromisoformat', (['happened_before'], {}), '(happened_before)\n', (4951, 4968), False, 'import datetime\n'), ((4985, 5032), 'datetime.datetime.fromisoformat', 'datetime.datetime.fromisoformat', (['happened_after'], {}), '(happened_after)\n', (5016, 5...
#!/usr/bin/env python # -*- coding: utf-8 -*- from gurl import URL print('test 7: multi-level, with cache, password required, read html') u='https://e4ftl01.cr.usgs.gov/' url = URL(u,pwr=True,cache=True) data = url.read_text()
[ "gurl.URL" ]
[((178, 206), 'gurl.URL', 'URL', (['u'], {'pwr': '(True)', 'cache': '(True)'}), '(u, pwr=True, cache=True)\n', (181, 206), False, 'from gurl import URL\n')]
from django.shortcuts import render from rest_framework import viewsets, status from rest_framework.decorators import action from rest_framework.response import Response from workshop.models import Subscription from workshop.serializers import SubscriptionSerializer import logging import traceback from .token import...
[ "logging.getLogger", "traceback.format_exc", "django.http.HttpResponse", "csv.writer", "workshop.models.Subscription.objects.all", "rest_framework.response.Response", "workshop.models.Subscription.objects.get", "common.notify.Notify", "django.utils.encoding.force_bytes", "django.utils.http.urlsafe...
[((885, 911), 'workshop.models.Subscription.objects.all', 'Subscription.objects.all', ([], {}), '()\n', (909, 911), False, 'from workshop.models import Subscription\n'), ((3688, 3725), 'rest_framework.decorators.action', 'action', ([], {'detail': '(False)', 'methods': "['GET']"}), "(detail=False, methods=['GET'])\n", (...
import torch import argparse from utils import count_parameters, get_network parser = argparse.ArgumentParser(description='Counting network\'s pararmeters') parser.add_argument('--network', '-n', required=True) parser.add_argument('--dataset', type=str, default='cifar100') parser.add_argument('--input-size', '-i', typ...
[ "torch.cuda.is_available", "utils.get_network", "argparse.ArgumentParser" ]
[((87, 156), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Counting network\'s pararmeters"""'}), '(description="Counting network\'s pararmeters")\n', (110, 156), False, 'import argparse\n'), ((529, 576), 'utils.get_network', 'get_network', (['args.network', 'args.dataset', 'device'], {...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('pola', '0003_auto_20151025_1159'), ] operations = [ migrations.AddField( model_name='stats', name='n...
[ "django.db.models.IntegerField" ]
[((362, 392), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'default': '(0)'}), '(default=0)\n', (381, 392), False, 'from django.db import models, migrations\n'), ((531, 561), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'default': '(0)'}), '(default=0)\n', (550, 561), False, 'from djan...
import torch from morphosearch.core import Explorer from tqdm import tqdm class RandomExplorer(Explorer): """Performs random explorations of a system.""" def run(self, n_exploration_runs): print('Exploration: ') for run_idx in tqdm(range(n_exploration_runs)): if run_idx not in s...
[ "torch.no_grad" ]
[((487, 502), 'torch.no_grad', 'torch.no_grad', ([], {}), '()\n', (500, 502), False, 'import torch\n')]
from datetime import datetime from os.path import dirname, join import pytest from city_scrapers_core.constants import COMMISSION, PASSED from city_scrapers_core.utils import file_response from freezegun import freeze_time from city_scrapers.spiders.chi_ssa_51 import ChiSsa51Spider test_response = file_response( ...
[ "datetime.datetime", "city_scrapers.spiders.chi_ssa_51.ChiSsa51Spider", "os.path.dirname", "pytest.mark.parametrize", "freezegun.freeze_time" ]
[((425, 441), 'city_scrapers.spiders.chi_ssa_51.ChiSsa51Spider', 'ChiSsa51Spider', ([], {}), '()\n', (439, 441), False, 'from city_scrapers.spiders.chi_ssa_51 import ChiSsa51Spider\n'), ((453, 478), 'freezegun.freeze_time', 'freeze_time', (['"""2019-07-19"""'], {}), "('2019-07-19')\n", (464, 478), False, 'from freezegu...
import copy import itertools import seaborn as sns import glob import os import math import matplotlib.pyplot as plt import matplotlib.image as mpimg import imutils import numpy as np import time from pre_processing import Pre_Processing import cv2 class Roads(): def __init__(self): self.road_parm ...
[ "cv2.norm", "numpy.sqrt", "numpy.hstack", "math.cos", "numpy.array", "pre_processing.Pre_Processing", "os.path.exists", "cv2.arcLength", "cv2.merge", "cv2.drawContours", "math.degrees", "cv2.circle", "math.atan2", "time.time", "os.makedirs", "math.pow", "os.path.join", "itertools.c...
[((355, 371), 'pre_processing.Pre_Processing', 'Pre_Processing', ([], {}), '()\n', (369, 371), False, 'from pre_processing import Pre_Processing\n'), ((5401, 5442), 'itertools.combinations', 'itertools.combinations', (['large_contours', '(2)'], {}), '(large_contours, 2)\n', (5423, 5442), False, 'import itertools\n'), (...
# coding=utf-8 # Copyright 2020 The HuggingFace Datasets Authors. # # 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 app...
[ "datasets.SplitGenerator", "os.path.join", "datasets.Version", "os.path.isdir", "json.load", "datasets.Value", "logging.info" ]
[((1415, 1440), 'datasets.Version', 'datasets.Version', (['"""1.0.0"""'], {}), "('1.0.0')\n", (1431, 1440), False, 'import datasets\n'), ((2471, 2528), 'logging.info', 'logging.info', (['"""⏳ Generating examples from = %s"""', 'filepath'], {}), "('⏳ Generating examples from = %s', filepath)\n", (2483, 2528), False, 'im...
import numpy as np import tensorflow as tf from tensorflow.keras.layers import Dense, Activation, Flatten, SimpleRNN, Dropout from tensorflow.keras.models import Sequential import os import json import pickle import scipy.io as sio import matplotlib.pyplot as plt from keras.utils import np_utils from sklearn....
[ "matplotlib.pyplot.ylabel", "scipy.io.loadmat", "numpy.array", "tensorflow.keras.layers.Dense", "os.path.exists", "numpy.reshape", "tensorflow.keras.layers.SimpleRNN", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "numpy.random.seed", "sklearn.metrics.mean_absolute_error", "tensorflow....
[((770, 811), 'scipy.io.loadmat', 'sio.loadmat', (['"""data\\\\0HP\\\\normal_0_97.mat"""'], {}), "('data\\\\0HP\\\\normal_0_97.mat')\n", (781, 811), True, 'import scipy.io as sio\n'), ((1021, 1055), 'sklearn.preprocessing.MinMaxScaler', 'MinMaxScaler', ([], {'feature_range': '(0, 1)'}), '(feature_range=(0, 1))\n', (103...
import attr import pandas from sarif_om import * from src.exception.VulnerabilityNotFoundException import VulnerabilityNotFoundException VERSION = "2.1.0" SCHEMA = "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json" class SarifHolder: def __init__(self): self....
[ "attr.asdict", "pandas.read_csv", "src.exception.VulnerabilityNotFoundException.VulnerabilityNotFoundException" ]
[((5878, 5946), 'pandas.read_csv', 'pandas.read_csv', (['"""src/output_parser/sarif_vulnerability_mapping.csv"""'], {}), "('src/output_parser/sarif_vulnerability_mapping.csv')\n", (5893, 5946), False, 'import pandas\n'), ((6388, 6464), 'src.exception.VulnerabilityNotFoundException.VulnerabilityNotFoundException', 'Vuln...
import matplotlib.pyplot as plt import numpy as np class RefDataType: def __init__(self,length,steps,coverage,cv,marker,color,label): self.length = length self.steps = steps self.coverage = coverage self.cv = cv self.marker = marker self.color = color self.label = label def get_prop(self, prop_str): ...
[ "numpy.array", "numpy.log2", "numpy.log10", "matplotlib.pyplot.show" ]
[((6007, 6017), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (6015, 6017), True, 'import matplotlib.pyplot as plt\n'), ((2195, 2224), 'numpy.array', 'np.array', (['[a[1] for a in row]'], {}), '([a[1] for a in row])\n', (2203, 2224), True, 'import numpy as np\n'), ((2564, 2577), 'numpy.log10', 'np.log10', (['...
from collections import namedtuple from statistics import mean n = int(input()) w = input().split() student = namedtuple('s', w) total_marks = [] for _ in range(n): a, b, c, d = input().rstrip().split() current = student(a,b,c,d) total_marks.append(int(current.MARKS)) print(f'{mean(total_marks):.2f}')
[ "statistics.mean", "collections.namedtuple" ]
[((111, 129), 'collections.namedtuple', 'namedtuple', (['"""s"""', 'w'], {}), "('s', w)\n", (121, 129), False, 'from collections import namedtuple\n'), ((292, 309), 'statistics.mean', 'mean', (['total_marks'], {}), '(total_marks)\n', (296, 309), False, 'from statistics import mean\n')]
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for the SRUM ESE database event formatters.""" from __future__ import unicode_literals import unittest from plaso.formatters import srum from tests.formatters import test_lib class SRUMApplicationResourceUsageEventFormatterTest( test_lib.EventFormatterTes...
[ "unittest.main", "plaso.formatters.srum.SRUMNetworkConnectivityUsageEventFormatter", "plaso.formatters.srum.SRUMNetworkDataUsageEventFormatter", "plaso.formatters.srum.SRUMApplicationResourceUsageEventFormatter" ]
[((2486, 2501), 'unittest.main', 'unittest.main', ([], {}), '()\n', (2499, 2501), False, 'import unittest\n'), ((490, 539), 'plaso.formatters.srum.SRUMApplicationResourceUsageEventFormatter', 'srum.SRUMApplicationResourceUsageEventFormatter', ([], {}), '()\n', (537, 539), False, 'from plaso.formatters import srum\n'), ...
# -*- encoding: utf-8 -*- from . import FixtureTest class GraveyardCemeteryTest(FixtureTest): def test_forest_lawn_memorial_park(self): import dsl z, x, y = (13, 1409, 3276) self.generate_fixtures( # https://www.openstreetmap.org/way/24019957 dsl.way(24019957, ds...
[ "dsl.box_area" ]
[((318, 347), 'dsl.box_area', 'dsl.box_area', (['z', 'x', 'y', '(872976)'], {}), '(z, x, y, 872976)\n', (330, 347), False, 'import dsl\n'), ((1193, 1221), 'dsl.box_area', 'dsl.box_area', (['z', 'x', 'y', '(74278)'], {}), '(z, x, y, 74278)\n', (1205, 1221), False, 'import dsl\n')]
from PIL import Image import matplotlib.pyplot as plt import matplotlib.image as mpimg class GUI: __gui_image = {} __gui_image["moveBothHands"] = Image.open("Brain_Waves_Analysis/Training_Data_Acquisition/src/resources/moveBoth.png") __gui_image["moveLeftHand"] = Image.open("Brain_Waves_Analysis/Training_Data_A...
[ "matplotlib.pyplot.imshow", "PIL.Image.open", "matplotlib.pyplot.close", "matplotlib.pyplot.ion", "matplotlib.pyplot.axis", "matplotlib.pyplot.pause", "matplotlib.pyplot.show" ]
[((153, 250), 'PIL.Image.open', 'Image.open', (['"""Brain_Waves_Analysis/Training_Data_Acquisition/src/resources/moveBoth.png"""'], {}), "(\n 'Brain_Waves_Analysis/Training_Data_Acquisition/src/resources/moveBoth.png'\n )\n", (163, 250), False, 'from PIL import Image\n'), ((272, 369), 'PIL.Image.open', 'Image.ope...
from bk_packages.basic_methods import t, convert_to_float, unique, rowSum, rowMean def test_t(): input_list = [[1,2,3],[4,5,6],[7,8,9],[10,11,12]] obs = t(input_list) exp = [[1, 4, 7, 10], [2, 5, 8, 11], [3, 6, 9, 12]] assert obs == exp def test_convertTofloat(): input_list = ['1','2','3','4','5'...
[ "bk_packages.basic_methods.rowSum", "bk_packages.basic_methods.rowMean", "bk_packages.basic_methods.t", "bk_packages.basic_methods.convert_to_float", "bk_packages.basic_methods.unique" ]
[((163, 176), 'bk_packages.basic_methods.t', 't', (['input_list'], {}), '(input_list)\n', (164, 176), False, 'from bk_packages.basic_methods import t, convert_to_float, unique, rowSum, rowMean\n'), ((353, 381), 'bk_packages.basic_methods.convert_to_float', 'convert_to_float', (['input_list'], {}), '(input_list)\n', (36...
# pylint: disable=abstract-method import logging from logging.handlers import RotatingFileHandler from lifeloopweb import config, exception CONF = config.CONF CRITICAL = logging.CRITICAL FATAL = logging.FATAL ERROR = logging.ERROR WARNING = logging.WARNING WARN = logging.WARNING INFO = logging.INFO DEBUG = logging.D...
[ "logging.getLogger", "logging.Formatter", "logging.handlers.RotatingFileHandler", "logging.StreamHandler" ]
[((1172, 1197), 'logging.handlers.RotatingFileHandler', 'RotatingFileHandler', (['path'], {}), '(path)\n', (1191, 1197), False, 'from logging.handlers import RotatingFileHandler\n'), ((1448, 1476), 'logging.getLogger', 'logging.getLogger', (['BASE_NAME'], {}), '(BASE_NAME)\n', (1465, 1476), False, 'import logging\n'), ...
import json import unittest import logging from flask import appcontext_pushed, g import flask_unittest from contextlib import contextmanager from src.utils.did.eladid import ffi, lib from src.utils.did.did_wrapper import DID, Credential from src import create_app from hive.util.constants import HIVE_MODE_TEST from h...
[ "logging.getLogger", "src.utils.did.eladid.lib.JWT_GetAudience", "json.loads", "hive.util.did.v1_entity.V1Entity.__init__", "src.utils.did.eladid.lib.JWT_GetIssuer", "src.utils.did.did_wrapper.DID.from_string", "json.dumps", "src.utils.did.eladid.lib.JWT_Destroy", "src.create_app", "src.utils.did....
[((403, 422), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (420, 422), False, 'import logging\n'), ((1592, 1623), 'src.create_app', 'create_app', ([], {'mode': 'HIVE_MODE_TEST'}), '(mode=HIVE_MODE_TEST)\n', (1602, 1623), False, 'from src import create_app\n'), ((6698, 6713), 'unittest.main', 'unittest.ma...
import numpy as np import matplotlib.pyplot as plt import cv2 from pathlib import Path from skimage import io import matplotlib.animation as ani from IPython.display import HTML import matplotlib source_dir = Path('./data/source/test_img') target_dir = Path('./results/target/test_latest/images') #target_dir = Path('....
[ "numpy.hstack", "pathlib.Path", "cv2.VideoWriter", "cv2.VideoWriter_fourcc", "cv2.resize" ]
[((211, 241), 'pathlib.Path', 'Path', (['"""./data/source/test_img"""'], {}), "('./data/source/test_img')\n", (215, 241), False, 'from pathlib import Path\n'), ((255, 298), 'pathlib.Path', 'Path', (['"""./results/target/test_latest/images"""'], {}), "('./results/target/test_latest/images')\n", (259, 298), False, 'from ...
import pandas import pkg_resources from unittest import TestCase from dfs.nba.expansion import get_expansion_targets, encode_names, expand_nba_data, discretize_data class ExpansionTestCase(TestCase): def setUp(self): # A little test data from the past few years, useful for testing BREF data testfn = pkg_res...
[ "pandas.read_pickle", "pandas.Series", "dfs.nba.expansion.expand_nba_data", "pkg_resources.resource_filename", "pandas.DataFrame.from_dict", "dfs.nba.expansion.discretize_data", "dfs.nba.expansion.get_expansion_targets", "dfs.nba.expansion.encode_names" ]
[((313, 369), 'pkg_resources.resource_filename', 'pkg_resources.resource_filename', (['__name__', '"""test.pickle"""'], {}), "(__name__, 'test.pickle')\n", (344, 369), False, 'import pkg_resources\n'), ((386, 412), 'pandas.read_pickle', 'pandas.read_pickle', (['testfn'], {}), '(testfn)\n', (404, 412), False, 'import pa...
# from https://gist.github.com/yashbonde/62df9d16858a43775c22a6af00a8d707 import os import io from PIL import Image def fetch(url): # efficient loading of URLS import os, tempfile, hashlib, requests fp = os.path.join(tempfile.gettempdir(), hashlib.md5(url.encode("utf-8")).hexdigest()) if os.path.isf...
[ "os.path.exists", "PIL.Image.open", "os.rename", "requests.get", "os.path.isfile", "tempfile.gettempdir", "os.path.abspath", "os.stat" ]
[((628, 660), 'os.path.exists', 'os.path.exists', (['file_path_or_url'], {}), '(file_path_or_url)\n', (642, 660), False, 'import os\n'), ((233, 254), 'tempfile.gettempdir', 'tempfile.gettempdir', ([], {}), '()\n', (252, 254), False, 'import os, tempfile, hashlib, requests\n'), ((309, 327), 'os.path.isfile', 'os.path.is...
from unittest import TestCase from NiaPy.algorithms.basic import ArtificialBeeColonyAlgorithm class MyBenchmark(object): def __init__(self): self.Lower = -5.12 self.Upper = 5.12 @classmethod def function(cls): def evaluate(D, sol): val = 0.0 for i in rang...
[ "NiaPy.algorithms.basic.ArtificialBeeColonyAlgorithm" ]
[((596, 651), 'NiaPy.algorithms.basic.ArtificialBeeColonyAlgorithm', 'ArtificialBeeColonyAlgorithm', (['(10)', '(40)', '(10000)', '"""griewank"""'], {}), "(10, 40, 10000, 'griewank')\n", (624, 651), False, 'from NiaPy.algorithms.basic import ArtificialBeeColonyAlgorithm\n')]
from collections import namedtuple, defaultdict Edge = namedtuple('Edge', ['left', 'right', 'cost']) Adjacency = namedtuple('Adjacency', ['to', 'cost']) PrioritizedItem = namedtuple('PrioritizedItem', ['priority', 'item']) def indices(l): return [i for i in range(len(l))] def process_weighted_edges(data): v = []...
[ "collections.namedtuple", "collections.defaultdict" ]
[((56, 101), 'collections.namedtuple', 'namedtuple', (['"""Edge"""', "['left', 'right', 'cost']"], {}), "('Edge', ['left', 'right', 'cost'])\n", (66, 101), False, 'from collections import namedtuple, defaultdict\n'), ((114, 153), 'collections.namedtuple', 'namedtuple', (['"""Adjacency"""', "['to', 'cost']"], {}), "('Ad...
from __future__ import annotations import argparse import json import logging import os from datetime import datetime from datetime import timedelta import git import humanfriendly from datalad.plugin import export_archive from github import Github from scripts.datalad_utils import get_dataset from scripts.datalad_u...
[ "datalad.plugin.export_archive.ExportArchive", "datetime.timedelta", "os.path.exists", "argparse.ArgumentParser", "scripts.datalad_utils.get_dataset", "os.path.normpath", "scripts.log.get_logger", "os.path.relpath", "github.Github", "scripts.datalad_utils.uninstall_dataset", "git.Repo", "scrip...
[((496, 582), 'scripts.log.get_logger', 'get_logger', (['"""CONP-Archive"""'], {'filename': '"""conp-archive.log"""', 'file_level': 'logging.DEBUG'}), "('CONP-Archive', filename='conp-archive.log', file_level=logging.\n DEBUG)\n", (506, 582), False, 'from scripts.log import get_logger\n'), ((761, 910), 'argparse.Arg...
import json import os import zipfile import click import io import pandas as pd from nm import settings from utils import api CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help']) @click.group() @click.version_option() def cli(): pass @cli.group(context_settings=CONTEXT_SETTINGS) def register(): pa...
[ "utils.api.download_template", "click.Choice", "requests.post", "io.BytesIO", "time.sleep", "click.echo", "os.walk", "os.remove", "utils.api.register_service_mapping_plugin", "os.path.exists", "click.group", "click.option", "json.dumps", "utils.api.delete_template", "utils.api.on_board_t...
[((192, 205), 'click.group', 'click.group', ([], {}), '()\n', (203, 205), False, 'import click\n'), ((207, 229), 'click.version_option', 'click.version_option', ([], {}), '()\n', (227, 229), False, 'import click\n'), ((922, 960), 'click.argument', 'click.argument', (['"""template_id"""'], {'nargs': '(3)'}), "('template...
import os import pytest from scripttease.library.commands import Command, ItemizedCommand from scripttease.parsers.utils import * def test_filter_commands(): commands = [ Command("apt-get install apache2 -y", environments=["base"], tags=["web"]), Command("apt-get install apache-top -y", environmen...
[ "scripttease.library.commands.Command", "os.path.join", "pytest.raises" ]
[((185, 259), 'scripttease.library.commands.Command', 'Command', (['"""apt-get install apache2 -y"""'], {'environments': "['base']", 'tags': "['web']"}), "('apt-get install apache2 -y', environments=['base'], tags=['web'])\n", (192, 259), False, 'from scripttease.library.commands import Command, ItemizedCommand\n'), ((...
#!/usr/bin/env python3 import argparse import sys from horoma.test import get_test_parser, test from horoma.train import get_train_parser, train if __name__ == '__main__': parser = argparse.ArgumentParser(prog='horoma') subparsers = parser.add_subparsers(title="commands", dest="command") get_train_parser(...
[ "horoma.train.train", "argparse.ArgumentParser", "horoma.test.test", "sys.exit", "horoma.test.get_test_parser", "horoma.train.get_train_parser" ]
[((187, 225), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'prog': '"""horoma"""'}), "(prog='horoma')\n", (210, 225), False, 'import argparse\n'), ((303, 331), 'horoma.train.get_train_parser', 'get_train_parser', (['subparsers'], {}), '(subparsers)\n', (319, 331), False, 'from horoma.train import get_tra...
import os import base64 import requests import time # disable ssl warnings import urllib3 urllib3.disable_warnings() # API configuration and parameters ... pc_address = '10.38.15.9' username = 'admin' password = os.environ.get('PASSWORD', '<PASSWORD>!') # change the password to a suitable value authorization = base6...
[ "requests.post", "os.environ.get", "requests.get", "time.sleep", "urllib3.disable_warnings", "requests.put" ]
[((91, 117), 'urllib3.disable_warnings', 'urllib3.disable_warnings', ([], {}), '()\n', (115, 117), False, 'import urllib3\n'), ((214, 255), 'os.environ.get', 'os.environ.get', (['"""PASSWORD"""', '"""<PASSWORD>!"""'], {}), "('PASSWORD', '<PASSWORD>!')\n", (228, 255), False, 'import os\n'), ((3149, 3200), 'requests.post...
import markdown from dmcontent.markdown import GOVUKFrontendExtension class TestGOVUKFrontendExtension: def test_is_python_markdown_extension(self): assert markdown.Markdown(extensions=[GOVUKFrontendExtension()]) def test_it_adds_govuk_design_system_styles(self): text = """ ## Headings 1. o...
[ "dmcontent.markdown.GOVUKFrontendExtension" ]
[((201, 225), 'dmcontent.markdown.GOVUKFrontendExtension', 'GOVUKFrontendExtension', ([], {}), '()\n', (223, 225), False, 'from dmcontent.markdown import GOVUKFrontendExtension\n'), ((448, 472), 'dmcontent.markdown.GOVUKFrontendExtension', 'GOVUKFrontendExtension', ([], {}), '()\n', (470, 472), False, 'from dmcontent.m...
import pandas as pd assignmentInfo = pd.read_csv("submitsystem/Assignments.csv") loginInfo = pd.read_csv("submitsystem/Users.csv") # Records the information for a given assignment when it is first created. # Should be called upon creation of any assignment. def recordAssignment(classes, sections, name, dueDa...
[ "pandas.read_csv" ]
[((40, 83), 'pandas.read_csv', 'pd.read_csv', (['"""submitsystem/Assignments.csv"""'], {}), "('submitsystem/Assignments.csv')\n", (51, 83), True, 'import pandas as pd\n'), ((97, 134), 'pandas.read_csv', 'pd.read_csv', (['"""submitsystem/Users.csv"""'], {}), "('submitsystem/Users.csv')\n", (108, 134), True, 'import pand...
#!/usr/bin/env python import rospy import os from move_base_msgs.msg import MoveBaseActionResult from numpy.random import choice # Taken from icanhazdadjoke.com jokes = [ "I'm tired of following my dreams. I'm just going to ask them where they are going and meet up with them later." "Did you hear about the gu...
[ "rospy.on_shutdown", "numpy.random.choice", "rospy.init_node", "rospy.Rate", "rospy.spin", "os.system", "rospy.Subscriber", "rospy.loginfo" ]
[((2455, 2503), 'rospy.init_node', 'rospy.init_node', (['"""dad_joke_node"""'], {'anonymous': '(True)'}), "('dad_joke_node', anonymous=True)\n", (2470, 2503), False, 'import rospy\n'), ((2530, 2562), 'rospy.loginfo', 'rospy.loginfo', (['"""Ready for jokes"""'], {}), "('Ready for jokes')\n", (2543, 2562), False, 'import...
import csv import json with open('sample_data.csv') as f: reader = csv.DictReader(f) rows = list(reader) with open('test.json', 'w') as f: json.dump(rows, f)
[ "csv.DictReader", "json.dump" ]
[((72, 89), 'csv.DictReader', 'csv.DictReader', (['f'], {}), '(f)\n', (86, 89), False, 'import csv\n'), ((153, 171), 'json.dump', 'json.dump', (['rows', 'f'], {}), '(rows, f)\n', (162, 171), False, 'import json\n')]
from modin.engines.base.io.file_reader import FileReader import re import numpy as np class TextFileReader(FileReader): @classmethod def call_deploy(cls, f, chunk_size, num_return_vals, args, quotechar=b'"'): args["start"] = f.tell() chunk = f.read(chunk_size) line = f.readline() # En...
[ "re.subn" ]
[((418, 448), 're.subn', 're.subn', (['quotechar', "b''", 'chunk'], {}), "(quotechar, b'', chunk)\n", (425, 448), False, 'import re\n'), ((454, 483), 're.subn', 're.subn', (['quotechar', "b''", 'line'], {}), "(quotechar, b'', line)\n", (461, 483), False, 'import re\n')]
import math def fibonacci_recursive(n: int) -> list[int]: cache: dict[int, int] = {0: 0, 1: 1} def _fib(n: int) -> int: if n in cache: return cache[n] result = _fib(n - 1) + _fib(n - 2) cache[n] = result return result _ = _fib(n - 1) return list(cache.valu...
[ "math.sqrt" ]
[((752, 764), 'math.sqrt', 'math.sqrt', (['(5)'], {}), '(5)\n', (761, 764), False, 'import math\n')]
from quorapy.scraper import Scraper import os class Quora: def __init__(self, browser): self.BASE_URL = "https://quora.com" self.browser = browser def search(self, keyword, question_limit=None, answer_limit=None, load_user_data=False): question_limit = int(question_limit) if question_...
[ "os.getenv" ]
[((492, 513), 'os.getenv', 'os.getenv', (['"""QR_EMAIL"""'], {}), "('QR_EMAIL')\n", (501, 513), False, 'import os\n'), ((515, 539), 'os.getenv', 'os.getenv', (['"""QR_PASSWORD"""'], {}), "('QR_PASSWORD')\n", (524, 539), False, 'import os\n')]
from __future__ import print_function from six import iteritems from itertools import chain import ipyparallel as ipp from ipyparallel.client.client import ExecuteReply # Remotely-called function; imports requirement internally. def dummyTask(key): from os import getpid from time import sleep from ipypara...
[ "time.sleep", "itertools.chain.from_iterable", "ipyparallel.datapub.publish_data", "os.getpid", "ipyparallel.Client", "random.random", "six.iteritems" ]
[((358, 388), 'ipyparallel.datapub.publish_data', 'publish_data', (["{key: 'running'}"], {}), "({key: 'running'})\n", (370, 388), False, 'from ipyparallel.datapub import publish_data\n'), ((393, 407), 'time.sleep', 'sleep', (['(2 * key)'], {}), '(2 * key)\n', (398, 407), False, 'from time import sleep\n'), ((412, 444),...
""" Copyright (c) 2016-present, Facebook, Inc. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory. """ import asyncio import loggi...
[ "magma.magmad.upgrade.upgrader2.VersionT", "magma.magmad.upgrade.upgrader2.run_command", "magma.magmad.upgrade.upgrader2.ImageNameT", "os.mkdir", "shutil.rmtree", "magma.magmad.upgrade.magma_upgrader.compare_package_versions", "logging.info" ]
[((1235, 1276), 'magma.magmad.upgrade.upgrader2.ImageNameT', 'ImageNameT', (["('magma_feg_%s.zip' % parts[2])"], {}), "('magma_feg_%s.zip' % parts[2])\n", (1245, 1276), False, 'from magma.magmad.upgrade.upgrader2 import ImageNameT, run_command, UpgradeIntent, Upgrader2, VersionInfo, VersionT\n'), ((2503, 2555), 'shutil...
import json import re with open('aur_package_filelist.json' , 'r') as input_file: json_loaded = json.load(input_file) filelist = set() # Remove duplicated [filelist.update(pkg_list['filelist']) for pkg_list in json_loaded] regex = re.compile(r'\.[^\.]+$') file_extensions_list = {regex.findall(file)[0] if len(rege...
[ "json.load", "re.compile" ]
[((237, 262), 're.compile', 're.compile', (['"""\\\\.[^\\\\.]+$"""'], {}), "('\\\\.[^\\\\.]+$')\n", (247, 262), False, 'import re\n'), ((99, 120), 'json.load', 'json.load', (['input_file'], {}), '(input_file)\n', (108, 120), False, 'import json\n')]
import json from vcd import core from vcd.core import ElementType from neo4j import GraphDatabase, basic_auth with open("../etc/neo4j.json") as config_file: config = json.load(config_file) host = config['host'] port = config['port'] user = config['user'] password = config['password'] # Connection ...
[ "json.load", "json.dumps", "neo4j.basic_auth" ]
[((171, 193), 'json.load', 'json.load', (['config_file'], {}), '(config_file)\n', (180, 193), False, 'import json\n'), ((392, 432), 'neo4j.basic_auth', 'basic_auth', ([], {'user': 'user', 'password': 'password'}), '(user=user, password=password)\n', (402, 432), False, 'from neo4j import GraphDatabase, basic_auth\n'), (...
from django.urls import path from rest_framework.routers import SimpleRouter from .views.courses import CourseViewSet from .views.exams import ExamViewSet app_name = 'intermediary_v2' router = SimpleRouter() router.register('courses', CourseViewSet) router.register('exams', ExamViewSet) urlpatterns = [ # Co...
[ "rest_framework.routers.SimpleRouter" ]
[((199, 213), 'rest_framework.routers.SimpleRouter', 'SimpleRouter', ([], {}), '()\n', (211, 213), False, 'from rest_framework.routers import SimpleRouter\n')]
import jiwer import jiwer.transforms as tr from jiwer import compute_measures from typing import List def compute_wer(predictions=None, references=None, concatenate_texts=False): if concatenate_texts: return compute_measures(references, predictions) else: incorrect = 0 total = 0 ...
[ "jiwer.transforms.Strip", "jiwer.wer", "jiwer.compute_measures", "jiwer.transforms.RemoveMultipleSpaces" ]
[((223, 264), 'jiwer.compute_measures', 'compute_measures', (['references', 'predictions'], {}), '(references, predictions)\n', (239, 264), False, 'from jiwer import compute_measures\n'), ((990, 1015), 'jiwer.transforms.RemoveMultipleSpaces', 'tr.RemoveMultipleSpaces', ([], {}), '()\n', (1013, 1015), True, 'import jiwe...
""" Metric functions that can evaluate a submission. Each function has as input: - A reference DataFrame with the ground truth - A submission DataFrame with the team's predictions. Each functions outputs a dictionary with one or more metrics. """ from sklearn import metrics as skmetrics def count(reference, submiss...
[ "sklearn.metrics.accuracy_score", "sklearn.metrics.cohen_kappa_score", "sklearn.metrics.confusion_matrix" ]
[((1653, 1782), 'sklearn.metrics.confusion_matrix', 'skmetrics.confusion_matrix', ([], {'y_true': '(reference.isup_grade > 0)', 'y_pred': '(submission.isup_grade > 0)', 'normalize': 'None', 'labels': '[0, 1]'}), '(y_true=reference.isup_grade > 0, y_pred=\n submission.isup_grade > 0, normalize=None, labels=[0, 1])\n'...
import FWCore.ParameterSet.Config as cms from Calibration.TkAlCaRecoProducers.ALCARECOSiStripCalCosmics_cff import ALCARECOSiStripCalCosmics from CalibTracker.SiStripCommon.prescaleEvent_cfi import prescaleEvent from HLTrigger.HLTfilters.triggerResultsFilter_cfi import triggerResultsFilter ALCARECOSiStripCalCosmicsNa...
[ "FWCore.ParameterSet.Config.Sequence", "FWCore.ParameterSet.Config.string", "FWCore.ParameterSet.Config.vstring", "CalibTracker.SiStripCommon.prescaleEvent_cfi.prescaleEvent.clone", "FWCore.ParameterSet.Config.InputTag", "FWCore.ParameterSet.Config.Task", "FWCore.ParameterSet.Config.untracked.bool", "...
[((333, 364), 'CalibTracker.SiStripCommon.prescaleEvent_cfi.prescaleEvent.clone', 'prescaleEvent.clone', ([], {'prescale': '(1)'}), '(prescale=1)\n', (352, 364), False, 'from CalibTracker.SiStripCommon.prescaleEvent_cfi import prescaleEvent\n'), ((3086, 3227), 'FWCore.ParameterSet.Config.Task', 'cms.Task', (['nanoMetad...
#!/usr/bin/env python """ vim_fanfou.vim_fanfou_base: ~~~~~~~~~~~~~~~~~~~~~~~~~~~ The base object for vim_fanfou :copyright: (c) 2014 by xiong-jia.le ( <EMAIL> ) :license: Vim license. See :help license """ import time from . import misc LOG = misc.LOGGER.get_logger() class VimFanfouBase(object):...
[ "time.ctime" ]
[((5441, 5453), 'time.ctime', 'time.ctime', ([], {}), '()\n', (5451, 5453), False, 'import time\n')]
import sys from pyjarowinkler import distance if sys.version_info[:2] > (2, 7): from pyjarowinkler import cydistance import unittest __author__ = '<NAME> - <EMAIL>' class TestDistance(unittest.TestCase): def test_get_jaro_distance(self): self.assertEqual(0.0, distance.get_jaro_distance("fly", "ant"))...
[ "pyjarowinkler.distance._get_matching_characters", "pyjarowinkler.distance._transpositions", "pyjarowinkler.cydistance.get_jaro_distance", "pyjarowinkler.distance._get_prefix", "pyjarowinkler.distance._get_diff_index", "pyjarowinkler.distance._score", "unittest.main", "pyjarowinkler.distance.get_jaro_...
[((10020, 10035), 'unittest.main', 'unittest.main', ([], {}), '()\n', (10033, 10035), False, 'import unittest\n'), ((279, 319), 'pyjarowinkler.distance.get_jaro_distance', 'distance.get_jaro_distance', (['"""fly"""', '"""ant"""'], {}), "('fly', 'ant')\n", (305, 319), False, 'from pyjarowinkler import distance\n'), ((35...
from setuptools import setup setup(name='Warehouse', version='1.0', description='Autonomi Warehouse', author='<NAME>', author_email='<EMAIL>', # Uncomment one or more lines below in the install_requires section # for the specific client drivers/modules your application needs. install_r...
[ "setuptools.setup" ]
[((30, 206), 'setuptools.setup', 'setup', ([], {'name': '"""Warehouse"""', 'version': '"""1.0"""', 'description': '"""Autonomi Warehouse"""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'install_requires': "['flask', 'pymongo', 'GitHub-Flask']"}), "(name='Warehouse', version='1.0', description='Autonomi ...
# Copyright (C) 2019 Apple Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
[ "cassandra.cluster.Cluster", "re.escape", "os.getenv", "uuid.uuid4" ]
[((2665, 2713), 'os.getenv', 'os.getenv', (['CQLENG_ALLOW_SCHEMA_MANAGEMENT', '(False)'], {}), '(CQLENG_ALLOW_SCHEMA_MANAGEMENT, False)\n', (2674, 2713), False, 'import os\n'), ((2895, 2907), 'uuid.uuid4', 'uuid.uuid4', ([], {}), '()\n', (2905, 2907), False, 'import uuid\n'), ((3543, 3555), 'uuid.uuid4', 'uuid.uuid4', ...
# Libraries from random import choice, random, shuffle import pandas as pd import numpy as np from math import exp, sqrt # Import an Excel file into Python file_name, sheet = "TSP.xlsx", "Arkusz1" data = pd.read_excel(file_name, sheet_name = sheet, engine = 'openpyxl') # Getting initial solution solution =...
[ "random.choice", "numpy.double", "random.shuffle", "math.sqrt", "pandas.read_excel", "random.random", "math.exp" ]
[((213, 274), 'pandas.read_excel', 'pd.read_excel', (['file_name'], {'sheet_name': 'sheet', 'engine': '"""openpyxl"""'}), "(file_name, sheet_name=sheet, engine='openpyxl')\n", (226, 274), True, 'import pandas as pd\n'), ((378, 395), 'random.shuffle', 'shuffle', (['solution'], {}), '(solution)\n', (385, 395), False, 'fr...
import smart_imports smart_imports.all() class ArtifactRecordAdmin(django_admin.ModelAdmin): list_display = ('id', 'uuid', 'name', 'state', 'type', 'power_type', 'created_at', 'updated_at') list_filter = ('state', 'type', 'power_type') django_admin.site.register(models.ArtifactRecord, ArtifactRecordAdmin...
[ "smart_imports.all" ]
[((23, 42), 'smart_imports.all', 'smart_imports.all', ([], {}), '()\n', (40, 42), False, 'import smart_imports\n')]
import datetime import os.path lines = [] # --- NUMERIC DICTIONARIES --- numbers = { 0: "zero", 1: "one", 2: "two", 3: "three", 4: "four", 5: "five", 6: "six", 7: "seven", 8: "eight", 9: "nine", 10: "ten", 11: "eleven", 12: "twelve", 13: "thirteen", 14: "fo...
[ "datetime.datetime.now" ]
[((1289, 1312), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (1310, 1312), False, 'import datetime\n')]
from __future__ import print_function from __future__ import division import torch import torch.nn as nn from torch.nn.parameter import Parameter import torch.nn.functional as F import torch.utils.data import numpy as np import math import time import os import pickle import random import nmslib import sys from scipy...
[ "scipy.sparse.lil_matrix", "numpy.repeat", "numpy.hstack", "torch.mean", "numpy.argsort", "numpy.zeros", "torch.utils.data.DataLoader", "numpy.ravel", "torch.set_grad_enabled", "scipy.sparse.csr_matrix", "time.time", "numpy.arange", "network.HNSW" ]
[((688, 717), 'torch.set_grad_enabled', 'torch.set_grad_enabled', (['(False)'], {}), '(False)\n', (710, 717), False, 'import torch\n'), ((1209, 1258), 'numpy.zeros', 'np.zeros', (['(top_k * batch_size, 2)'], {'dtype': 'np.int64'}), '((top_k * batch_size, 2), dtype=np.int64)\n', (1217, 1258), True, 'import numpy as np\n...
#!/usr/bin/env python3 from __future__ import print_function import sys def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs) import re import timeit import os import pathlib from mzlib.spectrum_library_index import SpectrumLibraryIndex from mzlib.spectrum import Spectrum from mzlib.in...
[ "mzlib.backends.SpectralLibraryBackendBase.type_for_format", "mzlib.spectrum.Spectrum", "os.path.basename", "mzlib.backends.SpectralLibraryWriterBase.type_for_format", "mzlib.backends.guess_implementation" ]
[((9170, 9180), 'mzlib.spectrum.Spectrum', 'Spectrum', ([], {}), '()\n', (9178, 9180), False, 'from mzlib.spectrum import Spectrum\n'), ((2145, 2192), 'mzlib.backends.guess_implementation', 'guess_implementation', (['self.filename', 'index_type'], {}), '(self.filename, index_type)\n', (2165, 2192), False, 'from mzlib.b...
from powerlift.bench import Experiment, Store from powerlift.executors.docker import InsecureDocker from powerlift.executors.localmachine import LocalMachine from powerlift.executors.azure_ci import AzureContainerInstance import pytest import os def _add(x, y): return x + y def _err_handler(e): raise e d...
[ "powerlift.executors.localmachine.LocalMachine", "os.getenv", "sklearn.model_selection.train_test_split", "sklearn.preprocessing.OneHotEncoder", "pytest.mark.skip", "sklearn.svm.LinearSVC", "powerlift.executors.docker.InsecureDocker", "sklearn.ensemble.RandomForestClassifier", "dotenv.load_dotenv", ...
[((2941, 2990), 'pytest.mark.skip', 'pytest.mark.skip', (['"""Remove this when testing ACI."""'], {}), "('Remove this when testing ACI.')\n", (2957, 2990), False, 'import pytest\n'), ((2573, 2579), 'multiprocessing.pool.Pool', 'Pool', ([], {}), '()\n', (2577, 2579), False, 'from multiprocessing.pool import Pool\n'), ((...
from typing import List from mason.clients.responsable import Responsable from mason.clients.response import Response from mason.engines.metastore.models.table.table import TableList class Database(Responsable): def __init__(self, name: str, tables: TableList): self.name = name self.tables = tab...
[ "mason.clients.response.Response" ]
[((1069, 1079), 'mason.clients.response.Response', 'Response', ([], {}), '()\n', (1077, 1079), False, 'from mason.clients.response import Response\n')]
# Generated by Django 3.1.5 on 2021-01-28 02:54 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("durls", "0001_initial"), ] operations = [ migrations.AlterField( model_name="destination", name="destination_url", ...
[ "django.db.models.URLField", "django.db.models.SlugField" ]
[((337, 400), 'django.db.models.URLField', 'models.URLField', ([], {'max_length': '(255)', 'verbose_name': '"""Destination URL"""'}), "(max_length=255, verbose_name='Destination URL')\n", (352, 400), False, 'from django.db import migrations, models\n'), ((525, 629), 'django.db.models.SlugField', 'models.SlugField', ([]...
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-22 14:15 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='FieldS...
[ "django.db.models.TextField", "django.db.models.AutoField", "django.db.models.CharField" ]
[((375, 468), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (391, 468), False, 'from django.db import migrations, models\...
import hypothesis.extra.numpy as hnp import numpy as np from hypothesis import settings from numpy.testing import assert_allclose from mygrad.tensor_base import Tensor from ..custom_strategies import adv_integer_index, basic_indices from ..wrappers.uber import backprop_test_factory, fwdprop_test_factory def test_ge...
[ "mygrad.tensor_base.Tensor", "hypothesis.extra.numpy.arrays", "numpy.ix_", "numpy.array", "hypothesis.settings", "hypothesis.extra.numpy.array_shapes" ]
[((1323, 1346), 'hypothesis.settings', 'settings', ([], {'deadline': 'None'}), '(deadline=None)\n', (1331, 1346), False, 'from hypothesis import settings\n'), ((1892, 1915), 'hypothesis.settings', 'settings', ([], {'deadline': 'None'}), '(deadline=None)\n', (1900, 1915), False, 'from hypothesis import settings\n'), ((2...
# Generated by Django 3.2.2 on 2021-05-28 14:12 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('awwwards', '0002_rating'), ] operations = [ migrations.AddField( model_name='profile', name='name', fiel...
[ "django.db.models.CharField" ]
[((322, 366), 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'max_length': '(120)'}), '(blank=True, max_length=120)\n', (338, 366), False, 'from django.db import migrations, models\n')]
#!/user/bin/python3 #^.^ coding=utf-8 ^.^# from HelloWorld import cute_split_line # 1. datetime # 2. collections # 3. base64 # 4. struct # 5. hashlib # 6. itertools # 7. xml # 8. htmlparser # 9. urllib #************ datetime ************# from datetime import datetime,timedelta,timezone print("now:", datetime.now(...
[ "datetime.datetime", "hashlib.sha256", "collections.namedtuple", "collections.deque", "hashlib.md5", "datetime.datetime.strptime", "HelloWorld.cute_split_line", "hashlib.sha224", "collections.Counter", "hashlib.sha384", "datetime.datetime.now", "itertools.count", "collections.defaultdict", ...
[((1056, 1073), 'HelloWorld.cute_split_line', 'cute_split_line', ([], {}), '()\n', (1071, 1073), False, 'from HelloWorld import cute_split_line\n'), ((1214, 1245), 'collections.namedtuple', 'namedtuple', (['"""Point"""', "['x', 'y']"], {}), "('Point', ['x', 'y'])\n", (1224, 1245), False, 'from collections import namedt...
############################################################################### # # The MIT License (MIT) # # Copyright (c) Crossbar.io Technologies GmbH # # 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 ...
[ "hashlib.sha256", "autobahn.wamp.types.TransportDetails" ]
[((5809, 5991), 'autobahn.wamp.types.TransportDetails', 'TransportDetails', ([], {'channel_type': 'channel_type', 'channel_framing': 'channel_framing', 'peer': 'peer', 'is_server': 'is_server', 'is_secure': 'is_secure', 'channel_id': 'channel_id', 'peer_cert': 'peer_cert'}), '(channel_type=channel_type, channel_framing...
# -*- coding: utf-8 -*- # from __future__ import division import numpy import sympy from ..helpers import untangle class WissmannBecker(object): """ <NAME> and <NAME>, Partially Symmetric Cubature Formulas for Even Degrees of Exactness, SIAM J. Numer. Anal., 23(3), 676–685, 10 pages, <https://do...
[ "numpy.array" ]
[((3965, 3986), 'numpy.array', 'numpy.array', (['[[0, a]]'], {}), '([[0, a]])\n', (3976, 3986), False, 'import numpy\n'), ((4014, 4047), 'numpy.array', 'numpy.array', (['[[+a, +b], [-a, +b]]'], {}), '([[+a, +b], [-a, +b]])\n', (4025, 4047), False, 'import numpy\n')]
from struct import pack from World.WorldPacket.Constants.WorldOpCode import WorldOpCode from Server.Connection.Connection import Connection class InitialSpells(object): def __init__(self, **kwargs): self.data = kwargs.pop('data', bytes()) self.connection: Connection = kwargs.pop('connection') ...
[ "struct.pack" ]
[((582, 608), 'struct.pack', 'pack', (['"""<BH"""', '(0)', 'num_spells'], {}), "('<BH', 0, num_spells)\n", (586, 608), False, 'from struct import pack\n'), ((937, 963), 'struct.pack', 'pack', (['"""<2H"""', 'num_spells', '(0)'], {}), "('<2H', num_spells, 0)\n", (941, 963), False, 'from struct import pack\n'), ((792, 83...
"""Defines the factory for creating monitors""" from __future__ import unicode_literals import logging logger = logging.getLogger(__name__) _SCANNERS = {} def add_scanner_type(scanner_class): """Registers a scanner class so it can be used for Scale Scans :param scanner_class: The class definition for a sc...
[ "logging.getLogger" ]
[((113, 140), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (130, 140), False, 'import logging\n')]
import requests from requests import HTTPError from xcube_hub import api, util from xcube_hub.core import oauth from xcube_hub.models.subscription import Subscription def register(subscription: Subscription, raise_on_exist: bool = True): user = [{ "user_name": f"geodb_{subscription.guid}", "start...
[ "requests.post", "xcube_hub.util.maybe_raise_for_env", "xcube_hub.core.oauth.get_token" ]
[((471, 520), 'xcube_hub.util.maybe_raise_for_env', 'util.maybe_raise_for_env', (['"""GEODB_ADMIN_CLIENT_ID"""'], {}), "('GEODB_ADMIN_CLIENT_ID')\n", (495, 520), False, 'from xcube_hub import api, util\n'), ((541, 594), 'xcube_hub.util.maybe_raise_for_env', 'util.maybe_raise_for_env', (['"""GEODB_ADMIN_CLIENT_SECRET"""...
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # Name: common/decorators.py # Purpose: Decorators for functions # # Authors: <NAME> # <NAME> # # Copyright: Copyright © 2009-2015 <NAME> and the music21 Project # License: BS...
[ "warnings.warn", "music21.mainTest", "functools.wraps" ]
[((819, 828), 'functools.wraps', 'wraps', (['fn'], {}), '(fn)\n', (824, 828), False, 'from functools import wraps\n'), ((3673, 3686), 'functools.wraps', 'wraps', (['method'], {}), '(method)\n', (3678, 3686), False, 'from functools import wraps\n'), ((4839, 4852), 'functools.wraps', 'wraps', (['method'], {}), '(method)\...
import logging from datetime import datetime from django.conf import settings from django.core.management import BaseCommand from gdpr.forget import delete_user_data from users.models.user import User log = logging.getLogger(__name__) class Command(BaseCommand): help = "Cron job to actually delete users" ...
[ "logging.getLogger", "gdpr.forget.delete_user_data", "datetime.datetime.utcnow" ]
[((210, 237), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (227, 237), False, 'import logging\n'), ((561, 583), 'gdpr.forget.delete_user_data', 'delete_user_data', (['user'], {}), '(user)\n', (577, 583), False, 'from gdpr.forget import delete_user_data\n'), ((408, 425), 'datetime.dateti...
from keras.layers import Conv2D, Input,MaxPool2D, Reshape,Activation,Flatten, Dense from keras.models import Model, Sequential from keras.layers.advanced_activations import PReLU from keras.optimizers import adam from keras.utils import to_categorical import matplotlib.pyplot as plt import numpy as np import keras.back...
[ "os.path.exists", "MTCNNx.create_Kao_Onet", "MTCNNx.combine_cls_bbox_landmark", "tables.open_file", "_pickle.load", "keras.utils.to_categorical", "numpy.swapaxes", "numpy.array", "gc.collect", "sys.path.append", "keras.optimizers.adam" ]
[((571, 619), 'sys.path.append', 'sys.path.append', (['"""/home/wk/e/mtcnn/keras-mtcnn/"""'], {}), "('/home/wk/e/mtcnn/keras-mtcnn/')\n", (586, 619), False, 'import sys\n'), ((753, 779), 'os.path.exists', 'os.path.exists', (['cache_file'], {}), '(cache_file)\n', (767, 779), False, 'import os\n'), ((2377, 2406), 'MTCNNx...
from allauth.account.adapter import get_adapter from allauth.account.utils import setup_user_email from allauth.utils import email_address_exists from dj_rest_auth import serializers as auth_serializers from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.hashers impo...
[ "django.contrib.auth.get_user_model", "rest_framework.serializers.EmailField", "rest_framework.serializers.ValidationError", "allauth.account.adapter.get_adapter", "django.utils.translation.gettext_lazy", "allauth.account.utils.setup_user_email", "rest_framework.serializers.CharField", "allauth.utils....
[((550, 566), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (564, 566), False, 'from django.contrib.auth import get_user_model\n'), ((607, 630), 'django.utils.translation.gettext_lazy', '_', (['"""Email not verified"""'], {}), "('Email not verified')\n", (608, 630), True, 'from django.utils....
#!/usr/bin/env python import vtk from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # A script to test the vtkLassoStencilSource reader = vtk.vtkPNGReader() reader.SetDataSpacing(0.8,0.8,1.5) reader.SetDataOrigin(0.0,0.0,0.0) reader.SetFileName("" + str(VTK_DATA_ROOT) + "/Data/fullhead15.png") r...
[ "vtk.util.misc.vtkGetDataRoot", "vtk.vtkLassoStencilSource", "vtk.vtkImageShiftScale", "vtk.vtkImageStencil", "vtk.vtkPoints", "vtk.vtkActor2D", "vtk.vtkRenderWindow", "vtk.vtkImageMapper", "vtk.vtkPNGReader", "vtk.vtkRenderer" ]
[((90, 106), 'vtk.util.misc.vtkGetDataRoot', 'vtkGetDataRoot', ([], {}), '()\n', (104, 106), False, 'from vtk.util.misc import vtkGetDataRoot\n'), ((162, 180), 'vtk.vtkPNGReader', 'vtk.vtkPNGReader', ([], {}), '()\n', (178, 180), False, 'import vtk\n'), ((348, 372), 'vtk.vtkImageShiftScale', 'vtk.vtkImageShiftScale', (...
#!/usr/bin/env python import os import sys import urllib2 from lib.config import s3_config from lib.util import s3put, scoped_cwd, safe_mkdir SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) OUT_DIR = os.path.join(SOURCE_ROOT, 'out', 'D') BASE_URL = 'https://electron-metadumper.herokuap...
[ "lib.util.safe_mkdir", "urllib2.urlopen", "lib.util.scoped_cwd", "os.getenv", "os.path.join", "lib.config.s3_config", "urllib2.Request", "os.path.dirname", "lib.util.s3put" ]
[((233, 270), 'os.path.join', 'os.path.join', (['SOURCE_ROOT', '"""out"""', '"""D"""'], {}), "(SOURCE_ROOT, 'out', 'D')\n", (245, 270), False, 'import os\n'), ((372, 408), 'os.getenv', 'os.getenv', (['"""META_DUMPER_AUTH_HEADER"""'], {}), "('META_DUMPER_AUTH_HEADER')\n", (381, 408), False, 'import os\n'), ((191, 216), ...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.website.website_generator import WebsiteGenerator from frappe.utils import cint class FrappePartner(W...
[ "frappe.utils.cint", "frappe._dict", "frappe.get_template", "frappe.db.sql" ]
[((349, 494), 'frappe._dict', 'frappe._dict', ([], {'condition_field': '"""show_in_website"""', 'template': '"""templates/generators/service_provider.html"""', 'page_title_field': '"""partner_name"""'}), "(condition_field='show_in_website', template=\n 'templates/generators/service_provider.html', page_title_field=\...
from __future__ import with_statement import os from time import sleep from fabric.api import run, cd, env, hosts from fabric.context_managers import shell_env # Hosts WEB_SERVER = os.environ['WEB_SERVER_HOST'] REPO = '<EMAIL>:AuthEceSoftEng/npm-miner.git' def web_server(): env.forward_agent = True env.po...
[ "fabric.api.cd", "fabric.context_managers.shell_env", "time.sleep", "fabric.api.run", "fabric.api.hosts" ]
[((448, 465), 'fabric.api.hosts', 'hosts', (['WEB_SERVER'], {}), '(WEB_SERVER)\n', (453, 465), False, 'from fabric.api import run, cd, env, hosts\n'), ((1007, 1015), 'time.sleep', 'sleep', (['(5)'], {}), '(5)\n', (1012, 1015), False, 'from time import sleep\n'), ((1020, 1074), 'fabric.api.run', 'run', (['"""curl http:/...
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################### # Author: <NAME> # Date : 2019.2 # Email : <EMAIL> ################################################################### import functools from dayu_widgets3.button_group import MRadioButtonGroup from dayu_...
[ "dayu_widgets3.push_button.MPushButton", "random.randrange", "dayu_widgets3.dayu_theme.apply", "functools.partial", "dayu_widgets3.divider.MDivider", "dayu_widgets3.button_group.MRadioButtonGroup" ]
[((4125, 4147), 'dayu_widgets3.dayu_theme.apply', 'dayu_theme.apply', (['test'], {}), '(test)\n', (4141, 4147), False, 'from dayu_widgets3 import dayu_theme\n'), ((711, 730), 'dayu_widgets3.button_group.MRadioButtonGroup', 'MRadioButtonGroup', ([], {}), '()\n', (728, 730), False, 'from dayu_widgets3.button_group import...
#! /usr/bin/python # -*- coding: utf-8 -*- import tensorflow as tf from tensorlayer.layers.core import Layer from tensorlayer.layers.core import LayersConfig from tensorlayer import logging __all__ = [ 'Input', 'OneHotInput', 'Word2vecEmbeddingInput', 'EmbeddingInput', 'AverageEmbeddingInput', ]...
[ "tensorflow.one_hot", "tensorflow.nn.embedding_lookup", "tensorflow.get_variable", "tensorflow.nn.l2_normalize", "tensorflow.reduce_sum", "tensorflow.count_nonzero", "tensorflow.nn.nce_loss", "tensorflow.truncated_normal_initializer", "tensorflow.not_equal", "tensorlayer.logging.info", "tensorfl...
[((2865, 2984), 'tensorflow.one_hot', 'tf.one_hot', (['inputs', 'self.depth'], {'on_value': 'self.on_value', 'off_value': 'self.off_value', 'axis': 'self.axis', 'dtype': 'self.dtype'}), '(inputs, self.depth, on_value=self.on_value, off_value=self.\n off_value, axis=self.axis, dtype=self.dtype)\n', (2875, 2984), True...