code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# # Copyright 2022 - <NAME>. <https://github.com/dealfonso> # # 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 req...
[ "datetime.datetime.fromtimestamp", "datetime.datetime.strptime", "json.dumps", "osidle.common.p_warning", "copy.deepcopy", "datetime.timedelta" ]
[((2466, 2498), 'json.dumps', 'json.dumps', (['self._data'], {'indent': '(4)'}), '(self._data, indent=4)\n', (2476, 2498), False, 'import json\n'), ((2540, 2562), 'json.dumps', 'json.dumps', (['self._data'], {}), '(self._data)\n', (2550, 2562), False, 'import json\n'), ((3209, 3225), 'copy.deepcopy', 'copy.deepcopy', (...
""" sphinxcontrib.autohttp.flask ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The sphinx.ext.autodoc-style HTTP API reference builder (from Flask) for sphinxcontrib.httpdomain. :copyright: Copyright 2011 by <NAME> :license: BSD, see LICENSE for details. """ from __future__ import absolute_import import re i...
[ "docutils.nodes.section", "sphinx.util.nodes.nested_parse_with_titles", "docutils.statemachine.ViewList" ]
[((849, 864), 'docutils.nodes.section', 'nodes.section', ([], {}), '()\n', (862, 864), False, 'from docutils import nodes\n'), ((926, 936), 'docutils.statemachine.ViewList', 'ViewList', ([], {}), '()\n', (934, 936), False, 'from docutils.statemachine import ViewList\n'), ((1029, 1079), 'sphinx.util.nodes.nested_parse_w...
from django.db import models from companies_app.models import Company class Documents(models.Model): __choice =((1, "yarandi"), (2, "gonderen imzaldir"), (3, "qebul eden imzaldir"), (4, "qebul eden imtina etdi"), (5, "vaxti bitib")) __doct_type_choice = ((1, "muqvile"), (2, "hesab_faktura")...
[ "django.db.models.DateField", "django.db.models.IntegerField", "django.db.models.ForeignKey", "django.db.models.FileField", "django.db.models.DateTimeField", "django.db.models.CharField" ]
[((335, 423), 'django.db.models.ForeignKey', 'models.ForeignKey', (['Company'], {'on_delete': 'models.CASCADE', 'related_name': '"""sender_doc_set"""'}), "(Company, on_delete=models.CASCADE, related_name=\n 'sender_doc_set')\n", (352, 423), False, 'from django.db import models\n'), ((434, 524), 'django.db.models.For...
""" Gets concordance and collocation for keywords selecting only the pages which have occurences of the target word, and groups the results by date. This query detects also the sentences in which keywords appear, and preprocess each word of each sentence with different methods. """ import os.path import yaml from def...
[ "defoe.nls.query_utils.total_preprocessed", "defoe.query_utils.extract_preprocess_word_type", "yaml.load", "defoe.nls.query_utils.extract_sentences" ]
[((1602, 1650), 'defoe.query_utils.extract_preprocess_word_type', 'query_utils.extract_preprocess_word_type', (['config'], {}), '(config)\n', (1642, 1650), False, 'from defoe import query_utils\n'), ((1567, 1579), 'yaml.load', 'yaml.load', (['f'], {}), '(f)\n', (1576, 1579), False, 'import yaml\n'), ((1869, 1896), 'def...
import pymongo import pandas as pd from pymongo import MongoClient from datetime import datetime myclient = pymongo.MongoClient("mongodb://localhost:27017/")
[ "pymongo.MongoClient" ]
[((109, 158), 'pymongo.MongoClient', 'pymongo.MongoClient', (['"""mongodb://localhost:27017/"""'], {}), "('mongodb://localhost:27017/')\n", (128, 158), False, 'import pymongo\n')]
import csv import librosa import numpy as np import soundfile as sf import torch from torch import Tensor from torch.utils.data import Dataset import torchvision.transforms as transforms from typing import Tuple from src import constants from src.model.config import Config, Input from src.utils.split import Split from...
[ "torchvision.transforms.CenterCrop", "torch.load", "librosa.to_mono", "torch.from_numpy", "src.utils.full_path.full_path", "librosa.resample", "soundfile.read", "csv.reader", "numpy.float32", "src.constants.get_dataset" ]
[((587, 600), 'soundfile.read', 'sf.read', (['file'], {}), '(file)\n', (594, 600), True, 'import soundfile as sf\n'), ((633, 655), 'librosa.to_mono', 'librosa.to_mono', (['array'], {}), '(array)\n', (648, 655), False, 'import librosa\n'), ((1074, 1091), 'numpy.float32', 'np.float32', (['array'], {}), '(array)\n', (1084...
from __future__ import unicode_literals from django import forms from django.db.models import Q from django.utils.translation import gettext_lazy as _ from symposion.proposals.models import SupportingDocument # @@@ generic proposal form class AddSpeakerForm(forms.Form): email = forms.EmailField( label...
[ "django.db.models.Q", "django.utils.translation.gettext_lazy" ]
[((321, 391), 'django.utils.translation.gettext_lazy', '_', (['"""Email address of new speaker (use their email address, not yours)"""'], {}), "('Email address of new speaker (use their email address, not yours)')\n", (322, 391), True, 'from django.utils.translation import gettext_lazy as _\n'), ((841, 888), 'django.ut...
import pytest import scryptlib.utils import scryptlib.contract from scryptlib.types import Sig, PubKey, PubKeyHash import bitcoinx from bitcoinx import SigHash, PrivateKey, pack_byte key_priv = PrivateKey.from_arbitrary_bytes(b'test123') key_pub = key_priv.public_key pubkey_hash = key_pub.hash160() wrong_key_priv ...
[ "scryptlib.types.Sig", "scryptlib.types.PubKeyHash", "bitcoinx.SigHash", "bitcoinx.PrivateKey.from_arbitrary_bytes", "pytest.raises", "bitcoinx.pack_byte", "scryptlib.types.PubKey" ]
[((198, 241), 'bitcoinx.PrivateKey.from_arbitrary_bytes', 'PrivateKey.from_arbitrary_bytes', (["b'test123'"], {}), "(b'test123')\n", (229, 241), False, 'from bitcoinx import SigHash, PrivateKey, pack_byte\n'), ((322, 371), 'bitcoinx.PrivateKey.from_arbitrary_bytes', 'PrivateKey.from_arbitrary_bytes', (["b'somethingelse...
import numpy as np import matplotlib.pyplot as plt import pandas as pd import math import warnings warnings.filterwarnings(action='once') data = None; matData = None; def initData(csvName): data = pd.read_csv(csvName) matData = pd.DataFrame(columns=['Name','Diameter','Length','Reduced Diamter','Area','Reduce...
[ "matplotlib.pyplot.savefig", "pandas.read_csv", "numpy.polyfit", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "numpy.linspace", "pandas.DataFrame", "matplotlib.pyplot.title", "warnings.filterwarnings", "matplotlib.pyplot.legend" ]
[((100, 138), 'warnings.filterwarnings', 'warnings.filterwarnings', ([], {'action': '"""once"""'}), "(action='once')\n", (123, 138), False, 'import warnings\n'), ((204, 224), 'pandas.read_csv', 'pd.read_csv', (['csvName'], {}), '(csvName)\n', (215, 224), True, 'import pandas as pd\n'), ((239, 451), 'pandas.DataFrame', ...
import numpy as np def _check_inverse(coeffs): det = np.linalg.det(coeffs) #import ipdb; ipdb.set_trace() if np.isclose(det, 0.0): raise ZeroDivisionError def _matrix_sanity(coeffs): assert(coeffs.ndim == 2)#, 'Input matrix must be 2 dimensional') assert(coeffs.shape[0]+1 == coeffs.shape[...
[ "numpy.matrix", "numpy.isclose", "numpy.genfromtxt", "numpy.linalg.det" ]
[((59, 80), 'numpy.linalg.det', 'np.linalg.det', (['coeffs'], {}), '(coeffs)\n', (72, 80), True, 'import numpy as np\n'), ((123, 143), 'numpy.isclose', 'np.isclose', (['det', '(0.0)'], {}), '(det, 0.0)\n', (133, 143), True, 'import numpy as np\n'), ((381, 424), 'numpy.genfromtxt', 'np.genfromtxt', (['coefficients_file'...
import json from .database import redis_db def get_redis_list(redis_list_key): python_standard_list = [] for i in range(0, redis_db.llen(redis_list_key)): # print(redis_db.lindex(redis_list_key, i)) python_standard_list.append(float(redis_db.lindex(redis_list_key, i))) return python_standa...
[ "json.loads" ]
[((2875, 2891), 'json.loads', 'json.loads', (['text'], {}), '(text)\n', (2885, 2891), False, 'import json\n'), ((3516, 3532), 'json.loads', 'json.loads', (['data'], {}), '(data)\n', (3526, 3532), False, 'import json\n'), ((4627, 4646), 'json.loads', 'json.loads', (['jsonstr'], {}), '(jsonstr)\n', (4637, 4646), False, '...
''' SVM2+ ''' # Author: <NAME> <<EMAIL>> import numpy as np import utils from sklearn.base import BaseEstimator from sklearn.svm import SVC from sklearn.metrics.pairwise import (rbf_kernel, linear_kernel, polynomial_kernel, ...
[ "numpy.identity", "sklearn.metrics.pairwise.sigmoid_kernel", "sklearn.metrics.pairwise.rbf_kernel", "sklearn.metrics.pairwise.polynomial_kernel", "utils.unbinarize_targets", "numpy.dot", "numpy.outer", "numpy.sign", "sklearn.metrics.pairwise.linear_kernel", "utils.binarize_targets", "sklearn.svm...
[((3514, 3539), 'utils.binarize_targets', 'utils.binarize_targets', (['y'], {}), '(y)\n', (3536, 3539), False, 'import utils\n'), ((6224, 6249), 'utils.binarize_targets', 'utils.binarize_targets', (['y'], {}), '(y)\n', (6246, 6249), False, 'import utils\n'), ((6548, 6863), 'sklearn.svm.SVC', 'SVC', ([], {'C': 'self.C',...
import prona2019Mod.utils as utils import itertools as it from six import iteritems, string_types, PY2, next import numpy as np import sys def _is_single(obj): """ Check whether `obj` is a single document or an entire corpus. Returns (is_single, new) 2-tuple, where `new` yields the same sequence as `o...
[ "itertools.chain", "prona2019Mod.utils.to_unicode", "numpy.array", "prona2019Mod.utils.any2utf8", "sys.exit", "six.next" ]
[((527, 541), 'six.next', 'next', (['obj_iter'], {}), '(obj_iter)\n', (531, 541), False, 'from six import iteritems, string_types, PY2, next\n'), ((561, 587), 'itertools.chain', 'it.chain', (['[peek]', 'obj_iter'], {}), '([peek], obj_iter)\n', (569, 587), True, 'import itertools as it\n'), ((2215, 2232), 'prona2019Mod....
import os, random from pygame import mixer, time # mp3 재생 설정 freq = 16000 # frequency bitsize = -16 # signed 16 bit. support 8,-8,16,-16s channels = 1 # 1 is mono, 2 is stereo buffer = 2048 # number of samples (experiment to get right sound) # 음악이 저장된 경로 지정 music_list_dir = "./music" angry_music_list_dir =...
[ "pygame.mixer.quit", "os.listdir", "pygame.mixer.init", "random.choice", "pygame.mixer.music.get_busy", "pygame.mixer.music.load", "pygame.time.Clock", "pygame.mixer.music.play", "pygame.mixer.music.get_pos" ]
[((733, 765), 'os.listdir', 'os.listdir', (['angry_music_list_dir'], {}), '(angry_music_list_dir)\n', (743, 765), False, 'import os, random\n'), ((787, 821), 'os.listdir', 'os.listdir', (['disgust_music_list_dir'], {}), '(disgust_music_list_dir)\n', (797, 821), False, 'import os, random\n'), ((840, 871), 'os.listdir', ...
# <NAME>, 2017: from structuredPredictionNLG.Action import Action from collections import defaultdict ''' Internal representation of a Meaning Representation ''' class MeaningRepresentation: def __init__(self, predicate, attributeValues, MRstr, delexicalizationMap=False): # A MeaningRepresentation consis...
[ "collections.defaultdict" ]
[((1441, 1454), 'collections.defaultdict', 'defaultdict', ([], {}), '()\n', (1452, 1454), False, 'from collections import defaultdict\n'), ((1881, 1894), 'collections.defaultdict', 'defaultdict', ([], {}), '()\n', (1892, 1894), False, 'from collections import defaultdict\n')]
import json import matplotlib.pyplot as plt import networkx as nx Graph = nx.Graph() # load data with open("all_links.json", "r") as f: for l in f.readlines(): data = json.loads(l) data["dst"] = data["dst"].split("/")[2].lower() Graph.add_node(data["dst"]) if data["classes"] =...
[ "json.loads", "networkx.spring_layout", "networkx.Graph", "matplotlib.pyplot.title", "matplotlib.pyplot.show" ]
[((76, 86), 'networkx.Graph', 'nx.Graph', ([], {}), '()\n', (84, 86), True, 'import networkx as nx\n'), ((543, 581), 'matplotlib.pyplot.title', 'plt.title', (['"""jamesg.blog Network Graph"""'], {}), "('jamesg.blog Network Graph')\n", (552, 581), True, 'import matplotlib.pyplot as plt\n'), ((583, 593), 'matplotlib.pypl...
""" Judge suit: 最好的一组5张牌 cards: 手牌 Card: size=2数组表示(kind, digit) """ from collections import defaultdict import enum import numpy as np from .poker import PokerDigit, PokerKind, PokerCard class TexasLevel(enum.IntEnum): # 皇家同花顺 和 同花顺 可以一起比较 straight_flush = 9 # 同花顺 four = 8 # 4条 full_h...
[ "numpy.argsort", "collections.defaultdict" ]
[((2997, 3023), 'numpy.argsort', 'np.argsort', (['packed_results'], {}), '(packed_results)\n', (3007, 3023), True, 'import numpy as np\n'), ((7192, 7208), 'collections.defaultdict', 'defaultdict', (['int'], {}), '(int)\n', (7203, 7208), False, 'from collections import defaultdict\n')]
# Copyright (c) 2017 pandas-gbq Authors All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. """Private module for fetching Google BigQuery credentials.""" import logging logger = logging.getLogger(__name__) CREDENTIALS_CACHE_DIRNAME = "pandas_g...
[ "logging.getLogger", "pydata_google_auth.cache.ReadWriteCredentialsCache", "pydata_google_auth.cache.WriteOnlyCredentialsCache" ]
[((253, 280), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (270, 280), False, 'import logging\n'), ((2170, 2297), 'pydata_google_auth.cache.ReadWriteCredentialsCache', 'pydata_google_auth.cache.ReadWriteCredentialsCache', ([], {'dirname': 'CREDENTIALS_CACHE_DIRNAME', 'filename': 'CREDEN...
from resultstoresearch.resultstoresearchapi import ( resultstore_download_pb2_grpc as resultstoresearch_download_pb2_grpc, resultstore_download_pb2 as resultstoresearch_download_pb2, invocation_pb2 as resultstoresearch_invocation_pb2, timestamp_pb2 as resultstoresearch_timestamp_pb2, duration_pb2 as ...
[ "resultstoresearch.resultstoresearchapi.common_pb2.StatusAttributes", "resultstoresearch.resultstoresearchapi.test_suite_pb2.TestError", "resultstoresearch.resultstoresearchapi.invocation_pb2.Invocation", "resultstoresearch.resultstoresearchapi.invocation_pb2.WorkspaceInfo", "resultstoresearch.resultstorese...
[((3590, 3689), 'resultstoresearch.resultstoresearchapi.invocation_pb2.InvocationTest', 'resultstoresearch_invocation_pb2.InvocationTest', ([], {'invocation': 'invocation', 'target_case': 'target_case'}), '(invocation=invocation,\n target_case=target_case)\n', (3637, 3689), True, 'from resultstoresearch.resultstores...
import sys import os; os.umask(7) # group permisions but that's all import os.path as osp import pdb import json import tqdm import numpy as np import torch import torch.nn.functional as F from dirtorch.utils.convenient import mkdir from dirtorch.utils import common from dirtorch.utils.pytorch_loader import get_load...
[ "dirtorch.utils.common.load_checkpoint", "dirtorch.nets.create_model", "dirtorch.utils.common.torch_set_gpu", "numpy.save", "os.path.exists", "argparse.ArgumentParser", "dirtorch.datasets.create", "torch.mean", "os.umask", "hashlib.md5", "os.path.splitext", "torch.sign", "pickle.load", "di...
[((22, 33), 'os.umask', 'os.umask', (['(7)'], {}), '(7)\n', (30, 33), False, 'import os\n'), ((482, 495), 'hashlib.md5', 'hashlib.md5', ([], {}), '()\n', (493, 495), False, 'import hashlib\n'), ((798, 819), 'torch.stack', 'torch.stack', (['x'], {'dim': '(0)'}), '(x, dim=0)\n', (809, 819), False, 'import torch\n'), ((25...
import time from base64 import b64encode from io import BytesIO import urllib import math from PIL import Image, ImageDraw, ImageFont, ImageFilter from .getData import GetInfo,GetCharacter,GetSpiralAbyssInfo,GetMysInfo import os import json import random FILE_PATH = os.path.dirname(__file__) FILE2_PATH = os.path.j...
[ "PIL.Image.open", "math.ceil", "os.listdir", "PIL.Image.new", "time.strftime", "os.path.join", "io.BytesIO", "os.path.dirname", "PIL.ImageDraw.Draw", "PIL.ImageFilter.GaussianBlur", "PIL.Image.composite", "time.localtime" ]
[((272, 297), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (287, 297), False, 'import os\n'), ((311, 341), 'os.path.join', 'os.path.join', (['FILE_PATH', '"""mys"""'], {}), "(FILE_PATH, 'mys')\n", (323, 341), False, 'import os\n'), ((353, 386), 'os.path.join', 'os.path.join', (['FILE2_PATH'...
# Copyright (c) 2019-2022, NVIDIA CORPORATION. import warnings from collections import defaultdict from contextlib import ExitStack from typing import Dict, List, Tuple from uuid import uuid4 import numpy as np from pyarrow import dataset as ds, parquet as pq import cudf from cudf._lib import parquet as libparquet f...
[ "cudf.utils.ioutils._get_filesystem_and_paths", "cudf.utils.ioutils.stringify_pathlike", "cudf.api.types.is_list_like", "cudf.utils.ioutils.doc_to_parquet", "pyarrow.parquet._filters_to_expression", "cudf.utils.ioutils.get_filepath_or_buffer", "pyarrow.parquet.write_to_dataset", "cudf.utils.ioutils.ge...
[((5122, 5157), 'cudf.utils.ioutils.doc_read_parquet_metadata', 'ioutils.doc_read_parquet_metadata', ([], {}), '()\n', (5155, 5157), False, 'from cudf.utils import ioutils\n'), ((10517, 10543), 'cudf.utils.ioutils.doc_read_parquet', 'ioutils.doc_read_parquet', ([], {}), '()\n', (10541, 10543), False, 'from cudf.utils i...
""" Benchmarks for QuickBundles Run all benchmarks with:: import dipy.segment as dipysegment dipysegment.bench() With Pytest, Run this benchmark with: pytest -svv -c bench.ini /path/to/bench_quickbundles.py """ import numpy as np import nibabel as nib from dipy.data import get_fnames import dipy.trac...
[ "dipy.segment.quickbundles.QuickBundles", "numpy.testing.measure", "dipy.segment.clustering.QuickBundles", "numpy.testing.assert_equal", "dipy.data.get_fnames", "dipy.testing.assert_arrays_equal", "dipy.tracking.streamline.set_number_of_points", "numpy.sum", "numpy.array" ]
[((1139, 1195), 'dipy.tracking.streamline.set_number_of_points', 'streamline_utils.set_number_of_points', (['fornix', 'nb_points'], {}), '(fornix, nb_points)\n', (1176, 1195), True, 'import dipy.tracking.streamline as streamline_utils\n'), ((2087, 2127), 'dipy.segment.quickbundles.QuickBundles', 'QB_Old', (['streamline...
import mcutils as mc import utilities mc.ColorSettings.print_color = True mc.ColorSettings.is_dev = False mc.LogSettings.display_logs = True utilities.initialize() about = mc.Credits(authors=['<NAME> (Dev)', '<NAME>', '<NAME>', '<NAME...
[ "mcutils.Credits", "utilities.initialize", "mcutils.Menu", "mcutils.MenuFunction" ]
[((142, 164), 'utilities.initialize', 'utilities.initialize', ([], {}), '()\n', (162, 164), False, 'import utilities\n'), ((174, 441), 'mcutils.Credits', 'mc.Credits', ([], {'authors': "['<NAME> (Dev)', '<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>']", 'team_name': '"""Team 8"""', 'github_account': '"""macanepa"""', ...
#! /usr/bin/env python """ Convert empty IPython notebook to a sphinx doc page. """ import sys from subprocess import check_call as sh def convert_nb(nbname): # Execute the notebook sh( [ "jupyter", "nbconvert", "--to", "notebook", "--execu...
[ "subprocess.check_call" ]
[((194, 280), 'subprocess.check_call', 'sh', (["['jupyter', 'nbconvert', '--to', 'notebook', '--execute', '--inplace', nbname]"], {}), "(['jupyter', 'nbconvert', '--to', 'notebook', '--execute', '--inplace',\n nbname])\n", (196, 280), True, 'from subprocess import check_call as sh\n'), ((424, 667), 'subprocess.check...
import datetime import os import copy import json import numpy as np from pytz import timezone from gamified_squad import GamifiedSquad from agent import CustomAgent import generic import evaluate SAVE_CHECKPOINT = 100000 def train(): time_1 = datetime.datetime.now() config = generic.load_config() env =...
[ "generic.HistoryScoreCache", "os.path.exists", "agent.CustomAgent", "numpy.mean", "pytz.timezone", "generic.to_np", "datetime.datetime.now", "numpy.array", "generic.to_pt", "numpy.sum", "numpy.random.seed", "gamified_squad.GamifiedSquad", "copy.deepcopy", "evaluate.evaluate", "generic.lo...
[((252, 275), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (273, 275), False, 'import datetime\n'), ((289, 310), 'generic.load_config', 'generic.load_config', ([], {}), '()\n', (308, 310), False, 'import generic\n'), ((321, 342), 'gamified_squad.GamifiedSquad', 'GamifiedSquad', (['config'], {}), ...
"""<title>an example of text usage</title>""" import pygame from pygame.locals import * # the following line is not needed if pgu is installed import sys; sys.path.insert(0, "..") from pgu import text pygame.font.init() screen = pygame.display.set_mode((640,480),SWSURFACE) fg = (0,0,0) bg = (0,192,255) screen.fill(...
[ "sys.path.insert", "pygame.event.get", "pgu.text.writec", "pygame.display.set_mode", "pgu.text.write", "pygame.display.flip", "pygame.time.wait", "pygame.Rect", "pygame.font.init", "pygame.font.SysFont" ]
[((156, 180), 'sys.path.insert', 'sys.path.insert', (['(0)', '""".."""'], {}), "(0, '..')\n", (171, 180), False, 'import sys\n'), ((204, 222), 'pygame.font.init', 'pygame.font.init', ([], {}), '()\n', (220, 222), False, 'import pygame\n'), ((233, 279), 'pygame.display.set_mode', 'pygame.display.set_mode', (['(640, 480)...
# --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- from azure.ai.ml._schema.core.fields import NestedField from marshmallow import post_load from azure.ai.ml.constants import AutoMLConstants...
[ "azure.ai.ml._schema.automl.training_settings.RegressionTrainingSettingsSchema", "azure.ai.ml.entities._job.automl.tabular.RegressionJob", "azure.ai.ml._schema.StringTransformedEnum", "azure.ai.ml._utils.utils.camel_to_snake" ]
[((798, 949), 'azure.ai.ml._schema.StringTransformedEnum', 'StringTransformedEnum', ([], {'allowed_values': 'TaskType.REGRESSION', 'casing_transform': 'camel_to_snake', 'data_key': 'AutoMLConstants.TASK_TYPE_YAML', 'required': '(True)'}), '(allowed_values=TaskType.REGRESSION, casing_transform=\n camel_to_snake, data...
#!/usr/bin/env python # File: my-analogs.py based on the pimorini sensor.py # <NAME> March 10th 2020 # original Author; <NAME>, https://github.com/jxxcarlson # Date: Feb 21, 2016 # Derived from code by Gisky import time from math import sqrt import explorerhat from datetime import datetime # Local application impo...
[ "explorerhat.analog.two.read", "config.class_config", "explorerhat.analog.one.read", "math.sqrt", "datetime.datetime.now", "text_buffer.class_text_buffer" ]
[((458, 472), 'config.class_config', 'class_config', ([], {}), '()\n', (470, 472), False, 'from config import class_config\n'), ((578, 613), 'text_buffer.class_text_buffer', 'class_text_buffer', (['headings', 'config'], {}), '(headings, config)\n', (595, 613), False, 'from text_buffer import class_text_buffer\n'), ((91...
# pylint: disable=unused-argument __copyright__ = 'Copyright 2021, The RADICAL-Cybertools Team' __license__ = 'MIT' from radical.pilot.agent.resource_manager import ResourceManager from unittest import mock, TestCase # ------------------------------------------------------------------------------ # class NewReso...
[ "unittest.mock.Mock" ]
[((1462, 1473), 'unittest.mock.Mock', 'mock.Mock', ([], {}), '()\n', (1471, 1473), False, 'from unittest import mock, TestCase\n'), ((933, 944), 'unittest.mock.Mock', 'mock.Mock', ([], {}), '()\n', (942, 944), False, 'from unittest import mock, TestCase\n'), ((1054, 1065), 'unittest.mock.Mock', 'mock.Mock', ([], {}), '...
from utilidadescev import moeda from utilidadescev import dado p=dado.leiaDinheiro('Digite o preco: R$') moeda.resumo(p, 50, 50) """print(f'A metade de {Moeda.moeda(p)} é {Moeda.metade(p, True)}') print(f'O dobro de {Moeda.moeda(p)} é {Moeda.dobro(p,True)}') print(f'Aumentando 10%, temos {Moeda.aumentar(p, 10,True...
[ "utilidadescev.dado.leiaDinheiro", "utilidadescev.moeda.resumo" ]
[((66, 105), 'utilidadescev.dado.leiaDinheiro', 'dado.leiaDinheiro', (['"""Digite o preco: R$"""'], {}), "('Digite o preco: R$')\n", (83, 105), False, 'from utilidadescev import dado\n'), ((106, 129), 'utilidadescev.moeda.resumo', 'moeda.resumo', (['p', '(50)', '(50)'], {}), '(p, 50, 50)\n', (118, 129), False, 'from ut...
import argparse import os import traceback import matplotlib.pyplot as plt from matplotlib.pyplot import imshow import scipy.io import scipy.misc import numpy as np import pandas as pd import PIL from cv2 import cv2 import time import tensorflow as tf from keras import backend as K from keras.layers import Input, Lambd...
[ "cv2.cv2.VideoCapture", "keras.models.load_model", "ObjectDetection.Preprocessing.GenerateColors", "keras.backend.learning_phase", "cv2.cv2.waitKey", "ObjectDetection.Preprocessing.DrawBoxes", "numpy.asarray", "cv2.cv2.destroyAllWindows", "traceback.print_exc", "ObjectDetection.Preprocessing.Prepr...
[((3303, 3334), 'cv2.cv2.VideoCapture', 'cv2.VideoCapture', (['cv2.CAP_DSHOW'], {}), '(cv2.CAP_DSHOW)\n', (3319, 3334), False, 'from cv2 import cv2\n'), ((1563, 1618), 'ObjectDetection.Preprocessing.PreprocessImageHybrid', 'PreprocessImageHybrid', (['image'], {'modelImageSize': '(608, 608)'}), '(image, modelImageSize=(...
# Generated by Django 2.0.4 on 2018-05-16 22:03 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('collecte', '0003_auto_20180424_2006'), ] operations = [ migrations.AlterField( model_name='temperature', name='temp'...
[ "django.db.models.FloatField" ]
[((340, 359), 'django.db.models.FloatField', 'models.FloatField', ([], {}), '()\n', (357, 359), False, 'from django.db import migrations, models\n')]
#!/usr/bin/env python """Test TermCounts object used in Resnik and Lin similarity calculations.""" from __future__ import print_function import os import sys import timeit import datetime from goatools.base import get_godag from goatools.associations import dnld_assc from goatools.semantic import TermCounts from goat...
[ "goatools.test_data.gafs.ASSOCIATIONS.difference", "goatools.semantic.TermCounts", "timeit.default_timer", "os.path.join", "os.getcwd", "goatools.semantic.get_info_content" ]
[((414, 436), 'timeit.default_timer', 'timeit.default_timer', ([], {}), '()\n', (434, 436), False, 'import timeit\n'), ((858, 869), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (867, 869), False, 'import os\n'), ((2264, 2299), 'goatools.semantic.get_info_content', 'get_info_content', (['go_id', 'termcounts'], {}), '(go_...
from Core.IFactory import IFactory from Regs.Block_C import RC350 class RC350Factory(IFactory): def create_block_object(self, line): self.rc350 = _rc350 = RC350() _rc350.reg_list = line return _rc350
[ "Regs.Block_C.RC350" ]
[((170, 177), 'Regs.Block_C.RC350', 'RC350', ([], {}), '()\n', (175, 177), False, 'from Regs.Block_C import RC350\n')]
''' Created by auto_sdk on 2019.12.04 ''' from dingtalk.api.base import RestApi class OapiImChatServicegroupNoticeCreateRequest(RestApi): def __init__(self,url=None): RestApi.__init__(self,url) self.chat_id = None self.send_ding = None self.sticky = None self.text_content = None self.title = None self.un...
[ "dingtalk.api.base.RestApi.__init__" ]
[((170, 197), 'dingtalk.api.base.RestApi.__init__', 'RestApi.__init__', (['self', 'url'], {}), '(self, url)\n', (186, 197), False, 'from dingtalk.api.base import RestApi\n')]
""" This is a class defines different "cosmetic" (i.e. not necessarily in the Agent ActionSpace) Robot Behaviors """ # -*- coding: utf-8 -*- # pylint: disable=import-error, invalid-name from .RobotBehaviorList import RobotBehaviors from random import randint from GameUtils import GlobalSettings if GlobalSettings.USE_...
[ "r1d1_msgs.msg.TegaAction", "rospy.Time.now", "r1d1_msgs.msg.Vec3", "random.randint", "std_msgs.msg.Header" ]
[((1155, 1167), 'r1d1_msgs.msg.TegaAction', 'TegaAction', ([], {}), '()\n', (1165, 1167), False, 'from r1d1_msgs.msg import TegaAction\n'), ((1189, 1197), 'std_msgs.msg.Header', 'Header', ([], {}), '()\n', (1195, 1197), False, 'from std_msgs.msg import Header\n'), ((1225, 1241), 'rospy.Time.now', 'rospy.Time.now', ([],...
import numpy as np from phonopy import Phonopy from phonopy.interface.vasp import read_vasp from phonopy.file_IO import parse_FORCE_SETS, parse_BORN from phonopy.structure.atoms import PhonopyAtoms def append_band(bands, q_start, q_end): band = [] for i in range(51): band.append(np.array(q_start) + ...
[ "phonopy.file_IO.parse_BORN", "phonopy.Phonopy", "phonopy.interface.vasp.read_vasp", "numpy.array", "phonopy.file_IO.parse_FORCE_SETS" ]
[((467, 486), 'phonopy.interface.vasp.read_vasp', 'read_vasp', (['"""POSCAR"""'], {}), "('POSCAR')\n", (476, 486), False, 'from phonopy.interface.vasp import read_vasp\n'), ((1145, 1266), 'phonopy.Phonopy', 'Phonopy', (['unitcell', '[[2, 0, 0], [0, 2, 0], [0, 0, 2]]'], {'primitive_matrix': '[[0, 0.5, 0.5], [0.5, 0, 0.5...
import numpy as np import matplotlib.pyplot as plt from matplotlib import patches from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm from matplotlib.ticker import LinearLocator, FormatStrFormatter from matplotlib.figure import Figure from matplotlib import rcParams def dBofHz(inputHz): '''...
[ "matplotlib.pyplot.grid", "numpy.sqrt", "matplotlib.pyplot.savefig", "numpy.log10", "matplotlib.ticker.LinearLocator", "numpy.real", "numpy.linspace", "matplotlib.pyplot.figure", "matplotlib.ticker.FormatStrFormatter", "matplotlib.pyplot.subplots", "numpy.cos", "numpy.sin", "numpy.meshgrid",...
[((1293, 1325), 'numpy.sqrt', 'np.sqrt', (['(summR ** 2 + summI ** 2)'], {}), '(summR ** 2 + summI ** 2)\n', (1300, 1325), True, 'import numpy as np\n'), ((1609, 1630), 'numpy.linspace', 'np.linspace', (['(0)', '(1)', '(50)'], {}), '(0, 1, 50)\n', (1620, 1630), True, 'import numpy as np\n'), ((1648, 1678), 'numpy.linsp...
"""Prepares the usage of the espressodb_tests module """ import os from django import setup as _setup def _init(): """Initializes the django environment for espressodb_tests """ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "espressodb_tests.config.settings") _setup() if os.environ.get("ESPRESS...
[ "os.environ.setdefault", "espressodb.management.checks.run_all_checks", "django.setup", "os.environ.get" ]
[((192, 279), 'os.environ.setdefault', 'os.environ.setdefault', (['"""DJANGO_SETTINGS_MODULE"""', '"""espressodb_tests.config.settings"""'], {}), "('DJANGO_SETTINGS_MODULE',\n 'espressodb_tests.config.settings')\n", (213, 279), False, 'import os\n'), ((280, 288), 'django.setup', '_setup', ([], {}), '()\n', (286, 288...
import datetime from http.server import HTTPServer, SimpleHTTPRequestHandler import json import os import queue import time import threading import socketserver from SimpleWebSocketServer import SimpleWebSocketServer, WebSocket tb_path = os.path.dirname(os.path.realpath(__file__)) clients = [] class SimpleChat(WebSoc...
[ "threading.Thread.__init__", "os.path.realpath", "http.server.HTTPServer", "threading.Thread", "queue.Queue", "SimpleWebSocketServer.SimpleWebSocketServer" ]
[((255, 281), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (271, 281), False, 'import os\n'), ((2493, 2545), 'http.server.HTTPServer', 'HTTPServer', (['server_address', 'SimpleHTTPRequestHandler'], {}), '(server_address, SimpleHTTPRequestHandler)\n', (2503, 2545), False, 'from http.server...
from django.contrib.auth.decorators import login_required from django.shortcuts import get_object_or_404, render from django.utils.decorators import method_decorator from django.conf.urls import url from ..core.app import ShopKitApp class OrderApp(ShopKitApp): app_name = 'order' namespace = 'order' Orde...
[ "django.shortcuts.render", "django.shortcuts.get_object_or_404", "django.conf.urls.url", "django.utils.decorators.method_decorator" ]
[((1275, 1307), 'django.utils.decorators.method_decorator', 'method_decorator', (['login_required'], {}), '(login_required)\n', (1291, 1307), False, 'from django.utils.decorators import method_decorator\n'), ((972, 1016), 'django.shortcuts.get_object_or_404', 'get_object_or_404', (['orders'], {'token': 'order_token'}),...
# SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2022 Scipp contributors (https://github.com/scipp) """ Convert pre-0.11 HDF5 files to 0.11-compatible files. Changes are: * Rename dtype vector_3_float64 to vector3 * Rename dtype matrix_3_float64 to linear_transform3 """ import h5py import sys from shutil impor...
[ "shutil.copyfile", "h5py.File" ]
[((757, 782), 'h5py.File', 'h5py.File', (['filename', '"""r+"""'], {}), "(filename, 'r+')\n", (766, 782), False, 'import h5py\n'), ((1100, 1126), 'shutil.copyfile', 'copyfile', (['filename', 'backup'], {}), '(filename, backup)\n', (1108, 1126), False, 'from shutil import copyfile\n')]
#!/usr/bin/env python import socketserver import json class SimpleTCPJsonServer(socketserver.ThreadingTCPServer): allow_reuse_address = True @classmethod def instance(cls): return SimpleTCPJsonServer(("127.0.0.1", 22552), SimpleTCPJsonServerHandler) class SimpleTCPJsonServerHandler(socketserve...
[ "json.dumps" ]
[((579, 607), 'json.dumps', 'json.dumps', (["{'return': 'ok'}"], {}), "({'return': 'ok'})\n", (589, 607), False, 'import json\n')]
# A First Course in the Finite Element Method, 4th Edition # <NAME> # Problem 5.58 # Units for this model are kips and inches # Import 'FEModel3D' and 'Visualization' from 'PyNite' from PyNite import FEModel3D from PyNite import Visualization # Create a new model frame = FEModel3D() # Define the nodes frame.add_node...
[ "PyNite.FEModel3D", "PyNite.Visualization.RenderModel" ]
[((274, 285), 'PyNite.FEModel3D', 'FEModel3D', ([], {}), '()\n', (283, 285), False, 'from PyNite import FEModel3D\n'), ((1217, 1327), 'PyNite.Visualization.RenderModel', 'Visualization.RenderModel', (['frame'], {'text_height': '(5)', 'deformed_shape': '(True)', 'deformed_scale': '(40)', 'render_loads': '(True)'}), '(fr...
import sys import os from pathlib import Path from PyQt5.QtCore import QThread, pyqtSignal from PyQt5.QtWidgets import QApplication, QWidget, QToolTip, QPushButton, QGridLayout, QLineEdit, QLabel from PyQt5.QtGui import QFont from utils import get_chat, get_chat_contents, text_to_speech os.chdir(sys.path[0...
[ "PyQt5.QtCore.pyqtSignal", "utils.get_chat_contents", "PyQt5.QtGui.QFont", "pathlib.Path", "os.chdir", "utils.get_chat", "PyQt5.QtWidgets.QGridLayout", "PyQt5.QtWidgets.QLabel", "utils.text_to_speech", "PyQt5.QtWidgets.QApplication", "PyQt5.QtWidgets.QPushButton", "PyQt5.QtWidgets.QLineEdit" ]
[((301, 322), 'os.chdir', 'os.chdir', (['sys.path[0]'], {}), '(sys.path[0])\n', (309, 322), False, 'import os\n'), ((8183, 8205), 'PyQt5.QtWidgets.QApplication', 'QApplication', (['sys.argv'], {}), '(sys.argv)\n', (8195, 8205), False, 'from PyQt5.QtWidgets import QApplication, QWidget, QToolTip, QPushButton, QGridLayou...
#!/usr/bin/env python """Turns an hourly billing CSV into one we can test against. We redact anything proprietary, including: * tag names and values * cost values * instance IDs * line item IDs * account IDs We write the redacted CSV to stdout.""" import sys import cs...
[ "random.random", "csv.writer", "random.choice" ]
[((997, 1030), 'random.choice', 'random.choice', (["('t2', 'c4', 'm4')"], {}), "(('t2', 'c4', 'm4'))\n", (1010, 1030), False, 'import random\n'), ((1047, 1092), 'random.choice', 'random.choice', (["('medium', 'large', '2xlarge')"], {}), "(('medium', 'large', '2xlarge'))\n", (1060, 1092), False, 'import random\n'), ((12...
#!/usr/bin/env python import numpy as np from numpy import cos, sin, tanh, pi # generate random synthetic 2D field def deterministic_field(i, j, X, Y): r = (i*2*pi)/X t = (j*2*pi)/Y return sin(r)*sin(t) + sin(2.1*r)*sin(2.1*t) \ + sin(3.1*r)*sin(3.1*t) + tanh(r)*cos(t) \ + tanh(2*r)*cos(2....
[ "numpy.tanh", "numpy.zeros", "numpy.linspace", "numpy.cos", "numpy.sin" ]
[((502, 523), 'numpy.zeros', 'np.zeros', (['(obs, time)'], {}), '((obs, time))\n', (510, 523), True, 'import numpy as np\n'), ((763, 779), 'numpy.zeros', 'np.zeros', (['(m, n)'], {}), '((m, n))\n', (771, 779), True, 'import numpy as np\n'), ((409, 424), 'numpy.tanh', 'tanh', (['(r + 2 * t)'], {}), '(r + 2 * t)\n', (413...
from django.conf.urls.static import static from django.urls import path from django.urls.conf import re_path from . import views from django.conf import settings urlpatterns = [ re_path('^.*$', views.index), ]
[ "django.urls.conf.re_path" ]
[((183, 211), 'django.urls.conf.re_path', 're_path', (['"""^.*$"""', 'views.index'], {}), "('^.*$', views.index)\n", (190, 211), False, 'from django.urls.conf import re_path\n')]
#!/bin/false # Copyright (c) 2022 <NAME>. All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the # following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, this list of conditions and th...
[ "sys.path.insert", "uuid.UUID", "datalidator.blueprints.impl.BooleanBlueprint.BooleanBlueprint", "theoretical_testutils.test_function_parameter_generator", "os.path.join", "os.path.realpath", "datetime.datetime.now", "theoretical_testutils.TestException", "ipaddress.ip_network", "theoretical_testu...
[((12161, 12222), 'theoretical_testutils.perform_test', 'theoretical_testutils.perform_test', (['blueprint', 'input_', 'output'], {}), '(blueprint, input_, output)\n', (12195, 12222), False, 'import theoretical_testutils\n'), ((12013, 12105), 'theoretical_testutils.test_function_parameter_generator', 'theoretical_testu...
# Copyright 2019 The FastEstimator Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
[ "numpy.mean", "tensorflow.is_tensor", "torch.mean", "numpy.std", "torch.tensor", "tensorflow.maximum", "tensorflow.reduce_mean", "tensorflow.cast", "torch.std", "tensorflow.keras.backend.std", "typing.TypeVar" ]
[((786, 840), 'typing.TypeVar', 'TypeVar', (['"""Tensor"""', 'tf.Tensor', 'torch.Tensor', 'np.ndarray'], {}), "('Tensor', tf.Tensor, torch.Tensor, np.ndarray)\n", (793, 840), False, 'from typing import TypeVar\n'), ((1767, 1785), 'tensorflow.is_tensor', 'tf.is_tensor', (['data'], {}), '(data)\n', (1779, 1785), True, 'i...
from discord.ext import commands from OLD.universal_module import utils import logging import discord import typing import sys import re logger = logging.getLogger("Main") sys.excepthook = utils.log_exception_handler class InfoCog(commands.Cog, name="Info Module"): def __init__(self, data_sync: utils.DataSync, ...
[ "logging.getLogger", "discord.ext.commands.has_permissions", "discord.ext.commands.Cog.listener", "OLD.universal_module.utils.default_server_data", "re.compile", "OLD.universal_module.utils.toggle_feature", "discord.Embed", "discord.ext.commands.command" ]
[((148, 173), 'logging.getLogger', 'logging.getLogger', (['"""Main"""'], {}), "('Main')\n", (165, 173), False, 'import logging\n'), ((571, 594), 'discord.ext.commands.Cog.listener', 'commands.Cog.listener', ([], {}), '()\n', (592, 594), False, 'from discord.ext import commands\n'), ((673, 696), 'discord.ext.commands.Co...
import sys from hat.gui.main import main if __name__ == '__main__': sys.argv[0] = 'hat-gui' sys.exit(main())
[ "hat.gui.main.main" ]
[((112, 118), 'hat.gui.main.main', 'main', ([], {}), '()\n', (116, 118), False, 'from hat.gui.main import main\n')]
from .concept_extractor.extractor import TextblobTfIdfExtractStrategy from .models import Article, GraphArticle import logging logger = logging.getLogger() logger.setLevel(logging.INFO) logger.addHandler(logging.StreamHandler()) class ConceptRunner: _tfidf_extractor = None @classmethod def _get_tfidf_...
[ "logging.getLogger", "logging.StreamHandler" ]
[((138, 157), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (155, 157), False, 'import logging\n'), ((206, 229), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (227, 229), False, 'import logging\n')]
# -*- coding: utf-8 -*- # @Author: yulidong # @Date: 2018-04-25 23:06:40 # @Last Modified by: yulidong # @Last Modified time: 2018-11-20 00:11:31 import os import torch import numpy as np import scipy.misc as m import cv2 from torch.utils import data from python_pfm import * import torchvision.transforms as trans...
[ "numpy.mean", "os.listdir", "os.path.join", "numpy.max", "numpy.min" ]
[((378, 436), 'os.path.join', 'os.path.join', (['"""/home/dataset/datasets/nyu2_depth/npy_data"""'], {}), "('/home/dataset/datasets/nyu2_depth/npy_data')\n", (390, 436), False, 'import os\n'), ((443, 459), 'os.listdir', 'os.listdir', (['path'], {}), '(path)\n', (453, 459), False, 'import os\n'), ((536, 564), 'os.path.j...
''' Check Yahoo finance stock data helper. Update log: (date / version / author : comments) 2017-12-08 / 1.0.0 / Du Jiang : Creation 2017-12-13 / 2.0.0 / <NAME> : Use new API ''' from com.djs.learn.financeapi import CheckFinanceDataRequests __data_type = 0 __inventory_info_file_path = "../../../../etc/S...
[ "com.djs.learn.financeapi.CheckFinanceDataRequests.main" ]
[((506, 541), 'com.djs.learn.financeapi.CheckFinanceDataRequests.main', 'CheckFinanceDataRequests.main', (['argv'], {}), '(argv)\n', (535, 541), False, 'from com.djs.learn.financeapi import CheckFinanceDataRequests\n')]
""" Copyright (c) 2020 Intel 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 required by applicable law or agreed to in writin...
[ "functools.reduce" ]
[((869, 930), 'functools.reduce', 'reduce', (['operator.or_', 'LIST_LINEAR_OPS[1:]', 'LIST_LINEAR_OPS[0]'], {}), '(operator.or_, LIST_LINEAR_OPS[1:], LIST_LINEAR_OPS[0])\n', (875, 930), False, 'from functools import reduce\n'), ((1030, 1095), 'functools.reduce', 'reduce', (['operator.or_', 'LIST_AGNOSTIC_OPS[1:]', 'LIS...
from bs4 import BeautifulSoup, PageElement, Tag from datetime import datetime, timezone from typing import Optional from ficdl.scrapers.types import Scraper, StoryMetadata from ficdl.utils import download_and_decompress import logging import re CENTER_STYLE = re.compile(r'text-align\s*:\s*center', re.IGNORECASE) UND...
[ "logging.getLogger", "re.compile", "ficdl.scrapers.types.StoryMetadata", "bs4.BeautifulSoup", "ficdl.utils.download_and_decompress" ]
[((263, 317), 're.compile', 're.compile', (['"""text-align\\\\s*:\\\\s*center"""', 're.IGNORECASE'], {}), "('text-align\\\\s*:\\\\s*center', re.IGNORECASE)\n", (273, 317), False, 'import re\n'), ((335, 397), 're.compile', 're.compile', (['"""text-decoration\\\\s*:\\\\s*underline"""', 're.IGNORECASE'], {}), "('text-deco...
from multiprocessing.pool import Pool from os import makedirs from os import remove from os.path import exists, join from shutil import rmtree from subprocess import check_output import boto3 from invoke import task from tasks.python import run_python_codegen from tasks.util.codegen import find_codegen_func, find_cod...
[ "os.path.exists", "multiprocessing.pool.Pool", "tasks.util.upload_util.download_tar_from_s3", "os.makedirs", "tasks.util.codegen.find_codegen_func", "tasks.util.version.get_faasm_version", "os.path.join", "shutil.rmtree", "tasks.util.upload_util.upload_file_to_s3", "tasks.util.upload_util.list_fil...
[((635, 669), 'os.path.join', 'join', (['FAASM_LOCAL_DIR', '"""toolchain"""'], {}), "(FAASM_LOCAL_DIR, 'toolchain')\n", (639, 669), False, 'from os.path import exists, join\n'), ((905, 936), 'os.path.join', 'join', (['FAASM_LOCAL_DIR', 'tar_name'], {}), '(FAASM_LOCAL_DIR, tar_name)\n', (909, 936), False, 'from os.path ...
#!/usr/bin/env python # -*- coding: utf8 -*- from math import pi import rospy import time from trajectory_msgs.msg import JointTrajectory, JointTrajectoryPoint def send_zero_position(): rospy.loginfo("publishing 0 goals for joints") msg = JointTrajectoryPoint() msg.positions = [0, 0, 0, 0, 0, 0, 0, 0, 0...
[ "rospy.is_shutdown", "rospy.logwarn", "rospy.init_node", "rospy.get_param", "rospy.Time.now", "trajectory_msgs.msg.JointTrajectory", "rospy.sleep", "rospy.Publisher", "rospy.loginfo", "trajectory_msgs.msg.JointTrajectoryPoint" ]
[((194, 240), 'rospy.loginfo', 'rospy.loginfo', (['"""publishing 0 goals for joints"""'], {}), "('publishing 0 goals for joints')\n", (207, 240), False, 'import rospy\n'), ((251, 273), 'trajectory_msgs.msg.JointTrajectoryPoint', 'JointTrajectoryPoint', ([], {}), '()\n', (271, 273), False, 'from trajectory_msgs.msg impo...
from machine import Pin from time import sleep print('Version 2 installed using USB V2') led = Pin(2, Pin.OUT) while True: led.value(1) sleep(0.4) led.value(0) sleep(0.4) led.value(1) sleep(0.4) led.value(0) sleep(0.4) led.value(1) sleep(2)
[ "time.sleep", "machine.Pin" ]
[((97, 112), 'machine.Pin', 'Pin', (['(2)', 'Pin.OUT'], {}), '(2, Pin.OUT)\n', (100, 112), False, 'from machine import Pin\n'), ((147, 157), 'time.sleep', 'sleep', (['(0.4)'], {}), '(0.4)\n', (152, 157), False, 'from time import sleep\n'), ((179, 189), 'time.sleep', 'sleep', (['(0.4)'], {}), '(0.4)\n', (184, 189), Fals...
#!/usr/bin/env python """Write out the KL distance between two kmer models """ from __future__ import print_function import os, sys import numpy as np from vis_kmer_distributions import * from scipy.stats import entropy from scipy.spatial.distance import euclidean from itertools import product from argparse import Argu...
[ "os.path.exists", "scipy.stats.entropy", "numpy.sqrt", "argparse.ArgumentParser", "itertools.product", "numpy.linspace" ]
[((795, 805), 'numpy.sqrt', 'np.sqrt', (['(2)'], {}), '(2)\n', (802, 805), True, 'import numpy as np\n'), ((364, 399), 'argparse.ArgumentParser', 'ArgumentParser', ([], {'description': '__doc__'}), '(description=__doc__)\n', (378, 399), False, 'from argparse import ArgumentParser\n'), ((1099, 1134), 'os.path.exists', '...
# coding: utf-8 import socketserver import os import urllib.request from datetime import date from wsgiref.handlers import format_date_time from datetime import datetime from time import mktime # Copyright 2013 <NAME>, <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use th...
[ "os.path.getsize", "socketserver.TCPServer", "os.path.splitext", "datetime.datetime.now", "wsgiref.handlers.format_date_time", "os.path.isdir", "os.path.relpath" ]
[((7721, 7770), 'socketserver.TCPServer', 'socketserver.TCPServer', (['(HOST, PORT)', 'MyWebServer'], {}), '((HOST, PORT), MyWebServer)\n', (7743, 7770), False, 'import socketserver\n'), ((1334, 1348), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (1346, 1348), False, 'from datetime import datetime\n'), ((...
import unittest import unittest.mock def setUpModule(): pass def tearDownModule(): pass class MockDriver: MAX_CONN = 5 LAST_ID = 0 @classmethod def reset(cls): cls.LAST_ID = 0 def __init__(self, env_varname): self.__class__.LAST_ID = self.__class__.LAST_ID + 1 ...
[ "fairways.ci.helpers.getLogger" ]
[((802, 821), 'fairways.ci.helpers.getLogger', 'helpers.getLogger', ([], {}), '()\n', (819, 821), False, 'from fairways.ci import helpers\n')]
from __future__ import division import logging import time import math import sys log = logging.getLogger(__name__) I2C_MASTER_ADDRESS = 0x70 START = '{' END = '}' MOTOR = 0x32 exponential_deadband = .25 exponential_sensitivity = 1 class StackModIO(object): """Modb...
[ "logging.getLogger", "math.pow", "math.sqrt", "math.cos", "sys.exc_info", "math.fabs", "math.atan2", "math.hypot", "math.sin" ]
[((90, 117), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (107, 117), False, 'import logging\n'), ((1118, 1142), 'math.sqrt', 'math.sqrt', (['(x * x + y * y)'], {}), '(x * x + y * y)\n', (1127, 1142), False, 'import math\n'), ((4553, 4569), 'math.hypot', 'math.hypot', (['x', 'y'], {}), ...
# coding: utf-8 """ ELEMENTS API The version of the OpenAPI document: 2 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from elements_sdk.configuration import Configuration class StorageNodeStatus(object): """NOTE: This class is auto generated by...
[ "six.iteritems", "elements_sdk.configuration.Configuration" ]
[((5034, 5067), 'six.iteritems', 'six.iteritems', (['self.openapi_types'], {}), '(self.openapi_types)\n', (5047, 5067), False, 'import six\n'), ((1353, 1368), 'elements_sdk.configuration.Configuration', 'Configuration', ([], {}), '()\n', (1366, 1368), False, 'from elements_sdk.configuration import Configuration\n')]
#!/usr/bin/env python import sys import re if __name__ == '__main__': regex = re.compile('\x1b\[[0-9]*;[0-9]*H') for line in sys.stdin: print(regex.sub('', line).strip())
[ "re.compile" ]
[((82, 117), 're.compile', 're.compile', (['"""\x1b\\\\[[0-9]*;[0-9]*H"""'], {}), "('\\x1b\\\\[[0-9]*;[0-9]*H')\n", (92, 117), False, 'import re\n')]
import sys sys.path.insert(0, '../../../src_python') import nmpccodegen as nmpc import nmpccodegen.tools as tools import nmpccodegen.models as models import nmpccodegen.controller as controller import nmpccodegen.controller.obstacles as obstacles import nmpccodegen.Cfunctions as cfunctions import nmpccodegen.example_mo...
[ "sys.path.insert", "numpy.reshape", "nmpccodegen.example_models.get_trailer_model", "matplotlib.pyplot.xlim", "matplotlib.pyplot.ylim", "nmpccodegen.Cfunctions.IndicatorBoxFunction", "nmpccodegen.controller.Stage_cost_QR", "numpy.diag", "numpy.array", "numpy.zeros", "matplotlib.pyplot.figure", ...
[((11, 52), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""../../../src_python"""'], {}), "(0, '../../../src_python')\n", (26, 52), False, 'import sys\n'), ((685, 770), 'nmpccodegen.tools.Bootstrapper.bootstrap', 'tools.Bootstrapper.bootstrap', (['trailer_controller_location'], {'simulation_tools': '(True)'}), '(tr...
#! /usr/bin/python #-------------------------------------------------------------------- # PROGRAM : read_hdf5.py # CREATED BY : hjkim @IIS.2015-07-13 11:52:15.012270 # MODIFED BY : # # USAGE : $ ./read_hdf5.py # # DESCRIPTION: #------------------------------------------------------cf0.2@20120401 import os,s...
[ "optparse.OptionParser", "h5py.File" ]
[((456, 479), 'h5py.File', 'h5py.File', (['srcPath', '"""r"""'], {}), "(srcPath, 'r')\n", (465, 479), False, 'import h5py\n'), ((1189, 1231), 'optparse.OptionParser', 'OptionParser', ([], {'usage': 'usage', 'version': 'version'}), '(usage=usage, version=version)\n', (1201, 1231), False, 'from optparse import OptionPars...
# 3. Write a program that asks the user to enter a value n, and then computes (1 + 1\2 + 1\3 + ... + 1\n) − # ln(n). The ln function is 'log' in the 'math' module. from math import log n = eval(input('Enter a value: ')) answer = 0 for i in range(1, n + 1): answer += 1 / i answer -= log(n) print(answer)
[ "math.log" ]
[((290, 296), 'math.log', 'log', (['n'], {}), '(n)\n', (293, 296), False, 'from math import log\n')]
import torch from torch import nn from torch.nn import functional as F from torch import optim from torch.autograd import Variable import numpy as np class ConcreteDropout(nn.Module): def __init__(self, weight_regularizer=1e-7, dropout_regularizer=1e-6, init_min=0.1, init_max=0.1): super(C...
[ "torch.mul", "torch.log", "torch.rand_like", "numpy.log", "torch.sigmoid", "torch.pow", "torch.empty" ]
[((712, 739), 'torch.sigmoid', 'torch.sigmoid', (['self.p_logit'], {}), '(self.p_logit)\n', (725, 739), False, 'import torch\n'), ((1525, 1543), 'torch.rand_like', 'torch.rand_like', (['x'], {}), '(x)\n', (1540, 1543), False, 'import torch\n'), ((1756, 1787), 'torch.sigmoid', 'torch.sigmoid', (['(drop_prob / temp)'], {...
#!/usr/bin/env python import sys import os from datetime import datetime import argparse from pyhesity import * parser = argparse.ArgumentParser() parser.add_argument('-v', '--vip', type=str, required=True) parser.add_argument('-u', '--username', type=str, required=True) parser.add_argument('-d', '--domain', type=str...
[ "datetime.datetime.strptime", "os.system", "os.path.join", "argparse.ArgumentParser" ]
[((123, 148), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (146, 148), False, 'import argparse\n'), ((964, 1000), 'os.path.join', 'os.path.join', (['SCRIPTFOLDER', '"""mycron"""'], {}), "(SCRIPTFOLDER, 'mycron')\n", (976, 1000), False, 'import os\n'), ((1011, 1052), 'os.path.join', 'os.path.j...
# Streng kopi af tds artikel import numpy as np import pandas as pd import datetime import matplotlib.pyplot as plt import ipywidgets as widgets import scipy.stats as scs import scipy.optimize as sco import statsmodels.api as sm import scipy.interpolate as sci from pandas_datareader import data as pdr import yfinance ...
[ "datetime.datetime", "numpy.sqrt", "matplotlib.pyplot.ylabel", "numpy.random.random", "matplotlib.pyplot.plot", "numpy.argmax", "numpy.sum", "matplotlib.pyplot.figure", "numpy.zeros", "numpy.dot", "numpy.argmin", "pandas.DataFrame", "matplotlib.pyplot.legend", "pandas_datareader.data.get_d...
[((363, 392), 'datetime.datetime', 'datetime.datetime', (['(2010)', '(1)', '(1)'], {}), '(2010, 1, 1)\n', (380, 392), False, 'import datetime\n'), ((402, 431), 'datetime.datetime', 'datetime.datetime', (['(2020)', '(1)', '(1)'], {}), '(2020, 1, 1)\n', (419, 431), False, 'import datetime\n'), ((619, 646), 'matplotlib.py...
from vectorhub.bi_encoders.qa.tfhub import LAReQA2Vec from ....test_utils import assert_encoder_works def test_lare_qa_works(): """ Testing for LAReQA works """ encoder = LAReQA2Vec() assert_encoder_works(encoder, data_type='text', model_type='bi_encoder')
[ "vectorhub.bi_encoders.qa.tfhub.LAReQA2Vec" ]
[((188, 200), 'vectorhub.bi_encoders.qa.tfhub.LAReQA2Vec', 'LAReQA2Vec', ([], {}), '()\n', (198, 200), False, 'from vectorhub.bi_encoders.qa.tfhub import LAReQA2Vec\n')]
import os import pickle import torch from trainer import Trainer from utils.utils import prepare_data, get_args, read_embedding # TODO: read vocab into a cpu embedding layer def read_vocab(vocab_config): """ :param counter: counter of words in dataset :param vocab_config: word_embedding config: (root, w...
[ "trainer.Trainer", "utils.dataset.SQuAD", "os.path.join", "utils.utils.read_embedding", "os.path.isfile", "utils.utils.prepare_data", "utils.utils.get_args" ]
[((411, 525), 'utils.utils.read_embedding', 'read_embedding', (["vocab_config['embedding_root']", "vocab_config['embedding_type']", "vocab_config['embedding_dim']"], {}), "(vocab_config['embedding_root'], vocab_config[\n 'embedding_type'], vocab_config['embedding_dim'])\n", (425, 525), False, 'from utils.utils impor...
""" Here, the code to get the heatmap of individual channels is present. It assumes that a pretrained model of type GazeStaticSineAndCosineModel is passed on. One has the option to choose the layer of which the heatmap is desired. """ from typing import List, Tuple import matplotlib.pyplot as plt import numpy as np im...
[ "numpy.ceil", "torch.nn.Sequential", "PIL.Image.blend", "eye_model.data_loader_static_sinecosine.remove_eyeless_imgs", "eye_model.data_loader_static_sinecosine.DictEyeImgLoader", "numpy.quantile", "pandas.DataFrame", "torch.no_grad", "matplotlib.pyplot.subplots", "numpy.arange" ]
[((2458, 2488), 'PIL.Image.blend', 'Image.blend', (['img', 'h_img', 'alpha'], {}), '(img, h_img, alpha)\n', (2469, 2488), False, 'from PIL import Image\n'), ((3300, 3363), 'matplotlib.pyplot.subplots', 'plt.subplots', ([], {'figsize': '(20, 3 * nrows)', 'nrows': 'nrows', 'ncols': 'ncols'}), '(figsize=(20, 3 * nrows), n...
""" This script is meant to demonstrate the usage of the pipeline. Please note inline documentation. """ # The general structure of this gait analysis pipeline looks as follows: # # ---- TrajectoryEstimator* --- # / \ # DataLoader*----< ...
[ "pipeline.pipeline.Pipeline", "os.getcwd" ]
[((931, 942), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (940, 942), False, 'import sys, os\n'), ((4107, 4132), 'pipeline.pipeline.Pipeline', 'Pipeline', (['pipeline_config'], {}), '(pipeline_config)\n', (4115, 4132), False, 'from pipeline.pipeline import Pipeline\n')]
# -*- coding: utf-8 -*- import lemoncheesecake.api as lcc from lemoncheesecake.matching import require_that, is_true, is_false from common.base_test import BaseTest SUITE = { "description": "Method 'check_erc20_token'" } @lcc.prop("main", "type") @lcc.prop("positive", "type") @lcc.tags( "api", "database_api...
[ "lemoncheesecake.matching.is_false", "lemoncheesecake.api.depends_on", "lemoncheesecake.matching.is_true", "lemoncheesecake.api.tags", "lemoncheesecake.api.suite", "lemoncheesecake.api.log_info", "lemoncheesecake.api.prop", "lemoncheesecake.api.test", "lemoncheesecake.api.set_step" ]
[((230, 254), 'lemoncheesecake.api.prop', 'lcc.prop', (['"""main"""', '"""type"""'], {}), "('main', 'type')\n", (238, 254), True, 'import lemoncheesecake.api as lcc\n'), ((256, 284), 'lemoncheesecake.api.prop', 'lcc.prop', (['"""positive"""', '"""type"""'], {}), "('positive', 'type')\n", (264, 284), True, 'import lemon...
# Generated by Django 3.2 on 2021-04-17 15:50 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Employee', '0017_alter_rating_note'), ] operations = [ migrations.AddField( model_name='employee', name='img', ...
[ "django.db.models.ImageField" ]
[((331, 385), 'django.db.models.ImageField', 'models.ImageField', ([], {'blank': '(True)', 'null': '(True)', 'upload_to': '""""""'}), "(blank=True, null=True, upload_to='')\n", (348, 385), False, 'from django.db import migrations, models\n')]
# coding: utf-8 import liberty liberty.print_value("hello") liberty.print_value("hello again") liberty.better_print("Hi Tom!")
[ "liberty.better_print", "liberty.print_value" ]
[((32, 60), 'liberty.print_value', 'liberty.print_value', (['"""hello"""'], {}), "('hello')\n", (51, 60), False, 'import liberty\n'), ((61, 95), 'liberty.print_value', 'liberty.print_value', (['"""hello again"""'], {}), "('hello again')\n", (80, 95), False, 'import liberty\n'), ((96, 127), 'liberty.better_print', 'libe...
from helpers import Menu, matrizPrint, Canva, Opciones, Secret from multiprocessing import Process, Pipe, Queue from datetime import datetime from time import sleep def cuadrado_1(p): print('Dibujando Fondo...', end='') startTime = datetime.now() canva = Canva() for col in range(len(canva[0])): ...
[ "multiprocessing.Process", "helpers.Secret", "helpers.Opciones", "time.sleep", "datetime.datetime.now", "helpers.matrizPrint", "helpers.Canva", "helpers.Menu", "multiprocessing.Queue", "multiprocessing.Pipe" ]
[((241, 255), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (253, 255), False, 'from datetime import datetime\n'), ((268, 275), 'helpers.Canva', 'Canva', ([], {}), '()\n', (273, 275), False, 'from helpers import Menu, matrizPrint, Canva, Opciones, Secret\n'), ((726, 740), 'datetime.datetime.now', 'datetime...
''' Created on 4 mai 2017 @author: bhecquet ''' from rest_framework import viewsets from variableServer.models import Variable from variableServer.views.serializers import VariableSerializer class VariableViewSet(viewsets.ModelViewSet): queryset = Variable.objects.all() serializer_class = V...
[ "variableServer.models.Variable.objects.all" ]
[((272, 294), 'variableServer.models.Variable.objects.all', 'Variable.objects.all', ([], {}), '()\n', (292, 294), False, 'from variableServer.models import Variable\n')]
# setup.py import os, sys, re # get version info from module without importing it version_re = re.compile("""__version__[\s]*=[\s]*['|"](.*)['|"]""") with open('hello_world.py') as f: content = f.read() match = version_re.search(content) version = match.group(1) readme = os.path.join(os.path.dirname(__f...
[ "os.path.dirname", "setuptools.find_packages", "setuptools.setup", "re.compile" ]
[((97, 151), 're.compile', 're.compile', (['"""__version__[\\\\s]*=[\\\\s]*[\'|"](.*)[\'|"]"""'], {}), '(\'__version__[\\\\s]*=[\\\\s]*[\\\'|"](.*)[\\\'|"]\')\n', (107, 151), False, 'import os, sys, re\n'), ((301, 326), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (316, 326), False, 'import...
from django.test import SimpleTestCase from unicef_locations.tests.factories import CartoDBTableFactory, GatewayTypeFactory, LocationFactory def test_point_lat_long(location): assert isinstance(location.point_lat_long, str) class TestStrUnicode(SimpleTestCase): '''Ensure calling str() on model instances re...
[ "unicef_locations.tests.factories.LocationFactory.build", "unicef_locations.tests.factories.CartoDBTableFactory.build", "unicef_locations.tests.factories.GatewayTypeFactory.build" ]
[((402, 438), 'unicef_locations.tests.factories.GatewayTypeFactory.build', 'GatewayTypeFactory.build', ([], {'name': '"""xyz"""'}), "(name='xyz')\n", (426, 438), False, 'from unicef_locations.tests.factories import CartoDBTableFactory, GatewayTypeFactory, LocationFactory\n'), ((515, 561), 'unicef_locations.tests.factor...
import torch from torch.utils.data.dataset import Dataset import numpy as np from path import DATA_PATH import os.path as osp import cv2 import matplotlib.pyplot as plt import torchvision.transforms.functional as F from albumentations import ( BboxParams, HorizontalFlip, RandomSizedBBoxSafeCrop, RandomC...
[ "torchvision.transforms.functional.to_tensor", "torch.as_tensor", "albumentations.BboxParams", "os.path.join", "flyai.dataset.Dataset", "torch.tensor", "cv2.cvtColor", "cv2.imread", "albumentations.RandomSizedBBoxSafeCrop", "albumentations.HorizontalFlip" ]
[((3660, 3686), 'flyai.dataset.Dataset', 'Dataset', ([], {'epochs': '(1)', 'batch': '(4)'}), '(epochs=1, batch=4)\n', (3667, 3686), False, 'from flyai.dataset import Dataset\n'), ((904, 931), 'torchvision.transforms.functional.to_tensor', 'F.to_tensor', (["bunch['image']"], {}), "(bunch['image'])\n", (915, 931), True, ...
from PyQt5 import QtCore, QtWidgets class UI(object): def setupUi(self, GUI): GUI.setObjectName("GUI") GUI.setEnabled(True) GUI.resize(497, 447) GUI.setAutoFillBackground(False) self.phoneNumber = QtWidgets.QLineEdit(GUI) self.phoneNumber.setGeometry(QtCore.QRect(90...
[ "PyQt5.QtWidgets.QPlainTextEdit", "PyQt5.QtCore.QMetaObject.connectSlotsByName", "PyQt5.QtCore.QRect", "PyQt5.QtWidgets.QLabel", "PyQt5.QtWidgets.QPushButton", "PyQt5.QtWidgets.QLineEdit" ]
[((243, 267), 'PyQt5.QtWidgets.QLineEdit', 'QtWidgets.QLineEdit', (['GUI'], {}), '(GUI)\n', (262, 267), False, 'from PyQt5 import QtCore, QtWidgets\n'), ((413, 442), 'PyQt5.QtWidgets.QPlainTextEdit', 'QtWidgets.QPlainTextEdit', (['GUI'], {}), '(GUI)\n', (437, 442), False, 'from PyQt5 import QtCore, QtWidgets\n'), ((575...
import torch import matplotlib.pyplot as plt from torch.nn import functional as F import numpy as np from seqwise_cont_skillspace.algo.algo_cont_skillspace import \ SeqwiseAlgoRevisedContSkills import self_supervised.utils.typed_dicts as td from self_supervised.base.replay_buffer.env_replay_buffer import \ No...
[ "torch.nn.functional.mse_loss", "matplotlib.pyplot.gcf", "matplotlib.pyplot.clf", "seqwise_cont_skillspace.utils.get_colors.get_colors", "matplotlib.pyplot.close", "rlkit.torch.pytorch_util.from_numpy", "rlkit.torch.pytorch_util.get_numpy", "numpy.stack", "matplotlib.pyplot.interactive", "torch.no...
[((539, 554), 'torch.no_grad', 'torch.no_grad', ([], {}), '()\n', (552, 554), False, 'import torch\n'), ((2175, 2190), 'torch.no_grad', 'torch.no_grad', ([], {}), '()\n', (2188, 2190), False, 'import torch\n'), ((1950, 1996), 'torch.nn.functional.mse_loss', 'F.mse_loss', (['pred_skill_dist_seq', 'mode[:, 0, :]'], {}), ...
import re, hashlib, base64, os, sys from os.path import exists, dirname, basename, isdir from . import urlregexps from . import utils from .utils import join, normpath, abspath, relpath # from . import buildsystem #not directly used class RewriterError(Exception): def __init__(self, value): self.value = value...
[ "os.path.exists", "os.listdir", "base64.urlsafe_b64encode", "os.path.dirname", "re.finditer", "os.path.basename", "re.sub", "re.search" ]
[((577, 591), 'os.path.dirname', 'dirname', (['fpath'], {}), '(fpath)\n', (584, 591), False, 'from os.path import exists, dirname, basename, isdir\n'), ((650, 682), 're.finditer', 're.finditer', (['rr_ref_re', 'contents'], {}), '(rr_ref_re, contents)\n', (661, 682), False, 'import re, hashlib, base64, os, sys\n'), ((17...
from __future__ import absolute_import import datetime from django.db import models from django.utils.translation import ugettext_lazy as _ def standalone_number(self): return 1 class Numbers(object): @staticmethod def get_static_number(self): return 2 @classmethod def get_class_number...
[ "django.utils.translation.ugettext_lazy", "django.db.models.IntegerField", "django.db.models.ForeignKey", "django.db.models.ManyToManyField", "django.db.models.DateTimeField", "django.db.models.CharField" ]
[((535, 559), 'django.db.models.ForeignKey', 'models.ForeignKey', (['Group'], {}), '(Group)\n', (552, 559), False, 'from django.db import models\n'), ((603, 666), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'blank': '(True)', 'default': 'datetime.datetime.now'}), '(blank=True, default=datetime.datet...
import os, pickle, re, subprocess, itertools import numpy as np, pandas as pd, matplotlib.pyplot as plt import matplotlib.colors as colors from mpl_toolkits.axes_grid1 import make_axes_locatable from matplotlib import cm from matplotlib.colors import ListedColormap, LinearSegmentedColormap from datetime import datetim...
[ "matplotlib.cm.get_cmap", "datetime.datetime.utcnow", "os.path.join", "matplotlib.colors.ListedColormap", "matplotlib.pyplot.close", "numpy.zeros", "numpy.linspace", "os.path.basename", "mpl_toolkits.axes_grid1.make_axes_locatable", "astropy.io.fits.open", "matplotlib.colors.SymLogNorm", "matp...
[((541, 561), 'astropy.io.fits.open', 'fits.open', (['fits_file'], {}), '(fits_file)\n', (550, 561), False, 'from astropy.io import fits\n'), ((1266, 1282), 'matplotlib.pyplot.close', 'plt.close', (['"""all"""'], {}), "('all')\n", (1275, 1282), True, 'import numpy as np, pandas as pd, matplotlib.pyplot as plt\n'), ((13...
import random from keras.utils import Sequence from utilities.augmentations import * from Preprocessor import Preprocessor class DataGenerator(Sequence): def __init__(self, list_ids, labels=None, batch_size=1, img_size=(512, 512, 3), img_dir=TRAIN_DIR_STAGE_2, shuffle=True, n_classes=2): ...
[ "random.randint", "Preprocessor.Preprocessor.preprocess" ]
[((2387, 2454), 'Preprocessor.Preprocessor.preprocess', 'Preprocessor.preprocess', (["(self.img_dir + self.list_ids[idx] + '.dcm')"], {}), "(self.img_dir + self.list_ids[idx] + '.dcm')\n", (2410, 2454), False, 'from Preprocessor import Preprocessor\n'), ((3124, 3191), 'Preprocessor.Preprocessor.preprocess', 'Preprocess...
#!/usr/bin/env python """ Show distribution after a change of variables with y = x^(1/2), where the pdf for x is Gaussian """ import matplotlib.pyplot as pl from scipy.stats import norm import numpy as np # normal distribution mu = 5. # the mean, mu sigma = 1 # standard deviations, sigma x = np.linspace(0, 10, 1000...
[ "matplotlib.pyplot.savefig", "numpy.sqrt", "matplotlib.pyplot.gca", "numpy.linspace", "matplotlib.pyplot.figure", "scipy.stats.norm.pdf", "matplotlib.pyplot.rc", "matplotlib.pyplot.show" ]
[((297, 321), 'numpy.linspace', 'np.linspace', (['(0)', '(10)', '(1000)'], {}), '(0, 10, 1000)\n', (308, 321), True, 'import numpy as np\n'), ((367, 393), 'matplotlib.pyplot.rc', 'pl.rc', (['"""text"""'], {'usetex': '(True)'}), "('text', usetex=True)\n", (372, 393), True, 'import matplotlib.pyplot as pl\n'), ((394, 423...
from math import sqrt def distance(x0, y0, x1, y1) -> float: return sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2) def move_negativity(num1, num2): if (num2 < 0 and num1 < 0) or (num2 > 0 and num1 > 0) or (num2 == 0): return num1 return -num1 def num_in_interval(num, min, max) -> bool: return min ...
[ "math.sqrt" ]
[((74, 111), 'math.sqrt', 'sqrt', (['((x0 - x1) ** 2 + (y0 - y1) ** 2)'], {}), '((x0 - x1) ** 2 + (y0 - y1) ** 2)\n', (78, 111), False, 'from math import sqrt\n')]
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name = "otter-grader", version = "0.3.9", author = "UC Berkeley Division of Data Science and Information", author_email = "<EMAIL>", description = "Jupyter Notebook Autograder", long_description = long_descripti...
[ "setuptools.find_packages" ]
[((467, 493), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (491, 493), False, 'import setuptools\n')]
from django.urls import path from . import views urlpatterns = [ path('', views.about_page, name='about_page_uid'), path('hidden/', views.hidden_about, name='about_page_hidden_uid'), ]
[ "django.urls.path" ]
[((70, 119), 'django.urls.path', 'path', (['""""""', 'views.about_page'], {'name': '"""about_page_uid"""'}), "('', views.about_page, name='about_page_uid')\n", (74, 119), False, 'from django.urls import path\n'), ((125, 190), 'django.urls.path', 'path', (['"""hidden/"""', 'views.hidden_about'], {'name': '"""about_page_...
import logging _LOG = logging.getLogger(__name__) def cmd_steamid(args): from steam.steamid import SteamID if args.s_input.startswith('http'): _LOG.debug("Input is URL. Making online request to resolve SteamID") s = SteamID.from_url(args.s_input) or SteamID() else: s = SteamID(ar...
[ "logging.getLogger", "steam.steamid.SteamID.from_url", "steam.steamid.SteamID" ]
[((24, 51), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (41, 51), False, 'import logging\n'), ((310, 331), 'steam.steamid.SteamID', 'SteamID', (['args.s_input'], {}), '(args.s_input)\n', (317, 331), False, 'from steam.steamid import SteamID\n'), ((244, 274), 'steam.steamid.SteamID.from...
from scipy.stats.stats import pearsonr import matplotlib.pyplot as plt import numpy as np # compute correlation between features def compute_correlation(Xtrain): for i in range(0, Xtrain.shape[1]): for j in range(i+1, Xtrain.shape[1]): correlation = pearsonr(Xtrain[:, i], Xtrain[:, j])[0] ...
[ "matplotlib.pyplot.plot", "numpy.exp", "numpy.argsort", "scipy.stats.stats.pearsonr", "numpy.min", "matplotlib.pyplot.title", "matplotlib.pyplot.show" ]
[((550, 559), 'numpy.exp', 'np.exp', (['Y'], {}), '(Y)\n', (556, 559), True, 'import numpy as np\n'), ((572, 593), 'numpy.argsort', 'np.argsort', (['Y'], {'axis': '(0)'}), '(Y, axis=0)\n', (582, 593), True, 'import numpy as np\n'), ((598, 612), 'matplotlib.pyplot.title', 'plt.title', (['"""Y"""'], {}), "('Y')\n", (607,...
import datetime import random import time import sqlite3 def random_date(): return datetime.date.fromtimestamp(random.randint(1451602800, 1546297199)).strftime('%Y-%m-%d') def random_ipv6(): return bytearray(random.getrandbits(8) for _ in range(3)) + b'\x00'*13 if __name__ == "__main__": ## Setup ...
[ "random.getrandbits", "time.perf_counter_ns", "random.randint", "sqlite3.connect" ]
[((353, 380), 'sqlite3.connect', 'sqlite3.connect', (['""":memory:"""'], {}), "(':memory:')\n", (368, 380), False, 'import sqlite3\n'), ((2334, 2356), 'time.perf_counter_ns', 'time.perf_counter_ns', ([], {}), '()\n', (2354, 2356), False, 'import time\n'), ((3019, 3041), 'time.perf_counter_ns', 'time.perf_counter_ns', (...
#贪心法 import pandas as pd import numpy as np import math import torch import time def getset(citynumber,samples): torch.manual_seed(66) data_set = [] for l in range(samples): #生成在坐标在0 1 之间的 x = torch.FloatTensor(2, citynumber*2).uniform_(0, 1) data_set.append(x) retur...
[ "torch.manual_seed", "time.clock", "math.sqrt", "numpy.array", "numpy.zeros", "torch.FloatTensor" ]
[((482, 500), 'numpy.zeros', 'np.zeros', (['(10, 10)'], {}), '((10, 10))\n', (490, 500), True, 'import numpy as np\n'), ((124, 145), 'torch.manual_seed', 'torch.manual_seed', (['(66)'], {}), '(66)\n', (141, 145), False, 'import torch\n'), ((785, 797), 'time.clock', 'time.clock', ([], {}), '()\n', (795, 797), False, 'im...
import kubernetes as k8s import reloader import os, sys import json from http.server import HTTPServer, BaseHTTPRequestHandler from urllib.parse import urlparse, parse_qsl import traceback class SimpleServer(BaseHTTPRequestHandler): def _parse_url(self, path): return urlparse(self.path).path, dict(parse_qs...
[ "reloader.executor.submit", "kubernetes.config.load_incluster_config", "urllib.parse.urlparse", "reloader.main", "http.server.HTTPServer", "kubernetes.client.ApiClient", "urllib.parse.parse_qsl", "traceback.print_exc" ]
[((3351, 3391), 'http.server.HTTPServer', 'HTTPServer', (['server_address', 'SimpleServer'], {}), '(server_address, SimpleServer)\n', (3361, 3391), False, 'from http.server import HTTPServer, BaseHTTPRequestHandler\n'), ((3496, 3542), 'reloader.executor.submit', 'reloader.executor.submit', (['run', '"""0.0.0.0"""', '(5...