code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import torch import torch.nn as nn class QNetwork(nn.Module): """Actor (Policy) Model using a Single DQN.""" def __init__(self, state_size, action_size, seed): """Initialize parameters and build model. Params ====== state_size (int): Dimension of each state acti...
[ "torch.manual_seed", "torch.nn.ReLU", "torch.nn.Linear" ]
[((469, 492), 'torch.manual_seed', 'torch.manual_seed', (['seed'], {}), '(seed)\n', (486, 492), False, 'import torch\n'), ((1409, 1432), 'torch.manual_seed', 'torch.manual_seed', (['seed'], {}), '(seed)\n', (1426, 1432), False, 'import torch\n'), ((594, 620), 'torch.nn.Linear', 'nn.Linear', (['state_size', '(128)'], {}...
# 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 writing, soft...
[ "fcntl.ioctl", "socket.socket", "os.open", "pox.lib.addresses.EthAddr", "ctypes.c_char_p", "struct.pack", "queue.Queue", "struct.unpack", "pox.lib.addresses.IPAddr", "pox.core.core.callLater", "pox.core.core.add_listener", "ctypes.cast", "pox.lib.pxpcap.PCap", "pox.lib.addresses.parse_cidr...
[((3415, 3432), 'pox.lib.addresses.IPAddr', 'IPAddr', (['"""0.0.0.0"""'], {}), "('0.0.0.0')\n", (3421, 3432), False, 'from pox.lib.addresses import EthAddr, IPAddr\n'), ((3448, 3465), 'pox.lib.addresses.IPAddr', 'IPAddr', (['"""0.0.0.0"""'], {}), "('0.0.0.0')\n", (3454, 3465), False, 'from pox.lib.addresses import EthA...
# 2020 <NAME> and <NAME> import os import json import numpy as np from typing import Set, List from geopy.distance import great_circle from scipy.spatial.ckdtree import cKDTree from shapely.geometry import Polygon, shape, Point from icarus_simulator.sat_core.coordinate_util import geo2cart from icarus_simulator.stra...
[ "scipy.spatial.ckdtree.cKDTree", "os.path.join", "icarus_simulator.sat_core.coordinate_util.geo2cart", "os.path.split", "shapely.geometry.Point", "os.path.dirname", "shapely.geometry.Polygon", "geopy.distance.great_circle", "json.load", "shapely.geometry.shape" ]
[((481, 506), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (496, 506), False, 'import os\n'), ((624, 661), 'os.path.join', 'os.path.join', (['library_dirname', '"""data"""'], {}), "(library_dirname, 'data')\n", (636, 661), False, 'import os\n'), ((684, 748), 'os.path.join', 'os.path.join', ...
# coding: utf-8 """ Grafeas API An API to insert and retrieve annotations on cloud artifacts. # noqa: E501 OpenAPI spec version: v1alpha1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from grafeas.models.deployment_deta...
[ "six.iteritems" ]
[((7594, 7627), 'six.iteritems', 'six.iteritems', (['self.swagger_types'], {}), '(self.swagger_types)\n', (7607, 7627), False, 'import six\n')]
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: stdrickforce (<NAME>) # Email: <<EMAIL>> <<EMAIL>> import cat import time def ignore_exception(func): def wraps(*args, **kwargs): try: return func(*args, **kwargs) except Exception: pass return wraps @ignore_ex...
[ "cat.Transaction", "cat.log_event", "cat.init", "time.sleep", "random.random", "cat.transaction", "time.time" ]
[((329, 359), 'cat.transaction', 'cat.transaction', (['"""Trans"""', '"""T1"""'], {}), "('Trans', 'T1')\n", (344, 359), False, 'import cat\n'), ((1377, 1421), 'cat.init', 'cat.init', (['"""pycat"""'], {'debug': '(True)', 'logview': '(False)'}), "('pycat', debug=True, logview=False)\n", (1385, 1421), False, 'import cat\...
# -*- coding: utf-8 -*- import csv from matplotlib import pyplot as plt from matplotlib.backends.backend_pdf import PdfPages def isValid(p, ep): return p in ep.patterns # CLASS ANALYSER class Analyser: """ Représentation d'un résultat d'analyse """ def __init__(self): """ :para...
[ "csv.DictWriter" ]
[((980, 1041), 'csv.DictWriter', 'csv.DictWriter', (['outfile'], {'delimiter': '""";"""', 'fieldnames': 'fieldnames'}), "(outfile, delimiter=';', fieldnames=fieldnames)\n", (994, 1041), False, 'import csv\n')]
#!/usr/bin/env python3 import sys, os, glob from glbase3 import * all_species = glload('species_annotations/species.glb') newl = [] for file in glob.glob('pep_counts/*.txt'): oh = open(file, 'rt') count = int(oh.readline().split()[0]) oh.close() species_name = os.path.split(file)[1].split('.')[0].l...
[ "glob.glob", "os.path.split" ]
[((148, 177), 'glob.glob', 'glob.glob', (['"""pep_counts/*.txt"""'], {}), "('pep_counts/*.txt')\n", (157, 177), False, 'import sys, os, glob\n'), ((369, 388), 'os.path.split', 'os.path.split', (['file'], {}), '(file)\n', (382, 388), False, 'import sys, os, glob\n'), ((282, 301), 'os.path.split', 'os.path.split', (['fil...
import torch import torch.nn as nn import csv #image quantization def quantization(x): x_quan=torch.round(x*255)/255 return x_quan #picecwise-linear color filter def CF(img, param,pieces): param=param[:,:,None,None] color_curve_sum = torch.sum(param, 4) + 1e-30 total_image = img * 0 f...
[ "csv.DictReader", "torch.Tensor", "torch.round", "torch.sum", "torch.clamp" ]
[((99, 119), 'torch.round', 'torch.round', (['(x * 255)'], {}), '(x * 255)\n', (110, 119), False, 'import torch\n'), ((261, 280), 'torch.sum', 'torch.sum', (['param', '(4)'], {}), '(param, 4)\n', (270, 280), False, 'import torch\n'), ((702, 740), 'csv.DictReader', 'csv.DictReader', (['csvfile'], {'delimiter': '""","""'...
#!/usr/bin/env python # The MIT License (MIT) # Copyright (c) 2014 <NAME> # Technische Universität München (TUM) # Autonomous Navigation for Flying Robots # Homework 2.1 from plot import plot class UserCode: def __init__(self): # initialize data you want to store in this object between calls to the meas...
[ "plot.plot" ]
[((1081, 1124), 'plot.plot', 'plot', (['"""max_roll_angle"""', 'self.max_roll_angle'], {}), "('max_roll_angle', self.max_roll_angle)\n", (1085, 1124), False, 'from plot import plot\n'), ((1133, 1178), 'plot.plot', 'plot', (['"""max_pitch_angle"""', 'self.max_pitch_angle'], {}), "('max_pitch_angle', self.max_pitch_angle...
from configs import args import tensorflow as tf def forward(x, mode): is_training = (mode == tf.estimator.ModeKeys.TRAIN) x = tf.contrib.layers.embed_sequence(x, args.vocab_size, args.embed_dim) x = tf.layers.dropout(x, 0.2, training=is_training) feat_map = [] for k_size in [3, 4, 5]: _...
[ "tensorflow.train.AdamOptimizer", "tensorflow.shape", "tensorflow.estimator.EstimatorSpec", "tensorflow.nn.sparse_softmax_cross_entropy_with_logits", "tensorflow.concat", "tensorflow.argmax", "tensorflow.train.get_global_step", "tensorflow.layers.dropout", "tensorflow.train.exponential_decay", "te...
[((139, 207), 'tensorflow.contrib.layers.embed_sequence', 'tf.contrib.layers.embed_sequence', (['x', 'args.vocab_size', 'args.embed_dim'], {}), '(x, args.vocab_size, args.embed_dim)\n', (171, 207), True, 'import tensorflow as tf\n'), ((216, 263), 'tensorflow.layers.dropout', 'tf.layers.dropout', (['x', '(0.2)'], {'trai...
# -*- python -*- """@file @brief pyserial transport for pato Copyright (c) 2014-2015 <NAME> <<EMAIL>>. All rights reserved. @page License Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code ...
[ "util.protocol.ProtocolException", "serial.Serial" ]
[((2234, 2264), 'serial.Serial', 'serial.Serial', (['*args'], {}), '(*args, **kwargs)\n', (2247, 2264), False, 'import serial\n'), ((2932, 2975), 'util.protocol.ProtocolException', 'ProtocolException', (['"""Failed to send request"""'], {}), "('Failed to send request')\n", (2949, 2975), False, 'from util.protocol impor...
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by <NAME> # Extended by <NAME> # -------------------------------------------------------- import os import cv2 import numpy as np import torch impor...
[ "os.path.exists", "xml.etree.ElementTree.parse", "cv2.flip", "numpy.random.rand", "numpy.where", "os.path.join", "numpy.array", "cv2.imread" ]
[((3434, 3493), 'os.path.join', 'os.path.join', (['self.data_path', '"""Annotations"""', "(index + '.xml')"], {}), "(self.data_path, 'Annotations', index + '.xml')\n", (3446, 3493), False, 'import os\n'), ((3509, 3527), 'xml.etree.ElementTree.parse', 'ET.parse', (['filename'], {}), '(filename)\n', (3517, 3527), True, '...
import discord import random import asyncio import logging import urllib.request from discord.ext import commands bot = commands.Bot(command_prefix='nep ', description= "Nep Nep") counter = 0 countTask = None @bot.event async def on_ready(): print('Logged in as') print(bot.user.name) # print(bot.user.id) ...
[ "discord.ext.commands.Bot", "asyncio.sleep" ]
[((121, 179), 'discord.ext.commands.Bot', 'commands.Bot', ([], {'command_prefix': '"""nep """', 'description': '"""Nep Nep"""'}), "(command_prefix='nep ', description='Nep Nep')\n", (133, 179), False, 'from discord.ext import commands\n'), ((747, 763), 'asyncio.sleep', 'asyncio.sleep', (['(3)'], {}), '(3)\n', (760, 763...
import os import time import argparse import pandas as pd from smf import SessionMF parser = argparse.ArgumentParser() parser.add_argument('--K', type=int, default=20, help="K items to be used in Recall@K and MRR@K") parser.add_argument('--factors', type=int, default=100, help="Number of latent factors.") parser.add_a...
[ "argparse.ArgumentParser", "pandas.read_csv", "os.path.join", "smf.SessionMF", "time.time" ]
[((94, 119), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (117, 119), False, 'import argparse\n'), ((1975, 2022), 'os.path.join', 'os.path.join', (['args.data_folder', 'args.train_data'], {}), '(args.data_folder, args.train_data)\n', (1987, 2022), False, 'import os\n'), ((2033, 2056), 'pandas...
# coding: utf-8 """ App Center Client Microsoft Visual Studio App Center API # noqa: E501 OpenAPI spec version: preview Contact: <EMAIL> Project Repository: https://github.com/b3nab/appcenter-sdks """ import pprint import re # noqa: F401 import six class Device(object): """NOTE: This cl...
[ "six.iteritems" ]
[((23895, 23928), 'six.iteritems', 'six.iteritems', (['self.swagger_types'], {}), '(self.swagger_types)\n', (23908, 23928), False, 'import six\n')]
from django.conf.urls import url from django.contrib.auth import views as auth_views from django.contrib.auth.forms import AuthenticationForm from oscar.core.application import ( DashboardApplication as BaseDashboardApplication) from oscar.core.loading import get_class class DashboardApplication(BaseDashboardApp...
[ "oscar.core.loading.get_class", "django.contrib.auth.views.LoginView.as_view", "django.conf.urls.url", "django.contrib.auth.views.LogoutView.as_view" ]
[((465, 506), 'oscar.core.loading.get_class', 'get_class', (['"""dashboard.views"""', '"""IndexView"""'], {}), "('dashboard.views', 'IndexView')\n", (474, 506), False, 'from oscar.core.loading import get_class\n'), ((525, 574), 'oscar.core.loading.get_class', 'get_class', (['"""dashboard.reports.app"""', '"""applicatio...
import pandas as pd import pickle def read_metric_logs(bucket_type): metrics = pd.DataFrame(columns=['source_type', 'target_type', 'stats']) type_list_path = f'/l/users/shikhar.srivastava/data/pannuke/{bucket_type}/selected_types.csv' type_list = pd.read_csv(type_list_path)['0'] for source_type in t...
[ "pandas.DataFrame", "pickle.load", "pandas.read_csv" ]
[((85, 146), 'pandas.DataFrame', 'pd.DataFrame', ([], {'columns': "['source_type', 'target_type', 'stats']"}), "(columns=['source_type', 'target_type', 'stats'])\n", (97, 146), True, 'import pandas as pd\n'), ((262, 289), 'pandas.read_csv', 'pd.read_csv', (['type_list_path'], {}), '(type_list_path)\n', (273, 289), True...
# Machine Learning Online Class - Exercise 2: Logistic Regression # # Instructions # ------------ # # This file contains code that helps you get started on the logistic # regression exercise. You will need to complete the following functions # in this exericse: # # sigmoid.py # costFunction.py # predic...
[ "numpy.mean", "predict.predict", "numpy.ones", "matplotlib.pyplot.ylabel", "scipy.optimize.fmin_bfgs", "matplotlib.pyplot.xlabel", "plotDecisionBoundary.plot_decision_boundary", "numpy.array", "numpy.zeros", "costFunction.cost_function", "matplotlib.pyplot.ion", "matplotlib.pyplot.axis", "nu...
[((696, 705), 'matplotlib.pyplot.ion', 'plt.ion', ([], {}), '()\n', (703, 705), True, 'import matplotlib.pyplot as plt\n'), ((814, 855), 'numpy.loadtxt', 'np.loadtxt', (['"""ex2data1.txt"""'], {'delimiter': '""","""'}), "('ex2data1.txt', delimiter=',')\n", (824, 855), True, 'import numpy as np\n'), ((1827, 1855), 'matp...
#poly_gauss_coil model #conversion of Poly_GaussCoil.py #converted by <NAME>, Mar 2016 r""" This empirical model describes the scattering from *polydisperse* polymer chains in theta solvents or polymer melts, assuming a Schulz-Zimm type molecular weight distribution. To describe the scattering from *monodisperse* poly...
[ "numpy.expm1", "numpy.polyval", "numpy.power", "numpy.random.uniform" ]
[((3486, 3510), 'numpy.polyval', 'np.polyval', (['p', 'z[~index]'], {}), '(p, z[~index])\n', (3496, 3510), True, 'import numpy as np\n'), ((3677, 3700), 'numpy.random.uniform', 'np.random.uniform', (['(0)', '(4)'], {}), '(0, 4)\n', (3694, 3700), True, 'import numpy as np\n'), ((3740, 3763), 'numpy.random.uniform', 'np....
import os from itertools import product from concurrent import futures from contextlib import closing from datetime import datetime import numpy as np from . import _z5py from .file import File, S3File from .dataset import Dataset from .shape_utils import normalize_slices def product1d(inrange): for ii in inrang...
[ "urllib2.urlopen", "zipfile.ZipFile", "datetime.datetime.utcnow", "concurrent.futures.ThreadPoolExecutor", "itertools.product", "os.path.join", "imageio.volread", "numpy.sum" ]
[((11994, 12022), 'imageio.volread', 'volread', (['"""imageio:stent.npz"""'], {}), "('imageio:stent.npz')\n", (12001, 12022), False, 'from imageio import volread\n'), ((2191, 2207), 'itertools.product', 'product', (['*ranges'], {}), '(*ranges)\n', (2198, 2207), False, 'from itertools import product\n'), ((7395, 7444), ...
from concurrent.futures import ThreadPoolExecutor from functools import partial from json import JSONDecodeError import requests from funcy.calc import cache from funcy.debug import print_calls from funcy.simple_funcs import curry HEADERS = { "Accept": "application/json, text/javascript, */*; q=0.01", "User-A...
[ "concurrent.futures.ThreadPoolExecutor", "funcy.calc.cache", "functools.partial", "requests.get" ]
[((597, 606), 'funcy.calc.cache', 'cache', (['(60)'], {}), '(60)\n', (602, 606), False, 'from funcy.calc import cache\n'), ((644, 666), 'requests.get', 'requests.get', (['HOME_URL'], {}), '(HOME_URL)\n', (656, 666), False, 'import requests\n'), ((2433, 2473), 'concurrent.futures.ThreadPoolExecutor', 'ThreadPoolExecutor...
""" Data creation: Load the data, normalize it, and split into train and test. """ ''' Added the capability of loading pre-separated UCI train/test data function LoadData_Splitted_UCI ''' import numpy as np import os import pandas as pd import tensorflow as tf DATA_PATH = "../UCI_Datasets" class DataGenerator:...
[ "numpy.random.normal", "tensorflow.random.normal", "numpy.mean", "tensorflow.reduce_sum", "os.path.join", "numpy.random.seed", "numpy.std", "tensorflow.convert_to_tensor", "numpy.loadtxt", "numpy.load", "tensorflow.compat.v1.Session", "numpy.random.permutation" ]
[((714, 752), 'tensorflow.random.normal', 'tf.random.normal', ([], {'shape': '(Ntrain, Npar)'}), '(shape=(Ntrain, Npar))\n', (730, 752), True, 'import tensorflow as tf\n'), ((1174, 1220), 'tensorflow.convert_to_tensor', 'tf.convert_to_tensor', (['x_test'], {'dtype': 'tf.float32'}), '(x_test, dtype=tf.float32)\n', (1194...
# This script adds a new message to a specific SQS queue # # Author - <NAME> 2013 # # #from __future__ import print_function import sys import Queue import boto.sqs import argparse import socket import datetime import sys import time from boto.sqs.attributes import Attributes parser = argparse.ArgumentParser() parser....
[ "threading.Thread.__init__", "Queue.Queue", "argparse.ArgumentParser" ]
[((287, 312), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (310, 312), False, 'import argparse\n'), ((1231, 1245), 'Queue.Queue', 'Queue.Queue', (['(0)'], {}), '(0)\n', (1242, 1245), False, 'import Queue\n'), ((766, 797), 'threading.Thread.__init__', 'threading.Thread.__init__', (['self'], {}...
from typing import Optional import pandas as pd from dero.ml.typing import ModelDict, AllModelResultsDict, DfDict def model_dict_to_df(model_results: ModelDict, model_name: Optional[str] = None) -> pd.DataFrame: df = pd.DataFrame(model_results).T df.drop('score', inplace=True) df['score'] = model_results[...
[ "pandas.DataFrame" ]
[((676, 690), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (688, 690), True, 'import pandas as pd\n'), ((223, 250), 'pandas.DataFrame', 'pd.DataFrame', (['model_results'], {}), '(model_results)\n', (235, 250), True, 'import pandas as pd\n'), ((1255, 1269), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', ...
import pygame from engine.utils import Rect from engine.app import get_screen_size # EXPORT class View(object): def __init__(self, rect=None): if rect: self.rect = rect else: res = get_screen_size() self.rect = Rect(0,0,res[0],res[1]) def offset(self, d): ...
[ "engine.utils.Rect", "engine.app.get_screen_size" ]
[((647, 662), 'engine.utils.Rect', 'Rect', (['self.rect'], {}), '(self.rect)\n', (651, 662), False, 'from engine.utils import Rect\n'), ((226, 243), 'engine.app.get_screen_size', 'get_screen_size', ([], {}), '()\n', (241, 243), False, 'from engine.app import get_screen_size\n'), ((268, 294), 'engine.utils.Rect', 'Rect'...
from __future__ import print_function import emcee from multiprocessing import Pool import numpy as np import corner import matplotlib.pyplot as plt import sys import scipy.optimize as op from rbvfit.rb_vfit import rb_veldiff as rb_veldiff from rbvfit import rb_setline as rb import pdb def plot_model(wave_obs,fnorm,e...
[ "numpy.log", "emcee.EnsembleSampler", "numpy.array", "numpy.isfinite", "rbvfit.rb_vfit.rb_veldiff", "corner.corner", "numpy.diff", "numpy.concatenate", "numpy.round", "numpy.tile", "scipy.optimize.minimize", "IPython.display.Math", "numpy.shape", "numpy.random.randn", "matplotlib.pyplot....
[((1731, 1832), 'matplotlib.pyplot.subplots', 'plt.subplots', (['ntransition'], {'sharex': '(True)', 'sharey': '(False)', 'figsize': '(12, 18)', 'gridspec_kw': "{'hspace': 0}"}), "(ntransition, sharex=True, sharey=False, figsize=(12, 18),\n gridspec_kw={'hspace': 0})\n", (1743, 1832), True, 'import matplotlib.pyplot...
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # Copyright (c) Megvii, Inc. and its affiliates. import torch from torch.utils.data.dataloader import DataLoader as torchDataLoader from torch.utils.data.dataloader import default_collate import os import random from .samplers import YoloBatchSampler def ...
[ "torch.utils.data.dataloader.default_collate", "os.getenv", "os.path.join", "torch.utils.data.sampler.SequentialSampler", "os.path.dirname", "torch.utils.data.sampler.RandomSampler", "random.randint" ]
[((551, 583), 'os.getenv', 'os.getenv', (['"""YOLOX_DATADIR"""', 'None'], {}), "('YOLOX_DATADIR', None)\n", (560, 583), False, 'import os\n'), ((735, 771), 'os.path.join', 'os.path.join', (['yolox_path', '"""datasets"""'], {}), "(yolox_path, 'datasets')\n", (747, 771), False, 'import os\n'), ((677, 708), 'os.path.dirna...
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = r''' --- module: ec2_vpc_vpn_info version_added: 1.0.0 short_description:...
[ "ansible_collections.amazon.aws.plugins.module_utils.ec2.camel_dict_to_snake_dict", "ansible_collections.amazon.aws.plugins.module_utils.core.AnsibleAWSModule" ]
[((7229, 7361), 'ansible_collections.amazon.aws.plugins.module_utils.core.AnsibleAWSModule', 'AnsibleAWSModule', ([], {'argument_spec': 'argument_spec', 'mutually_exclusive': "[['vpn_connection_ids', 'filters']]", 'supports_check_mode': '(True)'}), "(argument_spec=argument_spec, mutually_exclusive=[[\n 'vpn_connecti...
import discord from discord.ext import commands from pathlib import Path from config import bot from collections import OrderedDict import json class RoleSelector(commands.Cog): def __init__(self, bot): self.bot = bot self.messages_path = str(Path('cogs/data/messages.json')) async def opener(...
[ "discord.ext.commands.Cog.listener", "collections.OrderedDict", "pathlib.Path", "discord.utils.get", "json.load", "discord.Embed", "json.dump" ]
[((537, 560), 'discord.ext.commands.Cog.listener', 'commands.Cog.listener', ([], {}), '()\n', (558, 560), False, 'from discord.ext import commands\n'), ((1312, 1361), 'discord.ext.commands.Cog.listener', 'commands.Cog.listener', ([], {'name': '"""on_raw_reaction_add"""'}), "(name='on_raw_reaction_add')\n", (1333, 1361)...
#!/usr/bin/env python3 from .base_test import BaseTest from fbc.symphony.cli.graphql_compiler.gql.utils_codegen import CodeChunk class TestRendererDataclasses(BaseTest): def test_codegen_write_simple_strings(self): gen = CodeChunk() gen.write('def sum(a, b):') gen.indent() gen.wri...
[ "fbc.symphony.cli.graphql_compiler.gql.utils_codegen.CodeChunk" ]
[((236, 247), 'fbc.symphony.cli.graphql_compiler.gql.utils_codegen.CodeChunk', 'CodeChunk', ([], {}), '()\n', (245, 247), False, 'from fbc.symphony.cli.graphql_compiler.gql.utils_codegen import CodeChunk\n'), ((503, 514), 'fbc.symphony.cli.graphql_compiler.gql.utils_codegen.CodeChunk', 'CodeChunk', ([], {}), '()\n', (5...
from flask import Flask def create_app(): app = Flask(__name__) app.config['JSON_AS_ASCII'] = False from .views import app as main_app app.register_blueprint(main_app) return app
[ "flask.Flask" ]
[((54, 69), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (59, 69), False, 'from flask import Flask\n')]
from numpy import logspace from sys import path as sysPath sysPath.append('../../src') #load the module from interfacePy import Cosmo cosmo=Cosmo('../../src/data/eos2020.dat',0,1e5) for T in logspace(-5,5,50): print( 'T=',T,'GeV\t', 'H=',cosmo.Hubble(T),'GeV\t', 'h_eff=',cosmo.heff(T),...
[ "matplotlib.pyplot.figure", "numpy.logspace", "sys.path.append", "interfacePy.Cosmo" ]
[((61, 88), 'sys.path.append', 'sysPath.append', (['"""../../src"""'], {}), "('../../src')\n", (75, 88), True, 'from sys import path as sysPath\n'), ((145, 193), 'interfacePy.Cosmo', 'Cosmo', (['"""../../src/data/eos2020.dat"""', '(0)', '(100000.0)'], {}), "('../../src/data/eos2020.dat', 0, 100000.0)\n", (150, 193), Fa...
#!/usr/bin/env python3 import argparse import logging import sys import zlib sys.path.append("../..") from bento.client.api import ClientConnection from bento.common.protocol import * import bento.common.util as util function_name= "browser" function_code= """ import requests import zlib import os def browser(url, ...
[ "logging.basicConfig", "logging.debug", "argparse.ArgumentParser", "bento.common.util.fatal", "bento.client.api.ClientConnection", "sys.path.append", "zlib.decompress" ]
[((79, 103), 'sys.path.append', 'sys.path.append', (['"""../.."""'], {}), "('../..')\n", (94, 103), False, 'import sys\n'), ((661, 739), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(levelname)s:\t%(message)s"""', 'level': 'logging.DEBUG'}), "(format='%(levelname)s:\\t%(message)s', level=logging.D...
from app import webapp, mysql from app.models import Search , Utils, Collection, WebUtils from flask import request, jsonify from flask.ext.jsonpify import jsonify as jsonp import json ''' Generic search call @params q: search query page: the page number of search results (default 0) t...
[ "flask.request.args.get", "app.mysql.connect", "app.models.Utils.getAdmins", "app.models.Collection", "app.models.Search.getSearchCategoriesForApp", "app.models.Search", "app.webapp.route", "app.models.Utils.errorResponse", "app.models.Utils.getParam", "app.models.WebUtils.fetchSearchResults", "...
[((447, 470), 'app.webapp.route', 'webapp.route', (['"""/search"""'], {}), "('/search')\n", (459, 470), False, 'from app import webapp, mysql\n'), ((2094, 2124), 'app.webapp.route', 'webapp.route', (['"""/getCategories"""'], {}), "('/getCategories')\n", (2106, 2124), False, 'from app import webapp, mysql\n'), ((2231, 2...
from flask import Flask, make_response app = Flask(__name__) @app.route("/") @app.route("/index.html") def index(): html = open("assets/index.html").read() return html @app.route("/assets/<name>") def wasm(name): r = make_response(open(f"assets/{name}","rb").read()) if name.endswith(".wasm"): ...
[ "flask.Flask" ]
[((46, 61), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (51, 61), False, 'from flask import Flask, make_response\n')]
from .audio_source import AudioSource from engine import disk import pyglet.media class AudioDirector(object): """Director for loading audio and controlling playback. Attributes: attenuation_distance (int): The default attenuation distance for newly loaded audio. Existing audio will retai...
[ "engine.disk.DiskLoader.load_audio" ]
[((2846, 2893), 'engine.disk.DiskLoader.load_audio', 'disk.DiskLoader.load_audio', (['filepath', 'streaming'], {}), '(filepath, streaming)\n', (2872, 2893), False, 'from engine import disk\n')]
import os import time print("=====================================================================") print(" ") print(" STARTING SYSTEM REPAIR ") print(" ...
[ "os.system", "time.sleep" ]
[((866, 933), 'os.system', 'os.system', (['"""dism.exe /Online /Cleanup-Image /AnalyzeComponentStore"""'], {}), "('dism.exe /Online /Cleanup-Image /AnalyzeComponentStore')\n", (875, 933), False, 'import os\n'), ((938, 951), 'time.sleep', 'time.sleep', (['(3)'], {}), '(3)\n', (948, 951), False, 'import time\n'), ((1033,...
""" SNMP subagent entrypoint. """ import asyncio import functools import os import signal import sys import ax_interface from sonic_ax_impl.mibs import ieee802_1ab from . import logger from .mibs.ietf import rfc1213, rfc2737, rfc2863, rfc3433, rfc4292, rfc4363 from .mibs.vendor import dell, cisco # Background task u...
[ "ax_interface.Agent", "functools.partial", "os.getpid", "sys.exit", "asyncio.get_event_loop" ]
[((394, 418), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (416, 418), False, 'import asyncio\n'), ((1679, 1769), 'ax_interface.Agent', 'ax_interface.Agent', (['SonicMIB', '(update_frequency or DEFAULT_UPDATE_FREQUENCY)', 'event_loop'], {}), '(SonicMIB, update_frequency or DEFAULT_UPDATE_FREQUE...
#!/usr/bin/env python # Author: <NAME> # Date: 2015oct31 from __future__ import print_function import os import sys import stat import errno import shutil import optparse import traceback import subprocess wrappaconda_name_string = 'Wr[App]-A-Conda' class AppAtizer(object): def __init__(self): # tmp ...
[ "subprocess.check_output", "os.path.exists", "os.link", "optparse.OptionParser", "os.chmod", "os.path.isfile", "os.path.isdir", "os.mkdir", "shutil.copy", "shutil.rmtree", "os.path.expanduser" ]
[((359, 392), 'os.path.expanduser', 'os.path.expanduser', (['"""~/Downloads"""'], {}), "('~/Downloads')\n", (377, 392), False, 'import os\n'), ((1494, 1517), 'optparse.OptionParser', 'optparse.OptionParser', ([], {}), '()\n', (1515, 1517), False, 'import optparse\n'), ((4366, 4395), 'os.path.exists', 'os.path.exists', ...
import requests class Wallet(object): def __init__(self, testnet=False): if testnet: self.base_url = 'https://testnet.watchtower.cash/api/' else: self.base_url = 'https://watchtower.cash/api/' def _get_utxos(self, wallet_hash, amount): url = self.base_url + f'...
[ "requests.get" ]
[((362, 379), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (374, 379), False, 'import requests\n')]
from PyQt5.QtWidgets import QTreeWidget from PyQt5.Qt import pyqtSignal from PyQt5.QtWidgets import QTreeWidgetItem from PyQt5.Qt import Qt class TreeWidget(QTreeWidget): # enum ItemShowMode ItemsCollapsed = 0 ItemsExpanded = 1 def __init__(self, parent=None): super().__init__(parent) s...
[ "PyQt5.Qt.pyqtSignal" ]
[((3741, 3768), 'PyQt5.Qt.pyqtSignal', 'pyqtSignal', (['QTreeWidgetItem'], {}), '(QTreeWidgetItem)\n', (3751, 3768), False, 'from PyQt5.Qt import pyqtSignal\n'), ((3807, 3834), 'PyQt5.Qt.pyqtSignal', 'pyqtSignal', (['QTreeWidgetItem'], {}), '(QTreeWidgetItem)\n', (3817, 3834), False, 'from PyQt5.Qt import pyqtSignal\n'...
""":run """ import curses import datetime import json import logging import os import re import shlex import shutil import time import uuid from math import floor from queue import Queue from typing import Any from typing import Callable from typing import Dict from typing import List from typing import Optional from ...
[ "logging.getLogger", "os.path.exists", "math.floor", "shlex.split", "shutil.which", "re.match", "time.sleep", "os.getcwd", "uuid.uuid4", "os.path.dirname", "datetime.datetime.now", "os.path.basename", "json.load", "queue.Queue" ]
[((5542, 5549), 'queue.Queue', 'Queue', ([], {}), '()\n', (5547, 5549), False, 'from queue import Queue\n'), ((7222, 7277), 'logging.getLogger', 'logging.getLogger', (['f"""{__name__}_{self._subaction_type}"""'], {}), "(f'{__name__}_{self._subaction_type}')\n", (7239, 7277), False, 'import logging\n'), ((7725, 7741), '...
# Copyright 2014 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...
[ "textwrap.dedent", "ebcli.core.fileoperations.get_workspace_type", "json.loads", "ebcli.operations.commonops.get_current_branch_environment", "ebcli.core.fileoperations.get_application_name", "ebcli.objects.exceptions.NotInitializedError", "os.path.abspath", "ebcli.core.io.log_alert", "ebcli.objects...
[((2820, 2848), 'cement.core.controller.expose', 'controller.expose', ([], {'hide': '(True)'}), '(hide=True)\n', (2837, 2848), False, 'from cement.core import controller\n'), ((1901, 1940), 'ebcli.core.fileoperations.get_workspace_type', 'fileoperations.get_workspace_type', (['None'], {}), '(None)\n', (1934, 1940), Fal...
import unittest import speak class SpeakTests(unittest.TestCase): """ Unit test for the speak library """ def testHello(self): self.assertEqual("Hello World!", speak.helloworld()) def testGoodbye(self): self.assertEqual("Goodbye World!", speak.goodbyeworld()) if __name__ == "__mai...
[ "unittest.main", "speak.goodbyeworld", "speak.helloworld" ]
[((330, 345), 'unittest.main', 'unittest.main', ([], {}), '()\n', (343, 345), False, 'import unittest\n'), ((186, 204), 'speak.helloworld', 'speak.helloworld', ([], {}), '()\n', (202, 204), False, 'import speak\n'), ((276, 296), 'speak.goodbyeworld', 'speak.goodbyeworld', ([], {}), '()\n', (294, 296), False, 'import sp...
#!/usr/bin/env python3 # METADATA OF THIS TAL_SERVICE: problem="eggs" service="confirm_min_throws" args_list = [ ('min',int), ('n_eggs',int), ('n_floors',int), ('lang',str), ('ISATTY',bool), ] from sys import stderr, exit, argv from random import randrange from math import inf as IMPOSSIBLE from ...
[ "multilanguage.Env", "sys.exit", "multilanguage.TALcolors" ]
[((367, 399), 'multilanguage.Env', 'Env', (['problem', 'service', 'args_list'], {}), '(problem, service, args_list)\n', (370, 399), False, 'from multilanguage import Env, Lang, TALcolors\n'), ((405, 419), 'multilanguage.TALcolors', 'TALcolors', (['ENV'], {}), '(ENV)\n', (414, 419), False, 'from multilanguage import Env...
from django.contrib import admin from .models import Doctor, ConsultationTime, Medicine, Allergy, Child, Parent admin.site.site_header = "Allisto - We Do Good" @admin.register(Doctor) class DoctorAdmin(admin.ModelAdmin): list_display = ('name', 'aadhar_number', 'specialization', 'email', 'phone_number') lis...
[ "django.contrib.admin.register", "django.contrib.admin.site.register" ]
[((165, 187), 'django.contrib.admin.register', 'admin.register', (['Doctor'], {}), '(Doctor)\n', (179, 187), False, 'from django.contrib import admin\n'), ((457, 479), 'django.contrib.admin.register', 'admin.register', (['Parent'], {}), '(Parent)\n', (471, 479), False, 'from django.contrib import admin\n'), ((735, 756)...
from backend.entity.entity import DefinedFuntion from backend.ir.dumper import Dumper from backend.ir.stmt import Assign from backend.ir.stmt import Return from backend.ir.expr import Bin from backend.ir.expr import Call from backend.entity.scope import * def import_ir(data, asm_file): def_vars = list() def_...
[ "backend.ir.expr.Bin", "backend.ir.expr.Call", "backend.ir.stmt.Return", "backend.ir.stmt.Assign", "backend.ir.dumper.Dumper" ]
[((963, 1034), 'backend.ir.stmt.Assign', 'Assign', ([], {'loc': "insn['line_number']", 'lhs': "insn['address']", 'rhs': "insn['value']"}), "(loc=insn['line_number'], lhs=insn['address'], rhs=insn['value'])\n", (969, 1034), False, 'from backend.ir.stmt import Assign\n'), ((3923, 3931), 'backend.ir.dumper.Dumper', 'Dumpe...
import numpy as np from pyquil.gate_matrices import X, Y, Z, H from forest.benchmarking.operator_tools.superoperator_transformations import * # Test philosophy: # Using the by hand calculations found in the docs we check conversion # between one qubit channels with one Kraus operator (Hadamard) and two # Kraus operat...
[ "numpy.abs", "numpy.eye", "numpy.allclose", "numpy.sqrt", "numpy.random.rand", "numpy.asarray", "numpy.diag", "numpy.kron", "numpy.array", "numpy.zeros", "numpy.matmul" ]
[((3245, 3310), 'numpy.diag', 'np.diag', (['[1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1]'], {}), '([1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, -1, 1])\n', (3252, 3310), True, 'import numpy as np\n'), ((3365, 3393), 'numpy.asarray', 'np.asarray', (['[[0, 0], [0, 1]]'], {}), '([[0, 0], [0, 1]])\n', (337...
import numpy as np import imageio from PoissonTemperature import FiniteDifferenceMatrixConstruction def ind_sub_conversion(img, ind2sub_fn, sub2ind_fn): rows, cols = img.shape[:2] num = rows*cols arange = np.arange(rows*cols, dtype=np.int32) ind2sub = np.empty((num, 2), dtype=np.int32) ind2sub[:, ...
[ "numpy.arange", "imageio.imwrite", "numpy.floor", "PoissonTemperature.FiniteDifferenceMatrixConstruction", "numpy.remainder", "numpy.empty", "imageio.imread", "numpy.save" ]
[((219, 257), 'numpy.arange', 'np.arange', (['(rows * cols)'], {'dtype': 'np.int32'}), '(rows * cols, dtype=np.int32)\n', (228, 257), True, 'import numpy as np\n'), ((270, 304), 'numpy.empty', 'np.empty', (['(num, 2)'], {'dtype': 'np.int32'}), '((num, 2), dtype=np.int32)\n', (278, 304), True, 'import numpy as np\n'), (...
from distutils.version import LooseVersion import requests import os import shutil import threading import webbrowser from zipfile import ZipFile from pathlib import Path import traceback import tempfile # import concurrent.futures from flask import Flask, url_for, make_response from flask.json import dumps from flask_...
[ "zipfile.ZipFile", "flask.Flask", "webbrowser.open", "mindsdb.utilities.log.get_log", "mindsdb.utilities.ps.wait_func_is_true", "os.remove", "pathlib.Path", "flask.json.dumps", "os.getpid", "distutils.version.LooseVersion", "mindsdb.utilities.config.Config", "os.path.isabs", "requests.get", ...
[((1458, 1473), 'mindsdb.utilities.log.get_log', 'get_log', (['"""http"""'], {}), "('http')\n", (1465, 1473), False, 'from mindsdb.utilities.log import get_log\n'), ((2168, 2197), 'distutils.version.LooseVersion', 'LooseVersion', (['mindsdb_version'], {}), '(mindsdb_version)\n', (2180, 2197), False, 'from distutils.ver...
# Copyright Contributors to the Pyro-Cov project. # SPDX-License-Identifier: Apache-2.0 import functools import io import logging import math import re import sys import torch import torch.multiprocessing as mp from Bio import AlignIO from Bio.Phylo.NewickIO import Parser from Bio.Seq import Seq from Bio.SeqRecord im...
[ "logging.getLogger", "re.search", "Bio.AlignIO.read", "Bio.Phylo.NewickIO.Parser.from_string", "torch.full", "Bio.Seq.Seq", "torch.isfinite", "torch.multiprocessing.Pool", "functools.partial", "re.sub", "sys.stdout.flush", "sys.stdout.write" ]
[((375, 402), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (392, 402), False, 'import logging\n'), ((531, 552), 'sys.stdout.write', 'sys.stdout.write', (['"""."""'], {}), "('.')\n", (547, 552), False, 'import sys\n'), ((557, 575), 'sys.stdout.flush', 'sys.stdout.flush', ([], {}), '()\n'...
import numpy as np import pandas as pd from sklearn.linear_model import LinearRegression def convert_to_sqft(str): tokens = str.split(' - ') if len(tokens) == 2: return (float(tokens[0]) + float(tokens[1])) / 2 try: return float(tokens[0]) except Exception: return np.NAN def co...
[ "pandas.get_dummies", "numpy.where", "sklearn.linear_model.LinearRegression", "pandas.read_csv" ]
[((441, 459), 'sklearn.linear_model.LinearRegression', 'LinearRegression', ([], {}), '()\n', (457, 459), False, 'from sklearn.linear_model import LinearRegression\n'), ((549, 590), 'pandas.read_csv', 'pd.read_csv', (['"""./Bengaluru_House_Data.csv"""'], {}), "('./Bengaluru_House_Data.csv')\n", (560, 590), True, 'import...
import warnings from typing import Dict, Tuple from lhotse import CutSet from lhotse.dataset.sampling.base import CutSampler def find_pessimistic_batches( sampler: CutSampler, batch_tuple_index: int = 0 ) -> Tuple[Dict[str, CutSet], Dict[str, float]]: """ Function for finding 'pessimistic' batches, i.e. ...
[ "warnings.warn" ]
[((2753, 2825), 'warnings.warn', 'warnings.warn', (['"""Empty sampler encountered in find_pessimistic_batches()"""'], {}), "('Empty sampler encountered in find_pessimistic_batches()')\n", (2766, 2825), False, 'import warnings\n')]
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-06-03 08:41 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('book', '0009_book_folder'), ] operations = [ migrations.AddField( ...
[ "django.db.models.DateTimeField", "django.db.models.CharField" ]
[((389, 424), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now': '(True)'}), '(auto_now=True)\n', (409, 424), False, 'from django.db import migrations, models\n'), ((542, 587), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(400)', 'unique': '(True)'}), '(max_length=400,...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This module contains the necessary functions to load a text-corpus from NLTK, contract all possible sentences, applying POS-tags to the contracted sentences and compare that with the original text. The information about which contraction+pos-tag pair gets expanded to ...
[ "nltk.corpus.reuters.sents", "nltk.corpus.inaugural.sents", "yaml.dump", "nltk.corpus.brown.sents", "yaml.load", "nltk.corpus.gutenberg.sents", "utils.load_stanford", "utils.sent_to_ner", "pprint.pprint" ]
[((11038, 11063), 'nltk.corpus.brown.sents', 'nltk.corpus.brown.sents', ([], {}), '()\n', (11061, 11063), False, 'import nltk\n'), ((11080, 11109), 'nltk.corpus.gutenberg.sents', 'nltk.corpus.gutenberg.sents', ([], {}), '()\n', (11107, 11109), False, 'import nltk\n'), ((11126, 11153), 'nltk.corpus.reuters.sents', 'nltk...
# pylint: disable = C0111 from setuptools import find_packages, setup setup(name="paperai", # version="1.5.0", # author="NeuML", # description="AI-powered literature discovery and review engine for medical/scientific papers", # long_description=DESCRIPTION, # long_description_content_typ...
[ "setuptools.find_packages" ]
[((914, 982), 'setuptools.find_packages', 'find_packages', ([], {'where': '"""C:\\\\Users\\\\sxm\\\\Desktop\\\\paperai\\\\src\\\\python"""'}), "(where='C:\\\\Users\\\\sxm\\\\Desktop\\\\paperai\\\\src\\\\python')\n", (927, 982), False, 'from setuptools import find_packages, setup\n')]
from io import BytesIO from typing import List, Dict from PIL import Image from hit_analysis.commons.config import Config from hit_analysis.commons.consts import IMAGE, CROP_X, CROP_Y, CROP_SIZE, FRAME_DECODED, CLASSIFIED, CLASS_ARTIFACT, ORIG_IMAGE def append_to_frame(image: Image, detection: dict): hit_img = ...
[ "io.BytesIO" ]
[((1155, 1164), 'io.BytesIO', 'BytesIO', ([], {}), '()\n', (1162, 1164), False, 'from io import BytesIO\n')]
import numpy as np import numpy.testing as npt import slippy import slippy.core as core """ If you add a material you need to add the properties that it will be tested with to the material_parameters dict, the key should be the name of the class (what ever it is declared as after the class key word). The value should ...
[ "slippy.asnumpy", "slippy.core.Elastic", "numpy.random.rand", "numpy.random.seed" ]
[((2428, 2484), 'slippy.core.Elastic', 'core.Elastic', (['"""steel_6"""', "{'E': 200000000000.0, 'v': 0.3}"], {}), "('steel_6', {'E': 200000000000.0, 'v': 0.3})\n", (2440, 2484), True, 'import slippy.core as core\n'), ((2480, 2497), 'numpy.random.seed', 'np.random.seed', (['(0)'], {}), '(0)\n', (2494, 2497), True, 'imp...
#!/usr/bin/env python """Restore files with ending BACKUP_ENDING to original files.""" # The copyright in this software is being made available under the BSD License, # included below. This software may be subject to other third party and contributor # rights, including patent rights, and no such rights are granted un...
[ "os.path.exists", "os.rename", "optparse.OptionParser", "os.unlink", "sys.exit" ]
[((2044, 2058), 'optparse.OptionParser', 'OptionParser', ([], {}), '()\n', (2056, 2058), False, 'from optparse import OptionParser\n'), ((2220, 2231), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (2228, 2231), False, 'import sys\n'), ((2436, 2460), 'os.path.exists', 'os.path.exists', (['old_name'], {}), '(old_name)\...
# Copyright 2020-2021 OpenDR European Project # # 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 agree...
[ "pyglet.gl.glGetDoublev", "numpy.asarray", "numpy.argsort", "numpy.sum", "numpy.zeros", "pyglet.gl.glGetIntegerv", "numpy.linalg.norm", "numpy.transpose", "pyglet.gl.GLdouble", "pyglet.gl.gluUnProject" ]
[((1131, 1191), 'pyglet.gl.glGetDoublev', 'pyglet.gl.glGetDoublev', (['pyglet.gl.GL_MODELVIEW_MATRIX', 'mvmat'], {}), '(pyglet.gl.GL_MODELVIEW_MATRIX, mvmat)\n', (1153, 1191), False, 'import pyglet\n'), ((1200, 1260), 'pyglet.gl.glGetDoublev', 'pyglet.gl.glGetDoublev', (['pyglet.gl.GL_PROJECTION_MATRIX', 'pmat'], {}), ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Dec 28 09:33:53 2020 @author: dhulls """ from __future__ import print_function from __future__ import absolute_import from argparse import ArgumentParser import numpy as nm import sys sys.path.append('.') from sfepy.base.base import IndexedStruct, St...
[ "sfepy.discrete.Equations", "sfepy.discrete.conditions.EssentialBC", "sfepy.solvers.ls.ScipyDirect", "sfepy.discrete.Equation", "argparse.ArgumentParser", "sfepy.solvers.nls.Newton", "sfepy.discrete.conditions.Conditions", "sfepy.discrete.fem.Mesh.from_file", "sfepy.discrete.Integral", "sfepy.disc...
[((253, 273), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (268, 273), False, 'import sys\n'), ((912, 928), 'argparse.ArgumentParser', 'ArgumentParser', ([], {}), '()\n', (926, 928), False, 'from argparse import ArgumentParser\n'), ((1183, 1237), 'sfepy.discrete.fem.Mesh.from_file', 'Mesh.from_fi...
#!/usr/bin/env python3 from scripts.workflow import get_app_name, is_name_valid from scripts.workflow import get_args, is_args_valid from scripts.workflow import create_dir, create_app, create_templates_folder, create_static_folder, create_dockerfile from scripts.manual import print_manual from scripts.messages import...
[ "scripts.messages.success_msg", "scripts.workflow.get_args", "scripts.workflow.create_app", "scripts.manual.print_manual", "scripts.workflow.is_args_valid", "scripts.workflow.create_dir", "scripts.workflow.create_templates_folder", "scripts.workflow.get_app_name", "scripts.workflow.create_dockerfile...
[((381, 395), 'scripts.workflow.get_app_name', 'get_app_name', ([], {}), '()\n', (393, 395), False, 'from scripts.workflow import get_app_name, is_name_valid\n'), ((403, 413), 'scripts.workflow.get_args', 'get_args', ([], {}), '()\n', (411, 413), False, 'from scripts.workflow import get_args, is_args_valid\n'), ((466, ...
import os from pathlib import Path from jinja2 import Template import parser from utils import write_to_file from utils import mkdir_p parser.init() # parse and assign to vars spec = parser.spec def _concat(slice: str) -> str: """helper to concatenate each template slice.""" return "{}\n".format(slice) ...
[ "pathlib.Path.cwd", "os.path.join", "jinja2.Template", "os.path.realpath", "utils.write_to_file", "parser.init" ]
[((138, 151), 'parser.init', 'parser.init', ([], {}), '()\n', (149, 151), False, 'import parser\n'), ((1371, 1391), 'jinja2.Template', 'Template', (['dockerfile'], {}), '(dockerfile)\n', (1379, 1391), False, 'from jinja2 import Template\n'), ((2335, 2371), 'utils.write_to_file', 'write_to_file', (['file_name', 'dockerf...
import os from datetime import datetime import pytest from entropylab import ExperimentResources, SqlAlchemyDB, PyNode, Graph @pytest.mark.skipif( datetime.utcnow() > datetime(2022, 6, 25), reason="Please remove after two months have passed since the fix was merged", ) def test_issue_204(initialized_project...
[ "datetime.datetime", "os.path.exists", "entropylab.Graph", "datetime.datetime.utcnow", "os.path.join", "entropylab.SqlAlchemyDB", "entropylab.PyNode", "os.remove" ]
[((957, 1001), 'entropylab.PyNode', 'PyNode', ([], {'label': '"""root_node"""', 'program': 'root_node'}), "(label='root_node', program=root_node)\n", (963, 1001), False, 'from entropylab import ExperimentResources, SqlAlchemyDB, PyNode, Graph\n'), ((1019, 1086), 'entropylab.Graph', 'Graph', ([], {'resources': 'experime...
"""users.country Revision ID: 429d596c43a7 Revises: <PASSWORD> Create Date: 2020-10-23 21:26:55.598146 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '429d596c43a7' down_revision = '77e0c0edaa04' branch_labels = None depends_on = None def upgrade(): # ##...
[ "sqlalchemy.String", "alembic.op.drop_column" ]
[((587, 621), 'alembic.op.drop_column', 'op.drop_column', (['"""users"""', '"""country"""'], {}), "('users', 'country')\n", (601, 621), False, 'from alembic import op\n'), ((426, 445), 'sqlalchemy.String', 'sa.String', ([], {'length': '(4)'}), '(length=4)\n', (435, 445), True, 'import sqlalchemy as sa\n')]
import pandas as pd def get_seasonality_weekly(bills, date_column='dates', group_column='level_4_name', regular_only=False, promo_fact_column=None): bills['week'] = pd.to_datetime(bills[date_column]).dt.week bills['year'] = pd.to_datetime(bills[date_column]).dt.year # - Группиру...
[ "pandas.to_datetime" ]
[((198, 232), 'pandas.to_datetime', 'pd.to_datetime', (['bills[date_column]'], {}), '(bills[date_column])\n', (212, 232), True, 'import pandas as pd\n'), ((261, 295), 'pandas.to_datetime', 'pd.to_datetime', (['bills[date_column]'], {}), '(bills[date_column])\n', (275, 295), True, 'import pandas as pd\n')]
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import collections import copy import traceback from telemetry import value as value_module from telemetry.results import page_run from telemetry.results im...
[ "telemetry.results.page_run.PageRun", "copy.copy", "traceback.format_exception", "telemetry.results.progress_reporter.ProgressReporter" ]
[((3594, 3616), 'telemetry.results.page_run.PageRun', 'page_run.PageRun', (['page'], {}), '(page)\n', (3610, 3616), False, 'from telemetry.results import page_run\n'), ((1399, 1442), 'telemetry.results.progress_reporter.ProgressReporter', 'progress_reporter_module.ProgressReporter', ([], {}), '()\n', (1440, 1442), True...
from tensorflow.keras.models import Model import tensorflow as tf from tensorflow import keras import matplotlib.pyplot as plt import matplotlib.cm as cm import numpy as np import cv2 import numpy as np import pandas as pd from tensorflow.keras.models import load_model import tensorflow as tf import os #--------------...
[ "numpy.uint8", "os.path.join", "tensorflow.keras.preprocessing.image.array_to_img", "tensorflow.GradientTape", "tensorflow.squeeze", "tensorflow.math.reduce_max", "tensorflow.maximum", "tensorflow.reduce_mean", "tensorflow.keras.preprocessing.image.img_to_array", "tensorflow.cast", "matplotlib.c...
[((3903, 3940), 'tensorflow.reduce_mean', 'tf.reduce_mean', (['grads'], {'axis': '(0, 1, 2)'}), '(grads, axis=(0, 1, 2))\n', (3917, 3940), True, 'import tensorflow as tf\n'), ((4296, 4315), 'tensorflow.squeeze', 'tf.squeeze', (['heatmap'], {}), '(heatmap)\n', (4306, 4315), True, 'import tensorflow as tf\n'), ((4888, 49...
import subprocess import sys import os import setup_util from os.path import expanduser def start(args, logfile, errfile): fwroot = args.fwroot setup_util.replace_text("cakephp/app/Config/database.php", "'host' => '.*',", "'host' => '" + args.database_host + "',") setup_util.replace_text("cakephp/app/Config/cor...
[ "setup_util.replace_text", "subprocess.call", "subprocess.check_call" ]
[((150, 274), 'setup_util.replace_text', 'setup_util.replace_text', (['"""cakephp/app/Config/database.php"""', '"""\'host\' => \'.*\',"""', '("\'host\' => \'" + args.database_host + "\',")'], {}), '(\'cakephp/app/Config/database.php\',\n "\'host\' => \'.*\',", "\'host\' => \'" + args.database_host + "\',")\n', (173,...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Common utility functions Created on Sun May 27 16:37:42 2018 @author: chen """ import math import cv2 import os from imutils import paths import numpy as np import scipy.ndimage def rotate_cooridinate(cooridinate_og,rotate_angle,rotate_center): """ calculat...
[ "numpy.sqrt", "math.cos", "numpy.array", "imutils.paths.list_images", "math.exp", "os.path.exists", "numpy.max", "numpy.exp", "numpy.concatenate", "numpy.min", "numpy.maximum", "numpy.round", "numpy.random.choice", "numpy.int", "cv2.imread", "numpy.minimum", "os.makedirs", "numpy.p...
[((774, 806), 'numpy.array', 'np.array', (['[rotated_x, rotated_y]'], {}), '([rotated_x, rotated_y])\n', (782, 806), True, 'import numpy as np\n'), ((988, 1008), 'os.path.exists', 'os.path.exists', (['path'], {}), '(path)\n', (1002, 1008), False, 'import os\n'), ((2068, 2209), 'numpy.array', 'np.array', (['[box[0][::-1...
import logging import time import re import serial from threading import Thread, Event from respeaker import Microphone from respeaker import BingSpeechAPI from respeaker import PixelRing,pixel_ring BING_KEY = '95e4fe8b3a324389be4595bd1813121c' ser = serial.Serial('/dev/ttyS1',115200,timeout=0) data=[0xAA,0x01,0x64,...
[ "logging.basicConfig", "respeaker.pixel_ring.off", "respeaker.pixel_ring.wait", "respeaker.BingSpeechAPI", "time.sleep", "respeaker.Microphone", "threading.Event", "respeaker.pixel_ring.listen", "serial.Serial", "threading.Thread", "re.search" ]
[((254, 300), 'serial.Serial', 'serial.Serial', (['"""/dev/ttyS1"""', '(115200)'], {'timeout': '(0)'}), "('/dev/ttyS1', 115200, timeout=0)\n", (267, 300), False, 'import serial\n'), ((2031, 2064), 'respeaker.Microphone', 'Microphone', ([], {'quit_event': 'quit_event'}), '(quit_event=quit_event)\n', (2041, 2064), False,...
#!/usr/bin/env python # encoding: utf-8 ''' @author: caroline @license: (C) Copyright 2019-2022, Node Supply Chain Manager Corporation Limited. @contact: <EMAIL> @software: pycharm @file: account_voteCredit.py @time: 2020/1/8 11:23 上午 @desc: ''' from apis.API import request_Api def voteCredit(api_name, params): '''...
[ "apis.API.request_Api" ]
[((693, 722), 'apis.API.request_Api', 'request_Api', (['api_name', 'params'], {}), '(api_name, params)\n', (704, 722), False, 'from apis.API import request_Api\n')]
#################### # ES-DOC CIM Questionnaire # Copyright (c) 2017 ES-DOC. All rights reserved. # # University of Colorado, Boulder # http://cires.colorado.edu/ # # This project is distributed according to the terms of the MIT license [http://www.opensource.org/licenses/MIT]. #################### from djan...
[ "django.db.models.TextField", "django.db.models.ForeignKey", "os.path.join", "os.path.dirname", "django.db.models.DateTimeField", "Q.questionnaire.q_fields.QVersionField", "django.db.models.UUIDField" ]
[((725, 772), 'os.path.join', 'os.path.join', (['APP_LABEL', 'PUBLICATION_UPLOAD_DIR'], {}), '(APP_LABEL, PUBLICATION_UPLOAD_DIR)\n', (737, 772), False, 'import os\n'), ((1323, 1352), 'django.db.models.UUIDField', 'models.UUIDField', ([], {'blank': '(False)'}), '(blank=False)\n', (1339, 1352), False, 'from django.db im...
# -*- coding: utf-8 -*- import os import shutil from django.conf import settings from django.core.management import call_command from django.test import TestCase from six import StringIO try: from unittest.mock import patch except ImportError: from mock import patch class CreateCommandTests(TestCase): "...
[ "os.path.getsize", "mock.patch", "django.core.management.call_command", "os.path.join", "os.path.isfile", "os.mkdir", "shutil.rmtree", "os.remove" ]
[((1716, 1758), 'mock.patch', 'patch', (['"""sys.stdout"""'], {'new_callable': 'StringIO'}), "('sys.stdout', new_callable=StringIO)\n", (1721, 1758), False, 'from mock import patch\n'), ((2144, 2186), 'mock.patch', 'patch', (['"""sys.stdout"""'], {'new_callable': 'StringIO'}), "('sys.stdout', new_callable=StringIO)\n",...
import ADT_of_person as AP import datetime as dm #ADT Staff() # Staff(self, str name, str sex, tuple birthday, tuple entey_date, int salary, str position) # name(self) # sex(self) # en_year(self) # salary(self) # set_salary(self, new_salary) # position(self) # set_position(self, new_position...
[ "datetime.date", "ADT_of_person.PersonValueError" ]
[((503, 521), 'datetime.date', 'dm.date', (['*birthday'], {}), '(*birthday)\n', (510, 521), True, 'import datetime as dm\n'), ((806, 827), 'ADT_of_person.PersonValueError', 'AP.PersonValueError', ([], {}), '()\n', (825, 827), True, 'import ADT_of_person as AP\n'), ((863, 881), 'datetime.date', 'dm.date', (['*birthday']...
""" Test signal handlers for completion. """ from datetime import datetime from unittest.mock import patch import ddt import pytest from completion import handlers from completion.models import BlockCompletion from completion.test_utils import CompletionSetUpMixin from django.test import TestCase from pytz import utc...
[ "datetime.datetime.utcnow", "completion.models.BlockCompletion.objects.get", "xblock.core.XBlock.register_temp_plugin", "pytest.raises", "completion.models.BlockCompletion.objects.filter", "ddt.data", "unittest.mock.patch" ]
[((2066, 2114), 'ddt.data', 'ddt.data', (['(True, 0.0)', '(False, 1.0)', '(None, 1.0)'], {}), '((True, 0.0), (False, 1.0), (None, 1.0))\n', (2074, 2114), False, 'import ddt\n'), ((2562, 2629), 'xblock.core.XBlock.register_temp_plugin', 'XBlock.register_temp_plugin', (['CustomScorableBlock', '"""custom_scorable"""'], {}...
from typing import Tuple import pygame import numpy as np from .wall import Wall class MovingWall(Wall): def __init__(self, top: int = 0, left: int = 0, bottom: int = 1, right: int = 1): super().__init__(top, left, bottom, right) ...
[ "pygame.Surface", "pygame.mask.from_surface", "pygame.Rect" ]
[((633, 672), 'pygame.mask.from_surface', 'pygame.mask.from_surface', (['self.surf', '(50)'], {}), '(self.surf, 50)\n', (657, 672), False, 'import pygame\n'), ((810, 847), 'pygame.Rect', 'pygame.Rect', (['left', 'top', 'width', 'height'], {}), '(left, top, width, height)\n', (821, 847), False, 'import pygame\n'), ((480...
import tensorflow as tf import os from bayes_filter import logging from bayes_filter.filters import FreeTransitionVariationalBayes from bayes_filter.feeds import DatapackFeed, IndexFeed from bayes_filter.misc import make_example_datapack, maybe_create_posterior_solsets, get_screen_directions from bayes_filter.datapack ...
[ "tensorflow.Graph", "bayes_filter.misc.get_screen_directions", "tensorflow.device", "bayes_filter.filters.FreeTransitionVariationalBayes", "os.makedirs", "os.path.abspath", "bayes_filter.logging.info", "bayes_filter.datapack._load_array_file", "bayes_filter.misc.maybe_create_posterior_solsets", "b...
[((490, 531), 'os.makedirs', 'os.makedirs', (['output_folder'], {'exist_ok': '(True)'}), '(output_folder, exist_ok=True)\n', (501, 531), False, 'import os\n'), ((945, 1052), 'bayes_filter.datapack.DataPack', 'DataPack', (['"""/net/lofar1/data1/albert/imaging/data/P126+65_compact_raw/P126+65_full_compact_raw.h5"""'], {}...
from typing import Dict, Any, Optional, List import gym import numpy as np from collections import defaultdict from flatland.core.grid.grid4_utils import get_new_position from flatland.envs.agent_utils import EnvAgent, RailAgentStatus from flatland.envs.rail_env import RailEnv, RailEnvActions from envs.flatland.obse...
[ "gym.spaces.Discrete", "envs.flatland.observations.segment_graph.Graph.get_virtual_position", "gym.spaces.Box", "numpy.count_nonzero", "numpy.argmax", "collections.defaultdict", "envs.flatland.utils.gym_env.StepOutput", "flatland.utils.rendertools.RenderTool", "flatland.core.grid.grid4_utils.get_new...
[((5246, 5263), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (5257, 5263), False, 'from collections import defaultdict\n'), ((6896, 6918), 'envs.flatland.utils.gym_env.StepOutput', 'StepOutput', (['o', 'r', 'd', 'i'], {}), '(o, r, d, i)\n', (6906, 6918), False, 'from envs.flatland.utils.gym_env...
import torch from torch import nn class CBOWClassifier(nn.Module): """ Continuous bag of words classifier. """ def __init__(self, hidden_size, input_size, max_pool, dropout=0.5): """ :param hidden_size: :param input_size: :param max_pool: if true then max pool over word ...
[ "torch.nn.Sigmoid", "torch.nn.Dropout", "torch.nn.Tanh", "torch.nn.Linear" ]
[((573, 594), 'torch.nn.Dropout', 'nn.Dropout', ([], {'p': 'dropout'}), '(p=dropout)\n', (583, 594), False, 'from torch import nn\n'), ((614, 658), 'torch.nn.Linear', 'nn.Linear', (['self.input_size', 'self.hidden_size'], {}), '(self.input_size, self.hidden_size)\n', (623, 658), False, 'from torch import nn\n'), ((678,...
import numpy as np import cv2 as cv img = cv.imread('1.jpeg',cv.IMREAD_COLOR) #for polygon we need to have set of points so we create a numpy array. and pts is an object. pts = np.array([[20,33],[300,120], [67,79], [123,111], [144,134]], np.int32) #the method polylines will actully draws a polygon by taking differe...
[ "cv2.polylines", "cv2.imshow", "numpy.array", "cv2.destroyAllWindows", "cv2.waitKey", "cv2.imread" ]
[((43, 79), 'cv2.imread', 'cv.imread', (['"""1.jpeg"""', 'cv.IMREAD_COLOR'], {}), "('1.jpeg', cv.IMREAD_COLOR)\n", (52, 79), True, 'import cv2 as cv\n'), ((180, 256), 'numpy.array', 'np.array', (['[[20, 33], [300, 120], [67, 79], [123, 111], [144, 134]]', 'np.int32'], {}), '([[20, 33], [300, 120], [67, 79], [123, 111],...
#!/usr/bin/env python2 from BeautifulSoup import BeautifulSoup, NavigableString import urllib import string import re class Entry(object): def __init__(self, name, value, description, url): self.name = name self.value = value self.description = description self.url = url def ...
[ "BeautifulSoup.NavigableString", "re.sub" ]
[((3236, 3277), 're.sub', 're.sub', (['"""<\\\\s*b\\\\s*>"""', '"""<i>"""', 'description'], {}), "('<\\\\s*b\\\\s*>', '<i>', description)\n", (3242, 3277), False, 'import re\n'), ((3314, 3361), 're.sub', 're.sub', (['"""<\\\\s*/\\\\s*b\\\\s*>"""', '"""</i>"""', 'description'], {}), "('<\\\\s*/\\\\s*b\\\\s*>', '</i>', d...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You ma...
[ "logging.getLogger", "os.open", "os.remove", "os.path.exists", "asyncio.StreamReader", "asyncio.StreamReaderProtocol", "asyncio.sleep", "asyncio.get_event_loop", "os.close", "os.write", "struct.pack", "aea.exceptions.enforce", "asyncio.open_connection", "tempfile.mkdtemp", "struct.unpack...
[((1210, 1237), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1227, 1237), False, 'import logging\n'), ((4405, 4468), 'os.open', 'os.open', (['self._in_path', '(os.O_RDONLY | os.O_NONBLOCK | os.O_SYNC)'], {}), '(self._in_path, os.O_RDONLY | os.O_NONBLOCK | os.O_SYNC)\n', (4412, 4468), F...
import scipy, numpy, typing, numbers from tequila.objective import Objective from tequila.objective.objective import assign_variable, Variable, format_variable_dictionary, format_variable_list from .optimizer_base import Optimizer from ._containers import _EvalContainer, _GradContainer, _HessContainer, _QngContainer fr...
[ "collections.namedtuple", "tequila.objective.objective.format_variable_dictionary", "tequila.tools.qng.get_qng_combos", "scipy.optimize.minimize", "numpy.array", "tequila.utils.exceptions.TequilaException", "tequila.objective.objective.assign_variable" ]
[((587, 654), 'collections.namedtuple', 'namedtuple', (['"""SciPyReturnType"""', '"""energy angles history scipy_output"""'], {}), "('SciPyReturnType', 'energy angles history scipy_output')\n", (597, 654), False, 'from collections import namedtuple\n'), ((16511, 16552), 'tequila.objective.objective.format_variable_dict...
# # This file is part of the chi repository # (https://github.com/DavAug/chi/) which is released under the # BSD 3-clause license. See accompanying LICENSE.md for copyright notice and # full license details. # import copy import myokit import myokit.formats.sbml as sbml import numpy as np class MechanisticModel(obj...
[ "numpy.alltrue", "myokit.formats.sbml.SBMLImporter", "myokit.pacing.blocktrain", "myokit.Simulation", "numpy.argsort", "numpy.array", "numpy.zeros", "numpy.sum", "numpy.empty", "copy.deepcopy", "copy.copy", "myokit.Name" ]
[((984, 1014), 'myokit.Simulation', 'myokit.Simulation', (['self._model'], {}), '(self._model)\n', (1001, 1014), False, 'import myokit\n'), ((1824, 1844), 'numpy.array', 'np.array', (['parameters'], {}), '(parameters)\n', (1832, 1844), True, 'import numpy as np\n'), ((2721, 2738), 'numpy.argsort', 'np.argsort', (['name...
## Copyright (c) 2022, Team FirmWire ## SPDX-License-Identifier: BSD-3-Clause from enum import Enum, auto from .hw.soc import SOCPeripheral class MemoryMapEntryType(Enum): GENERIC = auto() FILE_BACKED = auto() PERIPHERAL = auto() ANNOTATION = auto() class MemoryMapEntry: def __init__(self, ty, s...
[ "enum.auto" ]
[((188, 194), 'enum.auto', 'auto', ([], {}), '()\n', (192, 194), False, 'from enum import Enum, auto\n'), ((213, 219), 'enum.auto', 'auto', ([], {}), '()\n', (217, 219), False, 'from enum import Enum, auto\n'), ((237, 243), 'enum.auto', 'auto', ([], {}), '()\n', (241, 243), False, 'from enum import Enum, auto\n'), ((26...
from vue.bridge import Object import javascript class VueDecorator: __key__ = None __parents__ = () __id__ = None __value__ = None def update(self, vue_dict): base = vue_dict for parent in self.__parents__: base = vue_dict.setdefault(parent, {}) if self.__id__...
[ "vue.bridge.Object.from_js", "javascript.this" ]
[((882, 899), 'vue.bridge.Object.from_js', 'Object.from_js', (['v'], {}), '(v)\n', (896, 899), False, 'from vue.bridge import Object\n'), ((744, 761), 'javascript.this', 'javascript.this', ([], {}), '()\n', (759, 761), False, 'import javascript\n'), ((824, 843), 'vue.bridge.Object.from_js', 'Object.from_js', (['arg'], ...
import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import keras from keras.models import Model, load_model from keras import backend as K from keras.preprocessing.image import ImageDataGenerator import tensorflow as tf tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR) # mute deprecation warnings from kera...
[ "keras.optimizers.Adam", "os.path.exists", "keras.models.load_model", "keras.callbacks.ModelCheckpoint", "tensorflow.Session", "tensorflow.compat.v1.logging.set_verbosity", "keras.preprocessing.image.ImageDataGenerator", "os.path.isdir", "keras.backend.clear_session", "os.mkdir", "tensorflow.Con...
[((220, 282), 'tensorflow.compat.v1.logging.set_verbosity', 'tf.compat.v1.logging.set_verbosity', (['tf.compat.v1.logging.ERROR'], {}), '(tf.compat.v1.logging.ERROR)\n', (254, 282), True, 'import tensorflow as tf\n'), ((797, 814), 'keras.backend.clear_session', 'K.clear_session', ([], {}), '()\n', (812, 814), True, 'fr...
from setuptools import setup, find_packages __name__ = "appJar" __version__ = "0.94.0" __author__ = "<NAME>" __desc__ = "An easy-to-use, feature-rich GUI wrapper for tKinter. Designed specifically for use in the classroom, but powerful enough to be used anywhere." __author_email__ = "<E...
[ "setuptools.setup" ]
[((1268, 1794), 'setuptools.setup', 'setup', ([], {'name': '__name__', 'packages': '__packages__', 'version': '__version__', 'description': '__desc__', 'long_description': '__long_description__', 'long_description_content_type': '"""text/markdown"""', 'author': '__author__', 'author_email': '__author_email__', 'url': '...
import shapefile class Andir: def __init__(self): self.kelurahan = shapefile.Writer( 'kelurahan_andir', shapeType=shapefile.POLYGON) self.kelurahan.shapeType self.kelurahan.field('kelurahan_di_andir', 'C') self.kantor = shapefile.Writer( 'kantor_kelurahan_a...
[ "shapefile.Writer" ]
[((81, 145), 'shapefile.Writer', 'shapefile.Writer', (['"""kelurahan_andir"""'], {'shapeType': 'shapefile.POLYGON'}), "('kelurahan_andir', shapeType=shapefile.POLYGON)\n", (97, 145), False, 'import shapefile\n'), ((271, 340), 'shapefile.Writer', 'shapefile.Writer', (['"""kantor_kelurahan_andir"""'], {'shapeType': 'shap...
# Copyright 2016-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import torch, glob, os from .sparseConvNetTensor import SparseConvNetTensor from .metadata import Metadata import sparsecon...
[ "torch.index_select", "sparseconvnet.SCN.ResolutionBasedScattering", "torch.LongTensor", "torch.load", "torch.floor", "torch.Tensor", "torch.max", "os.path.isfile", "torch.ceil", "torch.no_grad", "torch.svd", "torch.sum", "glob.glob", "threading.Thread", "Queue.Queue", "torch.cat", "...
[((1504, 1545), 'torch.cat', 'torch.cat', (['[i.features for i in input]', '(1)'], {}), '([i.features for i in input], 1)\n', (1513, 1545), False, 'import torch, glob, os\n'), ((6751, 6763), 'torch.svd', 'torch.svd', (['w'], {}), '(w)\n', (6760, 6763), False, 'import torch, glob, os\n'), ((7126, 7141), 'torch.cat', 'to...
import json from django.core.exceptions import ObjectDoesNotExist from django.db import transaction from treebeard.mp_tree import MP_Node try: from wagtail.core.blocks import StreamValue except ImportError: # pragma: no cover; fallback for Wagtail < 2.0 from wagtail.wagtailcore.blocks import StreamValue ...
[ "json.dumps", "json.loads", "treebeard.mp_tree.MP_Node._get_path", "wagtail.wagtailcore.blocks.StreamValue" ]
[((538, 632), 'treebeard.mp_tree.MP_Node._get_path', 'MP_Node._get_path', (['parent_page.path', '(parent_page.depth + 1)', '(parent_page.numchild + offset)'], {}), '(parent_page.path, parent_page.depth + 1, parent_page.\n numchild + offset)\n', (555, 632), False, 'from treebeard.mp_tree import MP_Node\n'), ((2104, 2...
from collections import OrderedDict from unittest import TestCase from frozenordereddict import FrozenOrderedDict class TestFrozenOrderedDict(TestCase): ITEMS_1 = ( ("b", 2), ("a", 1), ) ITEMS_2 = ( ("d", 4), ("c", 3), ) ODICT_1 = OrderedDict(ITEMS_1) ODICT_2 ...
[ "collections.OrderedDict", "frozenordereddict.FrozenOrderedDict" ]
[((287, 307), 'collections.OrderedDict', 'OrderedDict', (['ITEMS_1'], {}), '(ITEMS_1)\n', (298, 307), False, 'from collections import OrderedDict\n'), ((322, 342), 'collections.OrderedDict', 'OrderedDict', (['ITEMS_2'], {}), '(ITEMS_2)\n', (333, 342), False, 'from collections import OrderedDict\n'), ((394, 425), 'froze...
import random import unittest from serial.serialutil import SerialException from data_gateway.dummy_serial import DummySerial, constants, exceptions, random_bytes, random_string from tests.base import BaseTestCase class DummySerialTest(BaseTestCase): def setUp(self): """Set up the test environment: ...
[ "data_gateway.dummy_serial.random_bytes", "data_gateway.dummy_serial.random_string", "data_gateway.dummy_serial.DummySerial", "unittest.main", "random.randint" ]
[((7544, 7559), 'unittest.main', 'unittest.main', ([], {}), '()\n', (7557, 7559), False, 'import unittest\n'), ((446, 461), 'data_gateway.dummy_serial.random_string', 'random_string', ([], {}), '()\n', (459, 461), False, 'from data_gateway.dummy_serial import DummySerial, constants, exceptions, random_bytes, random_str...
# -*- coding: utf-8 -*- """ Created on %(date)s @author: %Christian """ """ #BASE +BN层 #dropout改为0.15 """ import paddle import paddle.nn as nn import paddle.nn.functional as F import paddlenlp as ppnlp class QuestionMatching_base(nn.Layer): ''' base模型 dropout改为0.15 ''' de...
[ "paddle.nn.BatchNorm1D", "paddle.nn.Dropout", "paddle.nn.Linear", "paddle.nn.ReLU" ]
[((475, 527), 'paddle.nn.Dropout', 'nn.Dropout', (['(dropout if dropout is not None else 0.15)'], {}), '(dropout if dropout is not None else 0.15)\n', (485, 527), True, 'import paddle.nn as nn\n'), ((582, 626), 'paddle.nn.Linear', 'nn.Linear', (["self.ptm.config['hidden_size']", '(2)'], {}), "(self.ptm.config['hidden_s...
from functools import partialmethod import pandas as pd from sqlalchemy.orm import sessionmaker from sqlalchemy import create_engine import sqlite3 import click import json import pkg_resources from itertools import combinations from q2_mlab.db.schema import RegressionScore from q2_mlab.plotting.components import ( ...
[ "bokeh.transform.factor_cmap", "q2_mlab.plotting.components.DataSourceComponent", "bokeh.layouts.column", "bokeh.layouts.row", "bokeh.plotting.figure", "bokeh.models.LegendItem", "bokeh.models.widgets.Div", "q2_mlab.plotting.components.ScatterComponent", "pandas.read_sql_table", "click.group", "...
[((20971, 20999), 'click.group', 'click.group', (['"""mlab-plotting"""'], {}), "('mlab-plotting')\n", (20982, 20999), False, 'import click\n'), ((1122, 1189), 'pkg_resources.resource_stream', 'pkg_resources.resource_stream', (['__name__', '"""standard_deviations.json"""'], {}), "(__name__, 'standard_deviations.json')\n...
from AIPS import AIPS from AIPSTask import AIPSTask from AIPSData import AIPSImage from ObitTask import ObitTask AIPS.userno = 103 image = AIPSImage('MANDELBROT', 'MANDL', 1, 1) mandl = AIPSTask('mandl') mandl.outdata = image mandl.imsize[1:] = [ 512, 512 ] mandl.go() try: template = ObitTask('Template') te...
[ "AIPSTask.AIPSTask", "ObitTask.ObitTask", "AIPSData.AIPSImage" ]
[((141, 179), 'AIPSData.AIPSImage', 'AIPSImage', (['"""MANDELBROT"""', '"""MANDL"""', '(1)', '(1)'], {}), "('MANDELBROT', 'MANDL', 1, 1)\n", (150, 179), False, 'from AIPSData import AIPSImage\n'), ((189, 206), 'AIPSTask.AIPSTask', 'AIPSTask', (['"""mandl"""'], {}), "('mandl')\n", (197, 206), False, 'from AIPSTask impor...
import bpy import bmesh import numpy from random import randint import time # pointsToVoxels() has been modified from the function generate_blocks() in https://github.com/cagcoach/BlenderPlot/blob/master/blendplot.py # Some changes to accomodate Blender 2.8's API changes were made, # and the function has been made m...
[ "numpy.tile", "numpy.reshape", "numpy.unique", "bmesh.update_edit_mesh", "bpy.data.objects.new", "bpy.data.meshes.new", "bpy.context.collection.objects.link", "bmesh.new", "numpy.array", "time.time", "bpy.ops.mesh.primitive_cube_add" ]
[((721, 749), 'numpy.unique', 'numpy.unique', (['points'], {'axis': '(0)'}), '(points, axis=0)\n', (733, 749), False, 'import numpy\n'), ((806, 833), 'bpy.data.meshes.new', 'bpy.data.meshes.new', (['"""mesh"""'], {}), "('mesh')\n", (825, 833), False, 'import bpy\n'), ((862, 894), 'bpy.data.objects.new', 'bpy.data.objec...
#!/usr/bin/python #-*-coding:utf-8-*- import json import sys import time # TBD: auto discovery # data_path = "/proc/fs/lustre/llite/nvmefs-ffff883f8a4f2800/stats" data_path = "/proc/fs/lustre/lmv/shnvme3-clilmv-ffff8859d3e2d000/md_stats" # use a dic1/dic2 to hold sampling data def load_data(dic): # Open file ...
[ "json.dumps", "time.sleep" ]
[((942, 1003), 'json.dumps', 'json.dumps', (['dic'], {'indent': '(2)', 'sort_keys': '(True)', 'ensure_ascii': '(False)'}), '(dic, indent=2, sort_keys=True, ensure_ascii=False)\n', (952, 1003), False, 'import json\n'), ((1868, 1881), 'time.sleep', 'time.sleep', (['(2)'], {}), '(2)\n', (1878, 1881), False, 'import time\n...
import unittest from hashlib import sha1 import pickle import numpy as np from datasketch.lsh import MinHashLSH from datasketch.minhash import MinHash from datasketch.weighted_minhash import WeightedMinHashGenerator class TestMinHashLSH(unittest.TestCase): def test_init(self): lsh = MinHashLSH(threshold=...
[ "datasketch.lsh.MinHashLSH", "datasketch.weighted_minhash.WeightedMinHashGenerator", "pickle.dumps", "datasketch.minhash.MinHash", "numpy.random.uniform", "unittest.main" ]
[((5700, 5715), 'unittest.main', 'unittest.main', ([], {}), '()\n', (5713, 5715), False, 'import unittest\n'), ((299, 324), 'datasketch.lsh.MinHashLSH', 'MinHashLSH', ([], {'threshold': '(0.8)'}), '(threshold=0.8)\n', (309, 324), False, 'from datasketch.lsh import MinHashLSH\n'), ((409, 454), 'datasketch.lsh.MinHashLSH...