code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import os def test_development_config(test_app): test_app.config.from_object('flask_ecom_api.config.DevelopmentConfig') assert not test_app.config['TESTING'] assert test_app.config['SQLALCHEMY_DATABASE_URI'] == os.environ.get('DATABASE_URL') def test_testing_config(test_app): test_app.config.from_ob...
[ "os.environ.get" ]
[((225, 255), 'os.environ.get', 'os.environ.get', (['"""DATABASE_URL"""'], {}), "('DATABASE_URL')\n", (239, 255), False, 'import os\n'), ((459, 494), 'os.environ.get', 'os.environ.get', (['"""DATABASE_TEST_URL"""'], {}), "('DATABASE_TEST_URL')\n", (473, 494), False, 'import os\n'), ((708, 738), 'os.environ.get', 'os.en...
from django import forms from django.core import validators from django.core.exceptions import ValidationError from leasing.enums import ( InfillDevelopmentCompensationState, LeaseState, TenantContactType, ) from leasing.models import Contact, DecisionMaker, District, LeaseType, Municipality from leasing.v...
[ "leasing.models.Municipality.objects.all", "django.forms.BooleanField", "django.forms.CharField", "django.forms.DateField", "django.forms.NullBooleanField", "leasing.models.District.objects.all", "leasing.models.DecisionMaker.objects.all", "django.core.exceptions.ValidationError", "django.forms.Choi...
[((1166, 1218), 'django.forms.BooleanField', 'forms.BooleanField', ([], {'label': '"""Succinct"""', 'required': '(False)'}), "(label='Succinct', required=False)\n", (1184, 1218), False, 'from django import forms\n'), ((1236, 1331), 'django.forms.CharField', 'forms.CharField', ([], {'label': '"""Lease identifier"""', 'm...
# polls/management/commands/create_admin_user.py import sys import logging from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User from django.conf import settings class Command(BaseCommand): help = 'Creates the initial admin user' def handle(self, *args...
[ "django.contrib.auth.models.User.objects.filter", "django.contrib.auth.models.User", "sys.exit" ]
[((649, 659), 'sys.exit', 'sys.exit', ([], {}), '()\n', (657, 659), False, 'import sys\n'), ((457, 479), 'django.contrib.auth.models.User', 'User', ([], {'username': '"""admin"""'}), "(username='admin')\n", (461, 479), False, 'from django.contrib.auth.models import User\n'), ((345, 382), 'django.contrib.auth.models.Use...
from caching.base import CachingManager, CachingMixin from django.db import models from tsdata.models import CensusProfile PURPOSE_CHOICES = ( (1, "Speed Limit Violation"), (2, "Stop Light/Sign Violation"), (3, "Driving While Impaired"), (4, "Safe Movement Violation"), (5, "Vehicle Equipment Violat...
[ "django.db.models.FloatField", "django.db.models.DateField", "django.db.models.ForeignKey", "caching.base.CachingManager", "django.db.models.IntegerField", "tsdata.models.CensusProfile.objects.get", "django.db.models.BooleanField", "django.db.models.PositiveIntegerField", "django.db.models.DateTimeF...
[((1456, 1501), 'django.db.models.PositiveIntegerField', 'models.PositiveIntegerField', ([], {'primary_key': '(True)'}), '(primary_key=True)\n', (1483, 1501), False, 'from django.db import models\n'), ((1527, 1559), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(100)'}), '(max_length=100)\n', (...
from django.urls import path from django.contrib import admin from rest_framework_swagger.views import get_swagger_view from .views import notification schema_view = get_swagger_view(title='MAIL API') urlpatterns = [ path('front/betsy/irish/embargo/admin/', admin.site.urls), # Swagger API path( ...
[ "rest_framework_swagger.views.get_swagger_view", "django.urls.path" ]
[((168, 202), 'rest_framework_swagger.views.get_swagger_view', 'get_swagger_view', ([], {'title': '"""MAIL API"""'}), "(title='MAIL API')\n", (184, 202), False, 'from rest_framework_swagger.views import get_swagger_view\n'), ((225, 282), 'django.urls.path', 'path', (['"""front/betsy/irish/embargo/admin/"""', 'admin.sit...
# -*- coding: utf-8 -*- import api,points from api.bottle import * II_PATH=os.path.dirname(__file__) or '.' TEMPLATE_PATH.insert(0,II_PATH) @route('/list.txt') def list_txt(): response.set_header ('content-type','text/plain; charset=utf-8') lst = api.load_echo(False)[1:] if request.query.n: retur...
[ "api.load_echo", "api.get_echoarea", "api.ru", "api.raw_msg", "api.point_newmsg", "points.check_hash" ]
[((546, 569), 'api.ru', 'api.ru', (['"""blacklist.txt"""'], {}), "('blacklist.txt')\n", (552, 569), False, 'import api, points\n'), ((1019, 1043), 'points.check_hash', 'points.check_hash', (['pauth'], {}), '(pauth)\n', (1036, 1043), False, 'import api, points\n'), ((1092, 1112), 'api.load_echo', 'api.load_echo', (['(Fa...
from dataclasses import dataclass import logging from attributes import get_ability_modifier from sourcetree.utils import ( get_feats_list, get_feat_perks, get_feat_proficiencies, get_feat_requirements, ) from stdio import prompt log = logging.getLogger("thespian.tweaks") class AbilityScoreImproveme...
[ "logging.getLogger", "sourcetree.utils.get_feat_proficiencies", "stdio.prompt", "sourcetree.utils.get_feat_requirements", "sourcetree.utils.get_feats_list", "sourcetree.utils.get_feat_perks", "attributes.get_ability_modifier" ]
[((254, 290), 'logging.getLogger', 'logging.getLogger', (['"""thespian.tweaks"""'], {}), "('thespian.tweaks')\n", (271, 290), False, 'import logging\n'), ((2118, 2143), 'sourcetree.utils.get_feat_perks', 'get_feat_perks', (['self.feat'], {}), '(self.feat)\n', (2132, 2143), False, 'from sourcetree.utils import get_feats...
class ImpuritySpecies(object): # For storing OpenADAS data related to a particular impurity species # Loosely based on cfe316/atomic/atomic_data.py/AtomicData class (although with much less code since # all of the F77 importing is done in the seperate <<make json_update>> code since BOUT++ protocol # requires fort...
[ "json.load", "atomic1D.RateCoefficient" ]
[((1472, 1485), 'json.load', 'json.load', (['fp'], {}), '(fp)\n', (1481, 1485), False, 'import json\n'), ((4108, 4134), 'atomic1D.RateCoefficient', 'RateCoefficient', (['full_path'], {}), '(full_path)\n', (4123, 4134), False, 'from atomic1D import RateCoefficient\n')]
""" ========================================================== Fitting model on imbalanced datasets and how to fight bias ========================================================== This example illustrates the problem induced by learning on datasets having imbalanced classes. Subsequently, we compare different approac...
[ "sklearn.ensemble.HistGradientBoostingClassifier", "sklearn.datasets.fetch_openml", "pandas.DataFrame", "sklearn.preprocessing.OneHotEncoder", "sklearn.model_selection.cross_validate", "sklearn.ensemble.RandomForestClassifier", "sklearn.linear_model.LogisticRegression", "sklearn.preprocessing.Standard...
[((872, 936), 'sklearn.datasets.fetch_openml', 'fetch_openml', (['"""adult"""'], {'version': '(2)', 'as_frame': '(True)', 'return_X_y': '(True)'}), "('adult', version=2, as_frame=True, return_X_y=True)\n", (884, 936), False, 'from sklearn.datasets import fetch_openml\n'), ((1838, 1879), 'sklearn.dummy.DummyClassifier',...
from django.core.exceptions import ObjectDoesNotExist from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from django.shortcuts import render from django.conf import settings from .models import Language, Type, MusicFocus, Category, Topic, RTRCategory, Host, Note, RRule, Schedule, ...
[ "django.utils.translation.ugettext_lazy", "datetime.datetime.strptime", "django.contrib.admin.site.register", "datetime.date.today", "datetime.datetime.now", "datetime.date", "datetime.datetime.today", "datetime.timedelta" ]
[((24620, 24664), 'django.contrib.admin.site.register', 'admin.site.register', (['Language', 'LanguageAdmin'], {}), '(Language, LanguageAdmin)\n', (24639, 24664), False, 'from django.contrib import admin\n'), ((24665, 24701), 'django.contrib.admin.site.register', 'admin.site.register', (['Type', 'TypeAdmin'], {}), '(Ty...
import os import glob import json from pathlib import Path from flask_restful import Api, Resource, reqparse from flask_jwt_extended import jwt_required from flask import Flask, request, escape, make_response, send_from_directory import utils # incase you can't install ansi2html it's won't break the api try: from ...
[ "flask.send_from_directory", "pathlib.Path", "utils.not_empty_file", "os.path.realpath", "os.path.normpath", "glob.glob", "utils.url_encode", "utils.reading_json" ]
[((405, 431), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (421, 431), False, 'import os\n'), ((551, 620), 'glob.glob', 'glob.glob', (["(current_path + '/storages/**/options.json')"], {'recursive': '(True)'}), "(current_path + '/storages/**/options.json', recursive=True)\n", (560, 620), F...
"""Module with hahomematic services.""" from __future__ import annotations from datetime import datetime import logging from hahomematic.const import ( ATTR_ADDRESS, ATTR_INTERFACE_ID, ATTR_NAME, ATTR_PARAMETER, ATTR_VALUE, HmPlatform, ) from hahomematic.device import HmDevice from hahomematic...
[ "logging.getLogger", "voluptuous.Required", "homeassistant.helpers.service.verify_domain_control", "datetime.datetime.strptime", "homeassistant.helpers.device_registry.async_get", "homeassistant.helpers.service.async_register_admin_service", "voluptuous.Optional", "voluptuous.Coerce", "voluptuous.Al...
[((1103, 1130), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1120, 1130), False, 'import logging\n'), ((3261, 3296), 'homeassistant.helpers.service.verify_domain_control', 'verify_domain_control', (['hass', 'DOMAIN'], {}), '(hass, DOMAIN)\n', (3282, 3296), False, 'from homeassistant.he...
# Generated by Django 3.2.3 on 2021-06-03 00:35 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Livro', fields=[ ('id', models.BigAutoField...
[ "django.db.models.ImageField", "django.db.models.CharField", "django.db.models.BigAutoField" ]
[((301, 397), 'django.db.models.BigAutoField', 'models.BigAutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (320, 397), False, 'from django.db import migrations, m...
# Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # The Universal Permissive License (UPL), Version 1.0 # # Subject to the condition set forth below, permission is hereby granted to any # person obtaining a copy of this softw...
[ "re.sub", "re.compile" ]
[((3344, 3377), 're.compile', 're.compile', (['"""@SuppressWarnings.*"""'], {}), "('@SuppressWarnings.*')\n", (3354, 3377), False, 'import re\n'), ((3634, 3710), 're.sub', 're.sub', (['"""\\\\(\\\\((([a-zA-Z]*?_?)*[a-zA-Z]*)\\\\)_localctx\\\\)"""', '"""_localctx"""', 'line'], {}), "('\\\\(\\\\((([a-zA-Z]*?_?)*[a-zA-Z]*...
# -*- coding: utf-8 -*- # # This file is part of REANA. # Copyright (C) 2018 CERN. # # REANA is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """REANA-Commons module to manage AMQP connections on REANA.""" import json import logging fr...
[ "kombu.Queue", "logging.debug", "json.dumps", "kombu.Connection", "logging.info", "kombu.Exchange" ]
[((2684, 2730), 'logging.info', 'logging.info', (['"""Retry in %s seconds."""', 'interval'], {}), "('Retry in %s seconds.', interval)\n", (2696, 2730), False, 'import logging\n'), ((3545, 3594), 'logging.debug', 'logging.debug', (['"""Publisher: message sent: %s"""', 'msg'], {}), "('Publisher: message sent: %s', msg)\n...
from sqlalchemy import ( BigInteger, Column, DateTime, Text, String, Integer, ) from sqlalchemy.sql.functions import current_timestamp from model.base import BaseObject class Commit(BaseObject): __tablename__ = 'commits' id = Column(BigInteger, primary_key=True, autoincrement=True) ...
[ "sqlalchemy.String", "sqlalchemy.sql.functions.current_timestamp", "sqlalchemy.Column" ]
[((262, 318), 'sqlalchemy.Column', 'Column', (['BigInteger'], {'primary_key': '(True)', 'autoincrement': '(True)'}), '(BigInteger, primary_key=True, autoincrement=True)\n', (268, 318), False, 'from sqlalchemy import BigInteger, Column, DateTime, Text, String, Integer\n'), ((579, 591), 'sqlalchemy.Column', 'Column', (['...
"""The tests for the Template select platform.""" import pytest from homeassistant import setup from homeassistant.components.input_select import ( ATTR_OPTION as INPUT_SELECT_ATTR_OPTION, ATTR_OPTIONS as INPUT_SELECT_ATTR_OPTIONS, DOMAIN as INPUT_SELECT_DOMAIN, SERVICE_SELECT_OPTION as INPUT_SELECT_SE...
[ "homeassistant.setup.async_setup_component", "homeassistant.core.Context", "homeassistant.helpers.entity_registry.async_get", "tests.common.async_mock_service", "tests.common.assert_setup_component", "tests.common.async_capture_events" ]
[((1083, 1129), 'tests.common.async_mock_service', 'async_mock_service', (['hass', '"""test"""', '"""automation"""'], {}), "(hass, 'test', 'automation')\n", (1101, 1129), False, 'from tests.common import assert_setup_component, async_capture_events, async_mock_service\n'), ((5971, 5986), 'homeassistant.helpers.entity_r...
''' #;+ #; NAME: #; sdss.qso #; Version 1.1 #; #; PURPOSE: #; Class for SDSS QSO #; 2015 Written by JXP #;- #;------------------------------------------------------------------------------ ''' # Import libraries import numpy as np import os from astropy.table import QTable, Column from astropy.coordinates i...
[ "linetools.spectra.xspectrum1d.XSpectrum1D.from_file", "astropy.coordinates.SkyCoord" ]
[((2306, 2342), 'linetools.spectra.xspectrum1d.XSpectrum1D.from_file', 'XSpectrum1D.from_file', (['self._specfil'], {}), '(self._specfil)\n', (2327, 2342), False, 'from linetools.spectra.xspectrum1d import XSpectrum1D\n'), ((967, 1002), 'astropy.coordinates.SkyCoord', 'SkyCoord', ([], {'ra': 'radec[0]', 'dec': 'radec[0...
import unittest import numpy as np from openmdao.utils.assert_utils import assert_near_equal from wisdem.optimization_drivers.dakota_driver import DakotaOptimizer try: import dakota except ImportError: dakota = None @unittest.skipIf(dakota is None, "only run if Dakota is installed.") class Te...
[ "unittest.main", "numpy.array", "unittest.skipIf", "wisdem.optimization_drivers.dakota_driver.DakotaOptimizer" ]
[((243, 310), 'unittest.skipIf', 'unittest.skipIf', (['(dakota is None)', '"""only run if Dakota is installed."""'], {}), "(dakota is None, 'only run if Dakota is installed.')\n", (258, 310), False, 'import unittest\n'), ((3093, 3108), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3106, 3108), False, 'import uni...
#-*- coding: utf-8 -*- #! /usr/bin/env python ''' #------------------------------------------------------------ filename: lab4_runTFCurveFitting.py This is an example for linear regression in tensorflow Which is a curve fitting example written by <NAME> @ Aug 2017 #---------------------------------------------...
[ "numpy.sqrt", "matplotlib.pyplot.ylabel", "tensorflow.cast", "tensorflow.placeholder", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlabel", "tensorflow.Session", "numpy.linspace", "tensorflow.square", "tensorflow.train.AdamOptimizer", "tensorflow.cos", "tensorflow.Variable", "numpy.cos", ...
[((989, 1018), 'numpy.zeros', 'np.zeros', (['[xsize, total_size]'], {}), '([xsize, total_size])\n', (997, 1018), True, 'import numpy as np\n'), ((1028, 1057), 'numpy.zeros', 'np.zeros', (['[xsize, total_size]'], {}), '([xsize, total_size])\n', (1036, 1057), True, 'import numpy as np\n'), ((1197, 1234), 'numpy.cos', 'np...
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
[ "os.makedirs", "re.compile", "aiida.manage.configuration.get_profile", "os.path.join", "numpy.load", "numpy.save", "os.remove" ]
[((903, 991), 're.compile', 're.compile', (['"""^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}\\\\.\\\\d+(\\\\+\\\\d{2}:\\\\d{2})?$"""'], {}), "(\n '^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}\\\\.\\\\d+(\\\\+\\\\d{2}:\\\\d{2})?$')\n", (913, 991), False, 'import re\n'), ((2693, 2766), 'os.path.joi...
# -*- coding:utf-8 -*- """ Description: Inventory Class Usage: from neo.Network.Inventory import Inventory """ from neo.IO.MemoryStream import MemoryStream from neocore.IO.BinaryWriter import BinaryWriter class Inventory(object): """docstring for Inventory""" def __init__(self): """ ...
[ "neocore.IO.BinaryWriter.BinaryWriter", "neo.IO.MemoryStream.MemoryStream" ]
[((551, 565), 'neo.IO.MemoryStream.MemoryStream', 'MemoryStream', ([], {}), '()\n', (563, 565), False, 'from neo.IO.MemoryStream import MemoryStream\n'), ((578, 594), 'neocore.IO.BinaryWriter.BinaryWriter', 'BinaryWriter', (['ms'], {}), '(ms)\n', (590, 594), False, 'from neocore.IO.BinaryWriter import BinaryWriter\n')]
# Copyright 2017 <NAME> # # 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 in writin...
[ "logging.getLogger", "pyxb.bundles.opengis.oseo_1_0.ProductIdType", "pyxb.BIND", "pyxb.bundles.opengis.oseo_1_0.ItemURLType", "pyxb.bundles.opengis.oseo_1_0.DescribeResultAccessResponse", "pyxb.bundles.opengis.oseo_1_0.OnLineAccessAddressType", "datetime.datetime.now" ]
[((951, 978), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (968, 978), False, 'import logging\n'), ((2032, 2057), 'datetime.datetime.now', 'dt.datetime.now', (['pytz.utc'], {}), '(pytz.utc)\n', (2047, 2057), True, 'import datetime as dt\n'), ((2090, 2141), 'pyxb.bundles.opengis.oseo_1_0...
"""Test combined function.""" from cmatools.combine.combine import combined def test_combined(): """Test of combined function""" assert combined() == "this hello cma"
[ "cmatools.combine.combine.combined" ]
[((148, 158), 'cmatools.combine.combine.combined', 'combined', ([], {}), '()\n', (156, 158), False, 'from cmatools.combine.combine import combined\n')]
""" matmul autotvm [batch,in_dim] x [in_dim,out_dim] search_matmul_config(batch,in_dim,out_dim,num_trials): input: batch,in_dim,out_dim,num_trials [batch,in_dim] x [in_dim,out_dim] num_trials: num of trials, default: 1000 output: log (json format) use autotvm to search configs for the matm...
[ "logging.getLogger", "logging.StreamHandler", "tvm.autotvm.apply_history_best", "tvm.context", "os.remove", "tvm.autotvm.tuner.XGBTuner", "os.path.exists", "tvm.create_schedule", "tvm.autotvm.LocalRunner", "tvm.target.create", "tvm.autotvm.get_config", "tvm.nd.array", "json.loads", "tvm.su...
[((10268, 10299), 'os.path.exists', 'os.path.exists', (['output_log_file'], {}), '(output_log_file)\n', (10282, 10299), False, 'import os\n'), ((13700, 13726), 'os.remove', 'os.remove', (['output_log_file'], {}), '(output_log_file)\n', (13709, 13726), False, 'import os\n'), ((1554, 1613), 'tvm.placeholder', 'tvm.placeh...
import subprocess import sys import time import os ############################# # COLORING YOUR SHELL # ############################# R = "\033[1;31m" # B = "\033[1;34m" # Y = "\033[1;33m" # G = "\033[1;32m" # RS = "\033[0m" # W = "\033[1;37m" ...
[ "os.system", "subprocess.check_call" ]
[((352, 370), 'os.system', 'os.system', (['"""clear"""'], {}), "('clear')\n", (361, 370), False, 'import os\n'), ((1209, 1260), 'subprocess.check_call', 'subprocess.check_call', (["['nmap', '-sV', '-sC', webb]"], {}), "(['nmap', '-sV', '-sC', webb])\n", (1230, 1260), False, 'import subprocess\n')]
# Copyright The PyTorch Lightning team. # # 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 i...
[ "pytorch_lightning.utilities.upgrade_checkpoint.upgrade_checkpoint", "torch.load", "os.path.join", "pytest.mark.parametrize", "torch.save" ]
[((794, 1609), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""old_checkpoint, new_checkpoint"""', "[({'epoch': 1, 'global_step': 23, 'checkpoint_callback_best': 0.34}, {\n 'epoch': 1, 'global_step': 23, 'callbacks': {ModelCheckpoint: {\n 'best_model_score': 0.34}}}), ({'epoch': 1, 'global_step': 23,\...
import json import os from ..metaflow_config import DATASTORE_LOCAL_DIR, DATASTORE_SYSROOT_LOCAL from .datastore_storage import CloseAfterUse, DataStoreStorage from .exceptions import DataException class LocalStorage(DataStoreStorage): TYPE = "local" METADATA_DIR = "_meta" @classmethod def get_datas...
[ "os.path.exists", "os.path.getsize", "os.listdir", "os.makedirs", "os.getcwdu", "os.path.join", "os.getcwd", "os.path.realpath", "os.path.dirname", "os.path.isfile", "os.path.isdir", "os.mkdir", "json.load", "json.dump" ]
[((632, 679), 'os.path.join', 'os.path.join', (['current_path', 'DATASTORE_LOCAL_DIR'], {}), '(current_path, DATASTORE_LOCAL_DIR)\n', (644, 679), False, 'import os\n'), ((704, 731), 'os.path.realpath', 'os.path.realpath', (['check_dir'], {}), '(check_dir)\n', (720, 731), False, 'import os\n'), ((1691, 1732), 'os.path.j...
# coding: utf-8 """ markdown2dita ~~~~~~~~~~~~~ A markdown to dita-ot conversion tool written in pure python. Uses mistune to parse the markdown. """ from __future__ import print_function import argparse import sys import mistune __version__ = '0.3' __author__ = '<NAME> <<EMAIL>>' __all__ = ['Render...
[ "sys.stdin.isatty", "mistune.escape_link", "argparse.ArgumentParser", "mistune.escape" ]
[((5827, 5881), 'mistune.escape', 'mistune.escape', (['text'], {'quote': 'quote', 'smart_amp': 'smart_amp'}), '(text, quote=quote, smart_amp=smart_amp)\n', (5841, 5881), False, 'import mistune\n'), ((5920, 6022), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""markdown2dita - a markdown t...
import logging import re from celery import shared_task from django.conf import settings from django.db.models import Q from django.shortcuts import get_object_or_404 from django.template.loader import get_template from django.urls import reverse from django.utils import timezone from architecture_tool_django.utils.c...
[ "logging.getLogger", "django.shortcuts.get_object_or_404", "architecture_tool_django.utils.confluence_wrapper.MyConfluence", "django.utils.timezone.now", "django.utils.timezone.timedelta", "django.urls.reverse", "re.sub", "django.db.models.Q", "django.template.loader.get_template", "architecture_t...
[((424, 451), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (441, 451), False, 'import logging\n'), ((2268, 2296), 're.sub', 're.sub', (['""".*\\\\/"""', '""""""', 'doc_url'], {}), "('.*\\\\/', '', doc_url)\n", (2274, 2296), False, 'import re\n'), ((2311, 2332), 'architecture_tool_django...
from fastapi import FastAPI, Response, WebSocket, WebSocketDisconnect from threading import Thread from .server import Server from .errors import HoistExistsError from .error import Error from .version import __version__ from .flask_wrapper import HTML import uvicorn from typing import List, Callable from fastapi.respo...
[ "threading.Thread", "fastapi.responses.JSONResponse", "fastapi.FastAPI", "uvicorn.run" ]
[((536, 560), 'fastapi.FastAPI', 'FastAPI', (['*args'], {}), '(*args, **kwargs)\n', (543, 560), False, 'from fastapi import FastAPI, Response, WebSocket, WebSocketDisconnect\n'), ((2568, 2604), 'uvicorn.run', 'uvicorn.run', (['app'], {'host': 'ip', 'port': 'port'}), '(app, host=ip, port=port)\n', (2579, 2604), False, '...
# This file is executed on every boot (including wake-boot from deepsleep) # 2017-1210 PePo send timestamp and temperature (Celsius) to MQTT-server on BBB # 2017-1105 PePo add _isLocal: sensor data to serial port (False) of stored in file (True) # 2017-0819 PePo add sensor, led and print to serial port # 2017-0811 ...
[ "wifinetwork.connectTo", "utime.localtime", "math.floor", "class_ds18b20.DS18B20", "umqtt.simple.MQTTClient", "machine.Pin", "time.sleep", "nptime.settime" ]
[((714, 742), 'wifinetwork.connectTo', 'wifi.connectTo', (['"""PePoDevNet"""'], {}), "('PePoDevNet')\n", (728, 742), True, 'import wifinetwork as wifi\n'), ((1157, 1182), 'class_ds18b20.DS18B20', 'class_ds18b20.DS18B20', (['(14)'], {}), '(14)\n', (1178, 1182), False, 'import class_ds18b20\n'), ((911, 927), 'nptime.sett...
#!/usr/bin/env python # # This file is part of the Emotions project. The complete source code is # available at https://github.com/luigivieira/emotions. # # Copyright (c) 2016-2017, <NAME> (http://www.luiz.vieira.nom.br) # # MIT License # # Permission is hereby granted, free of charge, to any person obtaining a copy # ...
[ "gabor.GaborBank", "cv2.rectangle", "cv2.imshow", "cv2.destroyAllWindows", "sys.exit", "datetime.timedelta", "faces.FaceDetector", "argparse.ArgumentParser", "cv2.line", "data.FaceData", "cv2.waitKey", "collections.OrderedDict", "numpy.ones", "cv2.putText", "cv2.getTextSize", "datetime...
[((9815, 9838), 'cv2.destroyAllWindows', 'cv2.destroyAllWindows', ([], {}), '()\n', (9836, 9838), False, 'import cv2\n'), ((11030, 11071), 'cv2.getTextSize', 'cv2.getTextSize', (['text', 'font', 'scale', 'thick'], {}), '(text, font, scale, thick)\n', (11045, 11071), False, 'import cv2\n'), ((11123, 11181), 'cv2.putText...
""" Holds global celery application state and startup / shutdown handlers. """ from celery import Celery from celery.app import app_or_default from celery.signals import ( beat_init, worker_process_init, worker_process_shutdown, setup_logging, ) from ichnaea.log import configure_logging from ichnaea.ta...
[ "ichnaea.taskapp.config.init_beat", "celery.app.app_or_default", "ichnaea.taskapp.config.configure_celery", "ichnaea.log.configure_logging", "celery.Celery", "ichnaea.taskapp.config.init_worker", "ichnaea.taskapp.config.shutdown_worker" ]
[((1651, 1680), 'celery.Celery', 'Celery', (['"""ichnaea.taskapp.app"""'], {}), "('ichnaea.taskapp.app')\n", (1657, 1680), False, 'from celery import Celery\n'), ((1682, 1710), 'ichnaea.taskapp.config.configure_celery', 'configure_celery', (['celery_app'], {}), '(celery_app)\n', (1698, 1710), False, 'from ichnaea.taska...
import asyncio from typing import Tuple import heapq class BasePersistentStorage(object): async def push_message(self, mid, raw_package): raise NotImplementedError def push_message_nowait(self, mid, raw_package) -> asyncio.Future: try: asyncio.get_event_loop() except Runt...
[ "asyncio.new_event_loop", "heapq.heappop", "asyncio.set_event_loop", "heapq.heapify", "heapq.heappush", "asyncio.get_event_loop" ]
[((1088, 1139), 'heapq.heappush', 'heapq.heappush', (['self._queue', '(tm, mid, raw_package)'], {}), '(self._queue, (tm, mid, raw_package))\n', (1102, 1139), False, 'import heapq\n'), ((1263, 1289), 'heapq.heappop', 'heapq.heappop', (['self._queue'], {}), '(self._queue)\n', (1276, 1289), False, 'import heapq\n'), ((166...
# Copyright 2017 <NAME>, <NAME> # # 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 in writing, ...
[ "logging.getLogger", "importlib.import_module", "pexpect.spawn", "os.path.join", "threading.Event", "os.path.normpath", "os.path.dirname", "yaml.safe_load", "os.path.basename", "copy.deepcopy", "copy.copy" ]
[((758, 777), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (775, 777), False, 'import logging\n'), ((4232, 4251), 'copy.deepcopy', 'copy.deepcopy', (['self'], {}), '(self)\n', (4245, 4251), False, 'import copy\n'), ((4753, 4770), 'threading.Event', 'threading.Event', ([], {}), '()\n', (4768, 4770), False...
import click from covid_data_tracker.registry import PluginRegistry def plugin_selector(selected_country: str): """plugin selector uses COUNTRY_MAP to find the appropriate plugin for a given country. Parameters ---------- selected_country : str specify the country of interest. Ret...
[ "click.echo", "covid_data_tracker.registry.PluginRegistry.keys" ]
[((979, 1024), 'click.echo', 'click.echo', (['f"""selecting plugin for {country}"""'], {}), "(f'selecting plugin for {country}')\n", (989, 1024), False, 'import click\n'), ((1075, 1137), 'click.echo', 'click.echo', (['f"""attempting to find available data for {country}"""'], {}), "(f'attempting to find available data f...
from setuptools import setup setup(name='osmuf', version='0.1', install_requires=[ "seaborn", ], description='Urban Form analysis from OpenStreetMap', url='http://github.com/atelierlibre/osmuf', author='AtelierLibre', author_email='<EMAIL>', license='MIT', ...
[ "setuptools.setup" ]
[((30, 303), 'setuptools.setup', 'setup', ([], {'name': '"""osmuf"""', 'version': '"""0.1"""', 'install_requires': "['seaborn']", 'description': '"""Urban Form analysis from OpenStreetMap"""', 'url': '"""http://github.com/atelierlibre/osmuf"""', 'author': '"""AtelierLibre"""', 'author_email': '"""<EMAIL>"""', 'license'...
"""Semi continuous unit operations. Unit operations that accept constant or box-shaped flow rate profile and provide periodic flow rate profile. """ __all__ = ['AlternatingChromatography', 'ACC', 'PCC', 'PCCWithWashDesorption'] __version__ = '0.7.1' __author__ = '<NAME>' import typing as _typing import numpy as _np ...
[ "numpy.ones_like", "bio_rtd.utils.vectors.true_start", "bio_rtd.utils.convolution.time_conv", "numpy.ones", "bio_rtd.utils.vectors.true_end", "numpy.log", "numpy.zeros_like", "bio_rtd.utils.vectors.true_start_and_end", "scipy.interpolate.interp1d", "numpy.array", "numpy.pad", "numpy.zeros", ...
[((16197, 16210), 'numpy.array', '_np.array', (['[]'], {}), '([])\n', (16206, 16210), True, 'import numpy as _np\n'), ((54794, 54840), 'bio_rtd.utils.vectors.true_start_and_end', '_utils.vectors.true_start_and_end', (['(self._f > 0)'], {}), '(self._f > 0)\n', (54827, 54840), True, 'import bio_rtd.utils as _utils\n'), (...
import matplotlib.pyplot as plt def main(): with open('log.txt') as f: lines = f.readlines() glob_loss = [] hm_l = [] off_l = [] poly_l = [] depth_l = [] glob_loss_val = [] hm_l_val = [] off_l_val = [] poly_l_val = [] depth_l_val = [] for epoch in lines: m = epoch.split("|") if ...
[ "matplotlib.pyplot.plot", "matplotlib.pyplot.savefig", "matplotlib.pyplot.legend", "matplotlib.pyplot.show" ]
[((1068, 1106), 'matplotlib.pyplot.plot', 'plt.plot', (['glob_loss'], {'label': '"""glob_loss"""'}), "(glob_loss, label='glob_loss')\n", (1076, 1106), True, 'import matplotlib.pyplot as plt\n'), ((1111, 1139), 'matplotlib.pyplot.plot', 'plt.plot', (['hm_l'], {'label': '"""hm_l"""'}), "(hm_l, label='hm_l')\n", (1119, 11...
#!/usr/bin/env python3 ### # Based on signature.R ### import sys,os,logging import numpy as np import pandas as pd if __name__=="__main__": logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG) if (len(sys.argv) < 3): logging.error("3 file args required, LINCS sig info for GSE70138 and...
[ "logging.basicConfig", "pandas.concat", "pandas.read_table", "sys.exit", "logging.info", "logging.error" ]
[((144, 220), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(levelname)s:%(message)s"""', 'level': 'logging.DEBUG'}), "(format='%(levelname)s:%(message)s', level=logging.DEBUG)\n", (163, 220), False, 'import sys, os, logging\n'), ((545, 599), 'pandas.read_table', 'pd.read_table', (['fn1', '"""\t"""...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Examples for the NURBS-Python Package Released under MIT License Developed by <NAME> (c) 2016-2017 """ import os from geomdl import BSpline from geomdl import utilities from geomdl import exchange from geomdl import operations from geomdl.visualization imp...
[ "geomdl.operations.normal", "geomdl.BSpline.Surface", "geomdl.visualization.VisPlotly.VisSurface", "geomdl.utilities.generate_knot_vector", "os.path.realpath", "geomdl.exchange.import_txt", "geomdl.operations.tangent" ]
[((450, 467), 'geomdl.BSpline.Surface', 'BSpline.Surface', ([], {}), '()\n', (465, 467), False, 'from geomdl import BSpline\n'), ((662, 710), 'geomdl.utilities.generate_knot_vector', 'utilities.generate_knot_vector', (['surf.degree_u', '(6)'], {}), '(surf.degree_u, 6)\n', (692, 710), False, 'from geomdl import utilitie...
## Generated by pyxsdgen from xml.etree import ElementTree as ET # types class OrderedStpType(object): def __init__(self, order, stp): self.order = order # int self.stp = stp # StpIdType -> string @classmethod def build(self, element): return OrderedStpType( ele...
[ "xml.etree.ElementTree.Element", "xml.etree.ElementTree.fromstring", "xml.etree.ElementTree.QName", "xml.etree.ElementTree.SubElement" ]
[((3047, 3079), 'xml.etree.ElementTree.QName', 'ET.QName', (['POINT2POINT_NS', '"""p2ps"""'], {}), "(POINT2POINT_NS, 'p2ps')\n", (3055, 3079), True, 'from xml.etree import ElementTree as ET\n'), ((3094, 3130), 'xml.etree.ElementTree.QName', 'ET.QName', (['POINT2POINT_NS', '"""capacity"""'], {}), "(POINT2POINT_NS, 'capa...
import matplotlib.pyplot as plt import numpy as np x=20 y=1 plt.plot(x,y) plt.show()
[ "matplotlib.pyplot.plot", "matplotlib.pyplot.show" ]
[((62, 76), 'matplotlib.pyplot.plot', 'plt.plot', (['x', 'y'], {}), '(x, y)\n', (70, 76), True, 'import matplotlib.pyplot as plt\n'), ((76, 86), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (84, 86), True, 'import matplotlib.pyplot as plt\n')]
import os import sys import argparse import copy import numpy as np import scipy.special sys.path.append(os.getcwd()) def log_gaussian_pdf(theta, sigma=1, mu=0, ndim=None): if ndim is None: try: ndim = len(theta) except TypeError: assert isinstance(theta, (float, int)), t...
[ "argparse.ArgumentParser", "numpy.log", "numpy.asarray", "nnest.NestedSampler", "os.getcwd", "numpy.sum", "copy.deepcopy" ]
[((107, 118), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (116, 118), False, 'import os\n'), ((2136, 2395), 'nnest.NestedSampler', 'NestedSampler', (['args.x_dim', 'loglike'], {'transform': 'transform', 'log_dir': 'args.log_dir', 'num_live_points': 'args.num_live_points', 'hidden_dim': 'args.hidden_dim', 'num_layers': ...
from typing import Dict, Tuple import numpy as np def einsum(expr: str, *args: Tuple[np.ndarray, ...], **kwargs) -> np.ndarray: (a, b) = map(str.strip, expr.split("->")) a_ = list( map(lambda s: list(map(str.strip, s.split(","))), map(str.strip, a.split(";"))) ) b_ = list(map(str.strip, b.spli...
[ "numpy.einsum" ]
[((846, 879), 'numpy.einsum', 'np.einsum', (['expr_', '*args'], {}), '(expr_, *args, **kwargs)\n', (855, 879), True, 'import numpy as np\n')]
import pandas as pd import numpy as np import matplotlib.pyplot as plt from scipy.stats import multivariate_normal class _LinearModel(object): def __init__(self): self.w = None def fit(self, x, y): pass def predict(self, x): return np.dot(x, self.w) def cost(self, x...
[ "numpy.mean", "numpy.abs", "numpy.eye", "numpy.linalg.pinv", "scipy.stats.multivariate_normal.pdf", "numpy.argmax", "numpy.argsort", "numpy.sum", "numpy.dot", "numpy.zeros", "numpy.vstack", "numpy.cov", "numpy.transpose" ]
[((277, 294), 'numpy.dot', 'np.dot', (['x', 'self.w'], {}), '(x, self.w)\n', (283, 294), True, 'import numpy as np\n'), ((798, 813), 'numpy.transpose', 'np.transpose', (['r'], {}), '(r)\n', (810, 813), True, 'import numpy as np\n'), ((1976, 1991), 'numpy.transpose', 'np.transpose', (['x'], {}), '(x)\n', (1988, 1991), T...
#!/usr/bin/env python3 from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, String, Float, DateTime, Integer from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker Base = declarative_base() class Order(Base): __tablename__ = 'orders' id = Column(Intege...
[ "sqlalchemy.orm.sessionmaker", "sqlalchemy.create_engine", "sqlalchemy.Column", "sqlalchemy.ext.declarative.declarative_base" ]
[((228, 246), 'sqlalchemy.ext.declarative.declarative_base', 'declarative_base', ([], {}), '()\n', (244, 246), False, 'from sqlalchemy.ext.declarative import declarative_base\n'), ((307, 340), 'sqlalchemy.Column', 'Column', (['Integer'], {'primary_key': '(True)'}), '(Integer, primary_key=True)\n', (313, 340), False, 'f...
import csv import joblib from sklearn.metrics import accuracy_score data = [] features = [] targets = [] feature_names = [] users = [] with open('satisfaction_feature_names.csv') as name_file: column_name_file = csv.reader(name_file) feature_names = next(column_name_file)[2:394] with open('cza_satisfaction_tr...
[ "csv.writer", "csv.reader", "sklearn.metrics.accuracy_score", "joblib.load" ]
[((814, 839), 'joblib.load', 'joblib.load', (['"""cza_rf.pkl"""'], {}), "('cza_rf.pkl')\n", (825, 839), False, 'import joblib\n'), ((217, 238), 'csv.reader', 'csv.reader', (['name_file'], {}), '(name_file)\n', (227, 238), False, 'import csv\n'), ((364, 385), 'csv.reader', 'csv.reader', (['data_file'], {}), '(data_file)...
import unittest import pandas as pd import git import os from dfstools import get_dataset_dtypes from dfstools import find_related_cols_by_name from dfstools import find_related_cols_by_content from dfstools import find_parent_child_relationships from dfstools import pecan_cookies_load_data class RelationshipTools(un...
[ "os.path.join", "git.Repo", "dfstools.get_dataset_dtypes", "unittest.main", "dfstools.find_related_cols_by_content", "dfstools.find_related_cols_by_name", "dfstools.pecan_cookies_load_data" ]
[((4071, 4086), 'unittest.main', 'unittest.main', ([], {}), '()\n', (4084, 4086), False, 'import unittest\n'), ((689, 713), 'dfstools.get_dataset_dtypes', 'get_dataset_dtypes', (['None'], {}), '(None)\n', (707, 713), False, 'from dfstools import get_dataset_dtypes\n'), ((2504, 2553), 'dfstools.find_related_cols_by_name...
import sys from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QHBoxLayout, QGroupBox, QDialog, QVBoxLayout, QGridLayout,QMainWindow, QApplication, QWidget, QPushButton, QAction, QLineEdit, QMessageBox from PyQt5.QtGui import QIcon from PyQt5.QtCore import pyqtSlot class App(QDialog): def __ini...
[ "PyQt5.QtCore.pyqtSlot", "PyQt5.QtWidgets.QGridLayout", "PyQt5.QtWidgets.QMessageBox.question", "PyQt5.QtWidgets.QGroupBox", "PyQt5.QtWidgets.QApplication", "PyQt5.QtWidgets.QPushButton", "PyQt5.QtWidgets.QVBoxLayout", "PyQt5.QtWidgets.QLineEdit" ]
[((2495, 2505), 'PyQt5.QtCore.pyqtSlot', 'pyqtSlot', ([], {}), '()\n', (2503, 2505), False, 'from PyQt5.QtCore import pyqtSlot\n'), ((2771, 2793), 'PyQt5.QtWidgets.QApplication', 'QApplication', (['sys.argv'], {}), '(sys.argv)\n', (2783, 2793), False, 'from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QHB...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: v3/diff/UniversalDiff.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.protobuf import reflec...
[ "google.protobuf.symbol_database.Default", "google.protobuf.descriptor.FieldDescriptor" ]
[((494, 520), 'google.protobuf.symbol_database.Default', '_symbol_database.Default', ([], {}), '()\n', (518, 520), True, 'from google.protobuf import symbol_database as _symbol_database\n'), ((1168, 1505), 'google.protobuf.descriptor.FieldDescriptor', '_descriptor.FieldDescriptor', ([], {'name': '"""transactions"""', '...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ """ from __future__ import annotations import numpy as np import torch from torch import Tensor from onevision.data.augment.base import BaseAugment from onevision.data.augment.utils import apply_transform_op from onevision.data.data_class import ObjectAnnotation fro...
[ "onevision.data.data_class.ObjectAnnotation.box_label_len", "onevision.data.augment.utils.apply_transform_op", "torch.rand", "onevision.factory.AUGMENTS.register" ]
[((416, 459), 'onevision.factory.AUGMENTS.register', 'AUGMENTS.register', ([], {'name': '"""image_box_augment"""'}), "(name='image_box_augment')\n", (433, 459), False, 'from onevision.factory import AUGMENTS\n'), ((2353, 2375), 'torch.rand', 'torch.rand', (['(num_ops,)'], {}), '((num_ops,))\n', (2363, 2375), False, 'im...
from pudzu.charts import * from pudzu.sandbox.bamboo import * import seaborn as sns # generate map df = pd.read_csv("datasets/euvotes.csv").set_index('country') palette = tmap(RGBA, sns.cubehelix_palette(11, start=0.2, rot=-0.75)) ranges = [20000000,10000000,5000000,2000000,1000000,500000,200000,100000,0] def voteco...
[ "seaborn.cubehelix_palette" ]
[((184, 231), 'seaborn.cubehelix_palette', 'sns.cubehelix_palette', (['(11)'], {'start': '(0.2)', 'rot': '(-0.75)'}), '(11, start=0.2, rot=-0.75)\n', (205, 231), True, 'import seaborn as sns\n')]
import pandas as pd import numpy as np from copy import * from bisect import * from scipy.optimize import curve_fit from sklearn.metrics import * from collections import defaultdict as defd import datetime,pickle from DemandHelper import * import warnings warnings.filterwarnings("ignore") ####################...
[ "pandas.DataFrame", "numpy.array", "numpy.linspace", "datetime.datetime.today", "numpy.cumsum", "warnings.filterwarnings" ]
[((265, 298), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (288, 298), False, 'import warnings\n'), ((2092, 2117), 'datetime.datetime.today', 'datetime.datetime.today', ([], {}), '()\n', (2115, 2117), False, 'import datetime, pickle\n'), ((4079, 4093), 'pandas.DataFrame'...
# Copyright 2017 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
[ "ebcli.objects.platform.PlatformVersion.is_valid_arn" ]
[((3768, 3810), 'ebcli.objects.platform.PlatformVersion.is_valid_arn', 'PlatformVersion.is_valid_arn', (['platform_arn'], {}), '(platform_arn)\n', (3796, 3810), False, 'from ebcli.objects.platform import PlatformVersion\n')]
''' Perimeterator - Enumerator for AWS ELBs (Public IPs). ''' import logging import boto3 from perimeterator.helper import aws_elb_arn from perimeterator.helper import dns_lookup class Enumerator(object): ''' Perimeterator - Enumerator for AWS ELBs (Public IPs). ''' # Required for Boto and reporting. SE...
[ "logging.getLogger", "perimeterator.helper.aws_elb_arn", "boto3.client", "perimeterator.helper.dns_lookup" ]
[((389, 416), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (406, 416), False, 'import logging\n'), ((468, 514), 'boto3.client', 'boto3.client', (['self.SERVICE'], {'region_name': 'region'}), '(self.SERVICE, region_name=region)\n', (480, 514), False, 'import boto3\n'), ((2378, 2427), 'pe...
import numpy as np import spikemetrics.metrics as metrics from .utils.thresholdcurator import ThresholdCurator from .quality_metric import QualityMetric import spiketoolkit as st from spikemetrics.utils import Epoch, printProgressBar from collections import OrderedDict from .parameter_dictionaries import get_recording_...
[ "numpy.abs", "collections.OrderedDict", "spiketoolkit.postprocessing.get_unit_templates", "numpy.asarray", "numpy.std", "spiketoolkit.postprocessing.get_unit_max_channels", "numpy.random.RandomState" ]
[((2688, 2896), 'collections.OrderedDict', 'OrderedDict', (["[('snr_mode', 'mad'), ('snr_noise_duration', 10.0), (\n 'max_spikes_per_unit_for_snr', 1000), ('template_mode', 'median'), (\n 'max_channel_peak', 'both'), ('seed', None), ('verbose', False)]"], {}), "([('snr_mode', 'mad'), ('snr_noise_duration', 10.0),...
#! /usr/bin/env python # This file is part of khmer, https://github.com/dib-lab/khmer/, and is # Copyright (C) 2011-2015, Michigan State University. # Copyright (C) 2015, The Regents of the University of California. # # Redistribution and use in source and binary forms, with or without # modification, are permitted pro...
[ "screed.open", "khmer.Countgraph.load", "khmer.khmer_args.FileType", "khmer.ReadAligner", "khmer.khmer_args.build_counting_args", "os.path.basename" ]
[((2677, 2801), 'khmer.khmer_args.build_counting_args', 'khmer_args.build_counting_args', (['"""Correct reads against an already-computed table"""'], {'citations': "['counting', 'SeqAn']"}), "(\n 'Correct reads against an already-computed table', citations=[\n 'counting', 'SeqAn'])\n", (2707, 2801), False, 'from ...
## Requires Python v3 and pandas (pip install pandas) ## This script takes the newcastle membership csv and attempts ## to reduce the file size as much as possible through aggregation and lookups ## Two lookup files to provide library names and dates are also created. import csv import os import re from datetime impor...
[ "os.path.dirname" ]
[((512, 537), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (527, 537), False, 'import os\n')]
#!/usr/bin/env python3 import sys from argparse import ArgumentParser from getpass import getpass from hashlib import pbkdf2_hmac from signal import signal, SIGINT def die(*_, **__): sys.exit() signal = signal(SIGINT, die) iwd = """[Security] PreSharedKey={psk}""" supplicant = """network={{ ssid={ssid} ...
[ "signal.signal", "argparse.ArgumentParser", "getpass.getpass", "hashlib.pbkdf2_hmac", "sys.exit" ]
[((210, 229), 'signal.signal', 'signal', (['SIGINT', 'die'], {}), '(SIGINT, die)\n', (216, 229), False, 'from signal import signal, SIGINT\n'), ((369, 573), 'argparse.ArgumentParser', 'ArgumentParser', ([], {'description': '"""%(prog)s pre-computes PSK entries for network configuration blocks of wpa_supplicant or iwd c...
from cached_property import cached_property from purl import URL from onegov.translator_directory import _ from onegov.core.elements import Block, Link, LinkGroup, Confirm, Intercooler from onegov.core.utils import linkify from onegov.org.layout import DefaultLayout as BaseLayout from onegov.translator_directory.colle...
[ "onegov.translator_directory.collections.documents.TranslatorDocumentCollection", "onegov.core.elements.Link", "onegov.translator_directory._", "onegov.core.utils.linkify" ]
[((796, 809), 'onegov.core.utils.linkify', 'linkify', (['text'], {}), '(text)\n', (803, 809), False, 'from onegov.core.utils import linkify\n'), ((2275, 2374), 'onegov.translator_directory.collections.documents.TranslatorDocumentCollection', 'TranslatorDocumentCollection', (['self.request.session'], {'translator_id': '...
import pandas as pd import numpy as np import io def info(df): print("------------DIMENSIONS------------") print("Rows:", df.shape[0]) print("Columns:", df.shape[1]) print("--------------DTYPES--------------") columns = df.columns.tolist() integers = df.select_dtypes("integer").columns.tolist(...
[ "pandas.DataFrame", "io.StringIO" ]
[((1014, 1027), 'io.StringIO', 'io.StringIO', ([], {}), '()\n', (1025, 1027), False, 'import io\n'), ((836, 851), 'pandas.DataFrame', 'pd.DataFrame', (['d'], {}), '(d)\n', (848, 851), True, 'import pandas as pd\n')]
from django.conf.urls import url, include from .views import (GroupListAPIView, GroupCreateAPIView, AgendaListAPIView, AgendaDetailAPIView, AgendaCreateAPIView, AgendaPostAPIView, agenda_create, ...
[ "django.conf.urls.url" ]
[((1071, 1141), 'django.conf.urls.url', 'url', (['"""^(?P<group_id>\\\\d+)/post/$"""', 'agenda_create'], {'name': '"""agenda_create"""'}), "('^(?P<group_id>\\\\d+)/post/$', agenda_create, name='agenda_create')\n", (1074, 1141), False, 'from django.conf.urls import url, include\n'), ((1338, 1441), 'django.conf.urls.url'...
from django.contrib import admin # Register your models here. #models에서 Shop을 임폴트 from .models import Shop from .models import Parsed_data from .models import Img_data from .models import Other admin.site.register(Shop) admin.site.register(Parsed_data) admin.site.register(Img_data) admin.site.register(Other)
[ "django.contrib.admin.site.register" ]
[((196, 221), 'django.contrib.admin.site.register', 'admin.site.register', (['Shop'], {}), '(Shop)\n', (215, 221), False, 'from django.contrib import admin\n'), ((222, 254), 'django.contrib.admin.site.register', 'admin.site.register', (['Parsed_data'], {}), '(Parsed_data)\n', (241, 254), False, 'from django.contrib imp...
# -*- coding:utf-8 -*- # author: Xinge # @file: spconv_unet.py # @time: 2020/06/22 15:01 import time import numpy as np import spconv import torch import torch.nn.functional as F from torch import nn def conv3x3(in_planes, out_planes, stride=1, indice_key=None): return spconv.SubMConv3d(in_planes, out_planes, ker...
[ "torch.nn.Sigmoid", "torch.nn.ReLU", "torch.nn.LeakyReLU", "spconv.SparseInverseConv3d", "torch.from_numpy", "spconv.SubMConv3d", "torch.nn.BatchNorm1d", "numpy.array", "spconv.SparseConvTensor", "spconv.SparseConv3d", "torch.nn.Linear", "pdb.set_trace", "torch.cat" ]
[((276, 396), 'spconv.SubMConv3d', 'spconv.SubMConv3d', (['in_planes', 'out_planes'], {'kernel_size': '(3)', 'stride': 'stride', 'padding': '(1)', 'bias': '(False)', 'indice_key': 'indice_key'}), '(in_planes, out_planes, kernel_size=3, stride=stride,\n padding=1, bias=False, indice_key=indice_key)\n', (293, 396), Fa...
import numpy as np from prml.dimreduction.pca import PCA class BayesianPCA(PCA): def fit(self, X, iter_max=100, initial="random"): """ empirical bayes estimation of pca parameters Parameters ---------- X : (sample_size, n_features) ndarray input data i...
[ "numpy.mean", "numpy.eye", "numpy.copy", "numpy.trace", "numpy.size", "numpy.diag", "numpy.sum", "numpy.linalg.inv" ]
[((699, 717), 'numpy.mean', 'np.mean', (['X'], {'axis': '(0)'}), '(X, axis=0)\n', (706, 717), True, 'import numpy as np\n'), ((735, 760), 'numpy.eye', 'np.eye', (['self.n_components'], {}), '(self.n_components)\n', (741, 760), True, 'import numpy as np\n'), ((1650, 1671), 'numpy.linalg.inv', 'np.linalg.inv', (['self.C'...
""" Twisted adapter for Kanone """ from twisted.python.failure import Failure from twisted.internet import defer from ..lib import Invalid from ..util import varargs2kwargs import logging, sys log = logging.getLogger( __name__ ) # hacky and redundant, but it'll do for now .. # TODO: move to proper twisted specific c...
[ "logging.getLogger", "twisted.names.client.Resolver", "twisted.internet.defer.maybeDeferred", "twisted.internet.defer.returnValue", "twisted.internet.defer.DeferredList", "twisted.internet.defer.Deferred", "twisted.internet.defer.inlineCallbacks" ]
[((201, 228), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (218, 228), False, 'import logging, sys\n'), ((23707, 23742), 'twisted.names.client.Resolver', 'client.Resolver', (['"""/etc/resolv.conf"""'], {}), "('/etc/resolv.conf')\n", (23722, 23742), False, 'from twisted.names import clie...
""" Fetches demand statistics. Modified from <NAME> Original article: https://yaledailynews.com/blog/2020/01/10/yales-most-popular-courses/ Github: https://github.com/iamdanzhao/yale-popular-classes README: https://github.com/iamdanzhao/yale-popular-classes/blob/master/data-guide/course_data_guide.md """ import ar...
[ "ferry.crawler.common_args.add_seasons_args", "argparse.ArgumentParser", "ferry.crawler.common_args.parse_seasons_arg", "ujson.dump", "ferry.includes.demand_processing.fetch_season_subject_demand", "multiprocessing.Pool", "ferry.includes.demand_processing.get_dates", "ujson.load" ]
[((900, 1003), 'ferry.includes.demand_processing.fetch_season_subject_demand', 'fetch_season_subject_demand', (['demand_season', 'demand_subject_code', 'demand_subject_codes', 'demand_dates'], {}), '(demand_season, demand_subject_code,\n demand_subject_codes, demand_dates)\n', (927, 1003), False, 'from ferry.include...
from flask import Flask from flask_sqlalchemy import SQLAlchemy from qxf2_scheduler import models from qxf2_scheduler import db from qxf2_scheduler.__init__ import app from flask_script import Manager from flask_migrate import Migrate,MigrateCommand migrate=Migrate(app, db,render_as_batch=True) manager=Manager(app) m...
[ "flask_script.Manager", "flask_migrate.Migrate" ]
[((259, 297), 'flask_migrate.Migrate', 'Migrate', (['app', 'db'], {'render_as_batch': '(True)'}), '(app, db, render_as_batch=True)\n', (266, 297), False, 'from flask_migrate import Migrate, MigrateCommand\n'), ((305, 317), 'flask_script.Manager', 'Manager', (['app'], {}), '(app)\n', (312, 317), False, 'from flask_scrip...
# import packages import requests import pandas as pd import time from functions import * # limit per sity max_results_per_city = 100 # db of city city_set = ['New+York','Toronto','Las+Vegas'] # job roles job_set = ['business+analyst','data+scientist'] # file num file = 1 # from where to skip SKIPPER = 0 # lo...
[ "pandas.DataFrame", "time.time", "time.sleep" ]
[((477, 488), 'time.time', 'time.time', ([], {}), '()\n', (486, 488), False, 'import time\n'), ((586, 739), 'pandas.DataFrame', 'pd.DataFrame', ([], {'columns': "['unique_id', 'city', 'job_qry', 'job_title', 'company_name', 'location',\n 'summary', 'salary', 'link', 'date', 'full_text']"}), "(columns=['unique_id', '...
# # Copyright 2022 The AI Flow 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 applicable law or agreed to in w...
[ "pprint.PrettyPrinter" ]
[((1501, 1523), 'pprint.PrettyPrinter', 'pprint.PrettyPrinter', ([], {}), '()\n', (1521, 1523), False, 'import pprint\n')]
from torchvision.models import resnet18 import torch.nn.functional as F import torch.nn as nn import numpy as np import torch import pdb ############################## # Encoder ############################## class Encoder(nn.Module): def __init__(self, latent_dim): super(Encoder, self).__init__() ...
[ "torch.nn.AvgPool2d", "torchvision.models.resnet18", "torch.nn.Linear" ]
[((1078, 1103), 'torchvision.models.resnet18', 'resnet18', ([], {'pretrained': '(True)'}), '(pretrained=True)\n', (1086, 1103), False, 'from torchvision.models import resnet18\n'), ((1219, 1267), 'torch.nn.AvgPool2d', 'nn.AvgPool2d', ([], {'kernel_size': '(8)', 'stride': '(8)', 'padding': '(0)'}), '(kernel_size=8, stri...
from models.instructions.shared import Instruction from models.Other.ambito import Ambito from controllers.three_address_code import ThreeAddressCode from controllers.procedures import Procedures from models.instructions.Expression.expression import DATA_TYPE, PrimitiveData class Parametro(Instruction): def __ini...
[ "controllers.procedures.Procedures", "models.Other.ambito.Ambito", "controllers.three_address_code.ThreeAddressCode" ]
[((2120, 2139), 'models.Other.ambito.Ambito', 'Ambito', (['environment'], {}), '(environment)\n', (2126, 2139), False, 'from models.Other.ambito import Ambito\n'), ((5479, 5498), 'models.Other.ambito.Ambito', 'Ambito', (['environment'], {}), '(environment)\n', (5485, 5498), False, 'from models.Other.ambito import Ambit...
import typing import urllib.error import urllib.request from podcast.files import download_location from podcast.info import build_info_content from podcast.info import InfoContent from podcast.models import Channel from podcast.models import get_podcast_audio_link from podcast.models import NewStatus from podcast.mod...
[ "podcast.models.NewStatus", "podcast.models.get_podcast_audio_link", "podcast.info.build_info_content", "podcast.files.download_location" ]
[((1120, 1166), 'podcast.files.download_location', 'download_location', (['directory', 'channel', 'podcast'], {}), '(directory, channel, podcast)\n', (1137, 1166), False, 'from podcast.files import download_location\n'), ((1177, 1208), 'podcast.models.get_podcast_audio_link', 'get_podcast_audio_link', (['podcast'], {})...
# Import the Twython class from twython import Twython, TwythonStreamer import json # import pandas as pd import csv import datetime def process_tweet(tweet): # Filter out unwanted data d = {} d['hashtags'] = [hashtag['text'] for hashtag in tweet['entities']['hashtags']] try: for key in { ...
[ "json.load", "datetime.datetime.now", "csv.writer", "json.dump" ]
[((2476, 2495), 'json.load', 'json.load', (['tw_creds'], {}), '(tw_creds)\n', (2485, 2495), False, 'import json\n'), ((1706, 1729), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (1727, 1729), False, 'import datetime\n'), ((2142, 2162), 'csv.writer', 'csv.writer', (['out_file'], {}), '(out_file)\n'...
import pytest import itertools # Cartesian product of file names and extensions # e.g. README.txt, README.md, CHANGELOG.txt, CHANGELOG.md ... file_extensions = ['txt', 'md'] names = ['README', 'CHANGELOG', 'CONTRIBUTING', 'LICENSE', 'CODE_OF_CONDUCT'] exempt_files = [('.'.join(x)) for x in itertools.product(names, fil...
[ "itertools.product" ]
[((292, 333), 'itertools.product', 'itertools.product', (['names', 'file_extensions'], {}), '(names, file_extensions)\n', (309, 333), False, 'import itertools\n')]
import sys import unittest sys.path.append("../main") from sshtransport import * class FakeSocket(object): def __init__(self): self.recv_buffer = b"" self.send_buffer = b"" def recv(self, n): resp = self.recv_buffer[:n] self.recv_buffer = self.recv_buffer[n:] return r...
[ "sys.path.append" ]
[((28, 54), 'sys.path.append', 'sys.path.append', (['"""../main"""'], {}), "('../main')\n", (43, 54), False, 'import sys\n')]
import datetime import logging from typing import Optional from betfairlightweight.resources.bettingresources import MarketBook, MarketCatalogue from .blotter import Blotter from ..events import events logger = logging.getLogger(__name__) class Market: def __init__( self, flumine, market...
[ "logging.getLogger", "datetime.datetime.utcfromtimestamp", "datetime.datetime.utcnow" ]
[((213, 240), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (230, 240), False, 'import logging\n'), ((1004, 1030), 'datetime.datetime.utcnow', 'datetime.datetime.utcnow', ([], {}), '()\n', (1028, 1030), False, 'import datetime\n'), ((2979, 3016), 'datetime.datetime.utcfromtimestamp', 'da...
import unittest from iterable_collections import collect class TestList_(unittest.TestCase): def test_list(self): c = collect(list(range(10))).list_() self.assertEqual(c.iterable, list(list(range(10)))) def test_set(self): c = collect(set(range(10))).list_() self.assertEqual...
[ "iterable_collections.collect" ]
[((662, 687), 'iterable_collections.collect', 'collect', (["{'a': 1, 'b': 2}"], {}), "({'a': 1, 'b': 2})\n", (669, 687), False, 'from iterable_collections import collect\n')]
""" Testing array utilities """ import sys import numpy as np from ..arrfuncs import as_native_array, pinv, eigh from numpy.testing import (assert_array_almost_equal, assert_array_equal) from nose.tools import assert_true, assert_false, assert_equal, assert_raises NATIVE_ORDER = '<' if ...
[ "numpy.testing.assert_array_almost_equal", "numpy.linalg.pinv", "numpy.arange", "nose.tools.assert_true", "numpy.linalg.eigh", "nose.tools.assert_equal", "nose.tools.assert_false", "numpy.random.randn", "numpy.testing.assert_array_equal" ]
[((447, 459), 'numpy.arange', 'np.arange', (['(5)'], {}), '(5)\n', (456, 459), True, 'import numpy as np\n'), ((474, 512), 'nose.tools.assert_equal', 'assert_equal', (['arr.dtype.byteorder', '"""="""'], {}), "(arr.dtype.byteorder, '=')\n", (486, 512), False, 'from nose.tools import assert_true, assert_false, assert_equ...
#!/usr/bin/python import os os.system("sudo ./scan.py") os.system("sudo ./enable-wifi.py")
[ "os.system" ]
[((29, 56), 'os.system', 'os.system', (['"""sudo ./scan.py"""'], {}), "('sudo ./scan.py')\n", (38, 56), False, 'import os\n'), ((57, 91), 'os.system', 'os.system', (['"""sudo ./enable-wifi.py"""'], {}), "('sudo ./enable-wifi.py')\n", (66, 91), False, 'import os\n')]
from keras.optimizers import RMSprop from keras.layers import Input, Embedding, Dense, LSTM, Bidirectional, GRU from keras.layers import concatenate, Reshape, SpatialDropout1D from keras.models import Model from keras import backend as K from .AttentionWeightedAverage import AttentionWeightedAverage def textgenrnn_mo...
[ "keras.layers.CuDNNLSTM", "keras.backend.backend", "keras.layers.CuDNNGRU", "keras.layers.LSTM", "keras.layers.Input", "keras.layers.concatenate", "keras.models.Model", "keras.layers.SpatialDropout1D", "keras.layers.Embedding", "keras.layers.Dense", "keras.layers.Reshape", "keras.backend.tenso...
[((466, 493), 'keras.optimizers.RMSprop', 'RMSprop', ([], {'lr': '(0.004)', 'rho': '(0.99)'}), '(lr=0.004, rho=0.99)\n', (473, 493), False, 'from keras.optimizers import RMSprop\n'), ((624, 671), 'keras.layers.Input', 'Input', ([], {'shape': "(cfg['max_length'],)", 'name': '"""input"""'}), "(shape=(cfg['max_length'],),...
from django.contrib import admin from .models import Image @admin.register(Image) class ImageAdmin(admin.ModelAdmin): list_display = ('image', 'predict_covid', 'predict_no_findings', 'predict_pneumonia', 'created_at', 'updated_at', 'activated_at')
[ "django.contrib.admin.register" ]
[((61, 82), 'django.contrib.admin.register', 'admin.register', (['Image'], {}), '(Image)\n', (75, 82), False, 'from django.contrib import admin\n')]
# Solution of; # Project Euler Problem 668: Square root smooth Numbers # https://projecteuler.net/problem=668 # # A positive integer is called square root smooth if all of its prime factors # are strictly less than its square root. Including the number $1$, there are # $29$ square root smooth numbers not exceeding $...
[ "timed.caller" ]
[((580, 614), 'timed.caller', 'timed.caller', (['dummy', 'n', 'i', 'prob_id'], {}), '(dummy, n, i, prob_id)\n', (592, 614), False, 'import timed\n')]
from django import forms from django.contrib.auth import authenticate from django.contrib.auth.models import User from django.contrib.auth.forms import AuthenticationForm, UserCreationForm from django.forms import ValidationError, EmailField from user import models class MyAuthenticationForm(AuthenticationForm): ...
[ "django.contrib.auth.authenticate", "django.contrib.auth.models.User.objects.get", "django.forms.ValidationError", "django.contrib.auth.models.User.objects.filter", "django.forms.EmailField" ]
[((1983, 2023), 'django.forms.EmailField', 'EmailField', ([], {'required': '(True)', 'label': '"""Email"""'}), "(required=True, label='Email')\n", (1993, 2023), False, 'from django.forms import ValidationError, EmailField\n'), ((2444, 2476), 'django.contrib.auth.models.User.objects.filter', 'User.objects.filter', ([], ...
import re textinput = widget_inputs["text1"] comments = [] def commentizer(new): if new not in comments: comments.append(new) is_correct = False result = re.match(".*window.*", textinput, flags=re.IGNORECASE) if result: is_correct = True commentizer("You're right, but there's a little more to it...
[ "re.match" ]
[((170, 224), 're.match', 're.match', (['""".*window.*"""', 'textinput'], {'flags': 're.IGNORECASE'}), "('.*window.*', textinput, flags=re.IGNORECASE)\n", (178, 224), False, 'import re\n'), ((384, 438), 're.match', 're.match', (['""".*global.*"""', 'textinput'], {'flags': 're.IGNORECASE'}), "('.*global.*', textinput, f...
import unittest from html import escape from src.markdown_parser import convert_github_markdown_to_asana_xml class TestConvertGithubMarkdownToAsanaXml(unittest.TestCase): def test_basic_markdown(self): md = """~~strike~~ **bold** _italic_ `code` [link](asana.com)""" xml = convert_github_markdown_...
[ "unittest.main", "html.escape", "src.markdown_parser.convert_github_markdown_to_asana_xml" ]
[((4094, 4105), 'unittest.main', 'run_tests', ([], {}), '()\n', (4103, 4105), True, 'from unittest import main as run_tests\n'), ((296, 336), 'src.markdown_parser.convert_github_markdown_to_asana_xml', 'convert_github_markdown_to_asana_xml', (['md'], {}), '(md)\n', (332, 336), False, 'from src.markdown_parser import co...
#!/usr/bin/python # Copyright (c) 2018 Cisco and/or its affiliates. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your ...
[ "ansible.module_utils.basic.AnsibleModule", "ansible.module_utils.network.ftd.common.construct_ansible_facts", "ansible.module_utils.connection.Connection" ]
[((2611, 2672), 'ansible.module_utils.basic.AnsibleModule', 'AnsibleModule', ([], {'argument_spec': 'fields', 'supports_check_mode': '(True)'}), '(argument_spec=fields, supports_check_mode=True)\n', (2624, 2672), False, 'from ansible.module_utils.basic import AnsibleModule\n'), ((2744, 2775), 'ansible.module_utils.conn...
"""Trust ping admin routes.""" from aiohttp import web from aiohttp_apispec import docs from ..connections.models.connection_record import ConnectionRecord from .messages.ping import Ping from ...storage.error import StorageNotFoundError @docs(tags=["trustping"], summary="Send a trust ping to a connection") async d...
[ "aiohttp.web.HTTPOk", "aiohttp_apispec.docs", "aiohttp.web.post", "aiohttp.web.HTTPNotFound" ]
[((243, 312), 'aiohttp_apispec.docs', 'docs', ([], {'tags': "['trustping']", 'summary': '"""Send a trust ping to a connection"""'}), "(tags=['trustping'], summary='Send a trust ping to a connection')\n", (247, 312), False, 'from aiohttp_apispec import docs\n'), ((1074, 1086), 'aiohttp.web.HTTPOk', 'web.HTTPOk', ([], {}...
"""Exception which are not actually thrown, only their docstrings are used.""" import colorama import sys __all__ = [ "Error", "ParentIsNotAFolderError", "InvalidURLError", "ImageFormatNotSupportedError", "ImageNotSpecifiedError", "FolderIconAlreadyExistsError", "DesktopIniError", "exc...
[ "sys.exit" ]
[((1848, 1860), 'sys.exit', 'sys.exit', (['(-1)'], {}), '(-1)\n', (1856, 1860), False, 'import sys\n')]
# Generated by Django 3.2 on 2021-04-10 12:34 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("books", "0003_auto_20210410_1231")] operations = [ migrations.AlterField( model_name="book", name="category", field=mod...
[ "django.db.models.CharField" ]
[((317, 449), 'django.db.models.CharField', 'models.CharField', ([], {'choices': "[('fiction', 'Fiction'), ('regular', 'Regular'), ('novel', 'Novel')]", 'default': '"""regular"""', 'max_length': '(7)'}), "(choices=[('fiction', 'Fiction'), ('regular', 'Regular'), (\n 'novel', 'Novel')], default='regular', max_length=...
""" MAIN STYLING AND RENDERING FILE Requirements: ------------------------------------------------------------------------------ IMPORTANT! This has only been tested with Blender 2.79 API. We have run this on Linux and MacOS. Execution: ------------------------------------------------------------------------------ Th...
[ "logging.getLogger", "render_util.set_width_height", "render_util.init_normals_render_nodes", "render_util.set_materials", "geo_util.delete_all_but_one_camera", "geo_util.get_camera_by_number", "sys.path.append", "render_util.set_objectids_style", "stylit_util.setup_stylit_lighting", "argparse.Arg...
[((2320, 2347), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (2337, 2347), False, 'import logging\n'), ((2142, 2168), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (2158, 2168), False, 'import os\n'), ((2201, 2224), 'sys.path.append', 'sys.path.append', (['...
from foundations_spec import * from unittest.mock import call class TestArtifactDownloader(Spec): mock_archiver = let_mock() make_directory_mock = let_patch_mock('os.makedirs') @let def source_directory(self): return self.faker.uri_path() @let def download_directory(self): ...
[ "unittest.mock.call", "foundations_contrib.archiving.artifact_downloader.ArtifactDownloader" ]
[((502, 540), 'foundations_contrib.archiving.artifact_downloader.ArtifactDownloader', 'ArtifactDownloader', (['self.mock_archiver'], {}), '(self.mock_archiver)\n', (520, 540), False, 'from foundations_contrib.archiving.artifact_downloader import ArtifactDownloader\n'), ((2025, 2092), 'unittest.mock.call', 'call', (['""...
"""Register controllers. """ from safe_control_gym.utils.registration import register register(id="mpc", entry_point="safe_control_gym.controllers.mpc.mpc:MPC", config_entry_point="safe_control_gym.controllers.mpc:mpc.yaml") register(id="linear_mpc", entry_point="safe_control_gym.controlle...
[ "safe_control_gym.utils.registration.register" ]
[((88, 230), 'safe_control_gym.utils.registration.register', 'register', ([], {'id': '"""mpc"""', 'entry_point': '"""safe_control_gym.controllers.mpc.mpc:MPC"""', 'config_entry_point': '"""safe_control_gym.controllers.mpc:mpc.yaml"""'}), "(id='mpc', entry_point='safe_control_gym.controllers.mpc.mpc:MPC',\n config_en...
"""Test module ``plot_profile/utils.py``.""" # Standard library import logging # First-party from plot_profile.utils import count_to_log_level def test_count_to_log_level(): assert count_to_log_level(0) == logging.ERROR assert count_to_log_level(1) == logging.WARNING assert count_to_log_level(2) == loggi...
[ "plot_profile.utils.count_to_log_level" ]
[((188, 209), 'plot_profile.utils.count_to_log_level', 'count_to_log_level', (['(0)'], {}), '(0)\n', (206, 209), False, 'from plot_profile.utils import count_to_log_level\n'), ((238, 259), 'plot_profile.utils.count_to_log_level', 'count_to_log_level', (['(1)'], {}), '(1)\n', (256, 259), False, 'from plot_profile.utils ...
"""Allows the user to call the library as a cli-module.""" from argparse import ArgumentParser from .modularcmaes import evaluate_bbob parser = ArgumentParser(description="Run single function CMAES") parser.add_argument( "-f", "--fid", type=int, help="bbob function id", required=False, default=5 ) parser.add_ar...
[ "argparse.ArgumentParser" ]
[((148, 203), 'argparse.ArgumentParser', 'ArgumentParser', ([], {'description': '"""Run single function CMAES"""'}), "(description='Run single function CMAES')\n", (162, 203), False, 'from argparse import ArgumentParser\n')]
"""Define the CSRmatrix class.""" import numpy as np from scipy.sparse import coo_matrix from six import iteritems from openmdao.matrices.coo_matrix import COOMatrix class CSRMatrix(COOMatrix): """ Sparse matrix in Compressed Row Storage format. """ def _build(self, num_rows, num_cols): """...
[ "numpy.argsort", "numpy.lexsort", "six.iteritems", "scipy.sparse.coo_matrix" ]
[((679, 703), 'numpy.lexsort', 'np.lexsort', (['(cols, rows)'], {}), '((cols, rows))\n', (689, 703), True, 'import numpy as np\n'), ((1037, 1056), 'numpy.argsort', 'np.argsort', (['srtidxs'], {}), '(srtidxs)\n', (1047, 1056), True, 'import numpy as np\n'), ((1149, 1168), 'six.iteritems', 'iteritems', (['metadata'], {})...
# -*- coding: utf-8 -*- from setuptools import setup, find_packages import re import os def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() with open("src/sdfconf/_version.py", "rt") as vf: VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]" for line in vf: mo = re.search...
[ "os.path.dirname", "re.search" ]
[((311, 338), 're.search', 're.search', (['VSRE', 'line', 're.M'], {}), '(VSRE, line, re.M)\n', (320, 338), False, 'import re\n'), ((136, 161), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (151, 161), False, 'import os\n')]
from aws_cdk import ( aws_cognito as cognito, aws_iam as iam, aws_ssm as ssm, core ) class CognitoStack(core.Stack): def __init__(self, scope: core.Construct, id: str, **kwargs) -> None: super().__init__(scope, id, **kwargs) prj_name = self.node.try_get_context("project_name") ...
[ "aws_cdk.aws_cognito.CfnIdentityPool.CognitoIdentityProviderProperty", "aws_cdk.aws_cognito.CfnUserPoolClient", "aws_cdk.aws_cognito.CfnUserPool.PasswordPolicyProperty", "aws_cdk.aws_ssm.StringParameter" ]
[((1289, 1405), 'aws_cdk.aws_cognito.CfnUserPoolClient', 'cognito.CfnUserPoolClient', (['self', '"""pool-client"""'], {'user_pool_id': 'user_pool.ref', 'client_name': "(env_name + '-app-client')"}), "(self, 'pool-client', user_pool_id=user_pool.ref,\n client_name=env_name + '-app-client')\n", (1314, 1405), True, 'fr...