code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# -*- coding: utf-8 -*- from .provider import MendeleyCitationsProvider from website.citations.views import GenericCitationViews mendeley_views = GenericCitationViews('mendeley', MendeleyCitationsProvider)
[ "website.citations.views.GenericCitationViews" ]
[((147, 206), 'website.citations.views.GenericCitationViews', 'GenericCitationViews', (['"""mendeley"""', 'MendeleyCitationsProvider'], {}), "('mendeley', MendeleyCitationsProvider)\n", (167, 206), False, 'from website.citations.views import GenericCitationViews\n')]
# Copyright 2017 Google 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 agreed to in wr...
[ "httplib2.Http", "google.cloud.datastore.Client", "logging.debug", "webapp2.get_app", "google.cloud.resource_manager.Client", "oauth2client.client.GoogleCredentials.get_application_default", "threading.local" ]
[((2574, 2591), 'threading.local', 'threading.local', ([], {}), '()\n', (2589, 2591), False, 'import threading\n'), ((2997, 3022), 'httplib2.Http', 'httplib2.Http', ([], {'timeout': '(60)'}), '(timeout=60)\n', (3010, 3022), False, 'import httplib2\n'), ((4895, 4913), 'google.cloud.datastore.Client', 'datastore.Client',...
# -*- coding: utf-8 -*- import os from io import StringIO import json import pytest from unittest.mock import patch from bdea.client import BDEAClient, URLError from bdea.client import is_disposable_domain, is_disposable_email class TestBDEAClientRequest(object): def test_urlerror_returns_empty(self): ...
[ "io.StringIO", "bdea.client.is_disposable_email", "json.dumps", "os.environ.get", "unittest.mock.patch", "pytest.raises", "bdea.client.is_disposable_domain", "bdea.client.URLError", "bdea.client.BDEAClient" ]
[((1155, 1175), 'bdea.client.BDEAClient', 'BDEAClient', (['"""apikey"""'], {}), "('apikey')\n", (1165, 1175), False, 'from bdea.client import BDEAClient, URLError\n'), ((2180, 2230), 'os.environ.get', 'os.environ.get', (['"""BDEA_APIKEY"""', 'self.APIKEY_INVALID'], {}), "('BDEA_APIKEY', self.APIKEY_INVALID)\n", (2194, ...
# Copyright (c) 2015-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. from __future__ import print_function import httplib import logging import os import re import socket import ssl import subproce...
[ "subprocess.Popen", "os.path.basename", "ssl.create_default_context", "httplib.HTTPConnection", "subprocess.CalledProcessError", "socket.inet_aton", "sys.exc_info", "httplib.HTTPSConnection", "socket.inet_pton", "re.search", "logging.getLogger" ]
[((344, 370), 'logging.getLogger', 'logging.getLogger', (['"""utils"""'], {}), "('utils')\n", (361, 370), False, 'import logging\n'), ((764, 857), 'subprocess.Popen', 'subprocess.Popen', (['args'], {'stdout': 'subprocess.PIPE', 'stderr': 'subprocess.PIPE', 'cwd': 'cwd', 'env': 'env'}), '(args, stdout=subprocess.PIPE, s...
import pytest import reinas.queens as queens import numpy as np import models.consultas as consultas def test_numero_reinas(numero): n = int(numero) lista_soluciones = [] session = consultas.loadSession() tablero = np.zeros(shape=(n,n),dtype=int) queens.n_reinas(tablero,0,lista_soluciones) ...
[ "models.consultas.num_soluciones", "models.consultas.loadSession", "numpy.zeros", "reinas.queens.n_reinas" ]
[((194, 217), 'models.consultas.loadSession', 'consultas.loadSession', ([], {}), '()\n', (215, 217), True, 'import models.consultas as consultas\n'), ((232, 265), 'numpy.zeros', 'np.zeros', ([], {'shape': '(n, n)', 'dtype': 'int'}), '(shape=(n, n), dtype=int)\n', (240, 265), True, 'import numpy as np\n'), ((272, 317), ...
from django.urls import path, re_path from . import views urlpatterns = [ path('category/<str:category>/', views.article_list, name='article-list'), path('tag/<str:tag_name>/', views.article_tag_list, name='article-tag-list'), path('<int:pk>/', views.article_detail, name='article-detail-id'), #path('<...
[ "django.urls.path" ]
[((80, 153), 'django.urls.path', 'path', (['"""category/<str:category>/"""', 'views.article_list'], {'name': '"""article-list"""'}), "('category/<str:category>/', views.article_list, name='article-list')\n", (84, 153), False, 'from django.urls import path, re_path\n'), ((159, 235), 'django.urls.path', 'path', (['"""tag...
import logging from shapely.geometry.multipolygon import MultiPolygon from shapely.geometry.polygon import Polygon from snapshottest import TestCase from graphic_coloring_engine.core import ( Color, ColorChoice, ColoringEngine, ColoringEngineConstants, Coordinate, DominantColor, Layer, ...
[ "graphic_coloring_engine.core.ColoringEngine", "graphic_coloring_engine.core.DominantColor", "graphic_coloring_engine.core.ColorChoice", "graphic_coloring_engine.core.Layer", "shapely.geometry.polygon.Polygon", "graphic_coloring_engine.core.Color", "graphic_coloring_engine.core.ColoringEngineConstants",...
[((341, 368), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (358, 368), False, 'import logging\n'), ((429, 454), 'graphic_coloring_engine.core.ColoringEngineConstants', 'ColoringEngineConstants', ([], {}), '()\n', (452, 454), False, 'from graphic_coloring_engine.core import Color, ColorC...
''' hooks for using tensorRT with the object detection program. names and parameters are defined as required by the detect.py infrastructure. ''' import tensorflow as tf import tensorflow.contrib.tensorrt as trt def load_graph_tensorrt(params): graph_def = tf.compat.v1.GraphDef() with tf.compat.v1.gfile.GFile(pa...
[ "tensorflow.compat.v1.gfile.GFile", "tensorflow.contrib.tensorrt.create_inference_graph", "tensorflow.import_graph_def", "tensorflow.get_default_graph", "tensorflow.compat.v1.GraphDef" ]
[((262, 285), 'tensorflow.compat.v1.GraphDef', 'tf.compat.v1.GraphDef', ([], {}), '()\n', (283, 285), True, 'import tensorflow as tf\n'), ((452, 809), 'tensorflow.contrib.tensorrt.create_inference_graph', 'trt.create_inference_graph', ([], {'input_graph_def': 'graph_def', 'outputs': "['detection_boxes:0', 'detection_sc...
import unittest import os import sys FILE_PATH = os.path.dirname(os.path.abspath(__file__)) sys.path.append(FILE_PATH) from ZTF_correction import * if __name__ == "__main__": unittest.main()
[ "sys.path.append", "os.path.abspath", "unittest.main" ]
[((92, 118), 'sys.path.append', 'sys.path.append', (['FILE_PATH'], {}), '(FILE_PATH)\n', (107, 118), False, 'import sys\n'), ((65, 90), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (80, 90), False, 'import os\n'), ((181, 196), 'unittest.main', 'unittest.main', ([], {}), '()\n', (194, 196), ...
import os class Config(object): SECRET_KEY = os.environ.get('SECRET_KEY') or os.urandom(32) SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or 'postgresql://superiorkid:root@localhost/todo' SQLALCHEMY_TRACK_MODIFICATIONS = False
[ "os.environ.get", "os.urandom" ]
[((48, 76), 'os.environ.get', 'os.environ.get', (['"""SECRET_KEY"""'], {}), "('SECRET_KEY')\n", (62, 76), False, 'import os\n'), ((80, 94), 'os.urandom', 'os.urandom', (['(32)'], {}), '(32)\n', (90, 94), False, 'import os\n'), ((123, 153), 'os.environ.get', 'os.environ.get', (['"""DATABASE_URL"""'], {}), "('DATABASE_UR...
from pyllist import dllist #Classical implementation, requires manipulations with indexes def ins_sort(array): for i in range(1, len(array)): for k in range(i, 0, -1): if array[k] < array[k - 1]: array[k], array[k - 1] = array[k - 1], array[k] return array #Linked-list im...
[ "pyllist.dllist" ]
[((1238, 1280), 'pyllist.dllist', 'dllist', (['[6, 5, 32, 8, 234, 5, 1, 9, 0, 33]'], {}), '([6, 5, 32, 8, 234, 5, 1, 9, 0, 33])\n', (1244, 1280), False, 'from pyllist import dllist\n'), ((1329, 1371), 'pyllist.dllist', 'dllist', (['[6, 5, 32, 8, 234, 5, 1, 9, 0, 33]'], {}), '([6, 5, 32, 8, 234, 5, 1, 9, 0, 33])\n', (13...
""" Script for generating a .csv.cuck file with a few parameters. """ import sys, os, random def getPathFromFileName(fname): if not fname.find(os.path.pathsep): fname = os.path.join(os.path.dirname(__file__), fname) return fname if __name__ == "__main__": ### arg parsing if len(sys.argv) < 5 ...
[ "os.path.dirname", "random.randint", "random.getrandbits" ]
[((195, 220), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (210, 220), False, 'import sys, os, random\n'), ((1503, 1524), 'random.getrandbits', 'random.getrandbits', (['(8)'], {}), '(8)\n', (1521, 1524), False, 'import sys, os, random\n'), ((1549, 1581), 'random.randint', 'random.randint', ...
import pcbnew import os from .pcbnew2boardview import convert class Pcbnew2Boardview(pcbnew.ActionPlugin): def defaults(self): self.name = "Pcbnew to Boardview" self.category = "Read PCB" self.description = "Generate Boardview file from KiCad pcb." def Run(self): kicad_pcb =...
[ "pcbnew.GetBoard" ]
[((321, 338), 'pcbnew.GetBoard', 'pcbnew.GetBoard', ([], {}), '()\n', (336, 338), False, 'import pcbnew\n')]
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-09-12 02:37 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('monitor', '0003_auto_20170912_1018'), ] operations = [ migrations.AddField(...
[ "django.db.models.DecimalField" ]
[((409, 473), 'django.db.models.DecimalField', 'models.DecimalField', ([], {'decimal_places': '(20)', 'default': '(0)', 'max_digits': '(30)'}), '(decimal_places=20, default=0, max_digits=30)\n', (428, 473), False, 'from django.db import migrations, models\n'), ((639, 703), 'django.db.models.DecimalField', 'models.Decim...
import argparse import datetime DESCRIPTION = "Convert markdown to hugo post page" HUGO_POST_FORMAT = """--- title: "{}" date: {} --- <!--more--> """ def convert(source, dest, img_dest, time): assert isinstance(source, file) assert isinstance(dest, file) # create heading title = source.readline()....
[ "datetime.datetime.now", "argparse.ArgumentParser", "argparse.FileType" ]
[((745, 793), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': 'DESCRIPTION'}), '(description=DESCRIPTION)\n', (768, 793), False, 'import argparse\n'), ((394, 417), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (415, 417), False, 'import datetime\n'), ((931, 953), 'argpar...
import inspect import pytest import acconeer.exptool.structs.configbase as cb from acconeer.exptool import configs from acconeer.exptool.clients.reg import regmap from acconeer.exptool.modes import Mode BO = regmap.BYTEORDER def test_full_names_unique(): unique_names = set([r.full_name for r in regmap.REGISTE...
[ "acconeer.exptool.clients.reg.regmap.get_reg", "pytest.raises", "pytest.approx", "acconeer.exptool.configs.MODE_TO_CONFIG_CLASS_MAP.items", "inspect.getmembers" ]
[((418, 442), 'acconeer.exptool.clients.reg.regmap.get_reg', 'regmap.get_reg', (['"""status"""'], {}), "('status')\n", (432, 442), False, 'from acconeer.exptool.clients.reg import regmap\n'), ((1233, 1259), 'acconeer.exptool.clients.reg.regmap.get_reg', 'regmap.get_reg', (['"""sp_start"""'], {}), "('sp_start')\n", (124...
"""Align face images given landmarks.""" # MIT License # # Copyright (c) 2017 <NAME> # # 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...
[ "align.matlab_cp2tform.get_similarity_transform_for_cv2", "numpy.argmax", "numpy.power", "numpy.ones", "align.mtcnntf.detector.detect", "cv2.warpAffine", "numpy.array", "numpy.matmul", "numpy.vstack" ]
[((1998, 2036), 'align.matlab_cp2tform.get_similarity_transform_for_cv2', 'get_similarity_transform_for_cv2', (['s', 'r'], {}), '(s, r)\n', (2030, 2036), False, 'from align.matlab_cp2tform import get_similarity_transform_for_cv2\n'), ((2051, 2091), 'cv2.warpAffine', 'cv2.warpAffine', (['src_img', 'tfm', 'image_size'], ...
import pyttsx3 class Speak: def __init__(self): self.speaker = pyttsx3.init(driverName='sapi5') # self.speaker.setProperty('voice', 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_EN-US_ZIRA_11.0') def speak(self, text): pass self.speaker.say(text) s...
[ "pyttsx3.init" ]
[((77, 109), 'pyttsx3.init', 'pyttsx3.init', ([], {'driverName': '"""sapi5"""'}), "(driverName='sapi5')\n", (89, 109), False, 'import pyttsx3\n')]
from flask import render_template, request, redirect, url_for, session from app import app from model import * @app.route('/', methods=["GET"]) def home(): if "username" in session: return render_template('index.html') else: return render_template('login.html') # Register new user @app.route('...
[ "app.app.route", "flask.url_for", "flask.session.pop", "flask.render_template" ]
[((113, 144), 'app.app.route', 'app.route', (['"""/"""'], {'methods': "['GET']"}), "('/', methods=['GET'])\n", (122, 144), False, 'from app import app\n'), ((309, 356), 'app.app.route', 'app.route', (['"""/register"""'], {'methods': "['GET', 'POST']"}), "('/register', methods=['GET', 'POST'])\n", (318, 356), False, 'fr...
import torch, numpy as np, glob, math, torch.utils.data, scipy.ndimage, multiprocessing as mp import math import MinkowskiEngine as ME from torch.utils.data.sampler import Sampler import os,sys MAX_POINTS=3000000 SEM_COLOR_MAP = { 0: (0., 0., 0.), 1: (174., 199., 232.), 2: (152., 223., 138.), 3: (31.,...
[ "torch.utils.data.DataLoader", "MinkowskiEngine.utils.sparse_quantize", "numpy.floor", "torch.load", "numpy.ones", "numpy.hstack", "multiprocessing.cpu_count", "numpy.cumsum", "torch.utils.data.Dataset.__init__", "torch.randperm", "glob.glob", "torch.zeros", "numpy.vstack", "torch.from_num...
[((1684, 1696), 'numpy.ones', 'np.ones', (['(150)'], {}), '(150)\n', (1691, 1696), True, 'import torch, numpy as np, glob, math, torch.utils.data, scipy.ndimage, multiprocessing as mp\n'), ((2012, 2023), 'numpy.ones', 'np.ones', (['(22)'], {}), '(22)\n', (2019, 2023), True, 'import torch, numpy as np, glob, math, torch...
# Copyright 2021, Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
[ "tensorflow_federated.SequenceType", "tensorflow_federated.federated_zip", "tensorflow_federated.python.tensorflow_libs.tensor_utils.zero_all_if_any_non_finite", "collections.OrderedDict", "tensorflow_federated.templates.IterativeProcess", "attr.s", "attr.ib", "tensorflow_federated.federated_map", "...
[((2168, 2210), 'attr.s', 'attr.s', ([], {'eq': '(False)', 'order': '(False)', 'frozen': '(True)'}), '(eq=False, order=False, frozen=True)\n', (2174, 2210), False, 'import attr\n'), ((4822, 4864), 'attr.s', 'attr.s', ([], {'eq': '(False)', 'order': '(False)', 'frozen': '(True)'}), '(eq=False, order=False, frozen=True)\...
#! /usr/bin/python3.7 from common import test_input_integer, \ handle_age_input, \ num_denum, \ week_day # test user input and make exception if bad test_input_integer() # test age value handle_age_input() # test two input values and divide num_denum() # pri...
[ "common.num_denum", "common.week_day", "common.test_input_integer", "common.handle_age_input" ]
[((208, 228), 'common.test_input_integer', 'test_input_integer', ([], {}), '()\n', (226, 228), False, 'from common import test_input_integer, handle_age_input, num_denum, week_day\n'), ((247, 265), 'common.handle_age_input', 'handle_age_input', ([], {}), '()\n', (263, 265), False, 'from common import test_input_integer...
from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC import webbrowser import requests import time import datetime from bs4 impo...
[ "bs4.BeautifulSoup", "webbrowser.open", "requests.get", "time.sleep" ]
[((1164, 1191), 'webbrowser.open', 'webbrowser.open', (['url'], {'new': '(1)'}), '(url, new=1)\n', (1179, 1191), False, 'import webbrowser\n'), ((1195, 1208), 'time.sleep', 'time.sleep', (['(3)'], {}), '(3)\n', (1205, 1208), False, 'import time\n'), ((752, 767), 'requests.get', 'requests.get', (['l'], {}), '(l)\n', (76...
import time from pathlib import Path import scipy.io import pandas as pd import numpy as np import matplotlib.pyplot as plt import nibabel as nib from nilearn import datasets from nilearn.input_data import MultiNiftiMasker from nilearn.image import get_data from nilearn.mass_univariate import permuted_ols from sklea...
[ "nilearn.input_data.MultiNiftiMasker", "numpy.concatenate", "pandas.DataFrame.from_dict", "pandas.read_csv", "nilearn.mass_univariate.permuted_ols", "time.perf_counter", "numpy.isnan", "nibabel.save", "pathlib.Path", "numpy.sign", "sklearn.feature_selection.VarianceThreshold" ]
[((459, 478), 'time.perf_counter', 'time.perf_counter', ([], {}), '()\n', (476, 478), False, 'import time\n'), ((531, 595), 'pathlib.Path', 'Path', (['"""/mnt/qdata/raheppt1/data/brainage/nako/interim/vbm/test4"""'], {}), "('/mnt/qdata/raheppt1/data/brainage/nako/interim/vbm/test4')\n", (535, 595), False, 'from pathlib...
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages from distutils.core import Command class TestCommand(Command): user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): from django.conf impo...
[ "django.conf.settings.configure", "django.core.management.call_command", "django.setup", "setuptools.find_packages" ]
[((340, 506), 'django.conf.settings.configure', 'settings.configure', ([], {'DATABASES': "{'default': {'NAME': ':memory:', 'ENGINE': 'django.db.backends.sqlite3'}}", 'MIDDLEWARE_CLASSES': '()', 'INSTALLED_APPS': "('yamlfield',)"}), "(DATABASES={'default': {'NAME': ':memory:', 'ENGINE':\n 'django.db.backends.sqlite3'...
import pytest from app import app @pytest.fixture def client(): client = app.test_client() yield client def test_empty_db(client): """Start with a blank database.""" rv = client.get("/") assert b"Hello World!" in rv.data
[ "app.app.test_client" ]
[((81, 98), 'app.app.test_client', 'app.test_client', ([], {}), '()\n', (96, 98), False, 'from app import app\n')]
import shutil from os import mkdir, remove from os.path import dirname, isdir, isfile, join import pytest from geoalchemy2.shape import to_shape from geoalchemy2.types import WKTElement from numpy.testing import assert_almost_equal from rasterio.crs import CRS from snowexsql.projection import * @pytest.mark.paramet...
[ "os.remove", "numpy.testing.assert_almost_equal", "os.path.dirname", "geoalchemy2.shape.to_shape", "pytest.mark.parametrize", "os.path.join", "rasterio.crs.CRS.from_epsg" ]
[((301, 876), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""info, expected"""', "[({'latitude': 39.039, 'longitude': -108.003}, {'easting': 759397.644,\n 'northing': 4325379.675, 'utm_zone': 12}), ({'easting': 759397.644,\n 'northing': 4325379.675, 'utm_zone': 12}, {'latitude': 39.039,\n 'longitu...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # MIT License # # Copyright (c) 2018 <NAME> # # 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 limitatio...
[ "vqa_experiments.s_mac.utils_mac.linear" ]
[((3384, 3411), 'vqa_experiments.s_mac.utils_mac.linear', 'linear', (['dim', 'dim'], {'bias': '(True)'}), '(dim, dim, bias=True)\n', (3390, 3411), False, 'from vqa_experiments.s_mac.utils_mac import linear\n')]
import urllib.request from bs4 import BeautifulSoup from random import randint # fetch the full html fp = urllib.request.urlopen("https://www.python.org/dev/peps/pep-0020/") mybytes = fp.read() mystr = mybytes.decode("utf8") fp.close() # fetch the zen of python soup = BeautifulSoup(mystr, 'html.parser') txt = soup.pr...
[ "bs4.BeautifulSoup", "random.randint" ]
[((271, 306), 'bs4.BeautifulSoup', 'BeautifulSoup', (['mystr', '"""html.parser"""'], {}), "(mystr, 'html.parser')\n", (284, 306), False, 'from bs4 import BeautifulSoup\n'), ((371, 385), 'random.randint', 'randint', (['(1)', '(19)'], {}), '(1, 19)\n', (378, 385), False, 'from random import randint\n')]
################################################################################ # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this...
[ "test_utils.results", "pyflink.java_gateway.get_gateway", "pyflink.table.DataTypes.BIGINT" ]
[((1255, 1268), 'pyflink.java_gateway.get_gateway', 'get_gateway', ([], {}), '()\n', (1266, 1268), False, 'from pyflink.java_gateway import get_gateway\n'), ((1916, 1925), 'test_utils.results', 'results', ([], {}), '()\n', (1923, 1925), False, 'from test_utils import PyFlinkStreamTableTestCase, TestAppendSink, results\...
#!/usr/bin/env python import os # Force pure-python implementation instead of C++, otherwise imports # break things because we can't properly reset the symbol database. os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = "python" import importlib import json import subprocess import sys from typing import Generato...
[ "json.loads", "importlib.import_module", "os.path.basename", "google.protobuf.symbol_database.Default", "os.path.realpath", "os.walk", "google.protobuf.json_format.MessageToJson", "google.protobuf.descriptor_pool.DescriptorPool", "os.path.join", "os.chdir" ]
[((519, 545), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (535, 545), False, 'import os\n'), ((630, 643), 'os.walk', 'os.walk', (['root'], {}), '(root)\n', (637, 643), False, 'import os\n'), ((1017, 1031), 'os.chdir', 'os.chdir', (['root'], {}), '(root)\n', (1025, 1031), False, 'import o...
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-15 04:47 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('polls', '0004_auto_20170811_0444'), ] operations = [ migrations.RemoveField...
[ "django.db.migrations.RemoveField", "django.db.models.IntegerField", "django.db.models.TextField", "django.db.models.CharField" ]
[((298, 358), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""question"""', 'name': '"""demo_1"""'}), "(model_name='question', name='demo_1')\n", (320, 358), False, 'from django.db import migrations, models\n'), ((403, 463), 'django.db.migrations.RemoveField', 'migrations.RemoveFie...
import json from ranked.datasets import Matchup from ranked.models import Batch, Match class ReplayMatchup(Matchup): """Returns a batch of matchups, each batch have each players once. The matches are sorted by ascending timestamp. This means that the first batch represent the first match for each player...
[ "json.loads", "ranked.models.Match" ]
[((876, 892), 'json.loads', 'json.loads', (['line'], {}), '(line)\n', (886, 892), False, 'import json\n'), ((1353, 1372), 'ranked.models.Match', 'Match', (['*leaderboard'], {}), '(*leaderboard)\n', (1358, 1372), False, 'from ranked.models import Batch, Match\n')]
# USAGE # python mixed_training.py --dataset Houses-dataset/Houses\ Dataset/ # import the necessary packages from pyimagesearch import datasets from pyimagesearch import models from sklearn.model_selection import train_test_split from keras.layers.core import Dense from keras.models import Model from keras.optimizers ...
[ "keras.layers.core.Dense", "pyimagesearch.models.create_mlp", "numpy.abs", "argparse.ArgumentParser", "numpy.std", "sklearn.model_selection.train_test_split", "pyimagesearch.models.create_cnn", "keras.optimizers.Adam", "keras.models.Model", "pyimagesearch.datasets.process_house_attributes", "num...
[((490, 515), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (513, 515), False, 'import argparse\n'), ((836, 889), 'os.path.sep.join', 'os.path.sep.join', (["[args['dataset'], 'HousesInfo.txt']"], {}), "([args['dataset'], 'HousesInfo.txt'])\n", (852, 889), False, 'import os\n'), ((895, 936), 'p...
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
[ "logging.error", "csv.writer", "google.appengine.api.taskqueue.add", "config.JINJA_ENVIRONMENT.get_template", "tripit_facade.TripItFacade", "collections.defaultdict", "logging.info", "google.appengine.ext.ndb.PickleProperty", "webapp2_extras.json.encode", "webapp2.WSGIApplication" ]
[((3756, 4020), 'webapp2.WSGIApplication', 'webapp2.WSGIApplication', (["[('/', HomeHandler), ('/airports/matrix.json', AirportMatrixHandler), (\n '/airports/list.csv', AirportListHandler), ('/tripit/schedule',\n TripItHandler), ('/tripit/worker', TripItHandler), ('/tripit/raw',\n RawHandler)]"], {'debug': '(T...
# antioch # Copyright (c) 1999-2019 <NAME> # # # See LICENSE for details """ Client-side prompt support. """ from zope.interface import provider from antioch import IPlugin def ask(p, question, callback, *args, **kwargs): details = dict( question = question, ) p.exchange.send_message(p.caller....
[ "zope.interface.provider" ]
[((628, 645), 'zope.interface.provider', 'provider', (['IPlugin'], {}), '(IPlugin)\n', (636, 645), False, 'from zope.interface import provider\n')]
""" Script to preprocess and save the annotated queries and the annotations. Usages: tests: python preprocess_annotations.py --no_save regular usage: python preprocess_annotations.py """ from database_creation.annotation_task import AnnotationTask from toolbox.parsers import standard_parser, a...
[ "pickle.dump", "os.makedirs", "toolbox.parsers.add_annotations_arguments", "database_creation.annotation_task.AnnotationTask", "os.path.exists", "collections.defaultdict", "toolbox.parsers.standard_parser" ]
[((589, 606), 'toolbox.parsers.standard_parser', 'standard_parser', ([], {}), '()\n', (604, 606), False, 'from toolbox.parsers import standard_parser, add_annotations_arguments\n'), ((611, 640), 'toolbox.parsers.add_annotations_arguments', 'add_annotations_arguments', (['ap'], {}), '(ap)\n', (636, 640), False, 'from to...
import unittest import flask import mongoengine class FlaskMongoEngineTestCase(unittest.TestCase): """Parent class of all test cases""" def setUp(self): self.app = flask.Flask(__name__) self.app.config['MONGODB_DB'] = 'test_db' self.app.config['TESTING'] = True self.ctx = self...
[ "flask.Flask", "mongoengine.connection._connection_settings.clear", "mongoengine.connection._connections.clear", "mongoengine.connection._dbs.clear" ]
[((183, 204), 'flask.Flask', 'flask.Flask', (['__name__'], {}), '(__name__)\n', (194, 204), False, 'import flask\n'), ((615, 666), 'mongoengine.connection._connection_settings.clear', 'mongoengine.connection._connection_settings.clear', ([], {}), '()\n', (664, 666), False, 'import mongoengine\n'), ((675, 718), 'mongoen...
from google_api_helpers import auth from google_api_helpers import drive from test.utils import drive as test_drive from test.utils import auth as test_auth import pytest @pytest.fixture(scope="session", autouse=True) def getTestCredentials(): return test_auth.getTestCredentials() class TestDrive(test_drive.Wi...
[ "pytest.fixture", "google_api_helpers.drive.createBlankSheet", "google_api_helpers.drive.createBlank", "test.utils.auth.getTestCredentials", "google_api_helpers.drive.list" ]
[((175, 220), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""session"""', 'autouse': '(True)'}), "(scope='session', autouse=True)\n", (189, 220), False, 'import pytest\n'), ((258, 288), 'test.utils.auth.getTestCredentials', 'test_auth.getTestCredentials', ([], {}), '()\n', (286, 288), True, 'from test.utils imp...
import words words_database = words.words() yellow_letters = [] my_letters = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] defaults = ["BRICK","JUMPY","VOZHD","GLENT","WAQFS"] defaults_2 = [['b','r','i','c','k'],['j','u','m','p','y'],['v','o','z','h','d'],[...
[ "words.words" ]
[((30, 43), 'words.words', 'words.words', ([], {}), '()\n', (41, 43), False, 'import words\n')]
"""Query mode""" import os import re import csv import sys import argparse from bson import json_util from dataclasses import dataclass from pymongo.mongo_client import MongoClient from typing import Dict, List, Pattern, TextIO from dbutils import constants from dbutils.utils import get_comma_separated_fields, str2boo...
[ "os.path.abspath", "os.makedirs", "argparse.ArgumentParser", "os.unlink", "pymongo.mongo_client.MongoClient", "os.path.exists", "os.path.isfile", "dbutils.utils.get_comma_separated_fields", "bson.json_util.dumps", "os.path.join", "argparse.ArgumentTypeError" ]
[((1606, 1665), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""DbUtils - Query mode"""'}), "(description='DbUtils - Query mode')\n", (1629, 1665), False, 'import argparse\n'), ((4671, 4711), 'dbutils.utils.get_comma_separated_fields', 'get_comma_separated_fields', (['args.columns'], {}),...
# -*- coding: utf-8 -*- import os import tornado.web from zipfile import ZipFile from tools import ListingFiles folder_path = 'data/' zip_file = './export.zip' def list_all_export_file(): """ Make a list of important 'data' files (important files to export). :return: important file list """ tem...
[ "tools.ListingFiles.list_file_root_folder", "zipfile.ZipFile", "os.path.join" ]
[((689, 711), 'zipfile.ZipFile', 'ZipFile', (['zip_file', '"""w"""'], {}), "(zip_file, 'w')\n", (696, 711), False, 'from zipfile import ZipFile\n'), ((424, 455), 'os.path.join', 'os.path.join', (['folder_path', 'file'], {}), '(folder_path, file)\n', (436, 455), False, 'import os\n'), ((481, 528), 'tools.ListingFiles.li...
import numpy as np import tensorflow as tf from gym_ds3.schedulers.deepsocs.average_reward import AveragePerStepReward from gym_ds3.schedulers.deepsocs.compute_baselines import get_piecewise_linear_fit_baseline from gym_ds3.schedulers.deepsocs.deepsocs_scheduler import Deepsocs from gym_ds3.schedulers.models.deepsocs...
[ "gym_ds3.schedulers.deepsocs.average_reward.AveragePerStepReward", "gym_ds3.schedulers.deepsocs.compute_baselines.get_piecewise_linear_fit_baseline", "gym_ds3.schedulers.models.deepsocs_model.create_deepsocs_graph", "numpy.random.seed", "gym_ds3.schedulers.models.deepsocs_model.create_deepsocs_model", "te...
[((4083, 4143), 'gym_ds3.schedulers.deepsocs.compute_baselines.get_piecewise_linear_fit_baseline', 'get_piecewise_linear_fit_baseline', (['all_cum_reward', 'all_times'], {}), '(all_cum_reward, all_times)\n', (4116, 4143), False, 'from gym_ds3.schedulers.deepsocs.compute_baselines import get_piecewise_linear_fit_baselin...
#! /usr/bin/env python ################################################################################# # File Name : ./layer.py # Created By : yang # Creation Date : [2017-11-15 12:51] # Last Modified : [2017-11-15 13:09] # Description : s...
[ "theano.tensor.concatenate", "lasagne.init.GlorotUniform", "lasagne.init.Constant", "numpy.zeros", "theano.tensor.tensordot", "theano.shared", "theano.tensor.ones" ]
[((741, 775), 'theano.tensor.ones', 'T.ones', (['(1, max_size)'], {'dtype': 'DTYPE'}), '((1, max_size), dtype=DTYPE)\n', (747, 775), True, 'import theano.tensor as T\n'), ((1146, 1192), 'theano.tensor.tensordot', 'T.tensordot', (['feature1d_h', 'self.one', '[[3], [0]]'], {}), '(feature1d_h, self.one, [[3], [0]])\n', (1...
# Copyright 2019 The FastEstimator Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
[ "tensorflow.python.keras.layers.Add", "fastestimator.layers.InstanceNormalization", "tensorflow.python.keras.layers.LeakyReLU", "fastestimator.layers.ReflectionPadding2D", "tensorflow.python.keras.layers.Input", "tensorflow.python.keras.initializers.RandomNormal", "tensorflow.python.keras.layers.ReLU", ...
[((1876, 1901), 'tensorflow.python.keras.layers.Input', 'layers.Input', (['input_shape'], {}), '(input_shape)\n', (1888, 1901), False, 'from tensorflow.python.keras import Model, layers\n'), ((3124, 3151), 'tensorflow.python.keras.Model', 'Model', ([], {'inputs': 'x0', 'outputs': 'x'}), '(inputs=x0, outputs=x)\n', (312...
from typing import Union import re from phonemizer.phonemize import phonemize from data.text.symbols import all_phonemes, _punctuations class Tokenizer: def __init__(self, start_token='>', end_token='<', pad_token='/', add_start_end=True, alphabet=None, model_breathing=True): if no...
[ "phonemizer.phonemize.phonemize", "re.sub", "re.compile" ]
[((2398, 2416), 're.compile', 're.compile', (['"""\\\\s+"""'], {}), "('\\\\s+')\n", (2408, 2416), False, 'import re\n'), ((2459, 2501), 're.compile', 're.compile', (['f"""\\\\s*([{_punctuations}])\\\\s*"""'], {}), "(f'\\\\s*([{_punctuations}])\\\\s*')\n", (2469, 2501), False, 'import re\n'), ((2854, 3060), 'phonemizer....
from typing import Dict, Optional, Union from fastapi.responses import Response, JSONResponse, PlainTextResponse from rdflib import Graph from rdflib.namespace import DCAT, DCTERMS, RDFS from connegp import MEDIATYPE_NAMES from config import * from renderers import Renderer from profiles.spaceprez_profiles import oai...
[ "fastapi.responses.PlainTextResponse", "utils.templates.TemplateResponse", "fastapi.responses.JSONResponse" ]
[((1608, 1734), 'utils.templates.TemplateResponse', 'templates.TemplateResponse', (['"""spaceprez/spaceprez_feature_collection.html"""'], {'context': '_template_context', 'headers': 'self.headers'}), "('spaceprez/spaceprez_feature_collection.html',\n context=_template_context, headers=self.headers)\n", (1634, 1734),...
#!/home/ec2-user/WEBARCH/env/bin/python3 from bs4 import BeautifulSoup from urllib.request import urlopen import re from time import sleep prefix = "https://webarchive.nationalarchives.gov.uk/" #20121204113457/ page = "https://www.gov.uk/government/how-government-works" def crawl_versions(url,url_file,skip_list = se...
[ "bs4.BeautifulSoup", "urllib.request.urlopen", "re.compile" ]
[((493, 527), 'bs4.BeautifulSoup', 'BeautifulSoup', (['html', '"""html.parser"""'], {}), "(html, 'html.parser')\n", (506, 527), False, 'from bs4 import BeautifulSoup\n'), ((373, 385), 'urllib.request.urlopen', 'urlopen', (['url'], {}), '(url)\n', (380, 385), False, 'from urllib.request import urlopen\n'), ((1085, 1130)...
from datetime import datetime import time import traceback import urllib import urllib2 from xml.dom import minidom from django.core import mail from travelist import utils import settings def call(method, **params): response = urllib2.urlopen("http://flickr.com/services/rest?api_key=%s&method=%s&%s" ...
[ "traceback.print_exc", "time.sleep", "xml.dom.minidom.parse", "traceback.format_exc", "urllib.urlencode" ]
[((424, 447), 'xml.dom.minidom.parse', 'minidom.parse', (['response'], {}), '(response)\n', (437, 447), False, 'from xml.dom import minidom\n'), ((2373, 2387), 'time.sleep', 'time.sleep', (['(60)'], {}), '(60)\n', (2383, 2387), False, 'import time\n'), ((373, 397), 'urllib.urlencode', 'urllib.urlencode', (['params'], {...
from unittest import TestCase from mock import Mock from openelex.base.transform import registry class TestTransformRegistry(TestCase): def test_register_with_validators(self): mock_transform = Mock(return_value=None) mock_transform.__name__ = 'mock_transform' mock_validator1 = Mock(retur...
[ "openelex.base.transform.registry.get", "mock.Mock", "openelex.base.transform.registry.register" ]
[((209, 232), 'mock.Mock', 'Mock', ([], {'return_value': 'None'}), '(return_value=None)\n', (213, 232), False, 'from mock import Mock\n'), ((310, 333), 'mock.Mock', 'Mock', ([], {'return_value': 'None'}), '(return_value=None)\n', (314, 333), False, 'from mock import Mock\n'), ((413, 436), 'mock.Mock', 'Mock', ([], {'re...
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 from copy import copy from unittest import TestCase import numpy as np import torch import torch.optim from torch import nn as nn from torch.distributions import constraints import pyro from tests.common import assert_equal cla...
[ "torch.ones", "pyro.get_param_store", "pyro.param", "torch.randn", "pyro.module", "torch.optim.Adam", "torch.pow", "torch.nn.Linear", "torch.zeros", "pyro.clear_param_store" ]
[((3421, 3443), 'pyro.get_param_store', 'pyro.get_param_store', ([], {}), '()\n', (3441, 3443), False, 'import pyro\n'), ((3780, 3800), 'torch.zeros', 'torch.zeros', (['(1)', '(2)', '(3)'], {}), '(1, 2, 3)\n', (3791, 3800), False, 'import torch\n'), ((383, 407), 'pyro.clear_param_store', 'pyro.clear_param_store', ([], ...
import os, cv2 import torch from torch import nn import numpy as np def weights_path(_file_, _root_num, dirname): basepath = os.path.dirname(_file_) backs = [".."]*_root_num model_dir = os.path.abspath(os.path.join(basepath, *backs, dirname)) return model_dir def _check_ins(name, val, cls, allow_none...
[ "torch.stack", "torch.nn.init.xavier_uniform_", "os.path.dirname", "numpy.expand_dims", "torch.nn.init.constant_", "torch.tensor", "os.path.join", "cv2.resize" ]
[((130, 153), 'os.path.dirname', 'os.path.dirname', (['_file_'], {}), '(_file_)\n', (145, 153), False, 'import os, cv2\n'), ((215, 254), 'os.path.join', 'os.path.join', (['basepath', '*backs', 'dirname'], {}), '(basepath, *backs, dirname)\n', (227, 254), False, 'import os, cv2\n'), ((6262, 6278), 'torch.stack', 'torch....
from django.db import models class OverallTotals(models.Model): id = models.AutoField(primary_key=True) create_date = models.DateTimeField(auto_now_add=True, blank=True, null=True) update_date = models.DateTimeField(auto_now=True, null=True) fiscal_year = models.IntegerField(blank=True, null=True) ...
[ "django.db.models.DecimalField", "django.db.models.DateTimeField", "django.db.models.IntegerField", "django.db.models.AutoField" ]
[((75, 109), 'django.db.models.AutoField', 'models.AutoField', ([], {'primary_key': '(True)'}), '(primary_key=True)\n', (91, 109), False, 'from django.db import models\n'), ((128, 190), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now_add': '(True)', 'blank': '(True)', 'null': '(True)'}), '(aut...
from __future__ import print_function # The following comments couldn't be translated into the new config version: #! /bin/env cmsRun import FWCore.ParameterSet.Config as cms process = cms.Process("validation") import FWCore.ParameterSet.VarParsing as VarParsing options = VarParsing.VarParsing ('analysis') # load th...
[ "FWCore.ParameterSet.Config.string", "FWCore.ParameterSet.Config.untracked.int32", "FWCore.ParameterSet.Config.double", "FWCore.ParameterSet.Config.Sequence", "FWCore.ParameterSet.Config.untracked.vstring", "Configuration.AlCa.GlobalTag.GlobalTag", "FWCore.ParameterSet.Config.untracked.bool", "FWCore....
[((186, 211), 'FWCore.ParameterSet.Config.Process', 'cms.Process', (['"""validation"""'], {}), "('validation')\n", (197, 211), True, 'import FWCore.ParameterSet.Config as cms\n'), ((275, 308), 'FWCore.ParameterSet.VarParsing.VarParsing', 'VarParsing.VarParsing', (['"""analysis"""'], {}), "('analysis')\n", (296, 308), T...
import sentencepiece as spm import argparse def main(): print("ciao") parser = argparse.ArgumentParser() parser.add_argument("-input", "--input", type=str, default="data/train.txt", help="tokenizer input file") parser.add_argument("-model_prefix", "--model_prefix", type=str,...
[ "sentencepiece.SentencePieceTrainer.train", "argparse.ArgumentParser" ]
[((90, 115), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (113, 115), False, 'import argparse\n'), ((1507, 1754), 'sentencepiece.SentencePieceTrainer.train', 'spm.SentencePieceTrainer.train', ([], {'input': 'args.input', 'model_prefix': 'args.model_prefix', 'vocab_size': 'args.vocab_size', 'c...
import pandas as pd from datetime import date, timedelta from django.conf import settings from django.core.exceptions import ValidationError from django.test import TestCase from research.models.choices import DominantHand, Sex, Gender from ..factories import SubjectFactory class SubjectModelTestCase(TestCase): ...
[ "pandas.read_excel", "datetime.timedelta", "datetime.date.today" ]
[((429, 530), 'pandas.read_excel', 'pd.read_excel', (['settings.RAW_SUBJECT_TABLE_PATH'], {'sheet_name': '"""Subjects"""', 'header': '[0, 1]', 'index_col': '(0)'}), "(settings.RAW_SUBJECT_TABLE_PATH, sheet_name='Subjects',\n header=[0, 1], index_col=0)\n", (442, 530), True, 'import pandas as pd\n'), ((1093, 1105), '...
import pandas as pd filename = "dictionary.csv" df_vocab = pd.read_csv(filename) print("Duplicates:") df_duplicated = df_vocab[df_vocab[["Chinese", "PinYin"]].duplicated(keep=False)][["Chinese", "PinYin"]] if df_duplicated.shape[0] == 0: print("===== [OK] No duplicates found =====") else: print(df_duplicate...
[ "pandas.read_csv" ]
[((60, 81), 'pandas.read_csv', 'pd.read_csv', (['filename'], {}), '(filename)\n', (71, 81), True, 'import pandas as pd\n')]
from flask import render_template, request from app import app @app.route('/', methods=['GET', 'POST']) @app.route('/index', methods=['GET', 'POST']) def index(): info = dict(title='DigiLabel') files = request.files.getlist("file") for file in files: print("Content: ", file.filename) return re...
[ "app.app.route", "flask.render_template", "flask.request.files.getlist" ]
[((66, 105), 'app.app.route', 'app.route', (['"""/"""'], {'methods': "['GET', 'POST']"}), "('/', methods=['GET', 'POST'])\n", (75, 105), False, 'from app import app\n'), ((107, 151), 'app.app.route', 'app.route', (['"""/index"""'], {'methods': "['GET', 'POST']"}), "('/index', methods=['GET', 'POST'])\n", (116, 151), Fa...
''' Query Search SRA tables for 1K Genomes data, access files via SRA DRS ids''' # IMPORTS import sys from fasp.search import DiscoverySearchClient def main(argv): searchClient = DiscoverySearchClient('https://ga4gh-search-adapter-presto-public.prod.dnastack.com', debug=False) query = """SELECT s.su_submitter_...
[ "fasp.search.DiscoverySearchClient" ]
[((186, 294), 'fasp.search.DiscoverySearchClient', 'DiscoverySearchClient', (['"""https://ga4gh-search-adapter-presto-public.prod.dnastack.com"""'], {'debug': '(False)'}), "(\n 'https://ga4gh-search-adapter-presto-public.prod.dnastack.com', debug=False\n )\n", (207, 294), False, 'from fasp.search import Discovery...
from django.shortcuts import render import urllib.request import json from datetime import datetime from .city_weather import CityWeather #locations given by Uni assignment loc1_details = CityWeather("Lake District National Park", "54.4609", "-3.0886") loc2_details = CityWeather("Corfe Castle", "50.6395", "-2.0566") l...
[ "django.shortcuts.render", "json.loads" ]
[((2198, 2284), 'django.shortcuts.render', 'render', (['request', '"""weather/weatherapp.html"""', "{'displayed_cities': displayed_cities}"], {}), "(request, 'weather/weatherapp.html', {'displayed_cities':\n displayed_cities})\n", (2204, 2284), False, 'from django.shortcuts import render\n'), ((1470, 1497), 'json.lo...
""" Parser for cechmate format of simplicial complex """ from itertools import chain, combinations from cechmate import Cech, Rips, Alpha import numpy as np from scipy.sparse import coo_matrix from dmt.morse_complex import MorseComplex from dmt.perseus import save_points_perseus_brips, load_points_perseus_brips def...
[ "cechmate.Rips", "cechmate.Cech", "dmt.perseus.load_points_perseus_brips", "scipy.sparse.coo_matrix", "numpy.array", "cechmate.Alpha", "dmt.perseus.save_points_perseus_brips" ]
[((1520, 1587), 'scipy.sparse.coo_matrix', 'coo_matrix', (['(data, (rows, columns))'], {'shape': '(size, size)', 'dtype': 'bool'}), '((data, (rows, columns)), shape=(size, size), dtype=bool)\n', (1530, 1587), False, 'from scipy.sparse import coo_matrix\n'), ((2007, 2023), 'numpy.array', 'np.array', (['points'], {}), '(...
from __future__ import print_function import json import os import re import subprocess import maya.cmds import maya.mel # The version that Redshift fixed the render layer render setup override locking issue # Prior versions will need to use the workaround in the unlockRenderSetupOverrides function REDSHIFT_RENDER_S...
[ "maya.app.renderSetup.model.renderSetup.instance", "subprocess.Popen", "json.loads", "os.makedirs", "os.path.isdir", "os.path.exists", "subprocess.STARTUPINFO", "os.path.splitext", "os.path.split", "os.path.join", "re.compile" ]
[((2324, 2364), 'json.loads', 'json.loads', (['remove_overrides_json_string'], {}), '(remove_overrides_json_string)\n', (2334, 2364), False, 'import json\n'), ((2387, 2409), 'maya.app.renderSetup.model.renderSetup.instance', 'renderSetup.instance', ([], {}), '()\n', (2407, 2409), True, 'import maya.app.renderSetup.mode...
# conflicts with isort because of local non-relative import # pylint: disable=wrong-import-order import unittest from fastapi.testclient import TestClient from models.tortoise_models.fleet import Fleet, Robot from models.tortoise_models.fleet_state import FleetState, RobotStateEnum from rest_server.app import get_app ...
[ "models.tortoise_models.fleet.Robot.create", "models.tortoise_models.fleet.Fleet.create", "rest_server.repositories.report.fleet_state.get_fleet_state", "tortoise.Tortoise.close_connections", "rest_server.test_utils.start_test_database", "models.tortoise_models.fleet_state.FleetState.create", "rest_serv...
[((484, 493), 'rest_server.app.get_app', 'get_app', ([], {}), '()\n', (491, 493), False, 'from rest_server.app import get_app\n'), ((648, 663), 'fastapi.testclient.TestClient', 'TestClient', (['app'], {}), '(app)\n', (658, 663), False, 'from fastapi.testclient import TestClient\n'), ((604, 625), 'rest_server.test_utils...
import torch import torchvision import torch.nn as nn import torch.optim as optim import torch.backends.cudnn as cudnn from torch.utils.data import DataLoader from utils import get_most_recent_checkpoint,get_test_set,get_training_set, set_seed from math import log10 from model.srcnn_upconv7 import Upconv from model.rdn...
[ "os.remove", "argparse.ArgumentParser", "utils.set_seed", "model.srcnn_upconv7.Upconv", "os.walk", "torch.device", "torch.no_grad", "os.path.join", "torch.utils.data.DataLoader", "torch.load", "os.path.exists", "urllib.request.urlopen", "tarfile.open", "model.rdn.RDN", "os.path.basename"...
[((1282, 1357), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Pytorch Image/Video Super-Resolution"""'}), "(description='Pytorch Image/Video Super-Resolution')\n", (1305, 1357), False, 'import argparse\n'), ((2275, 2286), 'utils.set_seed', 'set_seed', (['(0)'], {}), '(0)\n', (2283, 2286...
from django.urls import path,include from . import views from rate import views as user_views from django.conf.urls.static import static from django.conf import settings from django.conf.urls import url urlpatterns=[ path('',views.home,name = 'home'), path('accounts/register/', views.register, name='register')...
[ "django.conf.urls.static.static", "django.conf.urls.url", "django.urls.path" ]
[((222, 255), 'django.urls.path', 'path', (['""""""', 'views.home'], {'name': '"""home"""'}), "('', views.home, name='home')\n", (226, 255), False, 'from django.urls import path, include\n'), ((261, 320), 'django.urls.path', 'path', (['"""accounts/register/"""', 'views.register'], {'name': '"""register"""'}), "('accoun...
import boto.dynamodb2 from boto.dynamodb2.table import Table from boto.dynamodb2.fields import HashKey from boto.regioninfo import RegionInfo from boto.dynamodb2.layer1 import DynamoDBConnection from faker import Factory import uuid import time try: sessions = Table( table_name='usertable', schema=...
[ "uuid.uuid4", "boto.dynamodb2.fields.HashKey", "time.strftime", "boto.regioninfo.RegionInfo", "faker.Factory.create" ]
[((616, 645), 'time.strftime', 'time.strftime', (['"""%Y%m%d%H%M%S"""'], {}), "('%Y%m%d%H%M%S')\n", (629, 645), False, 'import time\n'), ((586, 598), 'uuid.uuid4', 'uuid.uuid4', ([], {}), '()\n', (596, 598), False, 'import uuid\n'), ((657, 673), 'faker.Factory.create', 'Factory.create', ([], {}), '()\n', (671, 673), Fa...
############################################################################## # Copyright 2020 IBM Corp. 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 # # htt...
[ "pandas.to_datetime" ]
[((2416, 2477), 'pandas.to_datetime', 'pd.to_datetime', (['df[self.column]'], {'origin': 'self.origin', 'unit': '"""s"""'}), "(df[self.column], origin=self.origin, unit='s')\n", (2430, 2477), True, 'import pandas as pd\n'), ((2522, 2553), 'pandas.to_datetime', 'pd.to_datetime', (['df[self.column]'], {}), '(df[self.colu...
"""Kraken - objects.operators.kl_operator module. Classes: KLOperator - Splice operator object. """ import pprint import re from kraken.core.maths import MathObject, Mat44, Xfo, Vec2, Vec3 from kraken.core.objects.object_3d import Object3D from kraken.core.objects.operators.operator import Operator from kraken.core...
[ "kraken.core.kraken_system.ks.constructRTVal", "kraken.core.kraken_system.ks.loadCoreClient", "kraken.log.getLogger", "pprint.pformat", "kraken.core.maths.Xfo", "kraken.core.maths.Vec3", "kraken.core.maths.Mat44", "kraken.core.kraken_system.ks.convertFromRTVal", "kraken.core.kraken_system.ks.loadExt...
[((451, 470), 'kraken.log.getLogger', 'getLogger', (['"""kraken"""'], {}), "('kraken')\n", (460, 470), False, 'from kraken.log import getLogger\n'), ((813, 832), 'kraken.core.kraken_system.ks.loadCoreClient', 'ks.loadCoreClient', ([], {}), '()\n', (830, 832), False, 'from kraken.core.kraken_system import ks\n'), ((841,...
import pandas as pd import numpy as np import matplotlib.pyplot as plt import argparse import torch import torch.optim as optim import torch.nn as nn from torch.autograd import Variable import os from torch.utils.data import TensorDataset, DataLoader from sklearn.model_selection import train_test_split import thermod...
[ "thermodrift_model.Net", "argparse.ArgumentParser", "torch.utils.data.DataLoader", "torch.argmax", "torch.load", "sklearn.model_selection.train_test_split", "torch.nn.CrossEntropyLoss", "torch.save", "torch.cuda.is_available", "torch.utils.data.TensorDataset", "torch.max", "os.listdir" ]
[((2265, 2296), 'torch.utils.data.TensorDataset', 'TensorDataset', (['X_train', 'y_train'], {}), '(X_train, y_train)\n', (2278, 2296), False, 'from torch.utils.data import TensorDataset, DataLoader\n'), ((2307, 2336), 'torch.utils.data.TensorDataset', 'TensorDataset', (['X_test', 'y_test'], {}), '(X_test, y_test)\n', (...
# -*- coding: utf-8 -*- import frappe from toolz.curried import ( compose, merge, unique, concat, valmap, groupby, first, excepts, keyfilter, map, filter, ) import html from erpnext.portal.product_configurator.utils import ( get_products_for_website, get_product_setti...
[ "erpnext.accounts.doctype.sales_invoice.pos.get_child_nodes", "frappe.parse_json", "erpnext.portal.product_configurator.utils.get_next_attribute_and_values", "frappe.get_cached_value", "frappe.get_meta", "frappe.db.sql", "erpnext.shopping_cart.product_info.get_product_info_for_website", "frappe.defaul...
[((660, 694), 'frappe.whitelist', 'frappe.whitelist', ([], {'allow_guest': '(True)'}), '(allow_guest=True)\n', (676, 694), False, 'import frappe\n'), ((2480, 2514), 'frappe.whitelist', 'frappe.whitelist', ([], {'allow_guest': '(True)'}), '(allow_guest=True)\n', (2496, 2514), False, 'import frappe\n'), ((5644, 5678), 'f...
"""Module for SHA1 hashing algorithm""" __all__ = ['SHA1HashingAlgorithm'] import hashlib from entities.hashing_algorithms import IHashingAlgorithm class SHA1HashingAlgorithm(IHashingAlgorithm): """SHA1 hashing algorithm Attributes: name: Algorithm name bits: Amount of checksum bits ...
[ "hashlib.sha1" ]
[((709, 735), 'hashlib.sha1', 'hashlib.sha1', (['encoded_data'], {}), '(encoded_data)\n', (721, 735), False, 'import hashlib\n')]
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community' } DOCUMENTATION = ''' --- module: import_workload_src_check short_description: Export OpenStack in...
[ "ansible.module_utils.basic.AnsibleModule", "ansible.module_utils.openstack.openstack_cloud_from_module", "ansible_collections.os_migrate.os_migrate.plugins.module_utils.server.Server.from_sdk" ]
[((2904, 2946), 'ansible.module_utils.basic.AnsibleModule', 'AnsibleModule', ([], {'argument_spec': 'argument_spec'}), '(argument_spec=argument_spec)\n', (2917, 2946), False, 'from ansible.module_utils.basic import AnsibleModule\n'), ((3135, 3170), 'ansible.module_utils.openstack.openstack_cloud_from_module', 'openstac...
# Generated by Django 3.1 on 2020-08-27 06:18 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('Share', '0003_auto_20200827_1134'), ] operations = [ migrations.RemoveField( model_name='group', name='uid', ), ]
[ "django.db.migrations.RemoveField" ]
[((223, 277), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""group"""', 'name': '"""uid"""'}), "(model_name='group', name='uid')\n", (245, 277), False, 'from django.db import migrations\n')]
from __future__ import print_function import pyxb.bundles.opengis.gml as gml dv = gml.DegreesType(32, direction='N') print(dv.toDOM(element_name='degrees').toxml("utf-8"))
[ "pyxb.bundles.opengis.gml.DegreesType" ]
[((82, 116), 'pyxb.bundles.opengis.gml.DegreesType', 'gml.DegreesType', (['(32)'], {'direction': '"""N"""'}), "(32, direction='N')\n", (97, 116), True, 'import pyxb.bundles.opengis.gml as gml\n')]
import colortrans, sys, arcpy from GeMS_utilityFunctions import * gdb = sys.argv[1] dmu = gdb+'/DescriptionOfMapUnits' fields = ('Symbol','AreaFillRGB') with arcpy.da.UpdateCursor(dmu, fields) as cursor: for row in cursor: if row[0] != None: try: rgb = colortrans.wpg2rgb(row[...
[ "colortrans.wpg2rgb", "arcpy.da.UpdateCursor" ]
[((162, 196), 'arcpy.da.UpdateCursor', 'arcpy.da.UpdateCursor', (['dmu', 'fields'], {}), '(dmu, fields)\n', (183, 196), False, 'import colortrans, sys, arcpy\n'), ((297, 323), 'colortrans.wpg2rgb', 'colortrans.wpg2rgb', (['row[0]'], {}), '(row[0])\n', (315, 323), False, 'import colortrans, sys, arcpy\n')]
from django.contrib import admin from taggit.models import Tag, TaggedItem, TagTransform class TaggedItemInline(admin.StackedInline): model = TaggedItem extra = 0 class TagAdmin(admin.ModelAdmin): inlines = [ TaggedItemInline ] ordering = ['name'] search_fields = ['name'] class TagT...
[ "django.contrib.admin.site.register" ]
[((503, 537), 'django.contrib.admin.site.register', 'admin.site.register', (['Tag', 'TagAdmin'], {}), '(Tag, TagAdmin)\n', (522, 537), False, 'from django.contrib import admin\n'), ((538, 590), 'django.contrib.admin.site.register', 'admin.site.register', (['TagTransform', 'TagTransformAdmin'], {}), '(TagTransform, TagT...
# -*- coding: utf-8 -*- """ Created on Mon Aug 12 11:39:56 2019 @author: autol """ #%% import numpy as np import time from gfun import StepClass,ConvClass,JClass,Hessian from gupdate import UpdateClass #%% methodtion #@accepts(w=np.ndarray) def gradient_descent_f(var, X=0,y=0,w=0,n_iters=1,n...
[ "numpy.stack", "gfun.JClass", "gupdate.UpdateClass", "gfun.ConvClass", "numpy.zeros", "time.time", "gfun.Hessian", "gfun.StepClass" ]
[((651, 662), 'time.time', 'time.time', ([], {}), '()\n', (660, 662), False, 'import time\n'), ((673, 685), 'gfun.Hessian', 'Hessian', (['var'], {}), '(var)\n', (680, 685), False, 'from gfun import StepClass, ConvClass, JClass, Hessian\n'), ((735, 754), 'gfun.JClass', 'JClass', (['var', 'method'], {}), '(var, method)\n...
from random import randint def sumNum(x): x -= 1 if x == 1: return x x1 = sumNum(x) x = x * x1 return x def coinFlip(n): n -= 1 if n == 0: return n n = coinFlip(n) n += randint(0,1) return n def main(): y = 0 #x = int(input("Numb...
[ "random.randint" ]
[((238, 251), 'random.randint', 'randint', (['(0)', '(1)'], {}), '(0, 1)\n', (245, 251), False, 'from random import randint\n')]
import logging import multiprocessing import select import socketserver import struct import shared.config as config from rpi.network.messagehandler import MessageHandler class NetworkError(Exception): pass class NetworkReadingTimeoutError(Exception): pass class NetworkWritingTimeoutError(Exception): ...
[ "rpi.network.messagehandler.MessageHandler", "struct.unpack", "struct.calcsize", "shared.config.get_config", "select.select", "logging.getLogger" ]
[((1413, 1453), 'select.select', 'select.select', (['[]', '[self.request]', '[]', '(1)'], {}), '([], [self.request], [], 1)\n', (1426, 1453), False, 'import select\n'), ((1721, 1748), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1738, 1748), False, 'import logging\n'), ((3089, 3116), '...
"""Run inline python code when beets events are fired.""" from __future__ import division, absolute_import, print_function import ast import confuse from beets.plugins import BeetsPlugin def _syntaxerror_offset(value, lineoffset): """Adjust the line number in a SyntaxError exception.""" if lineoffset: ...
[ "ast.increment_lineno" ]
[((842, 884), 'ast.increment_lineno', 'ast.increment_lineno', (['compiled', 'lineoffset'], {}), '(compiled, lineoffset)\n', (862, 884), False, 'import ast\n')]
#!/usr/bin/python # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import logging import common.storage_helpers as storage_helpers import common.image_helpers as image_helpers def correct_form(form, vision_key, vision_region): # Get form data form_data = image_he...
[ "logging.error", "common.storage_helpers.create_blob_service", "common.storage_helpers.list_blobs", "common.image_helpers.get_form_data", "common.image_helpers.rotate_image", "logging.info", "common.storage_helpers.get_blob", "common.storage_helpers.upload_blob", "common.image_helpers.blob_to_image"...
[((312, 372), 'common.image_helpers.get_form_data', 'image_helpers.get_form_data', (['form', 'vision_key', 'vision_region'], {}), '(form, vision_key, vision_region)\n', (339, 372), True, 'import common.image_helpers as image_helpers\n'), ((844, 906), 'common.storage_helpers.create_blob_service', 'storage_helpers.create...
from ipykernel.kernelapp import IPKernelApp from ipykernel.kernelbase import Kernel from pexpect.replwrap import REPLWrapper from pexpect.exceptions import EOF class TuppenceKernel(Kernel): implementation = 'Tuppence' implementation_version = '1.0' language = 'tuppence' language_version = '0.1' lan...
[ "ipykernel.kernelapp.IPKernelApp.launch_instance", "ipykernel.kernelbase.Kernel.__init__", "pexpect.replwrap.REPLWrapper" ]
[((2441, 2497), 'ipykernel.kernelapp.IPKernelApp.launch_instance', 'IPKernelApp.launch_instance', ([], {'kernel_class': 'TuppenceKernel'}), '(kernel_class=TuppenceKernel)\n', (2468, 2497), False, 'from ipykernel.kernelapp import IPKernelApp\n'), ((453, 484), 'ipykernel.kernelbase.Kernel.__init__', 'Kernel.__init__', ([...
import requests from bs4 import BeautifulSoup from datetime import datetime as dt from gzip import GzipFile from urllib.request import urlopen import re TOP_URL = "https://ftp.acc.umu.se/mirror/wikimedia.org/dumps/enwiktionary/{}" FILENAME = "/enwiktionary-{}-all-titles-in-ns0.gz" NON_ALPHA_PATTERN = re.compile(rb'[\W...
[ "bs4.BeautifulSoup", "datetime.datetime.strptime", "gzip.GzipFile", "re.compile" ]
[((303, 324), 're.compile', 're.compile', (["b'[\\\\W]+'"], {}), "(b'[\\\\W]+')\n", (313, 324), False, 'import re\n'), ((347, 381), 're.compile', 're.compile', (["b'[\\\\(\\\\[].*?[\\\\)\\\\]]'"], {}), "(b'[\\\\(\\\\[].*?[\\\\)\\\\]]')\n", (357, 381), False, 'import re\n'), ((818, 847), 'bs4.BeautifulSoup', 'BeautifulS...
#!/usr/bin/env python from __future__ import absolute_import import sys # from distutils.core import setup from setuptools import setup, find_packages from os import path import io from os.path import join, dirname sys.path.append(join(dirname(__file__), "EyesLibraryExtended")) exec(compile(open("EyesLibraryExtende...
[ "os.path.dirname", "setuptools.find_packages", "io.open" ]
[((392, 430), 'io.open', 'io.open', (['"""README.md"""'], {'encoding': '"""utf-8"""'}), "('README.md', encoding='utf-8')\n", (399, 430), False, 'import io\n'), ((239, 256), 'os.path.dirname', 'dirname', (['__file__'], {}), '(__file__)\n', (246, 256), False, 'from os.path import join, dirname\n'), ((1737, 1777), 'setupt...
import os import re from typing import List from setuptools import find_packages, setup def get_version(package: str) -> str: """ Return package version as listed in `__version__` in `__main__.py`. """ path = os.path.join(package, "__main__.py") main_py = open(path, "r", encoding="utf8").read() ...
[ "os.path.join", "setuptools.find_packages", "re.search" ]
[((228, 264), 'os.path.join', 'os.path.join', (['package', '"""__main__.py"""'], {}), "(package, '__main__.py')\n", (240, 264), False, 'import os\n'), ((331, 386), 're.search', 're.search', (['"""__version__ = [\'"]([^\'"]+)[\'"]"""', 'main_py'], {}), '(\'__version__ = [\\\'"]([^\\\'"]+)[\\\'"]\', main_py)\n', (340, 38...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Name: streamStatus.py # Purpose: functionality for reporting on the notational status of streams # # Authors: <NAME> # # Copyright: Copyright © 2013 <NAME> and the music21 # Proje...
[ "copy.deepcopy", "music21.stream.Measure", "music21.environment.Environment", "music21.common.wrapWeakref", "music21.common.objects.SlottedObjectMixin.__setstate__", "music21.mainTest", "music21.common.objects.SlottedObjectMixin.__getstate__", "music21.note.Note", "music21.common.unwrapWeakref" ]
[((587, 620), 'music21.environment.Environment', 'environment.Environment', (['__file__'], {}), '(__file__)\n', (610, 620), False, 'from music21 import environment\n'), ((7698, 7720), 'music21.mainTest', 'music21.mainTest', (['Test'], {}), '(Test)\n', (7714, 7720), False, 'import music21\n'), ((2613, 2647), 'music21.co...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function, absolute_import from six import iteritems import os import csv from dcase_util.containers import DictContainer from dcase_util.utils import FileFormat class OneToOneMappingContainer(DictContainer): """Mapping container class for ...
[ "os.remove", "csv.writer", "dcase_util.containers.DictContainer.__init__", "dcase_util.files.Serializer.load_cpickle", "six.iteritems" ]
[((556, 601), 'dcase_util.containers.DictContainer.__init__', 'DictContainer.__init__', (['self', '*args'], {}), '(self, *args, **kwargs)\n', (578, 601), False, 'from dcase_util.containers import DictContainer\n'), ((4269, 4293), 'os.remove', 'os.remove', (['self.filename'], {}), '(self.filename)\n', (4278, 4293), Fals...
import os from base64 import b64encode from urllib.parse import quote def g_b64(data): return b"".join([b"data:image/svg+xml;base64,", b64encode(data.encode("utf-8"))]) def g_uri(data): return "".join(["data:image/svg+xml;charset=UTF-8,", quote(data)]) def svg_to_data(data): d_b64 = g_b64(data) d_...
[ "urllib.parse.quote", "os.path.join" ]
[((251, 262), 'urllib.parse.quote', 'quote', (['data'], {}), '(data)\n', (256, 262), False, 'from urllib.parse import quote\n'), ((523, 552), 'os.path.join', 'os.path.join', (['path', 'file_path'], {}), '(path, file_path)\n', (535, 552), False, 'import os\n')]
import xml.etree.ElementTree as ET, sys, random from graph import Graph from time import time e = [] varS = [] N = None bn = Graph() if len(sys.argv) < 4: print("Invalid argv: Less Than 2 argvs!") sys.exit() if len(sys.argv) > 4: if len(sys.argv) % 2 != 0: print("Invalid argv: Wrong Format!") ...
[ "xml.etree.ElementTree.parse", "graph.Graph", "time.time", "random.random", "sys.exit" ]
[((126, 133), 'graph.Graph', 'Graph', ([], {}), '()\n', (131, 133), False, 'from graph import Graph\n'), ((4930, 4936), 'time.time', 'time', ([], {}), '()\n', (4934, 4936), False, 'from time import time\n'), ((207, 217), 'sys.exit', 'sys.exit', ([], {}), '()\n', (215, 217), False, 'import xml.etree.ElementTree as ET, s...
''' File: main.py Project: sketchKeras File Created: Sunday, 7th October 2018 5:51:22 pm Author: xiaofeng (<EMAIL>) ----- Last Modified: Sunday, 7th October 2018 7:09:45 pm Modified By: xiaofeng (<EMAIL>>) ----- Copyright 2018.06 - 2018 onion Math, onion Math ''' from keras.models import load_model import keras.backen...
[ "keras.models.load_model", "os.makedirs", "numpy.zeros", "os.path.exists", "numpy.amax", "cv2.imread", "os.path.isfile", "tensorflow.ConfigProto", "tensorflow.GPUOptions", "os.path.join" ]
[((1593, 1627), 'keras.models.load_model', 'load_model', (['"""./sketchKeras/mod.h5"""'], {}), "('./sketchKeras/mod.h5')\n", (1603, 1627), False, 'from keras.models import load_model\n'), ((1757, 1805), 'os.path.join', 'os.path.join', (['self.root', '"""line"""', "(id_str + '.png')"], {}), "(self.root, 'line', id_str +...
import sys, getpass, getopt, requests, random, time from math import * from datetime import datetime import os print('Number of arguments : ', len(sys.argv)) print('#########################################') print('') print('Script récupération d\'images sur Reddit') print('') print('################################...
[ "os.mkdir", "getpass.getuser", "getopt.getopt", "random.randint", "os.path.exists", "requests.get", "datetime.datetime.now", "sys.exit" ]
[((1594, 1616), 'os.path.exists', 'os.path.exists', (['folder'], {}), '(folder)\n', (1608, 1616), False, 'import os\n'), ((4018, 4035), 'getpass.getuser', 'getpass.getuser', ([], {}), '()\n', (4033, 4035), False, 'import sys, getpass, getopt, requests, random, time\n'), ((4085, 4102), 'getpass.getuser', 'getpass.getuse...
import pandas as pd import numpy as np from collections import namedtuple from xbbg import const from xbbg.io import logs, param Session = namedtuple('Session', ['start_time', 'end_time']) SessNA = Session(None, None) def get_interval(ticker, session) -> Session: """ Get interval from defined session ...
[ "xbbg.io.logs.get_logger", "pandas.Timestamp", "xbbg.io.param.to_hour", "collections.namedtuple", "numpy.sign", "xbbg.const.exch_info" ]
[((142, 191), 'collections.namedtuple', 'namedtuple', (['"""Session"""', "['start_time', 'end_time']"], {}), "('Session', ['start_time', 'end_time'])\n", (152, 191), False, 'from collections import namedtuple\n'), ((2358, 2382), 'pandas.Timestamp', 'pd.Timestamp', (['start_time'], {}), '(start_time)\n', (2370, 2382), T...
# -*- coding: utf-8 -*- """ docstring, to write """ from functools import wraps __all__ = [ "indicator_enter_leave_func", "trivial_jit", ] def indicator_enter_leave_func(verbose:int=0): """ """ def dec_outer(fn:callable): @wraps(fn) def dec_inner(*args, **kwargs): if...
[ "functools.wraps" ]
[((256, 265), 'functools.wraps', 'wraps', (['fn'], {}), '(fn)\n', (261, 265), False, 'from functools import wraps\n')]
from custom import Airbyte, Dbt, Superset from diagrams import Diagram from diagrams.aws.security import SecretsManager from diagrams.aws.storage import S3 from diagrams.onprem.database import Postgresql from diagrams.onprem.monitoring import Grafana, Prometheus from diagrams.onprem.workflow import Airflow with Diagr...
[ "diagrams.onprem.workflow.Airflow", "diagrams.onprem.monitoring.Prometheus", "diagrams.aws.security.SecretsManager", "custom.Dbt", "custom.Superset", "diagrams.aws.storage.S3", "custom.Airbyte", "diagrams.Diagram", "diagrams.onprem.database.Postgresql", "diagrams.onprem.monitoring.Grafana" ]
[((315, 465), 'diagrams.Diagram', 'Diagram', ([], {'filename': '"""kind-data-platform"""', 'show': '(False)', 'graph_attr': "{'bgcolor': '#272935', 'dpi': '48.0', 'pad': '0.5'}", 'edge_attr': "{'color': '#eff0ea'}"}), "(filename='kind-data-platform', show=False, graph_attr={'bgcolor':\n '#272935', 'dpi': '48.0', 'pa...
#system modules from os import path # dynamic load modules from os import listdir from imp import load_source # local modules from mat.utils.utils import Utils, Log from mat.utils import settings class CordovaAnalysis(object): LATEST_VERSION_URL = 'https://dist.apache.org/repos/dist/release/cordova/platforms/' ...
[ "os.listdir", "mat.utils.utils.Log.e", "urllib2.urlopen", "mat.utils.utils.Log.w" ]
[((2111, 2151), 'mat.utils.utils.Log.w', 'Log.w', (['"""Getting latest cordova versions"""'], {}), "('Getting latest cordova versions')\n", (2116, 2151), False, 'from mat.utils.utils import Utils, Log\n'), ((2195, 2246), 'urllib2.urlopen', 'urllib2.urlopen', (['CordovaAnalysis.LATEST_VERSION_URL'], {}), '(CordovaAnalys...
#!/usr/bin/python # # Copyright (c) 2012 <NAME> <<EMAIL>> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify...
[ "copy.deepcopy", "itertools.zip_longest", "heapq.heapify" ]
[((4156, 4205), 'itertools.zip_longest', 'itertools.zip_longest', (['*args'], {'fillvalue': 'fillvalue'}), '(*args, fillvalue=fillvalue)\n', (4177, 4205), False, 'import itertools\n'), ((6639, 6663), 'heapq.heapify', 'heapq.heapify', (['iterators'], {}), '(iterators)\n', (6652, 6663), False, 'import heapq\n'), ((5602, ...
import unittest from vessel.preprocess import FileFeeder from vessel.preprocess import DICOMFileIterator class TestFileFeeder(unittest.TestCase): def test_link_building(self): feeder = FileFeeder('data') self.assertEqual(feeder._patient_contours['SCD0000401'], 'SC-HF-I-5') print(len(feeder)...
[ "unittest.main", "vessel.preprocess.FileFeeder" ]
[((1330, 1345), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1343, 1345), False, 'import unittest\n'), ((198, 216), 'vessel.preprocess.FileFeeder', 'FileFeeder', (['"""data"""'], {}), "('data')\n", (208, 216), False, 'from vessel.preprocess import FileFeeder\n'), ((378, 396), 'vessel.preprocess.FileFeeder', 'Fi...
import logging import os, re from threading import Thread from .utils import boolstr, walkfiles from .items import FileItem from .processors import ProcessSequence from .providers import BaseProvider, register_producer, register_property log = logging.getLogger(__name__) class BaseProducer(BaseProvider, Thread): ...
[ "threading.Thread.__init__", "os.path.exists", "logging.getLogger" ]
[((245, 272), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (262, 272), False, 'import logging\n'), ((473, 494), 'threading.Thread.__init__', 'Thread.__init__', (['self'], {}), '(self)\n', (488, 494), False, 'from threading import Thread\n'), ((2191, 2219), 'os.path.exists', 'os.path.exi...
import asyncio import logging from functools import update_wrapper import inject from click import ClickException from mycloud.drive.filesync.progress import ProgressTracker from mycloud.mycloudapi import MyCloudRequestExecutor from mycloud.mycloudapi.auth import AuthMode, MyCloudAuthenticator def authenticated(fun...
[ "logging.debug", "asyncio.get_event_loop", "asyncio.coroutine", "click.ClickException", "functools.update_wrapper", "inject.params" ]
[((886, 915), 'functools.update_wrapper', 'update_wrapper', (['wrapper', 'func'], {}), '(wrapper, func)\n', (900, 915), False, 'from functools import update_wrapper\n'), ((952, 975), 'asyncio.coroutine', 'asyncio.coroutine', (['func'], {}), '(func)\n', (969, 975), False, 'import asyncio\n'), ((1186, 1215), 'functools.u...
""" Item 50: Annotate Class Attributes with __set_name__ """ #!/usr/bin/env PYTHONHASHSEED=1234 python3 # Reproduce book environment import random random.seed(1234) import logging from pprint import pprint from sys import stdout as STDOUT # Write all output to a temporary directory import atexit import gc import i...
[ "atexit.register", "logging.exception", "tempfile.TemporaryDirectory", "os.getcwd", "gc.get_objects", "random.seed", "os.chdir" ]
[((150, 167), 'random.seed', 'random.seed', (['(1234)'], {}), '(1234)\n', (161, 167), False, 'import random\n'), ((360, 389), 'tempfile.TemporaryDirectory', 'tempfile.TemporaryDirectory', ([], {}), '()\n', (387, 389), False, 'import tempfile\n'), ((390, 423), 'atexit.register', 'atexit.register', (['TEST_DIR.cleanup'],...