code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import scrapy from scrapy.crawler import CrawlerProcess # This class is the main spider class. It will crawl the main website. class MantraSpider(scrapy.Spider): name = "mantraspider" def start_requests(self): start_urls = [ "https://www.upanishads.iitk.ac.in/aitereya", "http...
[ "scrapy.Request", "scrapy.crawler.CrawlerProcess" ]
[((1818, 1925), 'scrapy.crawler.CrawlerProcess', 'CrawlerProcess', ([], {'settings': "{'FEED_FORMAT': 'csv', 'FEED_URI': '../../data/raw/upanishads/upanishads.csv'}"}), "(settings={'FEED_FORMAT': 'csv', 'FEED_URI':\n '../../data/raw/upanishads/upanishads.csv'})\n", (1832, 1925), False, 'from scrapy.crawler import Cr...
#!flask/bin/python import base64 from flask import Flask, jsonify, make_response from flask.ext.httpauth import HTTPBasicAuth from flask.ext.restful import Api, Resource from resources.repo_list import RepoList from resources.repo_action import RepoAction from resources.pkg import Pkg # App Definition auth = HTTPBasic...
[ "flask.ext.httpauth.HTTPBasicAuth", "flask.Flask", "base64.b64decode", "flask.jsonify", "flask.ext.restful.Api" ]
[((311, 326), 'flask.ext.httpauth.HTTPBasicAuth', 'HTTPBasicAuth', ([], {}), '()\n', (324, 326), False, 'from flask.ext.httpauth import HTTPBasicAuth\n'), ((334, 369), 'flask.Flask', 'Flask', (['__name__'], {'static_url_path': '""""""'}), "(__name__, static_url_path='')\n", (339, 369), False, 'from flask import Flask, ...
import Nn import numpy as np import tensorflow as tf import tensorflow_probability as tfp from utils.tf2_utils import show_graph, get_TensorSpecs, gaussian_clip_rsample, gaussian_likelihood_sum, gaussian_entropy from Algorithms.tf2algos.base.on_policy import On_Policy class PPO(On_Policy): ''' Proximal Policy...
[ "Nn.critic_v", "tensorflow.reduce_sum", "tensorflow.clip_by_value", "tensorflow.maximum", "numpy.ones", "Nn.actor_mu", "tensorflow.nn.log_softmax", "tensorflow_probability.distributions.Categorical", "tensorflow.minimum", "tensorflow.exp", "utils.tf2_utils.gaussian_entropy", "tensorflow.reduce...
[((10804, 10847), 'tensorflow.function', 'tf.function', ([], {'experimental_relax_shapes': '(True)'}), '(experimental_relax_shapes=True)\n', (10815, 10847), True, 'import tensorflow as tf\n'), ((13473, 13516), 'tensorflow.function', 'tf.function', ([], {'experimental_relax_shapes': '(True)'}), '(experimental_relax_shap...
#!/usr/bin/env python # -*- coding:utf-8 -*- # @Author: SHF # @Email: <EMAIL> # @Date: 2020-09-15 16:06:14 import requests AK = '<KEY>' # AK = '<KEY>' # key def Pos2Coord(name): ''' @func: ้€š่ฟ‡็™พๅบฆๅœฐๅ›พAPIๅฐ†ๅœฐ็†ๅ็งฐ่ฝฌๆขๆˆ็ป็บฌๅบฆ @note: ๅฎ˜ๆ–นๆ–‡ๆกฃ http://lbsyun.baidu.com/index.php?title=webapi/guide/webservice-geocodin...
[ "requests.get" ]
[((610, 627), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (622, 627), False, 'import requests\n'), ((1672, 1689), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (1684, 1689), False, 'import requests\n')]
from plivo.utils import jwt import time # using valid_from in epoch and lifetime in seconds token = jwt.AccessToken('{authId}', '{authToken}', '{endpointUsername}', valid_from=time.time(), lifetime=300, uid='{uid}') # grants(incoming:bool, outgoing:bool) token.add_voice_grants(True, True) print(token.to_jwt()) # usi...
[ "time.time" ]
[((177, 188), 'time.time', 'time.time', ([], {}), '()\n', (186, 188), False, 'import time\n'), ((442, 453), 'time.time', 'time.time', ([], {}), '()\n', (451, 453), False, 'import time\n')]
import sys import os import numpy as np from pprint import pprint from datetime import datetime from datetime import timedelta import mysql.connector import math import matplotlib.pyplot as plt from scipy import stats #database connection cnx = mysql.connector.connect(user='root', password='<PASSWORD>', host='localhos...
[ "matplotlib.pyplot.show", "matplotlib.pyplot.subplot2grid", "numpy.isnan", "datetime.datetime.utcfromtimestamp", "matplotlib.pyplot.figure", "numpy.array", "scipy.stats.linregress", "matplotlib.pyplot.subplots_adjust", "os.chdir", "matplotlib.pyplot.savefig" ]
[((1869, 1886), 'numpy.array', 'np.array', (['Cont_co'], {}), '(Cont_co)\n', (1877, 1886), True, 'import numpy as np\n'), ((1894, 1911), 'numpy.array', 'np.array', (['Cont_bc'], {}), '(Cont_bc)\n', (1902, 1911), True, 'import numpy as np\n'), ((2024, 2064), 'scipy.stats.linregress', 'stats.linregress', (['varx[mask]', ...
# Lint as: python3 # Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
[ "tensorflow.test.main", "pyiree.tf.support.tf_test_utils.compile_tf_module", "tensorflow.keras.losses.MeanSquaredError", "pyiree.tf.support.tf_utils.set_random_seed", "tensorflow.keras.layers.Dense", "tensorflow.enable_v2_behavior", "numpy.random.randn", "tensorflow.keras.optimizers.get", "numpy.exp...
[((852, 972), 'absl.flags.DEFINE_string', 'flags.DEFINE_string', (['"""optimizer_name"""', '"""sgd"""', '"""optimizer name: sgd, rmsprop, nadam, adamax, adam, adagrad, adadelta"""'], {}), "('optimizer_name', 'sgd',\n 'optimizer name: sgd, rmsprop, nadam, adamax, adam, adagrad, adadelta')\n", (871, 972), False, 'from...
import io import gc import traceback import subprocess import numpy as np import pandas as pd import matplotlib.pyplot as plt from fastprogress.fastprogress import master_bar, progress_bar import torch import torch.nn as nn import torch.optim as optim from torch.utils.data import Dataset, DataLoader import albumentat...
[ "albumentations.pytorch.ToTensorV2", "albumentations.NoOp", "io.BytesIO", "traceback.print_exc", "torch.utils.data.DataLoader", "subprocess.check_output", "torch.load", "fastprogress.fastprogress.progress_bar", "torch.save", "gc.collect", "numpy.min", "numpy.max", "torch.cuda.empty_cache", ...
[((891, 917), 'torch.save', 'torch.save', (['self', 'filename'], {}), '(self, filename)\n', (901, 917), False, 'import torch\n'), ((2098, 2106), 'albumentations.NoOp', 'A.NoOp', ([], {}), '()\n', (2104, 2106), True, 'import albumentations as A\n'), ((2519, 2527), 'albumentations.NoOp', 'A.NoOp', ([], {}), '()\n', (2525...
""" This module is used to display the Density of States (DoS). """ from futile.Utils import write as safe_print AU_eV = 27.21138386 class DiracSuperposition(): """ Defines as superposition of Dirac deltas which can be used to plot the density of states """ def __init__(self, dos, wgts=[1.0]): ...
[ "numpy.abs", "numpy.ravel", "matplotlib.pyplot.axes", "matplotlib.widgets.Slider", "numpy.arange", "numpy.exp", "matplotlib.pyplot.axvline", "futile.Figures.VertSlider", "numpy.max", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show", "matplotlib.pyplot.ylim", "matplotlib.pyplot.legend",...
[((14705, 16163), 'numpy.array', 'np.array', (['[-0.815924953235059, -0.803163374736654, -0.780540200987971, -\n 0.7508806541364, -0.723626807289917, -0.714924448617026, -\n 0.710448085701742, -0.68799028016451, -0.67247569974853, -\n 0.659038909236607, -0.625396293324399, -0.608009041659988, -\n 0.56533791...
from textwrap import dedent from jumpscale.sals.chatflows.chatflows import chatflow_step from jumpscale.packages.vdc_dashboard.sals.solutions_chatflow import SolutionsChatflowDeploy class Publisher(SolutionsChatflowDeploy): SOLUTION_TYPE = "publishingtools" HELM_REPO_NAME = "marketplace" CHART_NAME = "pu...
[ "textwrap.dedent", "jumpscale.sals.chatflows.chatflows.chatflow_step" ]
[((1732, 1769), 'jumpscale.sals.chatflows.chatflows.chatflow_step', 'chatflow_step', ([], {'title': '"""Configurations"""'}), "(title='Configurations')\n", (1745, 1769), False, 'from jumpscale.sals.chatflows.chatflows import chatflow_step\n'), ((1132, 1692), 'textwrap.dedent', 'dedent', (['f""" Few parameters ar...
import requests # EventsManager Configuration # BEGIN r = requests.get('http://192.168.1.100:5002/eventsManager/v1.1/internal/') print('{:30} - {:>20}'.format('EventsManager ', r.json().__str__())) # END # Facebook Configuration # BEGIN r = requests.get('http://192.168.1.100:5003/facebook/v1.0/internal/') print('{:3...
[ "requests.post", "requests.get" ]
[((59, 129), 'requests.get', 'requests.get', (['"""http://192.168.1.100:5002/eventsManager/v1.1/internal/"""'], {}), "('http://192.168.1.100:5002/eventsManager/v1.1/internal/')\n", (71, 129), False, 'import requests\n'), ((244, 309), 'requests.get', 'requests.get', (['"""http://192.168.1.100:5003/facebook/v1.0/internal...
import pytz import datetime import bspump.common import bspump.unittest class CustomTimeNormalizer(bspump.common.TimeZoneNormalizer): def process(self, context, event): native_time = event["@timestamp"] local_time = self.normalize(native_time) return local_time class TestCustomTimeZoneNormalizer(bspump.unit...
[ "datetime.datetime" ]
[((676, 740), 'datetime.datetime', 'datetime.datetime', (['(2000)', '(12)', '(30)', '(22)', '(59)', '(59)', '(59)'], {'tzinfo': 'pytz.UTC'}), '(2000, 12, 30, 22, 59, 59, 59, tzinfo=pytz.UTC)\n', (693, 740), False, 'import datetime\n'), ((436, 483), 'datetime.datetime', 'datetime.datetime', (['(2000)', '(12)', '(30)', '...
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 import shutil from pre_wigs_validation.enums import ValidationEnforcement, ValidationResult from pre_wigs_validation.instance import ValidationInstance from pre_wigs_validation.dataclasses import ValidationOutpu...
[ "shutil.disk_usage", "pre_wigs_validation.dataclasses.ValidationOutput" ]
[((1452, 1474), 'shutil.disk_usage', 'shutil.disk_usage', (['"""/"""'], {}), "('/')\n", (1469, 1474), False, 'import shutil\n'), ((2428, 2571), 'pre_wigs_validation.dataclasses.ValidationOutput', 'ValidationOutput', ([], {'validation': 'cls.validation', 'result': 'ValidationResult.FAIL', 'enforcement': 'cls.enforcement...
#!/usr/bin/python3 import pyspark.sql import pyspark.sql.functions import pyspark.sql.types import time import datetime KAFKA_ADDRESS = "localhost:9092" KAFKA_TOPIC = "Logs" FILENAME = "apache-access-log.txt" # Create spark session sparksession = pyspark.sql.SparkSession.builder.appName("LogAggregator").getOrCreate(...
[ "datetime.timedelta", "time.perf_counter", "time.sleep" ]
[((1720, 1739), 'time.perf_counter', 'time.perf_counter', ([], {}), '()\n', (1737, 1739), False, 'import time\n'), ((1809, 1838), 'datetime.timedelta', 'datetime.timedelta', ([], {'seconds': 'i'}), '(seconds=i)\n', (1827, 1838), False, 'import datetime\n'), ((1944, 1963), 'time.perf_counter', 'time.perf_counter', ([], ...
# -*- coding: utf-8 -*- from __future__ import print_function import os import vaex.dataset as dataset import numpy as np import unittest import vaex as vx import tempfile import vaex.server.tornado_server import astropy.io.fits import astropy.units import pandas as pd import vaex.execution import contextlib a = vaex.e...
[ "vaex.dataset.select", "os.remove", "vaex.dataset.length_original", "numpy.random.seed", "numpy.sum", "vaex.from_scalars", "vaex.server", "numpy.ones", "vaex.set_log_level_exception", "vaex.dataset.set_current_row", "numpy.isnan", "vaex.dataset.DatasetArrays", "numpy.arange", "numpy.random...
[((399, 424), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (414, 424), False, 'import os\n'), ((1216, 1244), 'vaex.set_log_level_exception', 'vx.set_log_level_exception', ([], {}), '()\n', (1242, 1244), True, 'import vaex as vx\n'), ((71768, 71783), 'unittest.main', 'unittest.main', ([], {}...
from collections import namedtuple from datetime import datetime import pytz import requests from dateutil import parser from requests import RequestException from commcare_cloud.alias import commcare_cloud from commcare_cloud.cli_utils import ask from commcare_cloud.colors import color_warning, color_notice, color_s...
[ "commcare_cloud.colors.color_warning", "commcare_cloud.commands.deploy.utils.announce_deploy_start", "commcare_cloud.commands.ansible.helpers.AnsibleContext", "datetime.datetime.utcnow", "commcare_cloud.commands.utils.timeago", "commcare_cloud.commands.terraform.aws.get_default_username", "commcare_clou...
[((1288, 1350), 'collections.namedtuple', 'namedtuple', (['"""VersionInfo"""', '"""commit, message, time, build_time"""'], {}), "('VersionInfo', 'commit, message, time, build_time')\n", (1298, 1350), False, 'from collections import namedtuple\n'), ((2054, 2125), 'commcare_cloud.github.github_repo', 'github_repo', (['""...
import numpy as np import pytest import torch from torch.utils.data import TensorDataset from doppelganger import (ContinuousOutput, DGTorch, DiscreteOutput, Normalization, Output, OutputType, prepare_data) @pytest.fixture def dg_model() -> DGTorch: attribute_outputs = [ Continu...
[ "doppelganger.DGTorch", "doppelganger.prepare_data", "doppelganger.ContinuousOutput", "pytest.raises", "doppelganger.DiscreteOutput", "torch.Tensor", "numpy.random.randint", "numpy.random.rand", "doppelganger.Output" ]
[((918, 972), 'doppelganger.DGTorch', 'DGTorch', (['attribute_outputs', '[]', 'feature_outputs', '(20)', '(5)'], {}), '(attribute_outputs, [], feature_outputs, 20, 5)\n', (925, 972), False, 'from doppelganger import ContinuousOutput, DGTorch, DiscreteOutput, Normalization, Output, OutputType, prepare_data\n'), ((1875, ...
import torch import torch.nn.functional as F from torch import nn class DropBlock1D(nn.Module): """ Args: drop_prob (float): probability of an element to be dropped. block_size (int): size of the block to drop Shape: - Input: `(N, C, S)` - Output: `(N, C, S)` .. _DropBl...
[ "torch.nn.functional.max_pool1d", "torch.rand" ]
[((1461, 1570), 'torch.nn.functional.max_pool1d', 'F.max_pool1d', ([], {'input': 'mask[:, None, :]', 'kernel_size': 'self.block_size', 'stride': '(1)', 'padding': '(self.block_size // 2)'}), '(input=mask[:, None, :], kernel_size=self.block_size, stride=1,\n padding=self.block_size // 2)\n', (1473, 1570), True, 'impo...
from flask import render_template, jsonify from app import app import random import io from flask import Response from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure import pandas as pd import matplotlib.pyplot as plt import matplotlib.ticker as ti...
[ "os.remove", "matplotlib.dates.MonthLocator", "numpy.amin", "pandas.read_csv", "os.path.isfile", "flask.jsonify", "matplotlib.pyplot.figure", "random.randint", "matplotlib.backends.backend_agg.FigureCanvasAgg", "matplotlib.dates.DateFormatter", "flask.render_template", "matplotlib.pyplot.subpl...
[((593, 625), 'pandas.plotting.register_matplotlib_converters', 'register_matplotlib_converters', ([], {}), '()\n', (623, 625), False, 'from pandas.plotting import register_matplotlib_converters\n'), ((883, 905), 'pandas.read_csv', 'pd.read_csv', (['"""DIS.csv"""'], {}), "('DIS.csv')\n", (894, 905), True, 'import panda...
import logging from typing import Any, Dict from pytest_zebrunner.context import zebrunner_context logger = logging.getLogger(__name__) class SeleniumSession: def __init__(self, reporting_service) -> None: # type: ignore self._active_sessions: Dict[str, Any] = {} self.reporting_service = report...
[ "logging.getLogger" ]
[((110, 137), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (127, 137), False, 'import logging\n')]
# Copyright 2022 Huawei Technologies Co., Ltd # # 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 a...
[ "mindspore.ops.op_info_register.TBERegOp", "mindspore.ops.op_info_register.op_info_register" ]
[((1545, 1593), 'mindspore.ops.op_info_register.op_info_register', 'op_info_register', (['p_s_r_o_i_pooling_grad_op_info'], {}), '(p_s_r_o_i_pooling_grad_op_info)\n', (1561, 1593), False, 'from mindspore.ops.op_info_register import op_info_register, TBERegOp, DataType\n'), ((826, 854), 'mindspore.ops.op_info_register.T...
import h5py import numpy as np from sklearn import svm import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from sklearn.utils import shuffle rbfSigma = 0.1 def readFile(filename): with h5py.File(filename, 'r') as f: a_group...
[ "matplotlib.pyplot.title", "numpy.absolute", "sklearn.preprocessing.StandardScaler", "numpy.argmax", "sklearn.model_selection.train_test_split", "numpy.mean", "matplotlib.pyplot.contourf", "numpy.arange", "sklearn.svm.SVC", "numpy.copy", "numpy.power", "numpy.append", "h5py.File", "matplot...
[((685, 721), 'numpy.zeros', 'np.zeros', (['(X1.shape[0], X2.shape[0])'], {}), '((X1.shape[0], X2.shape[0]))\n', (693, 721), True, 'import numpy as np\n'), ((1002, 1038), 'numpy.zeros', 'np.zeros', (['(X1.shape[0], X2.shape[0])'], {}), '((X1.shape[0], X2.shape[0]))\n', (1010, 1038), True, 'import numpy as np\n'), ((327...
import os import re import sublime import sublime_plugin try: # Python 3 from .haxe_helper import HaxeComplete_inst from .haxe_generate_code_helper import is_haxe_scope except (ValueError): # Python 2 from haxe_helper import HaxeComplete_inst from haxe_generate_code_helper import is_haxe_scope re_ty...
[ "haxe_helper.HaxeComplete_inst", "haxe_generate_code_helper.is_haxe_scope", "sublime.status_message", "os.path.relpath", "re.compile" ]
[((325, 396), 're.compile', 're.compile', (['"""(abstract|class|enum|interface|typedef)\\\\s*\\\\b([\\\\w]*)\\\\b"""'], {}), "('(abstract|class|enum|interface|typedef)\\\\s*\\\\b([\\\\w]*)\\\\b')\n", (335, 396), False, 'import re\n'), ((407, 442), 're.compile', 're.compile', (['"""package\\\\s*([\\\\w.]*);"""'], {}), "...
from django.shortcuts import render, redirect, get_object_or_404 from .models import HottProfile from .forms import ProfileEditForm from django.contrib.auth.mixins import LoginRequiredMixin from django.views.generic import UpdateView from django.urls import reverse_lazy def profile_view(request, username=None): ...
[ "django.shortcuts.render", "django.shortcuts.get_object_or_404", "django.shortcuts.redirect" ]
[((533, 588), 'django.shortcuts.get_object_or_404', 'get_object_or_404', (['HottProfile'], {'user__username': 'username'}), '(HottProfile, user__username=username)\n', (550, 588), False, 'from django.shortcuts import render, redirect, get_object_or_404\n'), ((699, 746), 'django.shortcuts.render', 'render', (['request',...
""" Class for creating and using connections to Google Drive. Special note: API access is presumed to be through a user and not a service acct. Last modified: Dec 2016 By: <NAME> """ from __future__ import print_function import httplib2 import os import sys import logging import base64 from email.mime.tex...
[ "oauth2client.tools.argparser.parse_args", "oauth2client.file.Storage", "apiclient.discovery.build", "httplib2.Http", "os.path.basename", "email.mime.text.MIMEText", "os.path.dirname", "oauth2client.client.flow_from_clientsecrets", "os.path.realpath", "oauth2client.tools.run_flow", "logging.info...
[((1233, 1263), 'oauth2client.tools.argparser.parse_args', 'tools.argparser.parse_args', (['[]'], {}), '([])\n', (1259, 1263), False, 'from oauth2client import tools\n'), ((2075, 2099), 'oauth2client.file.Storage', 'Storage', (['credential_path'], {}), '(credential_path)\n', (2082, 2099), False, 'from oauth2client.file...
from urllib.request import urlopen from bs4 import BeautifulSoup import pandas as pd #import re #from urllib.parse import urlencode #from urllib.error import HTTPError uasgs_url = "http://www.comprasnet.gov.br/livre/uasg/Catalogo_Resp.asp" response = urlopen(uasgs_url) html = response.read() soup = BeautifulSoup(html...
[ "bs4.BeautifulSoup", "urllib.request.urlopen", "pandas.DataFrame" ]
[((252, 270), 'urllib.request.urlopen', 'urlopen', (['uasgs_url'], {}), '(uasgs_url)\n', (259, 270), False, 'from urllib.request import urlopen\n'), ((302, 336), 'bs4.BeautifulSoup', 'BeautifulSoup', (['html', '"""html.parser"""'], {}), "(html, 'html.parser')\n", (315, 336), False, 'from bs4 import BeautifulSoup\n'), (...
#Session model stores the session data from django.contrib.sessions.models import Session from .models import LoggedInUser from .views import single_user, time_up from django.utils import timezone from mysite.settings import t_out from django.contrib.auth.models import User from runcode.runcodefuncs import kill_stop_cl...
[ "runcode.runcodefuncs.kill_stop_clear", "django.contrib.auth.models.User.objects.get", "django.utils.timezone.now", "django.contrib.sessions.models.Session.objects.get", "django.contrib.sessions.models.Session.objects.all" ]
[((1375, 1389), 'django.utils.timezone.now', 'timezone.now', ([], {}), '()\n', (1387, 1389), False, 'from django.utils import timezone\n'), ((1636, 1653), 'runcode.runcodefuncs.kill_stop_clear', 'kill_stop_clear', ([], {}), '()\n', (1651, 1653), False, 'from runcode.runcodefuncs import kill_stop_clear\n'), ((1083, 1113...
#!/usr/bin/env python # -*- coding: UTF-8 -*- ''' File ''' import os import subprocess import hashlib import string_helpers from chunked import chunked from cached import cached class File(object): ''' Wrapper around a filesystem object ''' TYPE_MUSIC = 'music' EXT_MUSIC = ( '.mp3', ) ...
[ "hashlib.sha1", "os.path.basename", "os.stat", "os.path.dirname", "string_helpers.capitalize_words", "os.path.exists", "os.path.splitext", "chunked.chunked", "os.path.join", "subprocess.check_call" ]
[((801, 840), 'os.path.join', 'os.path.join', (['self.dir', '(name + self.ext)'], {}), '(self.dir, name + self.ext)\n', (813, 840), False, 'import os\n'), ((852, 876), 'os.path.exists', 'os.path.exists', (['new_path'], {}), '(new_path)\n', (866, 876), False, 'import os\n'), ((1040, 1096), 'subprocess.check_call', 'subp...
import torch import numpy as np def suit4pytorch(X, Y): X = np.swapaxes(X, 1, 3) X_norm = X/255 X_torch = torch.from_numpy(X_norm).float() Y_torch = torch.from_numpy(Y).long() return X_torch, Y_torch
[ "numpy.swapaxes", "torch.from_numpy" ]
[((66, 86), 'numpy.swapaxes', 'np.swapaxes', (['X', '(1)', '(3)'], {}), '(X, 1, 3)\n', (77, 86), True, 'import numpy as np\n'), ((120, 144), 'torch.from_numpy', 'torch.from_numpy', (['X_norm'], {}), '(X_norm)\n', (136, 144), False, 'import torch\n'), ((167, 186), 'torch.from_numpy', 'torch.from_numpy', (['Y'], {}), '(Y...
#needs pytorch_transformers version 1.2.0 #!/usr/bin/env python # coding: utf-8 import argparse import re import os import _pickle as cPickle import numpy as np import pandas as pd import torch from pytorch_transformers.tokenization_bert import BertTokenizer def assert_eq(real, expected): assert real == expected,...
[ "argparse.ArgumentParser", "pandas.read_csv", "pytorch_transformers.tokenization_bert.BertTokenizer.from_pretrained", "numpy.array", "torch.from_numpy" ]
[((2052, 2077), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (2075, 2077), False, 'import argparse\n'), ((3632, 3717), 'pytorch_transformers.tokenization_bert.BertTokenizer.from_pretrained', 'BertTokenizer.from_pretrained', (['args.bert_model'], {'do_lower_case': 'args.do_lower_case'}), '(arg...
############################################################################## # # Copyright (c) 2001 Zope Foundation and Contributors # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this # distribution. # THIS SOFTWARE IS PROVIDED "AS ...
[ "AccessControl.ClassSecurityInfo", "AccessControl.class_init.InitializeClass" ]
[((2360, 2392), 'AccessControl.class_init.InitializeClass', 'InitializeClass', (['LocalRolePlugin'], {}), '(LocalRolePlugin)\n', (2375, 2392), False, 'from AccessControl.class_init import InitializeClass\n'), ((1787, 1806), 'AccessControl.ClassSecurityInfo', 'ClassSecurityInfo', ([], {}), '()\n', (1804, 1806), False, '...
from compas import PRECISION class SmoothUnion(object): """The smooth union between two volumetric objects. Parameters ---------- a: volumetric object First object to add. b: volumetric object Second object to add. r: float Intensity factor, the higher the number, the ...
[ "compas_vol.primitives.VolSphere", "matplotlib.pyplot.show", "numpy.maximum", "compas.geometry.Point", "numpy.tanh", "compas_vol.primitives.VolBox", "compas.geometry.Frame.worldXY" ]
[((2149, 2161), 'compas_vol.primitives.VolSphere', 'VolSphere', (['s'], {}), '(s)\n', (2158, 2161), False, 'from compas_vol.primitives import VolSphere, VolBox\n'), ((2171, 2185), 'compas_vol.primitives.VolBox', 'VolBox', (['b', '(2.5)'], {}), '(b, 2.5)\n', (2177, 2185), False, 'from compas_vol.primitives import VolSph...
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
[ "eventlet.spawn", "importlib.import_module", "st2common.log.getLogger", "st2common.transport.utils.get_messaging_urls", "collections.defaultdict", "st2common.transport.actionexecutionstate.get_queue", "st2actions.query.base.QueryContext.from_model", "six.iteritems", "st2common.persistence.executions...
[((1256, 1283), 'st2common.log.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1273, 1283), True, 'from st2common import log as logging\n'), ((1306, 1402), 'st2common.transport.actionexecutionstate.get_queue', 'actionexecutionstate.get_queue', (['"""st2.resultstracker.work"""'], {'routing_key': 'p...
from file_and_system.config_utils import ConfigUtils import os class GlobalParam: project_path = os.path.dirname(os.getcwd()) conf_path = ''.join((project_path + r'\test file\cf.properties')) # print(sys.path[0]) # print(os.path.dirname(os.getcwd())) # print(os.path.dirname(os.path.realpath(__file...
[ "os.getcwd", "file_and_system.config_utils.ConfigUtils.read_conf_file" ]
[((119, 130), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (128, 130), False, 'import os\n'), ((1548, 1656), 'file_and_system.config_utils.ConfigUtils.read_conf_file', 'ConfigUtils.read_conf_file', (['GlobalParam.conf_path', 'GlobalParam.section_opencv_utils', '"""system_font_path"""'], {}), "(GlobalParam.conf_path, Glo...
#!/usr/bin/env python # # Copyright 2009 <NAME>. # # 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 agre...
[ "builtins.range" ]
[((1939, 1954), 'builtins.range', 'range', (['k', '(0)', '(-1)'], {}), '(k, 0, -1)\n', (1944, 1954), False, 'from builtins import range\n'), ((2754, 2762), 'builtins.range', 'range', (['k'], {}), '(k)\n', (2759, 2762), False, 'from builtins import range\n'), ((3188, 3196), 'builtins.range', 'range', (['k'], {}), '(k)\n...
import os import sys import glob import subprocess import pytest try: # Check for local build sys.path.append('../build') import MDI_Library as mdi except ImportError: # Check for installed package import mdi build_dir = "../build" sys.path.append(build_dir) driver_out_expected_f90 = """ Engine name: MM ...
[ "mdi.MDI_Register_Command", "mdi.MDI_Register_Callback", "mdi.MDI_Get_NCallbacks", "mdi.MDI_Accept_Communicator", "mdi.MDI_Check_Callback_Exists", "mdi.MDI_Get_Callback", "mdi.MDI_Register_Node", "mdi.MDI_Recv", "glob.glob", "sys.path.append", "mdi.MDI_Get_NCommands", "pytest.raises", "mdi.M...
[((246, 272), 'sys.path.append', 'sys.path.append', (['build_dir'], {}), '(build_dir)\n', (261, 272), False, 'import sys\n'), ((98, 125), 'sys.path.append', 'sys.path.append', (['"""../build"""'], {}), "('../build')\n", (113, 125), False, 'import sys\n'), ((1639, 1775), 'subprocess.Popen', 'subprocess.Popen', (["[drive...
# -*- coding: utf-8 -*- # Copyright 2018, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. """ Quantum tomography fitter data formatting. """ import logging import itertools as it import numpy as np from scipy impo...
[ "numpy.conj", "numpy.sum", "qiskit.QiskitError", "numpy.zeros", "numpy.vstack", "numpy.array", "scipy.linalg.eigh", "numpy.kron", "itertools.product", "numpy.eye", "logging.getLogger", "numpy.sqrt" ]
[((492, 519), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (509, 519), False, 'import logging\n'), ((5869, 5883), 'numpy.sum', 'np.sum', (['counts'], {}), '(counts)\n', (5875, 5883), True, 'import numpy as np\n'), ((6636, 6688), 'numpy.sqrt', 'np.sqrt', (['(shots / (freqs_hedged * (1 - ...
import unittest import numpy as np from texar.torch.run.metric.summary import * class RegressionMetricTest(unittest.TestCase): def setUp(self) -> None: self.n_examples = 100 self.batch_size = 2 self.values = np.random.randn(self.n_examples) def test_running_average(self): qu...
[ "numpy.random.randn" ]
[((240, 272), 'numpy.random.randn', 'np.random.randn', (['self.n_examples'], {}), '(self.n_examples)\n', (255, 272), True, 'import numpy as np\n')]
# Generated by Django 3.0.2 on 2021-04-13 18:38 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('website', '0018_remove_rule_description'), ] operations = [ migrations.AddField( model_name='rule', name='internal',...
[ "django.db.models.BooleanField" ]
[((339, 402), 'django.db.models.BooleanField', 'models.BooleanField', ([], {'default': '(False)', 'verbose_name': '"""Intern regel"""'}), "(default=False, verbose_name='Intern regel')\n", (358, 402), False, 'from django.db import migrations, models\n')]
import sys, os.path as p wdir = p.abspath(p.dirname(__file__)) topdir = p.normpath(p.join(wdir, p.pardir, p.pardir)) srcdir = p.join(topdir, 'src') sys.path.insert(0, p.join(topdir, 'conf')) from mpiscanner import Scanner scanner = Scanner() libmpi_pxd = p.join(srcdir, 'mpi4py', 'libmpi.pxd') scanner.parse_file(libmpi...
[ "os.path.dirname", "os.path.join", "mpiscanner.Scanner" ]
[((126, 147), 'os.path.join', 'p.join', (['topdir', '"""src"""'], {}), "(topdir, 'src')\n", (132, 147), True, 'import sys, os.path as p\n'), ((233, 242), 'mpiscanner.Scanner', 'Scanner', ([], {}), '()\n', (240, 242), False, 'from mpiscanner import Scanner\n'), ((256, 294), 'os.path.join', 'p.join', (['srcdir', '"""mpi4...
import unittest from python.feb_stats.parsers.feb_livescore_parser import FEBLivescoreParser class GenericParserTestCase(unittest.TestCase): def __init__(self, *args, **kwargs): super(GenericParserTestCase, self).__init__(*args, **kwargs) self.parser = FEBLivescoreParser() self.test_file =...
[ "unittest.main", "python.feb_stats.parsers.feb_livescore_parser.FEBLivescoreParser" ]
[((5800, 5815), 'unittest.main', 'unittest.main', ([], {}), '()\n', (5813, 5815), False, 'import unittest\n'), ((275, 295), 'python.feb_stats.parsers.feb_livescore_parser.FEBLivescoreParser', 'FEBLivescoreParser', ([], {}), '()\n', (293, 295), False, 'from python.feb_stats.parsers.feb_livescore_parser import FEBLivesco...
#!/usr/bin/env python # # Copyright 2012 The Closure Linter 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 # #...
[ "unittest.main", "closure_linter.testutil.TokenizeSourceAndRunEcmaPass", "closure_linter.error_fixer.ErrorFixer" ]
[((1701, 1718), 'unittest.main', 'googletest.main', ([], {}), '()\n', (1716, 1718), True, 'import unittest as googletest\n'), ((979, 1003), 'closure_linter.error_fixer.ErrorFixer', 'error_fixer.ErrorFixer', ([], {}), '()\n', (1001, 1003), False, 'from closure_linter import error_fixer\n'), ((1052, 1103), 'closure_linte...
from logging import getLogger import numpy as np from imblearn.over_sampling import SMOTE from sklearn.base import clone from ..utils import augmented_rvalue, BaseTransformer class MOS(BaseTransformer): """Perform Minimizing Overlapping Selection under SMOTE (MOSS) or under No-Sampling (MOSNS) algorithm. ...
[ "numpy.abs", "numpy.arange", "imblearn.over_sampling.SMOTE", "sklearn.base.clone", "logging.getLogger" ]
[((2738, 2764), 'numpy.arange', 'np.arange', (['(0.01)', '(0.2)', '(0.01)'], {}), '(0.01, 0.2, 0.01)\n', (2747, 2764), True, 'import numpy as np\n'), ((4274, 4291), 'sklearn.base.clone', 'clone', (['self.model'], {}), '(self.model)\n', (4279, 4291), False, 'from sklearn.base import clone\n'), ((5166, 5179), 'numpy.abs'...
import xml.etree.ElementTree as ET from ..v3_0 import dto, namespaces as ns from .serialize_element import serialize_text_element from ois_api_client.xml.get_full_tag import get_full_tag # def serialize_user(data: dto.UserHeader, password_hash: str, request_signature: str) -> ET.Element: def serialize_user(data: dto...
[ "ois_api_client.xml.get_full_tag.get_full_tag" ]
[((372, 403), 'ois_api_client.xml.get_full_tag.get_full_tag', 'get_full_tag', (['ns.COMMON', '"""user"""'], {}), "(ns.COMMON, 'user')\n", (384, 403), False, 'from ois_api_client.xml.get_full_tag import get_full_tag\n')]
from matplotlib import pyplot from statistics import stdev, mean import os import glob path = 'input/' XLABEL = "moves" YLABEL = "accuracy" OFFSET = 0 CI = True showT1 = [0, 1, 3, 5,7] # showing 4 epochs + average of last 10 epochs. # table caption .. Caption = "" label = "OutputFileName" # table label parsing = "Outc...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.show", "os.path.join", "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "matplotlib.pyplot.gca", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xticks", "matplotlib.pyplot.grid", "matplotlib.pyplot.savefig", "matplotlib.pyplot.xlabel" ]
[((6498, 6545), 'matplotlib.pyplot.plot', 'pyplot.plot', (['x3', 'perc3'], {'lw': '(2)', 'label': 'f"""{names3}"""'}), "(x3, perc3, lw=2, label=f'{names3}')\n", (6509, 6545), False, 'from matplotlib import pyplot\n'), ((6550, 6597), 'matplotlib.pyplot.plot', 'pyplot.plot', (['x2', 'perc2'], {'lw': '(2)', 'label': 'f"""...
"""A shim module for deprecated imports """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import sys import types from importlib import import_module from .importstring import import_item class ShimWarning(Warning): """A warning to show when a module has mo...
[ "importlib.import_module" ]
[((2422, 2449), 'importlib.import_module', 'import_module', (['self._mirror'], {}), '(self._mirror)\n', (2435, 2449), False, 'from importlib import import_module\n'), ((2206, 2233), 'importlib.import_module', 'import_module', (['self._mirror'], {}), '(self._mirror)\n', (2219, 2233), False, 'from importlib import import...
import pylab as p from flask import Blueprint,render_template,request from flask_login import login_required, current_user from . import db from keras.models import load_model from keras.preprocessing import image import numpy as np import cv2 main=Blueprint('main',__name__) model=load_model('D:\Shubham\Al...
[ "keras.models.load_model", "numpy.stack", "flask.Blueprint", "numpy.argmax", "cv2.imread", "numpy.array", "keras.preprocessing.image.astype", "keras.preprocessing.image.reshape", "flask.render_template", "cv2.resize" ]
[((259, 286), 'flask.Blueprint', 'Blueprint', (['"""main"""', '__name__'], {}), "('main', __name__)\n", (268, 286), False, 'from flask import Blueprint, render_template, request\n'), ((295, 361), 'keras.models.load_model', 'load_model', (['"""D:\\\\Shubham\\\\Alzhiemer-Prediction\\\\project\\\\model.h5"""'], {}), "('D:...
#!/usr/bin/python3 # # Copyright (C) 2016 The Android Open Source Project # # 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 # # Unl...
[ "os.getcwd", "json.dump", "os.path.exists", "os.chdir" ]
[((2574, 2592), 'os.chdir', 'os.chdir', (['dist_dir'], {}), '(dist_dir)\n', (2582, 2592), False, 'import os, sys, json\n'), ((2619, 2630), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (2628, 2630), False, 'import os, sys, json\n'), ((6467, 6552), 'json.dump', 'json.dump', (['resultJson', 'outfile'], {'sort_keys': '(True...
import random import time, datetime import struct import base64 class Client_UUID(object): #Huge thanks to github user fweak for helping me figure out the mystery of the client_uuid. made some discord "science" notes here: https://docs.google.com/document/d/1b5aDx7S1iLHoeb6B56izZakbXItA84gUjFzK-0OBwy0 def __init__...
[ "struct.unpack", "base64.b64decode", "struct.pack", "random.random", "base64.b64encode", "datetime.datetime.now" ]
[((1011, 1128), 'struct.pack', 'struct.pack', (['"""<i"""', '(userID % 4294967296 if userID % 4294967296 <= 2147483647 else userID % \n 4294967296 - 2147483647)'], {}), "('<i', userID % 4294967296 if userID % 4294967296 <= 2147483647 else\n userID % 4294967296 - 2147483647)\n", (1022, 1128), False, 'import struct...
# Future from __future__ import annotations # Packages import aiohttp.web import aiohttp_session async def logout(request: aiohttp.web.Request) -> aiohttp.web.Response: session = await aiohttp_session.get_session(request) session.invalidate() return aiohttp.web.HTTPFound("/") def setup(app: aiohttp.w...
[ "aiohttp_session.get_session" ]
[((193, 229), 'aiohttp_session.get_session', 'aiohttp_session.get_session', (['request'], {}), '(request)\n', (220, 229), False, 'import aiohttp_session\n')]
"""Stage 7: Puzzle 10 of 11 Here's a change to the previous puzzle. How many times should you repeat to complete the drawing? """ import sys sys.path.append('..') import codestudio artist = codestudio.load('s1level44') artist.speed = 'fastest' a = artist for count3 in range(9): # ??? fo...
[ "sys.path.append", "codestudio.load" ]
[((144, 165), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (159, 165), False, 'import sys\n'), ((193, 221), 'codestudio.load', 'codestudio.load', (['"""s1level44"""'], {}), "('s1level44')\n", (208, 221), False, 'import codestudio\n')]
#!/usr/bin/env python # -*- coding: UTF-8 -*- from base import BaseObject from cendalytics.education.bp import EducationAnalysisAPI from cendalytics.inference.bp import InferenceAPI from cendalytics.skills.core.bp import SkillsReportAPI from cendalytics.tfidf.core.bp import VectorSpaceAPI class CendantAPI(BaseObjec...
[ "cendalytics.inference.bp.InferenceAPI", "cendalytics.education.bp.EducationAnalysisAPI", "base.BaseObject.__init__", "cendalytics.skills.core.bp.SkillsReportAPI", "cendalytics.tfidf.core.bp.VectorSpaceAPI" ]
[((506, 541), 'base.BaseObject.__init__', 'BaseObject.__init__', (['self', '__name__'], {}), '(self, __name__)\n', (525, 541), False, 'from base import BaseObject\n'), ((633, 670), 'cendalytics.inference.bp.InferenceAPI', 'InferenceAPI', ([], {'is_debug': 'self._is_debug'}), '(is_debug=self._is_debug)\n', (645, 670), F...
from datetime import timedelta from django.conf import settings from django.test import override_settings from unittest.mock import patch from orchestra.tests.helpers import OrchestraTestCase from orchestra.tests.helpers.fixtures import setup_models from orchestra.tests.helpers.fixtures import StaffBotRequestFactory f...
[ "orchestra.utils.task_lifecycle.assign_task", "orchestra.models.StaffingRequestInquiry.objects.filter", "orchestra.tests.helpers.fixtures.WorkerFactory", "orchestra.models.StaffingRequestInquiry.objects.all", "orchestra.tests.helpers.fixtures.setup_models", "orchestra.tests.helpers.fixtures.TaskFactory", ...
[((4316, 4358), 'unittest.mock.patch', 'patch', (['"""orchestra.bots.staffbot.send_mail"""'], {}), "('orchestra.bots.staffbot.send_mail')\n", (4321, 4358), False, 'from unittest.mock import patch\n'), ((4364, 4424), 'unittest.mock.patch', 'patch', (['"""orchestra.bots.staffbot.message_experts_slack_group"""'], {}), "('...
import pysm3 import pysm3.units as u def test_read_map_unit(): m = pysm3.read_map("pysm_2/dust_temp.fits", nside=8, field=0, unit="uK_RJ") assert u.Unit("uK_RJ") == m.unit def test_read_map_unit_dimensionless(): m = pysm3.read_map("pysm_2/dust_temp.fits", nside=8, field=0) assert u.Unit("") == m.uni...
[ "pysm3.units.Unit", "pysm3.read_map" ]
[((73, 144), 'pysm3.read_map', 'pysm3.read_map', (['"""pysm_2/dust_temp.fits"""'], {'nside': '(8)', 'field': '(0)', 'unit': '"""uK_RJ"""'}), "('pysm_2/dust_temp.fits', nside=8, field=0, unit='uK_RJ')\n", (87, 144), False, 'import pysm3\n'), ((232, 289), 'pysm3.read_map', 'pysm3.read_map', (['"""pysm_2/dust_temp.fits"""...
""" tools to deal with I/O on the shell """ import sys def progressbar(i, m): ''' Draws a progress bar with = signs and percentage. IN: i (step of the loop), m (max of the loop).''' sys.stdout.write('\r') sys.stdout.write("[%-30s] %d%%" % ('=' * int(round(i * 30. / m)), 100. *...
[ "sys.stdout.write", "sys.stdin.read", "termios.tcgetattr", "msvcrt.getch", "termios.tcsetattr", "sys.stdout.flush", "sys.stdin.fileno" ]
[((200, 222), 'sys.stdout.write', 'sys.stdout.write', (["'\\r'"], {}), "('\\r')\n", (216, 222), False, 'import sys\n'), ((333, 351), 'sys.stdout.flush', 'sys.stdout.flush', ([], {}), '()\n', (349, 351), False, 'import sys\n'), ((375, 397), 'sys.stdout.write', 'sys.stdout.write', (['"""\n"""'], {}), "('\\n')\n", (391, 3...
import signal import functools from datetime import datetime def run_time(func): @functools.wraps(func) def wrapper(*args, **kwargs): start_time = datetime.now() _return = func(*args, **kwargs) end_time = datetime.now() print(f">> [{func.__name__}] run time: {end_time - start_t...
[ "signal.signal", "datetime.datetime.now", "functools.wraps" ]
[((88, 109), 'functools.wraps', 'functools.wraps', (['func'], {}), '(func)\n', (103, 109), False, 'import functools\n'), ((413, 434), 'functools.wraps', 'functools.wraps', (['func'], {}), '(func)\n', (428, 434), False, 'import functools\n'), ((650, 694), 'signal.signal', 'signal.signal', (['signal.SIGINT', 'signal_hand...
#!/usr/bin/env python import sys,os sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from logparser.LogCluster import LogCluster_iterative # Hyperparameter tuning for cisco_router.log : numIterations = 27 # Hyperparameter that needs to be tuned. rsupports = [23.9, 23, 9, 9, 9, 8, 8, 8, 7, 2...
[ "os.path.abspath", "logparser.LogCluster.LogCluster_iterative.LogParser" ]
[((1715, 1884), 'logparser.LogCluster.LogCluster_iterative.LogParser', 'LogCluster_iterative.LogParser', (['input_dir', 'log_format', 'output_dir'], {'rsupport': 'rsupport', 'iteration': 'iteration', 'file_name': 'file_name', 'initial_support': 'initial_support'}), '(input_dir, log_format, output_dir, rsupport=\n rs...
# Copyright (c) 2016, AB Uobis # All rights reserved. import os import io import uuid import ast import csv import calendar from collections import OrderedDict from datetime import datetime,date from flask import flash, render_template, request, redirect, url_for, send_from_directory, send_file from xac import app, db...
[ "xac.forms.NewSubAccount", "csv.reader", "xac.models.Elements.query.filter_by", "xac.db.session.delete", "flask.url_for", "xac.accounting.rates.import_rates", "flask.request.form.copy", "xac.models.LedgerEntries.tside.desc", "xac.accounting.memoranda.process_filestorage", "xac.models.LedgerEntries...
[((605, 619), 'xac.app.route', 'app.route', (['"""/"""'], {}), "('/')\n", (614, 619), False, 'from xac import app, db, forms, models\n'), ((676, 699), 'xac.app.route', 'app.route', (['"""/Configure"""'], {}), "('/Configure')\n", (685, 699), False, 'from xac import app, db, forms, models\n'), ((769, 808), 'xac.app.route...
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-10-26 12:22 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('cmsplugin_cascade', '0020_page_icon_font'), ] operations = [ migrations.AlterModel...
[ "django.db.migrations.AlterModelOptions" ]
[((299, 450), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""cascadepage"""', 'options': "{'verbose_name': 'Cascade Page Settings', 'verbose_name_plural':\n 'Cascade Page Settings'}"}), "(name='cascadepage', options={'verbose_name':\n 'Cascade Page Settings', 'verbose_...
import requests from .api import API from envparse import env class SafeBrowsingAPI(API): """Safe Browsing API """ _name = "Safe Browsing" _KEY = env('SAFE_BROWSING') _CLIENT = "threatfeed" _APPVER = '0.1' _PVER = '3.1' def dispatch(self, request): if 'url' in request: ...
[ "envparse.env", "requests.post" ]
[((167, 187), 'envparse.env', 'env', (['"""SAFE_BROWSING"""'], {}), "('SAFE_BROWSING')\n", (170, 187), False, 'from envparse import env\n'), ((955, 1000), 'requests.post', 'requests.post', (['request_url'], {'data': 'request_body'}), '(request_url, data=request_body)\n', (968, 1000), False, 'import requests\n')]
# 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, software # d...
[ "os.path.isabs", "os.path.abspath", "toscaparser.tosca_template.ToscaTemplate", "toscaparser.tests.base.TestCase.setUp", "os.path.join" ]
[((900, 920), 'toscaparser.tests.base.TestCase.setUp', 'TestCase.setUp', (['self'], {}), '(self)\n', (914, 920), False, 'from toscaparser.tests.base import TestCase\n'), ((1507, 1532), 'os.path.isabs', 'os.path.isabs', (['definition'], {}), '(definition)\n', (1520, 1532), False, 'import os\n'), ((6484, 6507), 'toscapar...
import unittest from itertools import combinations from flask_validation_extended.types import List, Dict, All, type_check from flask_validation_extended.exceptions import ( InvalidCustomTypeArgument ) class TypeTestCase(unittest.TestCase): def setUp(self) -> None: self.targets = [List, Dict] ...
[ "unittest.main", "flask_validation_extended.types.List", "itertools.combinations", "flask_validation_extended.types.Dict" ]
[((2551, 2566), 'unittest.main', 'unittest.main', ([], {}), '()\n', (2564, 2566), False, 'import unittest\n'), ((394, 400), 'flask_validation_extended.types.List', 'List', ([], {}), '()\n', (398, 400), False, 'from flask_validation_extended.types import List, Dict, All, type_check\n'), ((402, 408), 'flask_validation_ex...
# Computation of transition state optimization and IRC from pyqchem import get_output_from_qchem, QchemInput from pyqchem.parsers.parser_frequencies import basic_frequencies from pyqchem.parsers.parser_optimization import basic_optimization from pyqchem.parsers.parser_irc import basic_irc from pyqchem.structure import ...
[ "pyqchem.QchemInput", "pyqchem.file_io.write_structure_to_xyz", "pyqchem.get_output_from_qchem", "matplotlib.pyplot.show", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xticks", "pyqchem.structure.Structure", "matplotlib.pyplot.xlabel" ]
[((670, 747), 'pyqchem.structure.Structure', 'Structure', ([], {'coordinates': 'coordinates', 'symbols': 'symbols', 'charge': '(0)', 'multiplicity': '(1)'}), '(coordinates=coordinates, symbols=symbols, charge=0, multiplicity=1)\n', (679, 747), False, 'from pyqchem.structure import Structure\n'), ((855, 1036), 'pyqchem....
from pysys.constants import * from apama.basetest import ApamaBaseTest from apama.correlator import CorrelatorHelper import re class PySysTest(ApamaBaseTest): def execute(self): correlator = CorrelatorHelper(self, name='testcorrelator') correlator.start(logfile='testcorrelator.log') correlator.injectEPL(filenam...
[ "apama.correlator.CorrelatorHelper" ]
[((195, 240), 'apama.correlator.CorrelatorHelper', 'CorrelatorHelper', (['self'], {'name': '"""testcorrelator"""'}), "(self, name='testcorrelator')\n", (211, 240), False, 'from apama.correlator import CorrelatorHelper\n')]
import os import shutil from os.path import join, basename, exists import pytest from osgeo import gdal from preprocessing import crop_mask_resample_reproject as crop from preprocessing.crop_mask_resample_reproject import Options # The mock files have extents = '900000 -4300000 940000 -4260000' mock_extents = [920000,...
[ "preprocessing.crop_mask_resample_reproject.crop_reproject_resample", "os.remove", "preprocessing.crop_mask_resample_reproject.apply_mask", "os.path.exists", "preprocessing.crop_mask_resample_reproject.Options", "preprocessing.crop_mask_resample_reproject.do_work", "osgeo.gdal.Open", "os.path.join", ...
[((407, 454), 'os.path.join', 'os.path.join', (['uncover', '"""preprocessing"""', '"""mocks"""'], {}), "(uncover, 'preprocessing', 'mocks')\n", (419, 454), False, 'import os\n'), ((469, 506), 'os.path.join', 'os.path.join', (['data_dir', '"""std2000.tif"""'], {}), "(data_dir, 'std2000.tif')\n", (481, 506), False, 'impo...
import warnings from typing import Optional import pandas as pd from boadata.core import DataObject from boadata.core.data_conversion import ChainConversion, IdentityConversion from .pandas_types import PandasDataFrameBase @DataObject.register_type() @IdentityConversion.enable_to("pandas_data_frame") @ChainConversi...
[ "boadata.core.data_conversion.IdentityConversion.enable_to", "warnings.simplefilter", "boadata.core.DataObject.register_type", "boadata.core.data_conversion.ChainConversion.enable_to", "warnings.catch_warnings", "pandas.read_parquet" ]
[((228, 254), 'boadata.core.DataObject.register_type', 'DataObject.register_type', ([], {}), '()\n', (252, 254), False, 'from boadata.core import DataObject\n'), ((256, 305), 'boadata.core.data_conversion.IdentityConversion.enable_to', 'IdentityConversion.enable_to', (['"""pandas_data_frame"""'], {}), "('pandas_data_fr...
""" # 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 law or agreed t...
[ "os.path.abspath", "os.path.isdir", "os.walk", "click.option", "click.command", "os.path.isfile", "shutil.move", "os.path.join", "os.listdir" ]
[((661, 676), 'click.command', 'click.command', ([], {}), '()\n', (674, 676), False, 'import click\n'), ((678, 744), 'click.option', 'click.option', (['"""--name"""'], {'prompt': '"""Package name"""', 'help': '"""Project name"""'}), "('--name', prompt='Package name', help='Project name')\n", (690, 744), False, 'import ...
from typing import Optional, Dict from flask import Flask from config_aws import S3Config from service import DataCrawlerInterface, PGFN, Bacen app = Flask(__name__) s3 = S3Config() tipos : Dict[str, DataCrawlerInterface] = { 'pgfn': PGFN(), 'bacen': Bacen() } @app.route("/download/<string:tipo>", methods=[...
[ "service.Bacen", "service.PGFN", "flask.Flask", "config_aws.S3Config" ]
[((153, 168), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (158, 168), False, 'from flask import Flask\n'), ((174, 184), 'config_aws.S3Config', 'S3Config', ([], {}), '()\n', (182, 184), False, 'from config_aws import S3Config\n'), ((241, 247), 'service.PGFN', 'PGFN', ([], {}), '()\n', (245, 247), False, ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Apr 24 13:02:09 2020 @author: utsav """ import numpy as np import cv2 import base64 import requests import json def to_image_string(image_filepath): return base64.b64encode(open(image_filepath, 'rb').read())#.encode('base64') def from_base64(base...
[ "streamlit.sidebar.subheader", "json.loads", "streamlit.image", "streamlit.checkbox", "cv2.imdecode", "streamlit.title", "streamlit.write", "streamlit.file_uploader", "base64.b64decode", "streamlit.sidebar.selectbox", "streamlit.info", "streamlit.button", "streamlit.sidebar.radio", "reques...
[((4029, 4116), 'streamlit.title', 'st.title', (['"""[PyraDox :page_with_curl:](https://github.com/festivitymishra/PyraDox)"""'], {}), "(\n '[PyraDox :page_with_curl:](https://github.com/festivitymishra/PyraDox)')\n", (4037, 4116), True, 'import streamlit as st\n'), ((4113, 4313), 'streamlit.info', 'st.info', (['"""...
# Author: <NAME> import copy from kernel.term import Term, Inst from kernel.thm import Thm class ItemID(): """Represents id of an item.""" def __init__(self, id=None): """Convert id into tuple form.""" if id is None: self.id = tuple() elif isinstance(id, tuple) and all(isi...
[ "copy.copy" ]
[((4687, 4711), 'copy.copy', 'copy.copy', (['self.subproof'], {}), '(self.subproof)\n', (4696, 4711), False, 'import copy\n'), ((6814, 6829), 'copy.copy', 'copy.copy', (['item'], {}), '(item)\n', (6823, 6829), False, 'import copy\n')]
from unittest.mock import patch, create_autospec, PropertyMock from stack.expectmore import ExpectMore from stack.switch.x1052 import SwitchDellX1052 # Switch data to mock MAC address table SWITCH_DATA = """ show mac address-table show mac address-table Flags: I - Internal usage VLAN Aging time is 300 sec Vla...
[ "unittest.mock.patch", "unittest.mock.create_autospec", "stack.switch.x1052.SwitchDellX1052.CONSOLE_PROMPTS.index" ]
[((767, 829), 'unittest.mock.create_autospec', 'create_autospec', ([], {'spec': 'ExpectMore', 'spec_set': '(True)', 'instance': '(True)'}), '(spec=ExpectMore, spec_set=True, instance=True)\n', (782, 829), False, 'from unittest.mock import patch, create_autospec, PropertyMock\n'), ((596, 656), 'unittest.mock.patch', 'pa...
# -*- coding: utf-8 -*- import sys registers = [1, 0] # registers(0) = a, registers(1) = b instructions = [] class Instruction: def __init__(self, instructionstring): self.instruction = '' self.register = 0 # or 1 self.jump = 1 # default move on to next self.fullinstruction = ins...
[ "sys.exit" ]
[((1223, 1233), 'sys.exit', 'sys.exit', ([], {}), '()\n', (1231, 1233), False, 'import sys\n'), ((2197, 2207), 'sys.exit', 'sys.exit', ([], {}), '()\n', (2205, 2207), False, 'import sys\n')]
# 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, software # distributed under t...
[ "kuryr_libnetwork.utils.make_net_tags", "kuryr.lib.utils.get_random_string" ]
[((1484, 1514), 'kuryr.lib.utils.get_random_string', 'lib_utils.get_random_string', (['(8)'], {}), '(8)\n', (1511, 1514), True, 'from kuryr.lib import utils as lib_utils\n'), ((2361, 2391), 'kuryr.lib.utils.get_random_string', 'lib_utils.get_random_string', (['(8)'], {}), '(8)\n', (2388, 2391), True, 'from kuryr.lib im...
import os import subprocess import sys import zipfile if (os.path.exists("build")): dl=[] for r,ndl,fl in os.walk("build"): dl=[os.path.join(r,k) for k in ndl]+dl for f in fl: os.remove(os.path.join(r,f)) for k in dl: os.rmdir(k) else: os.mkdir("build") jfl=[] for r,_,fl in os.walk("src"): for f in fl:...
[ "os.mkdir", "subprocess.run", "zipfile.ZipFile", "os.walk", "os.path.exists", "os.rmdir", "os.path.join", "sys.exit" ]
[((61, 84), 'os.path.exists', 'os.path.exists', (['"""build"""'], {}), "('build')\n", (75, 84), False, 'import os\n'), ((291, 305), 'os.walk', 'os.walk', (['"""src"""'], {}), "('src')\n", (298, 305), False, 'import os\n'), ((111, 127), 'os.walk', 'os.walk', (['"""build"""'], {}), "('build')\n", (118, 127), False, 'impo...
""" Analyze the words of a text. We consider not only the content of a word as string, but also its position in the text. A word can appear in multiple locations in the text. (We consider inflections as different words: "go" and "goes" are considered two different words.) We define an order of the words. A word ``x``...
[ "typing.cast", "icontract.require", "re.compile" ]
[((724, 755), 're.compile', 're.compile', (['"""^[a-z]+(-[a-z])*$"""'], {}), "('^[a-z]+(-[a-z])*$')\n", (734, 755), False, 'import re\n'), ((4206, 4241), 're.compile', 're.compile', (['"""[a-zA-Z]+(-[a-zA-Z])*"""'], {}), "('[a-zA-Z]+(-[a-zA-Z])*')\n", (4216, 4241), False, 'import re\n'), ((4671, 4703), 'icontract.requi...
import argparse import json from difflib import unified_diff import sys from typing import List from typing import Mapping from typing import Optional from typing import Sequence from typing import Tuple from typing import Union def _get_pretty_format( contents: str, indent: str, ensure_ascii: bool = True...
[ "argparse.ArgumentParser", "difflib.unified_diff", "json.loads" ]
[((1581, 1649), 'difflib.unified_diff', 'unified_diff', (['source_lines', 'target_lines'], {'fromfile': 'file', 'tofile': 'file'}), '(source_lines, target_lines, fromfile=file, tofile=file)\n', (1593, 1649), False, 'from difflib import unified_diff\n'), ((1745, 1770), 'argparse.ArgumentParser', 'argparse.ArgumentParser...
import logging def setup_custom_logger(name): logger = logging.getLogger(name) c_handler = logging.StreamHandler() f_handler = logging.FileHandler('jamstockex.log') c_handler.setLevel(logging.DEBUG) f_handler.setLevel(logging.ERROR) # Create formatters and add it to handlers c_format = l...
[ "logging.Formatter", "logging.StreamHandler", "logging.FileHandler", "logging.getLogger" ]
[((61, 84), 'logging.getLogger', 'logging.getLogger', (['name'], {}), '(name)\n', (78, 84), False, 'import logging\n'), ((102, 125), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (123, 125), False, 'import logging\n'), ((142, 179), 'logging.FileHandler', 'logging.FileHandler', (['"""jamstockex.log...
# Copyright (C) 2012 <NAME> and The Pepper Developers # Released under the MIT License. See the file COPYING.txt for details. from assert_parser_result import assert_parser_result def test_operator_plus(): assert_parser_result( r""" 0001:0001 SYMBOL(a) 0001:0002 PLUS(+) 0001:0003 SYMBOL(b) ...
[ "assert_parser_result.assert_parser_result" ]
[((213, 463), 'assert_parser_result.assert_parser_result', 'assert_parser_result', (['"""\n0001:0001 SYMBOL(a)\n0001:0002 PLUS(+)\n0001:0003 SYMBOL(b)\n0001:0004 NEWLINE\n"""', '"""\n[PLUS:+]\n [SYMBOL:a]\n [SYMBOL:b]\n[EOF:]\n"""', '"""\nPepPlus(\n PepSymbol(\'a\'),\n PepSymbol(\'b\')\n)\n...
import json, os from s3ts import filewriter class FileStore(object): def exists( self, path ): """Returns true if a file with the given file exists""" raise RuntimeError("Not implemented") def get( self, path ): """Get the value associated with path Raises a KeyError if the ...
[ "os.makedirs", "os.unlink", "os.path.isdir", "os.path.dirname", "os.path.exists", "s3ts.filewriter.atomicFileWriter", "os.path.join" ]
[((1928, 1957), 'os.path.join', 'os.path.join', (['self.root', 'path'], {}), '(self.root, path)\n', (1940, 1957), False, 'import json, os\n'), ((2311, 2332), 'os.path.dirname', 'os.path.dirname', (['path'], {}), '(path)\n', (2326, 2332), False, 'import json, os\n'), ((2684, 2704), 'os.path.exists', 'os.path.exists', ([...
''' Created on Jun 4, 2017 @author: Asus-PC ''' from django import template from django.template.defaultfilters import stringfilter register = template.Library() @register.filter def lookup(d, key): return d[key] @register.filter(is_safe=False) def get_range(value): return range(value) @register.filter...
[ "django.template.Library" ]
[((145, 163), 'django.template.Library', 'template.Library', ([], {}), '()\n', (161, 163), False, 'from django import template\n')]
from typing import List, Tuple, Dict import torch as t from torch.nn import CrossEntropyLoss from unify_eval.model.layers.layer_base import Layer from unify_eval.utils.vocab import PAD from unify_eval.model.layers.preprocessing import SequenceMapperLayer, TokenizerLayer from unify_eval.model.mixins.sequences.seq2seq ...
[ "unify_eval.model.layers.layer_base.Layer", "torch.nn.CrossEntropyLoss", "unify_eval.model.mixins.sequences.seq2seq.PytorchLanguageModel.__init__", "torch.optim.Adam", "unify_eval.model.mixins.stateful.StatefulLayeredModel.__init__", "torch.tensor" ]
[((1006, 1053), 'unify_eval.model.mixins.stateful.StatefulLayeredModel.__init__', 'StatefulLayeredModel.__init__', (['self', 'sub_layers'], {}), '(self, sub_layers)\n', (1035, 1053), False, 'from unify_eval.model.mixins.stateful import StatefulLayeredModel\n'), ((1062, 1195), 'unify_eval.model.mixins.sequences.seq2seq....
from sleekxmpp import ClientXMPP import logging logger = logging.getLogger(__name__) class HubBot(ClientXMPP): HUB = "hub.sotecware.net" SWITCH = "switch.hub.sotecware.net" FEED = "feed.hub.sotecware.net" def __init__(self, localpart, resource, password): jid = "{0}@{1}".format(localpart, sel...
[ "logging.getLogger" ]
[((58, 85), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (75, 85), False, 'import logging\n')]
# # Copyright (c) 2010-2017 Fabric Software Inc. All rights reserved. # import json, os from PySide import QtCore, QtGui from FabricEngine.FabricUI import Actions as CppActions from FabricEngine.Canvas.Application.FabricApplicationStates import * class BaseHotkeyCommand(QtGui.QUndoCommand): class State: ...
[ "json.dump", "json.load", "PySide.QtGui.QFileDialog.getOpenFileName", "PySide.QtGui.QKeySequence", "os.path.dirname", "FabricEngine.FabricUI.Actions.ActionRegistry.GetActionRegistry", "os.path.split" ]
[((1835, 1913), 'PySide.QtGui.QFileDialog.getOpenFileName', 'QtGui.QFileDialog.getOpenFileName', (['None', '"""Open Hotkey file"""', 'lastDir', '"""*.json"""'], {}), "(None, 'Open Hotkey file', lastDir, '*.json')\n", (1868, 1913), False, 'from PySide import QtCore, QtGui\n'), ((4162, 4207), 'FabricEngine.FabricUI.Actio...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
[ "msrestazure.tools.parse_resource_id" ]
[((3951, 3980), 'msrestazure.tools.parse_resource_id', 'parse_resource_id', (['account.id'], {}), '(account.id)\n', (3968, 3980), False, 'from msrestazure.tools import parse_resource_id\n')]
from unittest import TestCase from coin_change import Solution class TestCoinChange(TestCase): def test_multiple_of_one_coin(self): self.assertEqual(Solution().coinChange([1, 2, 5], 11), 3) def test_zero(self): self.assertEqual(Solution().coinChange([1, 2, 3], 0), 0) def test_unreachabl...
[ "coin_change.Solution" ]
[((164, 174), 'coin_change.Solution', 'Solution', ([], {}), '()\n', (172, 174), False, 'from coin_change import Solution\n'), ((256, 266), 'coin_change.Solution', 'Solution', ([], {}), '()\n', (264, 266), False, 'from coin_change import Solution\n'), ((360, 370), 'coin_change.Solution', 'Solution', ([], {}), '()\n', (3...
# -*- coding: utf-8 -*- # 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 o...
[ "google.protobuf.descriptor.FieldDescriptor", "google.protobuf.descriptor.EnumValueDescriptor", "google.protobuf.symbol_database.Default", "google.protobuf.reflection.GeneratedProtocolMessageType", "google.protobuf.descriptor.FileDescriptor" ]
[((998, 1024), 'google.protobuf.symbol_database.Default', '_symbol_database.Default', ([], {}), '()\n', (1022, 1024), True, 'from google.protobuf import symbol_database as _symbol_database\n'), ((1040, 1820), 'google.protobuf.descriptor.FileDescriptor', '_descriptor.FileDescriptor', ([], {'name': '"""google/api/label.p...
#!/usr/bin/env python3 # ******************************************************* # Copyright (c) VMware, Inc. 2020-2021. All Rights Reserved. # SPDX-License-Identifier: MIT # ******************************************************* # * # * DISCLAIMER. THIS PROGRAM IS PROVIDED TO YOU "AS IS" WITHOUT # * WARRANTIES OR CO...
[ "cbc_sdk.base.QueryBuilder", "time.sleep", "time.time", "cbc_sdk.errors.ApiError", "cbc_sdk.endpoint_standard.base.EnrichedEvent", "cbc_sdk.errors.TimeoutError" ]
[((2982, 2993), 'time.time', 'time.time', ([], {}), '()\n', (2991, 2993), False, 'import time\n'), ((4099, 4110), 'time.time', 'time.time', ([], {}), '()\n', (4108, 4110), False, 'import time\n'), ((13609, 13620), 'time.time', 'time.time', ([], {}), '()\n', (13618, 13620), False, 'import time\n'), ((16395, 16409), 'cbc...
#!/usr/bin/env python # # Generated Sun Jun 14 12:18:10 2015 by parse_xsd.py version 0.5. # import saml2 from saml2 import SamlBase NAMESPACE = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd' class TTimestampFault_(SamlBase): """The http://docs.oasis-open.org/wss/2004/01/oas...
[ "saml2.SamlBase.__init__", "saml2.create_class_from_xml_string", "saml2.SamlBase.c_cardinality.copy", "saml2.SamlBase.c_children.copy", "saml2.SamlBase.c_attributes.copy" ]
[((465, 491), 'saml2.SamlBase.c_children.copy', 'SamlBase.c_children.copy', ([], {}), '()\n', (489, 491), False, 'from saml2 import SamlBase\n'), ((511, 539), 'saml2.SamlBase.c_attributes.copy', 'SamlBase.c_attributes.copy', ([], {}), '()\n', (537, 539), False, 'from saml2 import SamlBase\n'), ((606, 635), 'saml2.SamlB...
# Generated by Django 2.2.10 on 2020-07-11 19:13 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] op...
[ "django.db.migrations.swappable_dependency", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.ImageField", "django.db.models.IntegerField", "django.db.models.DateTimeField" ]
[((248, 305), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (279, 305), False, 'from django.db import migrations, models\n'), ((498, 591), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)...
import configparser import json import os import random import time import datetime def iot_simulator(val_serial_nr): list_values_front = [] list_values_rear = [] # set variables TEMPERATURE = 20 HUMIDITY = 60 i = 1 while i < 11: curr_datetime = datetime.datetime....
[ "json.dump", "time.sleep", "datetime.datetime", "random.random", "configparser.ConfigParser", "datetime.datetime.now" ]
[((1706, 1733), 'configparser.ConfigParser', 'configparser.ConfigParser', ([], {}), '()\n', (1731, 1733), False, 'import configparser\n'), ((797, 810), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (807, 810), False, 'import time\n'), ((1955, 1968), 'time.sleep', 'time.sleep', (['(5)'], {}), '(5)\n', (1965, 1968)...
#!/usr/bin/env python # -*- coding: utf8 -*- from fundtotal import FundTotal from downpage import FundPage from portfolio import PortFolio if __name__ == "__main__": # ่Žทๅ–ๅ…จ้ƒจๅŸบ้‡‘ๅŸบ็ก€ๆ•ฐๆฎ # fund_total = FundTotal() # fund_total.sort_all_fund() # ไธ‹่ฝฝๅ„ไธชๅŸบ้‡‘้กต้ข # fund_page = FundPage() # fund_page.down_pages(...
[ "portfolio.PortFolio" ]
[((351, 362), 'portfolio.PortFolio', 'PortFolio', ([], {}), '()\n', (360, 362), False, 'from portfolio import PortFolio\n')]
import cfbackup from setuptools import setup, find_packages install_requires = [ 'cloudflare>=1.5.1', 'argparse>=1.2.1', ] setup( name='cfbackup', version=cfbackup.__version__, description=cfbackup.__doc__.strip(), url='https://github.com/nordicdyno/cfbackup', download_url='https://github....
[ "cfbackup.__doc__.strip", "setuptools.find_packages" ]
[((211, 235), 'cfbackup.__doc__.strip', 'cfbackup.__doc__.strip', ([], {}), '()\n', (233, 235), False, 'import cfbackup\n'), ((453, 468), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (466, 468), False, 'from setuptools import setup, find_packages\n')]
# <Copyright 2019, Argo AI, LLC. Released under the MIT license.> from typing import List, Optional import numpy as np from argoverse.utils import mayavi_wrapper from argoverse.utils.mesh_grid import get_mesh_grid_as_point_cloud from argoverse.visualization.mayavi_utils import ( Figure, draw_mayavi_line_segm...
[ "argoverse.utils.mayavi_wrapper.mlab.show", "argoverse.visualization.mayavi_utils.plot_3d_clipped_bbox_mayavi", "argoverse.utils.mayavi_wrapper.mlab.view", "argoverse.utils.mayavi_wrapper.mlab.figure", "numpy.zeros", "numpy.cross", "numpy.argmin", "numpy.where", "numpy.array", "argoverse.visualiza...
[((935, 1002), 'argoverse.utils.mesh_grid.get_mesh_grid_as_point_cloud', 'get_mesh_grid_as_point_cloud', (['(-20)', '(20)', '(0)', '(40)'], {'downsample_factor': '(0.1)'}), '(-20, 20, 0, 40, downsample_factor=0.1)\n', (963, 1002), False, 'from argoverse.utils.mesh_grid import get_mesh_grid_as_point_cloud\n'), ((1027, 1...
from django.contrib import admin # Register your models here. from .models import Pessoa admin.site.register(Pessoa)
[ "django.contrib.admin.site.register" ]
[((91, 118), 'django.contrib.admin.site.register', 'admin.site.register', (['Pessoa'], {}), '(Pessoa)\n', (110, 118), False, 'from django.contrib import admin\n')]
import sys import math def isPrime(num): if num == 1: return False if num <= 3: return True for i in range(2, int(math.sqrt(num)) + 1): if num % i == 0: return False return True M = int(sys.stdin.readline().rstrip()) N = int(sys.stdin.readline().rstrip()) min = 100001 sum = 0 for number in...
[ "sys.stdin.readline", "math.sqrt" ]
[((214, 234), 'sys.stdin.readline', 'sys.stdin.readline', ([], {}), '()\n', (232, 234), False, 'import sys\n'), ((253, 273), 'sys.stdin.readline', 'sys.stdin.readline', ([], {}), '()\n', (271, 273), False, 'import sys\n'), ((128, 142), 'math.sqrt', 'math.sqrt', (['num'], {}), '(num)\n', (137, 142), False, 'import math\...
from scan_api import ScanAPI from os import path def run_scan(apk_src): print_title("Start Scanning...") scan_api = ScanAPI(apk_src) def file_dir_exist(target_path): exists = path.exists(target_path) if not exists: print("\"" + target_path + "\"" + " NOT EXISTS!") return exists def print_...
[ "scan_api.ScanAPI", "os.path.exists" ]
[((125, 141), 'scan_api.ScanAPI', 'ScanAPI', (['apk_src'], {}), '(apk_src)\n', (132, 141), False, 'from scan_api import ScanAPI\n'), ((189, 213), 'os.path.exists', 'path.exists', (['target_path'], {}), '(target_path)\n', (200, 213), False, 'from os import path\n')]
import json import logging import os import shutil import subprocess import sys import time import uuid from .SingleNodeDockerCluster import SingleNodeDockerCluster from .utils import retry_check class DockerTestCluster(SingleNodeDockerCluster): def __init__(self): self.segfault = False super(Doc...
[ "json.loads", "logging.warn", "subprocess.check_output", "time.perf_counter", "time.sleep", "logging.info" ]
[((545, 602), 'logging.info', 'logging.info', (['"""Status before start: %s"""', 'container.status'], {}), "('Status before start: %s', container.status)\n", (557, 602), False, 'import logging\n'), ((882, 938), 'logging.info', 'logging.info', (['"""Status before stop: %s"""', 'container.status'], {}), "('Status before ...
# -*- coding: utf-8 -*- import subprocess as sp import sys import os import ete3 import glob import pandas as pd from ftplib import FTP # Run bash commands def run_command(cmd, ommit=False): if ommit: try: process = sp.Popen(cmd, shell=True) except: pass process.comm...
[ "os.mkdir", "ete3.faces.PieChartFace", "pandas.read_csv", "ete3.faces.RectFace", "subprocess.write", "ete3.faces.CircleFace", "os.path.isfile", "ete3.PhyloTree", "glob.glob", "os.path.join", "pandas.DataFrame", "ete3.TreeStyle", "os.path.dirname", "subprocess.convert_to_ultrametric", "os...
[((3299, 3357), 'ete3.PhyloTree', 'ete3.PhyloTree', (['tree'], {'sp_naming_function': 'load_species_name'}), '(tree, sp_naming_function=load_species_name)\n', (3313, 3357), False, 'import ete3\n'), ((7818, 7839), 'glob.glob', 'glob.glob', (["(dir + '/*')"], {}), "(dir + '/*')\n", (7827, 7839), False, 'import glob\n'), ...
'''Main function to train discrete BGAN. ''' import logging import lasagne import numpy as np import theano import theano.tensor as T from lib.data import load_stream from lib.log_util import set_stream_logger from lib.loss import get_losses_discrete from lib.math import est_log_Z from lib.train import setup, train...
[ "lib.utils.print_section", "lib.viz.setup", "theano.tensor.tensor4", "lib.data.load_stream", "models.build", "lib.loss.get_losses_discrete", "lib.utils.make_argument_parser", "lib.utils.config", "lib.log_util.set_stream_logger", "lasagne.utils.floatX", "lib.train.train", "lasagne.layers.get_ou...
[((477, 502), 'logging.getLogger', 'logging.getLogger', (['"""BGAN"""'], {}), "('BGAN')\n", (494, 502), False, 'import logging\n'), ((675, 704), 'lib.utils.print_section', 'print_section', (['"""LOADING DATA"""'], {}), "('LOADING DATA')\n", (688, 704), False, 'from lib.utils import config, make_argument_parser, print_s...
import numpy as np from pyloras._common import ( check_random_state, safe_random_state, ) def test_check_random_state(): rand = np.random.RandomState(12345) assert isinstance(check_random_state(rand), np.random.Generator) gen = np.random.default_rng(12345) assert isinstance(check_random_state...
[ "numpy.random.default_rng", "pyloras._common.check_random_state", "numpy.random.RandomState", "pyloras._common.safe_random_state" ]
[((143, 171), 'numpy.random.RandomState', 'np.random.RandomState', (['(12345)'], {}), '(12345)\n', (164, 171), True, 'import numpy as np\n'), ((251, 279), 'numpy.random.default_rng', 'np.random.default_rng', (['(12345)'], {}), '(12345)\n', (272, 279), True, 'import numpy as np\n'), ((391, 419), 'numpy.random.RandomStat...