code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import pandas as pd def readFile(pathFile): extension = pathFile.split(".")[1] if extension == 'csv': wb = pd.read_csv(pathFile, header=None) df = pd.DataFrame(wb) elif extension == 'xlsx': wb = pd.read_excel(pathFile) df = pd.DataFrame(wb) else: mensagem = 'Tipo...
[ "pandas.DataFrame", "pandas.read_csv", "pandas.read_excel" ]
[((124, 158), 'pandas.read_csv', 'pd.read_csv', (['pathFile'], {'header': 'None'}), '(pathFile, header=None)\n', (135, 158), True, 'import pandas as pd\n'), ((172, 188), 'pandas.DataFrame', 'pd.DataFrame', (['wb'], {}), '(wb)\n', (184, 188), True, 'import pandas as pd\n'), ((232, 255), 'pandas.read_excel', 'pd.read_exc...
import torch import torch.utils.data from rlkit.torch.pytorch_util import from_numpy from torch import nn from torch.autograd import Variable from torch.nn import functional as F from rlkit.pythonplusplus import identity from rlkit.torch import pytorch_util as ptu import numpy as np class RefinementNetwork(nn.Module):...
[ "numpy.prod", "torch.nn.ReLU", "torch.nn.ModuleList", "torch.nn.LSTM", "torch.nn.Conv2d", "numpy.stack", "numpy.linspace", "numpy.zeros", "torch.nn.Linear", "torch.zeros", "torch.cat" ]
[((839, 848), 'torch.nn.ReLU', 'nn.ReLU', ([], {}), '()\n', (846, 848), False, 'from torch import nn\n'), ((1731, 1746), 'torch.nn.ModuleList', 'nn.ModuleList', ([], {}), '()\n', (1744, 1746), False, 'from torch import nn\n'), ((1779, 1794), 'torch.nn.ModuleList', 'nn.ModuleList', ([], {}), '()\n', (1792, 1794), False,...
# -*- coding: utf-8 -*- """Command line interface for Axonius API Client.""" import click from ..context import AliasedGroup from . import ( grp_central_core, grp_discover, grp_meta, grp_nodes, grp_roles, grp_settings, grp_users, ) @click.group(cls=AliasedGroup) def system(): """Group...
[ "click.group" ]
[((264, 293), 'click.group', 'click.group', ([], {'cls': 'AliasedGroup'}), '(cls=AliasedGroup)\n', (275, 293), False, 'import click\n')]
from city_functions import city_country_name import unittest class CitiesTestCase(unittest.TestCase): def test_city_country(self): """Test the output of the city_country_name function""" string_output = city_country_name('nairobi', 'kenya') self.assertEqual(string_output, 'Nairobi Kenya') ...
[ "unittest.main", "city_functions.city_country_name" ]
[((580, 595), 'unittest.main', 'unittest.main', ([], {}), '()\n', (593, 595), False, 'import unittest\n'), ((224, 261), 'city_functions.city_country_name', 'city_country_name', (['"""nairobi"""', '"""kenya"""'], {}), "('nairobi', 'kenya')\n", (241, 261), False, 'from city_functions import city_country_name\n'), ((445, ...
import colors from time import sleep def build_max_heap(array, limit, canvas, draw_data, speed): last_parent = (limit-1) // 2 for i in range(last_parent, -1, -1): heapify(array, i, limit) array[0], array[limit] = array[limit], array[0] def heapify(array, n, limit): left_children = n*2+1 ...
[ "time.sleep" ]
[((784, 796), 'time.sleep', 'sleep', (['speed'], {}), '(speed)\n', (789, 796), False, 'from time import sleep\n')]
#web is a blueprint from flask import Blueprint from flask import render_template web = Blueprint('web',__name__) @web.app_errorhandler(404) def not_found(e): return render_template('404.html'),404 from app.web import book from app.web import auth from app.web import drift from app.web import gift from app.web i...
[ "flask.render_template", "flask.Blueprint" ]
[((89, 115), 'flask.Blueprint', 'Blueprint', (['"""web"""', '__name__'], {}), "('web', __name__)\n", (98, 115), False, 'from flask import Blueprint\n'), ((172, 199), 'flask.render_template', 'render_template', (['"""404.html"""'], {}), "('404.html')\n", (187, 199), False, 'from flask import render_template\n')]
from unittest import mock, TestCase from mort.download_utils import get_filename_from_url, download class TestUtils(TestCase): URL = "https://www.browserstack.com/screenshots/fdd01e6683e0474ede370b753f870542f364f8ba/" + \ "android_Google-Nexus-6_5.0_portrait.jpg" def test_get_filename_from_url(sel...
[ "mort.download_utils.download", "mort.download_utils.get_filename_from_url", "unittest.mock.patch" ]
[((444, 479), 'unittest.mock.patch', 'mock.patch', (['"""httplib2.Http.request"""'], {}), "('httplib2.Http.request')\n", (454, 479), False, 'from unittest import mock, TestCase\n'), ((584, 610), 'mort.download_utils.download', 'download', (['self.URL', '"""/tmp"""'], {}), "(self.URL, '/tmp')\n", (592, 610), False, 'fro...
import contextlib from typing import Any, Dict, Iterable, Optional import discord import iso8601 import validators from redbot.core import commands from redbot.vendored.discord.ext import menus class GenericMenu(menus.MenuPages, inherit_buttons=False): def __init__( self, source: menus.PageSource...
[ "iso8601.parse_date", "redbot.vendored.discord.ext.menus.First", "redbot.vendored.discord.ext.menus.Last", "contextlib.suppress", "validators.url" ]
[((2277, 2291), 'redbot.vendored.discord.ext.menus.First', 'menus.First', (['(1)'], {}), '(1)\n', (2288, 2291), False, 'from redbot.vendored.discord.ext import menus\n'), ((2758, 2795), 'contextlib.suppress', 'contextlib.suppress', (['discord.NotFound'], {}), '(discord.NotFound)\n', (2777, 2795), False, 'import context...
import unittest from spydrnet.ir import FirstClassElement from spydrnet.ir import Pin class TestPin(unittest.TestCase): def setUp(self): self.pin = Pin()
[ "spydrnet.ir.Pin" ]
[((163, 168), 'spydrnet.ir.Pin', 'Pin', ([], {}), '()\n', (166, 168), False, 'from spydrnet.ir import Pin\n')]
import json def load(): with open("data.json", "r") as f: return json.load(f) def update(obj): with open("data.json", "w") as f: json.dump(obj, f, ensure_ascii=False) def loadCorpus(): with open("corpus.json", "r", encoding="utf-8") as f: return json.load(f) def updateCorpus(obj): with open("corpus.json",...
[ "json.load", "json.dump" ]
[((69, 81), 'json.load', 'json.load', (['f'], {}), '(f)\n', (78, 81), False, 'import json\n'), ((137, 174), 'json.dump', 'json.dump', (['obj', 'f'], {'ensure_ascii': '(False)'}), '(obj, f, ensure_ascii=False)\n', (146, 174), False, 'import json\n'), ((258, 270), 'json.load', 'json.load', (['f'], {}), '(f)\n', (267, 270...
"""Models for ``HGMD`` annotation in VarFish. At the moment (and for the forseeable future), only the ``HGMD_PUBLIC`` dump from ENSEMBL can be imported. """ from django.db import models from postgres_copy import CopyManager class HgmdPublicLocus(models.Model): """Representation of an interval on the genome that...
[ "django.db.models.Index", "postgres_copy.CopyManager", "django.db.models.CharField", "django.db.models.IntegerField" ]
[((483, 514), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(32)'}), '(max_length=32)\n', (499, 514), False, 'from django.db import models\n'), ((571, 602), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(32)'}), '(max_length=32)\n', (587, 602), False, 'from django.db im...
# This file is a part of Arjuna # Copyright 2015-2021 <NAME> # Website: www.RahulVerma.net # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # U...
[ "arjuna.core.poller.conditions.CommandCondition", "arjuna.core.poller.caller.DynamicCaller" ]
[((878, 915), 'arjuna.core.poller.caller.DynamicCaller', 'DynamicCaller', (['self.__mailbox._select'], {}), '(self.__mailbox._select)\n', (891, 915), False, 'from arjuna.core.poller.caller import DynamicCaller\n'), ((953, 977), 'arjuna.core.poller.conditions.CommandCondition', 'CommandCondition', (['caller'], {}), '(ca...
# Copyright 2020 Lorna Authors. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
[ "torchvision.ops.boxes.nms", "torch.isfinite", "torch.tensor" ]
[((3094, 3149), 'torchvision.ops.boxes.nms', 'torchvision.ops.boxes.nms', (['boxes', 'scores', 'iou_threshold'], {}), '(boxes, scores, iou_threshold)\n', (3119, 3149), False, 'import torchvision\n'), ((3463, 3518), 'torchvision.ops.boxes.nms', 'torchvision.ops.boxes.nms', (['boxes', 'scores', 'iou_threshold'], {}), '(b...
from .base import BaseType from typing import ( List, Dict ) from feeds.external_api.workspace import ( validate_narrative_id, get_narrative_name, get_narrative_names ) from feeds.exceptions import ( EntityNameError, WorkspaceError ) class NarrativeType(BaseType): @staticmethod def...
[ "feeds.external_api.workspace.get_narrative_name", "feeds.external_api.workspace.validate_narrative_id", "feeds.exceptions.EntityNameError", "feeds.external_api.workspace.get_narrative_names" ]
[((398, 426), 'feeds.external_api.workspace.get_narrative_name', 'get_narrative_name', (['i', 'token'], {}), '(i, token)\n', (416, 426), False, 'from feeds.external_api.workspace import validate_narrative_id, get_narrative_name, get_narrative_names\n'), ((808, 839), 'feeds.external_api.workspace.get_narrative_names', '...
from inspect import getfullargspec from typing import Union, List, Optional import operator from collections import namedtuple Patch = namedtuple('Patch', ['var']) match_err = object() class Pattern: def match(self, expr): raise NotImplemented def __repr__(self): return self.__str__() cl...
[ "collections.namedtuple", "inspect.getfullargspec" ]
[((136, 164), 'collections.namedtuple', 'namedtuple', (['"""Patch"""', "['var']"], {}), "('Patch', ['var'])\n", (146, 164), False, 'from collections import namedtuple\n'), ((7333, 7353), 'inspect.getfullargspec', 'getfullargspec', (['expr'], {}), '(expr)\n', (7347, 7353), False, 'from inspect import getfullargspec\n')]
import logging from ledfxcontroller.devices import Device import voluptuous as vol import numpy as np import sacn import time _LOGGER = logging.getLogger(__name__) class E131Device(Device): """E1.31 device support""" CONFIG_SCHEMA = vol.Schema({ vol.Required('host'): str, vol.Required('univer...
[ "logging.getLogger", "voluptuous.Required", "sacn.sACNsender", "voluptuous.Any", "time.sleep", "numpy.array", "numpy.zeros", "voluptuous.Coerce" ]
[((137, 164), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (154, 164), False, 'import logging\n'), ((1495, 1512), 'sacn.sACNsender', 'sacn.sACNsender', ([], {}), '()\n', (1510, 1512), False, 'import sacn\n'), ((2564, 2579), 'time.sleep', 'time.sleep', (['(1.5)'], {}), '(1.5)\n', (2574, ...
# # Provides shared utils used by other python modules # import io import os import tarfile import tempfile from configparser import ConfigParser from contextlib import ExitStack, contextmanager, redirect_stderr, redirect_stdout from typing import Callable, Iterator, List, Optional, Union import yaml # this is test...
[ "contextlib.redirect_stdout", "tempfile.TemporaryDirectory", "tarfile.open", "configparser.ConfigParser", "yaml.dump", "os.path.join", "contextlib.redirect_stderr", "contextlib.ExitStack", "io.StringIO" ]
[((661, 675), 'configparser.ConfigParser', 'ConfigParser', ([], {}), '()\n', (673, 675), False, 'from configparser import ConfigParser\n'), ((793, 822), 'tempfile.TemporaryDirectory', 'tempfile.TemporaryDirectory', ([], {}), '()\n', (820, 822), False, 'import tempfile\n'), ((850, 885), 'os.path.join', 'os.path.join', (...
import argparse import time import warnings import numpy as np import torch from torch import optim from torch.autograd import Variable import config warnings.filterwarnings("ignore") device = torch.device('cuda') class sigmoid(torch.nn.Module): def __init__(self, W): super(sigmoid, self).__init__() ...
[ "torch.optim.SGD", "argparse.ArgumentParser", "torch.mean", "torch.stack", "torch.sigmoid", "torch.from_numpy", "torch.tensor", "torch.nn.BCELoss", "torch.matmul", "torch.autograd.Variable", "time.time", "warnings.filterwarnings", "torch.device" ]
[((153, 186), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (176, 186), False, 'import warnings\n'), ((197, 217), 'torch.device', 'torch.device', (['"""cuda"""'], {}), "('cuda')\n", (209, 217), False, 'import torch\n'), ((1498, 1525), 'torch.optim.SGD', 'optim.SGD', (['[m...
# coding: utf-8 """ IBM Application Gateway Configuration Specification (OpenAPI) No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: 21.12 Generated by: https://openapi-generator.tech """ impo...
[ "six.iteritems" ]
[((6774, 6807), 'six.iteritems', 'six.iteritems', (['self.openapi_types'], {}), '(self.openapi_types)\n', (6787, 6807), False, 'import six\n')]
import numpy as np from scipy.stats import skew, kurtosis __all__ = ['sky_noise_error', 'propagate_noise_error', 'mcnoise'] def sky_noise_error(nu_obs, nu_emit, nu_ch_bw, tint, a_eff, n_station, bmax): """Calculate instrument noise error of an interferometer. This assume that Tsys is dominated by Tsky. ...
[ "numpy.random.normal", "numpy.mean", "numpy.sqrt", "scipy.stats.kurtosis", "numpy.asarray", "scipy.stats.skew", "numpy.std", "numpy.var" ]
[((1127, 1145), 'numpy.asarray', 'np.asarray', (['nu_obs'], {}), '(nu_obs)\n', (1137, 1145), True, 'import numpy as np\n'), ((3402, 3434), 'numpy.var', 'np.var', (['(data + noise_arr)'], {'axis': '(1)'}), '(data + noise_arr, axis=1)\n', (3408, 3434), True, 'import numpy as np\n'), ((3453, 3483), 'scipy.stats.skew', 'sk...
from . import common as cm import logging logger = logging.getLogger(__name__) class CustomSyncReturnValue(cm.SyncReturnValue): def __init__(self, callback, parameters): member_operations = [adw_op for adw_op in parameters if adw_op['xsi_type'] == 'MutateMembersOperation'] regular_operations = [a...
[ "logging.getLogger" ]
[((52, 79), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (69, 79), False, 'import logging\n')]
import ephem import math import logging def get_is_daylight(position, utc_datetime_string): location = ephem.Observer() location.lat = str(position[0]) location.lon = str(position[1]) location.date = utc_datetime_string.replace('T', ' ').replace('Z', '') sun = ephem.Sun() sunset = ephem.localtime(location...
[ "logging.getLogger", "ephem.Observer", "ephem.Sun", "math.radians", "ephem.Moon" ]
[((106, 122), 'ephem.Observer', 'ephem.Observer', ([], {}), '()\n', (120, 122), False, 'import ephem\n'), ((273, 284), 'ephem.Sun', 'ephem.Sun', ([], {}), '()\n', (282, 284), False, 'import ephem\n'), ((471, 487), 'ephem.Observer', 'ephem.Observer', ([], {}), '()\n', (485, 487), False, 'import ephem\n'), ((565, 576), '...
# Copyright(c) <NAME> 2009 <EMAIL> # http://vosolok2008.narod.ru # BSD license __version__ = "0.2" __versionTime__ = "2013-01-22" __author__ = "<NAME> <<EMAIL>>" __doc__ = """ pybass_tta.py - is ctypes python module for BASS_TTA - extension to the BASS audio library that enables the playback of The True Audio streams....
[ "scribepy.pybass.pybass.BASS_Init", "ctypes.POINTER", "scribepy.pybass.pybass.BASS_ErrorGetCode", "scribepy.pybass.pybass.play_handle", "pathlib.Path", "ctypes.WinDLL", "platform.system", "scribepy.pybass.pybass.BASS_Free", "ctypes.CDLL" ]
[((432, 446), 'pathlib.Path', 'Path', (['__file__'], {}), '(__file__)\n', (436, 446), False, 'from pathlib import Path\n'), ((606, 631), 'ctypes.WinDLL', 'ctypes.WinDLL', (['"""bass_tta"""'], {}), "('bass_tta')\n", (619, 631), False, 'import sys, ctypes, platform\n'), ((695, 757), 'ctypes.CDLL', 'ctypes.CDLL', (['f"""{...
import pandas as pd import matplotlib.pyplot as plt from PPImage import PPImage import numpy as np from PIL import Image import os import config def plot_df_count(df, column='diagnosis'): df_plot = df[column].value_counts().sort_index() print(df_plot) df_plot.plot.bar(df_plot) plt.show() def preproces...
[ "PIL.Image.fromarray", "os.listdir", "os.makedirs", "pandas.read_csv", "PPImage.PPImage", "numpy.array", "numpy.sum", "pandas.DataFrame", "matplotlib.pyplot.show" ]
[((1692, 1720), 'PPImage.PPImage', 'PPImage', (['config.TARGET_IMAGE'], {}), '(config.TARGET_IMAGE)\n', (1699, 1720), False, 'from PPImage import PPImage\n'), ((1731, 1759), 'pandas.read_csv', 'pd.read_csv', (['config.CSV_PATH'], {}), '(config.CSV_PATH)\n', (1742, 1759), True, 'import pandas as pd\n'), ((1760, 1810), '...
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages import ictdeploy setup( name='ictdeploy', version=ictdeploy.__version__, packages=find_packages(), author="<NAME>", author_email="<EMAIL>", description="Multiple containers deployment with specific...
[ "setuptools.find_packages" ]
[((190, 205), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (203, 205), False, 'from setuptools import setup, find_packages\n')]
from multiprocessing.connection import Client import argparse import hashlib from family_resemblance_tagger.common import config def prepare_message(path): checksum = hashlib.md5() for line in open(path, "rb"): checksum.update(line) checksum = checksum.hexdigest() msg = {"checksum" : checksum, "filepath" : pat...
[ "hashlib.md5", "argparse.ArgumentParser", "multiprocessing.connection.Client" ]
[((169, 182), 'hashlib.md5', 'hashlib.md5', ([], {}), '()\n', (180, 182), False, 'import hashlib\n'), ((757, 833), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Add file/folder to queue for tagging)"""'}), "(description='Add file/folder to queue for tagging)')\n", (780, 833), False, 'im...
""" Utilities to extract information from scraped GM fixtures and standings pages. """ import collections import csv from pathlib import Path from typing import Dict, Generator, List, Type from unicorner import SeasonParse from unicorner.dtos import DtoMixin, FranchiseDto, GameDto, SeasonDto, TeamDto from unicorner.en...
[ "unicorner.dtos.TeamDto", "csv.DictReader", "unicorner.dtos.FranchiseDto", "unicorner.env.get_logger", "unicorner.dtos.GameDto", "unicorner.SeasonParse", "collections.defaultdict", "unicorner.env.UnicornerEnv", "unicorner.dtos.SeasonDto" ]
[((361, 381), 'unicorner.env.get_logger', 'get_logger', (['__name__'], {}), '(__name__)\n', (371, 381), False, 'from unicorner.env import UnicornerEnv, get_logger\n'), ((2094, 2123), 'collections.defaultdict', 'collections.defaultdict', (['list'], {}), '(list)\n', (2117, 2123), False, 'import collections\n'), ((3832, 3...
from torch import optim from torch import nn from lib.dataload import load_dir, dataloader, write_labels from lib.improc import group_transform from lib.deeplearn import init_model, classifier, train_deep, validation, test_network from lib.checkpoint import save_checkpoint, load_checkpoint from lib.get_args import ge...
[ "lib.dataload.load_dir", "lib.deeplearn.test_network", "lib.checkpoint.load_checkpoint", "lib.deeplearn.init_model", "lib.dataload.dataloader", "lib.checkpoint.save_checkpoint", "lib.deeplearn.train_deep", "torch.nn.NLLLoss", "lib.improc.group_transform", "lib.get_args.get_train_args" ]
[((394, 410), 'lib.get_args.get_train_args', 'get_train_args', ([], {}), '()\n', (408, 410), False, 'from lib.get_args import get_train_args\n'), ((453, 470), 'lib.improc.group_transform', 'group_transform', ([], {}), '()\n', (468, 470), False, 'from lib.improc import group_transform\n'), ((508, 529), 'lib.dataload.loa...
#!/usr/bin/env python3 import sys, os import re, struct from argparse import ArgumentParser, FileType, Namespace """ ======================== CONSTANTS ======================== """ SUPPORTED_ROM = { "cm": "cm.mk", "lineageos": "lineage.mk", "mokee": "mk___DEVICE__.mk", "omnirom": "omni___DEVICE__.mk"...
[ "argparse.FileType", "argparse.ArgumentParser", "struct.pack", "sys.stderr.write", "argparse.Namespace" ]
[((1270, 1388), 'argparse.Namespace', 'Namespace', ([], {'metadata': '""""""', 'kernel': "b''", 'ramdisk': "b''", 'second': "b''", 'dtimg': "b''", 'kerneldt': "b''", 'unknown': "b''", 'image_format': '{}'}), "(metadata='', kernel=b'', ramdisk=b'', second=b'', dtimg=b'',\n kerneldt=b'', unknown=b'', image_format={})\...
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ "flask.request.args.get", "services.datacommons.fetch_data", "services.datacommons.query", "json.dumps", "cache.cache.memoize", "services.datacommons.get_pop_obs", "services.datacommons.get_property_labels", "flask.Blueprint", "cache.cache.cached", "services.datacommons.get_triples" ]
[((801, 868), 'flask.Blueprint', 'flask.Blueprint', (['"""api.browser"""', '__name__'], {'url_prefix': '"""/api/browser"""'}), "('api.browser', __name__, url_prefix='/api/browser')\n", (816, 868), False, 'import flask\n'), ((872, 904), 'cache.cache.memoize', 'cache.memoize', ([], {'timeout': '(3600 * 24)'}), '(timeout=...
import networkx as nx def parseData(path): file = open(path) data = [] line = file.readline() while line: data.append(line) line = file.readline() file.close() return data def raws_to_tuple(raws): tuples = [] for r in raws: tuples.append((int(r.split()[0]), in...
[ "networkx.Graph" ]
[((638, 648), 'networkx.Graph', 'nx.Graph', ([], {}), '()\n', (646, 648), True, 'import networkx as nx\n')]
from datetime import datetime, timezone import json import falcon from sikr import settings class APIInfo(object): """Show the main information about the API like endpoints, version, etc. """ def on_get(self, req, res): payload = { "version": { "api_version": settin...
[ "json.dumps", "datetime.datetime.utcnow" ]
[((647, 666), 'json.dumps', 'json.dumps', (['payload'], {}), '(payload)\n', (657, 666), False, 'import json\n'), ((532, 549), 'datetime.datetime.utcnow', 'datetime.utcnow', ([], {}), '()\n', (547, 549), False, 'from datetime import datetime, timezone\n')]
# File name: main.py # Author: <NAME> # Date created: 7/6/2021 # Date last modified: 7/6/2021 import json import os,sys def clean(data): if isinstance(data, str): return data.replace('\n', ' ').replace('\t', ' ').replace('\r', ' ').replace('"', ' ').replace('\\', '\\\\').replace("u'","'").replac...
[ "json.loads", "sys.exit" ]
[((2590, 2604), 'json.loads', 'json.loads', (['rf'], {}), '(rf)\n', (2600, 2604), False, 'import json\n'), ((2657, 2668), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (2665, 2668), False, 'import os, sys\n')]
""" AN4 dataset handler """ import os import subprocess import utils from corpus import Corpus class AN4(Corpus): DATASET_URLS = { "train": ["http://www.speech.cs.cmu.edu/databases/an4/an4_raw.bigendian.tar.gz"], "test": ["http://www.speech.cs.cmu.edu/databases/an4/an4_raw.bigendian.tar.gz"] ...
[ "os.path.abspath", "os.path.join", "subprocess.call" ]
[((912, 944), 'subprocess.call', 'subprocess.call', (['cmd'], {'shell': '(True)'}), '(cmd, shell=True)\n', (927, 944), False, 'import subprocess\n'), ((1118, 1147), 'os.path.join', 'os.path.join', (['root_dir', '"""an4"""'], {}), "(root_dir, 'an4')\n", (1130, 1147), False, 'import os\n'), ((1167, 1196), 'os.path.join',...
#!/usr/bin/env python from setuptools import setup, find_packages try: README = open('README.rst').read() except: README = None try: REQUIREMENTS = open('requirements.txt').read() except: REQUIREMENTS = None setup( name='django-vspace-utils', version="0.1", description='Miscelleneous Dja...
[ "setuptools.find_packages" ]
[((564, 579), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (577, 579), False, 'from setuptools import setup, find_packages\n')]
from os import path from queue import Queue from sys import stderr from threading import Thread from time import sleep from typing import Callable, List, NamedTuple, Optional, Sequence, Text from psutil import AccessDenied, NoSuchProcess, Popen, Process from psutil._pslinux import popenfile from .progress import Outp...
[ "os.path.getsize", "psutil.Process", "psutil.Popen", "time.sleep", "sys.stderr.write", "threading.Thread", "queue.Queue" ]
[((1653, 1660), 'queue.Queue', 'Queue', ([], {}), '()\n', (1658, 1660), False, 'from queue import Queue\n'), ((1691, 1724), 'threading.Thread', 'Thread', ([], {'target': 'self.watch_process'}), '(target=self.watch_process)\n', (1697, 1724), False, 'from threading import Thread\n'), ((1753, 1816), 'threading.Thread', 'T...
""" Copyright (c) 2020, salesforce.com, inc. All rights reserved. SPDX-License-Identifier: BSD-3-Clause For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause """ from __future__ import absolute_import from __future__ import division from __future__ import unico...
[ "moz_sp.utils.is_subquery", "collections.defaultdict" ]
[((4267, 4296), 'collections.defaultdict', 'collections.defaultdict', (['list'], {}), '(list)\n', (4290, 4296), False, 'import collections\n'), ((6892, 6921), 'collections.defaultdict', 'collections.defaultdict', (['list'], {}), '(list)\n', (6915, 6921), False, 'import collections\n'), ((672, 692), 'moz_sp.utils.is_sub...
# Copyright 2020,2021 Sony Corporation. # Copyright 2021 Sony Group Corporation. # # 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 ...
[ "nnabla.parametric_functions.affine", "nnabla.functions.concatenate", "nnabla.parameter_scope", "nnabla.functions.tanh", "nnabla.functions.relu" ]
[((1306, 1341), 'nnabla.parameter_scope', 'nn.parameter_scope', (['self.scope_name'], {}), '(self.scope_name)\n', (1324, 1341), True, 'import nnabla as nn\n'), ((1359, 1379), 'nnabla.functions.concatenate', 'NF.concatenate', (['s', 'a'], {}), '(s, a)\n', (1373, 1379), True, 'import nnabla.functions as NF\n'), ((1396, 1...
# pylint: disable=unused-variable,expression-not-assigned,singleton-comparison from memegen import factory, settings def describe_create_app(): def when_dev(expect): app = factory.create_app(settings.LocalConfig) expect(app.config['DEBUG']) == True expect(app.config['TESTING']) == False...
[ "memegen.factory.create_app" ]
[((189, 229), 'memegen.factory.create_app', 'factory.create_app', (['settings.LocalConfig'], {}), '(settings.LocalConfig)\n', (207, 229), False, 'from memegen import factory, settings\n'), ((363, 402), 'memegen.factory.create_app', 'factory.create_app', (['settings.TestConfig'], {}), '(settings.TestConfig)\n', (381, 40...
from flask_login import current_user from depc.controllers.teams import TeamController class TeamPermission: @classmethod def _get_team(cls, team_id): obj = TeamController._get(filters={"Team": {"id": team_id}}) # Add the members of the team team = TeamController.resource_to_dict(obj...
[ "depc.controllers.teams.TeamController.resource_to_dict", "depc.controllers.teams.TeamController._get" ]
[((176, 230), 'depc.controllers.teams.TeamController._get', 'TeamController._get', ([], {'filters': "{'Team': {'id': team_id}}"}), "(filters={'Team': {'id': team_id}})\n", (195, 230), False, 'from depc.controllers.teams import TeamController\n'), ((285, 321), 'depc.controllers.teams.TeamController.resource_to_dict', 'T...
import pandas as pd from modules import tqdm import argparse import codecs import os def conll2003_preprocess( data_dir, train_name="eng.train", dev_name="eng.testa", test_name="eng.testb"): train_f = read_data(os.path.join(data_dir, train_name)) dev_f = read_data(os.path.join(data_dir, dev_name)) ...
[ "pandas.DataFrame", "os.path.join", "argparse.ArgumentParser" ]
[((388, 474), 'pandas.DataFrame', 'pd.DataFrame', (["{'labels': [x[0] for x in train_f], 'text': [x[1] for x in train_f]}"], {}), "({'labels': [x[0] for x in train_f], 'text': [x[1] for x in\n train_f]})\n", (400, 474), True, 'import pandas as pd\n'), ((682, 760), 'pandas.DataFrame', 'pd.DataFrame', (["{'labels': [x...
import sys import numpy as np import argparse from PIL import Image def find_message(img_path): input_img = Image.open(img_path) pixels = np.array(input_img) colors = pixels.flatten() message = "" character_byte = 0x00 for i, color in enumerate(colors): if i % 8 == 0 and i != 0: ...
[ "numpy.array", "PIL.Image.open", "argparse.ArgumentParser" ]
[((114, 134), 'PIL.Image.open', 'Image.open', (['img_path'], {}), '(img_path)\n', (124, 134), False, 'from PIL import Image\n'), ((148, 167), 'numpy.array', 'np.array', (['input_img'], {}), '(input_img)\n', (156, 167), True, 'import numpy as np\n'), ((1091, 1177), 'argparse.ArgumentParser', 'argparse.ArgumentParser', (...
from datetime import datetime, date, time from typing import Callable from nuclear.parser.error import CliSyntaxError def datetime_format(*formats: str) -> Callable[[str], datetime]: """format: %Y-%m-%d %H:%M:%S""" def parser(arg: str): return _parse_date_formats(arg, *formats) return parser ...
[ "datetime.datetime.strptime", "datetime.datetime.now", "datetime.datetime.combine", "nuclear.parser.error.CliSyntaxError" ]
[((1051, 1098), 'nuclear.parser.error.CliSyntaxError', 'CliSyntaxError', (["('invalid datetime format: ' + s)"], {}), "('invalid datetime format: ' + s)\n", (1065, 1098), False, 'from nuclear.parser.error import CliSyntaxError\n'), ((1155, 1188), 'datetime.datetime.strptime', 'datetime.strptime', (['s', 'time_format'],...
# Generated by Django 2.2.6 on 2019-12-03 15:06 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('foundation', '0002_auto_20191202_2045'), ] operations = [ migrations.CreateModel( name='LLIStudentData', fields=[ ...
[ "django.db.models.EmailField", "django.db.models.DateField", "django.db.models.TextField", "django.db.models.AutoField", "django.db.models.PositiveSmallIntegerField", "django.db.models.CharField" ]
[((1690, 1820), 'django.db.models.TextField', 'models.TextField', ([], {'blank': '(True)', 'help_text': '"""The description content of this upload."""', 'null': '(True)', 'verbose_name': '"""Description"""'}), "(blank=True, help_text=\n 'The description content of this upload.', null=True, verbose_name=\n 'Descri...
import turtle def rectangle(horizontal, vertical, color): turtle.pendown() turtle.pensize(1) turtle.color(color) turtle.begin_fill() for counter in range(1, 3): turtle.forward(horizontal) turtle.right(90) turtle.forward(vertical) turtle.right(90) turtle.end_fill(...
[ "turtle.begin_fill", "turtle.pendown", "turtle.penup", "turtle.color", "turtle.forward", "turtle.bgcolor", "turtle.speed", "turtle.right", "turtle.goto", "turtle.end_fill", "turtle.pensize", "turtle.hideturtle" ]
[((342, 356), 'turtle.penup', 'turtle.penup', ([], {}), '()\n', (354, 356), False, 'import turtle\n'), ((357, 377), 'turtle.speed', 'turtle.speed', (['"""slow"""'], {}), "('slow')\n", (369, 377), False, 'import turtle\n'), ((378, 407), 'turtle.bgcolor', 'turtle.bgcolor', (['"""Dodger blue"""'], {}), "('Dodger blue')\n"...
""" Dataclass mixin. """ from __future__ import annotations from dataclasses import Field from dataclasses import asdict as dataclass_asdict from dataclasses import dataclass from dataclasses import fields as dataclass_fields from dataclasses import make_dataclass from typing import Any, Mapping, Optional, Sequence, T...
[ "dataclasses.fields", "dataclasses.dataclass", "dataclasses.asdict" ]
[((334, 356), 'dataclasses.dataclass', 'dataclass', ([], {'frozen': '(True)'}), '(frozen=True)\n', (343, 356), False, 'from dataclasses import dataclass\n'), ((1006, 1028), 'dataclasses.asdict', 'dataclass_asdict', (['self'], {}), '(self)\n', (1022, 1028), True, 'from dataclasses import asdict as dataclass_asdict\n'), ...
# -*- coding: utf-8 -*- import functools import inspect import os import sys from types import MethodType from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Type, Union import six from brewtils.choices import process_choices from brewtils.display import resolve_form, resolve_schema, resolve_tem...
[ "brewtils.choices.process_choices", "inspect.ismethod", "brewtils.display.resolve_form", "brewtils.display.resolve_template", "inspect.signature", "inspect.getfile", "functools.partial", "brewtils.models.Parameter", "brewtils.errors.PluginParamError", "inspect.isfunction", "brewtils.errors._depr...
[((4767, 4983), 'brewtils.models.Command', 'Command', ([], {'description': 'description', 'parameters': 'parameters', 'command_type': 'command_type', 'output_type': 'output_type', 'schema': 'schema', 'form': 'form', 'template': 'template', 'icon_name': 'icon_name', 'hidden': 'hidden', 'metadata': 'metadata'}), '(descri...
import h5py import numpy as np import include.diag as diag import matplotlib.pyplot as plt import matplotlib matplotlib.use('TkAgg') def angular_derivative(array, wvn): return np.fft.ifft(1j * wvn * np.fft.fft(array)) quench_rates = [100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850...
[ "numpy.sqrt", "matplotlib.pyplot.ylabel", "matplotlib.use", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "numpy.fft.fft", "h5py.File", "numpy.real", "include.diag.calculate_spin", "numpy.arange", "matplotlib.pyplot.show" ]
[((109, 132), 'matplotlib.use', 'matplotlib.use', (['"""TkAgg"""'], {}), "('TkAgg')\n", (123, 132), False, 'import matplotlib\n'), ((1740, 1787), 'matplotlib.pyplot.plot', 'plt.plot', (['quench_rates', 'spin_winding_list', '"""ko"""'], {}), "(quench_rates, spin_winding_list, 'ko')\n", (1748, 1787), True, 'import matplo...
try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst', 'r') as f: long_description = f.read() setup(name='PyGnuplot', py_modules=['PyGnuplot'], version='0.11.16', license='MIT', description='Python Gnuplot wrapper', long...
[ "distutils.core.setup" ]
[((164, 762), 'distutils.core.setup', 'setup', ([], {'name': '"""PyGnuplot"""', 'py_modules': "['PyGnuplot']", 'version': '"""0.11.16"""', 'license': '"""MIT"""', 'description': '"""Python Gnuplot wrapper"""', 'long_description': 'long_description', 'author': '"""<NAME>"""', 'author_email': '""" """', 'url': '"""https:...
""" Django settings for sporttech project. Generated by 'django-admin startproject' using Django 2.0.8. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ # Build pa...
[ "os.path.abspath", "os.path.dirname", "datetime.timedelta", "os.path.join" ]
[((506, 534), 'os.path.dirname', 'os.path.dirname', (['PROJECT_DIR'], {}), '(PROJECT_DIR)\n', (521, 534), False, 'import os\n'), ((550, 607), 'os.path.join', 'os.path.join', (['PROJECT_DIR', '"""settings"""', '"""site_config.json"""'], {}), "(PROJECT_DIR, 'settings', 'site_config.json')\n", (562, 607), False, 'import o...
# -*- coding: utf-8 -*- """ Created on Tue Jun 3 15:55:18 2014 @author: leo """ import numpy as np import matplotlib.pyplot as plt # Macros pi = np.pi; exp = np.exp; arange = np.arange; zeros = np.zeros indexed = lambda l, offset=0: zip(np.arange(len(l))+offset,l) # Constantes w = 2.0*pi*0.25 a0 = 6.0/4.0 # Funções ...
[ "numpy.abs", "matplotlib.pyplot.grid", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.figure", "matplotlib.pyplot.title", "matplotlib.pyplot.xlim", "matplotlib.pyplot.legend" ]
[((998, 1010), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (1008, 1010), True, 'import matplotlib.pyplot as plt\n'), ((1141, 1158), 'matplotlib.pyplot.xlim', 'plt.xlim', (['(-11)', '(11)'], {}), '(-11, 11)\n', (1149, 1158), True, 'import matplotlib.pyplot as plt\n'), ((1159, 1173), 'matplotlib.pyplot.gr...
#Blink led example. 02/10/2018 #import libraries import RPi.GPIO as GPIO from time import sleep # To use the GPIO pins two different numerations can be used: board(with the numerical position for each pin), # and BCM, the special numeration of broadcom. But this last form is not the same for every raspberry model GPIO...
[ "RPi.GPIO.cleanup", "RPi.GPIO.setup", "RPi.GPIO.output", "time.sleep", "RPi.GPIO.setmode" ]
[((316, 340), 'RPi.GPIO.setmode', 'GPIO.setmode', (['GPIO.BOARD'], {}), '(GPIO.BOARD)\n', (328, 340), True, 'import RPi.GPIO as GPIO\n'), ((395, 436), 'RPi.GPIO.setup', 'GPIO.setup', (['(3)', 'GPIO.OUT'], {'initial': 'GPIO.LOW'}), '(3, GPIO.OUT, initial=GPIO.LOW)\n', (405, 436), True, 'import RPi.GPIO as GPIO\n'), ((47...
import unittest from docxpy import DOCReader class Test(unittest.TestCase): def setUp(self): self.file = DOCReader('Hello.docx') self.file.process() def test_file_data(self): self.assertIsInstance(self.file.data, dict) self.assertTrue('header' in self.file.data) self.a...
[ "unittest.main", "docxpy.DOCReader" ]
[((766, 781), 'unittest.main', 'unittest.main', ([], {}), '()\n', (779, 781), False, 'import unittest\n'), ((119, 142), 'docxpy.DOCReader', 'DOCReader', (['"""Hello.docx"""'], {}), "('Hello.docx')\n", (128, 142), False, 'from docxpy import DOCReader\n')]
"""Holonomic Functions and Differential Operators""" from __future__ import print_function, division from sympy import symbols, Symbol, diff, S, Dummy, Order, rf, meijerint from sympy.printing import sstr from .linearsolver import NewMatrix from .recurrence import HolonomicSequence, RecurrenceOperator, RecurrenceOper...
[ "sympy.functions.special.hyper.meijerg", "sympy.functions.combinatorial.factorials.binomial", "sympy.meijerint._rewrite1", "sympy.core.sympify.sympify", "sympy.core.compatibility.range", "sympy.rf", "sympy.functions.combinatorial.factorials.factorial", "sympy.S", "sympy.symbols", "sympy.Order", ...
[((10932, 10962), 'sympy.polys.domains.ZZ.old_poly_ring', 'ZZ.old_poly_ring', (['base.gens[0]'], {}), '(base.gens[0])\n', (10948, 10962), False, 'from sympy.polys.domains import QQ, ZZ\n'), ((36433, 36450), 'sympy.simplify.hyperexpand.hyperexpand', 'hyperexpand', (['func'], {}), '(func)\n', (36444, 36450), False, 'from...
# -*- coding:utf-8 -*- # # cluster.py """Cluster module.""" import networkx as nx import numpy as np import pandas as pd from .utils import flatten_dict from .utils import get_within_cutoff_matrix from .utils import pairwise_distances class Cluster: """Object to store and compute data about an individual parti...
[ "numpy.abs", "numpy.mean", "numpy.allclose", "numpy.linalg.eig", "numpy.ones", "numpy.where", "numpy.sort", "numpy.linalg.norm", "numpy.any", "numpy.sum", "numpy.isnan", "networkx.minimum_node_cut", "pandas.DataFrame", "numpy.all", "numpy.imag", "networkx.dfs_edges" ]
[((17203, 17227), 'networkx.dfs_edges', 'nx.dfs_edges', (['self.graph'], {}), '(self.graph)\n', (17215, 17227), True, 'import networkx as nx\n'), ((18066, 18120), 'numpy.all', 'np.all', (['(unwrapped_x_df.index == self.particle_df.index)'], {}), '(unwrapped_x_df.index == self.particle_df.index)\n', (18072, 18120), True...
import pytest from poetry.packages import Locker as BaseLocker from poetry.utils._compat import Path from poetry.utils.exporter import Exporter class Locker(BaseLocker): def __init__(self): self._locked = True self._content_hash = self._get_content_hash() def locked(self, is_locked=True): ...
[ "pytest.fixture", "poetry.utils.exporter.Exporter", "poetry.utils._compat.Path" ]
[((603, 619), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (617, 619), False, 'import pytest\n'), ((1497, 1513), 'poetry.utils.exporter.Exporter', 'Exporter', (['locker'], {}), '(locker)\n', (1505, 1513), False, 'from poetry.utils.exporter import Exporter\n'), ((2626, 2642), 'poetry.utils.exporter.Exporter', '...
import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt import numpy as np import gizmo_analysis as ga import utilities as ga_ut import sys FIRE_elements = ['h','he','c','n','o','ne','mg','si','s','ca','fe'] FIRE_metals = ['c','n','o','ne','mg','si','s','ca','fe'] # # wrapper to load data set a...
[ "numpy.histogram", "numpy.log10", "matplotlib.use", "numpy.size", "gizmo_analysis.agetracers.construct_yield_table", "gizmo_analysis.io.Read.read_snapshots", "numpy.max", "numpy.sum", "numpy.cumsum", "numpy.min", "numpy.percentile", "gizmo_analysis.agetracers.FIRE2_yields", "numpy.genfromtxt...
[((18, 39), 'matplotlib.use', 'matplotlib.use', (['"""agg"""'], {}), "('agg')\n", (32, 39), False, 'import matplotlib\n'), ((642, 715), 'gizmo_analysis.io.Read.read_snapshots', 'ga.io.Read.read_snapshots', (["['gas']", '"""index"""', '(0)'], {'simulation_directory': 'wdir'}), "(['gas'], 'index', 0, simulation_directory...
import numpy as np import re def part1(data): num_valid = 0 for line in data.split('\n'): match = re.match(r'(\d+)-(\d+) ([a-zA-Z]): ([a-zA-Z]+)', line) if not match: continue min_entries, max_entries, entry, password = match.groups() if password.count(entry) in ran...
[ "re.match" ]
[((116, 171), 're.match', 're.match', (['"""(\\\\d+)-(\\\\d+) ([a-zA-Z]): ([a-zA-Z]+)"""', 'line'], {}), "('(\\\\d+)-(\\\\d+) ([a-zA-Z]): ([a-zA-Z]+)', line)\n", (124, 171), False, 'import re\n'), ((499, 554), 're.match', 're.match', (['"""(\\\\d+)-(\\\\d+) ([a-zA-Z]): ([a-zA-Z]+)"""', 'line'], {}), "('(\\\\d+)-(\\\\d+...
import unittest import numpy as np from src.classical_processing.pre_processing import compute_sigma from src.tests.test_data_sets import ExampleDataSetRef19, ExampleDataSetMain class ComputeSigmaTestCase(unittest.TestCase): def test_with_data_set_main(self): self.skipTest("error unitary operation compu...
[ "numpy.trace", "src.tests.test_data_sets.ExampleDataSetRef19", "src.tests.test_data_sets.ExampleDataSetMain", "unittest.main", "src.classical_processing.pre_processing.compute_sigma" ]
[((1202, 1217), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1215, 1217), False, 'import unittest\n'), ((349, 369), 'src.tests.test_data_sets.ExampleDataSetMain', 'ExampleDataSetMain', ([], {}), '()\n', (367, 369), False, 'from src.tests.test_data_sets import ExampleDataSetRef19, ExampleDataSetMain\n'), ((484, ...
import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data import argparse import numpy as np IMAGE_SIZE = 28 LABELS_SIZE = 10 HIDDEN_SIZE = 2048 INPUT_FEATURE = 'image' def raw_input_fn(dataset): return dataset.images, dataset.labels.astype(np.int32) def serve_input_fn(): reciever_te...
[ "tensorflow.image.resize_images", "tensorflow.estimator.RunConfig", "argparse.ArgumentParser", "tensorflow.placeholder", "tensorflow.logging.set_verbosity", "tensorflow.feature_column.numeric_column", "tensorflow.examples.tutorials.mnist.input_data.read_data_sets", "tensorflow.estimator.export.Serving...
[((551, 649), 'tensorflow.estimator.export.ServingInputReceiver', 'tf.estimator.export.ServingInputReceiver', ([], {'receiver_tensors': 'reciever_tensors', 'features': 'features'}), '(receiver_tensors=reciever_tensors,\n features=features)\n', (591, 649), True, 'import tensorflow as tf\n'), ((757, 798), 'tensorflow....
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.db.models.deletion from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operati...
[ "django.db.models.DateField", "django.db.models.TextField", "django.db.models.ForeignKey", "django.db.models.IntegerField", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.DateTimeField", "django.db.models.DecimalField", "django.db.migrations.swappable_dependency", ...
[((243, 300), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (274, 300), False, 'from django.db import models, migrations\n'), ((7417, 7456), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'to': '"""patient.P...
import os import platform from flask import Flask from flask import render_template def create_app(test_config=None): # create and configure the app app = Flask(__name__, instance_relative_config=True) app.config.from_mapping( SECRET_KEY='dev', DATABASE=os.path.join(app.instance_path, 'fl...
[ "flask.render_template", "platform.python_implementation", "platform.node", "flask.Flask", "platform.release", "platform.version", "platform.java_ver", "platform.python_build", "platform.system", "platform.processor", "platform.python_version_tuple", "platform.dist", "platform.mac_ver", "p...
[((166, 212), 'flask.Flask', 'Flask', (['__name__'], {'instance_relative_config': '(True)'}), '(__name__, instance_relative_config=True)\n', (171, 212), False, 'from flask import Flask\n'), ((651, 681), 'os.makedirs', 'os.makedirs', (['app.instance_path'], {}), '(app.instance_path)\n', (662, 681), False, 'import os\n')...
import numpy as np import numpy.testing import pytest from gl0learn import Bounds from gl0learn.utils import ClosedInterval @pytest.mark.parametrize( "bounds", [(0, 0), (-1, -1), (1, 1), (np.NAN, np.NAN), (np.NAN, 1), (-1, np.NAN)] ) def test_scalar_bad_bounds(bounds): with pytest.raises(ValueError): ...
[ "numpy.ones", "gl0learn.Bounds", "gl0learn.utils.ClosedInterval", "pytest.mark.parametrize", "numpy.zeros", "pytest.raises", "numpy.arange" ]
[((128, 239), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""bounds"""', '[(0, 0), (-1, -1), (1, 1), (np.NAN, np.NAN), (np.NAN, 1), (-1, np.NAN)]'], {}), "('bounds', [(0, 0), (-1, -1), (1, 1), (np.NAN, np.\n NAN), (np.NAN, 1), (-1, np.NAN)])\n", (151, 239), False, 'import pytest\n'), ((1695, 1710), 'gl0...
from django.db import models class TrackingModel(models.Model): created_utc = models.DateTimeField(auto_now_add=True) updated_utc = models.DateTimeField(auto_now=True) class Meta: abstract = True
[ "django.db.models.DateTimeField" ]
[((84, 123), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now_add': '(True)'}), '(auto_now_add=True)\n', (104, 123), False, 'from django.db import models\n'), ((142, 177), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now': '(True)'}), '(auto_now=True)\n', (162, 177), Fa...
#!/usr/bin/env python # -*- coding: utf-8 -*- import runpy import sys from tests.test_main.test_dicom_types import dicom_folder # Necessary so that "dicom_folder" is not seen as unused dicom_folder = dicom_folder def test_dicomphi(dicom_folder, tmp_path): sys.argv = [sys.argv[0], str(tmp_path)] runpy.run_m...
[ "runpy.run_module" ]
[((309, 395), 'runpy.run_module', 'runpy.run_module', (['"""dicom_utils.cli.dicomphi"""'], {'run_name': '"""__main__"""', 'alter_sys': '(True)'}), "('dicom_utils.cli.dicomphi', run_name='__main__', alter_sys\n =True)\n", (325, 395), False, 'import runpy\n')]
from scipy import stats import numpy as np def simbolizar(X, m = 3): """ Convierte una serie numérica de valores a su versión simbólica basándose en ventanas de m valores consecutivos. Parámetros ---------- X : Serie a simbolizar m : Longitud de la ventana Regresa --------...
[ "numpy.roll", "scipy.stats.rankdata", "numpy.array2string", "numpy.log", "numpy.array", "numpy.empty", "numpy.concatenate", "numpy.log2" ]
[((633, 648), 'numpy.array', 'np.array', (['dummy'], {}), '(dummy)\n', (641, 648), True, 'import numpy as np\n'), ((903, 917), 'numpy.array', 'np.array', (['simX'], {}), '(simX)\n', (911, 917), True, 'import numpy as np\n'), ((3590, 3609), 'numpy.empty', 'np.empty', (['(pasos + 1)'], {}), '(pasos + 1)\n', (3598, 3609),...
import json import os import warnings from contextlib import contextmanager from datetime import datetime import joblib import matplotlib.pyplot as plt import pandas as pd from vivid.json_encoder import NestedEncoder class ExperimentBackend: """base class for all experiment backends""" def start(self): ...
[ "os.path.exists", "os.path.join", "matplotlib.pyplot.close", "datetime.datetime.now", "json.load", "json.dump" ]
[((1347, 1361), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (1359, 1361), False, 'from datetime import datetime\n'), ((1395, 1409), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (1407, 1409), False, 'from datetime import datetime\n'), ((2409, 2441), 'os.path.exists', 'os.path.exists', (['sel...
# Copyright (c) 2017 FlashX, LLC # # 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, distrib...
[ "lmsrvcore.middleware.AuthorizationMiddleware", "lmsrvcore.auth.identity.get_identity_manager_instance", "pytest.raises" ]
[((2339, 2370), 'lmsrvcore.auth.identity.get_identity_manager_instance', 'get_identity_manager_instance', ([], {}), '()\n', (2368, 2370), False, 'from lmsrvcore.auth.identity import get_identity_manager_instance, AuthenticationError\n'), ((2520, 2551), 'lmsrvcore.auth.identity.get_identity_manager_instance', 'get_ident...
# This script is for Windows # import sys import pathlib import subprocess as sub if len(sys.argv) < 3: print("{} - Make symbolic links for input's contents into output's contents" .format(sys.argv[0])) print("Usage: {} INPUT_DIRECTORY OUTPUT_DIRECTORY".format(sys.argv[0])) sys.exit(1) INP...
[ "sys.exit", "subprocess.call", "pathlib.Path" ]
[((335, 360), 'pathlib.Path', 'pathlib.Path', (['sys.argv[1]'], {}), '(sys.argv[1])\n', (347, 360), False, 'import pathlib\n'), ((381, 406), 'pathlib.Path', 'pathlib.Path', (['sys.argv[2]'], {}), '(sys.argv[2])\n', (393, 406), False, 'import pathlib\n'), ((302, 313), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (310...
# -*- coding: utf-8 -*- """ Datadog check for NSD (https://www.nlnetlabs.nl/projects/nsd/) This will use the nsd provided command line tool nsd-control to query for statistics, parse the stdout and feed them into datadog. See also https://www.nlnetlabs.nl/projects/nsd/nsd-control.8.html """ import os import re from c...
[ "os.system", "re.findall", "utils.subprocess_output.get_subprocess_output", "os.geteuid" ]
[((1611, 1647), 're.findall', 're.findall', (['"""(\\\\S+)=(.*\\\\d)"""', 'output'], {}), "('(\\\\S+)=(.*\\\\d)', output)\n", (1621, 1647), False, 'import re\n'), ((987, 999), 'os.geteuid', 'os.geteuid', ([], {}), '()\n', (997, 999), False, 'import os\n'), ((1087, 1151), 'utils.subprocess_output.get_subprocess_output',...
# Generated by Django 1.11.13 on 2018-09-11 14:40 import re import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0002_remove_organization'), ] operations = [ migrations.AlterField( model_name...
[ "re.compile" ]
[((673, 699), 're.compile', 're.compile', (['"""^[\\\\w.@+-]+$"""'], {}), "('^[\\\\w.@+-]+$')\n", (683, 699), False, 'import re\n')]
import bpy from . import camera # MASTER CAMERA # def interpolate_location(obj1, obj2, time): obj1.rotation_euler.x = obj1.rotation_euler.x + (obj2.rotation_euler.x - obj1.rotation_euler.x)/time obj1.rotation_euler.y = obj1.rotation_euler.y + (obj2.rotation_euler.y - obj1.rotation_euler.y)/time obj1.rotation_eul...
[ "bpy.props.StringProperty", "bpy.ops.object.camera_add", "bpy.ops.view3d.object_as_camera", "bpy.ops.object.select_all", "bpy.app.timers.unregister", "bpy.ops.photographer.updatesettings", "bpy.data.objects.get", "bpy.data.objects.remove", "bpy.app.timers.register", "bpy.ops.view3d.camera_to_view"...
[((725, 761), 'bpy.data.objects.get', 'bpy.data.objects.get', (['"""MasterCamera"""'], {}), "('MasterCamera')\n", (745, 761), False, 'import bpy\n'), ((5625, 5662), 'bpy.ops.photographer.updatesettings', 'bpy.ops.photographer.updatesettings', ([], {}), '()\n', (5660, 5662), False, 'import bpy\n'), ((6041, 6067), 'bpy.p...
""" eZmax API Definition (Full) This API expose all the functionnalities for the eZmax and eZsign applications. # noqa: E501 The version of the OpenAPI document: 1.1.7 Contact: <EMAIL> Generated by: https://openapi-generator.tech """ import sys import unittest import eZmaxApi from eZmaxApi.mod...
[ "unittest.main" ]
[((904, 919), 'unittest.main', 'unittest.main', ([], {}), '()\n', (917, 919), False, 'import unittest\n')]
from copy import deepcopy from typing import Any, Dict def merge_dicts(a: Dict, b: Dict): """Merge two dictionaries in a recursive way. It means that if there is a key match, the keys is merged as well. Only dict and list keys merging is supported Args: a (Dict): b (Dict) Raises: ...
[ "copy.deepcopy" ]
[((465, 476), 'copy.deepcopy', 'deepcopy', (['a'], {}), '(a)\n', (473, 476), False, 'from copy import deepcopy\n'), ((1957, 1970), 'copy.deepcopy', 'deepcopy', (['obj'], {}), '(obj)\n', (1965, 1970), False, 'from copy import deepcopy\n')]
import asyncio import itertools import re from collections import Counter from typing import Dict, List, Union import discord from discord.ext import commands from settings import RULLER from .basic_models import ManiBot from .f_database import factions_roles from .interactions import ComponentCallback, Select, Selec...
[ "discord.Permissions.all", "discord.AllowedMentions", "re.match", "discord.Permissions", "discord.ext.commands.MaxConcurrencyReached", "collections.Counter", "itertools.count", "asyncio.gather", "re.findall", "discord.ext.commands.command" ]
[((8270, 8288), 'discord.ext.commands.command', 'commands.command', ([], {}), '()\n', (8286, 8288), False, 'from discord.ext import commands\n'), ((10250, 10268), 'discord.ext.commands.command', 'commands.command', ([], {}), '()\n', (10266, 10268), False, 'from discord.ext import commands\n'), ((10790, 10835), 'discord...
import numpy as np import pandas as pd import matplotlib.pyplot as plt import os import joblib import torch import torch.nn as nn import torch.nn.functional as F from torch.optim import Adam, SGD import tqdm import itertools from sklearn.linear_model import LogisticRegression from sklearn.neighbors import KNeighborsCla...
[ "matplotlib.pyplot.savefig", "matplotlib.pyplot.xticks", "matplotlib.pyplot.ylabel", "pandas.read_csv", "matplotlib.ticker.MultipleLocator", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.tick_params", "matplotlib.pyplot.plot", "matplotlib.pyplot.fill_between", "matplotlib.pyplot.close", "matplo...
[((628, 649), 'matplotlib.pyplot.interactive', 'plt.interactive', (['(True)'], {}), '(True)\n', (643, 649), True, 'import matplotlib.pyplot as plt\n'), ((1373, 1387), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (1385, 1387), True, 'import pandas as pd\n'), ((9815, 9872), 'matplotlib.pyplot.tick_params', 'plt....
import math def is_perfect_square(x:int) -> bool: ''' https://www.geeksforgeeks.org/check-number-fibonacci-number/ ''' s = int(math.sqrt(x)) return s*s == x def is_fibonacci(n:int) -> bool: ''' https://www.geeksforgeeks.org/check-number-fibonacci-number/ ''' # n is Fibinacci if...
[ "math.sqrt" ]
[((146, 158), 'math.sqrt', 'math.sqrt', (['x'], {}), '(x)\n', (155, 158), False, 'import math\n')]
from .models import Restaurante, Review, Evento from main.forms import BusquedaPorNombre,BuscaTituloCuerpo from django.shortcuts import render, redirect from bs4 import BeautifulSoup import urllib.request import lxml import re, os, shutil import requests import datetime from whoosh.index import create_in,open_dir from ...
[ "django.shortcuts.render", "os.path.exists", "whoosh.fields.TEXT", "whoosh.fields.DATETIME", "datetime.datetime.min.time", "re.compile", "whoosh.index.open_dir", "datetime.datetime.strptime", "whoosh.qparser.MultifieldParser", "bs4.BeautifulSoup", "django.shortcuts.redirect", "os.mkdir", "sh...
[((745, 769), 'bs4.BeautifulSoup', 'BeautifulSoup', (['f', '"""lxml"""'], {}), "(f, 'lxml')\n", (758, 769), False, 'from bs4 import BeautifulSoup\n'), ((4110, 4135), 'bs4.BeautifulSoup', 'BeautifulSoup', (['fu', '"""lxml"""'], {}), "(fu, 'lxml')\n", (4123, 4135), False, 'from bs4 import BeautifulSoup\n'), ((5585, 5614)...
from nltk.tokenize import WordPunctTokenizer import nltk.data import numpy as np import re import os root = os.path.dirname(os.path.abspath(__file__)) ################## # TEXTS INVOLVED # ################## ##<NAME> # 0:The Three Musketeers # 1:Twenty Years After (D'Artagnan Series: Part Two) # 2:The Count of Monte ...
[ "nltk.tokenize.WordPunctTokenizer", "numpy.log", "numpy.random.multinomial", "numpy.exp", "os.path.abspath", "re.sub", "re.search" ]
[((125, 150), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (140, 150), False, 'import os\n'), ((1224, 1256), 're.sub', 're.sub', (['rulesMeta[idx]', '""""""', 'file'], {}), "(rulesMeta[idx], '', file)\n", (1230, 1256), False, 'import re\n'), ((2541, 2550), 'numpy.log', 'np.log', (['a'], {})...
from __future__ import absolute_import import logging def getFileLogger(name, filename): # pragma: no cover logger = logging.getLogger(name) logger.addHandler(logging.FileHandler(str(filename), delay=True)) return logger
[ "logging.getLogger" ]
[((119, 142), 'logging.getLogger', 'logging.getLogger', (['name'], {}), '(name)\n', (136, 142), False, 'import logging\n')]
# Third party imports import pytest # pydatastructs imports from pydatastructs.binarysearchtree import BinarySearchTree # Setup # initialize _binarysearchtree in pytest fixture to be used in individual method tests @pytest.fixture def binarysearchtree(): _binarysearchtree = BinarySearchTree(value=10) return _b...
[ "pydatastructs.binarysearchtree.BinarySearchTree" ]
[((280, 306), 'pydatastructs.binarysearchtree.BinarySearchTree', 'BinarySearchTree', ([], {'value': '(10)'}), '(value=10)\n', (296, 306), False, 'from pydatastructs.binarysearchtree import BinarySearchTree\n')]
""" Settings helpers for the ``azimuth`` Django app. """ from settings_object import ( SettingsObject, Setting, NestedSetting, ObjectFactorySetting ) from .zenith import Zenith class AwxSettings(SettingsObject): """ Settings object for the AWX settings. """ #### # General setting...
[ "settings_object.Setting", "settings_object.NestedSetting", "settings_object.ObjectFactorySetting" ]
[((380, 402), 'settings_object.Setting', 'Setting', ([], {'default': '(False)'}), '(default=False)\n', (387, 402), False, 'from settings_object import SettingsObject, Setting, NestedSetting, ObjectFactorySetting\n'), ((434, 443), 'settings_object.Setting', 'Setting', ([], {}), '()\n', (441, 443), False, 'from settings_...
""" Problem link: Solution By <NAME> """ from sys import stdin,stdout from collections import Counter , deque from queue import PriorityQueue import math helperConstants = True helperUtilityFunctions = True def input(): return stdin.readline().strip() # def print(s): stdout.write(str(s)+'\n') if helperConstants:...
[ "sys.stdin.readline" ]
[((234, 250), 'sys.stdin.readline', 'stdin.readline', ([], {}), '()\n', (248, 250), False, 'from sys import stdin, stdout\n')]
# Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com) """ The Computer Language Benchmarks Game http://benchmarksgame.alioth.debian.org/ Contributed by <NAME>, modified by Tupteq. """ from __future__ import annotations import __static__ from __static__ import int64, box from typing import Callab...
[ "__static__.box", "__static__.int64" ]
[((483, 491), '__static__.int64', 'int64', (['n'], {}), '(n)\n', (488, 491), False, 'from __static__ import int64, box\n'), ((754, 760), '__static__.box', 'box', (['r'], {}), '(r)\n', (757, 760), False, 'from __static__ import int64, box\n'), ((1322, 1336), '__static__.box', 'box', (['max_flips'], {}), '(max_flips)\n',...
"""cascade delete for period stars Revision ID: dbf1daf55faf Revises: <KEY> Create Date: 2016-10-08 10:14:03.852963 """ revision = '<KEY>' down_revision = '<KEY>' branch_labels = None depends_on = None from alembic import op def upgrade(): op.drop_constraint('report_all_daily_ibfk_1', 'report_all_daily', type...
[ "alembic.op.drop_constraint", "alembic.op.create_foreign_key" ]
[((250, 340), 'alembic.op.drop_constraint', 'op.drop_constraint', (['"""report_all_daily_ibfk_1"""', '"""report_all_daily"""'], {'type_': '"""foreignkey"""'}), "('report_all_daily_ibfk_1', 'report_all_daily', type_=\n 'foreignkey')\n", (268, 340), False, 'from alembic import op\n'), ((340, 434), 'alembic.op.drop_con...
from setuptools import setup setup( name='rfpimp', version='1.2', url='https://github.com/parrt/random-forest-importances', license='MIT', py_modules=['rfpimp'], author='<NAME>, <NAME>', author_email='<EMAIL>, <EMAIL>', install_requires=['numpy','pandas','sklearn','matplotlib'], des...
[ "setuptools.setup" ]
[((30, 565), 'setuptools.setup', 'setup', ([], {'name': '"""rfpimp"""', 'version': '"""1.2"""', 'url': '"""https://github.com/parrt/random-forest-importances"""', 'license': '"""MIT"""', 'py_modules': "['rfpimp']", 'author': '"""<NAME>, <NAME>"""', 'author_email': '"""<EMAIL>, <EMAIL>"""', 'install_requires': "['numpy'...
import torch from torch import nn from torch.nn import functional as F import math class Network(nn.Module): def __init__(self, num_actions, image_channels, vec_size, cnn_module, hidden_size=256, dueling=True, double_channels=False): super().__init__() self.num_actions = num_ac...
[ "torch.nn.ReLU", "math.ceil", "math.sqrt", "torch.nn.Conv2d", "torch.nn.MaxPool2d", "torch.nn.functional.relu", "torch.nn.Linear", "torch.zeros", "torch.cat", "torch.ones" ]
[((479, 524), 'torch.nn.Linear', 'nn.Linear', (['self.conv_output_size', 'hidden_size'], {}), '(self.conv_output_size, hidden_size)\n', (488, 524), False, 'from torch import nn\n'), ((665, 702), 'torch.nn.Linear', 'nn.Linear', (['vec_size', 'vec_channel_size'], {}), '(vec_size, vec_channel_size)\n', (674, 702), False, ...
import pickle import hashlib from .widget import AutocompleteWidget queryset_cache = {} def add_autocomplete_widget(model, queryset, field_name): pickled = pickle.dumps(( model._meta.app_label, model._meta.object_name, queryset.query, field_name )) token = hashlib.md5(pic...
[ "pickle.dumps", "hashlib.md5" ]
[((164, 259), 'pickle.dumps', 'pickle.dumps', (['(model._meta.app_label, model._meta.object_name, queryset.query, field_name)'], {}), '((model._meta.app_label, model._meta.object_name, queryset.\n query, field_name))\n', (176, 259), False, 'import pickle\n'), ((305, 325), 'hashlib.md5', 'hashlib.md5', (['pickled'], ...
from train_input import * #from itertools import permutations import itertools import pickle # variables file_name = 'network_performance' g = [1.3, 1.4, 1.5] pg = [0.4, 0.6, 0.7, 0.9] fb = [40, 30, 20, 10, 5, 1] s = [0, 1, 2, 3] combs = [[x,y] for x in g for y in pg] temp = [[x,[y]] for x in combs for y in fb] comb...
[ "itertools.chain", "pickle.dump" ]
[((1431, 1468), 'pickle.dump', 'pickle.dump', (['networks', 'f'], {'protocol': '(-1)'}), '(networks, f, protocol=-1)\n', (1442, 1468), False, 'import pickle\n'), ((377, 402), 'itertools.chain', 'itertools.chain', (['*temp[i]'], {}), '(*temp[i])\n', (392, 402), False, 'import itertools\n'), ((513, 538), 'itertools.chain...
# Copyright 2021 Dice Finding Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
[ "ProjectionUtil.to_homogeneous" ]
[((1007, 1057), 'ProjectionUtil.to_homogeneous', 'ProjectionUtil.to_homogeneous', (['points', 'at_infinity'], {}), '(points, at_infinity)\n', (1036, 1057), False, 'import ProjectionUtil\n')]
from pathlib import Path import hydra import numpy as np import torch from hydra.utils import to_absolute_path from nnsvs.base import PredictionType from nnsvs.mdn import mdn_loss from nnsvs.pitch import nonzero_segments from nnsvs.train_util import save_checkpoint, setup from nnsvs.util import make_non_pad_mask from ...
[ "torch.sort", "numpy.allclose", "hydra.main", "nnsvs.mdn.mdn_loss", "nnsvs.pitch.nonzero_segments", "nnsvs.train_util.save_checkpoint", "torch.nn.MSELoss", "nnsvs.train_util.setup", "hydra.utils.to_absolute_path", "omegaconf.OmegaConf.save", "torch.finfo", "torch.cuda.is_available", "nnsvs.u...
[((11126, 11190), 'hydra.main', 'hydra.main', ([], {'config_path': '"""conf/train_resf0"""', 'config_name': '"""config"""'}), "(config_path='conf/train_resf0', config_name='config')\n", (11136, 11190), False, 'import hydra\n'), ((723, 757), 'nnsvs.pitch.nonzero_segments', 'nonzero_segments', (['lf0_score_denorm'], {}),...
import setuptools import inspect import sys import os requirements = [ 'beautifulsoup4==4.7.1', 'lxml==4.3.3', 'soupsieve==1.9.1', 'PyInquirer==1.0.3' ] VERSION_PATH = os.path.join(os.path.dirname(__file__), 'VERSION') with open(VERSION_PATH, 'r') as version_file: VERSION = version_file.read().str...
[ "os.path.dirname", "setuptools.find_packages" ]
[((199, 224), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (214, 224), False, 'import os\n'), ((353, 378), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (368, 378), False, 'import os\n'), ((1286, 1329), 'setuptools.find_packages', 'setuptools.find_packages', ([],...
# -*- coding: utf-8 -*- # # diffoscope: in-depth comparison of files, archives, and directories # # Copyright © 2016, 2017 <NAME> <<EMAIL>> # # diffoscope 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...
[ "collections.OrderedDict", "distro.like", "distutils.spawn.find_executable", "functools.wraps", "distro.id", "platform.system", "functools.lru_cache" ]
[((1304, 1404), 'collections.OrderedDict', 'collections.OrderedDict', (["[('arch', 'Arch Linux'), ('debian', 'Debian'), ('FreeBSD', 'FreeBSD')]"], {}), "([('arch', 'Arch Linux'), ('debian', 'Debian'), (\n 'FreeBSD', 'FreeBSD')])\n", (1327, 1404), False, 'import collections\n'), ((1149, 1170), 'functools.lru_cache', ...
#!/usr/bin/env python3 """Saves, loads and deletes pieces of text to the clipboard. Usage: py.exe mcb_ext.pyw save <keyword> - Saves clipboard to keyword py.exe mcb_ext.pyw <keyword> - Loads keyword contents to clipboard py.exe mcb_ext.pyw list - Loads all keywords to clipboard py.exe mcb_ext.pyw delete <keyword>- De...
[ "pyperclip.paste", "pyperclip.copy", "shelve.open" ]
[((481, 499), 'shelve.open', 'shelve.open', (['"""mcb"""'], {}), "('mcb')\n", (492, 499), False, 'import shelve\n'), ((628, 645), 'pyperclip.paste', 'pyperclip.paste', ([], {}), '()\n', (643, 645), False, 'import pyperclip\n'), ((1215, 1253), 'pyperclip.copy', 'pyperclip.copy', (['mcb_shelf[sys.argv[1]]'], {}), '(mcb_s...
from django.http import HttpResponse from django.shortcuts import render, render_to_response from django.template import RequestContext, loader from django_translate.services import trans as _, transchoice def hello(request): return render_to_response("hello.html", context=RequestContext(request)) def apples(req...
[ "django_translate.services.transchoice", "django.template.RequestContext", "django_translate.services.trans" ]
[((280, 303), 'django.template.RequestContext', 'RequestContext', (['request'], {}), '(request)\n', (294, 303), False, 'from django.template import RequestContext, loader\n'), ((380, 403), 'django.template.RequestContext', 'RequestContext', (['request'], {}), '(request)\n', (394, 403), False, 'from django.template impo...
from views import (lexers, pro_signup, sitemap, tags, pro_signup_complete) from django.conf.urls.defaults import include, patterns, url from django.views.generic.simple import direct_to_template from utils.forms import SniptRegistrationForm from django.http import HttpResponseRedirect from django.contrib import admin f...
[ "django.http.HttpResponseRedirect", "django.conf.urls.defaults.url", "django.conf.urls.defaults.include", "tastypie.api.Api", "django.contrib.admin.autodiscover" ]
[((437, 457), 'django.contrib.admin.autodiscover', 'admin.autodiscover', ([], {}), '()\n', (455, 457), False, 'from django.contrib import admin\n'), ((472, 494), 'tastypie.api.Api', 'Api', ([], {'api_name': '"""public"""'}), "(api_name='public')\n", (475, 494), False, 'from tastypie.api import Api\n'), ((636, 659), 'ta...
import asyncio import glob import importlib import inspect import logging import os import re import sys import time import sqlalchemy from cloudbot.event import Event from cloudbot.util import database logger = logging.getLogger("cloudbot") logger.setLevel(logging.DEBUG) ch = logging.StreamHandler(sys.stdout) ch.s...
[ "logging.getLogger", "logging.StreamHandler", "asyncio.iscoroutinefunction", "importlib.import_module", "logging.Formatter", "os.path.join", "os.path.splitext", "cloudbot.event.Event", "inspect.getargspec", "os.path.dirname", "os.path.basename", "importlib.reload", "asyncio.sleep", "os.pat...
[((215, 244), 'logging.getLogger', 'logging.getLogger', (['"""cloudbot"""'], {}), "('cloudbot')\n", (232, 244), False, 'import logging\n'), ((282, 315), 'logging.StreamHandler', 'logging.StreamHandler', (['sys.stdout'], {}), '(sys.stdout)\n', (303, 315), False, 'import logging\n'), ((355, 428), 'logging.Formatter', 'lo...
import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.model_selection import StratifiedKFold from sklearn.linear_model import Perceptron from sklearn.neighbors import KNeighborsClassifier from sklearn.svm import SVC from sklearn.tree import DecisionTreeClassifier from sklearn.naive...
[ "sklearn.naive_bayes.ComplementNB", "sklearn.svm.SVC", "sklearn.linear_model.Perceptron", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "sklearn.neighbors.KNeighborsClassifier", "sklearn.tree.DecisionTreeClassifier", "sklearn.model_selection.StratifiedKFold", "n...
[((1312, 1387), 'sklearn.model_selection.StratifiedKFold', 'StratifiedKFold', ([], {'n_splits': 'folds', 'shuffle': 'shuffle', 'random_state': 'random_state'}), '(n_splits=folds, shuffle=shuffle, random_state=random_state)\n', (1327, 1387), False, 'from sklearn.model_selection import StratifiedKFold\n'), ((2412, 2428),...
from django.db import models from django.db.models import Sum, Q from django.utils import timezone from decimal import Decimal class LedgerAccount(models.Model): """A particular account in the accounting ledger system. All transactions must have a left side (debit) and a right side (credit), and they mu...
[ "django.db.models.Sum", "django.db.models.DateField", "django.db.models.TextField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.SmallIntegerField", "django.db.models.DateTimeField", "django.db.models.DecimalField", "django.db.models.Q", "django.db.models.Posit...
[((1846, 1874), 'django.db.models.TextField', 'models.TextField', ([], {'blank': '(True)'}), '(blank=True)\n', (1862, 1874), False, 'from django.db import models\n'), ((1894, 1940), 'django.db.models.SmallIntegerField', 'models.SmallIntegerField', ([], {'choices': 'TYPE_CHOICES'}), '(choices=TYPE_CHOICES)\n', (1918, 19...
import functools import importlib import os import subprocess import pytest dumpall_svn = importlib.import_module('dumpall-svn') @pytest.mark.usefixtures('mock_strftime') def test_dumpall_svn(tmp_path, mocker, proc): present = tmp_path / 'present' present.mkdir() result = tmp_path / 'present-19700101-0...
[ "pytest.mark.usefixtures", "importlib.import_module" ]
[((92, 130), 'importlib.import_module', 'importlib.import_module', (['"""dumpall-svn"""'], {}), "('dumpall-svn')\n", (115, 130), False, 'import importlib\n'), ((134, 174), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""mock_strftime"""'], {}), "('mock_strftime')\n", (157, 174), False, 'import pytest\n')]