code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
#!/usr/bin/env python # _*_ coding: utf-8_*_ # # Copyright 2016-2017 <EMAIL> # <EMAIL> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
[ "tornado_swagger.swagger.operation", "logging.debug", "os.makedirs", "tornado_swagger.swagger.model", "os.path.exists", "json.dumps", "logging.info", "image_verify.generate_verify_image" ]
[((1029, 1044), 'tornado_swagger.swagger.model', 'swagger.model', ([], {}), '()\n', (1042, 1044), False, 'from tornado_swagger import swagger\n'), ((1311, 1345), 'tornado_swagger.swagger.operation', 'swagger.operation', ([], {'nickname': '"""post"""'}), "(nickname='post')\n", (1328, 1345), False, 'from tornado_swagger ...
import pickle import pandas as pd import os from os import path from scripts.process_raw import keep_positive_ratings, count_filter from scripts.config import params def process_raw(input_dir, output_dir, movie_users_threshold, user_movies_threshold): ds = pd.read_csv(path.join(input_dir, 'ratings.csv')) prin...
[ "pickle.dump", "os.makedirs", "scripts.process_raw.count_filter", "os.path.exists", "scripts.process_raw.keep_positive_ratings", "os.path.join" ]
[((479, 535), 'scripts.process_raw.keep_positive_ratings', 'keep_positive_ratings', (['ds', '"""userId"""', '"""movieId"""', '"""rating"""'], {}), "(ds, 'userId', 'movieId', 'rating')\n", (500, 535), False, 'from scripts.process_raw import keep_positive_ratings, count_filter\n'), ((545, 605), 'scripts.process_raw.count...
import os import sys import numpy as np import scipy.io as sio from skimage import io import time import math import skimage import src.faceutil from src.faceutil import mesh from src.faceutil.morphable_model import MorphabelModel from src.util.matlabutil import NormDirection from math import sin, cos, asin, acos, atan...
[ "numpy.diagflat", "numpy.zeros", "src.faceutil.morphable_model.MorphabelModel", "math.sin", "math.cos" ]
[((404, 438), 'src.faceutil.morphable_model.MorphabelModel', 'MorphabelModel', (['"""data/Out/BFM.mat"""'], {}), "('data/Out/BFM.mat')\n", (418, 438), False, 'from src.faceutil.morphable_model import MorphabelModel\n'), ((1060, 1076), 'numpy.zeros', 'np.zeros', (['(4, 4)'], {}), '((4, 4))\n', (1068, 1076), True, 'impor...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse from alipay.aop.api.domain.PaymentSuccessPagePlanInfo import PaymentSuccessPagePlanInfo class AlipayOpenMiniPlanOperateBatchqueryResponse(AlipayResponse): def __init__(self): super...
[ "alipay.aop.api.domain.PaymentSuccessPagePlanInfo.PaymentSuccessPagePlanInfo.from_alipay_dict" ]
[((909, 955), 'alipay.aop.api.domain.PaymentSuccessPagePlanInfo.PaymentSuccessPagePlanInfo.from_alipay_dict', 'PaymentSuccessPagePlanInfo.from_alipay_dict', (['i'], {}), '(i)\n', (952, 955), False, 'from alipay.aop.api.domain.PaymentSuccessPagePlanInfo import PaymentSuccessPagePlanInfo\n')]
# All content Copyright (C) 2018 Genomics plc from wecall.genomics.chromosome import standardise_chromosome import pysam class TabixWrapper(object): def __init__(self, tabix_filename): self.__tabix_file = pysam.Tabixfile(tabix_filename, 'r') self.__contig_mapping = {standardise_chromosome( ...
[ "pysam.Tabixfile", "wecall.genomics.chromosome.standardise_chromosome" ]
[((220, 256), 'pysam.Tabixfile', 'pysam.Tabixfile', (['tabix_filename', '"""r"""'], {}), "(tabix_filename, 'r')\n", (235, 256), False, 'import pysam\n'), ((290, 320), 'wecall.genomics.chromosome.standardise_chromosome', 'standardise_chromosome', (['contig'], {}), '(contig)\n', (312, 320), False, 'from wecall.genomics.c...
from collections import namedtuple, defaultdict import time import logging from datetime import datetime, timedelta from yapsy.PluginManager import PluginManager from api.exceptions import TerminateApplication from api.sensor import Sensor from api.motor import Motor PluginDetails = namedtuple('PluginInfo', ['name',...
[ "logging.error", "logging.debug", "logging.basicConfig", "logging.warning", "collections.defaultdict", "logging.info", "datetime.timedelta", "collections.namedtuple", "yapsy.PluginManager.PluginManager", "datetime.datetime.now" ]
[((287, 373), 'collections.namedtuple', 'namedtuple', (['"""PluginInfo"""', "['name', 'key', 'instance', 'wants_last_chance', 'path']"], {}), "('PluginInfo', ['name', 'key', 'instance', 'wants_last_chance',\n 'path'])\n", (297, 373), False, 'from collections import namedtuple, defaultdict\n'), ((439, 461), 'datetime...
from torch import nn from torchvision import models from torchvision.transforms import transforms import util class VGGFeatureExtractor(nn.Module): def __init__(self): super().__init__() self._vgg = models.vgg16(pretrained=True).features self._vgg.eval() for parameter in self._vg...
[ "util.denormalize", "torchvision.models.vgg16", "torchvision.transforms.transforms.Normalize" ]
[((406, 481), 'torchvision.transforms.transforms.Normalize', 'transforms.Normalize', ([], {'mean': '[0.485, 0.456, 0.406]', 'std': '[0.229, 0.224, 0.225]'}), '(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])\n', (426, 481), False, 'from torchvision.transforms import transforms\n'), ((611, 631), 'util.denormalize...
import os import logging from logging import handlers from werkzeug.exceptions import InternalServerError basedir = os.path.abspath(os.path.dirname(__file__)) def handle_error(error): Log.logger().error(error) return error class Log: LOG_PATH = os.path.join(basedir, 'logs') LOG_NAME = os.path.join(LO...
[ "os.makedirs", "os.path.dirname", "os.path.exists", "logging.Formatter", "logging.handlers.TimedRotatingFileHandler", "os.path.join" ]
[((133, 158), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (148, 158), False, 'import os\n'), ((260, 289), 'os.path.join', 'os.path.join', (['basedir', '"""logs"""'], {}), "(basedir, 'logs')\n", (272, 289), False, 'import os\n'), ((305, 338), 'os.path.join', 'os.path.join', (['LOG_PATH', '"...
from bs4 import BeautifulSoup import requests, smtplib, time from flask import Flask, render_template, request, url_for from threading import Thread app = Flask(__name__) @app.route('/') def progstart(): return render_template("site.html") @app.route('/start_task') def start_task(): def do_work(stockInput, t...
[ "threading.Thread", "flask.request.args.get", "smtplib.SMTP", "flask.Flask", "time.sleep", "flask.render_template", "requests.get", "bs4.BeautifulSoup" ]
[((156, 171), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (161, 171), False, 'from flask import Flask, render_template, request, url_for\n'), ((217, 245), 'flask.render_template', 'render_template', (['"""site.html"""'], {}), "('site.html')\n", (232, 245), False, 'from flask import Flask, render_templat...
import json from pathlib import Path from typing import List import cli_ui as ui import deserialize from conans.client.conan_api import Conan from .conanbuilder.configreader import ConfigReader from .conanbuilder.package import Package from .conanbuilder.runner import Runner from .conanbuilder.signature import Signat...
[ "deserialize.deserialize", "json.load", "cli_ui.fatal", "pathlib.Path", "conans.client.conan_api.Conan.factory" ]
[((1854, 1869), 'conans.client.conan_api.Conan.factory', 'Conan.factory', ([], {}), '()\n', (1867, 1869), False, 'from conans.client.conan_api import Conan\n'), ((2387, 2430), 'deserialize.deserialize', 'deserialize.deserialize', (['ConfigReader', 'load'], {}), '(ConfigReader, load)\n', (2410, 2430), False, 'import des...
# Generated by Django 2.0.3 on 2018-04-05 07:55 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('kyokigo', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='kyokigo_input', name='ownurl', ...
[ "django.db.migrations.RemoveField", "django.db.models.CharField" ]
[((224, 289), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""kyokigo_input"""', 'name': '"""ownurl"""'}), "(model_name='kyokigo_input', name='ownurl')\n", (246, 289), False, 'from django.db import migrations, models\n'), ((440, 493), 'django.db.models.CharField', 'models.CharField...
from db.sql.migration_of_db.tweet_migration_big.psql_tweet_mig_queries import psql_connector_twitter_mig from db.sql.migration_of_db.tweet_migration_big.big_queries_sql import big_connector_twitter_mig import data_collection.altdata_service.twitter.object_function.tweet_cleaner as cleaner def migration_tweet_tab...
[ "db.sql.migration_of_db.tweet_migration_big.psql_tweet_mig_queries.psql_connector_twitter_mig", "db.sql.migration_of_db.tweet_migration_big.big_queries_sql.big_connector_twitter_mig", "data_collection.altdata_service.twitter.object_function.tweet_cleaner.clean_df_for_db" ]
[((569, 597), 'db.sql.migration_of_db.tweet_migration_big.psql_tweet_mig_queries.psql_connector_twitter_mig', 'psql_connector_twitter_mig', ([], {}), '()\n', (595, 597), False, 'from db.sql.migration_of_db.tweet_migration_big.psql_tweet_mig_queries import psql_connector_twitter_mig\n'), ((614, 641), 'db.sql.migration_o...
# (c) 2016 <NAME> " 1D PNP, modelling reservoirs and membrane far away from pore " import nanopores as nano import solvers geop = nano.Params( R = 35., H = 70., ) physp = nano.Params( bulkcon = 1000., bV = -1., ) geo, pnp = solvers.solve1D(geop, physp) solvers.visualize1D(geo, pnp) nano.showplots()
[ "solvers.visualize1D", "nanopores.showplots", "solvers.solve1D", "nanopores.Params" ]
[((132, 159), 'nanopores.Params', 'nano.Params', ([], {'R': '(35.0)', 'H': '(70.0)'}), '(R=35.0, H=70.0)\n', (143, 159), True, 'import nanopores as nano\n'), ((181, 217), 'nanopores.Params', 'nano.Params', ([], {'bulkcon': '(1000.0)', 'bV': '(-1.0)'}), '(bulkcon=1000.0, bV=-1.0)\n', (192, 217), True, 'import nanopores ...
# Generated by Django 3.1.3 on 2020-11-25 11:09 from django.db import migrations from django.utils.text import slugify def popular_slug(apps, schema_editor): Modulo = apps.get_model('modulos', 'Modulo') for modulo in Modulo.objects.all(): modulo.slug = slugify(modulo.titulo) modulo.save() cl...
[ "django.db.migrations.RunPython", "django.utils.text.slugify" ]
[((272, 294), 'django.utils.text.slugify', 'slugify', (['modulo.titulo'], {}), '(modulo.titulo)\n', (279, 294), False, 'from django.utils.text import slugify\n'), ((454, 488), 'django.db.migrations.RunPython', 'migrations.RunPython', (['popular_slug'], {}), '(popular_slug)\n', (474, 488), False, 'from django.db import ...
#!/usr/bin/env python # Copyright 2021 VMware, Inc. # SPDX-License-Identifier: BSD-2 import argparse import configparser import io import sys import tau_clients import vt from tau_clients import decoders from tau_clients import exceptions from tau_clients import nsx_defender def download_from_vt(client: vt.Client, f...
[ "tau_clients.nsx_defender.AnalysisClient.from_conf", "io.BytesIO", "tau_clients.decoders.InputTypeDecoder", "tau_clients.get_file_paths", "tau_clients.decoders.InputTypeDecoder.add_arguments_to_parser", "argparse.ArgumentParser", "tau_clients.get_task_link", "configparser.ConfigParser", "tau_clients...
[((885, 910), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (908, 910), False, 'import argparse\n'), ((1336, 1505), 'tau_clients.decoders.InputTypeDecoder.add_arguments_to_parser', 'decoders.InputTypeDecoder.add_arguments_to_parser', ([], {'parser': 'parser', 'choices': '[decoders.InputType.DI...
import RobinhoodFunctions as rf email, password = rf.getCredentials() rf.loginToRH(email, password) allPositions = [] allPositions = rf.getAllOptions(allPositions) frequentTickers = rf.getFrequentTickers(allPositions) rf.r.options.write_spinner() rf.r.options.spinning_cursor() optionNames, entryPrices, calls, puts = r...
[ "RobinhoodFunctions.r.options.spinning_cursor", "RobinhoodFunctions.loginToRH", "RobinhoodFunctions.getOptionTrades", "RobinhoodFunctions.r.options.write_spinner", "RobinhoodFunctions.getFrequentTickers", "RobinhoodFunctions.closeAndSave", "RobinhoodFunctions.getAllOptions", "RobinhoodFunctions.getCre...
[((51, 70), 'RobinhoodFunctions.getCredentials', 'rf.getCredentials', ([], {}), '()\n', (68, 70), True, 'import RobinhoodFunctions as rf\n'), ((71, 100), 'RobinhoodFunctions.loginToRH', 'rf.loginToRH', (['email', 'password'], {}), '(email, password)\n', (83, 100), True, 'import RobinhoodFunctions as rf\n'), ((134, 164)...
from django.db import models from django_grainy.decorators import grainy_model from django_grainy.models import Permission, PermissionManager from django_grainy.handlers import GrainyMixin # Create your models here. """ These are the models used during the django_grainy unit tests. There is no need to ever install ...
[ "django.db.models.CharField", "django.db.models.ForeignKey", "django_grainy.models.PermissionManager", "django_grainy.decorators.grainy_model" ]
[((458, 472), 'django_grainy.decorators.grainy_model', 'grainy_model', ([], {}), '()\n', (470, 472), False, 'from django_grainy.decorators import grainy_model\n'), ((545, 590), 'django_grainy.decorators.grainy_model', 'grainy_model', ([], {'namespace': '"""something.arbitrary"""'}), "(namespace='something.arbitrary')\n...
from telegram.ext import Updater, CallbackContext, CommandHandler, MessageHandler, Filters, Handler from telegram.ext.dispatcher import run_async, DispatcherHandlerStop, Dispatcher from telegram import Update, User, Message, ParseMode from telegram.error import BadRequest import requests_html import requests import jso...
[ "json.loads", "logging.basicConfig", "telegram.ext.Updater", "requests.get", "telegram.ext.CommandHandler", "requests_html.HTMLSession" ]
[((368, 404), 'telegram.ext.Updater', 'Updater', (['"""API-KEY"""'], {'use_context': '(True)'}), "('API-KEY', use_context=True)\n", (375, 404), False, 'from telegram.ext import Updater, CallbackContext, CommandHandler, MessageHandler, Filters, Handler\n'), ((438, 570), 'logging.basicConfig', 'logging.basicConfig', ([],...
""" Some exercises about statistics """ from matplotlib import pyplot as plt from statistics.central_tendencies import * from statistics.variance import variance, standard_deviation from statistics.correlation import covariance, correlation def main(): num_friends = [500, 50, 25, 30, 5, 6, 7, 8, 9, 10, ...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.show", "statistics.variance.variance", "matplotlib.pyplot.scatter", "statistics.variance.standard_deviation", "statistics.correlation.covariance", "matplotlib.pyplot.figure", "statistics.correlation.correlation", "matplotlib.pyplot.ylabel", "matplotlib...
[((1176, 1188), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (1186, 1188), True, 'from matplotlib import pyplot as plt\n'), ((1193, 1232), 'matplotlib.pyplot.scatter', 'plt.scatter', (['num_friends', 'daily_minutes'], {}), '(num_friends, daily_minutes)\n', (1204, 1232), True, 'from matplotlib import pypl...
from typing import Type, Union, Optional from pathlib import Path from wunderkafka.types import TopicName, KeySchemaDescription, ValueSchemaDescription from wunderkafka.serdes.abc import AbstractDescriptionStore from wunderkafka.compat.types import AvroModel from wunderkafka.compat.constants import PY36 from wunderkaf...
[ "wunderkafka.types.ValueSchemaDescription", "wunderkafka.types.KeySchemaDescription", "wunderkafka.serdes.avromodel.derive", "wunderkafka.compat.types.AvroModel", "pathlib.Path" ]
[((502, 536), 'wunderkafka.types.ValueSchemaDescription', 'ValueSchemaDescription', ([], {'text': 'value'}), '(text=value)\n', (524, 536), False, 'from wunderkafka.types import TopicName, KeySchemaDescription, ValueSchemaDescription\n'), ((597, 627), 'wunderkafka.types.KeySchemaDescription', 'KeySchemaDescription', ([]...
## # train eeg data of mind commands # (beta) # ## import json import os import sys import time import pickle import numpy as np from mindFunctions import filterDownsampleData import codecs, json from scipy.signal import butter, lfilter from sklearn import svm, preprocessing, metrics from sklearn.model_selection impo...
[ "pickle.dump", "json.load", "sklearn.preprocessing.scale", "os.getcwd", "numpy.logspace", "sklearn.metrics.accuracy_score", "os.path.basename", "sklearn.metrics.recall_score", "sklearn.model_selection.StratifiedShuffleSplit", "pathlib.Path", "numpy.array", "sklearn.metrics.precision_score", ...
[((745, 756), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (754, 756), False, 'import os\n'), ((1302, 1350), 'pathlib.Path', 'Path', (["(traindataFolder + 'training-baseline.json')"], {}), "(traindataFolder + 'training-baseline.json')\n", (1306, 1350), False, 'from pathlib import Path\n'), ((1452, 1475), 'numpy.array', ...
# Copyright 2015 Brocade Communications System, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
[ "eventlet.greenthread.sleep", "collections.namedtuple" ]
[((717, 775), 'collections.namedtuple', 'collections.namedtuple', (['"""RouteRule"""', '"""dest_cidr, next_hop"""'], {}), "('RouteRule', 'dest_cidr, next_hop')\n", (739, 775), False, 'import collections\n'), ((1121, 1145), 'eventlet.greenthread.sleep', 'greenthread.sleep', (['delay'], {}), '(delay)\n', (1138, 1145), Fa...
import sys import time import serial import serial.tools.list_ports as stl def list_modi_serialports(): info_list = [] def __is_modi_port(port): return (port.vid == 0x2FDE and port.pid == 0x0003) modi_ports = [port for port in stl.comports() if __is_modi_port(port)] for modi_por...
[ "serial.Serial", "sys.platform.startswith", "threading.Thread", "modi2_firmware_updater.util.modi_winusb.modi_winusb.ModiWinUsbComPort", "serial.tools.list_ports.comports", "time.time", "time.sleep", "modi2_firmware_updater.util.modi_winusb.modi_winusb.list_modi_winusb_paths" ]
[((391, 421), 'sys.platform.startswith', 'sys.platform.startswith', (['"""win"""'], {}), "('win')\n", (414, 421), False, 'import sys\n'), ((540, 564), 'modi2_firmware_updater.util.modi_winusb.modi_winusb.list_modi_winusb_paths', 'list_modi_winusb_paths', ([], {}), '()\n', (562, 564), False, 'from modi2_firmware_updater...
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg from matplotlib.figure import Figure from gui.utils import MessageBox import numpy as np class MplCanvas(FigureCanvasQTAgg): """ A canvas for matplotlib plots. Contains all plot functionality for Plot Mode """ def __init__(self, compo...
[ "matplotlib.figure.Figure", "numpy.max", "numpy.min", "numpy.linspace" ]
[((369, 384), 'matplotlib.figure.Figure', 'Figure', ([], {'dpi': '(100)'}), '(dpi=100)\n', (375, 384), False, 'from matplotlib.figure import Figure\n'), ((21817, 21858), 'numpy.linspace', 'np.linspace', (['V_start', 'V_end', 'V_num_points'], {}), '(V_start, V_end, V_num_points)\n', (21828, 21858), True, 'import numpy a...
import turtle s = turtle.Screen() t = turtle.Turtle() s.title("Christmas Tree") s.setup(width=800, height=600) # Title on the window pen = turtle.Turtle() pen.speed(0) pen.color("black") pen.penup() pen.hideturtle() pen.goto(0, 260) pen.write("Christmas Tree", align="center",font=("Arial", 24, "normal")) # Starting...
[ "turtle.Screen", "turtle.Turtle" ]
[((19, 34), 'turtle.Screen', 'turtle.Screen', ([], {}), '()\n', (32, 34), False, 'import turtle\n'), ((39, 54), 'turtle.Turtle', 'turtle.Turtle', ([], {}), '()\n', (52, 54), False, 'import turtle\n'), ((142, 157), 'turtle.Turtle', 'turtle.Turtle', ([], {}), '()\n', (155, 157), False, 'import turtle\n')]
#!/pxrpythonsubst # # Copyright 2017 Pixar # # Licensed under the Apache License, Version 2.0 (the "Apache License") # with the following modification; you may not use this file except in # compliance with the Apache License and the following modification to it: # Section 6. Trademarks. is deleted and replaced with: # ...
[ "unittest.main", "pxr.UsdGeom.Mesh.ValidateTopology", "pxr.Vt.IntArray" ]
[((3048, 3063), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3061, 3063), False, 'import unittest\n'), ((1353, 1375), 'pxr.Vt.IntArray', 'Vt.IntArray', (['[0, 1, 2]'], {}), '([0, 1, 2])\n', (1364, 1375), False, 'from pxr import Usd, UsdGeom, Vt\n'), ((1401, 1420), 'pxr.Vt.IntArray', 'Vt.IntArray', (['[2, 2]'], ...
from parse import parse class Actions: def __init__(self): self.actions = {} self.unused = set() self.used = set() # TODO: Refactor: Deveria ter classe Action, e ela deveria ser retornada nesta funcao. def add_action(self, action_name): action_name = action_name.lower() ...
[ "parse.parse" ]
[((1878, 1909), 'parse.parse', 'parse', (['action_type', 'action_name'], {}), '(action_type, action_name)\n', (1883, 1909), False, 'from parse import parse\n')]
import argparse import json from time import time import os import shutil import numpy as np import torch from datasets.oxford import get_dataloaders from datasets.boreas import get_dataloaders_boreas from datasets.radiate import get_dataloaders_radiate from networks.under_the_radar import UnderTheRadar from networks....
[ "argparse.ArgumentParser", "utils.vis.draw_masked_radar", "utils.vis.draw_src_tgt_matches", "utils.vis.draw_radar", "torch.set_num_threads", "numpy.mean", "datasets.boreas.get_dataloaders_boreas", "torch.device", "datasets.radiate.get_dataloaders_radiate", "torch.no_grad", "os.path.join", "shu...
[((739, 764), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (762, 764), False, 'import argparse\n'), ((2589, 2611), 'utils.vis.draw_radar', 'draw_radar', (['batch'], {'i': '(1)'}), '(batch, i=1)\n', (2599, 2611), False, 'from utils.vis import plot_sequences, draw_radar, draw_mask, draw_masked_...
from django.contrib import admin from .models import * # Register your models here. admin.site.register(Vehicle) admin.site.register(VehicleLogging) admin.site.register(RegisteredUserLogging) admin.site.register(VisitorUserLogging)
[ "django.contrib.admin.site.register" ]
[((84, 112), 'django.contrib.admin.site.register', 'admin.site.register', (['Vehicle'], {}), '(Vehicle)\n', (103, 112), False, 'from django.contrib import admin\n'), ((113, 148), 'django.contrib.admin.site.register', 'admin.site.register', (['VehicleLogging'], {}), '(VehicleLogging)\n', (132, 148), False, 'from django....
#!/usr/bin/env python from distutils.core import setup setup(name='aifin', version='1.0.1', description='Python Distribution Utilities', author='<NAME>', author_email='<EMAIL>', url='aitroopers.com', packages=['aifin'], install_requires=[ 'pandas','scipy' ...
[ "distutils.core.setup" ]
[((57, 274), 'distutils.core.setup', 'setup', ([], {'name': '"""aifin"""', 'version': '"""1.0.1"""', 'description': '"""Python Distribution Utilities"""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'url': '"""aitroopers.com"""', 'packages': "['aifin']", 'install_requires': "['pandas', 'scipy']"}), "(nam...
#!/usr/bin/env python # Copyright 2014 The Swarming Authors. All rights reserved. # Use of this source code is governed by the Apache v2.0 license that can be # found in the LICENSE file. """Smoke test for Cloud Endpoints support in auth component. It launches app via dev_appserver and queries a bunch of cloud endpoi...
[ "unittest.main", "os.path.abspath", "support.local_app.LocalApplication", "os.path.join", "test_env.setup_test_env" ]
[((381, 406), 'test_env.setup_test_env', 'test_env.setup_test_env', ([], {}), '()\n', (404, 406), False, 'import test_env\n'), ((567, 606), 'os.path.join', 'os.path.join', (['THIS_DIR', '"""endpoints_app"""'], {}), "(THIS_DIR, 'endpoints_app')\n", (579, 606), False, 'import os\n'), ((489, 514), 'os.path.abspath', 'os.p...
# Generated by Django 2.0.5 on 2018-05-23 01:23 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('hrs', '0001_initial'), ] operations = [ migrations.AddField( model_name='dept', name='excellent', field=...
[ "django.db.models.CharField", "django.db.models.IntegerField", "django.db.models.BooleanField", "django.db.models.DecimalField" ]
[((320, 371), 'django.db.models.BooleanField', 'models.BooleanField', ([], {'default': '(0)', 'verbose_name': '"""是否优秀"""'}), "(default=0, verbose_name='是否优秀')\n", (339, 371), False, 'from django.db import migrations, models\n'), ((493, 546), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(10)',...
import logging import numpy as np import scipy.sparse from typing import Union from .external import closedform_glm_mean, closedform_glm_scale logger = logging.getLogger("batchglm") def closedform_norm_glm_mean( x: Union[np.ndarray, scipy.sparse.csr_matrix], design_loc: np.ndarray, constrain...
[ "logging.getLogger", "numpy.sqrt" ]
[((154, 183), 'logging.getLogger', 'logging.getLogger', (['"""batchglm"""'], {}), "('batchglm')\n", (171, 183), False, 'import logging\n'), ((1961, 1978), 'numpy.sqrt', 'np.sqrt', (['variance'], {}), '(variance)\n', (1968, 1978), True, 'import numpy as np\n')]
#!/usr/bin/env python # This file is part of dxdiff. # # dxdiff is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # ...
[ "lxml.etree.ElementTree", "lxml.etree.Element" ]
[((2094, 2118), 'lxml.etree.Element', 'etree.Element', (['"""xmldiff"""'], {}), "('xmldiff')\n", (2107, 2118), False, 'from lxml import etree\n'), ((2477, 2500), 'lxml.etree.ElementTree', 'etree.ElementTree', (['tree'], {}), '(tree)\n', (2494, 2500), False, 'from lxml import etree\n'), ((2162, 2216), 'lxml.etree.Elemen...
import logging from time import time from flask import Flask, request PLAIN_HEADER = {'Content-Type': 'text/plain; charset=utf-8'} logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)s %(threadName)s %(message)s') log = logging.getLogger('chatserver') app = Flask(__name__) messages = [] @app.rou...
[ "flask.Flask", "logging.getLogger", "logging.basicConfig", "time.time" ]
[((132, 240), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.DEBUG', 'format': '"""%(asctime)s %(levelname)s %(threadName)s %(message)s"""'}), "(level=logging.DEBUG, format=\n '%(asctime)s %(levelname)s %(threadName)s %(message)s')\n", (151, 240), False, 'import logging\n'), ((242, 273), 'logg...
import ply.yacc as yacc from CoachLex import tokens #enviromental variables enviro_vars = {} def p_statement_assign(p): 'statement : VARINT VAR expression' enviro_vars[p[2]] = p[3] def p_statement_expr(p): 'statement : expression' def p_statement_output(p): 'statement : OUTPUT expression' print(...
[ "ply.yacc.yacc" ]
[((1849, 1860), 'ply.yacc.yacc', 'yacc.yacc', ([], {}), '()\n', (1858, 1860), True, 'import ply.yacc as yacc\n')]
from django.contrib import admin, messages from django.db import transaction from django.db.models import Prefetch from recipe.models import Ingredient, Recipe, RecipeIngredient, RecipeInstance, \ RecipeInstanceImage, Tag admin.site.register(Tag) @admin.register(Ingredient) class IngredientAdmin(admin.ModelAdmi...
[ "recipe.models.Tag.objects.order_by", "recipe.models.RecipeIngredient.objects.filter", "django.contrib.admin.site.register", "django.contrib.admin.register", "recipe.models.Ingredient.objects.filter" ]
[((228, 252), 'django.contrib.admin.site.register', 'admin.site.register', (['Tag'], {}), '(Tag)\n', (247, 252), False, 'from django.contrib import admin, messages\n'), ((256, 282), 'django.contrib.admin.register', 'admin.register', (['Ingredient'], {}), '(Ingredient)\n', (270, 282), False, 'from django.contrib import ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Import a folder (~/people) full of person JSON from Legiscan to the database. """ from django.core.management.base import BaseCommand from general.models import Person from ls_importer.models import LSIDPerson import json import os from tqdm import tqdm class Command(...
[ "ls_importer.models.LSIDPerson.objects.get_or_create", "json.load", "os.path.join", "ls_importer.models.LSIDPerson.objects.get", "general.models.Person.objects.get_or_create", "os.path.expanduser", "os.listdir" ]
[((707, 727), 'json.load', 'json.load', (['json_data'], {}), '(json_data)\n', (716, 727), False, 'import json\n'), ((2258, 2281), 'os.path.expanduser', 'os.path.expanduser', (['"""~"""'], {}), "('~')\n", (2276, 2281), False, 'import os\n'), ((2318, 2346), 'os.listdir', 'os.listdir', (['target_directory'], {}), '(target...
# Copyright (C) 2013 Sony Mobile Communications AB. # All rights, including trade secret rights, reserved. from ave.profile import Profile from ave.handset.profile import HandsetProfile from ave.workspace import WorkspaceProfile from ave.base_workspace import BaseWorkspaceProfile from av...
[ "ave.workspace.WorkspaceProfile", "ave.relay.profile.RelayProfile", "positioning.TestDriveProfile", "ave.handset.profile.HandsetProfile", "ave.profile.Profile.__init__", "beryllium.BerylliumProfile", "powermeter.PowermeterProfile", "wlan.WlanProfile" ]
[((1415, 1445), 'ave.profile.Profile.__init__', 'Profile.__init__', (['self', 'values'], {}), '(self, values)\n', (1431, 1445), False, 'from ave.profile import Profile\n'), ((1762, 1787), 'ave.workspace.WorkspaceProfile', 'WorkspaceProfile', (['profile'], {}), '(profile)\n', (1778, 1787), False, 'from ave.workspace imp...
import time from multiworld.core.image_env import ImageEnv, unormalize_image, normalize_image from rlkit.core import logger import cv2 import numpy as np import os.path as osp from rlkit.samplers.data_collector.scalor_env import WrappedEnvPathCollector as SCALORWrappedEnvPathCollector from rlkit.torch.scalor.scalor i...
[ "numpy.load", "multiworld.register_all_envs", "multiworld.core.image_env.unormalize_image", "os.makedirs", "rlkit.torch.scalor.scalor.SCALOR", "gym.make", "cv2.waitKey", "os.path.exists", "numpy.zeros", "multiworld.core.image_env.normalize_image", "time.time", "multiworld.core.image_env.ImageE...
[((3941, 3966), 'rlkit.core.logger.get_snapshot_dir', 'logger.get_snapshot_dir', ([], {}), '()\n', (3964, 3966), False, 'from rlkit.core import logger\n'), ((3980, 4003), 'rlkit.torch.scalor.scalor.SCALOR', 'SCALOR', ([], {}), '(**scalor_params)\n', (3986, 4003), False, 'from rlkit.torch.scalor.scalor import SCALOR\n')...
import subprocess def is_branch_merged(branch): """ Checks if given branch is merged into current branch. :param branch: Name of branch :return: True/False """ proc = subprocess.Popen(["git", "branch", "--merged"], stdout=subprocess.PIPE) result = proc.stdout.read().decode() return bra...
[ "subprocess.Popen" ]
[((193, 264), 'subprocess.Popen', 'subprocess.Popen', (["['git', 'branch', '--merged']"], {'stdout': 'subprocess.PIPE'}), "(['git', 'branch', '--merged'], stdout=subprocess.PIPE)\n", (209, 264), False, 'import subprocess\n'), ((612, 709), 'subprocess.Popen', 'subprocess.Popen', (["['git', 'show', '%s:%s' % (branch_name...
""" Frames, ticks, titles, and labels ================================= Setting the style of the map frames, ticks, etc, is handled by the ``frame`` argument that all plotting methods of :class:`pygmt.Figure`. """ import pygmt ######################################################################################## #...
[ "pygmt.Figure" ]
[((492, 506), 'pygmt.Figure', 'pygmt.Figure', ([], {}), '()\n', (504, 506), False, 'import pygmt\n'), ((820, 834), 'pygmt.Figure', 'pygmt.Figure', ([], {}), '()\n', (832, 834), False, 'import pygmt\n'), ((1247, 1261), 'pygmt.Figure', 'pygmt.Figure', ([], {}), '()\n', (1259, 1261), False, 'import pygmt\n'), ((1543, 1557...
# Generated by Django 2.0 on 2017-12-29 14:54 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('bot', '0005_auto_20171229_2354'), ] operations = [ migrations.AlterField( model_name='user', name='authority', ...
[ "django.db.models.IntegerField" ]
[((331, 406), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'choices': "[(0, 'Master'), (1, 'Editor'), (2, 'Watcher')]"}), "(choices=[(0, 'Master'), (1, 'Editor'), (2, 'Watcher')])\n", (350, 406), False, 'from django.db import migrations, models\n')]
import perceptron as pc import numpy as np def mnist_load(file, samples): raw_data = np.array(np.genfromtxt(file, delimiter=',', max_rows=samples)) labels = raw_data[:,0] data = np.delete(raw_data, 0, 1)/255.0 return (data, labels) def main(): print("loading data...") samples = 10000 batch...
[ "numpy.delete", "numpy.genfromtxt", "perceptron.network" ]
[((666, 726), 'perceptron.network', 'pc.network', (['structure', 'activation_functions', 'train', 'validate'], {}), '(structure, activation_functions, train, validate)\n', (676, 726), True, 'import perceptron as pc\n'), ((99, 151), 'numpy.genfromtxt', 'np.genfromtxt', (['file'], {'delimiter': '""","""', 'max_rows': 'sa...
import networkx as nx import matplotlib.pyplot as plt import numpy as np from gym import spaces, Env class NXColoringEnv(Env): def __init__(self, generator=nx.barabasi_albert_graph, **kwargs): ''' generator — netwokrx graph generator, kwargs — generator named arguments ''' self.G = generator(**k...
[ "numpy.full", "numpy.isin", "numpy.any", "networkx.spring_layout", "networkx.draw", "gym.spaces.Box", "numpy.unique" ]
[((342, 383), 'networkx.spring_layout', 'nx.spring_layout', (['self.G'], {'iterations': '(1000)'}), '(self.G, iterations=1000)\n', (358, 383), True, 'import networkx as nx\n'), ((539, 609), 'gym.spaces.Box', 'spaces.Box', ([], {'low': '(0)', 'high': '(self.n - 1)', 'shape': '(self.n, 2)', 'dtype': 'np.uint32'}), '(low=...
import os from backend.corpora.common.utils.secret_config import SecretConfig class WmgConfig(SecretConfig): def __init__(self, *args, **kwargs): super().__init__("backend", secret_name="wmg_config", **kwargs) # TODO: promote this impl to parent class, if new behavior works universally def __get...
[ "os.getenv" ]
[((834, 871), 'os.getenv', 'os.getenv', (['"""DEPLOYMENT_STAGE"""', '"""test"""'], {}), "('DEPLOYMENT_STAGE', 'test')\n", (843, 871), False, 'import os\n')]
"""Test my quick sort algorithm tests.""" from quick_sort import quick_sort, _quicksort import pytest from random import randint @pytest.fixture(scope='function') def list_ten(): """Make a list of 10 vals.""" return [x for x in range(10)] @pytest.fixture(scope='function') def rand_ten(): """Make a rando...
[ "quick_sort.quick_sort", "random.randint", "pytest.fixture", "pytest.raises", "quick_sort._quicksort" ]
[((132, 164), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""function"""'}), "(scope='function')\n", (146, 164), False, 'import pytest\n'), ((252, 284), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""function"""'}), "(scope='function')\n", (266, 284), False, 'import pytest\n'), ((396, 428), 'pytest.fixt...
import numpy as np # Note: please don't import any new package. You should solve this problem using only the package(s) above. #------------------------------------------------------------------------- ''' Problem 1: Multi-Armed Bandit Problem (15 points) In this problem, you will implement the epsilon-greedy ...
[ "numpy.random.randint", "numpy.random.random" ]
[((5139, 5162), 'numpy.random.randint', 'np.random.randint', (['(0)', 'c'], {}), '(0, c)\n', (5156, 5162), True, 'import numpy as np\n'), ((9556, 9574), 'numpy.random.random', 'np.random.random', ([], {}), '()\n', (9572, 9574), True, 'import numpy as np\n')]
"""Photometer These functions handle data files from spectrophotometers for easy and direct import The functions are: * uprtek_import_spectrum - Imports the spectrum from a UPRtek spectrophotometer * uprtek_import_r_vals - Imports the R values generated by a UPRtek spectrophotometer * uprtek_file_import ...
[ "csv.reader", "itertools.islice" ]
[((2273, 2308), 'csv.reader', 'csv.reader', (['csvFile'], {'delimiter': '"""\t"""'}), "(csvFile, delimiter='\\t')\n", (2283, 2308), False, 'import csv\n'), ((2957, 2998), 'itertools.islice', 'itertools.islice', (['reader', 'spd_start', 'None'], {}), '(reader, spd_start, None)\n', (2973, 2998), False, 'import itertools\...
import getopt import os import sys # Help message to show def help_message(): print("usage: minij [OPTIONS] [FILE]\n") print("OPTIONS:") print(" -h, --help Show help for the command") print(" -o, --output Specify the output file") # Try to get all the values passed to the program def parse...
[ "getopt.getopt", "os.path.basename", "os.path.isdir", "os.path.isfile", "sys.exit" ]
[((421, 460), 'getopt.getopt', 'getopt.getopt', (['args_list', 'shorts', 'longs'], {}), '(args_list, shorts, longs)\n', (434, 460), False, 'import getopt\n'), ((1222, 1233), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (1230, 1233), False, 'import sys\n'), ((1550, 1583), 'os.path.isfile', 'os.path.isfile', (["(outpu...
import unittest import pyperclip from module_contact import Contact class TestContact(unittest.TestCase): def setUp(self): self.new_contact = Contact("James","Muriuki","0712345678","<EMAIL>") def test_init(self): self.assertEqual(self.new_contact.first_name,"James") self.assertEqual(self...
[ "unittest.main", "module_contact.Contact.copy_email", "module_contact.Contact.display_contacts", "pyperclip.paste", "module_contact.Contact.find_by_number", "module_contact.Contact", "module_contact.Contact.contact_exist" ]
[((2113, 2128), 'unittest.main', 'unittest.main', ([], {}), '()\n', (2126, 2128), False, 'import unittest\n'), ((154, 206), 'module_contact.Contact', 'Contact', (['"""James"""', '"""Muriuki"""', '"""0712345678"""', '"""<EMAIL>"""'], {}), "('James', 'Muriuki', '0712345678', '<EMAIL>')\n", (161, 206), False, 'from module...
import unittest import struct from igvjs import app class TestIGV(unittest.TestCase): def setUp(self): app.config['TESTING'] = True app.config['ALLOWED_EMAILS'] = 'test_emails.txt' app.config['USES_OAUTH'] = True app.config['PUBLIC_DIR'] = None self.app = app.test_client() ...
[ "unittest.main", "igvjs.app.test_client", "struct.unpack" ]
[((1661, 1676), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1674, 1676), False, 'import unittest\n'), ((301, 318), 'igvjs.app.test_client', 'app.test_client', ([], {}), '()\n', (316, 318), False, 'from igvjs import app\n'), ((1535, 1571), 'struct.unpack', 'struct.unpack', (['"""b"""', 'response.data[i]'], {}),...
from urllib.request import urlopen from io import BytesIO import time import tkinter as tk from PIL import Image, ImageTk import json from rmq import RMQiface urls = [ 'https://cdn.revjet.com/s3/csp/1578955925683/shine.png', 'https://cdn.revjet.com/s3/csp/1578955925683/logo.svg', 'https://tpc.googlesyndi...
[ "tkinter.Tk.__init__", "PIL.ImageTk.PhotoImage", "json.load", "urllib.request.urlopen", "tkinter.Toplevel.__init__", "PIL.Image.open", "time.sleep", "rmq.RMQiface", "tkinter.Label" ]
[((903, 923), 'tkinter.Tk.__init__', 'tk.Tk.__init__', (['self'], {}), '(self)\n', (917, 923), True, 'import tkinter as tk\n'), ((1263, 1306), 'tkinter.Toplevel.__init__', 'tk.Toplevel.__init__', (['self', '*args'], {}), '(self, *args, **kwargs)\n', (1283, 1306), True, 'import tkinter as tk\n'), ((1557, 1588), 'rmq.RMQ...
from django.contrib.auth.models import User from django.core.exceptions import ValidationError from django.core.urlresolvers import reverse from django.db import models from django.template.defaultfilters import slugify from django.utils.html import escape from django.db import transaction from sy...
[ "django.db.models.TextField", "django.core.exceptions.ValidationError", "django.db.models.ForeignKey", "django.db.models.DateField", "django.db.transaction.atomic", "django.contrib.auth.models.User.objects.get", "django.db.models.BooleanField", "sysrev.api.PubMed.get_ids_from_query", "sysrev.api.Pub...
[((488, 516), 'django.db.models.ManyToManyField', 'models.ManyToManyField', (['User'], {}), '(User)\n', (510, 516), False, 'from django.db import models\n'), ((542, 588), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(128)', 'unique': '(False)'}), '(max_length=128, unique=False)\n', (558, 588),...
import sys import bpy if __name__ == "__main__": args = sys.argv[sys.argv.index('--'):] print(args) bpy.ops.import_scene.gltf(filepath=args[1]) obj = bpy.context.active_object mod = obj.modifiers.new("CorrectiveSmooth", 'CORRECTIVE_SMOOTH') mod.factor = 0.1 mod.scale = 1.5 bpy.ops.obj...
[ "bpy.ops.export_scene.gltf", "sys.argv.index", "bpy.ops.import_scene.gltf", "bpy.ops.object.modifier_apply" ]
[((114, 157), 'bpy.ops.import_scene.gltf', 'bpy.ops.import_scene.gltf', ([], {'filepath': 'args[1]'}), '(filepath=args[1])\n', (139, 157), False, 'import bpy\n'), ((309, 367), 'bpy.ops.object.modifier_apply', 'bpy.ops.object.modifier_apply', ([], {'modifier': '"""CorrectiveSmooth"""'}), "(modifier='CorrectiveSmooth')\n...
import os import sys import xml.etree.ElementTree as ET from pyproj import Proj,Transformer def createSCANeRMDL(fileName,type): #Creation du fichier MDL templateFileName = "template/template_"+type+".mdl" templateFile = open(templateFileName, "r") template= templateFile.read() content = template...
[ "xml.etree.ElementTree.parse", "os.mkdir", "pyproj.Transformer.from_proj", "os.path.basename", "pyproj.Proj", "os.path.splitext" ]
[((2777, 2812), 'pyproj.Proj', 'Proj', ([], {'proj': '"""latlong"""', 'datum': '"""WGS84"""'}), "(proj='latlong', datum='WGS84')\n", (2781, 2812), False, 'from pyproj import Proj, Transformer\n'), ((2822, 2919), 'pyproj.Proj', 'Proj', ([], {'init': '"""epsg:28992"""', 'towgs84': '"""565.417,50.3319,465.552,-0.398957,0....
from django.contrib.auth.mixins import LoginRequiredMixin from django import http class LoginRequiredJSONMixin(LoginRequiredMixin): """Verify that the current user is authenticated.""" def handle_no_permission(self): return http.JsonResponse({'code': 400, 'errmsg': '用户未登录'})
[ "django.http.JsonResponse" ]
[((242, 293), 'django.http.JsonResponse', 'http.JsonResponse', (["{'code': 400, 'errmsg': '用户未登录'}"], {}), "({'code': 400, 'errmsg': '用户未登录'})\n", (259, 293), False, 'from django import http\n')]
""" This file is part of the TheLMA (THe Laboratory Management Application) project. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. Worklist series member mapper. """ from sqlalchemy.orm import mapper from sqlalchemy.orm import relationship from thelma.entities.liquidtransfer import Plan...
[ "sqlalchemy.orm.relationship" ]
[((726, 816), 'sqlalchemy.orm.relationship', 'relationship', (['WorklistSeries'], {'uselist': '(False)', 'back_populates': '"""worklist_series_members"""'}), "(WorklistSeries, uselist=False, back_populates=\n 'worklist_series_members')\n", (738, 816), False, 'from sqlalchemy.orm import relationship\n'), ((898, 1048)...
import logging import subprocess from os import path, remove, rename import tempfile from textwrap import dedent __all__ = ['call_astrometry', 'add_astrometry'] logger = logging.getLogger(__name__) def call_astrometry(filename, sextractor=False, custom_sextractor_config=False, feder_settings=Tru...
[ "textwrap.dedent", "os.remove", "subprocess.check_output", "os.rename", "tempfile.mkdtemp", "os.path.splitext", "os.path.join", "logging.getLogger" ]
[((172, 199), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (189, 199), False, 'import logging\n'), ((7954, 7977), 'os.path.splitext', 'path.splitext', (['filename'], {}), '(filename)\n', (7967, 7977), False, 'from os import path, remove, rename\n'), ((3765, 3783), 'tempfile.mkdtemp', 't...
import scipy.io import numpy as np import os import random import json import pdb def check_image_voxel_match(cls): root = os.path.abspath('.') out_dir = os.path.join(root, '../output', cls) # out_dir = '/Users/heqian/Research/projects/primitive-based_3d/data/all_classes/chair' voxel_txt_dir = os.path...
[ "os.path.abspath", "os.makedirs", "os.path.exists", "random.random", "numpy.array", "os.path.join" ]
[((129, 149), 'os.path.abspath', 'os.path.abspath', (['"""."""'], {}), "('.')\n", (144, 149), False, 'import os\n'), ((164, 200), 'os.path.join', 'os.path.join', (['root', '"""../output"""', 'cls'], {}), "(root, '../output', cls)\n", (176, 200), False, 'import os\n'), ((313, 346), 'os.path.join', 'os.path.join', (['out...
import logging from types import TracebackType from typing import Callable, Dict, List, Optional, Type, TypeVar import aiohttp from yarl import URL from poe_client.rate_limiter import RateLimiter from poe_client.schemas.account import Account, Realm from poe_client.schemas.character import Character from poe_client.s...
[ "poe_client.rate_limiter.RateLimiter", "aiohttp.ClientSession", "logging.info", "typing.TypeVar", "yarl.URL" ]
[((559, 575), 'typing.TypeVar', 'TypeVar', (['"""Model"""'], {}), "('Model')\n", (566, 575), False, 'from typing import Callable, Dict, List, Optional, Type, TypeVar\n'), ((744, 778), 'yarl.URL', 'URL', (['"""https://api.pathofexile.com"""'], {}), "('https://api.pathofexile.com')\n", (747, 778), False, 'from yarl impor...
#Exercícios Numpy-15 #******************* import numpy as np arr=np.ones((10,10)) arr[1:-1,1:-1]=0 print(arr) print() arr_zero=np.zeros((8,8)) arr_zero=np.pad(arr_zero,pad_width=1,mode='constant',constant_values=1) print(arr_zero)
[ "numpy.pad", "numpy.zeros", "numpy.ones" ]
[((67, 84), 'numpy.ones', 'np.ones', (['(10, 10)'], {}), '((10, 10))\n', (74, 84), True, 'import numpy as np\n'), ((132, 148), 'numpy.zeros', 'np.zeros', (['(8, 8)'], {}), '((8, 8))\n', (140, 148), True, 'import numpy as np\n'), ((158, 223), 'numpy.pad', 'np.pad', (['arr_zero'], {'pad_width': '(1)', 'mode': '"""constan...
import numpy as np class AccelerationSensor: def __init__(self, measurement_covariance): self.R_meas = measurement_covariance def getMeasurements(self, true_accel): return np.random.multivariate_normal(true_accel, self.R_meas)
[ "numpy.random.multivariate_normal" ]
[((192, 246), 'numpy.random.multivariate_normal', 'np.random.multivariate_normal', (['true_accel', 'self.R_meas'], {}), '(true_accel, self.R_meas)\n', (221, 246), True, 'import numpy as np\n')]
import json import math from django.core.serializers import serialize from django.db.models.query import QuerySet ALLOWED_FORMATS = [ 'dict', 'json', 'queryset' ] class Pagination: def __init__( self, page=1, pages=1, queryset=QuerySet(), ...
[ "django.db.models.query.QuerySet", "json.loads", "math.ceil", "django.core.serializers.serialize", "json.dumps" ]
[((297, 307), 'django.db.models.query.QuerySet', 'QuerySet', ([], {}), '()\n', (305, 307), False, 'from django.db.models.query import QuerySet\n'), ((1192, 1213), 'json.dumps', 'json.dumps', (['self.dict'], {}), '(self.dict)\n', (1202, 1213), False, 'import json\n'), ((1273, 1300), 'django.core.serializers.serialize', ...
# # This file is part of PKPDApp (https://github.com/pkpdapp-team/pkpdapp) which # is released under the BSD 3-clause license. See accompanying LICENSE.md for # copyright notice and full license details. # """ WSGI config for pkpdapp project. It exposes the WSGI callable as a module-level variable named ``application...
[ "django.core.wsgi.get_wsgi_application", "os.environ.setdefault" ]
[((492, 559), 'os.environ.setdefault', 'os.environ.setdefault', (['"""DJANGO_SETTINGS_MODULE"""', '"""pkpdapp.settings"""'], {}), "('DJANGO_SETTINGS_MODULE', 'pkpdapp.settings')\n", (513, 559), False, 'import os\n'), ((575, 597), 'django.core.wsgi.get_wsgi_application', 'get_wsgi_application', ([], {}), '()\n', (595, 5...
import inspect import six import yaml from . import view SPECIAL_KWARGS_KEYS = {'id', 'cols', 'updater'} _init_cache = {} class ParserContext(object): def __init__(self, inputs): self.inputs = inputs or {} class Parser(object): def __init__(self, registry): self.registry = registry ...
[ "yaml.load" ]
[((6214, 6228), 'yaml.load', 'yaml.load', (['obj'], {}), '(obj)\n', (6223, 6228), False, 'import yaml\n')]
from users.models import Model def init_models(license): Model.load_on_migrate(license) print("models worked!!")
[ "users.models.Model.load_on_migrate" ]
[((63, 93), 'users.models.Model.load_on_migrate', 'Model.load_on_migrate', (['license'], {}), '(license)\n', (84, 93), False, 'from users.models import Model\n')]
import os import logging from contextlib import contextmanager from sqlite3 import dbapi2 as sqlite from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from sqlalchemy import Column, String, Integer, Sequence from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.dialects.sqlit...
[ "sqlalchemy.String", "sqlalchemy.ext.declarative.declarative_base", "sqlalchemy.Column", "sqlalchemy.create_engine", "sqlalchemy.orm.sessionmaker", "datetime.datetime.now", "logging.getLogger", "sqlalchemy.Sequence" ]
[((461, 484), 'logging.getLogger', 'logging.getLogger', (['"""db"""'], {}), "('db')\n", (478, 484), False, 'import logging\n'), ((494, 608), 'sqlalchemy.create_engine', 'create_engine', (['"""sqlite+pysqlite:///pubmed.db"""'], {'execution_options': "{'sqlite_raw_colnames': True}", 'module': 'sqlite'}), "('sqlite+pysqli...
#!/usr/bin/env python # coding: utf-8 # # Loan Classification Project # In[1]: # Libraries we need import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from sklearn.preprocessing import StandardScaler from sklearn.model_selection import train_test_split from sklearn.discri...
[ "sklearn.model_selection.GridSearchCV", "seaborn.heatmap", "pandas.read_csv", "sklearn.model_selection.train_test_split", "shap.plots.heatmap", "sklearn.tree.DecisionTreeClassifier", "sklearn.metrics.classification_report", "matplotlib.pyplot.figure", "numpy.arange", "sklearn.tree.plot_tree", "p...
[((919, 945), 'pandas.read_csv', 'pd.read_csv', (['"""Dataset.csv"""'], {}), "('Dataset.csv')\n", (930, 945), True, 'import pandas as pd\n'), ((1153, 1180), 'matplotlib.pyplot.hist', 'plt.hist', (["df['BAD']"], {'bins': '(3)'}), "(df['BAD'], bins=3)\n", (1161, 1180), True, 'import matplotlib.pyplot as plt\n'), ((1181, ...
from random import randint, choice, shuffle """gerador de senha simples ele basicamente pega todo tipo de caractere digitado pelo usuário e depois de cada um deles é colocado um número de 1 a 10 e mais um símbolo""" letras = list() senha = list() chave = input('Digite a base da sua senha: ') while len(chave) >...
[ "random.shuffle", "random.choice", "random.randint" ]
[((592, 606), 'random.shuffle', 'shuffle', (['senha'], {}), '(senha)\n', (599, 606), False, 'from random import randint, choice, shuffle\n'), ((704, 718), 'random.randint', 'randint', (['(0)', '(10)'], {}), '(0, 10)\n', (711, 718), False, 'from random import randint, choice, shuffle\n'), ((761, 779), 'random.choice', '...
from sys import * from matplotlib_venn import venn3, venn3_circles from matplotlib import pyplot as plt s1 = set(open('wd-inst-of-prot', 'r').readlines()) s2 = set(open('wd-subc-of-prot', 'r').readlines()) s3 = set(open('wd-refseqp', 'r').readlines()) #s4 = set(open('t4', 'r').readlines()) venn3([s3,s2,s1], ('RefSeq',...
[ "matplotlib_venn.venn3_circles", "matplotlib_venn.venn3", "matplotlib.pyplot.show" ]
[((292, 350), 'matplotlib_venn.venn3', 'venn3', (['[s3, s2, s1]', "('RefSeq', 'subc', 'inst of protein')"], {}), "([s3, s2, s1], ('RefSeq', 'subc', 'inst of protein'))\n", (297, 350), False, 'from matplotlib_venn import venn3, venn3_circles\n'), ((353, 380), 'matplotlib_venn.venn3_circles', 'venn3_circles', (['[s3, s2,...
import datetime from floodsystem.datafetcher import fetch_measure_levels from floodsystem.stationdata import build_station_list from floodsystem.plot import plot_water_levels, plot_water_level_with_fit stations = build_station_list() import numpy as np def test_polt_water_level_with_fit(): x = np.linspace(1, 100...
[ "floodsystem.stationdata.build_station_list", "numpy.poly1d", "numpy.linspace", "numpy.polyfit" ]
[((214, 234), 'floodsystem.stationdata.build_station_list', 'build_station_list', ([], {}), '()\n', (232, 234), False, 'from floodsystem.stationdata import build_station_list\n'), ((302, 330), 'numpy.linspace', 'np.linspace', (['(1)', '(1000)', '(100000)'], {}), '(1, 1000, 100000)\n', (313, 330), True, 'import numpy as...
from CSIKit.csi import CSIFrame import ast import numpy as np class ESP32CSIFrame(CSIFrame): # https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/network/esp_wifi.html#_CPPv418wifi_pkt_rx_ctrl_t __slots__ = ["type", "role", "mac", "rssi", "rate", "sig_mode", "mcs", "bandwidth", "smoot...
[ "ast.literal_eval", "numpy.array" ]
[((1808, 1838), 'ast.literal_eval', 'ast.literal_eval', (['array_string'], {}), '(array_string)\n', (1824, 1838), False, 'import ast\n'), ((2125, 2155), 'numpy.array', 'np.array', (['array_string_asarray'], {}), '(array_string_asarray)\n', (2133, 2155), True, 'import numpy as np\n')]
from tensorflow_trees.encoder import Encoder, EncoderCellsBuilder from tensorflow_trees.decoder import Decoder, DecoderCellsBuilder from examples.simple_expression.exp_definition import BinaryExpressionTreeGen, NaryExpressionTreeGen from tensorflow_trees.definition import Tree from examples.simple_expression.flags_def...
[ "tensorflow.contrib.summary.scalar", "tensorflow_trees.decoder.DecoderCellsBuilder.simple_distrib_cell_builder", "tensorflow.gfile.Exists", "examples.simple_expression.exp_definition.NaryExpressionTreeGen", "os.path.join", "tensorflow.clip_by_global_norm", "tensorflow_trees.decoder.DecoderCellsBuilder.s...
[((581, 613), 'tensorflow.gfile.Exists', 'tf.gfile.Exists', (['FLAGS.model_dir'], {}), '(FLAGS.model_dir)\n', (596, 613), True, 'import tensorflow as tf\n'), ((979, 1037), 'tensorflow.contrib.summary.create_file_writer', 'tfs.create_file_writer', (['FLAGS.model_dir'], {'flush_millis': '(1000)'}), '(FLAGS.model_dir, flu...
import random from random import randint class State(): def __init__(self): self.dictionary = {} #{(row, col): (pieceIMG, brightness)} def addDrop(self, width, top): screenTop = top - 1 screenLeft = -width // 2 screenRight = width // 2 column = random.randint(screenLef...
[ "random.randint" ]
[((296, 335), 'random.randint', 'random.randint', (['screenLeft', 'screenRight'], {}), '(screenLeft, screenRight)\n', (310, 335), False, 'import random\n'), ((831, 844), 'random.randint', 'randint', (['(0)', '(4)'], {}), '(0, 4)\n', (838, 844), False, 'from random import randint\n'), ((792, 824), 'random.randint', 'ran...
import logging import sys import traceback from flask import Flask, jsonify def create_app(script_info=None): # instantiate the app app = Flask( __name__, template_folder='../templates' ) # set config app.logger.setLevel(logging.INFO) from src.controller import excel_service app...
[ "traceback.print_exc", "flask.jsonify", "flask.Flask", "traceback.format_exc" ]
[((149, 196), 'flask.Flask', 'Flask', (['__name__'], {'template_folder': '"""../templates"""'}), "(__name__, template_folder='../templates')\n", (154, 196), False, 'from flask import Flask, jsonify\n'), ((441, 454), 'flask.jsonify', 'jsonify', (['"""ok"""'], {}), "('ok')\n", (448, 454), False, 'from flask import Flask,...
# -*- coding:utf-8 -*- from typing import Optional, Tuple, List import cv2 import numpy as np import streamlit as st from PIL import Image from utils.model import MODEL_TYPE, draw_bboxes def description(header: str, description: str): """show description Args: header (str): header message d...
[ "streamlit.subheader", "streamlit.markdown", "streamlit.sidebar.slider", "streamlit.image", "cv2.cvtColor", "cv2.imdecode", "streamlit.file_uploader", "streamlit.sidebar.markdown", "streamlit.sidebar.radio", "utils.model.draw_bboxes", "PIL.Image.fromarray" ]
[((367, 387), 'streamlit.subheader', 'st.subheader', (['header'], {}), '(header)\n', (379, 387), True, 'import streamlit as st\n'), ((392, 416), 'streamlit.markdown', 'st.markdown', (['description'], {}), '(description)\n', (403, 416), True, 'import streamlit as st\n'), ((621, 658), 'streamlit.sidebar.markdown', 'st.si...
from urllib import request, error from fake_useragent import UserAgent import re import time def request_(url): try: ua = UserAgent() headers = {'User-Agent': ua.chrome} req = request.Request(url, headers=headers) return request.urlopen(req).read().decode('utf-8') except error ...
[ "urllib.request.Request", "fake_useragent.UserAgent", "urllib.request.urlopen", "time.sleep", "re.search", "re.compile" ]
[((136, 147), 'fake_useragent.UserAgent', 'UserAgent', ([], {}), '()\n', (145, 147), False, 'from fake_useragent import UserAgent\n'), ((206, 243), 'urllib.request.Request', 'request.Request', (['url'], {'headers': 'headers'}), '(url, headers=headers)\n', (221, 243), False, 'from urllib import request, error\n'), ((102...
from datetime import datetime from flask import Flask from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) class MySQLConfig(object): SQLALCHEMY_DATABASE_URI = "mysql://root:mysql@127.0.0.1:3306/toutiao" SQLALCHEMY_TRACK_MODIFICATIONS = False SQLALCHEMY_ECHO = True app.config.from_object(MySQL...
[ "flask_sqlalchemy.SQLAlchemy", "flask.Flask" ]
[((101, 116), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (106, 116), False, 'from flask import Flask\n'), ((347, 362), 'flask_sqlalchemy.SQLAlchemy', 'SQLAlchemy', (['app'], {}), '(app)\n', (357, 362), False, 'from flask_sqlalchemy import SQLAlchemy\n')]
# Generated by Django 4.0.1 on 2022-01-22 15:53 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('app', '0014_alter_list_users'), ] operations = [ migrations.RenameField( model_name='list', old_name='users', ne...
[ "django.db.migrations.RenameField" ]
[((221, 297), 'django.db.migrations.RenameField', 'migrations.RenameField', ([], {'model_name': '"""list"""', 'old_name': '"""users"""', 'new_name': '"""user"""'}), "(model_name='list', old_name='users', new_name='user')\n", (243, 297), False, 'from django.db import migrations\n')]
####################################################= ###################CE_TOOLS TEST#################### ####################################################= # A functional tester for the famous Corn Engine Utillity "CE_tools.py" # This can also be used as a template on how to make a tester correctly import ce_...
[ "ce_tools.RequestHello", "ce_tools.debugFound", "ce_tools.randomNum", "ce_tools.systemc.startfile", "ce_tools.systemc.system", "ce_tools.rollADice" ]
[((371, 429), 'ce_tools.systemc.system', 'systemc.system', (["('cls' if systemc.name == 'nt' else 'clear')"], {}), "('cls' if systemc.name == 'nt' else 'clear')\n", (385, 429), False, 'from ce_tools import debugFound, systemc\n'), ((646, 678), 'ce_tools.systemc.startfile', 'systemc.startfile', (['ce_tools.help'], {}), ...
# # Copyright 2016 Sotera Defense Solutions 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 ag...
[ "re.search", "subprocess.call", "os.system", "os.path.exists" ]
[((772, 824), 'os.system', 'os.system', (["('cat ' + v + '/part-* > ' + v + '/output')"], {}), "('cat ' + v + '/part-* > ' + v + '/output')\n", (781, 824), False, 'import os\n'), ((1211, 1318), 'subprocess.call', 'call', (["('hadoop fs -mkdir /tmp/trackcomms/' + table + '/output/graphx/comm_1')"], {'stdout': 'garbage',...
from healthvaultlib.tests.testbase import TestBase from healthvaultlib.methods.getservicedefinition import GetServiceDefinition class TestGetServiceDefinition(TestBase): def test_getservicedefinition(self): method = GetServiceDefinition(['platform', 'shell', 'topology', ...
[ "healthvaultlib.methods.getservicedefinition.GetServiceDefinition" ]
[((234, 336), 'healthvaultlib.methods.getservicedefinition.GetServiceDefinition', 'GetServiceDefinition', (["['platform', 'shell', 'topology', 'xml-over-http-methods', 'meaningful-use']"], {}), "(['platform', 'shell', 'topology',\n 'xml-over-http-methods', 'meaningful-use'])\n", (254, 336), False, 'from healthvaultl...
#|==============================================================|# # Made by IntSPstudio # Project Visual Street # ID: 980004006 # Twitter: @IntSPstudio #|==============================================================|# #SYSTEM import os import sys #import time import turtle import math #ALG #Ympyrän kehän koko def c...
[ "turtle.Screen", "os.system", "turtle.Turtle" ]
[((540, 555), 'turtle.Screen', 'turtle.Screen', ([], {}), '()\n', (553, 555), False, 'import turtle\n'), ((603, 618), 'turtle.Turtle', 'turtle.Turtle', ([], {}), '()\n', (616, 618), False, 'import turtle\n'), ((1039, 1055), 'os.system', 'os.system', (['"""cls"""'], {}), "('cls')\n", (1048, 1055), False, 'import os\n'),...
import re # initial data input infilename = "./day4.txt" # required fields for checking required = {"byr", "iyr", "eyr", "hgt", "hcl", "ecl", "pid"} def readfile(): with open(infilename, "rt", encoding="utf-8") as file: inlist = [line.strip() for line in file] return inlist def parse_input(inlist=...
[ "re.search", "re.compile" ]
[((3329, 3356), 're.compile', 're.compile', (['"""(\\\\d+)(cm|in)"""'], {}), "('(\\\\d+)(cm|in)')\n", (3339, 3356), False, 'import re\n'), ((3391, 3410), 're.search', 're.search', (['pat', 'txt'], {}), '(pat, txt)\n', (3400, 3410), False, 'import re\n'), ((3784, 3810), 're.compile', 're.compile', (['"""#[a-f0-9]{6}"""'...
#!/usr/bin/env python debug = True # enable trace def trace(x): global debug if debug: print(x) trace("loading...") from itertools import combinations, combinations_with_replacement from glob import glob from math import * import operator from os.path import basename import matplotlib.pyplot as plt import numpy as...
[ "pandas.DataFrame", "numpy.abs", "numpy.arctan2", "datetime.datetime.today", "os.path.basename", "pandas.read_csv", "numpy.sin", "numpy.cos", "glob.glob", "numpy.sqrt" ]
[((1147, 1161), 'numpy.abs', 'np.abs', (['(fX - Y)'], {}), '(fX - Y)\n', (1153, 1161), True, 'import numpy as np\n'), ((1475, 1520), 'pandas.read_csv', 'pd.read_csv', (['path'], {'sep': '""" """', 'names': 'sample_cols'}), "(path, sep=' ', names=sample_cols)\n", (1486, 1520), True, 'import pandas as pd\n'), ((2149, 218...
from django.urls import path from blog import views from blog.views import ( PostListView, PostDetailView, PostCreateView, PostUpdateView, PostDeleteView, CommentDeleteView, UserPostListView, LikeView, ) urlpatterns = [ path('', PostListView.as_view(), name='index'), path('post/...
[ "blog.views.PostListView.as_view", "blog.views.PostUpdateView.as_view", "blog.views.CommentDeleteView.as_view", "django.urls.path", "blog.views.PostDeleteView.as_view", "blog.views.UserPostListView.as_view", "blog.views.PostCreateView.as_view", "blog.views.PostDetailView.as_view" ]
[((819, 874), 'django.urls.path', 'path', (['"""post/<int:pk>/like/"""', 'LikeView'], {'name': '"""like-post"""'}), "('post/<int:pk>/like/', LikeView, name='like-post')\n", (823, 874), False, 'from django.urls import path\n'), ((266, 288), 'blog.views.PostListView.as_view', 'PostListView.as_view', ([], {}), '()\n', (28...
# Generated by Django 3.0.6 on 2020-06-07 12:47 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('travello', '0003_travel_history2'), ] operations = [ migrations.RenameField( model_name='medical_history', old...
[ "django.db.migrations.RenameField" ]
[((237, 339), 'django.db.migrations.RenameField', 'migrations.RenameField', ([], {'model_name': '"""medical_history"""', 'old_name': '"""Bronchitis"""', 'new_name': '"""bronchitis"""'}), "(model_name='medical_history', old_name='Bronchitis',\n new_name='bronchitis')\n", (259, 339), False, 'from django.db import migr...
def run(name, fields="+l", exclude=None, ctags="/usr/local/bin/ctags", creates='tags'): from os.path import join if fields is None: fields = [] elif isinstance(fields, str): fields = [fields] fields = " --fields=".join([""] + fields) if exclude is None: exclude = [] ...
[ "os.path.join" ]
[((651, 670), 'os.path.join', 'join', (['name', 'creates'], {}), '(name, creates)\n', (655, 670), False, 'from os.path import join\n')]
# MIT License # # (C) Copyright [2020] Hewlett Packard Enterprise Development LP # # 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 righ...
[ "setuptools.setup" ]
[((1281, 1552), 'setuptools.setup', 'setup', ([], {'name': '"""manifestgen"""', 'description': '"""Loftsman manifest generator"""', 'packages': "['manifestgen']", 'include_package_data': '(True)', 'install_requires': '[REQUIREMENTS]', 'entry_points': '"""\n [console_scripts]\n manifestgen=manifestgen.gene...
"""An example application to demonstrate Dynamic Routing""" from flask import Flask app = Flask(__name__) @app.route("/") def home(): """"View for the Home page of the Website""" return "Welcome to the HomePage!" @app.route('/square/<int:number>') def show_square(number): """View that shows the...
[ "flask.Flask" ]
[((92, 107), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (97, 107), False, 'from flask import Flask\n')]
try: import discord except ImportError: raise Exception(''' The discord libary must be installed manually: pip install https://github.com/Rapptz/discord.py/archive/rewrite.zip ''') import logging, asyncio, json, aiohttp from dateutil.parser import parse from datetime import datetime from...
[ "logging.exception", "dateutil.parser.parse", "logitch.logger.set_logger", "json.dumps", "aiohttp.ClientSession", "datetime.datetime.utcnow", "logitch.config_load", "logitch.db.Db" ]
[((3442, 3455), 'logitch.config_load', 'config_load', ([], {}), '()\n', (3453, 3455), False, 'from logitch import config_load, logger\n'), ((3464, 3496), 'logitch.logger.set_logger', 'logger.set_logger', (['"""discord.log"""'], {}), "('discord.log')\n", (3481, 3496), False, 'from logitch import config_load, logger\n'),...
''' Normalize shapenet obj files to [-0.5, 0.5]^3. author: ynie date: Jan, 2020 ''' import sys sys.path.append('.') from data_config import shape_scale_padding, \ shapenet_path, shapenet_normalized_path import os from multiprocessing import Pool from tools.utils import append_dir, normalize_obj_file from tools.rea...
[ "sys.path.append", "os.mkdir", "os.path.abspath", "os.remove", "os.path.join", "os.path.dirname", "os.walk", "os.path.exists", "tools.read_and_write.write_json", "tools.utils.normalize_obj_file", "multiprocessing.Pool", "os.symlink", "tools.read_and_write.load_data_path" ]
[((96, 116), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (111, 116), False, 'import sys\n'), ((578, 605), 'os.path.abspath', 'os.path.abspath', (['input_path'], {}), '(input_path)\n', (593, 605), False, 'import os\n'), ((624, 652), 'os.path.abspath', 'os.path.abspath', (['output_path'], {}), '(o...
from django.conf.urls import include, url from django.contrib import admin from django.views.generic import TemplateView from rsvps.views import GuestRsvpView urlpatterns = [ url(r'^$', TemplateView.as_view(template_name="home.html"), name='home'), url(r'^about/$', TemplateView.as_view(template_name="about.ht...
[ "rsvps.views.GuestRsvpView.as_view", "django.views.generic.TemplateView.as_view", "django.conf.urls.include" ]
[((192, 239), 'django.views.generic.TemplateView.as_view', 'TemplateView.as_view', ([], {'template_name': '"""home.html"""'}), "(template_name='home.html')\n", (212, 239), False, 'from django.views.generic import TemplateView\n'), ((276, 324), 'django.views.generic.TemplateView.as_view', 'TemplateView.as_view', ([], {'...
import toml import random def main(): filename = 'test' n_hidden = 64 mutual_infos = [] for i in range(n_hidden): mutual_infos.append(random.random()) mutual_info_dict = {} for i in range(n_hidden): mutual_info_dict[f'{i:04}'] = mutual_infos[i] with open(f'mutual_info_{fil...
[ "random.random", "toml.dump" ]
[((364, 394), 'toml.dump', 'toml.dump', (['mutual_info_dict', 'f'], {}), '(mutual_info_dict, f)\n', (373, 394), False, 'import toml\n'), ((160, 175), 'random.random', 'random.random', ([], {}), '()\n', (173, 175), False, 'import random\n')]
import random # Pedir ao Jogador para escolher uma letra O ou X def escolhaLetraJogador(): l = "" while l != "O" and l != "X": l = str(input('Escolha a letra que prefere jogar (O ou X): ')).upper() if l == "O": letras = ['O', "X"] else: letras = ['X', "O"] return letras # S...
[ "random.randint" ]
[((376, 396), 'random.randint', 'random.randint', (['(1)', '(2)'], {}), '(1, 2)\n', (390, 396), False, 'import random\n')]
import torch import torch.nn as nn class SeparableConv2D(nn.Module): ''' Definition of Separable Convolution. ''' def __init__(self, in_channels, out_channels, kernel_size, depth_multiplier=1, stride=1, padding=0, dilation=1, bias=True, padding_mode='zeros'): super(SeparableConv2D, self).__ini...
[ "torch.nn.AdaptiveAvgPool2d", "torch.relu", "torch.nn.Conv2d", "torch.nn.BatchNorm2d", "torch.nn.Linear", "torch.nn.MaxPool2d" ]
[((425, 583), 'torch.nn.Conv2d', 'nn.Conv2d', (['in_channels', 'depthwise_conv_out_channels', 'kernel_size', 'stride', 'padding', 'dilation'], {'groups': 'in_channels', 'bias': 'bias', 'padding_mode': 'padding_mode'}), '(in_channels, depthwise_conv_out_channels, kernel_size, stride,\n padding, dilation, groups=in_ch...
import os import torch import constants from utils.misc import get_learning_rate from utils.summary import TensorboardSummary from utils.loss import SegmentationLosses from utils.calculate_weights import calculate_weights_labels from torch.utils.data import DataLoader import numpy as np from utils.metrics import Evalua...
[ "tqdm.tqdm", "torch.utils.data.DataLoader", "utils.loss.SegmentationLosses", "torch.argmax", "utils.metrics.Evaluator", "random.random", "torch.optim.Adam", "torch.no_grad", "os.path.join", "utils.misc.get_learning_rate", "torch.optim.SGD" ]
[((595, 689), 'torch.utils.data.DataLoader', 'DataLoader', (['train_set'], {'batch_size': 'args.batch_size', 'shuffle': '(True)', 'num_workers': 'args.workers'}), '(train_set, batch_size=args.batch_size, shuffle=True, num_workers\n =args.workers)\n', (605, 689), False, 'from torch.utils.data import DataLoader\n'), (...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Created by lhao at 2019-05-17 ''' input: L.reuteri protein sequence output: draft model ''' import os import cobra import My_def import pandas as pd os.chdir('../../ComplementaryData/Step_02_DraftModels/') case = 'other' #'first' or 'other' # %% <build> if case =='...
[ "cobra.io.read_sbml_model", "My_def.model_report.combine_met", "pandas.read_csv", "os.system", "cobra.io.save_json_model", "My_def.model_report.model_report_compare_bigg", "os.chdir" ]
[((203, 259), 'os.chdir', 'os.chdir', (['"""../../ComplementaryData/Step_02_DraftModels/"""'], {}), "('../../ComplementaryData/Step_02_DraftModels/')\n", (211, 259), False, 'import os\n'), ((854, 904), 'cobra.io.read_sbml_model', 'cobra.io.read_sbml_model', (['"""CarveMe/Lreu_ca_gp.xml"""'], {}), "('CarveMe/Lreu_ca_gp....
import torch.nn as nn import torch import numpy as np import cv2 as cv def calculate_EPR(model): #TODO:尝试通过加载预训练权重计算有效感受野 for module in model.modules(): try: nn.init.constant_(module.weight, 0.05) nn.init.zeros_(module.bias) nn.init.zeros_(module.running_mean) nn.init.ones_(module.running_var) except E...
[ "torch.ones", "torch.zeros_like", "cv2.waitKey", "numpy.expand_dims", "torch.nn.init.zeros_", "numpy.max", "numpy.where", "torch.nn.init.constant_", "torch.nn.init.ones_" ]
[((408, 454), 'torch.ones', 'torch.ones', (['(1)', '(3)', '(640)', '(640)'], {'requires_grad': '(True)'}), '(1, 3, 640, 640, requires_grad=True)\n', (418, 454), False, 'import torch\n'), ((1017, 1030), 'cv2.waitKey', 'cv.waitKey', (['(0)'], {}), '(0)\n', (1027, 1030), True, 'import cv2 as cv\n'), ((1837, 1870), 'numpy....