code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import numpy from ._gauss_kronrod import _gauss_kronrod_integrate def _numpy_all_except(a, axis=-1): axes = numpy.arange(a.ndim) axes = numpy.delete(axes, axis) return numpy.all(a, axis=tuple(axes)) class IntegrationError(Exception): pass def integrate_adaptive( f, intervals, eps_abs=...
[ "numpy.abs", "numpy.delete", "numpy.array", "numpy.concatenate", "numpy.arange" ]
[((115, 135), 'numpy.arange', 'numpy.arange', (['a.ndim'], {}), '(a.ndim)\n', (127, 135), False, 'import numpy\n'), ((147, 171), 'numpy.delete', 'numpy.delete', (['axes', 'axis'], {}), '(axes, axis)\n', (159, 171), False, 'import numpy\n'), ((467, 489), 'numpy.array', 'numpy.array', (['intervals'], {}), '(intervals)\n'...
from random import randint min_number = int(input("Please enter the min number: ")) max_number = int(input("Please enter the max number: ")) if (max_number < min_number): print('Invalid input - shutting down...') else: rnd_number = randint(min_number, max_number) print(rnd_number)
[ "random.randint" ]
[((242, 273), 'random.randint', 'randint', (['min_number', 'max_number'], {}), '(min_number, max_number)\n', (249, 273), False, 'from random import randint\n')]
from __future__ import division, print_function import unittest from smqtk.utils.plugin import ( make_config, to_plugin_config, from_plugin_config ) from smqtk.tests.utils.test_configurable_interface import ( DummyAlgo1, DummyAlgo2 ) def dummy_getter(): return { 'DummyAlgo1': DummyAlgo1,...
[ "smqtk.tests.utils.test_configurable_interface.DummyAlgo1.get_default_config", "smqtk.tests.utils.test_configurable_interface.DummyAlgo2.get_default_config", "smqtk.utils.plugin.to_plugin_config", "smqtk.tests.utils.test_configurable_interface.DummyAlgo1" ]
[((743, 755), 'smqtk.tests.utils.test_configurable_interface.DummyAlgo1', 'DummyAlgo1', ([], {}), '()\n', (753, 755), False, 'from smqtk.tests.utils.test_configurable_interface import DummyAlgo1, DummyAlgo2\n'), ((796, 815), 'smqtk.utils.plugin.to_plugin_config', 'to_plugin_config', (['i'], {}), '(i)\n', (812, 815), Fa...
""" RatesAPI.io Currency Adapter for the Python Currency Converter CLI Official Repo: https://github.com/Privex/python-curconv License: X11 / MIT Copyright:: +===================================================+ | © 2021 Privex Inc. | | https://www.privex.io ...
[ "logging.getLogger", "json.loads", "privex.curconv.base.Pair", "privex.helpers.empty_if", "privex.curconv.base.PairList", "decimal.Decimal" ]
[((1376, 1403), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1393, 1403), False, 'import logging\n'), ((3112, 3147), 'json.loads', 'json.loads', (['dc'], {'parse_float': 'Decimal'}), '(dc, parse_float=Decimal)\n', (3122, 3147), False, 'import json\n'), ((3413, 3435), 'privex.curconv.ba...
from fastapi import APIRouter, Response, Query from forest_lite.server.lib.atlas import load_feature from bokeh.core.json_encoder import serialize_json router = APIRouter() @router.get("/natural_earth_feature/{category}/{name}") async def natural_earth_feature(category: str, name: str, ...
[ "bokeh.core.json_encoder.serialize_json", "fastapi.APIRouter", "fastapi.Response", "forest_lite.server.lib.atlas.load_feature" ]
[((163, 174), 'fastapi.APIRouter', 'APIRouter', ([], {}), '()\n', (172, 174), False, 'from fastapi import APIRouter, Response, Query\n'), ((597, 640), 'forest_lite.server.lib.atlas.load_feature', 'load_feature', (['category', 'name', 'scale', 'extent'], {}), '(category, name, scale, extent)\n', (609, 640), False, 'from...
# Standard Library import json import subprocess import sys from collections import OrderedDict from importlib import reload from os import listdir, path # Django Library from django.apps import apps from django.conf import settings from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import...
[ "collections.OrderedDict", "os.listdir", "django.urls.clear_url_caches", "os.path.isfile", "django.apps.apps.populate", "importlib.reload", "django.urls.reverse", "json.load", "django.apps.apps.clear_cache" ]
[((1327, 1347), 'os.listdir', 'listdir', (['folder_apps'], {}), '(folder_apps)\n', (1334, 1347), False, 'from os import listdir, path\n'), ((2685, 2698), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (2696, 2698), False, 'from collections import OrderedDict\n'), ((2779, 2797), 'django.apps.apps.clear_cach...
from django.contrib import admin from django.urls import path from todo_app import views from todo_app.views import detail_view from todo_app.views import delete_view urlpatterns = [ path('', views.index, name="todo"), path('<id>', detail_view), path('<id>/delete', delete_view), path('admin/', admin.site.u...
[ "django.urls.path" ]
[((187, 221), 'django.urls.path', 'path', (['""""""', 'views.index'], {'name': '"""todo"""'}), "('', views.index, name='todo')\n", (191, 221), False, 'from django.urls import path\n'), ((226, 251), 'django.urls.path', 'path', (['"""<id>"""', 'detail_view'], {}), "('<id>', detail_view)\n", (230, 251), False, 'from djang...
from machine import Pin, PWM MAXVAL = 240 MINVAL = 50 TRAVEL = 180 FREQ = 100 class Servo: def __init__(self, pin_id, limits=(0, TRAVEL)): self.pwm = PWM(Pin(pin_id)) self.pwm.freq(FREQ) self._angle = TRAVEL / 2 assert limits[0] < limits[1], "Incorrect limits" self.min = max(min(limits[0], TRAV...
[ "machine.Pin" ]
[((163, 174), 'machine.Pin', 'Pin', (['pin_id'], {}), '(pin_id)\n', (166, 174), False, 'from machine import Pin, PWM\n')]
import unittest import mock from cloudshell.devices.snmp_handler import SnmpContextManager from cloudshell.devices.snmp_handler import SnmpHandler class TestSnmpContextManager(unittest.TestCase): def setUp(self): self.enable_flow = mock.MagicMock() self.disable_flow = mock.MagicMock() se...
[ "cloudshell.devices.snmp_handler.SnmpContextManager", "mock.patch", "mock.MagicMock" ]
[((691, 746), 'mock.patch', 'mock.patch', (['"""cloudshell.devices.snmp_handler.QualiSnmp"""'], {}), "('cloudshell.devices.snmp_handler.QualiSnmp')\n", (701, 746), False, 'import mock\n'), ((1270, 1325), 'mock.patch', 'mock.patch', (['"""cloudshell.devices.snmp_handler.QualiSnmp"""'], {}), "('cloudshell.devices.snmp_ha...
# Copyright (c) 2021 <NAME>. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import itertools import unittest from typing import List from ai.test_utils import card_list_from_string from ai.utils import card_win_probabilities, prob_opp_has_...
[ "model.game_state_test_utils.get_game_state_for_tests", "model.card.Card", "ai.utils.get_unseen_cards", "ai.utils.populate_game_view", "ai.utils.card_win_probabilities", "model.card.Card.from_string", "itertools.permutations", "ai.test_utils.card_list_from_string", "ai.utils.prob_opp_has_more_trumps...
[((10026, 10052), 'model.game_state_test_utils.get_game_state_for_tests', 'get_game_state_for_tests', ([], {}), '()\n', (10050, 10052), False, 'from model.game_state_test_utils import get_game_state_for_tests\n'), ((10118, 10145), 'ai.utils.get_unseen_cards', 'get_unseen_cards', (['game_view'], {}), '(game_view)\n', (1...
# -*- coding: utf-8 -*- # @Author: yulidong # @Date: 2018-06-20 14:37:27 # @Last Modified by: yulidong # @Last Modified time: 2018-06-27 11:02:47 import cupy import cv2 import numpy import os from python_pfm import * from scipy import stats import matplotlib.pyplot as plt from skimage.filters import roberts, sobel,...
[ "os.listdir", "matplotlib.pyplot.show", "skimage.filters.sobel", "os.path.join", "skimage.filters.roberts", "skimage.exposure.rescale_intensity", "matplotlib.pyplot.tight_layout", "skimage.feature.hog", "time.time", "matplotlib.pyplot.subplots", "skimage.filters.prewitt", "skimage.filters.scha...
[((816, 840), 'os.listdir', 'os.listdir', (['p_left_image'], {}), '(p_left_image)\n', (826, 840), False, 'import os\n'), ((868, 893), 'os.listdir', 'os.listdir', (['p_right_image'], {}), '(p_right_image)\n', (878, 893), False, 'import os\n'), ((923, 946), 'os.listdir', 'os.listdir', (['p_disparity'], {}), '(p_disparity...
import torch import numpy as np from eval import metrics import gc def evaluate_user(model, eval_loader, device, mode='pretrain'): """ evaluate model on recommending items to users (primarily during pre-training step) """ model.eval() eval_loss = 0.0 n100_list, r20_list, r50_list = [], [], [] eval...
[ "torch.mean", "eval.metrics.recall_at_k_batch_torch", "torch.softmax", "numpy.array", "eval.metrics.ndcg_binary_at_k_batch_torch", "gc.collect", "torch.no_grad", "torch.cat" ]
[((1699, 1711), 'gc.collect', 'gc.collect', ([], {}), '()\n', (1709, 1711), False, 'import gc\n'), ((1833, 1853), 'torch.cat', 'torch.cat', (['n100_list'], {}), '(n100_list)\n', (1842, 1853), False, 'import torch\n'), ((1869, 1888), 'torch.cat', 'torch.cat', (['r20_list'], {}), '(r20_list)\n', (1878, 1888), False, 'imp...
from numpy import pi from qcodes import VisaInstrument, validators as vals class Keysight_E8267D(VisaInstrument): ''' This is the qcodes driver for the Agilent_E8267D PSG vector signal generator This driver does not contain all commands available for the E8267D but only the ones most commonly used. ...
[ "qcodes.validators.Numbers" ]
[((866, 903), 'qcodes.validators.Numbers', 'vals.Numbers', (['(250000.0)', '(44000000000.0)'], {}), '(250000.0, 44000000000.0)\n', (878, 903), True, 'from qcodes import VisaInstrument, validators as vals\n'), ((1272, 1295), 'qcodes.validators.Numbers', 'vals.Numbers', (['(-180)', '(180)'], {}), '(-180, 180)\n', (1284, ...
#!/usr/bin/env python3 import re import unittest import amulet class TestDeploy(unittest.TestCase): """ Deploy 2 peers and make sure their status messages contain "or" or "failed" This does not test the substrate - only that the charms deploy and relate. """ @classmethod def setUpClass(cls):...
[ "unittest.main", "amulet.Deployment", "re.compile" ]
[((3338, 3353), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3351, 3353), False, 'import unittest\n'), ((337, 371), 'amulet.Deployment', 'amulet.Deployment', ([], {'series': '"""xenial"""'}), "(series='xenial')\n", (354, 371), False, 'import amulet\n'), ((645, 668), 're.compile', 're.compile', (['"""ok|failed""...
from apscheduler.schedulers.background import BackgroundScheduler from slackbot.bot import Bot sched = BackgroundScheduler() bot = Bot()
[ "slackbot.bot.Bot", "apscheduler.schedulers.background.BackgroundScheduler" ]
[((104, 125), 'apscheduler.schedulers.background.BackgroundScheduler', 'BackgroundScheduler', ([], {}), '()\n', (123, 125), False, 'from apscheduler.schedulers.background import BackgroundScheduler\n'), ((133, 138), 'slackbot.bot.Bot', 'Bot', ([], {}), '()\n', (136, 138), False, 'from slackbot.bot import Bot\n')]
# 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 acc...
[ "jmespath.compile", "awscli.compat.urlparse.urlparse", "os.environ.get" ]
[((1770, 1794), 'awscli.compat.urlparse.urlparse', 'urlparse.urlparse', (['value'], {}), '(value)\n', (1787, 1794), False, 'from awscli.compat import urlparse\n'), ((1425, 1448), 'jmespath.compile', 'jmespath.compile', (['value'], {}), '(value)\n', (1441, 1448), False, 'import jmespath\n'), ((1671, 1702), 'os.environ.g...
# (C) Copyright 2020 Hewlett Packard Enterprise Development LP. # Aruba Central classes import requests from requests.auth import HTTPBasicAuth import classes.classes import urllib3 import json from urllib.parse import urlencode, urlparse, urlunparse urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) ...
[ "requests.post", "requests.Session", "json.dumps", "requests.get", "requests.Request", "urllib3.disable_warnings" ]
[((252, 319), 'urllib3.disable_warnings', 'urllib3.disable_warnings', (['urllib3.exceptions.InsecureRequestWarning'], {}), '(urllib3.exceptions.InsecureRequestWarning)\n', (276, 319), False, 'import urllib3\n'), ((3557, 3591), 'requests.get', 'requests.get', (['url'], {'headers': 'headers'}), '(url, headers=headers)\n'...
# import pprint # from gffutils.interface import FeatureDB # from gffutils.interface import Feature import ast import datetime import sqlite3 from os import listdir from os.path import isfile, join, splitext from typing import List import gffutils import pandas as pd pd.set_option("display.max_columns", None) # todo...
[ "pandas.read_sql_query", "os.listdir", "datetime.datetime.fromtimestamp", "sqlite3.connect", "os.path.join", "os.path.splitext", "gffutils.create_db", "pandas.set_option", "ast.literal_eval", "datetime.datetime.now", "pandas.DataFrame" ]
[((270, 312), 'pandas.set_option', 'pd.set_option', (['"""display.max_columns"""', 'None'], {}), "('display.max_columns', None)\n", (283, 312), True, 'import pandas as pd\n'), ((2498, 2528), 'sqlite3.connect', 'sqlite3.connect', (['seq2ids_db_fp'], {}), '(seq2ids_db_fp)\n', (2513, 2528), False, 'import sqlite3\n'), ((3...
from django.http import request from django.shortcuts import render, redirect from django.contrib.auth import authenticate, login, logout # "python.analysis.extraPaths": ["C:/Users/adity/Desktop/Aditya/webdev/dbms/Home/views.py"] from django.contrib import messages from django.contrib.auth.models import User # from rep...
[ "django.shortcuts.render", "django.contrib.auth.authenticate", "io.BytesIO", "django.contrib.auth.login", "django.contrib.auth.models.User.objects.filter", "django.http.FileResponse", "django.shortcuts.redirect", "django.contrib.messages.add_message", "reportlab.pdfgen.canvas.Canvas", "django.cont...
[((616, 657), 'django.shortcuts.render', 'render', (['request', '"""adminhomepage.html"""', '{}'], {}), "(request, 'adminhomepage.html', {})\n", (622, 657), False, 'from django.shortcuts import render, redirect\n'), ((694, 727), 'django.shortcuts.render', 'render', (['request', '"""login.html"""', '{}'], {}), "(request...
from kaldi.base import math as kaldi_math from kaldi.base import Timer from kaldi.matrix import * from kaldi.matrix.common import * from kaldi.cudamatrix import cuda_available, CuMatrix # import unittest def aux(size_multiple): num_matrices = 256 time_in_secs = 0.2 sizes = [] for i in range(num_matrices): num_...
[ "kaldi.base.math.rand_int", "kaldi.cudamatrix.CuMatrix", "kaldi.cudamatrix.CuDevice.instantiate", "kaldi.base.Timer", "kaldi.cudamatrix.cuda_available" ]
[((627, 634), 'kaldi.base.Timer', 'Timer', ([], {}), '()\n', (632, 634), False, 'from kaldi.base import Timer\n'), ((1279, 1295), 'kaldi.cudamatrix.cuda_available', 'cuda_available', ([], {}), '()\n', (1293, 1295), False, 'from kaldi.cudamatrix import cuda_available, CuMatrix\n'), ((327, 353), 'kaldi.base.math.rand_int...
from time import sleep print('\33[1;32m=+=\33[m'*7) print(' \33[1;32mPORTAL DO PROFESSOR\33[m') print('\33[1;32m=+=\33[m'*7) sleep(1) n1 = float(input('\33[1;97mDigite a primeira nota:\33[m ')) n2 = float(input('\33[1;97mDigite a segunda nota:\33[m ')) m = (n1 + n2) / 2 if n1 > 10 or n1 < 0 or n2 > 10 or n2 < 0: p...
[ "time.sleep" ]
[((125, 133), 'time.sleep', 'sleep', (['(1)'], {}), '(1)\n', (130, 133), False, 'from time import sleep\n'), ((434, 442), 'time.sleep', 'sleep', (['(2)'], {}), '(2)\n', (439, 442), False, 'from time import sleep\n')]
import numpy as np ''' REFERENCES <NAME>., <NAME>, <NAME>, and <NAME> (2001), Plants in water-controlled ecosystems Active role in hydrologic processes and response to water stress II. Probabilistic soil moisture dynamics, Adv. Water Resour., 24(7), 707-723, doi 10.1016/S0309-1708(01)00005-7. ...
[ "numpy.mean", "numpy.log", "numpy.exp", "numpy.sum", "numpy.linspace", "numpy.array", "numpy.isnan", "numpy.var" ]
[((4089, 4098), 'numpy.exp', 'np.exp', (['x'], {}), '(x)\n', (4095, 4098), True, 'import numpy as np\n'), ((5333, 5347), 'numpy.exp', 'np.exp', (['sst_e1'], {}), '(sst_e1)\n', (5339, 5347), True, 'import numpy as np\n'), ((5859, 5872), 'numpy.exp', 'np.exp', (['fc_e1'], {}), '(fc_e1)\n', (5865, 5872), True, 'import num...
import os # pool configuration _port = 3333 # daily interest rates _interest = { 'bittrex' : { 'btc' : { 'bid': { 'rate' : 0.0025, 'target' : 10000.0 }, 'ask': { 'rate' : 0.0025, 'target' : 10000.0 } } }, 'poloniex' : { 'btc' : { 'bi...
[ "os.getenv" ]
[((1613, 1630), 'os.getenv', 'os.getenv', (['"""HOME"""'], {}), "('HOME')\n", (1622, 1630), False, 'import os\n')]
# -*- encoding: utf-8 -*- """Record/Playback an api method's return values. TODO: Make @api_automock decorator separate. """ import collections import hashlib import pprint from slugify import slugify from api_recorder.api_controller import ApiRecorderController pp = pprint.PrettyPrinter(indent=2) acr_remote = ApiRe...
[ "pprint.PrettyPrinter", "api_recorder.api_controller.ApiRecorderController", "slugify.slugify" ]
[((270, 300), 'pprint.PrettyPrinter', 'pprint.PrettyPrinter', ([], {'indent': '(2)'}), '(indent=2)\n', (290, 300), False, 'import pprint\n'), ((315, 367), 'api_recorder.api_controller.ApiRecorderController', 'ApiRecorderController', (['"""api_recorder"""', '"""root"""', '(False)'], {}), "('api_recorder', 'root', False)...
import math import sys import numpy as np import scipy import itertools import copy as cp from helpers import * import opt_einsum as oe import tools import time from ClusteredOperator import * from ClusteredState import * from Cluster import * from ham_build import * def compute_rspt2_correction(ci_vector, clustered...
[ "numpy.insert", "numpy.multiply", "numpy.linalg.solve", "numpy.eye", "itertools.product", "numpy.fill_diagonal", "scipy.sparse.linalg.eigsh", "numpy.dot", "numpy.zeros", "numpy.vstack", "numpy.linalg.norm", "numpy.linalg.eigh", "time.time" ]
[((419, 430), 'time.time', 'time.time', ([], {}), '()\n', (428, 430), False, 'import time\n'), ((654, 665), 'time.time', 'time.time', ([], {}), '()\n', (663, 665), False, 'import time\n'), ((1763, 1774), 'time.time', 'time.time', ([], {}), '()\n', (1772, 1774), False, 'import time\n'), ((2130, 2141), 'time.time', 'time...
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2020-2021 Alibaba Group Holding Limited. # # 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/LI...
[ "vineyard.shutdown", "vineyard.init", "vineyard.connect", "vineyard.get_current_client" ]
[((727, 757), 'vineyard.init', 'vineyard.init', ([], {'num_instances': '(3)'}), '(num_instances=3)\n', (740, 757), False, 'import vineyard\n'), ((1029, 1048), 'vineyard.shutdown', 'vineyard.shutdown', ([], {}), '()\n', (1046, 1048), False, 'import vineyard\n'), ((1089, 1104), 'vineyard.init', 'vineyard.init', ([], {}),...
import numpy as np import argparse, os, sys, h5py from hfd.variables import label_df parser = argparse.ArgumentParser(description='Add latent annotations to h5s.') parser.add_argument('folder', type=str, help='Folder to search for h5 files.') parser.add_argument('fontsize', type=int, help='Fontsize.') args = parser....
[ "numpy.stack", "os.walk", "os.path.join", "argparse.ArgumentParser" ]
[((96, 165), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Add latent annotations to h5s."""'}), "(description='Add latent annotations to h5s.')\n", (119, 165), False, 'import argparse, os, sys, h5py\n'), ((537, 552), 'os.walk', 'os.walk', (['folder'], {}), '(folder)\n', (544, 552), Fal...
from distutils.core import setup setup( name = 'mnistdb', packages = ['mnistdb'], version = '0.1.5', description = 'A library to load the MNIST database of handwritten digits into numpy arrays.', author = 'daniel-e', author_email = '<EMAIL>', url = 'https://github.com/daniel-e/mnistdb', download_url = '...
[ "distutils.core.setup" ]
[((33, 431), 'distutils.core.setup', 'setup', ([], {'name': '"""mnistdb"""', 'packages': "['mnistdb']", 'version': '"""0.1.5"""', 'description': '"""A library to load the MNIST database of handwritten digits into numpy arrays."""', 'author': '"""daniel-e"""', 'author_email': '"""<EMAIL>"""', 'url': '"""https://github.c...
from numchess import COLOR_NAMES, PIECE_NAMES from pygame.constants import ( MOUSEBUTTONDOWN, MOUSEBUTTONUP, QUIT, RESIZABLE) from pygame.display import flip as display_flip, set_caption, set_icon, set_mode from pygame.event import get as get_event from pygame.font import Font from pygame.image import load as loa...
[ "pygame.mouse.get_pressed", "pygame.init", "profile.Profile", "game.Game", "function.get_surface", "os.walk", "pygame.transform.scale", "pygame.display.set_mode", "pygame.display.flip", "pygame.display.set_icon", "pygame.mouse.get_pos", "os.path.split", "pygame.Rect", "profile.Profile.is_v...
[((825, 838), 'pygame.init', 'pygame_init', ([], {}), '()\n', (836, 838), True, 'from pygame import Rect, init as pygame_init\n'), ((862, 877), 'os.path.split', 'split', (['__file__'], {}), '(__file__)\n', (867, 877), False, 'from os.path import join, split\n'), ((1077, 1111), 'os.path.join', 'join', (['folder', '"""as...
from fastapi import APIRouter import json import requests from bson import json_util from starlette.routing import Router # from ..configs.mongoconnect import connectMongoClient from .models import Profile,MeetingDto from .configs.mongoconnect import connectMongoClient router = APIRouter(prefix="/profiles") ...
[ "fastapi.APIRouter", "requests.request", "bson.json_util.dumps" ]
[((289, 318), 'fastapi.APIRouter', 'APIRouter', ([], {'prefix': '"""/profiles"""'}), "(prefix='/profiles')\n", (298, 318), False, 'from fastapi import APIRouter\n'), ((2635, 2684), 'requests.request', 'requests.request', (['"""GET"""', 'baseUrl'], {'headers': 'headers'}), "('GET', baseUrl, headers=headers)\n", (2651, 2...
################################################################################ # load table from comma-delimited text file; equivalent to executing this sql: # "load data local infile 'data.txt' into table people fields terminated by ','" ###########################################################################...
[ "MySQLdb.connect" ]
[((352, 419), 'MySQLdb.connect', 'MySQLdb.connect', ([], {'host': '"""localhost"""', 'user': '"""root"""', 'passwd': '"""<PASSWORD>"""'}), "(host='localhost', user='root', passwd='<PASSWORD>')\n", (367, 419), False, 'import MySQLdb\n')]
import requests from configparser import ConfigParser import psycopg2 from datetime import datetime, timedelta import json conf = ConfigParser() conf.read('config.ini') pg_data = conf['DATABASE'] conn = psycopg2.connect(dbname=pg_data['dbname'], user=pg_data['user'], ...
[ "psycopg2.connect", "configparser.ConfigParser", "requests.get", "datetime.datetime.now", "datetime.timedelta" ]
[((131, 145), 'configparser.ConfigParser', 'ConfigParser', ([], {}), '()\n', (143, 145), False, 'from configparser import ConfigParser\n'), ((204, 325), 'psycopg2.connect', 'psycopg2.connect', ([], {'dbname': "pg_data['dbname']", 'user': "pg_data['user']", 'password': "pg_data['password']", 'host': "pg_data['host']"}),...
import numpy from chainer import cuda from chainer import function from chainer.utils import type_check class Where(function.Function): """Choose elements depending on condition.""" def check_type_forward(self, in_types): type_check.expect(in_types.size() == 3) c_type, x_type, y_type = in_t...
[ "chainer.utils.type_check.expect", "chainer.cuda.get_array_module" ]
[((334, 474), 'chainer.utils.type_check.expect', 'type_check.expect', (['(c_type.dtype == numpy.bool_)', '(x_type.dtype == y_type.dtype)', '(x_type.shape == c_type.shape)', '(y_type.shape == c_type.shape)'], {}), '(c_type.dtype == numpy.bool_, x_type.dtype == y_type.dtype,\n x_type.shape == c_type.shape, y_type.shap...
import os import platform import subprocess import sys from setuptools import setup, Extension from setuptools.command.build_ext import build_ext __version__ = '0.4.1' __capy_amqp_version__ = '0.5.4' darwin_flags = ['-mmacosx-version-min=10.14', '-faligned-allocation'] cmake_darwin_flags = ['-DOPENSSL_ROOT_DIR=/usr/...
[ "subprocess.check_output", "os.path.exists", "os.makedirs", "subprocess.check_call", "os.path.join", "setuptools.setup", "os.environ.copy", "platform.system", "os.path.isdir", "os.path.abspath" ]
[((5484, 5894), 'setuptools.setup', 'setup', ([], {'cmdclass': "{'build_ext': BuildExt}", 'name': '"""capy_amqp"""', 'version': '__version__', 'author': '"""AIthea"""', 'license': '"""MIT"""', 'description': '"""Python Package AMQP C Extension"""', 'url': '"""http://aithea.com/"""', 'packages': "['capy_amqp']", 'ext_mo...
"""Add change_tag_expiration log type Revision ID: d8989249f8f6 Revises: dc4<PASSWORD> Create Date: 2017-06-21 21:18:25.948689 """ # revision identifiers, used by Alembic. revision = "d8989249f8f6" down_revision = "dc4af11a5f90" from alembic import op as original_op from data.migrations.progress import ProgressWrap...
[ "data.migrations.progress.ProgressWrapper" ]
[((383, 430), 'data.migrations.progress.ProgressWrapper', 'ProgressWrapper', (['original_op', 'progress_reporter'], {}), '(original_op, progress_reporter)\n', (398, 430), False, 'from data.migrations.progress import ProgressWrapper\n'), ((570, 617), 'data.migrations.progress.ProgressWrapper', 'ProgressWrapper', (['orig...
from setuptools import setup setup(name='lib22pt', version='0.1', description='Libraries for AB-22PT data analysis', url='http://github.com/rouckas/lib22pt', author='<NAME>', author_email='<EMAIL>', license='MIT', packages=['lib22pt'], setup_requires=['pytest-runner'], ...
[ "setuptools.setup" ]
[((30, 332), 'setuptools.setup', 'setup', ([], {'name': '"""lib22pt"""', 'version': '"""0.1"""', 'description': '"""Libraries for AB-22PT data analysis"""', 'url': '"""http://github.com/rouckas/lib22pt"""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'license': '"""MIT"""', 'packages': "['lib22pt']", 'se...
import argparse import cv2 import numpy as np import torch from models.with_mobilenet import PoseEstimationWithMobileNet from modules.keypoints import extract_keypoints, group_keypoints from modules.load_state import load_state from modules.pose import Pose, track_poses from val import normalize, pad_width import ti...
[ "cv2.rectangle", "modules.keypoints.group_keypoints", "models.with_mobilenet.PoseEstimationWithMobileNet", "torch.from_numpy", "cv2.imshow", "sys.exit", "modules.keypoints.extract_keypoints", "modules.pose.Pose", "argparse.ArgumentParser", "cv2.VideoWriter", "cv2.addWeighted", "os.path.isdir",...
[((1940, 2014), 'cv2.resize', 'cv2.resize', (['img', '(0, 0)'], {'fx': 'scale', 'fy': 'scale', 'interpolation': 'cv2.INTER_CUBIC'}), '(img, (0, 0), fx=scale, fy=scale, interpolation=cv2.INTER_CUBIC)\n', (1950, 2014), False, 'import cv2\n'), ((2032, 2074), 'val.normalize', 'normalize', (['scaled_img', 'img_mean', 'img_s...
import sys import re import itertools import xml.etree.ElementTree as ET HeaderKeys = 'default actor interaction prop event'.split() SortedHeaders = {'default': [], 'actor': [], 'interaction': [], 'prop': [], 'event': []} KeyTable = {'receiving_actor_id': 'interaction', 'prop_id': 'prop'} # NoneString = '$$NONE$$' Non...
[ "itertools.chain", "re.escape", "xml.etree.ElementTree.parse" ]
[((1464, 1488), 'itertools.chain', 'itertools.chain', (['*actlst'], {}), '(*actlst)\n', (1479, 1488), False, 'import itertools\n'), ((1504, 1564), 'itertools.chain', 'itertools.chain', (['*[SortedHeaders[key] for key in HeaderKeys]'], {}), '(*[SortedHeaders[key] for key in HeaderKeys])\n', (1519, 1564), False, 'import ...
import sys import os import logging import re from datetime import datetime, timedelta from qgraph.graphdayreport import graphDayReport from reportbuilder.reportbuilder import ReportBuilder from telegram.telegram import TelegramBot # Log level 1 is INFO, Log level 2 is Debug loglevel = int(os.environ.get('loglevel')) ...
[ "logging.basicConfig", "logging.getLogger", "qgraph.graphdayreport.graphDayReport", "datetime.datetime", "reportbuilder.reportbuilder.ReportBuilder", "os.environ.get", "re.match", "telegram.telegram.TelegramBot", "datetime.datetime.now", "datetime.timedelta" ]
[((372, 406), 'os.environ.get', 'os.environ.get', (['"""telegramapitoken"""'], {}), "('telegramapitoken')\n", (386, 406), False, 'import os\n'), ((425, 455), 'os.environ.get', 'os.environ.get', (['"""eventchannel"""'], {}), "('eventchannel')\n", (439, 455), False, 'import os\n'), ((576, 735), 'logging.basicConfig', 'lo...
from django.http import HttpResponse from . import models def simple_detail(request, slug): model = models.SimpleModel.objects.get(slug=slug) return HttpResponse(model.slug) def related_detail(request, slug): model = models.RelatedModel.objects.get(slug=slug) related = model.related.all() relat...
[ "django.http.HttpResponse" ]
[((160, 184), 'django.http.HttpResponse', 'HttpResponse', (['model.slug'], {}), '(model.slug)\n', (172, 184), False, 'from django.http import HttpResponse\n')]
from logging import getLogger from typing import Optional from gumo.core.injector import injector from gumo.pullqueue.server.domain.configuration import PullQueueConfiguration from gumo.pullqueue.server.bind import pullqueue_bind logger = getLogger(__name__) class ConfigurationFactory: @classmethod def buil...
[ "logging.getLogger", "gumo.core.injector.injector.binder.bind", "gumo.pullqueue.server.domain.configuration.PullQueueConfiguration", "gumo.core.injector.injector.binder.install" ]
[((241, 260), 'logging.getLogger', 'getLogger', (['__name__'], {}), '(__name__)\n', (250, 260), False, 'from logging import getLogger\n'), ((857, 909), 'gumo.core.injector.injector.binder.bind', 'injector.binder.bind', (['PullQueueConfiguration', 'config'], {}), '(PullQueueConfiguration, config)\n', (877, 909), False, ...
# -*- coding: utf-8 -*- # Copyright 2020 Immfly.com. 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # or in the "license" f...
[ "os.path.exists", "os.path.getsize", "os.rename", "filelock.FileLock", "os.path.join", "os.path.isfile", "os.path.basename", "os.remove" ]
[((2492, 2517), 'os.path.isfile', 'os.path.isfile', (['file_part'], {}), '(file_part)\n', (2506, 2517), False, 'import os\n'), ((5650, 5687), 'os.path.join', 'os.path.join', (['temp_dir', 'download_file'], {}), '(temp_dir, download_file)\n', (5662, 5687), False, 'import os\n'), ((7834, 7875), 'os.path.join', 'os.path.j...
import unittest import logging def warn_if_not_implemented(func): def wrapper(*args, **kwargs): try: func(*args, **kwargs) except Exception as e: if e.args[0] == 'Not implemented': logging.warning('%s is not implemented' % func.__name__[len('test_'):]) ...
[ "max3.max3", "even.is_even", "min3.min3", "abs.abs", "odd.is_odd", "min2.min2", "unittest.main" ]
[((1327, 1342), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1340, 1342), False, 'import unittest\n'), ((523, 536), 'max3.max3', 'max3', (['(1)', '(2)', '(3)'], {}), '(1, 2, 3)\n', (527, 536), False, 'from max3 import max3\n'), ((651, 661), 'min2.min2', 'min2', (['(1)', '(2)'], {}), '(1, 2)\n', (655, 661), Fals...
from setuptools import setup setup(name='ftdpack', version='1.0', description='package to access failure to deliver data', url='https://github.com/jc22dora/ftdpack', author='<NAME>', author_email='<EMAIL>', license='MIT', packages=['ftd'], install_requires=['mysql-connector==2.2.9'], zip_safe=False)
[ "setuptools.setup" ]
[((30, 321), 'setuptools.setup', 'setup', ([], {'name': '"""ftdpack"""', 'version': '"""1.0"""', 'description': '"""package to access failure to deliver data"""', 'url': '"""https://github.com/jc22dora/ftdpack"""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'license': '"""MIT"""', 'packages': "['ftd']",...
from collections import OrderedDict from inspect import Parameter, signature import pytest from attr import define from incant import Incanter def test_simple_dep(incanter: Incanter): def func(dep1) -> int: return dep1 + 1 with pytest.raises(TypeError): incanter.invoke(func) assert sig...
[ "pytest.raises", "inspect.Parameter" ]
[((250, 274), 'pytest.raises', 'pytest.raises', (['TypeError'], {}), '(TypeError)\n', (263, 274), False, 'import pytest\n'), ((3960, 3984), 'pytest.raises', 'pytest.raises', (['Exception'], {}), '(Exception)\n', (3973, 3984), False, 'import pytest\n'), ((4027, 4051), 'pytest.raises', 'pytest.raises', (['Exception'], {}...
#!/usr/bin/env python # -*- coding: utf-8 -*- # 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 t...
[ "django.conf.urls.url" ]
[((809, 903), 'django.conf.urls.url', 'urls.url', (['"""^pasta/new_package/?$"""', 'pasta_gmn_adapter.app.views.pasta.add_package_to_queue'], {}), "('^pasta/new_package/?$', pasta_gmn_adapter.app.views.pasta.\n add_package_to_queue)\n", (817, 903), True, 'import django.conf.urls as urls\n'), ((925, 986), 'django.con...
#!/usr/bin/env python3 # # Copyright (c) 2018 Institute for Basic Science # # 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 u...
[ "tensorflow.keras.backend.cast_to_floatx", "tensorflow.get_logger", "tensorflow.keras.backend.argmax", "io.StringIO", "tensorflow.keras.backend.expand_dims", "tensorflow.keras.backend.sum" ]
[((2763, 2787), 'tensorflow.keras.backend.expand_dims', 'K.expand_dims', (['y_true', '(2)'], {}), '(y_true, 2)\n', (2776, 2787), True, 'import tensorflow.keras.backend as K\n'), ((2805, 2829), 'tensorflow.keras.backend.expand_dims', 'K.expand_dims', (['y_pred', '(1)'], {}), '(y_pred, 1)\n', (2818, 2829), True, 'import ...
#! /usr/bin/env python from __future__ import print_function import argparse import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torchvision from torchvision import datasets, transforms import torchvision.models as models import time import sys import os import glob ...
[ "torch.manual_seed", "torch.nn.CrossEntropyLoss", "torchvision.transforms.RandomHorizontalFlip", "torch.optim.lr_scheduler.StepLR", "torchvision.datasets.CIFAR10", "torch.nn.Linear", "torch.utils.data.DataLoader", "torchvision.transforms.Resize", "torch.no_grad", "torchvision.transforms.ToTensor",...
[((420, 441), 'torch.nn.CrossEntropyLoss', 'nn.CrossEntropyLoss', ([], {}), '()\n', (439, 441), True, 'import torch.nn as nn\n'), ((3407, 3430), 'torch.manual_seed', 'torch.manual_seed', (['seed'], {}), '(seed)\n', (3424, 3430), False, 'import torch\n'), ((3444, 3487), 'torch.device', 'torch.device', (["('cuda' if use_...
import base64 from yoti_python_sdk.utils import YotiSerializable from yoti_python_sandbox.doc_scan.document_filter import ( # noqa: F401 SandboxDocumentFilter, ) from yoti_python_sandbox.doc_scan.task.sandbox_text_extraction_recommendation import ( # noqa: F401 SandboxTextDataExtractionRecommendation, ) cl...
[ "base64.b64encode" ]
[((706, 735), 'base64.b64encode', 'base64.b64encode', (['self.__data'], {}), '(self.__data)\n', (722, 735), False, 'import base64\n')]
from datetime import datetime from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.core.mail import EmailMultiAlternatives from django.template.loader import render_to_string from django.views import View from django.urls import reverse from django.views.gene...
[ "datetime.datetime.today", "django.shortcuts.redirect", "django.shortcuts.get_object_or_404", "datetime.datetime.utcnow" ]
[((4621, 4651), 'django.shortcuts.get_object_or_404', 'get_object_or_404', (['Post'], {'id': 'pk'}), '(Post, id=pk)\n', (4638, 4651), False, 'from django.shortcuts import redirect, get_object_or_404, render\n'), ((986, 1003), 'datetime.datetime.utcnow', 'datetime.utcnow', ([], {}), '()\n', (1001, 1003), False, 'from da...
""" File Name: get_torch_optimizer.py Project: dl-project-template File Description: This file implements a function named 'get_pytorch_optimizer', which returns any PyTorch optimizer with given parameters. """ from typing import Dict, Iterable, Type, Any, Optional import torch from torc...
[ "src.utilities.is_subclass", "src.utilities.get_valid_kwargs", "src.utilities.get_class_from_module" ]
[((718, 757), 'src.utilities.is_subclass', 'is_subclass', (['optimizer_class', 'Optimizer'], {}), '(optimizer_class, Optimizer)\n', (729, 757), False, 'from src.utilities import is_subclass, get_class_from_module, get_valid_kwargs\n'), ((1302, 1347), 'src.utilities.get_class_from_module', 'get_class_from_module', (['op...
from libs.threading import Threads from school.content import courseinfo from school.content.coursemanager import CourseManager from school.ui.userinterface import UserInterface from . import notifications class Starter: @staticmethod def check_changes(): courses = courseinfo.get_courses() c...
[ "school.content.coursemanager.CourseManager", "school.content.courseinfo.get_courses", "libs.threading.Threads", "school.content.outputwriter.write_output_to_html" ]
[((286, 310), 'school.content.courseinfo.get_courses', 'courseinfo.get_courses', ([], {}), '()\n', (308, 310), False, 'from school.content import courseinfo\n'), ((350, 372), 'school.content.coursemanager.CourseManager', 'CourseManager', (['c', 'part'], {}), '(c, part)\n', (363, 372), False, 'from school.content.course...
''' Description: Given a text file file.txt that contains list of phone numbers (one per line), write a one liner bash script to print all valid phone numbers. You may assume that a valid phone number must appear in one of the following two formats: (xxx) xxx-xxxx or xxx-xxx-xxxx. (x means a digit) You may also ass...
[ "re.match" ]
[((805, 823), 're.match', 're.match', (['regex', 's'], {}), '(regex, s)\n', (813, 823), False, 'import re\n')]
from dbconnector import dbconnector connector = dbconnector.sqliteConnector("data/Quoterly.db") connector.drop() connector.create() connector.add_user('root', '<EMAIL>', 'password') connector.update_user('root', 'is_admin', 'true') connector.add_user('user', '<EMAIL>', 'password')
[ "dbconnector.dbconnector.sqliteConnector" ]
[((49, 96), 'dbconnector.dbconnector.sqliteConnector', 'dbconnector.sqliteConnector', (['"""data/Quoterly.db"""'], {}), "('data/Quoterly.db')\n", (76, 96), False, 'from dbconnector import dbconnector\n')]
import pandas as pd from scipy.stats import randint def gmm_dist(df, proportion=.1): '''Creates scipy randint distribution with max=(n_samples * proportion) of df. Parameters ---------- df : array-like proportion : float, optional default=.1 Determines the maximum of the range fo...
[ "scipy.stats.randint" ]
[((456, 476), 'scipy.stats.randint', 'randint', (['(1)', 'dist_max'], {}), '(1, dist_max)\n', (463, 476), False, 'from scipy.stats import randint\n')]
import numpy as np from gym_env.feature_processors.enums import ACTION_NAME_TO_INDEX, DOUBLE_ACTION_PARA_TYPE class Instance: # reward is the td n reward plus the target state value def __init__(self, dota_time=None, state_gf=None, state_ucf=None, ...
[ "numpy.zeros_like" ]
[((1822, 1861), 'numpy.zeros_like', 'np.zeros_like', (['target_instance.state_gf'], {}), '(target_instance.state_gf)\n', (1835, 1861), True, 'import numpy as np\n'), ((1887, 1927), 'numpy.zeros_like', 'np.zeros_like', (['target_instance.state_ucf'], {}), '(target_instance.state_ucf)\n', (1900, 1927), True, 'import nump...
""" created: mcclayac Company Name : BigMAN Software MyName: <NAME> date: 11/23/18 day of month: 23 Project Name: 20PythonLibraries filename: package name: IDE: PyCharm """ # In [5]: history # import psutil # psutil.virtual_memory() # psutil.swap_memory() # psutil.dis...
[ "psutil.Process", "time.sleep", "os.getpid", "sys.exit" ]
[((442, 453), 'os.getpid', 'os.getpid', ([], {}), '()\n', (451, 453), False, 'import os, sys, time\n'), ((458, 477), 'psutil.Process', 'psutil.Process', (['pid'], {}), '(pid)\n', (472, 477), False, 'import psutil\n'), ((837, 850), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (847, 850), False, 'import os, sys, t...
#!/usr/bin/env python import sqlite3 conn = None c = None columns = "" def mainMenu(): print ("\nChoose an option below:\n") print ("\t1. Create a new database") print ("\t2. Edit an existing database") print ("\t3. Quit\n") def connectToFile(): global conn, c dbName = raw_input("Enter datab...
[ "sqlite3.connect" ]
[((370, 393), 'sqlite3.connect', 'sqlite3.connect', (['dbName'], {}), '(dbName)\n', (385, 393), False, 'import sqlite3\n')]
from flask import Flask, jsonify import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, func import numpy as np import pandas as pd engine = create_engine("sqlite:///Resources/hawaii.sqlite") Base = automap_base() Base.prepare(engine, ...
[ "flask.Flask", "sqlalchemy.ext.automap.automap_base", "sqlalchemy.create_engine", "sqlalchemy.orm.Session", "flask.jsonify" ]
[((226, 276), 'sqlalchemy.create_engine', 'create_engine', (['"""sqlite:///Resources/hawaii.sqlite"""'], {}), "('sqlite:///Resources/hawaii.sqlite')\n", (239, 276), False, 'from sqlalchemy import create_engine, func\n'), ((284, 298), 'sqlalchemy.ext.automap.automap_base', 'automap_base', ([], {}), '()\n', (296, 298), F...
# Generated by Django 3.0.3 on 2020-03-14 09:14 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='pollimetermodel', fields=[ ('id', models.Au...
[ "django.db.models.DateTimeField", "django.db.models.FloatField", "django.db.models.AutoField", "django.db.models.CharField" ]
[((311, 404), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (327, 404), False, 'from django.db import migrations, models\...
import setuptools with open('README.md', 'r') as fh: long_description = fh.read() setuptools.setup( name='freehackquest-libclient-py', version='v0.2.47', install_requires=['websocket-client>=0.56.0', 'requests>=2.21.0'], keywords=['ctf', 'fhq', 'fhq-server', 'libfreehackquest-client', 'jeopardy', ...
[ "setuptools.setup" ]
[((88, 849), 'setuptools.setup', 'setuptools.setup', ([], {'name': '"""freehackquest-libclient-py"""', 'version': '"""v0.2.47"""', 'install_requires': "['websocket-client>=0.56.0', 'requests>=2.21.0']", 'keywords': "['ctf', 'fhq', 'fhq-server', 'libfreehackquest-client', 'jeopardy',\n 'freehackquest']", 'author': '"...
#!/usr/bin/python3 -tt from rpmfluff import SimpleRpmBuild from rpmfluff import YumRepoBuild from pathlib import PurePosixPath import os import shutil work_file = os.path.realpath(__file__) work_dir = os.path.dirname(work_file) file_base_mane = PurePosixPath(work_file).stem repo_dir = os.path.join(work_dir, file_base...
[ "os.path.exists", "os.makedirs", "os.path.join", "os.path.realpath", "os.path.dirname", "rpmfluff.SimpleRpmBuild", "os.chdir", "rpmfluff.YumRepoBuild", "shutil.rmtree", "pathlib.PurePosixPath" ]
[((165, 191), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (181, 191), False, 'import os\n'), ((203, 229), 'os.path.dirname', 'os.path.dirname', (['work_file'], {}), '(work_file)\n', (218, 229), False, 'import os\n'), ((288, 326), 'os.path.join', 'os.path.join', (['work_dir', 'file_base_m...
from PIL import Image from PIL import ImageFilter img = Image.open("rumi.jpg") #for CMYK.. #CMYK stands for C=cyan, M=megenta, Y=yellow, K=black #bw = img.convert('CMYK') #L stands for Luminent #bw = img.convert('L') #bw.show() #for image blur effect #blur = img.filter(ImageFilter.BLUR) #blur.show(...
[ "PIL.Image.open" ]
[((60, 82), 'PIL.Image.open', 'Image.open', (['"""rumi.jpg"""'], {}), "('rumi.jpg')\n", (70, 82), False, 'from PIL import Image\n')]
#! /usr/bin/env python """Call the main setup_git.py. This should be copied to the main directory of your project and named setup_git.py.""" import os import os.path os.system(os.path.join("tools", "dev_tools", "git", "setup_git.py"))
[ "os.path.join" ]
[((177, 234), 'os.path.join', 'os.path.join', (['"""tools"""', '"""dev_tools"""', '"""git"""', '"""setup_git.py"""'], {}), "('tools', 'dev_tools', 'git', 'setup_git.py')\n", (189, 234), False, 'import os\n')]
from django.shortcuts import render, redirect from django.contrib.auth.decorators import login_required from django.views import generic from rest_framework.response import Response from rest_framework import status from django.utils.translation import ugettext as _ from django.shortcuts import get_object_or_404 impo...
[ "django.shortcuts.render", "traceback.print_exc", "tools.logs.error" ]
[((1506, 1550), 'django.shortcuts.render', 'render', (['request', '"""main/index.html"""', 'contexts'], {}), "(request, 'main/index.html', contexts)\n", (1512, 1550), False, 'from django.shortcuts import render, redirect\n'), ((1587, 1608), 'traceback.print_exc', 'traceback.print_exc', ([], {}), '()\n', (1606, 1608), F...
# standard library imports import json import datetime # external imports import paho.mqtt.client as mqtt # internal imports from main.app import db from main.workers.util import worker_log from main.util import load_server_config, parse_json_datetime from main.users.auth import message_auth_token from main.message...
[ "main.messages.outgoing_messages.handle_send_text_message", "json.loads", "datetime.datetime.utcnow", "paho.mqtt.client.Client", "main.util.parse_json_datetime", "main.users.auth.message_auth_token", "main.util.load_server_config", "main.messages.outgoing_messages.handle_send_email", "main.resources...
[((662, 682), 'main.util.load_server_config', 'load_server_config', ([], {}), '()\n', (680, 682), False, 'from main.util import load_server_config, parse_json_datetime\n'), ((809, 850), 'main.workers.util.worker_log', 'worker_log', (['"""message_monitor"""', '"""starting"""'], {}), "('message_monitor', 'starting')\n", ...
from setuptools import find_packages, setup setup( name='sak-sql', version='0.0.1', packages=find_packages(), install_requires=[ "sqlalchemy" ], )
[ "setuptools.find_packages" ]
[((107, 122), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (120, 122), False, 'from setuptools import find_packages, setup\n')]
from werkzeug.utils import find_modules, import_string from config import Config from flower_bed_designer import helpers from flower_bed_designer.blueprints.plant import views def register_blueprints(app): for name in find_modules('flower_bed_designer.blueprints', recursive=True): mod = import_string(nam...
[ "flower_bed_designer.helpers.ApiFlask", "werkzeug.utils.import_string", "werkzeug.utils.find_modules" ]
[((225, 287), 'werkzeug.utils.find_modules', 'find_modules', (['"""flower_bed_designer.blueprints"""'], {'recursive': '(True)'}), "('flower_bed_designer.blueprints', recursive=True)\n", (237, 287), False, 'from werkzeug.utils import find_modules, import_string\n'), ((443, 469), 'flower_bed_designer.helpers.ApiFlask', '...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys from scihub import SciHub sh = SciHub() # In default, the papers would be downloaded in the Desktop SAVE_PATH = os.getcwd() + '/Desktop/' for i in range(1, len(sys.argv)): # identifier can be link URL, DOI, or PMID identifier = str(sys.argv[i...
[ "os.getcwd", "scihub.SciHub" ]
[((100, 108), 'scihub.SciHub', 'SciHub', ([], {}), '()\n', (106, 108), False, 'from scihub import SciHub\n'), ((181, 192), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (190, 192), False, 'import os\n')]
# Factory to create Raster Foundry scenes from Planet Labs scenes import logging import os import time from xml.dom import minidom import boto3 import requests from retrying import retry from rf.utils import cog from rf.utils.io import Visibility, get_tempdir from .create_scenes import create_planet_scene logger = l...
[ "logging.getLogger", "rf.utils.io.get_tempdir", "boto3.client", "os.getenv", "rf.utils.cog.convert_to_cog", "os.path.join", "requests.get", "time.sleep", "xml.dom.minidom.parseString", "rf.utils.cog.add_overviews", "retrying.retry" ]
[((319, 346), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (336, 346), False, 'import logging\n'), ((4306, 4355), 'retrying.retry', 'retry', ([], {'wait_fixed': '(5000)', 'stop_max_attempt_number': '(5)'}), '(wait_fixed=5000, stop_max_attempt_number=5)\n', (4311, 4355), False, 'from ret...
from thehive4py.api import TheHiveApi from thehive4py.models import CaseTaskLog from st2common.runners.base_action import Action __all__ = [ 'CreateTaskLogAction' ] class CreateTaskLogAction(Action): def run(self, task_id, log): api = TheHiveApi(self.config['thehive_url'], self.config['thehive_api_ke...
[ "thehive4py.models.CaseTaskLog", "thehive4py.api.TheHiveApi" ]
[((254, 324), 'thehive4py.api.TheHiveApi', 'TheHiveApi', (["self.config['thehive_url']", "self.config['thehive_api_key']"], {}), "(self.config['thehive_url'], self.config['thehive_api_key'])\n", (264, 324), False, 'from thehive4py.api import TheHiveApi\n'), ((349, 373), 'thehive4py.models.CaseTaskLog', 'CaseTaskLog', (...
# Generated by Django 2.1.2 on 2019-01-21 20:07 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mrp_system', '0054_auto_20190121_1943'), ] operations = [ migrations.AlterField( model_name='manufacturingorder', na...
[ "django.db.models.DateTimeField" ]
[((357, 396), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now_add': '(True)'}), '(auto_now_add=True)\n', (377, 396), False, 'from django.db import migrations, models\n')]
#!/usr/bin/env python # ruby-mustache provides `mustache` # yay -S ruby-mustache from functools import partial from pathlib import Path from subprocess import run this_dir = Path(__file__).resolve().parent template_file = this_dir / "config.mo" preamble = this_dir / "preamble.txt" current_dir = Path.cwd() yaml_fi...
[ "pathlib.Path.cwd", "functools.partial", "pathlib.Path" ]
[((301, 311), 'pathlib.Path.cwd', 'Path.cwd', ([], {}), '()\n', (309, 311), False, 'from pathlib import Path\n'), ((452, 476), 'functools.partial', 'partial', (['run'], {'shell': '(True)'}), '(run, shell=True)\n', (459, 476), False, 'from functools import partial\n'), ((177, 191), 'pathlib.Path', 'Path', (['__file__'],...
import random import Rule import RuleTestPerson from copy import deepcopy class GARule: """ represents the genetic algorithm for the rule approach. """ test_persons = [] tasks = [] def __init__(self, persons, tasks, rules, min_rules=10): self.test_persons = persons self.tasks ...
[ "random.randrange", "RuleTestPerson", "copy.deepcopy", "Rule", "random.random" ]
[((5166, 5191), 'Rule', 'Rule', (['mutated_code', '(False)'], {}), '(mutated_code, False)\n', (5170, 5191), False, 'import Rule\n'), ((3835, 3933), 'RuleTestPerson', 'RuleTestPerson', (['new_rules', 'self.test_persons[0].person_id', 'self.test_persons[0].given_answers'], {}), '(new_rules, self.test_persons[0].person_id...
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "autorest.settings") application = get_wsgi_application()
[ "os.environ.setdefault", "django.core.wsgi.get_wsgi_application" ]
[((62, 130), 'os.environ.setdefault', 'os.environ.setdefault', (['"""DJANGO_SETTINGS_MODULE"""', '"""autorest.settings"""'], {}), "('DJANGO_SETTINGS_MODULE', 'autorest.settings')\n", (83, 130), False, 'import os\n'), ((145, 167), 'django.core.wsgi.get_wsgi_application', 'get_wsgi_application', ([], {}), '()\n', (165, 1...
from io import BytesIO from django.shortcuts import render, get_object_or_404 from django.contrib.auth.decorators import login_required from django.template.loader import get_template from django.http import HttpResponse from xhtml2pdf import pisa from .models import Order def render_to_pdf(template_src, context_di...
[ "django.http.HttpResponse", "django.shortcuts.get_object_or_404", "io.BytesIO", "django.template.loader.get_template" ]
[((343, 369), 'django.template.loader.get_template', 'get_template', (['template_src'], {}), '(template_src)\n', (355, 369), False, 'from django.template.loader import get_template\n'), ((424, 433), 'io.BytesIO', 'BytesIO', ([], {}), '()\n', (431, 433), False, 'from io import BytesIO\n'), ((1042, 1067), 'django.http.Ht...
import random import numpy as np class DiscreteDistribution: """ This class represents a (conditional) discrete probability distribution. More specifically, it stores the probabilities `P(output = j | input = i)` of generating an output j given an input i. Generally, such a distribution is repres...
[ "numpy.tile", "numpy.abs", "numpy.ones", "numpy.fill_diagonal", "numpy.array", "numpy.zeros", "numpy.cumsum", "numpy.dtype", "random.SystemRandom" ]
[((4440, 4474), 'numpy.zeros', 'np.zeros', (['full.probabilities.shape'], {}), '(full.probabilities.shape)\n', (4448, 4474), True, 'import numpy as np\n'), ((4483, 4508), 'numpy.fill_diagonal', 'np.fill_diagonal', (['diag', 'p'], {}), '(diag, p)\n', (4499, 4508), True, 'import numpy as np\n'), ((5406, 5427), 'random.Sy...
from django.shortcuts import render, get_object_or_404 from .forms import EventsForm from .helper import Helper from .models import Club, DisciplineDistance, DisciplineTime, Event, ResultDistance, ResultTime import logging logger = logging.getLogger('console_file') def annual_records_m_view(request, year): logge...
[ "logging.getLogger", "django.shortcuts.render", "django.shortcuts.get_object_or_404" ]
[((233, 266), 'logging.getLogger', 'logging.getLogger', (['"""console_file"""'], {}), "('console_file')\n", (250, 266), False, 'import logging\n'), ((2405, 2469), 'django.shortcuts.render', 'render', (['request', '"""resultsapp/annual_record_list_m.html"""', 'context'], {}), "(request, 'resultsapp/annual_record_list_m....
import torch import torch.nn as nn import torch.optim as optim import os import numpy as np import matplotlib.pyplot as plt from tqdm import tqdm from data_loader import * def get_iou(predict, label): predict_f = torch.flatten(predict) label_f = torch.flatten(label) intersection = torch.sum(predict_f*lab...
[ "torch.nn.ReLU", "matplotlib.pyplot.grid", "torch.nn.CrossEntropyLoss", "matplotlib.pyplot.ylabel", "torch.max", "torch.cuda.is_available", "torch.sum", "torch.squeeze", "torch.nn.BatchNorm2d", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.savefig", "matplotlib.pyplot.title", "torch.cat", ...
[((220, 242), 'torch.flatten', 'torch.flatten', (['predict'], {}), '(predict)\n', (233, 242), False, 'import torch\n'), ((257, 277), 'torch.flatten', 'torch.flatten', (['label'], {}), '(label)\n', (270, 277), False, 'import torch\n'), ((297, 327), 'torch.sum', 'torch.sum', (['(predict_f * label_f)'], {}), '(predict_f *...
__copyright__ = """ Copyright (C) 2020 University of Illinois Board of Trustees Copyright (C) 2021 <NAME> """ __license__ = """ 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,...
[ "pyrometheus.gen_thermochem_code", "pytools.convergence.EOCRecorder", "numpy.array", "numpy.linalg.norm", "numpy.where", "pytest.main", "numpy.linspace", "cantera.Solution", "numpy.abs", "numpy.ones", "cantera.ReactorNet", "jax.jacfwd", "jax.config.update", "jax.numpy.array", "pytest.mar...
[((3714, 3771), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""mechname"""', "['uiuc', 'sanDiego']"], {}), "('mechname', ['uiuc', 'sanDiego'])\n", (3737, 3771), False, 'import pytest\n'), ((4057, 4114), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""mechname"""', "['uiuc', 'sanDiego']"], {}), ...
from django.contrib.auth.models import User from onadata.libs.permissions import ROLES from onadata.libs.permissions import EditorRole, EditorMinorRole,\ DataEntryRole, DataEntryMinorRole, DataEntryOnlyRole class ShareXForm(object): def __init__(self, xform, username, role): self.xform = xform ...
[ "django.contrib.auth.models.User.objects.get", "onadata.libs.permissions.ROLES.get" ]
[((421, 461), 'django.contrib.auth.models.User.objects.get', 'User.objects.get', ([], {'username': 'self.username'}), '(username=self.username)\n', (437, 461), False, 'from django.contrib.auth.models import User\n'), ((508, 528), 'onadata.libs.permissions.ROLES.get', 'ROLES.get', (['self.role'], {}), '(self.role)\n', (...
from packaging import version import pip import pkg_resources import requests from gitcd.app import App from gitcd.exceptions import GitcdPyPiApiException class Upgrade(App): localVersion = 0 pypiVersion = 0 packageUrl = 'https://pypi.org/pypi/gitcd/json' def getLocalVersion(self) -> str: ...
[ "gitcd.exceptions.GitcdPyPiApiException", "requests.get", "packaging.version.parse", "pkg_resources.get_distribution", "pip.main" ]
[((479, 508), 'requests.get', 'requests.get', (['self.packageUrl'], {}), '(self.packageUrl)\n', (491, 508), False, 'import requests\n'), ((1073, 1126), 'pip.main', 'pip.main', (["['install', '--user', '--upgrade', 'gitcd']"], {}), "(['install', '--user', '--upgrade', 'gitcd'])\n", (1081, 1126), False, 'import pip\n'), ...
''' Remove papers without doi uploaded in the past 3 days ''' from django.core.management.base import BaseCommand from datetime import timedelta from django.utils import timezone from paper.models import Paper from paper.tasks import censored_paper_cleanup from researchhub_document.utils import reset_unified_document_...
[ "paper.tasks.censored_paper_cleanup", "researchhub_document.utils.reset_unified_document_cache", "django.utils.timezone.now", "paper.models.Paper.objects.filter", "datetime.timedelta" ]
[((508, 603), 'paper.models.Paper.objects.filter', 'Paper.objects.filter', ([], {'doi__isnull': '(True)', 'uploaded_date__gte': 'three_days_ago', 'is_removed': '(False)'}), '(doi__isnull=True, uploaded_date__gte=three_days_ago,\n is_removed=False)\n', (528, 603), False, 'from paper.models import Paper\n'), ((1027, 1...
import numpy as np from sklearn.svm import SVC import matplotlib.pyplot as plt from sklearnclassifiers.ClassifierBase import ClassifierBase import logging logger = logging.getLogger(__name__) class SupportVectorMachine(ClassifierBase): def __init__(self, datasetloader,save_image=False): super(self.__clas...
[ "logging.getLogger", "matplotlib.pyplot.savefig", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.title", "matplotlib.pyplot.legend", "sklearn.svm.SVC" ]
[((165, 192), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (182, 192), False, 'import logging\n'), ((466, 509), 'sklearn.svm.SVC', 'SVC', ([], {'kernel': '"""linear"""', 'C': '(1.0)', 'random_state': '(0)'}), "(kernel='linear', C=1.0, random_state=0)\n", (469, 509), False, 'from sklearn...
import scipy.io as sio import numpy as np from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Conv2D from tensorflow.keras.layers import MaxPooling2D from tensorflow.keras.layers import Flatten from tensorflow.keras.layers import Dense from tensorflow.keras.layers import Dropout class SV...
[ "tensorflow.keras.layers.Conv2D", "tensorflow.keras.layers.MaxPooling2D", "scipy.io.loadmat", "numpy.rollaxis", "tensorflow.keras.layers.Dropout", "tensorflow.keras.layers.Dense", "tensorflow.keras.models.load_model", "tensorflow.keras.layers.Flatten" ]
[((555, 578), 'scipy.io.loadmat', 'sio.loadmat', (['path_train'], {}), '(path_train)\n', (566, 578), True, 'import scipy.io as sio\n'), ((602, 624), 'scipy.io.loadmat', 'sio.loadmat', (['path_test'], {}), '(path_test)\n', (613, 624), True, 'import scipy.io as sio\n'), ((1888, 1911), 'numpy.rollaxis', 'np.rollaxis', (['...
from .base import BaseDevice import random default_protocol_config = { "protocol_config": [{ "nbns": { "frequency": random.randint(30, 60) }, "nbdgm": { "frequency": random.randint(30, 60), "type": "browser", "cmd": "announcement", ...
[ "random.randint" ]
[((142, 164), 'random.randint', 'random.randint', (['(30)', '(60)'], {}), '(30, 60)\n', (156, 164), False, 'import random\n'), ((220, 242), 'random.randint', 'random.randint', (['(30)', '(60)'], {}), '(30, 60)\n', (234, 242), False, 'import random\n'), ((572, 594), 'random.randint', 'random.randint', (['(30)', '(60)'],...
import re try: from importlib.resources import read_text except ImportError: from importlib_resources import read_text class Decompose: def __init__(self): self.entries = dict() self.super_entries = dict() for row in read_text('cjkradlib.data', 'cjk-decomp.txt').strip().split('\n...
[ "importlib_resources.read_text", "re.match" ]
[((359, 395), 're.match', 're.match', (['"""(.+):(.+)\\\\((.*)\\\\)"""', 'row'], {}), "('(.+):(.+)\\\\((.*)\\\\)', row)\n", (367, 395), False, 'import re\n'), ((257, 302), 'importlib_resources.read_text', 'read_text', (['"""cjkradlib.data"""', '"""cjk-decomp.txt"""'], {}), "('cjkradlib.data', 'cjk-decomp.txt')\n", (266...
#!/bin/python3 from tkinter import * from tkinter import ttk,filedialog import sys from .flowkey_dl import flowkey_dl, arange_image, save_png, save_pdf,strip_url import os from PIL import ImageTk dim={'A4 Landscape':(2338,1652),'A4 Portrait':(1652,2338)} class MainWindow(object): def __init__(self,master): ...
[ "tkinter.filedialog.asksaveasfilename", "PIL.ImageTk.PhotoImage" ]
[((6055, 6130), 'tkinter.filedialog.asksaveasfilename', 'filedialog.asksaveasfilename', ([], {'defaultextension': '""".pdf"""', 'initialfile': 'filename'}), "(defaultextension='.pdf', initialfile=filename)\n", (6083, 6130), False, 'from tkinter import ttk, filedialog\n'), ((4795, 4816), 'PIL.ImageTk.PhotoImage', 'Image...
# -*- coding: utf-8 -*- """ wow_addon_manager.sources.curseforge ~~~~~~~~~~~~~~~~~~~~~ Xpath rules and request to curseforge. :author: qwezarty :date: 05:08 pm Jan 22 2019 :email: <EMAIL> """ from lxml import etree from wow_addon_manager import helpers import requests from os import path fro...
[ "wow_addon_manager.helpers.xpath_text", "os.path.join", "requests.get", "wow_addon_manager.helpers.cache_response", "os.path.basename", "lxml.etree.HTML", "urllib.parse.urljoin", "lxml.etree.tostring" ]
[((624, 644), 'lxml.etree.HTML', 'etree.HTML', (['res.text'], {}), '(res.text)\n', (634, 644), False, 'from lxml import etree\n'), ((704, 771), 'wow_addon_manager.helpers.xpath_text', 'helpers.xpath_text', (['html', '"""//meta[@property="og:title"]"""', '"""content"""'], {}), '(html, \'//meta[@property="og:title"]\', \...
import numpy as np import sklearn.metrics as metrics from scipy.sparse import csr_matrix def evaluation_score(label_test, predict_label): f1_micro=metrics.f1_score(label_test, predict_label, average='micro') hamm=metrics.hamming_loss(label_test,predict_label) accuracy = metrics.accuracy_score(label_test, ...
[ "numpy.mean", "sklearn.metrics.f1_score", "numpy.where", "sklearn.metrics.precision_score", "sklearn.metrics.recall_score", "numpy.array", "sklearn.metrics.hamming_loss", "sklearn.metrics.accuracy_score" ]
[((153, 213), 'sklearn.metrics.f1_score', 'metrics.f1_score', (['label_test', 'predict_label'], {'average': '"""micro"""'}), "(label_test, predict_label, average='micro')\n", (169, 213), True, 'import sklearn.metrics as metrics\n'), ((223, 270), 'sklearn.metrics.hamming_loss', 'metrics.hamming_loss', (['label_test', 'p...
from enum import Enum from supproperty import decimal, supproperty, boolean, integer, float_vector from bac.simulate.coding import Encodable from .group import Group class CouplingType(Enum): vdw_and_coulomb = 'vdw-q' vdw = 'vdw' coulomb = 'q' none = 'none' @classmethod def _missing_(cls, v...
[ "supproperty.boolean", "supproperty.supproperty", "supproperty.decimal", "supproperty.float_vector", "supproperty.integer" ]
[((2662, 2681), 'supproperty.decimal', 'decimal', ([], {'default': '(-1)'}), '(default=-1)\n', (2669, 2681), False, 'from supproperty import decimal, supproperty, boolean, integer, float_vector\n'), ((2830, 2848), 'supproperty.decimal', 'decimal', ([], {'default': '(0)'}), '(default=0)\n', (2837, 2848), False, 'from su...
from hwt.synthesizer.dummyPlatform import DummyPlatform from hwtGraph.elk.fromHwt.extractSplits import extractSplits from hwtGraph.elk.fromHwt.flattenTrees import flattenTrees from hwtGraph.elk.fromHwt.mergeSplitsOnInterfaces import mergeSplitsOnInterfaces from hwtGraph.elk.fromHwt.netlistPreprocessors import unhideRes...
[ "hwtGraph.elk.fromHwt.flattenTrees.flattenTrees", "hwt.synthesizer.dummyPlatform.DummyPlatform" ]
[((684, 699), 'hwt.synthesizer.dummyPlatform.DummyPlatform', 'DummyPlatform', ([], {}), '()\n', (697, 699), False, 'from hwt.synthesizer.dummyPlatform import DummyPlatform\n'), ((948, 1039), 'hwtGraph.elk.fromHwt.flattenTrees.flattenTrees', 'flattenTrees', (['root', "(lambda node: node.cls == 'Operator' and node.name =...
# RA, 2020-06-27 from tcga.utils import download url = "https://www.gsea-msigdb.org/gsea/msigdb/download_file.jsp?filePath=/msigdb/release/7.1/msigdb_v7.1_files_to_download_locally.zip" download(url).to(rel_path="original").now
[ "tcga.utils.download" ]
[((188, 201), 'tcga.utils.download', 'download', (['url'], {}), '(url)\n', (196, 201), False, 'from tcga.utils import download\n')]
from elasticsearch import Elasticsearch, ElasticsearchException from oslo.config import cfg from meniscus.data.handlers import base from meniscus import config from meniscus import env _LOG = env.get_logger(__name__) #Register options for Elasticsearch elasticsearch_group = cfg.OptGroup( name="elasticsearch", ...
[ "oslo.config.cfg.StrOpt", "oslo.config.cfg.ListOpt", "meniscus.config.get_config", "elasticsearch.Elasticsearch", "meniscus.env.get_logger", "oslo.config.cfg.IntOpt", "oslo.config.cfg.OptGroup", "meniscus.config.init_config" ]
[((194, 218), 'meniscus.env.get_logger', 'env.get_logger', (['__name__'], {}), '(__name__)\n', (208, 218), False, 'from meniscus import env\n'), ((279, 358), 'oslo.config.cfg.OptGroup', 'cfg.OptGroup', ([], {'name': '"""elasticsearch"""', 'title': '"""Elasticsearch Configuration Options"""'}), "(name='elasticsearch', t...
from eyes import Eyes def test_constructor(): es = Eyes() assert es.left_eye.direction == es.right_eye.direction == (0, 0)
[ "eyes.Eyes" ]
[((57, 63), 'eyes.Eyes', 'Eyes', ([], {}), '()\n', (61, 63), False, 'from eyes import Eyes\n')]
"""Constants for the 4Heat integration.""" from datetime import timedelta from homeassistant.const import ( TEMP_CELSIUS, PRESSURE_PA, PRESSURE_MBAR, ) DOMAIN = "4heat" ATTR_STOVE_ID = "stove_id" ATTR_READING_ID = "reading_id" ATTR_MARKER = "marker" ATTR_NUM_VAL = "num_val" DATA_QUERY = b'["SEL","0"]' E...
[ "datetime.timedelta" ]
[((962, 983), 'datetime.timedelta', 'timedelta', ([], {'seconds': '(20)'}), '(seconds=20)\n', (971, 983), False, 'from datetime import timedelta\n')]
"""The controller for https://[PATH]/answer/""" from flask import Blueprint from flask import request from flask import jsonify from util.util import InvalidUsage from util.util import handle_invalid_usage from util.util import decode_user_token from config.config import config from models.model_operations.answer_oper...
[ "util.util.InvalidUsage", "util.util.decode_user_token", "flask.request.get_json", "models.model_operations.answer_operations.batch_process_answers", "flask.Blueprint", "util.util.handle_invalid_usage", "flask.jsonify" ]
[((362, 402), 'flask.Blueprint', 'Blueprint', (['"""answer_controller"""', '__name__'], {}), "('answer_controller', __name__)\n", (371, 402), False, 'from flask import Blueprint\n'), ((3609, 3627), 'flask.request.get_json', 'request.get_json', ([], {}), '()\n', (3625, 3627), False, 'from flask import request\n'), ((384...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'acq4/analysis/modules/Photostim/MapAnalysisTemplate.ui' # # Created by: PyQt5 UI code generator 5.8.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object): def setupU...
[ "acq4.pyqtgraph.PlotWidget", "PyQt5.QtWidgets.QRadioButton", "acq4.pyqtgraph.SpinBox", "PyQt5.QtWidgets.QGridLayout", "PyQt5.QtWidgets.QLabel", "PyQt5.QtWidgets.QGroupBox", "PyQt5.QtWidgets.QCheckBox" ]
[((426, 453), 'PyQt5.QtWidgets.QGridLayout', 'QtWidgets.QGridLayout', (['Form'], {}), '(Form)\n', (447, 453), False, 'from PyQt5 import QtCore, QtGui, QtWidgets\n'), ((537, 550), 'acq4.pyqtgraph.SpinBox', 'SpinBox', (['Form'], {}), '(Form)\n', (544, 550), False, 'from acq4.pyqtgraph import PlotWidget, SpinBox\n'), ((70...
#! /usr/bin/env python3 # encoding: utf-8 # # (C) 2017 <NAME> <<EMAIL>> # # SPDX-License-Identifier: BSD-3-Clause """\ Provide a kernel for IPython/Jupyter that executes micropython on an attached microcontroller. The board must be preprogrammed with a recent micropython firmware. Features: - transmits stdout and ...
[ "ipykernel.kernelapp.IPKernelApp.launch_instance", "traceback.print_exception", "shlex.split", "argparse.ArgumentParser" ]
[((9787, 9846), 'ipykernel.kernelapp.IPKernelApp.launch_instance', 'IPKernelApp.launch_instance', ([], {'kernel_class': 'MicroPythonKernel'}), '(kernel_class=MicroPythonKernel)\n', (9814, 9846), False, 'from ipykernel.kernelapp import IPKernelApp\n'), ((1605, 1629), 'shlex.split', 'shlex.split', (['commandline'], {}), ...
#!/usr/bin/env python # Adapted from https://github.com/pypa/sampleproject/blob/master/setup.py # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long ...
[ "os.path.dirname", "setuptools.find_packages", "os.path.join" ]
[((280, 302), 'os.path.dirname', 'path.dirname', (['__file__'], {}), '(__file__)\n', (292, 302), False, 'from os import path\n'), ((363, 391), 'os.path.join', 'path.join', (['here', '"""README.md"""'], {}), "(here, 'README.md')\n", (372, 391), False, 'from os import path\n'), ((3161, 3212), 'setuptools.find_packages', ...