code
stringlengths
20
1.04M
apis
list
extract_api
stringlengths
75
9.94M
# -*- coding: utf-8 -*- # Generated by Django 1.9.3 on 2016-09-08 11:57 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('proposals', '0008_financialaid'), ] operations = [ migrations.AlterField( ...
[ "django.db.models.CharField" ]
[((402, 520), 'django.db.models.CharField', 'models.CharField', ([], {'help_text': '"""How much money would you like to get (please specify currency)."""', 'max_length': '(255)'}), "(help_text=\n 'How much money would you like to get (please specify currency).',\n max_length=255)\n", (418, 520), False, 'from djan...
import logging import os import azure.functions as func from azure.cosmos import CosmosClient import json def create_cosmos_container_useable( DATABASE_ID=os.environ.get("AZURE_COSMOSDB_DATABASE_NAME"), CONTAINER=os.environ.get("AZURE_COSMOSDB_COLLECTION"), CONNECTION_STRING=os.environ.get("AZURE_COSMO...
[ "logging.StreamHandler", "json.dumps", "os.environ.get", "logging.info", "azure.functions.HttpResponse", "azure.cosmos.CosmosClient.from_connection_string", "logging.getLogger" ]
[((164, 210), 'os.environ.get', 'os.environ.get', (['"""AZURE_COSMOSDB_DATABASE_NAME"""'], {}), "('AZURE_COSMOSDB_DATABASE_NAME')\n", (178, 210), False, 'import os\n'), ((226, 269), 'os.environ.get', 'os.environ.get', (['"""AZURE_COSMOSDB_COLLECTION"""'], {}), "('AZURE_COSMOSDB_COLLECTION')\n", (240, 269), False, 'impo...
import numpy as np from numpy.testing import assert_array_equal from torchio.transforms import ToCanonical from ...utils import TorchioTestCase class TestToCanonical(TorchioTestCase): """Tests for :py:class:`ToCanonical` class.""" def test_no_changes(self): transform = ToCanonical() transform...
[ "numpy.testing.assert_array_equal", "numpy.eye", "torchio.transforms.ToCanonical" ]
[((289, 302), 'torchio.transforms.ToCanonical', 'ToCanonical', ([], {}), '()\n', (300, 302), False, 'from torchio.transforms import ToCanonical\n'), ((356, 416), 'numpy.testing.assert_array_equal', 'assert_array_equal', (['transformed.t1.data', 'self.sample.t1.data'], {}), '(transformed.t1.data, self.sample.t1.data)\n'...
from flask import Blueprint box_bp = Blueprint('box', __name__, url_prefix='/user/box/') from . import box
[ "flask.Blueprint" ]
[((38, 89), 'flask.Blueprint', 'Blueprint', (['"""box"""', '__name__'], {'url_prefix': '"""/user/box/"""'}), "('box', __name__, url_prefix='/user/box/')\n", (47, 89), False, 'from flask import Blueprint\n')]
import logging from time import sleep logger = logging.getLogger(__name__) class Motor: """Base Motor class.""" def __init__(self, identifier: str, key: str, offset: int, angle_limit: tuple, orientation: str, motor_type: str, instant_mode: bool = False): """ :param identifie...
[ "logging.getLogger", "time.sleep" ]
[((48, 75), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (65, 75), False, 'import logging\n'), ((3616, 3629), 'time.sleep', 'sleep', (['(0.0166)'], {}), '(0.0166)\n', (3621, 3629), False, 'from time import sleep\n')]
#!/usr/bin/env python3 # Copyright (c) 2020 The Taichi Authors. All rights reserved. # Use of this software is governed by the LICENSE file. """ Open each source file and add a copyright notice if it is missing. Could be faster with multiprocessing or async/await but this is just an one-off script on a fairly-sized pro...
[ "sys.stdout.write", "os.get_terminal_size", "argparse.ArgumentParser", "os.path.isdir", "os.walk", "os.path.exists", "time.time", "os.path.isfile", "os.path.relpath", "os.path.splitext", "os.path.join", "sys.exit", "re.compile" ]
[((4098, 4129), 're.compile', 're.compile', (['"""copyright.+taichi"""'], {}), "('copyright.+taichi')\n", (4108, 4129), False, 'import re\n'), ((4159, 4204), 're.compile', 're.compile', (['"""copyright.+taichi.+(20\\\\d\\\\d)- """'], {}), "('copyright.+taichi.+(20\\\\d\\\\d)- ')\n", (4169, 4204), False, 'import re\n'),...
#-*- coding: utf-8 -*- from PIL import Image, ImageChops, ImageDraw try: from django.contrib.auth import get_user_model User = get_user_model() except ImportError: from django.contrib.auth.models import User # NOQA from filer.models.foldermodels import Folder from filer.models.clipboardmodels import Clipb...
[ "PIL.Image.new", "filer.models.clipboardmodels.Clipboard.objects.get_or_create", "django.contrib.auth.get_user_model", "filer.models.clipboardmodels.ClipboardItem", "filer.models.foldermodels.Folder", "PIL.ImageDraw.Draw", "django.contrib.auth.models.User.objects.create_superuser" ]
[((136, 152), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (150, 152), False, 'from django.contrib.auth import get_user_model\n'), ((381, 440), 'django.contrib.auth.models.User.objects.create_superuser', 'User.objects.create_superuser', (['"""admin"""', '"""<EMAIL>"""', '"""secret"""'], {})...
from baselines import deepq from baselines import bench from baselines import logger from baselines.common.atari_wrappers import make_atari from baselines.deepq import defaults def main(): exp_dir = './runs/pong' # by default CSV logs will be created in OS temp directory logger.configure(dir=exp_dir, ...
[ "baselines.common.atari_wrappers.make_atari", "baselines.deepq.wrap_atari_dqn", "baselines.logger.get_dir", "baselines.deepq.defaults.atari", "baselines.logger.configure" ]
[((286, 389), 'baselines.logger.configure', 'logger.configure', ([], {'dir': 'exp_dir', 'format_strs': "['stdout', 'log', 'csv', 'tensorboard']", 'log_suffix': 'None'}), "(dir=exp_dir, format_strs=['stdout', 'log', 'csv',\n 'tensorboard'], log_suffix=None)\n", (302, 389), False, 'from baselines import logger\n'), ((...
from hydroDL.master import basins from hydroDL.app import waterQuality from hydroDL.master import slurm from hydroDL.data import gageII, usgs, gridMET # wqData = waterQuality.DataModelWQ('basinAll') # ind1 = wqData.indByRatio(0.8) # ind2 = wqData.indByRatio(0.8, first=False) # wqData.saveSubset(['first80', 'last20'], ...
[ "hydroDL.master.basins.wrapMaster", "hydroDL.app.waterQuality.indYr", "hydroDL.app.waterQuality.DataModelWQ" ]
[((370, 406), 'hydroDL.app.waterQuality.DataModelWQ', 'waterQuality.DataModelWQ', (['"""basinAll"""'], {}), "('basinAll')\n", (394, 406), False, 'from hydroDL.app import waterQuality\n'), ((416, 467), 'hydroDL.app.waterQuality.indYr', 'waterQuality.indYr', (['wqData.info'], {'yrLst': '[1979, 2000]'}), '(wqData.info, yr...
import turtle maze1 = ["x xxxxxx xxx xxx xxxxx", "xx xxx xxx xxx xxxxx", "xx xxx xxxxxx xxx xxxxx", "xx xxxxxx xxx xxxxx", "xxxxxx xxxxxx xxx x", "x xxxx xxxxx x", "x xxxxxxxx xxxx xxxxx x", "x xx xx xxx xxxxx x", "x xx...
[ "turtle.speed", "turtle.Turtle", "turtle.forward", "turtle.penup", "turtle.left", "turtle.setpos", "turtle.pendown" ]
[((2870, 2885), 'turtle.Turtle', 'turtle.Turtle', ([], {}), '()\n', (2883, 2885), False, 'import turtle\n'), ((2887, 2904), 'turtle.speed', 'turtle.speed', (['(100)'], {}), '(100)\n', (2899, 2904), False, 'import turtle\n'), ((2906, 2920), 'turtle.penup', 'turtle.penup', ([], {}), '()\n', (2918, 2920), False, 'import t...
import argparse from difflib import SequenceMatcher import editdistance from ..lib.helper import load_pairs_from_dir, load_pairs_from_file matcher = SequenceMatcher(isjunk=None, autojunk=False) GAP_ELEMENT = 0 def print_line(ocr, cor, gt): print('OCR: ', ocr) print('Corrected: ', cor) print('GT: ...
[ "editdistance.eval", "argparse.ArgumentParser", "difflib.SequenceMatcher" ]
[((151, 195), 'difflib.SequenceMatcher', 'SequenceMatcher', ([], {'isjunk': 'None', 'autojunk': '(False)'}), '(isjunk=None, autojunk=False)\n', (166, 195), False, 'from difflib import SequenceMatcher\n'), ((8286, 8383), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""OCR post-correction b...
""" RUN Handler. Only for development purpose """ from src.handler import carto_waze_lambda_handler if __name__ == '__main__': carto_waze_lambda_handler('', '')
[ "src.handler.carto_waze_lambda_handler" ]
[((134, 167), 'src.handler.carto_waze_lambda_handler', 'carto_waze_lambda_handler', (['""""""', '""""""'], {}), "('', '')\n", (159, 167), False, 'from src.handler import carto_waze_lambda_handler\n')]
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: pyatv/protocols/mrp/protobuf/TransactionMessage.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.proto...
[ "google.protobuf.symbol_database.Default", "pyatv.protocols.mrp.protobuf.ProtocolMessage_pb2.ProtocolMessage.RegisterExtension", "google.protobuf.descriptor_pool.Default", "google.protobuf.reflection.GeneratedProtocolMessageType" ]
[((516, 542), 'google.protobuf.symbol_database.Default', '_symbol_database.Default', ([], {}), '()\n', (540, 542), True, 'from google.protobuf import symbol_database as _symbol_database\n'), ((1709, 1907), 'google.protobuf.reflection.GeneratedProtocolMessageType', '_reflection.GeneratedProtocolMessageType', (['"""Trans...
"""Test for the SU2 drudge.""" from sympy import Rational, I, Symbol, symbols, IndexedBase from drudge import SU2LatticeDrudge, Range def test_su2_without_symbolic_index(spark_ctx): """Test SU2 lattice drudge without abstract symbolic lattice index.""" dr = SU2LatticeDrudge(spark_ctx) p = dr.names ...
[ "sympy.Symbol", "sympy.symbols", "sympy.Rational", "sympy.IndexedBase", "drudge.Range", "drudge.SU2LatticeDrudge" ]
[((271, 298), 'drudge.SU2LatticeDrudge', 'SU2LatticeDrudge', (['spark_ctx'], {}), '(spark_ctx)\n', (287, 298), False, 'from drudge import SU2LatticeDrudge, Range\n'), ((327, 341), 'sympy.Rational', 'Rational', (['(1)', '(2)'], {}), '(1, 2)\n', (335, 341), False, 'from sympy import Rational, I, Symbol, symbols, IndexedB...
import os import sys #getting a list of all audio .csv file names audios_dir= "C:\\Users\\Aradhana\\audioprocessing\\WaveChunksFiles" audios_wav_folder_dir="C:\\Users\\Aradhana\\audioprocessing\\conv_org\\" audios_wav_split_folder_dir="C:\\Users\\Aradhana\\audioprocessing\\conv_org_audio_split\\" audio_csv_files=[] fo...
[ "os.walk", "os.system" ]
[((346, 365), 'os.walk', 'os.walk', (['audios_dir'], {}), '(audios_dir)\n', (353, 365), False, 'import os\n'), ((1511, 1528), 'os.system', 'os.system', (['string'], {}), '(string)\n', (1520, 1528), False, 'import os\n')]
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.utils.data import DataLoader import torchvision.datasets as datasets import torchvision.transforms as transforms TOTAL_EPOCHS = 200 BATCH_SIZE = 256 TEMPERATURE = 0.07 # same to torchvision.models.resnet.conv3...
[ "torch.ones", "torch.nn.ReLU", "torch.eye", "torch.rand", "torch.nn.Sequential", "torch.utils.data.DataLoader", "torch.nn.Conv2d", "torch.nn.CrossEntropyLoss", "torch.cat", "torch.diag", "torchvision.datasets.CIFAR10", "torch.nn.CosineSimilarity", "torch.nn.Softmax", "torch.nn.Linear", "...
[((404, 498), 'torch.nn.Conv2d', 'nn.Conv2d', (['in_channels', 'out_channels'], {'kernel_size': '(3)', 'stride': 'stride', 'padding': '(1)', 'bias': '(False)'}), '(in_channels, out_channels, kernel_size=3, stride=stride, padding=\n 1, bias=False)\n', (413, 498), True, 'import torch.nn as nn\n'), ((8642, 8727), 'torc...
# -*- coding: utf-8 -*- from __future__ import print_function import logging import os allowed_domains = os.environ.get('ALLOWED_DOMAINS') logger = logging.getLogger(__name__) def lambda_handler(event, context): email = event['request']['userAttributes']['email'] domain = email.split('@')[1] if allowed_do...
[ "os.environ.get", "logging.getLogger" ]
[((106, 139), 'os.environ.get', 'os.environ.get', (['"""ALLOWED_DOMAINS"""'], {}), "('ALLOWED_DOMAINS')\n", (120, 139), False, 'import os\n'), ((149, 176), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (166, 176), False, 'import logging\n')]
import sys from threading import Event import subprocess import uuid import json from IPython.core.debugger import Tracer; debug_here = Tracer() from utils.RaasLogger import RaasLogger from utils.threadutil import * from utils.datasupport import * from prototypes.thread.ThreadPrototype import ThreadPrototype # TODO:...
[ "uuid.uuid4", "IPython.core.debugger.Tracer", "json.loads", "prototypes.database.DatabasePrototype.DatabasePrototype", "utils.RaasLogger.RaasLogger", "threading.Event" ]
[((136, 144), 'IPython.core.debugger.Tracer', 'Tracer', ([], {}), '()\n', (142, 144), False, 'from IPython.core.debugger import Tracer\n'), ((1494, 1529), 'utils.RaasLogger.RaasLogger', 'RaasLogger', (['self.__class__.__name__'], {}), '(self.__class__.__name__)\n', (1504, 1529), False, 'from utils.RaasLogger import Raa...
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- """ Adafruit NeoPixel library port to control the older WS2801 pixels from Raspberry Pi hardware SPI. Includes Adafruit “strandtest”-style functions and performs a self-test if run as main. Not 100% compatible, as it uses [r, g, b] arrays for 'color' instead of 24-bit...
[ "Adafruit_GPIO.SPI.SpiDev", "time.sleep" ]
[((5393, 5421), 'time.sleep', 'time.sleep', (['(wait_ms / 1000.0)'], {}), '(wait_ms / 1000.0)\n', (5403, 5421), False, 'import time\n'), ((6519, 6547), 'time.sleep', 'time.sleep', (['(wait_ms / 1000.0)'], {}), '(wait_ms / 1000.0)\n', (6529, 6547), False, 'import time\n'), ((6873, 6901), 'time.sleep', 'time.sleep', (['(...
import sys import nonebot from nonebot import on_regex, require from nonebot.adapters.cqhttp import Bot, Event, Message from nonebot.adapters.cqhttp.event import GroupMessageEvent from nonebot.exception import FinishedException from nonebot.log import logger from nonebot.typing import T_State from .data_source import...
[ "nonebot.get_bot", "nonebot.on_regex", "nonebot.get_driver", "sys.exc_info", "nonebot.require", "nonebot.adapters.cqhttp.Message" ]
[((538, 595), 'nonebot.on_regex', 'on_regex', (['"""((E|e)(P|p)(I|i)(C|c))?喜(加一|\\\\+1)"""'], {'priority': '(2)'}), "('((E|e)(P|p)(I|i)(C|c))?喜(加一|\\\\+1)', priority=2)\n", (546, 595), False, 'from nonebot import on_regex, require\n'), ((773, 814), 'nonebot.on_regex', 'on_regex', (['"""喜(加一|\\\\+1)(私聊)?订阅"""'], {'prior...
# SPDX-License-Identifier: (Apache-2.0 OR MIT) import unittest import orjson from .util import read_fixture_obj class AppendNewlineTests(unittest.TestCase): def test_dumps_newline(self): """ dumps() OPT_APPEND_NEWLINE """ self.assertEqual(orjson.dumps([], option=orjson.OPT_APPEN...
[ "orjson.dumps" ]
[((280, 330), 'orjson.dumps', 'orjson.dumps', (['[]'], {'option': 'orjson.OPT_APPEND_NEWLINE'}), '([], option=orjson.OPT_APPEND_NEWLINE)\n', (292, 330), False, 'import orjson\n'), ((559, 610), 'orjson.dumps', 'orjson.dumps', (['val'], {'option': 'orjson.OPT_APPEND_NEWLINE'}), '(val, option=orjson.OPT_APPEND_NEWLINE)\n'...
from setuptools import setup, find_packages setup( name='bitbucketcli', version='0.1.8', description='A command line interface for working with Bitbucket.', author='<NAME>', author_email='<EMAIL>', packages=find_packages(include=['bitbucketcli', 'bitbucketcli.*']), install_requires=[ ...
[ "setuptools.find_packages" ]
[((232, 289), 'setuptools.find_packages', 'find_packages', ([], {'include': "['bitbucketcli', 'bitbucketcli.*']"}), "(include=['bitbucketcli', 'bitbucketcli.*'])\n", (245, 289), False, 'from setuptools import setup, find_packages\n')]
############################################################################## # TEST CODE FOR STDict # ############################################################################## def test_prioVal_and_key(STDictonary_root): """Test function for the STDict t...
[ "re.split" ]
[((1850, 1888), 're.split', 're.split', (['"""(?:: )|(?:, )"""', 'string_test'], {}), "('(?:: )|(?:, )', string_test)\n", (1858, 1888), False, 'import re\n'), ((3640, 3678), 're.split', 're.split', (['"""(?:: )|(?:, )"""', 'string_test'], {}), "('(?:: )|(?:, )', string_test)\n", (3648, 3678), False, 'import re\n')]
#!/usr/bin/env python3 """ For a lookup-table of state:steps entries, replace the steps with the line number for this state. We will use this later to find the 'index' for a state. """ import os import sys import subprocess filename = sys.argv[1] filename_new = filename + ".new" to_write = [] with open(filename, ...
[ "os.rename", "subprocess.call" ]
[((556, 611), 'subprocess.call', 'subprocess.call', (["['./utils/pad-lines.py', filename_new]"], {}), "(['./utils/pad-lines.py', filename_new])\n", (571, 611), False, 'import subprocess\n'), ((612, 645), 'os.rename', 'os.rename', (['filename_new', 'filename'], {}), '(filename_new, filename)\n', (621, 645), False, 'impo...
# from __future__ import absolute_import from __future__ import print_function from __future__ import division from os import path from keras.utils.data_utils import get_file #def custom_objects(): # from layers import * # from model import * # return locals() def chunks(l, n): """Yield successive n-siz...
[ "keras.utils.data_utils.get_file", "os.path.dirname", "os.path.join" ]
[((670, 776), 'keras.utils.data_utils.get_file', 'get_file', (['"""/tmp/stanford-corenlp.zip"""'], {'origin': 'origin', 'cache_dir': 'lib_dir', 'cache_subdir': '""""""', 'extract': '(True)'}), "('/tmp/stanford-corenlp.zip', origin=origin, cache_dir=lib_dir,\n cache_subdir='', extract=True)\n", (678, 776), False, 'fr...
#!/usr/bin/python # -*- coding: utf-8 -*- import copy from enum import Enum from PIL import Image, ImageDraw, ImageFont import math import random from maze_master.maze import Maze, Direction def join(elements, separator, last_separator): if len(elements) == 0: return "" output = str(elements[0]) for i in r...
[ "copy.deepcopy", "PIL.Image.new", "math.sqrt", "maze_master.maze.Maze", "maze_master.maze.Direction", "PIL.ImageFont.truetype", "PIL.ImageDraw.Draw" ]
[((1053, 1095), 'maze_master.maze.Direction', 'Direction', (['((facing.value + self.value) % 4)'], {}), '((facing.value + self.value) % 4)\n', (1062, 1095), False, 'from maze_master.maze import Maze, Direction\n'), ((2110, 2128), 'maze_master.maze.Maze', 'Maze', (['width', 'depth'], {}), '(width, depth)\n', (2114, 2128...
#!/usr/bin/env python from yaml import load class ConfigError(Exception): pass class ErrorSigIssue(ConfigError): def __init__(self, value): self.parameter = value def __str__(self): return repr(self.parameter) class Config(object): """Configuraiton Object - read and store conf val...
[ "yaml.load" ]
[((1082, 1096), 'yaml.load', 'load', (['conf_str'], {}), '(conf_str)\n', (1086, 1096), False, 'from yaml import load\n')]
import json data = { 'a' : 1, 'b' : 2, 'c' : 3, 'd' : 4, 'e' : 5 } json_data = json.dumps(data) print (type(json_data)) print (json_data) original_data = json.loads(json_data) print (type(original_data)) print (original_data)
[ "json.loads", "json.dumps" ]
[((82, 98), 'json.dumps', 'json.dumps', (['data'], {}), '(data)\n', (92, 98), False, 'import json\n'), ((158, 179), 'json.loads', 'json.loads', (['json_data'], {}), '(json_data)\n', (168, 179), False, 'import json\n')]
# -*- coding: utf-8 -*- # Begin of __future__ module # End of __future__ module # Begin of external module # End of external module import traceback from strategyease_sdk.base_manager import * from strategyease_sdk.models import * class RiceQuantStrategyManagerFactory(BaseStrategyManagerFactory): def __in...
[ "traceback.format_exc" ]
[((3909, 3931), 'traceback.format_exc', 'traceback.format_exc', ([], {}), '()\n', (3929, 3931), False, 'import traceback\n')]
# Copyright 2018 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
[ "math.sqrt", "networkx.is_connected", "itertools.combinations", "networkx.connected_components", "networkx.to_numpy_array", "networkx.utils.decorators.nodes_or_number", "dwave_networkx.utils.binary_quadratic_model_sampler" ]
[((991, 1029), 'networkx.utils.decorators.nodes_or_number', 'nx.utils.decorators.nodes_or_number', (['(1)'], {}), '(1)\n', (1026, 1029), True, 'import networkx as nx\n'), ((2589, 2622), 'dwave_networkx.utils.binary_quadratic_model_sampler', 'binary_quadratic_model_sampler', (['(2)'], {}), '(2)\n', (2619, 2622), False, ...
#!/usr/bin/env python from h2o import H2OFrame, H2OModel import h2o as h2o localH2O = h2o.init() air = H2OFrame.from_csv(localH2O, "allyears_tiny.csv", index_col = False) air.head().print() X_air = air['Origin', 'Dest', 'Distance', 'UniqueCarrier', 'Month', 'DayofMonth', 'DayOfWeek'] y_air = air['IsDepDelayed'] X_a...
[ "h2o.H2OFrame.from_csv", "h2o.H2OModel.GBM", "h2o.H2OFrame.train_valid_test", "h2o.init" ]
[((88, 98), 'h2o.init', 'h2o.init', ([], {}), '()\n', (96, 98), True, 'import h2o as h2o\n'), ((105, 170), 'h2o.H2OFrame.from_csv', 'H2OFrame.from_csv', (['localH2O', '"""allyears_tiny.csv"""'], {'index_col': '(False)'}), "(localH2O, 'allyears_tiny.csv', index_col=False)\n", (122, 170), False, 'from h2o import H2OFrame...
from bandersnatch import Point, Scalar from poly_utils import PrimeField import hashlib import time # # Utilities for dealing with polynomials in evaluation form # # A polynomial in evaluation for is defined by its values on DOMAIN, # where DOMAIN is [0, 1, 2, ...] # # Any polynomial of degree < WIDTH can be represent...
[ "poly_utils.PrimeField", "bandersnatch.Point", "bandersnatch.Scalar", "time.time", "hashlib.sha256" ]
[((5945, 5956), 'time.time', 'time.time', ([], {}), '()\n', (5954, 5956), False, 'import time\n'), ((6032, 6054), 'bandersnatch.Point', 'Point', ([], {'generator': '(False)'}), '(generator=False)\n', (6037, 6054), False, 'from bandersnatch import Point, Scalar\n'), ((6068, 6079), 'time.time', 'time.time', ([], {}), '()...
import os from . import settings from django.utils.translation import get_language, ugettext as _ class Document(): path=None @classmethod def get_title(cls): if not hasattr(cls, 'title'): raise NotImplementedError('Declare title attribute') return cls.title @classmethod ...
[ "django.utils.translation.ugettext", "django.utils.translation.get_language", "os.path.join" ]
[((509, 534), 'django.utils.translation.ugettext', '_', (['"""Terms and Conditions"""'], {}), "('Terms and Conditions')\n", (510, 534), True, 'from django.utils.translation import get_language, ugettext as _\n'), ((1927, 2016), 'os.path.join', 'os.path.join', (['settings.BASE_DIR', '"""Terms-and-Conditions-Unilot-v1.1....
# -*- coding: utf-8 -*- # Copyright 2019, 2020 Awesome Technologies Innovationslabor GmbH # # 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 # ...
[ "requests.put" ]
[((1901, 2016), 'requests.put', 'requests.put', (['url'], {'headers': "{'Authorization': 'Bearer ' + config['as_token']}", 'json': 'matrix_message', 'verify': '(False)'}), "(url, headers={'Authorization': 'Bearer ' + config['as_token']},\n json=matrix_message, verify=False)\n", (1913, 2016), False, 'import requests\...
import json import time from pprint import pprint import yaml from google.oauth2 import service_account from googleapiclient.discovery import build from cloudmesh.common.DateTime import DateTime from cloudmesh.volume.VolumeABC import VolumeABC from cloudmesh.common.util import banner from cloudmesh.common.Shell impor...
[ "cloudmesh.configuration.Config.Config", "cloudmesh.common.Printer.Printer.flatwrite", "google.oauth2.service_account.Credentials.from_service_account_file", "pprint.pprint", "googleapiclient.discovery.build" ]
[((1883, 1891), 'cloudmesh.configuration.Config.Config', 'Config', ([], {}), '()\n', (1889, 1891), False, 'from cloudmesh.configuration.Config import Config\n'), ((2968, 2984), 'pprint.pprint', 'pprint', (['elements'], {}), '(elements)\n', (2974, 2984), False, 'from pprint import pprint\n'), ((3883, 3985), 'google.oaut...
import unittest from timeeval.params import FullParameterGrid, IndependentParameterGrid class TestParameterSearch(unittest.TestCase): def setUp(self) -> None: self.params = {"a": [1, 2], "b": [True, False], "c": ["auto", "tanh"]} def test_full_parameter_grid(self): grid = FullParameterGrid(...
[ "timeeval.params.IndependentParameterGrid", "timeeval.params.FullParameterGrid" ]
[((302, 332), 'timeeval.params.FullParameterGrid', 'FullParameterGrid', (['self.params'], {}), '(self.params)\n', (319, 332), False, 'from timeeval.params import FullParameterGrid, IndependentParameterGrid\n'), ((1326, 1363), 'timeeval.params.IndependentParameterGrid', 'IndependentParameterGrid', (['self.params'], {}),...
import gdsfactory as gf mirror_port = """ name: mirror_port instances: mmi_long: component: mmi1x2 settings: width_mmi: 4.5 length_mmi: 5 placements: mmi_long: port: o1 x: 20 y: 10 mirror: True ports: o1: mmi_long,o3 o2: mmi_long,o2 o3: ...
[ "gdsfactory.read.from_yaml" ]
[((508, 538), 'gdsfactory.read.from_yaml', 'gf.read.from_yaml', (['mirror_port'], {}), '(mirror_port)\n', (525, 538), True, 'import gdsfactory as gf\n'), ((548, 578), 'gdsfactory.read.from_yaml', 'gf.read.from_yaml', (['mirror_port'], {}), '(mirror_port)\n', (565, 578), True, 'import gdsfactory as gf\n'), ((685, 715), ...
import os import time import random import json import argparse import torch import numpy as np import os.path as osp from tqdm import tqdm from pathlib import Path from utils.dataset import get_datasets from explainers import * from torch_geometric.data import DataLoader def parse_args(): parser = argparse.Arg...
[ "utils.dataset.get_datasets", "json.dump", "os.makedirs", "argparse.ArgumentParser", "torch.load", "torch_geometric.data.DataLoader", "numpy.mean", "torch.cuda.is_available", "numpy.array", "os.path.join" ]
[((1238, 1269), 'utils.dataset.get_datasets', 'get_datasets', ([], {'name': 'args.dataset'}), '(name=args.dataset)\n', (1250, 1269), False, 'from utils.dataset import get_datasets\n'), ((1283, 1339), 'torch.load', 'torch.load', (['f"""param/filtered/{args.dataset}_idx_test.pt"""'], {}), "(f'param/filtered/{args.dataset...
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, so...
[ "copy.deepcopy", "bigbench.api.task_metrics.measure_generative_metrics", "tensorflow.compat.v1.io.gfile.GFile", "json.load", "bigbench.api.task.TaskMetadata", "bigbench.api.task_metrics.measure_multiple_choice_metrics", "tensorflow.compat.v1.logging.info", "re.findall", "numpy.random.choice" ]
[((3458, 3480), 'copy.deepcopy', 'copy.deepcopy', (['samples'], {}), '(samples)\n', (3471, 3480), False, 'import copy\n'), ((10877, 10955), 'bigbench.api.task_metrics.measure_multiple_choice_metrics', 'metrics.measure_multiple_choice_metrics', (['samples', 'self.multiple_choice_metrics'], {}), '(samples, self.multiple_...
# -*- coding: utf-8 -*- # @Time : 2021/5/31 14:54 # @Author : WuBingTai import os, re class ADBUtil: def call_adb(self, command): command_result = '' command_text = 'adb %s' % command results = os.popen(command_text, "r") while 1: line = results.readline() ...
[ "os.popen", "re.compile" ]
[((230, 257), 'os.popen', 'os.popen', (['command_text', '"""r"""'], {}), "(command_text, 'r')\n", (238, 257), False, 'import os, re\n'), ((3660, 3702), 're.compile', 're.compile', (['""" .*com.myzaker.ZAKER_Phone\n"""'], {}), "(' .*com.myzaker.ZAKER_Phone\\n')\n", (3670, 3702), False, 'import os, re\n'), ((4658, 4704),...
import numpy as np import matplotlib.pyplot as plt import os from . import localpath def restructure_chain(directory , parameter_names = [r'$\alpha_\mathrm{IMF}$',r'$\log_{10}\left(\mathrm{N}_\mathrm{Ia}\right)$',r'$\log_{10}\left(\tau_\mathrm{Ia}\right)$',r'$\log_{10}\left(\mathrm{SFE}\right)$',r'$\log_{10}\left(\mat...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.yscale", "numpy.load", "matplotlib.pyplot.clf", "numpy.argsort", "matplotlib.pyplot.figure", "os.path.isfile", "numpy.mean", "numpy.histogram", "numpy.sin", "numpy.exp", "os.path.join", "numpy.unique", "shutil.copy", "numpy.std", "matplotli...
[((1446, 1484), 'numpy.load', 'np.load', (["('%sflatchain.npy' % directory)"], {}), "('%sflatchain.npy' % directory)\n", (1453, 1484), True, 'import numpy as np\n'), ((1499, 1545), 'numpy.load', 'np.load', (["('%sflatlnprobability.npy' % directory)"], {}), "('%sflatlnprobability.npy' % directory)\n", (1506, 1545), True...
''' components.py contains elements that may be used interchangeably with multiple fixtures ''' from pages.home_page.models import HomePage def home(): return HomePage.objects.first()
[ "pages.home_page.models.HomePage.objects.first" ]
[((173, 197), 'pages.home_page.models.HomePage.objects.first', 'HomePage.objects.first', ([], {}), '()\n', (195, 197), False, 'from pages.home_page.models import HomePage\n')]
from django.contrib.auth.models import AbstractUser from django.db import models import django.utils.timezone # User table inherits from AbstractUser Django - built in user model, can add extra columns if needed class User(AbstractUser): pass class Listings(models.Model): listing_id = models.AutoField(p...
[ "django.db.models.ForeignKey", "django.db.models.CharField", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.DecimalField", "django.db.models.DateTimeField" ]
[((302, 336), 'django.db.models.AutoField', 'models.AutoField', ([], {'primary_key': '(True)'}), '(primary_key=True)\n', (318, 336), False, 'from django.db import models\n'), ((359, 419), 'django.db.models.ForeignKey', 'models.ForeignKey', (['User'], {'on_delete': 'models.CASCADE', 'default': '(0)'}), '(User, on_delete...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Data/Player/PlayerPublicProfile.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.p...
[ "google.protobuf.symbol_database.Default", "google.protobuf.descriptor.FieldDescriptor" ]
[((515, 541), 'google.protobuf.symbol_database.Default', '_symbol_database.Default', ([], {}), '()\n', (539, 541), True, 'from google.protobuf import symbol_database as _symbol_database\n'), ((1861, 2185), 'google.protobuf.descriptor.FieldDescriptor', '_descriptor.FieldDescriptor', ([], {'name': '"""level"""', 'full_na...
#!/usr/bin/env python3 import sys import pandas as pd def latency(df): df = df["t_result"] - df["t_submitted"] return df.describe(percentiles=[0.25, 0.50, 0.75, 0.99], include="all") def interarrivial(df): df = df["t_submitted"] df = df.sort_values().diff() return df.describe(percentiles=[0.25, ...
[ "pandas.read_json" ]
[((394, 446), 'pandas.read_json', 'pd.read_json', ([], {'path_or_buf': 'filepath', 'orient': '"""records"""'}), "(path_or_buf=filepath, orient='records')\n", (406, 446), True, 'import pandas as pd\n')]
import torch.optim as optim import numpy as np from numpy import random import math import torch from torch.autograd import Variable def clipping_scaling(delta,net): #new_params = [] for (name,i),grads_i in zip(net.named_parameters(),delta): #print(name) if (('conv' in name) or ('fc' in name)) and ('weight' in n...
[ "torch.zeros_like", "torch.LongTensor", "math.sqrt", "torch.FloatTensor", "torch.mul", "torch.clamp", "torch.max", "torch.zeros", "torch.div" ]
[((2929, 2950), 'torch.max', 'torch.max', (['l_zero', 'l2'], {}), '(l_zero, l2)\n', (2938, 2950), False, 'import torch\n'), ((2963, 2980), 'torch.mul', 'torch.mul', (['l3', 'l3'], {}), '(l3, l3)\n', (2972, 2980), False, 'import torch\n'), ((354, 394), 'torch.clamp', 'torch.clamp', (['(i.data - 1 * grads_i)', '(-1)', '(...
import cPickle as pickle from sklearn import cross_validation import pandas as pd import numpy as np import os from param import config train = pd.read_csv(config.origin_train_path, header=0) y = train[config.target].values skf = [0]*config.kiter for i in range(config.kiter): seed = 711 +(i+1) * 1000 skf[...
[ "pandas.read_csv", "cPickle.dump", "sklearn.cross_validation.StratifiedKFold" ]
[((148, 195), 'pandas.read_csv', 'pd.read_csv', (['config.origin_train_path'], {'header': '(0)'}), '(config.origin_train_path, header=0)\n', (159, 195), True, 'import pandas as pd\n'), ((325, 419), 'sklearn.cross_validation.StratifiedKFold', 'cross_validation.StratifiedKFold', (['y'], {'n_folds': 'config.kfold', 'shuff...
"""BERT + Softmax for named entity recognition""" import torch.nn as nn from pytorch_pretrained_bert.modeling import BertPreTrainedModel, BertModel from torch.nn import CrossEntropyLoss class BERTSoftmax(BertPreTrainedModel): """BERT model for token-level classification. This module is composed of the BERT m...
[ "torch.nn.Dropout", "torch.nn.CrossEntropyLoss", "pytorch_pretrained_bert.modeling.BertModel", "torch.nn.Linear" ]
[((1907, 1924), 'pytorch_pretrained_bert.modeling.BertModel', 'BertModel', (['config'], {}), '(config)\n', (1916, 1924), False, 'from pytorch_pretrained_bert.modeling import BertPreTrainedModel, BertModel\n'), ((1948, 1986), 'torch.nn.Dropout', 'nn.Dropout', (['config.hidden_dropout_prob'], {}), '(config.hidden_dropout...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Script to plot tasks from profiling data. This script requires the matplotlib and numpy Python modules. """ from __future__ import print_function # mathplotlib does not support Unicode strings a column names. # from __future__ import unicode_literals import argparse ...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.xscale", "matplotlib.pyplot.yscale", "matplotlib.pyplot.show", "argparse.ArgumentParser", "matplotlib.pyplot.plot", "os.path.basename", "os.path.isdir", "matplotlib.pyplot.legend", "numpy.genfromtxt", "sys.exit", "glob.glob", "matplotlib.pyplot.y...
[((1861, 1939), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Plots memory usage from profiling data."""'}), "(description='Plots memory usage from profiling data.')\n", (1884, 1939), False, 'import argparse\n'), ((2618, 2670), 'os.path.join', 'os.path.join', (['options.profile_path', '...
#!/usr/bin/env python ''' mcu: Modeling and Crystallographic Utilities Copyright (C) 2019 <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/lice...
[ "matplotlib.pyplot.show", "numpy.ceil", "matplotlib.pyplot.figure", "matplotlib.ticker.AutoMinorLocator", "numpy.arange", "numpy.sin", "numpy.linspace", "numpy.cos", "matplotlib.pyplot.ylabel" ]
[((3541, 3575), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(fig_w, fig_h)'}), '(figsize=(fig_w, fig_h))\n', (3551, 3575), True, 'import matplotlib.pyplot as plt\n'), ((4895, 4958), 'matplotlib.pyplot.ylabel', 'plt.ylabel', (["('Y' + '($\\\\theta$)' + ' (N/m)')"], {'size': '(1.2 * fontsize)'}), "('Y' + ...
import numpy as np import glob, os import pdb def create_test_and_train_lists(num_train_images, num_test_images, dataset_STR, dataset_str, image_extension): if image_extension[0] == '.': image_extension = image_extension[1:] save_dir_to_write = "/root/ssp_ws/src/singleshotpose/{}/{}/images".format(da...
[ "numpy.random.shuffle" ]
[((980, 1007), 'numpy.random.shuffle', 'np.random.shuffle', (['img_inds'], {}), '(img_inds)\n', (997, 1007), True, 'import numpy as np\n'), ((1583, 1610), 'numpy.random.shuffle', 'np.random.shuffle', (['img_inds'], {}), '(img_inds)\n', (1600, 1610), True, 'import numpy as np\n')]
"""Switch platform for CiscoImc.""" import logging from typing import Any from homeassistant.components.switch import SwitchEntity from homeassistant.core import callback from homeassistant.const import CONF_IP_ADDRESS from .const import DOMAIN, NAME from .imc_device import CiscoImcDevice from .models import CiscoIm...
[ "logging.getLogger" ]
[((357, 384), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (374, 384), False, 'import logging\n')]
import pytest import sys import copy import tempfile import os import mock import pkg_resources import yaml from detectron2.data import DatasetCatalog from ginjinn.ginjinn_config import GinjinnConfiguration from ginjinn.simulation import generate_simple_shapes_coco from ginjinn.data_reader.load_datasets import load_t...
[ "os.mkdir", "os.path.abspath", "yaml.load", "tempfile.TemporaryDirectory", "detectron2.data.DatasetCatalog.remove", "ginjinn.data_reader.load_datasets.load_train_val_sets", "yaml.dump", "pytest.fixture", "pkg_resources.resource_filename", "ginjinn.trainer.trainer.ValTrainer.from_ginjinn_config", ...
[((393, 437), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""', 'autouse': '(True)'}), "(scope='module', autouse=True)\n", (407, 437), False, 'import pytest\n'), ((543, 573), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (557, 573), False, 'import pytest\n')...
# -*- coding: utf-8 -*- """Conservation filters.""" from django.contrib.gis.db import models as geo_models from django.contrib.gis.db.models import Extent, Union, Collect # noqa from django.db.models import Q import django_filters from conservation import models as cons_models from conservation import widgets as con...
[ "django.contrib.gis.db.models.Collect", "taxonomy.models.Community.objects.all", "taxonomy.models.Taxon.objects.all", "django.db.models.Q", "conservation.widgets.DocumentMultipleWidget", "wastd.observations.models.Area.objects.filter", "django.contrib.gis.db.models.PolygonField", "taxonomy.widgets.Com...
[((667, 692), 'django.contrib.gis.db.models.PolygonField', 'geo_models.PolygonField', ([], {}), '()\n', (690, 692), True, 'from django.contrib.gis.db import models as geo_models\n'), ((3745, 3770), 'django.contrib.gis.db.models.PolygonField', 'geo_models.PolygonField', ([], {}), '()\n', (3768, 3770), True, 'from django...
from django.contrib import admin from .models import Images class AdminImages(admin.ModelAdmin): list_display = ['imageid', 'imagename'] admin.site.register(Images, AdminImages)
[ "django.contrib.admin.site.register" ]
[((141, 181), 'django.contrib.admin.site.register', 'admin.site.register', (['Images', 'AdminImages'], {}), '(Images, AdminImages)\n', (160, 181), False, 'from django.contrib import admin\n')]
# -*- coding: utf-8 -*- import json, csv, pyexling, codecs, argparse, logging from pyexling import parser_morph from pyexling import morph def create_process_logger(): logging.basicConfig(level = logging.DEBUG) logger = logging.getLogger('console_log') logger.setLevel(logging.DEBUG) logger.propagate = False ...
[ "json.dump", "json.load", "csv.reader", "argparse.ArgumentParser", "logging.basicConfig", "logging.FileHandler", "codecs.open", "logging.StreamHandler", "logging.Formatter", "pyexling.Processor", "pyexling.parser_morph.create_annot_morph", "logging.getLogger", "pyexling.morph.LexemeType" ]
[((5962, 6047), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Peripheral role extracting from framebank"""'}), "(description='Peripheral role extracting from framebank'\n )\n", (5985, 6047), False, 'import json, csv, pyexling, codecs, argparse, logging\n'), ((174, 214), 'logging.basi...
""" used for console output highlighting only """ import os # for console output highlighting HIGHLIGHT = '\33[33m\33[1m' FAIL = '\033[91m' CEND = '\033[0m' # Gurobi consts for SR Routing ILP # TIME_LIMIT = 60 * 60 * 10 # in sec TIME_LIMIT = 60 * 60 * 4 # in sec MAX_THREADS = 10 LOGTOCONSOLE = 0 # 0:= no logging t...
[ "os.path.abspath", "os.makedirs", "os.path.basename", "os.path.exists", "os.path.splitext" ]
[((520, 562), 'os.path.abspath', 'os.path.abspath', (['"""../data/demands/sndlib/"""'], {}), "('../data/demands/sndlib/')\n", (535, 562), False, 'import os\n'), ((591, 636), 'os.path.abspath', 'os.path.abspath', (['"""../data/topologies/sndlib/"""'], {}), "('../data/topologies/sndlib/')\n", (606, 636), False, 'import o...
from mongothon.document import Document, DocumentList import pickle import unittest class TestDocument(unittest.TestCase): def test_equals_dict(self): doc = Document({'a': 'b', 'c': 'd'}) self.assertEquals(doc, {'a': 'b', 'c': 'd'}) def test_init_without_initial(self): doc = Document...
[ "mongothon.document.Document", "mongothon.document.DocumentList", "pickle.dumps" ]
[((172, 202), 'mongothon.document.Document', 'Document', (["{'a': 'b', 'c': 'd'}"], {}), "({'a': 'b', 'c': 'd'})\n", (180, 202), False, 'from mongothon.document import Document, DocumentList\n'), ((312, 322), 'mongothon.document.Document', 'Document', ([], {}), '()\n', (320, 322), False, 'from mongothon.document import...
#!/usr/bin/env python3 import argparse import os import sys import boto3 import json def get_entity_sizes(bucket, prefix): s3 = boto3.client("s3") prefix = f"{prefix}social_network/csv/raw/composite-merged-fk/dynamic/" more = True token = None sizes = {} while more: resp = s3.list_obj...
[ "json.dump", "boto3.client" ]
[((135, 153), 'boto3.client', 'boto3.client', (['"""s3"""'], {}), "('s3')\n", (147, 153), False, 'import boto3\n'), ((961, 980), 'json.dump', 'json.dump', (['sizes', 'f'], {}), '(sizes, f)\n', (970, 980), False, 'import json\n')]
import requests import argparse import os from bs4 import BeautifulSoup from time import sleep class MakeFolder(object): def __init__(self, disable=False): self.disable_mkdir = disable self.base_url = "https://www.msdmanuals.com/" self.url = "https://www.msdmanuals.com/zh/首页/symptoms" ...
[ "os.mkdir", "argparse.ArgumentParser", "os.getcwd", "os.path.exists", "time.sleep", "requests.get", "bs4.BeautifulSoup" ]
[((4469, 4494), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (4492, 4494), False, 'import argparse\n'), ((1438, 1460), 'requests.get', 'requests.get', (['self.url'], {}), '(self.url)\n', (1450, 1460), False, 'import requests\n'), ((1549, 1585), 'bs4.BeautifulSoup', 'BeautifulSoup', (['r_text'...
#!/usr/bin/python """ <NAME> and <NAME> SoftDev1 pd7 HW8 -- Do I Know You (Redirected) 2017-10-04 """ from __future__ import print_function import os __authors__ = ['<NAME>', '<NAME>'] __date__ = '2017-10-06' from flask import Flask from flask import Response from flask import render_template from...
[ "flask.Flask", "util.flask_utils.reroute_to", "util.flask_utils.preconditions", "pprint.pprint", "flask.render_template", "os.urandom" ]
[((582, 597), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (587, 597), False, 'from flask import Flask\n'), ((1658, 1710), 'util.flask_utils.preconditions', 'preconditions', (['signup', 'post_only', 'valid_account_form'], {}), '(signup, post_only, valid_account_form)\n', (1671, 1710), False, 'from util.f...
import sys sys.path.append('/Users/lls/Documents/Projects/DeepHalos') from utilss import radius_functions_deep as rf sys.path.append('/Users/lls/Documents/mlhalos_code/') from mlhalos import distinct_colours import numpy as np import matplotlib.pyplot as plt from scipy import stats import pandas as pd def sort_ids_tr...
[ "sys.path.append", "matplotlib.pyplot.clf", "numpy.allclose", "mlhalos.distinct_colours.get_distinct", "numpy.argsort", "numpy.sort", "numpy.where", "numpy.array", "matplotlib.pyplot.figlegend", "numpy.linspace", "matplotlib.pyplot.subplots_adjust", "scipy.stats.describe", "matplotlib.pyplot...
[((11, 69), 'sys.path.append', 'sys.path.append', (['"""/Users/lls/Documents/Projects/DeepHalos"""'], {}), "('/Users/lls/Documents/Projects/DeepHalos')\n", (26, 69), False, 'import sys\n'), ((117, 170), 'sys.path.append', 'sys.path.append', (['"""/Users/lls/Documents/mlhalos_code/"""'], {}), "('/Users/lls/Documents/mlh...
import math import os import torchvision.utils from basicsr.data import build_dataloader, build_dataset def main(mode='folder'): """Test paired image dataset. Args: mode: There are three modes: 'lmdb', 'folder', 'meta_info_file'. """ opt = {} opt['dist'] = False opt['phase'] = 'train...
[ "basicsr.data.build_dataloader", "basicsr.data.build_dataset", "os.makedirs", "math.sqrt" ]
[((1634, 1667), 'os.makedirs', 'os.makedirs', (['"""tmp"""'], {'exist_ok': '(True)'}), "('tmp', exist_ok=True)\n", (1645, 1667), False, 'import os\n'), ((1683, 1701), 'basicsr.data.build_dataset', 'build_dataset', (['opt'], {}), '(opt)\n', (1696, 1701), False, 'from basicsr.data import build_dataloader, build_dataset\n...
############################################################################## # # Copyright (c) 2001 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS I...
[ "Persistence.PersistentMapping", "urllib.quote", "zope.interface.implements", "Products.CMFCore.utils.registerToolInterface", "ZPublisher.mapply.mapply", "zope.component.getUtility", "App.special_dtml.DTMLFile", "os.path.splitext", "App.class_init.InitializeClass", "AccessControl.SecurityInfo.Clas...
[((3612, 3648), 'App.class_init.InitializeClass', 'InitializeClass', (['MajorMinorPredicate'], {}), '(MajorMinorPredicate)\n', (3627, 3648), False, 'from App.class_init import InitializeClass\n'), ((5276, 5311), 'App.class_init.InitializeClass', 'InitializeClass', (['ExtensionPredicate'], {}), '(ExtensionPredicate)\n',...
# The aim of this approach is to find for a given value of p1, p2 and moi, a value of P(lyso) that brings the MoI as close to 1 as possible. The logic is this: One way to achieve coexistence is to ensure that the MoI remains equal to 1 so that neither of the two species dominates the other. # For each value of MoI a...
[ "os.makedirs", "os.path.exists", "time.time", "numpy.mean", "numpy.exp", "numpy.random.rand" ]
[((954, 965), 'time.time', 'time.time', ([], {}), '()\n', (963, 965), False, 'import time\n'), ((3199, 3215), 'numpy.mean', 'np.mean', (['moi_arr'], {}), '(moi_arr)\n', (3206, 3215), True, 'import numpy as np\n'), ((1833, 1849), 'numpy.random.rand', 'np.random.rand', ([], {}), '()\n', (1847, 1849), True, 'import numpy ...
""" MIT License Copyright (c) 2020 xPolar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distri...
[ "psutil.virtual_memory", "platform.python_version", "discord.ext.commands.command", "os.getpid", "datetime.datetime.utcnow", "platform.version", "platform.system", "platform.release", "Utils.embed_color" ]
[((1465, 1499), 'discord.ext.commands.command', 'commands.command', ([], {'aliases': "['info']"}), "(aliases=['info'])\n", (1481, 1499), False, 'from discord.ext import commands\n'), ((1907, 1918), 'os.getpid', 'os.getpid', ([], {}), '()\n', (1916, 1918), False, 'import os, platform\n'), ((1940, 1963), 'psutil.virtual_...
import pandas as pd import hashlib import json import traceback from sqlalchemy import create_engine from config import MYSQL_USER, MYSQL_PASSWORD, MYSQL_HOST, MYSQL_PORT, MYSQL_DB, OBSERVED_MYSQL_HOST import datetime class MySqlAdapter: def __init__(self): # CONFIG = json.loads(open('/home/uwcc-admin/udp...
[ "traceback.print_exc", "json.dumps", "hashlib.sha256", "datetime.datetime.strptime", "datetime.timedelta", "pandas.read_sql_query", "sqlalchemy.create_engine" ]
[((2118, 2153), 'pandas.read_sql_query', 'pd.read_sql_query', (['sql', 'self.engine'], {}), '(sql, self.engine)\n', (2135, 2153), True, 'import pandas as pd\n'), ((2684, 2700), 'hashlib.sha256', 'hashlib.sha256', ([], {}), '()\n', (2698, 2700), False, 'import hashlib\n'), ((3399, 3415), 'hashlib.sha256', 'hashlib.sha25...
''' Description: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same element twice. Example: Given nums = [2, 7, 11, 15], target = 9, Because nums[0] + nums[1] = 2 + 7 ...
[ "collections.namedtuple" ]
[((2079, 2118), 'collections.namedtuple', 'namedtuple', (['"""TestEntry"""', '"""array target"""'], {}), "('TestEntry', 'array target')\n", (2089, 2118), False, 'from collections import namedtuple\n')]
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
[ "mindspore.train.serialization.load_checkpoint" ]
[((1833, 1859), 'mindspore.train.serialization.load_checkpoint', 'load_checkpoint', (['ckpt_path'], {}), '(ckpt_path)\n', (1848, 1859), False, 'from mindspore.train.serialization import load_checkpoint\n')]
# Import pyfiglet module import pyfiglet # Import Click for creating beautiful command line interfaces. You may # choose to check https://click.palletsprojects.com/en/7.x/ for more details import click # Import data scrambler from scrambler import DataScrambler # Show introductory text intro_text = pyfiglet.figlet_f...
[ "scrambler.DataScrambler", "click.echo", "click.option", "pyfiglet.figlet_format", "click.command" ]
[((303, 344), 'pyfiglet.figlet_format', 'pyfiglet.figlet_format', (['"""Text Obfuscator"""'], {}), "('Text Obfuscator')\n", (325, 344), False, 'import pyfiglet\n'), ((366, 381), 'click.command', 'click.command', ([], {}), '()\n', (379, 381), False, 'import click\n'), ((383, 503), 'click.option', 'click.option', (['"""-...
"""Test the nuki config flow.""" from unittest.mock import patch from pynuki.bridge import InvalidCredentialsException from requests.exceptions import RequestException from homeassistant import config_entries, data_entry_flow, setup from homeassistant.components.dhcp import HOSTNAME, IP_ADDRESS, MAC_ADDRESS from home...
[ "homeassistant.setup.async_setup_component", "unittest.mock.patch" ]
[((550, 614), 'homeassistant.setup.async_setup_component', 'setup.async_setup_component', (['hass', '"""persistent_notification"""', '{}'], {}), "(hass, 'persistent_notification', {})\n", (577, 614), False, 'from homeassistant import config_entries, data_entry_flow, setup\n'), ((846, 940), 'unittest.mock.patch', 'patch...
# -*- coding: utf-8 -*- # (c) Copyright 2019 Sensirion AG, Switzerland from __future__ import absolute_import, division, print_function from sensirion_shdlc_driver.commands.bootloader import \ ShdlcCmdFirmwareUpdateStart from sensirion_shdlc_driver.errors import ShdlcResponseError import pytest def tes...
[ "pytest.mark.parametrize", "pytest.raises", "sensirion_shdlc_driver.commands.bootloader.ShdlcCmdFirmwareUpdateStart" ]
[((1279, 1351), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""input"""', "[b'\\x00', b'\\x00\\x00\\x00\\x00\\x00\\x00']"], {}), "('input', [b'\\x00', b'\\x00\\x00\\x00\\x00\\x00\\x00'])\n", (1302, 1351), False, 'import pytest\n'), ((422, 451), 'sensirion_shdlc_driver.commands.bootloader.ShdlcCmdFirmwareUp...
import flair.datasets import os from farm.data_handler.utils import read_ner_file from typing import Dict, NamedTuple, Tuple, List from allennlp.data.dataset_readers import Conll2003DatasetReader from reading_scierc_data import read_scierc_seqs from seq_tag_util import iob2iobes, BIOES TaggedSequence = List[Tuple[str...
[ "seq_tag_util.iob2iobes", "farm.data_handler.utils.read_ner_file", "reading_scierc_data.read_scierc_seqs", "allennlp.data.dataset_readers.Conll2003DatasetReader", "os.path.join", "os.listdir" ]
[((581, 596), 'seq_tag_util.iob2iobes', 'iob2iobes', (['tags'], {}), '(tags)\n', (590, 596), False, 'from seq_tag_util import iob2iobes, BIOES\n'), ((1043, 1067), 'allennlp.data.dataset_readers.Conll2003DatasetReader', 'Conll2003DatasetReader', ([], {}), '()\n', (1065, 1067), False, 'from allennlp.data.dataset_readers ...
# coding: utf-8 """ Adobe Target Delivery API No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 i...
[ "six.iteritems" ]
[((4775, 4808), 'six.iteritems', 'six.iteritems', (['self.openapi_types'], {}), '(self.openapi_types)\n', (4788, 4808), False, 'import six\n')]
import numpy as np from random import shuffle class VecPattern: """ The pattern is composed of sets of Polygons """ def __init__(self, parameters): try: self.width = np.abs(parameters['width']) self.height = np.abs(parameters['height']) self.polygon_size = ...
[ "random.shuffle", "numpy.abs" ]
[((1086, 1113), 'random.shuffle', 'shuffle', (['self.list_polygons'], {}), '(self.list_polygons)\n', (1093, 1113), False, 'from random import shuffle\n'), ((205, 232), 'numpy.abs', 'np.abs', (["parameters['width']"], {}), "(parameters['width'])\n", (211, 232), True, 'import numpy as np\n'), ((259, 287), 'numpy.abs', 'n...
# -*- coding: utf-8 -*- import os import pathlib import re from typing import Iterable, ClassVar import netifaces from dotty_dict import Dotty from .actions import EmitDockerComposeConfigAction, DockerComposeBinaryAction, LocalVolumesAction, \ DockerDisplayInfoAction from .schema import DockerSchema from ..featur...
[ "os.getgid", "os.path.exists", "re.match", "os.environ.get", "netifaces.ifaddresses", "os.getuid", "pathlib.Path", "pwd.getpwnam", "re.sub", "grp.getgrnam" ]
[((1497, 1526), 'os.environ.get', 'os.environ.get', (['"""DOCKER_HOST"""'], {}), "('DOCKER_HOST')\n", (1511, 1526), False, 'import os\n'), ((1582, 1667), 're.match', 're.match', (['"""(?:.*?)://(\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}).*"""', 'docker_host'], {}), "('(?:.*?)://(\\\\d{1,3}\\\\.\\\\d{1,3}\...
#------------------------------------------------------------------------------- # signalvisitor.py # # Signal definition visitor # # Copyright (C) 2013, <NAME> # License: Apache 2.0 #------------------------------------------------------------------------------- from __future__ import absolute_import from __future__ i...
[ "pyverilog.utils.verror.DefinitionError", "pyverilog.dataflow.optimizer.VerilogOptimizer", "pyverilog.dataflow.reorder.insertPartselect", "pyverilog.dataflow.reorder.insertOp", "pyverilog.utils.scope.ScopeChain", "pyverilog.dataflow.reorder.insertUnaryOp", "pyverilog.dataflow.reorder.insertCond", "pyv...
[((958, 982), 'pyverilog.dataflow.optimizer.VerilogOptimizer', 'VerilogOptimizer', (['{}', '{}'], {}), '({}, {})\n', (974, 982), False, 'from pyverilog.dataflow.optimizer import VerilogOptimizer\n'), ((17971, 17992), 'pyverilog.utils.scope.ScopeChain', 'ScopeChain', (['scopelist'], {}), '(scopelist)\n', (17981, 17992),...
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # """ Tests for the autoindent features """ # Third party imports from qtpy.QtGui import QTextCursor import pytest # Local imports from spyder.utils.qthelpers import qapplication from spyder.py3compat im...
[ "pytest.main", "spyder.utils.qthelpers.qapplication", "spyder.widgets.sourcecode.codeeditor.CodeEditor" ]
[((533, 547), 'spyder.utils.qthelpers.qapplication', 'qapplication', ([], {}), '()\n', (545, 547), False, 'from spyder.utils.qthelpers import qapplication\n'), ((561, 584), 'spyder.widgets.sourcecode.codeeditor.CodeEditor', 'CodeEditor', ([], {'parent': 'None'}), '(parent=None)\n', (571, 584), False, 'from spyder.widge...
# # AggHelp.py -- help classes for the Agg drawing # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. import aggdraw as agg from ginga import colors from ginga.fonts import font_asst def get_cached_font(fontname, fontsize, color, alpha): key = (fontname...
[ "ginga.fonts.font_asst.have_font", "ginga.fonts.font_asst.add_cache", "aggdraw.Font", "ginga.colors.resolve_color", "ginga.fonts.font_asst.resolve_alias", "ginga.fonts.font_asst.add_font", "ginga.fonts.font_asst.get_font_info", "ginga.fonts.font_asst.get_cache" ]
[((370, 394), 'ginga.fonts.font_asst.get_cache', 'font_asst.get_cache', (['key'], {}), '(key)\n', (389, 394), False, 'from ginga.fonts import font_asst\n'), ((804, 834), 'ginga.fonts.font_asst.have_font', 'font_asst.have_font', (['font_name'], {}), '(font_name)\n', (823, 834), False, 'from ginga.fonts import font_asst\...
# Generated by Django 3.0.7 on 2020-08-01 10:48 import django.core.validators from django.db import migrations from django.db import models class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( name="Social", fiel...
[ "django.db.models.TextField", "django.db.models.ManyToManyField", "django.db.models.AutoField" ]
[((389, 482), '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", (405, 482), False, 'from django.db import models\n'), ((1934,...
# -*- coding: utf-8 -*- __all__ = ['read_ragged_array_to_cube', 'read_ragged_cdm_to_array'] def read_ragged_cdm_to_array(filename, odb_codes=True, hours=False, driver=None, add_index_array=False, verbose=0, debug=False, **kwargs): """ Read netCDF 4 HDF5 group data into a data cube on standard pressure levels...
[ "numpy.full", "numpy.stack", "h5py.File", "numpy.asarray", "numpy.zeros", "xarray.Dataset", "os.path.isfile", "numpy.where", "numpy.array", "xarray.DataArray", "numpy.unique", "numpy.in1d" ]
[((1176, 1268), 'numpy.asarray', 'np.asarray', (['[10, 20, 30, 50, 70, 100, 150, 200, 250, 300, 400, 500, 700, 850, 925, 1000]'], {}), '([10, 20, 30, 50, 70, 100, 150, 200, 250, 300, 400, 500, 700, 850,\n 925, 1000])\n', (1186, 1268), True, 'import numpy as np\n'), ((1430, 1460), 'numpy.zeros', 'np.zeros', (['(1001)...
"""A variant of Conway's Game of Life on a hexagonal grid. Rules: B2/S12 - Dead cells with two live neighbours are born. - Live cells with one or two live neighbours survive. - All other live cells die. """ import helper as helper RULE_CONFIGURATION = { 'b': (2,), # birth 's': (1, 2) # surviva...
[ "helper.Illustrator", "helper.GridHelper" ]
[((1099, 1138), 'helper.GridHelper', 'helper.GridHelper', ([], {}), '(**GRID_CONFIGURATION)\n', (1116, 1138), True, 'import helper as helper\n'), ((1892, 1948), 'helper.Illustrator', 'helper.Illustrator', (['COLOR_CONFIGURATION', 'SPEED'], {}), '(COLOR_CONFIGURATION, SPEED, **config)\n', (1910, 1948), True, 'import hel...
import os import sys import yaml from datetime import datetime from record.record import * from sendgrid import SendGridAPIClient from sendgrid.helpers.mail import Mail CREDENTIALS_FILE = "credentials.yaml" def auth() -> (SendGridAPIClient, str): if not os.path.exists(CREDENTIALS_FILE): sys.exit("Credenti...
[ "sendgrid.SendGridAPIClient", "os.path.exists", "yaml.safe_load", "datetime.datetime.now", "sys.exit" ]
[((1122, 1136), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (1134, 1136), False, 'from datetime import datetime\n'), ((260, 292), 'os.path.exists', 'os.path.exists', (['CREDENTIALS_FILE'], {}), '(CREDENTIALS_FILE)\n', (274, 292), False, 'import os\n'), ((302, 341), 'sys.exit', 'sys.exit', (['"""Credentia...
import NLFEM import numpy as np import matplotlib.pyplot as plt from NLFEM.Mesh import Rect import subprocess RUTA_M = 'MATRICES' E = 2.1*10**6 V = 0.2 u = 0.05 t = 0.1 l = 0.1 import os if not os.path.exists(RUTA_M): subprocess.run("index.exe input.txt 3 "+format(E)+" "+format(V)+" "+format(t)+" "+format(l)+" "...
[ "NLFEM.Mesh.Rect.Rect", "os.path.exists", "NLFEM.NoLocal" ]
[((371, 393), 'NLFEM.Mesh.Rect.Rect', 'Rect.Rect', (['"""input.txt"""'], {}), "('input.txt')\n", (380, 393), False, 'from NLFEM.Mesh import Rect\n'), ((661, 685), 'NLFEM.NoLocal', 'NLFEM.NoLocal', (['GEOMETRIA'], {}), '(GEOMETRIA)\n', (674, 685), False, 'import NLFEM\n'), ((197, 219), 'os.path.exists', 'os.path.exists'...
"""Testing of class Vector.""" # pylint: disable=no-self-use from unittest import TestCase from hamcrest import assert_that, equal_to, less_than_or_equal_to, calling, raises, is_not from engine.threed.vector import Vector from engine.tools.conversions import to_degree from engine.tools.options import Options class T...
[ "hamcrest.equal_to", "engine.threed.vector.Vector.from_sequence", "hamcrest.raises", "hamcrest.calling", "hamcrest.less_than_or_equal_to", "engine.threed.vector.Vector" ]
[((468, 476), 'engine.threed.vector.Vector', 'Vector', ([], {}), '()\n', (474, 476), False, 'from engine.threed.vector import Vector\n'), ((709, 724), 'engine.threed.vector.Vector', 'Vector', (['(2)', '(3)', '(6)'], {}), '(2, 3, 6)\n', (715, 724), False, 'from engine.threed.vector import Vector\n'), ((6525, 6540), 'eng...
import uuid import logging from typing import Optional, Dict, Union, List from decimal import Decimal from .models import Vendor, ProductType, Product, ProductVariant, Supplier from assistant.shopify_sync.schemas import VariantSchema logger = logging.getLogger(__name__) def create_vendor(*, name: str) -> Vendor: ...
[ "logging.getLogger" ]
[((246, 273), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (263, 273), False, 'import logging\n')]
# coding: utf-8 """ Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applica...
[ "six.iteritems" ]
[((4143, 4172), 'six.iteritems', 'iteritems', (['self.swagger_types'], {}), '(self.swagger_types)\n', (4152, 4172), False, 'from six import iteritems\n')]
"""empty message Revision ID: 28296e3a641 Revises: 4<PASSWORD> Create Date: 2015-09-02 11:32:20.319641 """ # revision identifiers, used by Alembic. revision = '28296e3a641' down_revision = '<PASSWORD>' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - pleas...
[ "alembic.op.drop_column", "alembic.op.create_foreign_key", "sqlalchemy.Integer", "alembic.op.drop_constraint" ]
[((422, 500), 'alembic.op.create_foreign_key', 'op.create_foreign_key', (['None', '"""users"""', '"""departments"""', "['department_id']", "['id']"], {}), "(None, 'users', 'departments', ['department_id'], ['id'])\n", (443, 500), False, 'from alembic import op\n'), ((621, 674), 'alembic.op.drop_constraint', 'op.drop_co...
from flask import Flask, request, jsonify import json import sqlite3 # print(__all__.doc) app = Flask(__name__) def db_connection(): """ Establish a connection with the database using SQLite3 """ conn = None try: conn = sqlite3.connect("dbtable.sqlite") except sqlite3.error as e: ...
[ "flask.jsonify", "flask.Flask", "sqlite3.connect" ]
[((97, 112), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (102, 112), False, 'from flask import Flask, request, jsonify\n'), ((252, 285), 'sqlite3.connect', 'sqlite3.connect', (['"""dbtable.sqlite"""'], {}), "('dbtable.sqlite')\n", (267, 285), False, 'import sqlite3\n'), ((3309, 3330), 'flask.jsonify', '...
import urllib from urllib import request import os import hashlib import zipfile def get_data(url,ext): """Download file from URL to filename If filename is present, then skip download. ext is string for datatype (e.g. 'csv', 'xml') """ url_hash = hashlib.sha224(url.encode()).hexdigest() fil...
[ "zipfile.ZipFile", "urllib.request.urlretrieve", "os.remove", "os.path.exists" ]
[((1608, 1632), 'os.path.exists', 'os.path.exists', (['filename'], {}), '(filename)\n', (1622, 1632), False, 'import os\n'), ((373, 397), 'os.path.exists', 'os.path.exists', (['filename'], {}), '(filename)\n', (387, 397), False, 'import os\n'), ((1642, 1661), 'os.remove', 'os.remove', (['filename'], {}), '(filename)\n'...
# -*- coding: utf-8 -*- # Copyright 2011-2020 Rumma & Ko Ltd # License: BSD, see LICENSE for more details. """ Basic extension Sphinx setup used to build the Lino documentation. .. rst:role:: blogref Inserts a reference to the blog entry of the specified date. Instead of writing ``:doc:`/blog/2011/0406``...
[ "inspect.getsourcelines", "importlib.import_module", "docutils.nodes.literal", "docutils.parsers.rst.roles.set_classes", "sphinx.util.nodes.split_explicit_title", "docutils.utils.unescape", "rstgen.utils.srcref", "docutils.nodes.reference", "sphinx.addnodes.literal_emphasis" ]
[((5800, 5826), 'sphinx.util.nodes.split_explicit_title', 'split_explicit_title', (['text'], {}), '(text)\n', (5820, 5826), False, 'from sphinx.util.nodes import split_explicit_title\n'), ((6308, 6334), 'docutils.parsers.rst.roles.set_classes', 'roles.set_classes', (['options'], {}), '(options)\n', (6325, 6334), False,...
""" MARKDOWN --- Title: python regular expressions multiple patterns MetaKeywords: python, regular expressions multiple patterns, code, tutorials Author: Hemaxi ContentName: python-regular-expressions-multiple --- MARKDOWN """ """ MARKDOWN # PYTHON REGULAR EXPRESSIONS MULTIPLE PATTERNS IN WORDS OF STRING * Here we dem...
[ "re.findall", "re.search" ]
[((987, 1018), 're.findall', 're.findall', (['"""Hour32"""', 'my_string'], {}), "('Hour32', my_string)\n", (997, 1018), False, 'import re\n'), ((1313, 1351), 're.findall', 're.findall', (['"""\\\\bH+\\\\w+.\\\\b"""', 'my_string'], {}), "('\\\\bH+\\\\w+.\\\\b', my_string)\n", (1323, 1351), False, 'import re\n'), ((1641,...
#!/usr/bin/env python import os import pandas as pd import numpy as np from sklearn.model_selection import StratifiedKFold from imblearn.over_sampling import SMOTE, ADASYN from skimage import io from sklearn.feature_selection import VarianceThreshold def feature_selection(big_table, annotation_path, preprocessed_file...
[ "pandas.DataFrame", "os.makedirs", "skimage.io.imsave", "pandas.read_csv", "numpy.log2", "numpy.zeros", "os.path.exists", "numpy.where", "numpy.array", "sklearn.model_selection.StratifiedKFold", "imblearn.over_sampling.SMOTE", "os.path.join", "sklearn.feature_selection.VarianceThreshold" ]
[((412, 442), 'numpy.array', 'np.array', (['big_table.iloc[:, 0]'], {}), '(big_table.iloc[:, 0])\n', (420, 442), True, 'import numpy as np\n'), ((460, 499), 'pandas.read_csv', 'pd.read_csv', (['annotation_path'], {'dtype': 'str'}), '(annotation_path, dtype=str)\n', (471, 499), True, 'import pandas as pd\n'), ((1069, 11...
""" Profile and settings endpoints """ from peewee import fn, JOIN from flask import Blueprint, render_template, abort, redirect, url_for, flash, request from flask_login import login_required, current_user from flask_babel import _, Locale from .do import send_password_recovery_email, uid_from_recovery_token from .do ...
[ "peewee.fn.Count", "flask.Blueprint", "flask.request.args.get", "flask.redirect", "flask_login.current_user.name.lower", "flask_login.current_user.is_admin", "flask.abort", "peewee.fn.lower", "flask.url_for", "flask.render_template", "peewee.fn.Lower", "flask_babel._" ]
[((1065, 1092), 'flask.Blueprint', 'Blueprint', (['"""user"""', '__name__'], {}), "('user', __name__)\n", (1074, 1092), False, 'from flask import Blueprint, render_template, abort, redirect, url_for, flash, request\n'), ((6016, 6123), 'flask.render_template', 'render_template', (['"""userposts.html"""'], {'page': 'page...
# Generated by Django 2.2.3 on 2019-08-04 03:24 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contacts', '0010_auto_20190802_0336'), ('emails', '0007_auto_20190804_0131'), ] operations = [ migrations.AddField( mode...
[ "django.db.models.ManyToManyField" ]
[((388, 478), 'django.db.models.ManyToManyField', 'models.ManyToManyField', ([], {'blank': '(True)', 'related_name': '"""emails_sent"""', 'to': '"""contacts.Contact"""'}), "(blank=True, related_name='emails_sent', to=\n 'contacts.Contact')\n", (410, 478), False, 'from django.db import migrations, models\n')]
# Copyright (c) 2017, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import unittest from sklearn.ensemble import RandomForestRegressor from coremltools._deps import _HAS_SK...
[ "unittest.skipIf", "coremltools.converters.sklearn.convert", "sklearn.preprocessing.OneHotEncoder", "sklearn.ensemble.RandomForestRegressor", "sklearn.datasets.load_boston" ]
[((553, 627), 'unittest.skipIf', 'unittest.skipIf', (['(not _HAS_SKLEARN)', '"""Missing scikit-learn. Skipping tests."""'], {}), "(not _HAS_SKLEARN, 'Missing scikit-learn. Skipping tests.')\n", (568, 627), False, 'import unittest\n'), ((1031, 1044), 'sklearn.datasets.load_boston', 'load_boston', ([], {}), '()\n', (1042...
from __future__ import print_function from textwrap import dedent from logging import getLogger from infi.projector.helper.utils import configparser logger = getLogger(__name__) def parse_docopt_string(docopt_string): """returns a 2-tuple (usage, options)""" from re import match, DOTALL only_usage_pattern...
[ "textwrap.dedent", "infi.projector.helper.utils.configparser.ConfigParser", "re.match", "infi.projector.plugins.plugin_repository.get_all_plugins", "os.path.join", "logging.getLogger" ]
[((159, 178), 'logging.getLogger', 'getLogger', (['__name__'], {}), '(__name__)\n', (168, 178), False, 'from logging import getLogger\n'), ((1709, 1749), 'textwrap.dedent', 'dedent', (['"""-h | --help\n-v | --version"""'], {}), '("""-h | --help\n-v | --version""")\n', (1715, 1749), False, 'from textwrap import dedent\n...
from pseudo.code_generator import CodeGenerator, switch EXPRESSION_TYPES = ['call', 'implicit_return', 'method_call', 'explicit_return', 'binary_op', 'int', 'float', 'local'] class PythonGenerator(CodeGenerator): '''Python code generator''' indent = 4 use_spaces = True middlewares = [] temp...
[ "pseudo.code_generator.switch" ]
[((2187, 2272), 'pseudo.code_generator.switch', 'switch', (["(lambda u: u.op == 'not')"], {'true': '"""not %<value>"""', '_otherwise': '"""%<op>%<value>"""'}), "(lambda u: u.op == 'not', true='not %<value>', _otherwise='%<op>%<value>'\n )\n", (2193, 2272), False, 'from pseudo.code_generator import CodeGenerator, swi...
"""Functions for use in URLsconfs.""" from functools import partial from importlib import import_module from django.core.exceptions import ImproperlyConfigured from .resolvers import ( LocalePrefixPattern, RegexPattern, RoutePattern, URLPattern, URLResolver, ) def include(arg, namespace=None): ...
[ "functools.partial", "django.core.exceptions.ImproperlyConfigured", "importlib.import_module" ]
[((3341, 3377), 'functools.partial', 'partial', (['_path'], {'Pattern': 'RoutePattern'}), '(_path, Pattern=RoutePattern)\n', (3348, 3377), False, 'from functools import partial\n'), ((3388, 3424), 'functools.partial', 'partial', (['_path'], {'Pattern': 'RegexPattern'}), '(_path, Pattern=RegexPattern)\n', (3395, 3424), ...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
[ "proto.module", "proto.Field" ]
[((800, 940), 'proto.module', 'proto.module', ([], {'package': '"""google.ads.googleads.v8.resources"""', 'marshal': '"""google.ads.googleads.v8"""', 'manifest': "{'CustomerUserAccessInvitation'}"}), "(package='google.ads.googleads.v8.resources', marshal=\n 'google.ads.googleads.v8', manifest={'CustomerUserAccessInv...