code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
from typing import Optional import peewee import pendulum from workplanner.utils import normalize_datetime, strftime_utc class DateTimeUTCField(peewee.DateTimeField): def python_value(self, value: str) -> Optional[pendulum.DateTime]: if value is not None: return pendulum.parse(value, tz=pend...
[ "pendulum.timezone", "workplanner.utils.normalize_datetime", "workplanner.utils.strftime_utc" ]
[((491, 516), 'workplanner.utils.normalize_datetime', 'normalize_datetime', (['value'], {}), '(value)\n', (509, 516), False, 'from workplanner.utils import normalize_datetime, strftime_utc\n'), ((639, 658), 'workplanner.utils.strftime_utc', 'strftime_utc', (['value'], {}), '(value)\n', (651, 658), False, 'from workplan...
from collections import namedtuple from django import template from wagtail_to_ion.models import get_ion_content_type_description_model register = template.Library() @register.simple_tag def content_type_description(app_label, model_name, verbose_name): ContentTypeDescription = get_ion_content_type_descriptio...
[ "wagtail_to_ion.models.get_ion_content_type_description_model", "collections.namedtuple", "django.template.Library" ]
[((151, 169), 'django.template.Library', 'template.Library', ([], {}), '()\n', (167, 169), False, 'from django import template\n'), ((289, 329), 'wagtail_to_ion.models.get_ion_content_type_description_model', 'get_ion_content_type_description_model', ([], {}), '()\n', (327, 329), False, 'from wagtail_to_ion.models impo...
#Youtube channels # # # # # #<NAME> import re import os import sys import urllib2 import buggalo import xbmcgui import xbmcaddon import xbmcplugin BASE_URL = 'http://www.husham.com/?p=11081' PLAY_VIDEO_PATH = 'plugin://plugin.video.youtube/?action=play_video&videoid=%s' PLAYLIST_PATH = 'plugin://plugin.video.youtube/u...
[ "re.search", "urllib2.urlopen", "xbmcaddon.Addon", "buggalo.onExceptionRaised", "xbmcplugin.endOfDirectory", "xbmcplugin.addDirectoryItem" ]
[((2592, 2609), 'xbmcaddon.Addon', 'xbmcaddon.Addon', ([], {}), '()\n', (2607, 2609), False, 'import xbmcaddon\n'), ((2662, 2687), 'urllib2.urlopen', 'urllib2.urlopen', (['BASE_URL'], {}), '(BASE_URL)\n', (2677, 2687), False, 'import urllib2\n'), ((2744, 2806), 're.search', 're.search', (['"""//www.youtube.com/embed/([...
# -*- coding: utf-8 -*- """ weibo login """ import json import os import logging import requests from weibospider.WeiboAccounts import accounts logger = logging.getLogger(__name__) def getCookies(username, password): """ 单个账号登录 """ def getAllAccountsCookies(rconn): """ 将所有账号登录后把cookies存入reids """ for...
[ "logging.getLogger", "os.system" ]
[((157, 184), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (174, 184), False, 'import logging\n'), ((666, 684), 'os.system', 'os.system', (['"""pause"""'], {}), "('pause')\n", (675, 684), False, 'import os\n')]
# -*- coding: utf-8 -*- """ Created on Wed Feb 20 15:10:09 2019 @author: cooneyg """ import pandas as pd ca_tech_mix = pd.read_csv('data/canadian_imports.csv')
[ "pandas.read_csv" ]
[((121, 161), 'pandas.read_csv', 'pd.read_csv', (['"""data/canadian_imports.csv"""'], {}), "('data/canadian_imports.csv')\n", (132, 161), True, 'import pandas as pd\n')]
import json import pytest import xmljson from lxml.etree import fromstring schema_1 = "<schema-template><fields><field><name>account_name</name><type>varchar</type><is-null>false</is-null><table>unification_lookup</table></field><field><name>Heartrate</name><type>int</type><is-null>true</is-null><table>data_1</table...
[ "pytest.mark.parametrize", "json.loads", "xmljson.gdata.data", "lxml.etree.fromstring" ]
[((1346, 1412), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""xml_str"""', '[schema_1, schema_2, schema_3]'], {}), "('xml_str', [schema_1, schema_2, schema_3])\n", (1369, 1412), False, 'import pytest\n'), ((1454, 1473), 'lxml.etree.fromstring', 'fromstring', (['xml_str'], {}), '(xml_str)\n', (1464, 1473),...
import pandas as pd import numpy as np from sklearn.feature_selection import (SelectKBest, SequentialFeatureSelector, f_regression, mutual_info_regression, mutual_info_classif, f_classif) from sklearn.svm import LinearSVC, LinearSVR def pea...
[ "sklearn.feature_selection.SelectKBest", "sklearn.svm.LinearSVC", "sklearn.feature_selection.SequentialFeatureSelector", "sklearn.svm.LinearSVR" ]
[((3285, 3323), 'sklearn.feature_selection.SelectKBest', 'SelectKBest', (['fs_method'], {'k': 'num_features'}), '(fs_method, k=num_features)\n', (3296, 3323), False, 'from sklearn.feature_selection import SelectKBest, SequentialFeatureSelector, f_regression, mutual_info_regression, mutual_info_classif, f_classif\n'), (...
from unittest import mock from urllib.parse import urlencode from django.conf import settings from django.contrib.auth import get_user_model from django.test import TestCase from website.models import PracticalInfo class PracticalInfoViewTests(TestCase): def setUp(self): User = get_user_model() s...
[ "urllib.parse.urlencode", "django.contrib.auth.get_user_model", "website.models.PracticalInfo.objects.create", "unittest.mock.patch" ]
[((594, 628), 'unittest.mock.patch', 'mock.patch', (['"""website.views.logger"""'], {}), "('website.views.logger')\n", (604, 628), False, 'from unittest import mock\n'), ((294, 310), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (308, 310), False, 'from django.contrib.auth import get_user_mo...
import numpy as np class DOM: """ Object representing a discretized observation model. Comprised primarily by the DOM.edges and DOM.chi vectors, which represent the discrete mask and state-dependent emission probabilities, respectively. """ def __init__(self): self.k = None se...
[ "numpy.flip", "numpy.searchsorted", "numpy.array2string", "numpy.sum", "numpy.zeros", "numpy.linspace", "numpy.array", "numpy.vstack", "numpy.interp", "numpy.arange" ]
[((1282, 1348), 'numpy.interp', 'np.interp', (['qbin_edges', "stats['quantile_basis']", "stats['quantiles']"], {}), "(qbin_edges, stats['quantile_basis'], stats['quantiles'])\n", (1291, 1348), True, 'import numpy as np\n'), ((1544, 1574), 'numpy.zeros', 'np.zeros', (['(2, self.n_bins + 1)'], {}), '((2, self.n_bins + 1)...
import re code = open("qchecker.rb").read() code = code.replace(" ", "").replace("\n", "") A = re.findall(r'b\[".*?"\]', code)[1] def decode36base(x): n = 0 for c in x: c = ord(c) if ord("0")<=c<=ord("9"): c -= ord("0") else: c -= ord("a") c += 10 n = n*36+c return n A = [dec...
[ "re.findall" ]
[((97, 129), 're.findall', 're.findall', (['"""b\\\\[".*?"\\\\]"""', 'code'], {}), '(\'b\\\\[".*?"\\\\]\', code)\n', (107, 129), False, 'import re\n')]
"""Calculate the partial derivatives of the source coordinates Description: ------------ Calculate the partial derivatives of the source coordinates. This is done according to equations (2.47) - (2.50) in Teke [2]_. References: ----------- .. [1] <NAME>. and <NAME>. (eds.), IERS Conventions (2010), IERS Technical...
[ "numpy.hstack", "numpy.logical_not", "where.apriori.get", "numpy.logical_or", "numpy.array" ]
[((1179, 1213), 'where.apriori.get', 'apriori.get', (['"""crf"""'], {'time': 'dset.time'}), "('crf', time=dset.time)\n", (1190, 1213), False, 'from where import apriori\n'), ((1371, 1488), 'numpy.logical_or', 'np.logical_or', (['[(icrf[src].meta[group] if group in icrf[src].meta else src == group) for\n src in sourc...
# SPDX-FileCopyrightText: 2022 <NAME> for Adafruit Industries # SPDX-License-Identifier: MIT """ Used with ble_packet_buffer_test.py. Transmits "echo" to PacketBufferService and receives it back. """ import time from ble_packet_buffer_service import PacketBufferService from adafruit_ble import BLERadio from adafrui...
[ "adafruit_ble.BLERadio", "time.sleep" ]
[((390, 400), 'adafruit_ble.BLERadio', 'BLERadio', ([], {}), '()\n', (398, 400), False, 'from adafruit_ble import BLERadio\n'), ((963, 976), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (973, 976), False, 'import time\n')]
#!/usr/bin/env python # # fsl_ents.py - Extract ICA component time courses from a MELODIC directory. # # Author: <NAME> <<EMAIL>> # """This module defines the ``fsl_ents`` script, for extracting component time series from a MELODIC ``.ica`` directory. """ import os.path as op import sys import a...
[ "os.path.exists", "numpy.atleast_2d", "argparse.ArgumentParser", "numpy.hstack", "warnings.catch_warnings", "numpy.zeros", "fsl.data.fixlabels.loadLabelFile", "numpy.savetxt", "sys.exit", "os.path.abspath", "numpy.loadtxt", "warnings.filterwarnings", "fsl.data.melodicanalysis.getComponentTim...
[((415, 440), 'warnings.catch_warnings', 'warnings.catch_warnings', ([], {}), '()\n', (438, 440), False, 'import warnings\n'), ((446, 503), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {'category': 'FutureWarning'}), "('ignore', category=FutureWarning)\n", (469, 503), False, 'import warnings...
# (CWD: executables/amd64 folder) # TODO: finish this import os packages = [] total_executables_packages = len(os.listdir(".")) for package_name in os.listdir("."): packages.append(os.path.join(".", package_name)) without_diffs = [] expected_diffs = 0 for package_path in packages: match_found = os.listdir(packa...
[ "os.listdir", "os.path.join" ]
[((148, 163), 'os.listdir', 'os.listdir', (['"""."""'], {}), "('.')\n", (158, 163), False, 'import os\n'), ((111, 126), 'os.listdir', 'os.listdir', (['"""."""'], {}), "('.')\n", (121, 126), False, 'import os\n'), ((304, 328), 'os.listdir', 'os.listdir', (['package_path'], {}), '(package_path)\n', (314, 328), False, 'im...
from __future__ import print_function from itertools import product import torch import torch.nn as nn import torch_mlu from torch.nn import Parameter import torch.nn.functional as F import numpy as np import sys import os import copy import random import time import unittest cur_dir = os.path.dirname(os.path.abspath(...
[ "logging.basicConfig", "torch.jit.trace", "unittest.main", "common_utils.testinfo", "os.path.abspath", "torch.set_grad_enabled", "sys.path.append", "torch.randn", "torch.rand" ]
[((331, 367), 'sys.path.append', 'sys.path.append', (["(cur_dir + '/../../')"], {}), "(cur_dir + '/../../')\n", (346, 367), False, 'import sys\n'), ((425, 465), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.DEBUG'}), '(level=logging.DEBUG)\n', (444, 465), False, 'import logging\n'), ((466, 495),...
""" __version__ = "$Revision: 1.2 $" __date__ = "$Date: 2005/10/12 22:27:39 $" """ """ Simple sizer for PythonCard Uses a simple method for sizing: - each component type is defined to be fixed or stretchable - uses GetBestSize() to get a min size for each component - each component is placed by its cent...
[ "wx.Point", "wx.PySizer.__init__", "wx.PySizer.Add", "wx.Size" ]
[((724, 749), 'wx.PySizer.__init__', 'wx.PySizer.__init__', (['self'], {}), '(self)\n', (743, 749), False, 'import wx\n'), ((1098, 1186), 'wx.PySizer.Add', 'wx.PySizer.Add', (['self', 'item', 'option', 'flag', 'border'], {'userData': '(pos, size, growX, growY)'}), '(self, item, option, flag, border, userData=(pos, size...
import datetime from django.conf import settings from django.contrib.auth import get_user_model from django.core.cache import cache from django.db import transaction, IntegrityError from django.db.models import Q from django.utils.translation import gettext as _ from django.utils.translation import ngettext from rest_...
[ "modules.doc.models.PinDoc.objects.filter", "modules.cel.tasks.export_all_docs.delay", "modules.repo.models.Repo.objects.raw", "modules.doc.serializers.DocListSerializer", "modules.doc.serializers.DocPinSerializer", "rest_framework.decorators.action", "utils.paginations.RepoListNumPagination", "django...
[((1307, 1323), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (1321, 1323), False, 'from django.contrib.auth import get_user_model\n'), ((1389, 1426), 'modules.repo.models.Repo.objects.filter', 'Repo.objects.filter', ([], {'is_deleted': '(False)'}), '(is_deleted=False)\n', (1408, 1426), Fals...
import os,sys,glob,shutil lists = glob.glob('./*/*.log') lists += glob.glob('./*/*.tar') lists += glob.glob('./*/*.pk') lists += glob.glob('./*/*weights.json') for f in lists: os.remove(f)
[ "glob.glob", "os.remove" ]
[((35, 57), 'glob.glob', 'glob.glob', (['"""./*/*.log"""'], {}), "('./*/*.log')\n", (44, 57), False, 'import os, sys, glob, shutil\n'), ((67, 89), 'glob.glob', 'glob.glob', (['"""./*/*.tar"""'], {}), "('./*/*.tar')\n", (76, 89), False, 'import os, sys, glob, shutil\n'), ((99, 120), 'glob.glob', 'glob.glob', (['"""./*/*...
from model.contact import Contact import random import allure def test_delete_some_contact(app, db, check_ui): if len(db.get_contacts_list()) == 0: app.contact.add_new_contact(Contact(firstname="Testik", middlename="Midtest", lastname="Lasttest", nickname="Nickname test", title="Mrs", company="Test Company...
[ "model.contact.Contact", "allure.step", "random.choice" ]
[((744, 780), 'allure.step', 'allure.step', (['"""Given a contacts list"""'], {}), "('Given a contacts list')\n", (755, 780), False, 'import allure\n'), ((837, 886), 'allure.step', 'allure.step', (['"""Given a contact from contacts list"""'], {}), "('Given a contact from contacts list')\n", (848, 886), False, 'import a...
import os from PIL import Image file_deliminator = "//" valid_image_file_formats = {'png', 'jpg'} class SWData: data_img = {} data_class = {} base_path = "" data_classes = set() data_images_equal_size = False def __int__(self): pass def load_img_datafiles(self, folder_location...
[ "os.listdir", "PIL.Image.open" ]
[((487, 514), 'os.listdir', 'os.listdir', (['folder_location'], {}), '(folder_location)\n', (497, 514), False, 'import os\n'), ((584, 642), 'os.listdir', 'os.listdir', (['(self.base_path + file_deliminator + data_class)'], {}), '(self.base_path + file_deliminator + data_class)\n', (594, 642), False, 'import os\n'), ((1...
# -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2020-01-20 05:23 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [("jobs", "0013_add_job_id_field_in_submission_model")] operations = [ migrations.RenameField( ...
[ "django.db.migrations.RenameField" ]
[((293, 385), 'django.db.migrations.RenameField', 'migrations.RenameField', ([], {'model_name': '"""submission"""', 'old_name': '"""job_id"""', 'new_name': '"""job_name"""'}), "(model_name='submission', old_name='job_id', new_name\n ='job_name')\n", (315, 385), False, 'from django.db import migrations\n')]
import collections import io import numpy as np import tensorflow as tf hidden_dim = 1000 input_size = 28 * 28 output_size = 10 train_data_file = "/home/harper/dataset/mnist/train-images.idx3-ubyte" train_label_file = "/home/harper/dataset/mnist/train-labels.idx1-ubyte" test_data_file = "/home/harper/dataset/mnist/t...
[ "tensorflow.equal", "io.open", "tensorflow.nn.sparse_softmax_cross_entropy_with_logits", "tensorflow.reduce_mean", "tensorflow.cast", "tensorflow.placeholder", "tensorflow.Session", "tensorflow.matmul", "numpy.frombuffer", "tensorflow.summary.scalar", "tensorflow.train.AdamOptimizer", "numpy.d...
[((425, 478), 'collections.namedtuple', 'collections.namedtuple', (['"""Datasets"""', "['train', 'test']"], {}), "('Datasets', ['train', 'test'])\n", (447, 478), False, 'import collections\n'), ((2192, 2248), 'tensorflow.placeholder', 'tf.placeholder', (['tf.float32', '[None, input_size]'], {'name': '"""x"""'}), "(tf.f...
""" Metrics extensions for routes. """ try: from microcosm_metrics.classifier import Classifier except ImportError: raise Exception("Route metrics require 'microcosm-metrics'") from microcosm_flask.audit import parse_response from microcosm_flask.errors import extract_status_code class StatusCodeClassifier...
[ "microcosm_flask.errors.extract_status_code", "microcosm_flask.audit.parse_response" ]
[((466, 488), 'microcosm_flask.audit.parse_response', 'parse_response', (['result'], {}), '(result)\n', (480, 488), False, 'from microcosm_flask.audit import parse_response\n'), ((578, 604), 'microcosm_flask.errors.extract_status_code', 'extract_status_code', (['error'], {}), '(error)\n', (597, 604), False, 'from micro...
import torch import torch.nn as nn __all__ = [ 'ConcatEmbeddings', 'PassThrough', 'MeanOfEmbeddings', ] class ConcatEmbeddings(nn.Module): def __init__(self, fields): super().__init__() self.output_dim = sum([field.output_dim for field in fields.values()]) self.embedders = nn....
[ "torch.nn.Embedding", "torch.cat" ]
[((508, 529), 'torch.cat', 'torch.cat', (['res'], {'dim': '(1)'}), '(res, dim=1)\n', (517, 529), False, 'import torch\n'), ((733, 781), 'torch.nn.Embedding', 'nn.Embedding', (['vocab_size', 'emb_dim'], {'padding_idx': '(0)'}), '(vocab_size, emb_dim, padding_idx=0)\n', (745, 781), True, 'import torch.nn as nn\n')]
import json import tempfile from collections import OrderedDict import os import numpy as np from pycocotools.coco import COCO from pycocotools.cocoeval import COCOeval from utils import BoxList #from utils.pycocotools_rotation import Rotation_COCOeval def evaluate(dataset, predictions, result_file, score_...
[ "collections.OrderedDict", "numpy.round", "utils.BoxList", "pycocotools.coco.COCO", "numpy.linspace", "numpy.maximum", "json.dump" ]
[((1758, 1799), 'numpy.linspace', 'np.linspace', (['(0)', '(1)'], {'num': 'precision.shape[0]'}), '(0, 1, num=precision.shape[0])\n', (1769, 1799), True, 'import numpy as np\n'), ((1082, 1103), 'json.dump', 'json.dump', (['results', 'f'], {}), '(results, f)\n', (1091, 1103), False, 'import json\n'), ((1171, 1177), 'pyc...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Example of creating hierarchical clusters from Scanette traces. Some helpful documentation about SciPy hierarchical clustering:: * SciPy docs: https://docs.scipy.org/doc/scipy/reference/cluster.hierarchy.html * https://joernhees.de/blog/2015/08/26/scipy-hierar...
[ "sys.setrecursionlimit", "scipy.cluster.hierarchy.dendrogram", "pathlib.Path", "scipy.cluster.hierarchy.linkage", "matplotlib.pyplot.title", "agilkia.TraceSet.load_from_json", "scipy.cluster.hierarchy.fcluster", "matplotlib.pyplot.show" ]
[((1102, 1139), 'agilkia.TraceSet.load_from_json', 'agilkia.TraceSet.load_from_json', (['path'], {}), '(path)\n', (1133, 1139), False, 'import agilkia\n'), ((1550, 1595), 'scipy.cluster.hierarchy.linkage', 'hierarchy.linkage', (['data_scaled'], {'method': '"""ward"""'}), "(data_scaled, method='ward')\n", (1567, 1595), ...
import pytest import yaml from django.conf.urls import url from rest_framework.test import APIClient from drf_spectacular.validation import validate_schema from drf_spectacular.views import SpectacularAPIView urlpatterns = [url(r'^api/schema$', SpectacularAPIView.as_view(), name='schema')] @pytest.mark.urls(__name_...
[ "drf_spectacular.validation.validate_schema", "drf_spectacular.views.SpectacularAPIView.as_view", "yaml.load", "rest_framework.test.APIClient", "pytest.mark.urls" ]
[((296, 322), 'pytest.mark.urls', 'pytest.mark.urls', (['__name__'], {}), '(__name__)\n', (312, 322), False, 'import pytest\n'), ((594, 645), 'yaml.load', 'yaml.load', (['response.content'], {'Loader': 'yaml.SafeLoader'}), '(response.content, Loader=yaml.SafeLoader)\n', (603, 645), False, 'import yaml\n'), ((650, 673),...
# -*- coding: utf-8 -*- """Electrical billing for small consumers in Spain using PVPC. Bill dataclasses.""" from datetime import datetime from typing import Iterator, List import attr import pandas as pd from pvpcbill.base import Base from pvpcbill.official import ( MARGEN_COMERC_EUR_KW_YEAR_MCF, round_money,...
[ "datetime.datetime", "pvpcbill.official.split_in_tariff_periods", "attr.s", "pvpcbill.official.round_money", "pvpcbill.official.round_sum_money", "attr.ib" ]
[((717, 742), 'attr.s', 'attr.s', ([], {'auto_attribs': '(True)'}), '(auto_attribs=True)\n', (723, 742), False, 'import attr\n'), ((1323, 1348), 'attr.s', 'attr.s', ([], {'auto_attribs': '(True)'}), '(auto_attribs=True)\n', (1329, 1348), False, 'import attr\n'), ((1647, 1672), 'attr.s', 'attr.s', ([], {'auto_attribs': ...
from django.contrib import admin from . import models @admin.register(models.Footsize) class FootsizeAdmin(admin.ModelAdmin): """ アドミンに足サイズテーブルを定義する """ pass @admin.register(models.FootImage) class FootImageAdmin(admin.ModelAdmin): """ アドミンに足イメージテーブルを定義する """ pass @admin.register(models.Proces...
[ "django.contrib.admin.register" ]
[((57, 88), 'django.contrib.admin.register', 'admin.register', (['models.Footsize'], {}), '(models.Footsize)\n', (71, 88), False, 'from django.contrib import admin\n'), ((173, 205), 'django.contrib.admin.register', 'admin.register', (['models.FootImage'], {}), '(models.FootImage)\n', (187, 205), False, 'from django.con...
""" Continuously scroll randomly generated After Dark style toasters. Designed for an ItsyBitsy M4 Express and a 1.3" 240x240 TFT Adafruit invests time and resources providing this open source code. Please support Adafruit and open source hardware by purchasing products from Adafruit! Written by <NAME> for Adafruit I...
[ "adafruit_st7789.ST7789", "displayio.release_displays", "time.monotonic", "displayio.Group", "adafruit_imageload.load", "displayio.FourWire", "board.SPI", "displayio.TileGrid", "random.randint" ]
[((1424, 1435), 'board.SPI', 'board.SPI', ([], {}), '()\n', (1433, 1435), False, 'import board\n'), ((1563, 1591), 'displayio.release_displays', 'displayio.release_displays', ([], {}), '()\n', (1589, 1591), False, 'import displayio\n'), ((1610, 1695), 'displayio.FourWire', 'displayio.FourWire', (['spi'], {'command': 'b...
import unittest import update_logs class UpdateLogsTest(unittest.TestCase): def test_get_new_logs_with_more_next_logs(self): self.assertEqual( "56789", update_logs.get_new_logs(prev_logs="01234", next_logs="0123456789")) def test_get_new_logs_with_more_prev_logs(self): ...
[ "update_logs.get_new_logs" ]
[((192, 259), 'update_logs.get_new_logs', 'update_logs.get_new_logs', ([], {'prev_logs': '"""01234"""', 'next_logs': '"""0123456789"""'}), "(prev_logs='01234', next_logs='0123456789')\n", (216, 259), False, 'import update_logs\n'), ((369, 436), 'update_logs.get_new_logs', 'update_logs.get_new_logs', ([], {'prev_logs': ...
# coding=utf-8 from flask import Flask, render_template import json app = Flask(__name__) @app.route('/data') def data(): with open('./cache.json') as fd: return json.load(fd) @app.route('/') def index(): _data = data() return render_template('index.html', data=_data) if __name__ == '__main__...
[ "flask.render_template", "json.load", "flask.Flask" ]
[((76, 91), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (81, 91), False, 'from flask import Flask, render_template\n'), ((252, 293), 'flask.render_template', 'render_template', (['"""index.html"""'], {'data': '_data'}), "('index.html', data=_data)\n", (267, 293), False, 'from flask import Flask, render_...
#!/usr/bin/env python # Copyright (c) 2011, <NAME>, TU Darmstadt # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # not...
[ "python_qt_binding.QtCore.Signal", "python_qt_binding.QtGui.QIcon.fromTheme", "rqt_py_common.item_delegates.SpinBoxDelegate", "python_qt_binding.QtCore.Slot" ]
[((1977, 1988), 'python_qt_binding.QtCore.Signal', 'Signal', (['int'], {}), '(int)\n', (1983, 1988), False, 'from python_qt_binding.QtCore import Signal, Slot\n'), ((2008, 2019), 'python_qt_binding.QtCore.Signal', 'Signal', (['int'], {}), '(int)\n', (2014, 2019), False, 'from python_qt_binding.QtCore import Signal, Slo...
# 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 file # to you under the Apache License, Version 2.0 (the # "License"); you may...
[ "os.path.dirname", "yaml.safe_load", "pyspark.sql.HiveContext", "pyspark.SparkContext" ]
[((1305, 1320), 'pyspark.sql.HiveContext', 'HiveContext', (['sc'], {}), '(sc)\n', (1316, 1320), False, 'from pyspark.sql import HiveContext\n'), ((1159, 1182), 'yaml.safe_load', 'yaml.safe_load', (['ymlfile'], {}), '(ymlfile)\n', (1173, 1182), False, 'import unittest, os, yaml\n'), ((1045, 1070), 'os.path.dirname', 'os...
#! /usr/env/bin python import os import linecache import numpy as np from collections import OrderedDict from CP2K_kit.tools import call from CP2K_kit.tools import data_op from CP2K_kit.tools import file_tools from CP2K_kit.tools import read_input from CP2K_kit.tools import traj_info from CP2K_kit.deepff import load_d...
[ "CP2K_kit.deepff.gen_lammps_task.get_box_coord", "CP2K_kit.tools.data_op.list_replicate", "numpy.array", "CP2K_kit.tools.data_op.gen_list", "CP2K_kit.tools.data_op.add_2d_list", "os.path.exists", "CP2K_kit.deepff.load_data.load_data_from_dir", "CP2K_kit.tools.data_op.eval_str", "CP2K_kit.tools.data_...
[((1413, 1450), 'CP2K_kit.tools.call.call_returns_shell', 'call.call_returns_shell', (['exe_dir', 'cmd'], {}), '(exe_dir, cmd)\n', (1436, 1450), False, 'from CP2K_kit.tools import call\n'), ((3556, 3603), 'CP2K_kit.tools.read_input.dump_info', 'read_input.dump_info', (['work_dir', 'inp_file', 'f_key'], {}), '(work_dir,...
#!/usr/bin/env python """ Author: <NAME> <<EMAIL>> License: LGPL Note: I've licensed this code as LGPL because it was a complete translation of the code found here... https://github.com/mojocorp/QProgressIndicator Adapted to spectrochempy_gui """ import sys from spectrochempy_gui.pyqtgraph.Qt import QtCo...
[ "spectrochempy_gui.pyqtgraph.Qt.QtGui.QColor", "spectrochempy_gui.pyqtgraph.Qt.QtCore.QSize", "spectrochempy_gui.pyqtgraph.Qt.QtCore.pyqtProperty", "spectrochempy_gui.pyqtgraph.Qt.QtGui.QApplication", "spectrochempy_gui.pyqtgraph.Qt.QtGui.QPainter" ]
[((3809, 3837), 'spectrochempy_gui.pyqtgraph.Qt.QtGui.QApplication', 'QtGui.QApplication', (['sys.argv'], {}), '(sys.argv)\n', (3827, 3837), False, 'from spectrochempy_gui.pyqtgraph.Qt import QtCore, QtGui, QtWidgets\n'), ((1384, 1404), 'spectrochempy_gui.pyqtgraph.Qt.QtCore.QSize', 'QtCore.QSize', (['(20)', '(20)'], {...
import random from Lecture_6_Local_Search.Exercise4.Exercise import random_selction_methods p_mutation = 0.2 num_of_generations = 30 def genetic_algorithm(population, fitness_fn, minimal_fitness): for generation in range(num_of_generations): print("Generation {}:".format(generation)) print_popula...
[ "random.random", "random.uniform", "random.randint" ]
[((1526, 1546), 'random.uniform', 'random.uniform', (['(0)', '(2)'], {}), '(0, 2)\n', (1540, 1546), False, 'import random\n'), ((555, 575), 'random.uniform', 'random.uniform', (['(0)', '(1)'], {}), '(0, 1)\n', (569, 575), False, 'import random\n'), ((1953, 1968), 'random.random', 'random.random', ([], {}), '()\n', (196...
import time import numpy as np import utils.measurement_subs as measurement_subs import utils.socket_subs as socket_subs from .do_fridge_sweep import do_fridge_sweep from .do_device_sweep import do_device_sweep def device_fridge_2d( graph_proc, rpg, data_file, read_inst, sweep_inst=[], set_inst=[], ...
[ "numpy.arange", "time.sleep", "utils.socket_subs.SockClient", "utils.measurement_subs.generate_device_sweep", "utils.measurement_subs.socket_write" ]
[((7004, 7046), 'utils.socket_subs.SockClient', 'socket_subs.SockClient', (['"""localhost"""', '(18861)'], {}), "('localhost', 18861)\n", (7026, 7046), True, 'import utils.socket_subs as socket_subs\n'), ((7051, 7064), 'time.sleep', 'time.sleep', (['(2)'], {}), '(2)\n', (7061, 7064), False, 'import time\n'), ((7069, 71...
"""Module extensions for custom properties of HBPBaseModule.""" from backpack.core.derivatives.scale_module import ScaleModuleDerivatives from backpack.core.derivatives.sum_module import SumModuleDerivatives from backpack.extensions.secondorder.hbp.hbpbase import HBPBaseModule class HBPScaleModule(HBPBaseModule): ...
[ "backpack.core.derivatives.sum_module.SumModuleDerivatives", "backpack.core.derivatives.scale_module.ScaleModuleDerivatives" ]
[((450, 474), 'backpack.core.derivatives.scale_module.ScaleModuleDerivatives', 'ScaleModuleDerivatives', ([], {}), '()\n', (472, 474), False, 'from backpack.core.derivatives.scale_module import ScaleModuleDerivatives\n'), ((644, 666), 'backpack.core.derivatives.sum_module.SumModuleDerivatives', 'SumModuleDerivatives', ...
import sirf.STIR as pet from scipy.spatial.transform import Rotation as R import numpy as np def printGeoInfo(image : pet.ImageData) -> None: """Print geometrical data for image object. Args: image (pet.ImageData): Input image. """ print(image.get_geometrical_info().get_info()) def printAffin...
[ "scipy.spatial.transform.Rotation.from_matrix" ]
[((894, 929), 'scipy.spatial.transform.Rotation.from_matrix', 'R.from_matrix', (['affineMatrix[:3, :3]'], {}), '(affineMatrix[:3, :3])\n', (907, 929), True, 'from scipy.spatial.transform import Rotation as R\n'), ((980, 1007), 'scipy.spatial.transform.Rotation.from_matrix', 'R.from_matrix', (['affineMatrix'], {}), '(af...
import re import numpy as np import sympy as sp import random as rd from functools import reduce NORMAL_VECTOR_ID = 'hyperplane_normal_vector_%s_%i' NUM_NORMAL_VECS_ID = 'num_normal_vectors_%s' CHAMBER_ID = 'chamber_%s_%s' FVECTOR_ID = 'feature_vector_%s' FVEC_ID_EX = re.compile(r'feature_vector_([\S]*)') class Hype...
[ "re.compile", "numpy.binary_repr", "numpy.dot", "sympy.binomial_coefficients_list", "random.random" ]
[((270, 307), 're.compile', 're.compile', (['"""feature_vector_([\\\\S]*)"""'], {}), "('feature_vector_([\\\\S]*)')\n", (280, 307), False, 'import re\n'), ((1551, 1583), 'sympy.binomial_coefficients_list', 'sp.binomial_coefficients_list', (['n'], {}), '(n)\n', (1580, 1583), True, 'import sympy as sp\n'), ((7996, 8041),...
from Walkline import Walkline, WalklineButton, WalklineSwitch from WalklineUtility import WifiHandler from utime import sleep from config import * from machine import Pin led = Pin(2, Pin.OUT, value=0) relay = Pin(14, Pin.OUT, value=1) def main(): Walkline.setup(UID, DEVICE_ID, DEVICE_KEY) button = WalklineButton...
[ "Walkline.Walkline.setup", "Walkline.WalklineButton", "utime.sleep", "Walkline.WalklineSwitch", "machine.Pin", "Walkline.Walkline.run", "WalklineUtility.WifiHandler.set_ap_status", "WalklineUtility.WifiHandler.set_sta_mode" ]
[((178, 202), 'machine.Pin', 'Pin', (['(2)', 'Pin.OUT'], {'value': '(0)'}), '(2, Pin.OUT, value=0)\n', (181, 202), False, 'from machine import Pin\n'), ((211, 236), 'machine.Pin', 'Pin', (['(14)', 'Pin.OUT'], {'value': '(1)'}), '(14, Pin.OUT, value=1)\n', (214, 236), False, 'from machine import Pin\n'), ((252, 294), 'W...
import os import sys from decimal import * from django.contrib.sites.models import Site from django.core.mail import send_mail from django.db.models import Sum from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.utils.translation import ugettext_lazy as _ from ...
[ "django.utils.translation.ugettext_lazy", "django.core.management.call_command" ]
[((822, 865), 'django.utils.translation.ugettext_lazy', '_', (['"""Populates various data for the tenant."""'], {}), "('Populates various data for the tenant.')\n", (823, 865), True, 'from django.utils.translation import ugettext_lazy as _\n'), ((2365, 2432), 'django.core.management.call_command', 'call_command', (['""...
#!/usr/bin/env python3 import argparse from pycassa.pool import ConnectionPool from pycassa.columnfamily import ColumnFamily from pycassa.system_manager import * from pycassa.cassandra.ttypes import NotFoundException import json import timeit import time import uuid import datetime import random from esmond.config im...
[ "datetime.datetime.utcfromtimestamp", "esmond.config.get_config_path", "pycassa.columnfamily.ColumnFamily", "argparse.ArgumentParser", "esmond.cassandra.RawRateData", "json.dumps", "uuid.uuid4", "esmond.cassandra.CASSANDRA_DB", "esmond.cassandra.BaseRateBin", "time.time", "random.randint" ]
[((4268, 4360), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Generate test data and time queries in cassandra"""'}), "(description=\n 'Generate test data and time queries in cassandra')\n", (4291, 4360), False, 'import argparse\n'), ((6721, 6732), 'time.time', 'time.time', ([], {}),...
""" :Copyright: 2006-2021 <NAME> :License: Revised BSD (see `LICENSE` file for details) """ import pytest from tests.helpers import login_user @pytest.fixture(scope='package') def orga_admin(make_admin): permission_ids = { 'admin.access', 'orga_birthday.view', 'orga_detail.view', ...
[ "pytest.fixture", "tests.helpers.login_user" ]
[((148, 179), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""package"""'}), "(scope='package')\n", (162, 179), False, 'import pytest\n'), ((462, 493), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""package"""'}), "(scope='package')\n", (476, 493), False, 'import pytest\n'), ((421, 441), 'tests.helpers.l...
import logging from phonenumbers.phonenumberutil import region_code_for_country_code logger = logging.getLogger('interakt') def require(name, field, data_type): """Require that the named `field` has the right `data_type`""" if not isinstance(field, data_type): msg = '{0} must have {1}, got: {2}'.form...
[ "logging.getLogger" ]
[((95, 124), 'logging.getLogger', 'logging.getLogger', (['"""interakt"""'], {}), "('interakt')\n", (112, 124), False, 'import logging\n')]
"""User profile resource view""" from sqlalchemy.exc import IntegrityError from flask_jwt_extended import decode_token, create_access_token from sqlalchemy.orm import exc from flask import jsonify, request, session, make_response from flask_restful import Resource from flask_api import status from marshmallow import Va...
[ "flask.request.args.get", "models.user.User.query.filter_by", "flask_mail.Message", "flask_jwt_extended.decode_token", "flask.session.clear", "flask.jsonify", "serializers.user_schema.UserSchema", "app_config.DB.session.query", "flask_jwt_extended.create_access_token", "utils.user_utils.get_reset_...
[((645, 697), 'serializers.user_schema.UserSchema', 'UserSchema', ([], {'exclude': "['id', 'user_registration_data']"}), "(exclude=['id', 'user_registration_data'])\n", (655, 697), False, 'from serializers.user_schema import UserSchema, LoginSchema\n'), ((9186, 9231), 'app_config.API.add_resource', 'API.add_resource', ...
""" Set of programs and tools to read the outputs from RH (Han's version) """ import os import sys import io import xdrlib import numpy as np class Rhout: """ Reads outputs from RH. Currently the reading the following output files is supported: - input.out - geometry.out - atmos.out -...
[ "xdrlib.Unpacker", "numpy.prod", "numpy.fromfile", "numpy.sqrt", "numpy.arccos", "io.open", "os.path.isfile", "xdrlib.Packer", "numpy.zeros", "numpy.sum", "numpy.exp", "numpy.loadtxt", "numpy.transpose", "numpy.arctan" ]
[((24930, 24951), 'xdrlib.Unpacker', 'xdrlib.Unpacker', (['data'], {}), '(data)\n', (24945, 24951), False, 'import xdrlib\n'), ((28119, 28136), 'numpy.transpose', 'np.transpose', (['chi'], {}), '(chi)\n', (28131, 28136), True, 'import numpy as np\n'), ((28147, 28168), 'numpy.zeros', 'np.zeros', (['chi_t.shape'], {}), '...
import logging, tqdm import numpy as np import rawpy import colour_demosaicing as cd import HDRutils.io as io from HDRutils.utils import * logger = logging.getLogger(__name__) def merge(files, do_align=False, demosaic_first=True, normalize=False, color_space='sRGB', wb=None, saturation_percent=0.98, black_leve...
[ "logging.getLogger", "numpy.ones_like", "numpy.eye", "HDRutils.io.imread", "numpy.ones", "tqdm.tqdm", "numpy.argsort", "numpy.array", "numpy.zeros", "numpy.linalg.inv", "HDRutils.io.imread_libraw", "numpy.argmin", "rawpy.imread", "colour_demosaicing.demosaicing_CFA_Bayer_bilinear" ]
[((151, 178), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (168, 178), False, 'import logging, tqdm\n'), ((3835, 3903), 'numpy.argmin', 'np.argmin', (["(metadata['exp'] * metadata['gain'] * metadata['aperture'])"], {}), "(metadata['exp'] * metadata['gain'] * metadata['aperture'])\n", (3...
import pickle import numpy as np import sys def eigen(num, split_num, layer_num): prefix = 'min_' layer_num = int(layer_num) num = str(num) #cur = [8, 8, 8, 8, 16, 16, 24, 24, 24, 24, 24, 24, 32, 32] #cur = [10, 12, 13, 13, 21, 29, 35, 37, 35, 25, 28, 28, 37, 32] #cur = [12, 12, 18, 17, 28, 54...
[ "numpy.mean", "numpy.reshape", "numpy.ones", "numpy.sqrt", "numpy.squeeze", "numpy.argsort", "numpy.array", "numpy.zeros", "numpy.argwhere", "numpy.concatenate" ]
[((2128, 2141), 'numpy.ones', 'np.ones', (['[14]'], {}), '([14])\n', (2135, 2141), True, 'import numpy as np\n'), ((2887, 2900), 'numpy.argsort', 'np.argsort', (['W'], {}), '(W)\n', (2897, 2900), True, 'import numpy as np\n'), ((4491, 4503), 'numpy.array', 'np.array', (['DL'], {}), '(DL)\n', (4499, 4503), True, 'import...
from flask import Flask from flask_pymongo import PyMongo from flask_admin import Admin #from flask_mongoengine import MongoEngine from flask_login import LoginManager # flask app = Flask(__name__) app.config.from_pyfile("config.py") # mongo db mongo = PyMongo(app) #db = MongoEngine() #db.init_app(app) # login manag...
[ "flask_pymongo.PyMongo", "flask_login.LoginManager", "flask_admin.Admin", "flask.Flask" ]
[((183, 198), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (188, 198), False, 'from flask import Flask\n'), ((255, 267), 'flask_pymongo.PyMongo', 'PyMongo', (['app'], {}), '(app)\n', (262, 267), False, 'from flask_pymongo import PyMongo\n'), ((339, 353), 'flask_login.LoginManager', 'LoginManager', ([], {...
import requests import os from janny.config import logger def kube_auth(): session = requests.Session() # We're in-cluster if not os.path.exists(os.path.expanduser("~/.kube/config")): with open("/var/run/secrets/kubernetes.io/serviceaccount/token") as f: token = f.read() sess...
[ "janny.config.logger.info", "requests.Session", "os.path.expanduser" ]
[((92, 110), 'requests.Session', 'requests.Session', ([], {}), '()\n', (108, 110), False, 'import requests\n'), ((465, 513), 'janny.config.logger.info', 'logger.info', (['"""Authenticated with the API server"""'], {}), "('Authenticated with the API server')\n", (476, 513), False, 'from janny.config import logger\n'), (...
# Author: <NAME> (<EMAIL>) 08/25/2016 """SqueezeDet Demo. In image detection mode, for a given image, detect objects and draw bounding boxes around them. In video detection mode, perform real-time detection on the video stream. """ from __future__ import absolute_import from __future__ import division from __future_...
[ "glob.iglob", "time.sleep", "cv2.imshow", "RPi.GPIO.PWM", "cv2.destroyAllWindows", "tensorflow.gfile.MakeDirs", "RPi.GPIO.setmode", "tensorflow.app.run", "tensorflow.Graph", "tensorflow.gfile.Exists", "os.path.split", "tensorflow.ConfigProto", "cv2.waitKey", "RPi.GPIO.setup", "tensorflow...
[((539, 581), 'os.system', 'os.system', (['"""espeak \'WELCOME TO PI VISION\'"""'], {}), '("espeak \'WELCOME TO PI VISION\'")\n', (548, 581), False, 'import os\n'), ((582, 655), 'os.system', 'os.system', (['"""espeak \'WE INCULCATE OBJECT DETECTION WITH MACHINE LEARNING\'"""'], {}), '("espeak \'WE INCULCATE OBJECT DETE...
#!/usr/bin/env python3 import os import sys from datetime import date import subprocess from logzero import logger from .utils import is_cloud_path, path_exists class File(): def __init__(self, tag, path, description, source=None): self.properties = { 'tag': tag, 'path': pa...
[ "datetime.date.today" ]
[((2692, 2704), 'datetime.date.today', 'date.today', ([], {}), '()\n', (2702, 2704), False, 'from datetime import date\n')]
import json from pprintpp import pprint with open('terms.txt') as terms_file: lines = terms_file.readlines() main_list = list() current = dict() for term in lines: if 'head:' in term: if current: main_list.append(current) term = term.strip() term = term.strip('head:') term = term.strip() current = dic...
[ "pprintpp.pprint", "json.dump" ]
[((513, 530), 'pprintpp.pprint', 'pprint', (['main_list'], {}), '(main_list)\n', (519, 530), False, 'from pprintpp import pprint\n'), ((575, 606), 'json.dump', 'json.dump', (['main_list', 'data_file'], {}), '(main_list, data_file)\n', (584, 606), False, 'import json\n')]
#!/usr/bin/python useEMF=True import sys try: import matplotlib except: print("Requires matplotlib from http://matplotlib.sourceforge.net.") sys.exit() if useEMF: matplotlib.use('EMF') ext=".emf" else: matplotlib.use('Agg') ext=".png" from pylab import * semilogy([12,49,78,42,.15,2...
[ "matplotlib.use", "sys.exit" ]
[((187, 208), 'matplotlib.use', 'matplotlib.use', (['"""EMF"""'], {}), "('EMF')\n", (201, 208), False, 'import matplotlib\n'), ((234, 255), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (248, 255), False, 'import matplotlib\n'), ((156, 166), 'sys.exit', 'sys.exit', ([], {}), '()\n', (164, 166), ...
#!/usr/bin/python from __future__ import absolute_import, division, print_function import sys import os import codecs import io import re ESCAPE_SEQUENCE_RE = re.compile(r''' ( \\x.. # 2-digit hex escapes | \\[\\'"abfnrtv] # Single-character escapes )''', re.UNICODE | re.VERBOS...
[ "re.compile", "re.match", "os.path.join", "io.open", "re.sub", "io.StringIO", "pprint.pprint" ]
[((174, 334), 're.compile', 're.compile', (['"""\n ( \\\\\\\\x.. # 2-digit hex escapes\n | \\\\\\\\[\\\\\\\\\'"abfnrtv] # Single-character escapes\n )"""', '(re.UNICODE | re.VERBOSE)'], {}), '(\n """\n ( \\\\\\\\x.. # 2-digit hex escapes\n | \\\\\\\\[\\\\\\\\\'"abfnrtv] # Singl...
# # Copyright (C) [2020] Futurewei Technologies, Inc. # # FORCE-RISCV is 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 # # THIS SOFTWARE IS PRO...
[ "StateTransition.transitionToState", "StateTransition.registerStateTransitionHandler", "RandomUtils.random32", "state_transition_test_utils.verifyState", "State.State" ]
[((2711, 2857), 'StateTransition.registerStateTransitionHandler', 'StateTransition.registerStateTransitionHandler', (['state_trans_handler', 'EStateTransitionType.Explicit', '(EStateElementType.FloatingPointRegister,)'], {}), '(state_trans_handler,\n EStateTransitionType.Explicit, (EStateElementType.FloatingPointReg...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Dec 9 09:58:58 2021 @author: apauron """ import get_files_cluster ## To get the filename import Compartments_SB3_cluster """ A pipeline for generating intrachromosomal compartments in the cluster. Keyword arguments : None Retur...
[ "Compartments_SB3_cluster.pipeline_intra", "get_files_cluster.getfiles" ]
[((476, 537), 'get_files_cluster.getfiles', 'get_files_cluster.getfiles', (['path_data_cluster', '""".RAWobserved"""'], {}), "(path_data_cluster, '.RAWobserved')\n", (502, 537), False, 'import get_files_cluster\n'), ((1780, 1851), 'Compartments_SB3_cluster.pipeline_intra', 'Compartments_SB3_cluster.pipeline_intra', (['...
#!/usr/bin/env python # # Copyright 2007,2010,2011,2013,2014 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, ...
[ "gnuradio.gr.top_block", "pmt.from_long", "gnuradio.blocks.tsb_vector_sink_c", "gnuradio.gr.tag_t", "gnuradio.gr_unittest.run", "gnuradio.digital.ofdm_cyclic_prefixer", "gnuradio.gr.tag_to_python", "gnuradio.blocks.vector_sink_c", "gnuradio.blocks.stream_to_tagged_stream", "pmt.string_to_symbol" ]
[((3369, 3444), 'gnuradio.gr_unittest.run', 'gr_unittest.run', (['test_ofdm_cyclic_prefixer', '"""test_ofdm_cyclic_prefixer.xml"""'], {}), "(test_ofdm_cyclic_prefixer, 'test_ofdm_cyclic_prefixer.xml')\n", (3384, 3444), False, 'from gnuradio import gr, gr_unittest, digital, blocks\n'), ((993, 1007), 'gnuradio.gr.top_blo...
# Copyright 2012 OpenStack Foundation # # 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 l...
[ "trove.guestagent.volume.VolumeDevice.format.assert_any_call", "trove.guestagent.volume.VolumeDevice.migrate_data.assert_any_call", "trove.guestagent.datastore.mongodb.manager.Manager", "trove.common.context.TroveContext", "mock.MagicMock" ]
[((1107, 1121), 'trove.common.context.TroveContext', 'TroveContext', ([], {}), '()\n', (1119, 1121), False, 'from trove.common.context import TroveContext\n'), ((1145, 1168), 'trove.guestagent.datastore.mongodb.manager.Manager', 'mongo_manager.Manager', ([], {}), '()\n', (1166, 1168), True, 'from trove.guestagent.datas...
from __future__ import annotations import subprocess import pytest from conftest import CustomTOMLFile @pytest.mark.parametrize("command", [["update"], ["types", "update"]]) def test_update(command: list[str], toml_file: CustomTOMLFile): content = toml_file.poetry content["dependencies"].add("requests", "^2...
[ "pytest.mark.parametrize", "subprocess.run" ]
[((108, 177), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""command"""', "[['update'], ['types', 'update']]"], {}), "('command', [['update'], ['types', 'update']])\n", (131, 177), False, 'import pytest\n'), ((636, 727), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""command"""', "[['add', 're...
''' Copyright (c) 2018 Modul 9/HiFiBerry 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, merge, publish, distribu...
[ "ac2.metadata.Metadata", "time.sleep" ]
[((2541, 2688), 'ac2.metadata.Metadata', 'Metadata', ([], {'artist': 'songs[songindex][0]', 'title': 'songs[songindex][1]', 'artUrl': 'covers[coverindex]', 'playerName': '"""dummy"""', 'playerState': 'states[stateindex]'}), "(artist=songs[songindex][0], title=songs[songindex][1], artUrl=\n covers[coverindex], player...
import numpy as np import open3d as o3d import pickle import torch import ipdb st = ipdb.set_trace def apply_4x4(RT, xyz): B, N, _ = list(xyz.shape) ones = torch.ones_like(xyz[:,:,0:1]) xyz1 = torch.cat([xyz, ones], 2) xyz1_t = torch.transpose(xyz1, 1, 2) # this is B x 4 x N xyz2_t = torch.ma...
[ "torch.ones_like", "torch.transpose", "numpy.max", "open3d.utility.Vector3dVector", "open3d.visualization.draw_geometries", "torch.matmul", "open3d.geometry.PointCloud", "numpy.min", "open3d.geometry.TriangleMesh.create_coordinate_frame", "numpy.load", "torch.cat" ]
[((760, 835), 'open3d.geometry.TriangleMesh.create_coordinate_frame', 'o3d.geometry.TriangleMesh.create_coordinate_frame', ([], {'size': '(1)', 'origin': '[0, 0, 0]'}), '(size=1, origin=[0, 0, 0])\n', (809, 835), True, 'import open3d as o3d\n'), ((1315, 1358), 'open3d.visualization.draw_geometries', 'o3d.visualization....
""" Helper functions for image processing The color space conversion functions are modified from functions of the Python package scikit-image, https://github.com/scikit-image/scikit-image. scikit-image has the following license. Copyright (C) 2019, the scikit-image team All rights reserved. Redistribution and use in...
[ "numpy.clip", "io.BytesIO", "numpy.array", "sklearn.cluster.AgglomerativeClustering", "numpy.asarray", "dotenv.load_dotenv", "numpy.empty", "numpy.concatenate", "numpy.tile", "numpy.any", "requests.get", "numpy.nonzero", "numpy.transpose", "numpy.vectorize", "sklearn.cluster.KMeans", "...
[((1918, 1931), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (1929, 1931), False, 'from dotenv import load_dotenv\n'), ((1945, 1967), 'os.getenv', 'os.getenv', (['"""SLS_STAGE"""'], {}), "('SLS_STAGE')\n", (1954, 1967), False, 'import os\n'), ((2064, 2099), 'numpy.asarray', 'np.asarray', (['(0.95047, 1.0, 1.0...
""" TopView is the main Widget with the related ControllerTopView Class There are several SliceView windows (sagittal, coronal, possibly tilted etc...) that each have a SliceController object The underlying data model object is an ibllib.atlas.AllenAtlas object TopView(QMainWindow) ControllerTopView(PgImageCon...
[ "numpy.insert", "PyQt5.QtWidgets.QApplication.instance", "PyQt5.QtGui.QTransform", "matplotlib.cm.get_cmap", "pathlib.Path", "pyqtgraph.ScatterPlotItem", "pyqtgraph.InfiniteLine", "numpy.array", "ibllib.atlas.AllenAtlas", "numpy.zeros", "numpy.isnan", "pyqtgraph.mkPen", "numpy.nanmin", "qt...
[((14373, 14408), 'dataclasses.field', 'field', ([], {'default_factory': 'pg.ImageItem'}), '(default_factory=pg.ImageItem)\n', (14378, 14408), False, 'from dataclasses import dataclass, field\n'), ((14431, 14465), 'dataclasses.field', 'field', ([], {'default_factory': '(lambda : {})'}), '(default_factory=lambda : {})\n...
import os import numpy as np import numpy.random as rnd import matplotlib.pyplot as plt import logging from pandas import DataFrame from common.gen_samples import * from common.data_plotter import * from aad.aad_globals import * from aad.aad_support import * from aad.forest_description import * from aad.anomaly_data...
[ "logging.getLogger", "numpy.argsort", "numpy.array", "numpy.sin", "numpy.reshape", "numpy.where", "numpy.max", "matplotlib.pyplot.axhline", "matplotlib.pyplot.yticks", "numpy.vstack", "numpy.random.seed", "numpy.min", "matplotlib.pyplot.ylim", "numpy.arctan", "numpy.ones", "matplotlib....
[((481, 495), 'numpy.argsort', 'np.argsort', (['(-v)'], {}), '(-v)\n', (491, 495), True, 'import numpy as np\n'), ((3499, 3525), 'numpy.random.uniform', 'rnd.uniform', (['(0.0)', '(1.0)', '(500)'], {}), '(0.0, 1.0, 500)\n', (3510, 3525), True, 'import numpy.random as rnd\n'), ((3538, 3577), 'numpy.reshape', 'np.reshape...
import sys from PySide2.QtCore import QCoreApplication, QFile def load_ui_file(filename): ui_file = QFile(filename) if not ui_file.open(QFile.ReadOnly): print("Cannot open {}: {}".format(filename, ui_file.errorString())) sys.exit(-1) return ui_file def translate(context, text): retu...
[ "PySide2.QtCore.QFile", "PySide2.QtCore.QCoreApplication.translate", "sys.exit" ]
[((107, 122), 'PySide2.QtCore.QFile', 'QFile', (['filename'], {}), '(filename)\n', (112, 122), False, 'from PySide2.QtCore import QCoreApplication, QFile\n'), ((323, 370), 'PySide2.QtCore.QCoreApplication.translate', 'QCoreApplication.translate', (['context', 'text', 'None'], {}), '(context, text, None)\n', (349, 370),...
# -*- coding: utf-8 -*- """ From https://github.com/msmsajjadi/precision-recall-distributions/blob/master/prd_from_image_folders.py """ # coding=utf-8 # Copyright: <NAME> (msajjadi.com) import prd_score as prd from improved_precision_recall import knn_precision_recall_features def compute_prc(orig_data,synth_data,...
[ "prd_score.compute_prd_from_embedding", "improved_precision_recall.knn_precision_recall_features", "prd_score.prd_to_max_f_beta_pair" ]
[((1087, 1140), 'prd_score.prd_to_max_f_beta_pair', 'prd.prd_to_max_f_beta_pair', (['precision', 'recall'], {'beta': '(8)'}), '(precision, recall, beta=8)\n', (1113, 1140), True, 'import prd_score as prd\n'), ((479, 531), 'improved_precision_recall.knn_precision_recall_features', 'knn_precision_recall_features', (['ori...
import pandas as pd from autogluon.utils.tabular.utils.savers import save_pd from autogluon_utils.benchmarking.evaluation.preprocess import preprocess_openml from autogluon_utils.benchmarking.evaluation.constants import * def run(): results_dir = 'data/results/' results_dir_input = results_dir + 'input/raw/...
[ "autogluon.utils.tabular.utils.savers.save_pd.save", "pandas.concat", "autogluon_utils.benchmarking.evaluation.preprocess.preprocess_openml.preprocess_openml_input" ]
[((425, 545), 'autogluon_utils.benchmarking.evaluation.preprocess.preprocess_openml.preprocess_openml_input', 'preprocess_openml.preprocess_openml_input', ([], {'path': "(results_dir_input + 'results_large-8c4h.csv')", 'framework_suffix': '"""_4h"""'}), "(path=results_dir_input +\n 'results_large-8c4h.csv', framewor...
""" Copyright 2012, 2013 UW Information Technology, University of Washington 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 r...
[ "django.core.cache.get_cache", "django.test.client.Client", "spotseeker_server.models.Spot.objects.create", "mock.patch.object", "spotseeker_server.models.SpotAvailableHours.objects.create", "django.test.utils.override_settings", "simplejson.loads" ]
[((972, 1045), 'django.test.utils.override_settings', 'override_settings', ([], {'SPOTSEEKER_AUTH_MODULE': '"""spotseeker_server.auth.all_ok"""'}), "(SPOTSEEKER_AUTH_MODULE='spotseeker_server.auth.all_ok')\n", (989, 1045), False, 'from django.test.utils import override_settings\n'), ((1117, 1174), 'spotseeker_server.mo...
from copy import deepcopy from src.CourseMaterials.Week3.Oef1.place import Place class Board: starting_board = [[Place(x, y) for x in range(3)] for y in range(3)] def __init__(self, inner_board=starting_board, value="", children=[], parent_board=deepcopy(starting_board)): self.inner_board = deepcopy(i...
[ "src.CourseMaterials.Week3.Oef1.place.Place", "copy.deepcopy" ]
[((256, 280), 'copy.deepcopy', 'deepcopy', (['starting_board'], {}), '(starting_board)\n', (264, 280), False, 'from copy import deepcopy\n'), ((310, 331), 'copy.deepcopy', 'deepcopy', (['inner_board'], {}), '(inner_board)\n', (318, 331), False, 'from copy import deepcopy\n'), ((383, 401), 'copy.deepcopy', 'deepcopy', (...
''' .. module:: eosfactory.core.vscode :platform: Unix, Darwin :synopsis: Default configuration items of a contract project. .. moduleauthor:: Tokenika ''' import json import argparse import eosfactory.core.config as config INCLUDE_PATH = "includePath" LIBS = "libs" CODE_OPTIONS = "codeOptions" TEST_OPTIONS ...
[ "eosfactory.core.config.eosio_cpp_includes", "argparse.ArgumentParser", "json.dumps", "eosfactory.core.config.wsl_root", "eosfactory.core.config.update_vscode" ]
[((372, 399), 'eosfactory.core.config.eosio_cpp_includes', 'config.eosio_cpp_includes', ([], {}), '()\n', (397, 399), True, 'import eosfactory.core.config as config\n'), ((427, 444), 'eosfactory.core.config.wsl_root', 'config.wsl_root', ([], {}), '()\n', (442, 444), True, 'import eosfactory.core.config as config\n'), (...
from tests.functional.services.policy_engine.utils.api.conf import ( policy_engine_api_conf, ) from tests.functional.services.utils import http_utils def get_vulnerabilities( vulnerability_ids=[], affected_package=None, affected_package_version=None, namespace=None, ): if not vulnerability_ids...
[ "tests.functional.services.utils.http_utils.RequestFailedError", "tests.functional.services.utils.http_utils.http_get" ]
[((622, 714), 'tests.functional.services.utils.http_utils.http_get', 'http_utils.http_get', (["['query', 'vulnerabilities']", 'query'], {'config': 'policy_engine_api_conf'}), "(['query', 'vulnerabilities'], query, config=\n policy_engine_api_conf)\n", (641, 714), False, 'from tests.functional.services.utils import h...
from flake8_aaa.line_markers import LineMarkers from flake8_aaa.types import LineType def test(): result = LineMarkers(5 * [''], 7) assert result.types == [ LineType.unprocessed, LineType.unprocessed, LineType.unprocessed, LineType.unprocessed, LineType.unprocessed, ...
[ "flake8_aaa.line_markers.LineMarkers" ]
[((113, 137), 'flake8_aaa.line_markers.LineMarkers', 'LineMarkers', (["(5 * [''])", '(7)'], {}), "(5 * [''], 7)\n", (124, 137), False, 'from flake8_aaa.line_markers import LineMarkers\n')]
import pytest from helpers.cluster import ClickHouseCluster import urllib.request, urllib.parse import ssl import os.path HTTPS_PORT = 8443 NODE_IP = '10.5.172.77' # It's important for the node to work at this IP because 'server-cert.pem' requires that (see server-ext.cnf). NODE_IP_WITH_HTTPS_PORT = NODE_IP + ':' + st...
[ "pytest.fixture", "ssl.SSLContext", "helpers.cluster.ClickHouseCluster", "pytest.raises" ]
[((402, 429), 'helpers.cluster.ClickHouseCluster', 'ClickHouseCluster', (['__file__'], {}), '(__file__)\n', (419, 429), False, 'from helpers.cluster import ClickHouseCluster\n'), ((720, 764), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""', 'autouse': '(True)'}), "(scope='module', autouse=True)\n", (7...
import inspect from functools import partial from typing import Any, Callable, Dict, List from .service_builder import ServiceBuilder from .types import NameType class Container: def __init__(self, params): self._services: Dict[NameType, ServiceBuilder] = {} self._params: Dict[NameType, Any] = pa...
[ "functools.partial", "inspect.getfullargspec" ]
[((1832, 1857), 'inspect.getfullargspec', 'inspect.getfullargspec', (['f'], {}), '(f)\n', (1854, 1857), False, 'import inspect\n'), ((2657, 2677), 'functools.partial', 'partial', (['f'], {}), '(f, **kwargs)\n', (2664, 2677), False, 'from functools import partial\n')]
from exceptions.gpm.auth_exceptions import AuthException from gmusicapi import Mobileclient from oauth2client.client import OAuth2Credentials from wrappers.gpm.auth_wrapper import AuthWrapper from unittest.mock import MagicMock from unittest import mock import unittest class AuthWrapperTest(unittest.TestCase): ...
[ "wrappers.gpm.auth_wrapper.AuthWrapper.authenticate_mobile_client", "unittest.mock.MagicMock" ]
[((411, 439), 'unittest.mock.MagicMock', 'MagicMock', (['OAuth2Credentials'], {}), '(OAuth2Credentials)\n', (420, 439), False, 'from unittest.mock import MagicMock\n'), ((485, 508), 'unittest.mock.MagicMock', 'MagicMock', (['Mobileclient'], {}), '(Mobileclient)\n', (494, 508), False, 'from unittest.mock import MagicMoc...
from datetime import datetime from django.shortcuts import render from django.http import Http404 from .models import ProgramSchedule from utils.datedeux import DateDeux # Create your views here. def display_single_schedule(request, schedule_id): try: schedule = ProgramSchedule.objects.get(id=int(schedu...
[ "django.shortcuts.render", "datetime.datetime.now", "utils.datedeux.DateDeux.frompydate", "django.http.Http404" ]
[((1140, 1231), 'django.shortcuts.render', 'render', (['request', '"""schedulemaster/view_single_program.html"""', "{'schedule': schedule_data}"], {}), "(request, 'schedulemaster/view_single_program.html', {'schedule':\n schedule_data})\n", (1146, 1231), False, 'from django.shortcuts import render\n'), ((1103, 1117)...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Unit test for status""" import sys import unittest from os.path import dirname, realpath from pm.status import Y, Conserved, PM, NA class RoutineTest(unittest.TestCase): """Routine test.""" def test_pm_status_gt_order(self): """Status should have a r...
[ "pm.status.Y", "pm.status.NA", "pm.status.PM", "unittest.main", "pm.status.Conserved" ]
[((2725, 2740), 'unittest.main', 'unittest.main', ([], {}), '()\n', (2738, 2740), False, 'import unittest\n'), ((372, 375), 'pm.status.Y', 'Y', ([], {}), '()\n', (373, 375), False, 'from pm.status import Y, Conserved, PM, NA\n'), ((378, 396), 'pm.status.Conserved', 'Conserved', ([], {'aa_pm': '(0)'}), '(aa_pm=0)\n', (3...
#! /usr/bin/env python3 import math import decimal N_DIRECTIONS = 256 # If rounded up to 384 and last element has max value, it has the bit # pattern, that prevents bisection from searching past the last element. N_PRECALC_DRAW_DIST = 384 # Python round() uses "banker's rounding", i.e. "round half even" def roun...
[ "decimal.Decimal" ]
[((349, 367), 'decimal.Decimal', 'decimal.Decimal', (['d'], {}), '(d)\n', (364, 367), False, 'import decimal\n')]
# KicadModTree is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # KicadModTree is distributed in the hope that it will be useful, # bu...
[ "KicadModTree.nodes.Node.Node._getRenderTreeText" ]
[((3461, 3490), 'KicadModTree.nodes.Node.Node._getRenderTreeText', 'Node._getRenderTreeText', (['self'], {}), '(self)\n', (3484, 3490), False, 'from KicadModTree.nodes.Node import Node\n')]
# Generated by Django 3.0.3 on 2020-05-30 20:36 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('microimprocessing', '0005_auto_20200530_2231'), ] operations = [ migrations.AlterField( model_name='serverdatafilename', ...
[ "django.db.models.FilePathField" ]
[((361, 468), 'django.db.models.FilePathField', 'models.FilePathField', ([], {'path': '"""C:\\\\Users\\\\Jirik\\\\data"""', 'recursive': '(True)', 'verbose_name': '"""File Path on server"""'}), "(path='C:\\\\Users\\\\Jirik\\\\data', recursive=True,\n verbose_name='File Path on server')\n", (381, 468), False, 'from d...
# Copyright 2015 Google Inc. All Rights Reserved. import json import unittest import webtest from google.appengine.datastore import datastore_stub_util from google.appengine.ext import ndb from google.appengine.ext import testbed import apprtc import constants import gcm_register import gcmrecord import room import ...
[ "unittest.main", "json.dumps", "room.has_room", "room.get_room_state" ]
[((3685, 3700), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3698, 3700), False, 'import unittest\n'), ((644, 660), 'json.dumps', 'json.dumps', (['body'], {}), '(body)\n', (654, 660), False, 'import json\n'), ((923, 956), 'room.has_room', 'room.has_room', (['self.HOST', 'room_id'], {}), '(self.HOST, room_id)\n'...
import math import torch import numpy as np from collections import OrderedDict, defaultdict from transformers import BertTokenizer sentiment2id = {'negative': 3, 'neutral': 4, 'positive': 5} label = ['N', 'B-A', 'I-A', 'A', 'B-O', 'I-O', 'O', 'negative', 'neutral', 'positive'] # label2id = {'N': 0, 'B-A': 1, 'I-A':...
[ "collections.OrderedDict", "torch.stack", "transformers.BertTokenizer.from_pretrained", "torch.tensor", "collections.defaultdict", "torch.zeros" ]
[((426, 439), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (437, 439), False, 'from collections import OrderedDict, defaultdict\n'), ((441, 454), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (452, 454), False, 'from collections import OrderedDict, defaultdict\n'), ((10672, 10723), 'transfo...
import platform as platform_module import pytest from cibuildwheel.__main__ import get_build_identifiers from cibuildwheel.environment import parse_environment from cibuildwheel.options import Options, _get_pinned_docker_images from .utils import get_default_command_line_arguments PYPROJECT_1 = """ [tool.cibuildwhe...
[ "cibuildwheel.options.Options", "cibuildwheel.__main__.get_build_identifiers", "pytest.mark.parametrize", "cibuildwheel.options._get_pinned_docker_images", "cibuildwheel.environment.parse_environment" ]
[((2800, 3025), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""env_var_value"""', '[\'normal value\', \'"value wrapped in quotes"\', "an unclosed single-quote: \'",\n \'an unclosed double-quote: "\', """string\nwith\ncarriage\nreturns\n""",\n \'a trailing backslash \\\\\']'], {}), '(\'env_var_value\'...
import re from discord.ext import commands from utils import sql from utils.functions import func from cogs.Core.Rules import Rules from cogs.Core.Language import Language class MassEmoji(commands.Cog): def __init__(self, bot): self.bot = bot self.store = {} # Guilds Cache @commands.Cog.lis...
[ "discord.ext.commands.Cog.listener", "utils.sql.GetInfractions", "cogs.Core.Language.Language.get", "cogs.Core.Rules.Rules.DoRule", "re.findall" ]
[((304, 327), 'discord.ext.commands.Cog.listener', 'commands.Cog.listener', ([], {}), '()\n', (325, 327), False, 'from discord.ext import commands\n'), ((656, 702), 're.findall', 're.findall', (['u"""[𐀀-\U0010ffff]"""', 'message.content'], {}), "(u'[𐀀-\\U0010ffff]', message.content)\n", (666, 702), False, 'import re\...
import os, sys import time import argparse import yaml from collections import namedtuple from yattag import Doc, indent parser = argparse.ArgumentParser(description="A tool for consolidating YAML changelogs.") parser.add_argument("-l", "--location", action="store", help="Only specify if changelog location differs fro...
[ "os.listdir", "collections.namedtuple", "argparse.ArgumentParser", "time.strftime", "os.path.join", "os.path.realpath", "yaml.safe_load", "sys.exc_info", "yattag.Doc" ]
[((131, 216), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""A tool for consolidating YAML changelogs."""'}), "(description='A tool for consolidating YAML changelogs.'\n )\n", (154, 216), False, 'import argparse\n'), ((688, 713), 'time.strftime', 'time.strftime', (['"""%Y-%m-%d"""'], ...
"""Indexing domain models Revision ID: 9960bbbe4d92 Revises: d<PASSWORD> Create Date: 2017-09-06 13:09:21.210982 """ # revision identifiers, used by Alembic. revision = '9960bbbe4d92' down_revision = '<KEY>' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def upgrade(engine_n...
[ "alembic.op.drop_index", "alembic.op.f", "alembic.op.create_index" ]
[((2272, 2379), 'alembic.op.create_index', 'op.create_index', (['"""ix_sf_133_tas_group"""', '"""sf_133"""', "['tas', 'fiscal_year', 'period', 'line']"], {'unique': '(True)'}), "('ix_sf_133_tas_group', 'sf_133', ['tas', 'fiscal_year',\n 'period', 'line'], unique=True)\n", (2287, 2379), False, 'from alembic import op...
# -*- coding: utf-8 -*- """ Barycenters =========== This example shows three methods to compute barycenters of time series. For an overview over the available methods see the :mod:`tslearn.barycenters` module. *tslearn* provides three methods for calculating barycenters for a given set of time series: * *Euclidean b...
[ "tslearn.barycenters.dtw_barycenter_averaging", "tslearn.barycenters.dtw_barycenter_averaging_subgradient", "tslearn.barycenters.euclidean_barycenter", "tslearn.datasets.CachedDatasets", "numpy.random.seed", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.title", "matplotlib.pyplot.subplot", "t...
[((2102, 2122), 'numpy.random.seed', 'numpy.random.seed', (['(0)'], {}), '(0)\n', (2119, 2122), False, 'import numpy\n'), ((2587, 2607), 'matplotlib.pyplot.subplot', 'plt.subplot', (['(4)', '(1)', '(1)'], {}), '(4, 1, 1)\n', (2598, 2607), True, 'import matplotlib.pyplot as plt\n'), ((2608, 2641), 'matplotlib.pyplot.tit...
import numpy as np import pandas as pd import pandas.api.types as pdtypes from ..utils import resolution from ..doctools import document from .stat import stat @document class stat_boxplot(stat): """ Compute boxplot statistics {usage} Parameters ---------- {common_parameters} coef : flo...
[ "numpy.ptp", "numpy.sqrt", "numpy.unique", "numpy.average", "numpy.asarray", "numpy.max", "numpy.argsort", "numpy.sum", "pandas.api.types.is_categorical_dtype", "numpy.percentile", "numpy.interp", "numpy.min", "pandas.DataFrame", "numpy.cumsum" ]
[((3580, 3599), 'numpy.asarray', 'np.asarray', (['weights'], {}), '(weights)\n', (3590, 3599), True, 'import numpy as np\n'), ((3608, 3621), 'numpy.asarray', 'np.asarray', (['q'], {}), '(q)\n', (3618, 3621), True, 'import numpy as np\n'), ((3645, 3658), 'numpy.argsort', 'np.argsort', (['a'], {}), '(a)\n', (3655, 3658),...
# This document contains definitions of functions and variables used # in multiple tutorial examples. Each code fragment is actually passed to Sphinx # twice: # - This whole file is imported in a hidden, global setup block # - The example in which the function is defined included its code from this # file. # ...
[ "franz.openrdf.connect.ag_connect" ]
[((816, 870), 'franz.openrdf.connect.ag_connect', 'ag_connect', (['"""python-tutorial"""'], {'create': '(True)', 'clear': '(True)'}), "('python-tutorial', create=True, clear=True)\n", (826, 870), False, 'from franz.openrdf.connect import ag_connect\n')]
from threading import Thread from statistics import mean import nvidia_smi import time class MemoryMonitor(Thread): def __init__(self, delay): super(MemoryMonitor, self).__init__() self.__stopped = False self.__delay = delay nvidia_smi.nvmlInit() handle = nvidia_smi.nvmlDe...
[ "nvidia_smi.nvmlDeviceGetHandleByIndex", "statistics.mean", "nvidia_smi.nvmlDeviceGetMemoryInfo", "nvidia_smi.nvmlInit", "time.sleep", "nvidia_smi.nvmlShutdown" ]
[((264, 285), 'nvidia_smi.nvmlInit', 'nvidia_smi.nvmlInit', ([], {}), '()\n', (283, 285), False, 'import nvidia_smi\n'), ((303, 343), 'nvidia_smi.nvmlDeviceGetHandleByIndex', 'nvidia_smi.nvmlDeviceGetHandleByIndex', (['(0)'], {}), '(0)\n', (340, 343), False, 'import nvidia_smi\n'), ((366, 408), 'nvidia_smi.nvmlDeviceGe...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os, sys, re sys.path.append("{0}/Desktop/cbmi/reproduce/python/MedicalResearchTool/objects".format(os.environ['HOME'])) #TODO sys.path.append("{0}/Desktop/cbmi/reproduce/python/MedicalResearchTool".format(os.environ['HOME'])) import nltk import requests from pprin...
[ "nltk.pos_tag", "nltk.RegexpParser", "re.escape", "nltk.corpus.stopwords.words", "nltk.word_tokenize", "os.getuid", "os.getlogin", "nltk.sent_tokenize", "re.search" ]
[((7484, 7508), 'nltk.sent_tokenize', 'nltk.sent_tokenize', (['text'], {}), '(text)\n', (7502, 7508), False, 'import nltk\n'), ((9877, 9901), 'nltk.sent_tokenize', 'nltk.sent_tokenize', (['text'], {}), '(text)\n', (9895, 9901), False, 'import nltk\n'), ((11468, 11492), 'nltk.sent_tokenize', 'nltk.sent_tokenize', (['tex...
# -*- coding: utf-8 -*- import math import numpy as np import matplotlib.pyplot as plt #Constants GNa = 120 #Maximal conductance(Na+) ms/cm2 Gk = 36 #Maximal condectance(K+) ms/cm2 Gleak = 0.3 #Maximal conductance(leak) ms/cm2 cm = 1 #Cell capacitance uF/cm2 delta = 0.01 #Axon condectivity ms2 ENa = 50 #Nernst poten...
[ "math.pow", "matplotlib.pyplot.clf", "numpy.argmax", "matplotlib.pyplot.figure", "math.exp", "numpy.arange", "matplotlib.pyplot.show" ]
[((518, 549), 'numpy.arange', 'np.arange', (['(0)', 'domain_length', 'dx'], {}), '(0, domain_length, dx)\n', (527, 549), True, 'import numpy as np\n'), ((555, 588), 'numpy.arange', 'np.arange', (['(0)', 'simulation_time', 'dt'], {}), '(0, simulation_time, dt)\n', (564, 588), True, 'import numpy as np\n'), ((2350, 2368)...
# from flask_login import LoginManager from flask_restless import APIManager from flask_sqlalchemy import SQLAlchemy from flask import logging __author__ = 'sharp' db = SQLAlchemy() restless = APIManager(app=None, flask_sqlalchemy_db=db) logger = logging.getLogger() # login_manager = LoginManager()
[ "flask_sqlalchemy.SQLAlchemy", "flask.logging.getLogger", "flask_restless.APIManager" ]
[((171, 183), 'flask_sqlalchemy.SQLAlchemy', 'SQLAlchemy', ([], {}), '()\n', (181, 183), False, 'from flask_sqlalchemy import SQLAlchemy\n'), ((196, 240), 'flask_restless.APIManager', 'APIManager', ([], {'app': 'None', 'flask_sqlalchemy_db': 'db'}), '(app=None, flask_sqlalchemy_db=db)\n', (206, 240), False, 'from flask...
from application.factories import vcf_handler_api application = vcf_handler_api( name="VCF Handler API", )
[ "application.factories.vcf_handler_api" ]
[((65, 104), 'application.factories.vcf_handler_api', 'vcf_handler_api', ([], {'name': '"""VCF Handler API"""'}), "(name='VCF Handler API')\n", (80, 104), False, 'from application.factories import vcf_handler_api\n')]
from flask import Flask, Blueprint from flask_ask import Ask from flask_sqlalchemy import SQLAlchemy from config import config # Extensions db = SQLAlchemy() alexa = Ask(route = '/') # Main blueprint main = Blueprint('main', __name__) from . import models, views def create_app(config_name = 'development'): app...
[ "flask_sqlalchemy.SQLAlchemy", "flask_ask.Ask", "flask.Blueprint", "flask.Flask" ]
[((147, 159), 'flask_sqlalchemy.SQLAlchemy', 'SQLAlchemy', ([], {}), '()\n', (157, 159), False, 'from flask_sqlalchemy import SQLAlchemy\n'), ((168, 182), 'flask_ask.Ask', 'Ask', ([], {'route': '"""/"""'}), "(route='/')\n", (171, 182), False, 'from flask_ask import Ask\n'), ((210, 237), 'flask.Blueprint', 'Blueprint', ...
from __future__ import absolute_import, unicode_literals from django.core.management.base import BaseCommand from molo.core.models import ArticlePage class Command(BaseCommand): def handle(self, **options): ArticlePage.objects.all().update( featured_in_latest=False, featured_in_la...
[ "molo.core.models.ArticlePage.objects.all" ]
[((222, 247), 'molo.core.models.ArticlePage.objects.all', 'ArticlePage.objects.all', ([], {}), '()\n', (245, 247), False, 'from molo.core.models import ArticlePage\n')]
from markovch import markov diagram = markov.Markov('./data_tr.txt') print(diagram.result_list(50))
[ "markovch.markov.Markov" ]
[((39, 69), 'markovch.markov.Markov', 'markov.Markov', (['"""./data_tr.txt"""'], {}), "('./data_tr.txt')\n", (52, 69), False, 'from markovch import markov\n')]