code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
from loris.parameters.api import AbstractParameter from unittest.mock import Mock import pytest class ProperImpl(AbstractParameter): def __init__(self, uri_slice, enabled_features): super(ProperImpl, self).__init__(uri_slice, enabled_features) @property def canonical(self): return "canoni...
[ "pytest.raises", "unittest.mock.Mock" ]
[((621, 645), 'pytest.raises', 'pytest.raises', (['TypeError'], {}), '(TypeError)\n', (634, 645), False, 'import pytest\n'), ((981, 1005), 'pytest.raises', 'pytest.raises', (['TypeError'], {}), '(TypeError)\n', (994, 1005), False, 'import pytest\n'), ((1427, 1451), 'pytest.raises', 'pytest.raises', (['TypeError'], {}),...
from rdr_server.common.enums import SiteStatus, EnrollingStatus, DigitalSchedulingStatus, ObsoleteStatus from sqlalchemy import Column, Integer, String, Date, Float, ForeignKey, UnicodeText from rdr_server.model.base_model import BaseModel, ModelMixin, ModelEnum class Site(ModelMixin, BaseModel): __tablename__ =...
[ "sqlalchemy.String", "sqlalchemy.ForeignKey", "sqlalchemy.Column", "rdr_server.model.base_model.ModelEnum" ]
[((342, 381), 'sqlalchemy.Column', 'Column', (['"""site_id"""', 'Integer'], {'unique': '(True)'}), "('site_id', Integer, unique=True)\n", (348, 381), False, 'from sqlalchemy import Column, Integer, String, Date, Float, ForeignKey, UnicodeText\n'), ((631, 672), 'sqlalchemy.Column', 'Column', (['"""mayolink_client_number...
# _*_ coding: utf-8 _*_ """ password-validate.utils ----------------------- This module provides utility functions that are used within password_validate that are also useful for external consumption. """ import hashlib from os.path import abspath, dirname, join DICTIONARY_LOC = "dictionary_files" DICTIONARY = "dicti...
[ "os.path.abspath", "os.path.join", "hashlib.sha512" ]
[((613, 629), 'hashlib.sha512', 'hashlib.sha512', ([], {}), '()\n', (627, 629), False, 'import hashlib\n'), ((1803, 1843), 'os.path.join', 'join', (['file_loc', 'DICTIONARY_LOC', 'filename'], {}), '(file_loc, DICTIONARY_LOC, filename)\n', (1807, 1843), False, 'from os.path import abspath, dirname, join\n'), ((1769, 178...
""" Complex Valued Neural Layers From Scratch Programmed by <NAME> * MIT Licence * 2022-02-15 Last Update """ from torch import nn import torch ##__________________________________Complex Linear Layer __________________________________________ class CLinear(nn.Module): def __init__(self, in_channels, ...
[ "torch.nn.BatchNorm2d", "torch.abs", "torch.nn.LeakyReLU", "torch.nn.init.xavier_uniform_", "torch.nn.LSTM", "torch.stack", "torch.nn.Conv2d", "torch.nn.MaxPool2d", "torch.nn.Linear", "torch.nn.AvgPool2d", "torch.nn.ConvTranspose2d" ]
[((475, 531), 'torch.nn.Linear', 'nn.Linear', (['self.in_channels', 'self.out_channels'], {}), '(self.in_channels, self.out_channels, **kwargs)\n', (484, 531), False, 'from torch import nn\n'), ((553, 609), 'torch.nn.Linear', 'nn.Linear', (['self.in_channels', 'self.out_channels'], {}), '(self.in_channels, self.out_cha...
from simplelinkedin import LinkedIn def run_script(settings): with LinkedIn( username=settings.get("LINKEDIN_USER"), password=settings.get("LINKEDIN_PASSWORD"), browser=settings.get("LINKEDIN_BROWSER"), driver_path=settings.get("LINKEDIN_BROWSER_DRIVER"), headless=bool(sett...
[ "os.getenv" ]
[((1438, 1464), 'os.getenv', 'os.getenv', (['"""LINKEDIN_USER"""'], {}), "('LINKEDIN_USER')\n", (1447, 1464), False, 'import os\n'), ((1495, 1525), 'os.getenv', 'os.getenv', (['"""LINKEDIN_PASSWORD"""'], {}), "('LINKEDIN_PASSWORD')\n", (1504, 1525), False, 'import os\n')]
from django.forms import ModelForm from .models import bc_sector, bc_company, bc_company_code from administrators.models import bc_admin_type_investiment class SectorForm(ModelForm): class Meta: model = bc_sector fields = ['name','description','is_active'] class CompanyForm(ModelForm): class ...
[ "administrators.models.bc_admin_type_investiment.objects.filter" ]
[((1055, 1111), 'administrators.models.bc_admin_type_investiment.objects.filter', 'bc_admin_type_investiment.objects.filter', ([], {'is_active': '(True)'}), '(is_active=True)\n', (1095, 1111), False, 'from administrators.models import bc_admin_type_investiment\n')]
import pymongo from bson.json_util import loads, dumps from bson import json_util import csv import sys import uuid import os import itertools from faker import Faker from collections import defaultdict import json import datetime from deepmerge import Merger import random import re ###################################...
[ "itertools.islice", "deepmerge.Merger", "faker.Faker", "collections.defaultdict", "random.randint" ]
[((873, 880), 'faker.Faker', 'Faker', ([], {}), '()\n', (878, 880), False, 'from faker import Faker\n'), ((2648, 2719), 'deepmerge.Merger', 'Merger', (["[(dict, 'merge'), (list, zipmerge)]", "['override']", "['override']"], {}), "([(dict, 'merge'), (list, zipmerge)], ['override'], ['override'])\n", (2654, 2719), False,...
# Copyright (c) 2019-2020, RTE (https://www.rte-france.com) # See AUTHORS.txt # This Source Code Form is subject to the terms of the Apache License, version 2.0. # If a copy of the Apache License, version 2.0 was not distributed with this file, you can obtain one at http://www.apache.org/licenses/LICENSE-2.0. # SP...
[ "os.path.exists", "os.listdir", "os.makedirs", "click.option", "os.rename", "nbconvert.preprocessors.ExecutePreprocessor", "click.command", "nbconvert.RSTExporter" ]
[((613, 626), 'nbconvert.RSTExporter', 'RSTExporter', ([], {}), '()\n', (624, 626), False, 'from nbconvert import RSTExporter\n'), ((632, 717), 'nbconvert.preprocessors.ExecutePreprocessor', 'ExecutePreprocessor', ([], {'timeout': '(600)', 'kernel_name': '"""python3"""', 'store_widget_state': '(True)'}), "(timeout=600,...
import datetime class Timerange: def __init__(self, start, length): self.start = start self.length = length def range(self): end = self.start + self.length return (self.start, end) def __contains__(self, day): delta = day - self.start return datetime.timedelta(seconds = 0) <= delta and delta < self.le...
[ "datetime.datetime", "datetime.timedelta" ]
[((998, 1053), 'datetime.datetime', 'datetime.datetime', (['(1970)', '(1)', '(1)', 'start_hour', 'start_minute'], {}), '(1970, 1, 1, start_hour, start_minute)\n', (1015, 1053), False, 'import datetime\n'), ((1065, 1116), 'datetime.datetime', 'datetime.datetime', (['(1970)', '(1)', '(1)', 'end_hour', 'end_minute'], {}),...
#! /usr/bin/env python3 import logging, sys, os from . import main logger = logging.getLogger(__name__ if not __name__ == '__main__' else os.path.basename(__file__)) if __name__ == '__main__': logging.basicConfig() sys.exit(main())
[ "logging.basicConfig", "os.path.basename" ]
[((200, 221), 'logging.basicConfig', 'logging.basicConfig', ([], {}), '()\n', (219, 221), False, 'import logging, sys, os\n'), ((140, 166), 'os.path.basename', 'os.path.basename', (['__file__'], {}), '(__file__)\n', (156, 166), False, 'import logging, sys, os\n')]
# 插入 print('插入'*15) x = [1,2,3] print(x) x = x+ [4] x.append(5) print(x) x.insert(3,'w') x.extend(['a','b']) print(x*3) # 删除 print("删除"*15) y = ["a","b","c","d",'e','f'] del y[2] print(y) y.pop(0) print(y) y.remove('f') print(y) # 列表元素访问与计数 print("列表元素访问与计数"*5) x =[1,2,3,3,4,5] print(x.count(3),x.index(2)) # 列表排序 pr...
[ "random.shuffle" ]
[((394, 406), 'random.shuffle', 'r.shuffle', (['x'], {}), '(x)\n', (403, 406), True, 'import random as r\n')]
import aiohttp class SmarwiControl: """Control class.""" def __init__(self, hosts): """Initialize.""" self.hosts = [x.strip() for x in hosts.split(',')] self.title = ', '.join([x.split('.')[0] for x in self.hosts]) async def authenticate(self) -> bool: """Test if we can au...
[ "aiohttp.ClientSession" ]
[((920, 943), 'aiohttp.ClientSession', 'aiohttp.ClientSession', ([], {}), '()\n', (941, 943), False, 'import aiohttp\n')]
from PyQt5 import QtWidgets, QtCore, QtPrintSupport from PyQt5.QtCore import QDate, QTime, Qt, QTimer, QRectF from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtPrintSupport import QPrinter from database import MyCursor from PyQt5 import QtGui from datetime import datetime, timedelta from annulation i...
[ "PyQt5.QtPrintSupport.QPrinter", "PyQt5.QtGui.QPainter", "PyQt5.QtPrintSupport.QPrintDialog", "PyQt5.QtCore.QDate.currentDate", "PyQt5.QtCore.QTime.currentTime", "datetime.datetime.strptime", "PyQt5.QtCore.QTimer", "PyQt5.QtGui.QColor", "annulation.Annulation", "datetime.datetime.now", "database...
[((25708, 25740), 'PyQt5.QtWidgets.QApplication', 'QtWidgets.QApplication', (['sys.argv'], {}), '(sys.argv)\n', (25730, 25740), False, 'from PyQt5 import QtWidgets, QtCore, QtPrintSupport\n'), ((645, 655), 'database.MyCursor', 'MyCursor', ([], {}), '()\n', (653, 655), False, 'from database import MyCursor\n'), ((672, 7...
#!/usr/bin/env python # Copyright 2015 Open Connectome Project (http://openconnecto.me) # # 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 # #...
[ "os.system", "argparse.ArgumentParser" ]
[((1978, 2070), 'os.system', 'system', (["('fsl2scheme -bvecfile ' + grad + ' -bvalfile ' + bval + ' -bscale 1 > ' +\n scheme)"], {}), "('fsl2scheme -bvecfile ' + grad + ' -bvalfile ' + bval +\n ' -bscale 1 > ' + scheme)\n", (1984, 2070), False, 'from os import system\n'), ((2119, 2187), 'os.system', 'system', ([...
"""LTL specification encoder""" import tensorflow as tf from ...data.encoder import PAD_TOKEN from ..ltl_encoder import LTLTreeEncoder class LTLSpecTreeEncoder(LTLTreeEncoder): def encode(self, spec): return super().encode(spec.formula_str) class LTLSpecGuaranteeEncoder(LTLTreeEncoder): def __in...
[ "tensorflow.constant", "tensorflow.TensorSpec" ]
[((610, 683), 'tensorflow.TensorSpec', 'tf.TensorSpec', ([], {'shape': '(self.num_guarantees, self.pad)', 'dtype': 'self.tf_dtype'}), '(shape=(self.num_guarantees, self.pad), dtype=self.tf_dtype)\n', (623, 683), True, 'import tensorflow as tf\n'), ((742, 834), 'tensorflow.TensorSpec', 'tf.TensorSpec', ([], {'shape': '(...
from imutils.video import WebcamVideoStream from FaceRecognition import * from face_recognition import compare_faces import cv2 SKIP_FRAME_RATIO = 2 images, greys, names = load_faces("knownfaces") knownfaces = encodeDataset(images, greys) ID = [1,2,3,4,5,6,7,8,9] face_locations = [] face_names = [] proces...
[ "imutils.video.WebcamVideoStream", "cv2.imshow", "cv2.destroyAllWindows", "face_recognition.compare_faces", "cv2.waitKey" ]
[((1481, 1504), 'cv2.destroyAllWindows', 'cv2.destroyAllWindows', ([], {}), '()\n', (1502, 1504), False, 'import cv2\n'), ((1382, 1408), 'cv2.imshow', 'cv2.imshow', (['"""Video"""', 'frame'], {}), "('Video', frame)\n", (1392, 1408), False, 'import cv2\n'), ((344, 363), 'imutils.video.WebcamVideoStream', 'WebcamVideoStr...
import os import json import pytest from cycsm import isd import cycsm.csm as csm import usgscam as cam data_path = os.path.dirname(__file__) class TestGenericLs: @pytest.mark.parametrize('image, ground',[ ((2500, 9216, 0), (-73589.5516508502, 562548.342040933, 2372508.44060771)) ...
[ "os.path.dirname", "pytest.mark.parametrize" ]
[((118, 143), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (133, 143), False, 'import os\n'), ((172, 295), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""image, ground"""', '[((2500, 9216, 0), (-73589.5516508502, 562548.342040933, 2372508.44060771))]'], {}), "('image, ground', ...
import pytest import json import os import logging logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') from glacierbackup.command import _construct_argparse_parser from glacierbackup.jobs import BackupJob from glacierbackup.database import GBDatabase, GBDatabaseError...
[ "logging.basicConfig", "tarfile.open", "glacierbackup.command._construct_argparse_parser", "glacierbackup.database.GBDatabase", "sqlite3.connect", "os.makedirs", "json.dump", "os.path.join", "os.path.isfile", "os.remove", "pytest.raises", "os.mkdir", "shutil.rmtree", "json.load", "os.pat...
[((51, 159), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.DEBUG', 'format': '"""%(asctime)s - %(name)s - %(levelname)s - %(message)s"""'}), "(level=logging.DEBUG, format=\n '%(asctime)s - %(name)s - %(levelname)s - %(message)s')\n", (70, 159), False, 'import logging\n'), ((396, 447), 'os.pat...
import pandas import folium data = pandas.read_csv("Volcanoes.txt") lat = list(data['LAT']) lon = list(data['LON']) elev = list(data['ELEV']) name = list(data["NAME"]) html = """ Volcano name:<br> <a href="https://www.google.com/search?q=%%22%s%%22" target="_blank">%s</a><br> Height: %s m """ def color_...
[ "folium.IFrame", "pandas.read_csv", "folium.LayerControl", "folium.Map", "folium.FeatureGroup", "folium.Popup" ]
[((39, 71), 'pandas.read_csv', 'pandas.read_csv', (['"""Volcanoes.txt"""'], {}), "('Volcanoes.txt')\n", (54, 71), False, 'import pandas\n'), ((494, 568), 'folium.Map', 'folium.Map', ([], {'location': '[38.58, -99.09]', 'zoom_start': '(6)', 'tiles': '"""Stamen Terrain"""'}), "(location=[38.58, -99.09], zoom_start=6, til...
from components.competition import Competition from components.pizzeria import Pizzeria class TestObjects: def test_two_identical_pizzeria_objects(self): p1 = Pizzeria({'p1': [1, 2, 3], 'p2': [4, 5, 6]}, 6) p2 = Pizzeria({'p1': [1, 2, 3], 'p2': [4, 5, 6]}, 6) assert p1 == p2 def test_...
[ "components.pizzeria.Pizzeria", "components.competition.Competition" ]
[((173, 220), 'components.pizzeria.Pizzeria', 'Pizzeria', (["{'p1': [1, 2, 3], 'p2': [4, 5, 6]}", '(6)'], {}), "({'p1': [1, 2, 3], 'p2': [4, 5, 6]}, 6)\n", (181, 220), False, 'from components.pizzeria import Pizzeria\n'), ((234, 281), 'components.pizzeria.Pizzeria', 'Pizzeria', (["{'p1': [1, 2, 3], 'p2': [4, 5, 6]}", '...
#!/usr/bin/env python3 import pvml import numpy as np import matplotlib.pyplot as plt import argparse from itertools import zip_longest _NORMALIZATION = { "none": lambda *X: (X[0] if len(X) == 1 else X), "meanvar": pvml.meanvar_normalization, "minmax": pvml.minmax_normalization, "maxabs": pvml.maxabs...
[ "pvml.logreg_l1_train", "pvml.kmeans_train", "pvml.svm_inference", "pvml.ksvm_train", "numpy.argsort", "pvml.ClassificationTree", "pvml.binary_cross_entropy", "pvml.ogda_inference", "pvml.svm_train", "pvml.perceptron_inference", "pvml.hgda_train", "numpy.arange", "matplotlib.pyplot.imshow", ...
[((490, 536), 'argparse.ArgumentParser', 'argparse.ArgumentParser', (['"""Classification demo"""'], {}), "('Classification demo')\n", (513, 536), False, 'import argparse\n'), ((21042, 21076), 'numpy.concatenate', 'np.concatenate', (['(X, Y[:, None])', '(1)'], {}), '((X, Y[:, None]), 1)\n', (21056, 21076), True, 'import...
# -*- coding: utf-8 -*- """ Created on Tue Jun 11 13:46:58 2019 @author: bdgecyt """ import cv2 import math from time import time import numpy as np import wrapper from operator import itemgetter boxes = [] xCount = 0 yCount = 0 iter = 0 img = 0 def on_mouse(event, x, y, flags, params): global iter t...
[ "numpy.arccos", "math.sqrt", "wrapper.dealAImage", "operator.itemgetter", "cv2.imshow", "numpy.argsort", "numpy.array", "numpy.dot", "cv2.waitKey", "cv2.destroyAllWindows", "numpy.linalg.norm", "numpy.argmin", "numpy.degrees", "time.time", "cv2.imread" ]
[((323, 329), 'time.time', 'time', ([], {}), '()\n', (327, 329), False, 'from time import time\n'), ((1635, 1675), 'math.sqrt', 'math.sqrt', (['(xdiff * xdiff + ydiff * ydiff)'], {}), '(xdiff * xdiff + ydiff * ydiff)\n', (1644, 1675), False, 'import math\n'), ((2078, 2095), 'numpy.array', 'np.array', (['line[0]'], {}),...
""" Orthogonal Weight Normalization: Solution to Optimization over Multiple Dependent Stiefel Manifolds in Deep Neural Networks AAAI 2018 Authors: <NAME> """ import torch.nn import torch.nn.functional as F from torch.nn import Parameter from torch.autograd import Variable from typing import List from torch.autograd.fu...
[ "torch.nn.functional.conv2d", "torch.nn.Parameter" ]
[((2626, 2724), 'torch.nn.functional.conv2d', 'F.conv2d', (['input_f', 'weight_q', 'self.bias', 'self.stride', 'self.padding', 'self.dilation', 'self.groups'], {}), '(input_f, weight_q, self.bias, self.stride, self.padding, self.\n dilation, self.groups)\n', (2634, 2724), True, 'import torch.nn.functional as F\n'), ...
import pandas as pd from visions import visions_string, visions_datetime from visions.core.model import TypeRelation from visions.core.model.relations import InferenceRelation from visions.utils.coercion import test_utils def to_datetime_year_week(series): """Convert a series of the format YYYY/UU (year, week) t...
[ "visions.utils.coercion.test_utils.coercion_test", "pandas.to_datetime" ]
[((767, 813), 'pandas.to_datetime', 'pd.to_datetime', (["(series + '0')"], {'format': '"""%Y/%U%w"""'}), "(series + '0', format='%Y/%U%w')\n", (781, 813), True, 'import pandas as pd\n'), ((1289, 1328), 'pandas.to_datetime', 'pd.to_datetime', (['series'], {'format': '"""%Y%m%d"""'}), "(series, format='%Y%m%d')\n", (1303...
# Copyright 2019 Graphcore Ltd. import time from datetime import datetime import os from absl import app, flags import subprocess import re import statistics """ This program launches subprocesses to handle data loading and resnext101 inference. It can also be used to perform inference on other ONNX CNNs that take Im...
[ "statistics.mean", "os.path.exists", "absl.flags.DEFINE_bool", "re.compile", "absl.flags.DEFINE_integer", "subprocess.Popen", "absl.flags.DEFINE_boolean", "absl.app.run", "time.sleep", "datetime.datetime.now", "os.mkdir", "absl.flags.DEFINE_string" ]
[((1149, 1213), 'absl.flags.DEFINE_integer', 'flags.DEFINE_integer', (['"""batch_size"""', '(6)', '"""Batch size (per device)"""'], {}), "('batch_size', 6, 'Batch size (per device)')\n", (1169, 1213), False, 'from absl import app, flags\n'), ((1214, 1317), 'absl.flags.DEFINE_integer', 'flags.DEFINE_integer', (['"""num_...
import pytest import pandas as pd from src.preprocess import check class Test_check_column_names: def test_check_column_names(self): records = pd.DataFrame({'a': [1]}) config = pd.DataFrame({'column': ['a'], 'dataset': ['ACAPS']}) res = check.check_column_names(records, config, log=False...
[ "pandas.DataFrame", "src.preprocess.check.check_column_names" ]
[((158, 182), 'pandas.DataFrame', 'pd.DataFrame', (["{'a': [1]}"], {}), "({'a': [1]})\n", (170, 182), True, 'import pandas as pd\n'), ((200, 253), 'pandas.DataFrame', 'pd.DataFrame', (["{'column': ['a'], 'dataset': ['ACAPS']}"], {}), "({'column': ['a'], 'dataset': ['ACAPS']})\n", (212, 253), True, 'import pandas as pd\...
from unittest import mock from django.test import TestCase from parameterized import param, parameterized from rest_framework import validators from apps.order.constants import ( EXTENSION_ERROR_MESSAGE, MAX_IMAGE_SIZE, MAX_IMAGE_SIZE_ERROR_MESSAGE, ) from apps.order.validators import FileValidator clas...
[ "unittest.mock.MagicMock", "parameterized.param" ]
[((510, 526), 'unittest.mock.MagicMock', 'mock.MagicMock', ([], {}), '()\n', (524, 526), False, 'from unittest import mock\n'), ((1285, 1301), 'unittest.mock.MagicMock', 'mock.MagicMock', ([], {}), '()\n', (1299, 1301), False, 'from unittest import mock\n'), ((803, 897), 'parameterized.param', 'param', (['EXTENSION_ERR...
# -*- coding: utf-8 -*- """Command line interface.""" import logging import click from pathrev.pipeline import ( do_gsea, do_preranked, ) logger = logging.getLogger(__name__) @click.group(help='pathrev') def main(): """Run pathrev.""" logging.basicConfig(format="%(asctime)s - %(levelname)s - %(name)s -...
[ "logging.getLogger", "logging.basicConfig", "click.group", "click.echo", "click.Path", "pathrev.pipeline.do_preranked", "pathrev.pipeline.do_gsea" ]
[((154, 181), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (171, 181), False, 'import logging\n'), ((185, 212), 'click.group', 'click.group', ([], {'help': '"""pathrev"""'}), "(help='pathrev')\n", (196, 212), False, 'import click\n'), ((252, 339), 'logging.basicConfig', 'logging.basicCo...
import logging from parsl.monitoring.handler import DatabaseHandler from parsl.monitoring.handler import RemoteHandler from parsl.utils import RepresentationMixin class NullHandler(logging.Handler): """Setup default logging to /dev/null since this is library.""" def emit(self, record): pass class M...
[ "logging.getLogger", "parsl.monitoring.handler.DatabaseHandler", "parsl.monitoring.handler.RemoteHandler" ]
[((4797, 4827), 'logging.getLogger', 'logging.getLogger', (['logger_name'], {}), '(logger_name)\n', (4814, 4827), False, 'import logging\n'), ((5166, 5224), 'parsl.monitoring.handler.DatabaseHandler', 'DatabaseHandler', (['monitoring_config.store.connection_string'], {}), '(monitoring_config.store.connection_string)\n'...
from flask import Flask,request,render_template import numpy as np from Reccomending_functions import item_item_cf,user_user_cf,rank_matrix_factorize from Database_connector import fetch_from_database import random #ML Packages asd = [] app = Flask(__name__) @app.route('/') def index(): global asd randindex = [...
[ "flask.render_template", "Reccomending_functions.item_item_cf", "random.shuffle", "flask.Flask", "Database_connector.fetch_from_database", "Reccomending_functions.user_user_cf", "numpy.zeros", "Reccomending_functions.rank_matrix_factorize" ]
[((243, 258), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (248, 258), False, 'from flask import Flask, request, render_template\n'), ((349, 374), 'random.shuffle', 'random.shuffle', (['randindex'], {}), '(randindex)\n', (363, 374), False, 'import random\n'), ((450, 482), 'Database_connector.fetch_from_d...
#!/usr/bin/env python # -*- coding: utf-8 -*- from .base import NameProvider from .base import PROVIDERS from vor.human import Gender from py_utilities.decorators import run_once import os import random class Census1990Provider(NameProvider): KEYS = { 'provider': 'Census1990', 'm_first': 'male:f...
[ "os.path.realpath", "random.choice", "os.path.join" ]
[((1781, 1807), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (1797, 1807), False, 'import os\n'), ((1839, 1859), 'os.path.join', 'os.path.join', (['cwd', 'x'], {}), '(cwd, x)\n', (1851, 1859), False, 'import os\n'), ((1026, 1055), 'random.choice', 'random.choice', (['PROVIDERS[key]'], {})...
from django.conf.urls import url from . import views urlpatterns = [ url(r'addCourse/', views.add_course, name='addCourse'), url(r'^dropCourse/', views.drop_course, name='dropCourse'), ]
[ "django.conf.urls.url" ]
[((75, 128), 'django.conf.urls.url', 'url', (['"""addCourse/"""', 'views.add_course'], {'name': '"""addCourse"""'}), "('addCourse/', views.add_course, name='addCourse')\n", (78, 128), False, 'from django.conf.urls import url\n'), ((135, 192), 'django.conf.urls.url', 'url', (['"""^dropCourse/"""', 'views.drop_course'], ...
import pickle from collections import OrderedDict from itertools import product import orjson import pytest import pytest_asyncio import xmltodict from aiohttp.client_reqrep import ClientResponse from pydantic import BaseModel from yarl import URL from aiotapioca.adapters import TapiocaAdapter, generate_wrapper_from_...
[ "collections.OrderedDict", "xmltodict.parse", "itertools.product", "pytest.raises", "xmltodict.unparse", "orjson.loads", "aiotapioca.adapters.generate_wrapper_from_adapter", "orjson.dumps" ]
[((13338, 13372), 'itertools.product', 'product', (['semaphores', 'types_request'], {}), '(semaphores, types_request)\n', (13345, 13372), False, 'from itertools import product\n'), ((14487, 14521), 'itertools.product', 'product', (['semaphores', 'types_request'], {}), '(semaphores, types_request)\n', (14494, 14521), Fa...
# -*- coding: utf-8 -*- import json import scrapy class SandalSpider(scrapy.Spider): name = "sandal" api_url = "https://www.skoringen.dk/sandaler-dame/?page={}" start_urls = [api_url.format(1)] def parse(self, response): if response.status == 404: return sandals = respons...
[ "scrapy.Request" ]
[((517, 576), 'scrapy.Request', 'scrapy.Request', ([], {'url': 'detail_url', 'callback': 'self.parse_details'}), '(url=detail_url, callback=self.parse_details)\n', (531, 576), False, 'import scrapy\n')]
import csv import json # Open the CSV f = open( 'events.csv', 'rU' ) # Change each fieldname to the appropriate field name. I know, so difficult. reader = csv.DictReader( f, fieldnames = ("id","Nombre","datasketch","pacifista","ojoalapaz","indepaz","ONU","Defensoria","Unidad de Victimas","Somos Defensores"...
[ "json.dumps", "csv.DictReader" ]
[((168, 538), 'csv.DictReader', 'csv.DictReader', (['f'], {'fieldnames': "('id', 'Nombre', 'datasketch', 'pacifista', 'ojoalapaz', 'indepaz', 'ONU',\n 'Defensoria', 'Unidad de Victimas', 'Somos Defensores',\n 'Cinep. Noche y Niebla', 'CODHES',\n 'Colectivo de Abogados José Alvear Restrepo Cajar', 'Género', 'Fe...
import speedtest def perform_test(): s = speedtest.Speedtest() best_server = s.get_best_server() print('Best server: ') print(best_server['name']) print('Perform upload app:') result = s.upload() print('Done:' + str(result / 1024 / 1024) + ' MBit/s') print('Perform download app:') ...
[ "speedtest.Speedtest" ]
[((47, 68), 'speedtest.Speedtest', 'speedtest.Speedtest', ([], {}), '()\n', (66, 68), False, 'import speedtest\n')]
import os import pandas as pd import shutil os.chdir("../Downloads/DeepWeeds_Images_256") try: os.mkdir("train") os.mkdir("val") except: pass train = pd.read_csv("../train_set_labels.csv") val = pd.read_csv("../test_set_labels.csv") print(train) for j,i in train.iterrows(): try: os.mkdir("tr...
[ "os.chdir", "shutil.copyfile", "os.mkdir", "pandas.read_csv" ]
[((47, 92), 'os.chdir', 'os.chdir', (['"""../Downloads/DeepWeeds_Images_256"""'], {}), "('../Downloads/DeepWeeds_Images_256')\n", (55, 92), False, 'import os\n'), ((165, 203), 'pandas.read_csv', 'pd.read_csv', (['"""../train_set_labels.csv"""'], {}), "('../train_set_labels.csv')\n", (176, 203), True, 'import pandas as ...
import aiohttp from collections import namedtuple from aiohttp_socks import ProxyConnector from .config import TIMEOUT, PROXY, USER_AGENT from . import utils as utl class HttpClient(object): '''Performs HTTP requests. A `aiohttp` wrapper, essentialy''' def __init__(self, timeout=TIMEOUT, proxy=PR...
[ "aiohttp_socks.ProxyConnector.from_url", "aiohttp.ClientSession", "collections.namedtuple" ]
[((726, 766), 'collections.namedtuple', 'namedtuple', (['"""response"""', "['http', 'html']"], {}), "('response', ['http', 'html'])\n", (736, 766), False, 'from collections import namedtuple\n'), ((370, 400), 'aiohttp_socks.ProxyConnector.from_url', 'ProxyConnector.from_url', (['proxy'], {}), '(proxy)\n', (393, 400), F...
import os import time from flask import Flask, render_template, request from aws_requests_auth.aws_auth import AWSRequestsAuth import requests import uuid import base64 import shutil from config import Config app = Flask(__name__) config = Config() @app.route("/", methods=["GET", "POST"]) def index(): if "uploa...
[ "flask.render_template", "requests.post", "os.makedirs", "flask.Flask", "config.Config", "base64.b64encode", "os.path.join", "time.sleep", "requests.get", "uuid.uuid4", "aws_requests_auth.aws_auth.AWSRequestsAuth", "shutil.rmtree", "flask.request.files.get" ]
[((216, 231), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (221, 231), False, 'from flask import Flask, render_template, request\n'), ((242, 250), 'config.Config', 'Config', ([], {}), '()\n', (248, 250), False, 'from config import Config\n'), ((1335, 1430), 'flask.render_template', 'render_template', (['...
# -*- coding: utf-8 -*- # Copyright (c) 2018-2020 <NAME> """Module containing all tests for the main window of easyp2p.""" from datetime import date, timedelta import os import sys import unittest.mock from PyQt5.QtCore import QLocale from PyQt5.QtWidgets import QApplication, QCheckBox, QLineEdit import easyp2p.pl...
[ "PyQt5.QtCore.QLocale", "PyQt5.QtWidgets.QLineEdit.setText", "os.path.join", "datetime.date.today", "datetime.date", "PyQt5.QtWidgets.QApplication", "datetime.timedelta", "easyp2p.ui.main_window.MainWindow" ]
[((384, 406), 'PyQt5.QtWidgets.QApplication', 'QApplication', (['sys.argv'], {}), '(sys.argv)\n', (396, 406), False, 'from PyQt5.QtWidgets import QApplication, QCheckBox, QLineEdit\n'), ((649, 667), 'easyp2p.ui.main_window.MainWindow', 'MainWindow', (['QT_APP'], {}), '(QT_APP)\n', (659, 667), False, 'from easyp2p.ui.ma...
import json try: import cPickle as pickle except: import pickle def save_json(data, file_path): with open(file_path, "w") as f: json.dump(data, f) def save_json_pretty(data, file_path): """save formatted json, use this one for some json config files""" with open(file_path, "w") as f: ...
[ "pickle.dump", "json.dumps", "pickle.load", "json.load", "json.dump" ]
[((150, 168), 'json.dump', 'json.dump', (['data', 'f'], {}), '(data, f)\n', (159, 168), False, 'import json\n'), ((456, 468), 'json.load', 'json.load', (['f'], {}), '(f)\n', (465, 468), False, 'import json\n'), ((599, 638), 'pickle.dump', 'pickle.dump', (['data', 'f'], {'protocol': 'protocol'}), '(data, f, protocol=pro...
import sqlalchemy as sa import numpy as np import datetime as dt from faker import Faker from jinja2 import Environment, PackageLoader from database.models.core import ( Base, Products, Customers, TransactionDetails, Transactions, ) import logging logging.basicConfig() logger = logging.getLogger(...
[ "logging.basicConfig", "logging.getLogger", "sqlalchemy.orm.sessionmaker", "database.models.core.Base.metadata.drop_all", "database.models.core.Base.metadata.create_all", "database.models.core.TransactionDetails", "sqlalchemy.schema.CreateSchema", "sqlalchemy.create_engine", "database.models.core.Pr...
[((271, 292), 'logging.basicConfig', 'logging.basicConfig', ([], {}), '()\n', (290, 292), False, 'import logging\n'), ((302, 329), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (319, 329), False, 'import logging\n'), ((1815, 1852), 'sqlalchemy.create_engine', 'sa.create_engine', (['conn_...
from river import stats, utils from . import base class SSB(base.ClusteringMetric): """Sum-of-Squares Between Clusters (SSB). The Sum-of-Squares Between Clusters is the weighted mean of the squares of distances between cluster centers to the mean value of the whole dataset. Examples -------- ...
[ "river.utils.math.minkowski_distance", "river.stats.Mean" ]
[((2178, 2241), 'river.utils.math.minkowski_distance', 'utils.math.minkowski_distance', (['centers[i]', 'center_all_points', '(2)'], {}), '(centers[i], center_all_points, 2)\n', (2207, 2241), False, 'from river import stats, utils\n'), ((2735, 2798), 'river.utils.math.minkowski_distance', 'utils.math.minkowski_distance...
#!/usr/bin/env python3 # Monte Carlo Simulation: Dice Game # Based on Investopedia: Creating a Monte Carlo Simulation # investopedia.com/articles/investing/093015/create-monte-carlo-simulation-using-excel.asp\ # Here's how the dice game rolls: # The player throws three dice that have 6 sides 3 times. # If the tota...
[ "random.randint" ]
[((842, 862), 'random.randint', 'random.randint', (['(1)', '(6)'], {}), '(1, 6)\n', (856, 862), False, 'import random\n')]
import numpy as np import torch import argparse from pina.pinn import PINN from pina.ppinn import ParametricPINN as pPINN from pina.label_tensor import LabelTensor from torch.nn import ReLU, Tanh, Softplus from pina.adaptive_functions.adaptive_softplus import AdaptiveSoftplus from problems.parametric_elliptic_optimal_c...
[ "argparse.ArgumentParser", "matplotlib.use", "matplotlib.pyplot.plot", "problems.parametric_elliptic_optimal_control_alpha_variable.ParametricEllipticOptimalControl", "torch.tensor", "numpy.linspace", "pina.label_tensor.LabelTensor.hstack", "pina.ppinn.ParametricPINN", "matplotlib.pyplot.legend", ...
[((1735, 1774), 'problems.parametric_elliptic_optimal_control_alpha_variable.ParametricEllipticOptimalControl', 'ParametricEllipticOptimalControl', (['alpha'], {}), '(alpha)\n', (1767, 1774), False, 'from problems.parametric_elliptic_optimal_control_alpha_variable import ParametricEllipticOptimalControl\n'), ((1817, 18...
# Copyright 2020 Makani Technologies LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
[ "makani.lib.python.batch_sim.gcloud_util.ParseBucketAndPath" ]
[((2469, 2517), 'makani.lib.python.batch_sim.gcloud_util.ParseBucketAndPath', 'gcloud_util.ParseBucketAndPath', (['cloud_name', 'None'], {}), '(cloud_name, None)\n', (2499, 2517), False, 'from makani.lib.python.batch_sim import gcloud_util\n')]
import djclick as click from django_celery_results.models import TaskResult @click.command() def command(): TaskResult.objects.filter(status="STARTED").delete()
[ "django_celery_results.models.TaskResult.objects.filter", "djclick.command" ]
[((79, 94), 'djclick.command', 'click.command', ([], {}), '()\n', (92, 94), True, 'import djclick as click\n'), ((114, 157), 'django_celery_results.models.TaskResult.objects.filter', 'TaskResult.objects.filter', ([], {'status': '"""STARTED"""'}), "(status='STARTED')\n", (139, 157), False, 'from django_celery_results.mo...
""" Plugin for manually animating large numbers of rigs given a small number of source rigs See README for installation instructions and usage """ from pymel.api.plugins import Command import maya.OpenMayaMPx as OpenMayaMPx from characterCrowdSrc.characterCrowd import * class characterCrowdGui(Command): def doIt...
[ "maya.OpenMayaMPx.MFnPlugin" ]
[((1405, 1461), 'maya.OpenMayaMPx.MFnPlugin', 'OpenMayaMPx.MFnPlugin', (['mobject', '"""CampbellMorgan"""', '"""0.01"""'], {}), "(mobject, 'CampbellMorgan', '0.01')\n", (1426, 1461), True, 'import maya.OpenMayaMPx as OpenMayaMPx\n'), ((1826, 1856), 'maya.OpenMayaMPx.MFnPlugin', 'OpenMayaMPx.MFnPlugin', (['mobject'], {}...
# coding: utf-8 """ Decision Lens API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: 1.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import impor...
[ "unittest.main", "dlxapi.api.spreadsheet_api.SpreadsheetApi" ]
[((1365, 1380), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1378, 1380), False, 'import unittest\n'), ((580, 623), 'dlxapi.api.spreadsheet_api.SpreadsheetApi', 'dlxapi.api.spreadsheet_api.SpreadsheetApi', ([], {}), '()\n', (621, 623), False, 'import dlxapi\n')]
import tkinter as tk import tkinter.ttk as ttk from .pixel_canvas import PixelCanvas class DemoWindow(ttk.Frame): def __init__(self, master, model_wrapper, canvas_size=50, window_size=28, refresh_period=50, test_image=None, **kw): ttk.Frame.__init__(self, master=master...
[ "tkinter.IntVar", "tkinter.ttk.Checkbutton", "tkinter.ttk.Radiobutton", "tkinter.ttk.Frame", "tkinter.ttk.Label", "tkinter.StringVar", "tkinter.ttk.Frame.__init__", "tkinter.Spinbox" ]
[((282, 327), 'tkinter.ttk.Frame.__init__', 'ttk.Frame.__init__', (['self'], {'master': 'master'}), '(self, master=master, **kw)\n', (300, 327), True, 'import tkinter.ttk as ttk\n'), ((1145, 1186), 'tkinter.ttk.Frame', 'ttk.Frame', (['self'], {'padding': '(10, 15, 10, 10)'}), '(self, padding=(10, 15, 10, 10))\n', (1154...
from queue import Queue import time from settings import USE_DB, DB_DB, DB_DUMP_TABLE, DB_ACCT_TABLE, REQUEST_SPACING import logging from . import helper import sqlite3 import threading class Site(object): ''' Site - parent class used for a generic 'Queue' structure with a few helper metho...
[ "logging.info", "logging.debug", "time.sleep" ]
[((2059, 2109), 'logging.info', 'logging.info', (["('[*] Checking + Spacer ' + paste.url)"], {}), "('[*] Checking + Spacer ' + paste.url)\n", (2071, 2109), False, 'import logging\n'), ((2184, 2211), 'time.sleep', 'time.sleep', (['REQUEST_SPACING'], {}), '(REQUEST_SPACING)\n', (2194, 2211), False, 'import time\n'), ((35...
from django.contrib import admin # Register your models here. from .models import * admin.site.register(Author) admin.site.register(Follower) admin.site.register(Post) admin.site.register(Comment) admin.site.register(Request) admin.site.register(Inbox) admin.site.register(Likes) admin.site.register(Liked) admin.site....
[ "django.contrib.admin.site.register" ]
[((86, 113), 'django.contrib.admin.site.register', 'admin.site.register', (['Author'], {}), '(Author)\n', (105, 113), False, 'from django.contrib import admin\n'), ((114, 143), 'django.contrib.admin.site.register', 'admin.site.register', (['Follower'], {}), '(Follower)\n', (133, 143), False, 'from django.contrib import...
#!/usr/bin/env python import subprocess import re import os import errno import collections import sys class Platform(object): pass sdk_re = re.compile(r'.*-sdk ([a-zA-Z0-9.]*)') def sdkinfo(sdkname): ret = {} for line in subprocess.Popen(['xcodebuild', '-sdk', sdkname, '-version'], stdout=subprocess.PIP...
[ "subprocess.check_output", "os.path.exists", "os.makedirs", "re.compile", "subprocess.check_call", "subprocess.Popen", "os.path.splitext", "os.path.join", "os.getcwd", "os.chdir", "collections.defaultdict", "os.walk", "os.path.relpath" ]
[((147, 183), 're.compile', 're.compile', (['""".*-sdk ([a-zA-Z0-9.]*)"""'], {}), "('.*-sdk ([a-zA-Z0-9.]*)')\n", (157, 183), False, 'import re\n'), ((1997, 2025), 'collections.defaultdict', 'collections.defaultdict', (['set'], {}), '(set)\n', (2020, 2025), False, 'import collections\n'), ((2152, 2186), 'os.walk', 'os....
import pandas as pd import dash from dash.dependencies import Input, Output, State import plotly.express as px import dash_html_components as html import dash_core_components as dcc import dash_bootstrap_components as dbc # self packages from .data_generator import load_transactions, comparisons_df from .nav_bar impor...
[ "dash_html_components.Table", "dash_html_components.Button", "dash.dependencies.Output", "dash_html_components.H3", "dash_html_components.Br", "dash_html_components.H5", "pandas.DataFrame.from_dict", "dash.dependencies.Input", "dash_html_components.Td", "dash_html_components.Th", "dash_html_comp...
[((3326, 3440), 'dash.Dash', 'dash.Dash', ([], {'server': 'server', 'routes_pathname_prefix': '"""/transactions/"""', 'external_stylesheets': '[dbc.themes.BOOTSTRAP]'}), "(server=server, routes_pathname_prefix='/transactions/',\n external_stylesheets=[dbc.themes.BOOTSTRAP])\n", (3335, 3440), False, 'import dash\n'),...
import os import uuid import numpy as np from tqdm import tqdm import pickle from utils.config import opt from .voc_eval import voc_eval devkit_path = opt.voc_data_dir[:-8] year = opt.year def do_python_eval(classes, image_set, output_dir='output'): annopath = os.path.join( devkit_path, 'VOC' + ...
[ "os.path.exists", "numpy.mean", "pickle.dump", "os.makedirs", "os.path.join", "uuid.uuid4", "os.path.isdir", "os.mkdir" ]
[((269, 333), 'os.path.join', 'os.path.join', (['devkit_path', "('VOC' + year)", '"""Annotations"""', '"""{}.xml"""'], {}), "(devkit_path, 'VOC' + year, 'Annotations', '{}.xml')\n", (281, 333), False, 'import os\n'), ((386, 471), 'os.path.join', 'os.path.join', (['devkit_path', "('VOC' + year)", '"""ImageSets"""', '"""...
"""Indicators to monitor""" import click from configparser import NoOptionError from query import Query from config import CONFIG class BaseIndicator(object): client = Query() # name of the metric in influxdb name = 'base_indicator' # unit (displays in alerts) unit = '' # alert when value g...
[ "click.ClickException", "config.CONFIG.get", "query.Query" ]
[((177, 184), 'query.Query', 'Query', ([], {}), '()\n', (182, 184), False, 'from query import Query\n'), ((702, 737), 'config.CONFIG.get', 'CONFIG.get', (['"""thresholds"""', 'self.name'], {}), "('thresholds', self.name)\n", (712, 737), False, 'from config import CONFIG\n'), ((787, 863), 'click.ClickException', 'click....
from setuptools import setup import glob setup(name='liftover.py', version='0.1', packages=['liftover'], description='C. elegans liftover utility', url='https://github.com/AndersenLab/liftover-utils', author='<NAME>', author_email='<EMAIL>', license='MIT', entry_points="...
[ "glob.glob" ]
[((478, 528), 'glob.glob', 'glob.glob', (['"""data/CHROMOSOME_DIFFERENCES/sequence*"""'], {}), "('data/CHROMOSOME_DIFFERENCES/sequence*')\n", (487, 528), False, 'import glob\n')]
# Copyright 2018 U.C. Berkeley RISE Lab # # 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 agree...
[ "cloudpickle.dumps", "cloudpickle.loads", "pyarrow.serialize", "pyarrow.deserialize", "codecs.encode", "codecs.decode" ]
[((1288, 1301), 'cloudpickle.dumps', 'cp.dumps', (['msg'], {}), '(msg)\n', (1296, 1301), True, 'import cloudpickle as cp\n'), ((1343, 1356), 'cloudpickle.loads', 'cp.loads', (['msg'], {}), '(msg)\n', (1351, 1356), True, 'import cloudpickle as cp\n'), ((1479, 1509), 'codecs.decode', 'codecs.decode', (['msg', 'SER_FORMAT...
from PIL import Image, ImageDraw, ImageFilter from PIL import ImageFont from os import listdir from os.path import isfile, join #QRcode拼貼 mypath = "QRcodefloder" # im = Image.open("advanceduse.png") list = [] onlyfiles = [ f for f in listdir(mypath) if isfile(join(mypath,f)) ] print(onlyfiles) for onlyfile in onlyfiles...
[ "os.listdir", "PIL.Image.open", "PIL.Image.new", "os.path.join", "PIL.ImageFont.truetype", "PIL.ImageDraw.Draw" ]
[((448, 493), 'PIL.Image.new', 'Image.new', (['"""RGB"""', '(595, 842)', '(255, 255, 255)'], {}), "('RGB', (595, 842), (255, 255, 255))\n", (457, 493), False, 'from PIL import Image, ImageDraw, ImageFilter\n'), ((573, 618), 'PIL.Image.new', 'Image.new', (['"""RGB"""', '(squard, squard)', '(0, 0, 0)'], {}), "('RGB', (sq...
import os try: from xdebug.unittesting import XdebugDeferrableTestCase except: from SublimeTextXdebug.xdebug.unittesting import XdebugDeferrableTestCase class TestBreakpointStep(XdebugDeferrableTestCase): breakpoint_step_file = 'breakpoint_step.php' breakpoint_step_file_local_path = os.path.join(Xdebu...
[ "os.path.join" ]
[((302, 373), 'os.path.join', 'os.path.join', (['XdebugDeferrableTestCase.local_path', 'breakpoint_step_file'], {}), '(XdebugDeferrableTestCase.local_path, breakpoint_step_file)\n', (314, 373), False, 'import os\n')]
import unittest from wework import settings, wechat class TestSettings(unittest.TestCase): def test_init(self): t = settings.init( CROP_ID='a', PROVIDER_SECRET='a', REGISTER_URL='www.quseit.com/', HELPER='wegq.DjangoHelper' ) self.assertTrue(...
[ "wework.settings.init" ]
[((130, 242), 'wework.settings.init', 'settings.init', ([], {'CROP_ID': '"""a"""', 'PROVIDER_SECRET': '"""a"""', 'REGISTER_URL': '"""www.quseit.com/"""', 'HELPER': '"""wegq.DjangoHelper"""'}), "(CROP_ID='a', PROVIDER_SECRET='a', REGISTER_URL=\n 'www.quseit.com/', HELPER='wegq.DjangoHelper')\n", (143, 242), False, 'f...
from distutils.core import setup setup( name = 'timetools', version = '1.0.0', description = 'CL tools for timestamps', author = '<NAME>', author_email = '<EMAIL>', url = 'https://github.com/mchalek/timetools', scripts = [ 'bin/now', 'bin/...
[ "distutils.core.setup" ]
[((34, 286), 'distutils.core.setup', 'setup', ([], {'name': '"""timetools"""', 'version': '"""1.0.0"""', 'description': '"""CL tools for timestamps"""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'url': '"""https://github.com/mchalek/timetools"""', 'scripts': "['bin/now', 'bin/when', 'bin/ts', 'bin/days...
from unittest import TestCase from parameterized import parameterized from tests.test_utils import mock_request_handler from web.web_auth_utils import remove_webpack_suffixes, is_allowed_during_login class WebpackSuffixesTest(TestCase): def test_remove_webpack_suffixes_when_css(self): normalized = remov...
[ "web.web_auth_utils.is_allowed_during_login", "tests.test_utils.mock_request_handler", "web.web_auth_utils.remove_webpack_suffixes", "parameterized.parameterized.expand" ]
[((1413, 1865), 'parameterized.parameterized.expand', 'parameterized.expand', (["['/favicon.ico', 'login.html', '/js/login.be16f278.js',\n '/js/login.be16f278.js.map', '/js/chunk-login-vendors.18e22e7f.js',\n '/js/chunk-login-vendors.18e22e7f.js.map',\n '/img/titleBackground_login.a6c36d4c.jpg', '/css/login.8e...
# Generated by Django 3.0.5 on 2020-07-03 20:33 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('home', '0019_comment_content_type'), ] operations = [ migrations.RemoveField( model_name='comment', name='content_type', ...
[ "django.db.migrations.RemoveField" ]
[((226, 291), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""comment"""', 'name': '"""content_type"""'}), "(model_name='comment', name='content_type')\n", (248, 291), False, 'from django.db import migrations\n')]
from datetime import datetime class Price: date: datetime = datetime(1, 1, 1) currency: str = 'BRL' symbol: str = '' current: float = 0 open: float = 0 close: float = 0 low: float = 0 high: float = 0 volume: float = 0 interval: str = '' def __init__(self, **kwargs): ...
[ "datetime.datetime" ]
[((66, 83), 'datetime.datetime', 'datetime', (['(1)', '(1)', '(1)'], {}), '(1, 1, 1)\n', (74, 83), False, 'from datetime import datetime\n')]
# -*- coding: utf-8 -*- """ pybitcoin ~~~~~ :copyright: (c) 2014 by Halfmoon Labs :license: MIT, see LICENSE for more details. """ import os import json import hashlib import ecdsa from binascii import hexlify, unhexlify from ecdsa.keys import SigningKey from .key_formatting import compress, encode_p...
[ "ecdsa.keys.SigningKey.from_secret_exponent" ]
[((1326, 1423), 'ecdsa.keys.SigningKey.from_secret_exponent', 'ecdsa.keys.SigningKey.from_secret_exponent', (['secret_exponent', 'self._curve', 'self._hash_function'], {}), '(secret_exponent, self._curve,\n self._hash_function)\n', (1368, 1423), False, 'import ecdsa\n')]
import json import requests from utils.RequestsUtil import RequestsUtil from config.Conf import ConfYaml import os request_util = RequestsUtil() conf = ConfYaml() def login(): url = os.path.join(conf.get_yaml_data(),"authorizations/") # url = "http://192.168.3.11:8064/authorizations/" data = {"username":...
[ "requests.post", "config.Conf.ConfYaml", "utils.RequestsUtil.RequestsUtil" ]
[((132, 146), 'utils.RequestsUtil.RequestsUtil', 'RequestsUtil', ([], {}), '()\n', (144, 146), False, 'from utils.RequestsUtil import RequestsUtil\n'), ((154, 164), 'config.Conf.ConfYaml', 'ConfYaml', ([], {}), '()\n', (162, 164), False, 'from config.Conf import ConfYaml\n'), ((1662, 1708), 'requests.post', 'requests.p...
#!/usr/bin/env python3 from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import numpy as np import torch as th import torchvision from tqdm import tqdm def main(args): trainloader, testloader = get_loaders(args.batch_size, args.fashion)...
[ "numpy.clip", "numpy.copy", "numpy.sqrt", "argparse.ArgumentParser", "tqdm.tqdm", "numpy.argmax", "numpy.square", "numpy.zeros", "numpy.random.uniform", "torchvision.transforms.ToTensor", "numpy.arange" ]
[((398, 424), 'numpy.sqrt', 'np.sqrt', (['(2.0 / (784 + 500))'], {}), '(2.0 / (784 + 500))\n', (405, 424), True, 'import numpy as np\n'), ((434, 470), 'numpy.random.uniform', 'np.random.uniform', (['(-a)', 'a', '(784, 500)'], {}), '(-a, a, (784, 500))\n', (451, 470), True, 'import numpy as np\n'), ((480, 509), 'numpy.r...
#!/usr/bin/env python # mypy: ignore-errors # # # Speedo # # import os from setuptools import setup, find_namespace_packages from speedo_common.version import speedo_version as __version__ def get_requirements(filename: str): """Build the requirements list from the filename""" requirements_list = [] wit...
[ "setuptools.find_namespace_packages", "os.getenv" ]
[((468, 498), 'os.getenv', 'os.getenv', (['"""SPEEDO_TARGET"""', '""""""'], {}), "('SPEEDO_TARGET', '')\n", (477, 498), False, 'import os\n'), ((1034, 1064), 'os.getenv', 'os.getenv', (['"""SPEEDO_TARGET"""', '""""""'], {}), "('SPEEDO_TARGET', '')\n", (1043, 1064), False, 'import os\n'), ((760, 812), 'setuptools.find_n...
""" This script demonstrates the use of a convolutional LSTM network. This network is used to predict the next frame of an artificially generated movie which contains moving squares. """ from keras.models import Sequential from keras.layers.convolutional import Conv3D from keras.layers.convolutional_recurrent import Co...
[ "keras.layers.ConvLSTM2D", "keras.layers.Input", "keras.models.Model", "keras.layers.BatchNormalization", "keras.layers.Conv3D" ]
[((4372, 4424), 'keras.layers.Input', 'KL.Input', ([], {'shape': '[8, row, col, 1]', 'name': '"""input_image"""'}), "(shape=[8, row, col, 1], name='input_image')\n", (4380, 4424), True, 'import keras.layers as KL\n'), ((5197, 5223), 'keras.models.Model', 'KM.Model', (['input_image', 'seg'], {}), '(input_image, seg)\n',...
# ====================================================== # Packaging Python Projects Tutorial : https://packaging.python.org/tutorials/packaging-projects/ # # Installation : # pip install -i https://test.pypi.org/simple/ utils-edchin # # # =================================================================== # Imp...
[ "utils_edchin.pyxlib", "pandas.DataFrame", "utils_edchin.DataProcessor" ]
[((478, 488), 'utils_edchin.pyxlib', 'edc_xlib', ([], {}), '()\n', (486, 488), True, 'import utils_edchin.pyxlib as edc_xlib\n'), ((1178, 1186), 'utils_edchin.DataProcessor', 'edc_dp', ([], {}), '()\n', (1184, 1186), True, 'import utils_edchin.DataProcessor as edc_dp\n'), ((1218, 1327), 'pandas.DataFrame', 'pandas.Data...
import unittest from datetime import datetime, timedelta import json from ..main import create_app from base64 import b64encode from ..models import * class ApiTestCase(unittest.TestCase): def setUp(self): # Configure app and create a test_client app = create_app('app.config.TestConfig') ap...
[ "json.loads", "base64.b64encode", "json.dumps", "datetime.datetime.now", "unittest.main", "datetime.timedelta" ]
[((6897, 6912), 'unittest.main', 'unittest.main', ([], {}), '()\n', (6910, 6912), False, 'import unittest\n'), ((1331, 1353), 'json.dumps', 'json.dumps', (['[radio_ob]'], {}), '([radio_ob])\n', (1341, 1353), False, 'import json\n'), ((1929, 1951), 'json.dumps', 'json.dumps', (['[radio_ob]'], {}), '([radio_ob])\n', (193...
from setuptools import setup, find_packages with open('README.md') as readme_file: README=readme_file.read() with open('HISTORY.md') as history_file: HISTORY=history_file.read() setup_args=dict( name='DisBot', version='1.0', description='Tool to create a quick new discord.py bot', long_descri...
[ "setuptools.find_packages", "setuptools.setup" ]
[((941, 995), 'setuptools.setup', 'setup', ([], {'install_requires': 'install_requires'}), '(**setup_args, install_requires=install_requires)\n', (946, 995), False, 'from setuptools import setup, find_packages\n'), ((436, 451), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (449, 451), False, 'from setu...
import asyncio import logging import json import websockets from typing import Any, Callable, Sequence from .constants import ( ChannelType ) WEBSOCKET_URL = 'wss://www.avanza.se/_push/cometd' logger = logging.getLogger("avanza_socket") class AvanzaSocket: def __init__(self, push_subscription_id, cookies):...
[ "logging.getLogger", "json.loads", "json.dumps", "asyncio.Event", "websockets.connect", "asyncio.sleep" ]
[((209, 243), 'logging.getLogger', 'logging.getLogger', (['"""avanza_socket"""'], {}), "('avanza_socket')\n", (226, 243), False, 'import logging\n'), ((1283, 1357), 'websockets.connect', 'websockets.connect', (['WEBSOCKET_URL'], {'extra_headers': "{'Cookie': self._cookies}"}), "(WEBSOCKET_URL, extra_headers={'Cookie': ...
import logging import os import xml.etree.ElementTree as ET from collections import defaultdict from event.io.dataset.base import ( Span, DataLoader, DEDocument, RelationMention, ) class RichERE(DataLoader): def __init__(self, params, corpus, with_doc=False): super().__init__(params, corp...
[ "os.path.exists", "os.listdir", "xml.etree.ElementTree.parse", "os.makedirs", "os.path.join", "collections.defaultdict", "event.io.dataset.base.Span", "os.path.basename", "event.io.dataset.base.DEDocument" ]
[((5264, 5281), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (5275, 5281), False, 'from collections import defaultdict\n'), ((5308, 5325), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (5319, 5325), False, 'from collections import defaultdict\n'), ((5345, 5372), 'os.list...
""" File: examples/util/rectangular_binner.py Author: <NAME> Date: 22 Sep 2018 Description: Example script showing the use of the RectangularBinner class. """ from __future__ import division import numpy as np import matplotlib.pyplot as pl from pylinex import RectangularBinner fontsize = 24 num_old_x_values = 1000 ...
[ "numpy.ones_like", "numpy.sinh", "numpy.linspace", "matplotlib.pyplot.figure", "numpy.sin", "pylinex.RectangularBinner", "matplotlib.pyplot.show" ]
[((431, 457), 'numpy.ones_like', 'np.ones_like', (['old_x_values'], {}), '(old_x_values)\n', (443, 457), True, 'import numpy as np\n'), ((566, 606), 'numpy.linspace', 'np.linspace', (['(-1)', '(1)', '(num_new_x_values + 1)'], {}), '(-1, 1, num_new_x_values + 1)\n', (577, 606), True, 'import numpy as np\n'), ((617, 643)...
__license__ = open('LICENSE').read() version = open('VERSION').read() from setuptools import setup long_description = open('README.md').read() setup( name = 'bulmate', version = version, author = 'gardsted', author_email = '<EMAIL>', license = 'MIT', url = 'https://github.com/gardsted/bulmate/', ...
[ "setuptools.setup" ]
[((146, 1049), 'setuptools.setup', 'setup', ([], {'name': '"""bulmate"""', 'version': 'version', 'author': '"""gardsted"""', 'author_email': '"""<EMAIL>"""', 'license': '"""MIT"""', 'url': '"""https://github.com/gardsted/bulmate/"""', 'description': '"""Bulmate is a Python library for dominating CCCP with Bulma"""', 'l...
class Calculador_de_impostos: def realiza_calculo(self, orcamento, imposto): imposto_calculado = imposto.calcula(orcamento) print(imposto_calculado) if __name__ == '__main__': from orcamento import Orcamento, Item from impostos import ISS, ICMS, ICPP, IKCV orcamento = Orcamento() ...
[ "orcamento.Item", "impostos.ISS", "impostos.ICPP", "orcamento.Orcamento" ]
[((305, 316), 'orcamento.Orcamento', 'Orcamento', ([], {}), '()\n', (314, 316), False, 'from orcamento import Orcamento, Item\n'), ((345, 363), 'orcamento.Item', 'Item', (['"""ITEM 1"""', '(50)'], {}), "('ITEM 1', 50)\n", (349, 363), False, 'from orcamento import Orcamento, Item\n'), ((393, 412), 'orcamento.Item', 'Ite...
import sys sys.path.extend(['..']) import tensorflow as tf config = tf.ConfigProto(log_device_placement=False) config.gpu_options.allow_growth = True sess = tf.Session(config=config) from generator.generate_code import * from nltk.translate.bleu_score import corpus_bleu from config.config import * from base.BaseModel...
[ "tensorflow.ConfigProto", "tensorflow.Session", "sys.path.extend", "nltk.translate.bleu_score.corpus_bleu" ]
[((11, 34), 'sys.path.extend', 'sys.path.extend', (["['..']"], {}), "(['..'])\n", (26, 34), False, 'import sys\n'), ((69, 111), 'tensorflow.ConfigProto', 'tf.ConfigProto', ([], {'log_device_placement': '(False)'}), '(log_device_placement=False)\n', (83, 111), True, 'import tensorflow as tf\n'), ((158, 183), 'tensorflow...
# Deploy idle CPU alarms to stop EC2 instances import boto3 account_id = boto3.client("sts").get_caller_identity().get("Account") region = boto3.session.Session().region_name client = boto3.client("cloudwatch") ec = boto3.client("ec2") reservations = ec.describe_instances() exceptions = ["prf-"] for r in reservation...
[ "boto3.session.Session", "boto3.client" ]
[((185, 211), 'boto3.client', 'boto3.client', (['"""cloudwatch"""'], {}), "('cloudwatch')\n", (197, 211), False, 'import boto3\n'), ((217, 236), 'boto3.client', 'boto3.client', (['"""ec2"""'], {}), "('ec2')\n", (229, 236), False, 'import boto3\n'), ((140, 163), 'boto3.session.Session', 'boto3.session.Session', ([], {})...
import pytest import tempfile import re import os import shutil from raiden.utils import get_contract_path from raiden.utils.solc import compile_files_cwd from raiden.exceptions import ContractVersionMismatch from raiden.blockchain.abi import CONTRACT_VERSION_RE, CONTRACT_MANAGER, CONTRACT_CHANNEL_MANAGER def repla...
[ "raiden.utils.get_contract_path", "re.compile", "shutil.copy2", "os.path.join", "raiden.utils.solc.compile_files_cwd", "shutil.copytree", "pytest.mark.parametrize", "os.rmdir", "os.path.dirname", "pytest.raises", "os.path.basename", "raiden.blockchain.abi.CONTRACT_MANAGER.get_contract_abi", ...
[((1103, 1150), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""number_of_nodes"""', '[1]'], {}), "('number_of_nodes', [1])\n", (1126, 1150), False, 'import pytest\n'), ((1152, 1201), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""channels_per_node"""', '[0]'], {}), "('channels_per_node', [0])\...
# Copyright (c) 2020, <NAME>, Honda Research Institute Europe GmbH, and # Technical University of Darmstadt. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code mus...
[ "pyrado.utils.input_output.print_cbt", "pyrado.utils.data_types.RenderMode", "pyrado.policies.feed_forward.dummy.IdlePolicy", "pyrado.policies.special.environment_specific.create_mg_joint_pos_policy", "pyrado.environments.rcspysim.mini_golf.MiniGolfJointCtrlSim", "pyrado.policies.feed_forward.poly_time.Po...
[((2703, 2724), 'rcsenv.setLogLevel', 'rcsenv.setLogLevel', (['(2)'], {}), '(2)\n', (2721, 2724), False, 'import rcsenv\n'), ((2856, 3037), 'pyrado.environments.rcspysim.mini_golf.MiniGolfIKSim', 'MiniGolfIKSim', ([], {'usePhysicsNode': '(True)', 'physicsEngine': 'physicsEngine', 'dt': 'dt', 'max_steps': 'max_steps', '...
# @l2g 43 python3 # [43] Multiply Strings # Difficulty: Medium # https://leetcode.com/problems/multiply-strings # # Given two non-negative integers num1 and num2 represented as strings, # return the product of num1 and num2,also represented as a string. # Note: You must not use any built-in BigInteger library or conver...
[ "os.path.join" ]
[((1123, 1158), 'os.path.join', 'os.path.join', (['"""tests"""', '"""test_43.py"""'], {}), "('tests', 'test_43.py')\n", (1135, 1158), False, 'import os\n')]
from instauto.api.client import ApiClient from instauto.helpers.post import unlike_post client = ApiClient.initiate_from_file('.instauto.save') unlike_post(client, "media_id")
[ "instauto.helpers.post.unlike_post", "instauto.api.client.ApiClient.initiate_from_file" ]
[((99, 145), 'instauto.api.client.ApiClient.initiate_from_file', 'ApiClient.initiate_from_file', (['""".instauto.save"""'], {}), "('.instauto.save')\n", (127, 145), False, 'from instauto.api.client import ApiClient\n'), ((146, 177), 'instauto.helpers.post.unlike_post', 'unlike_post', (['client', '"""media_id"""'], {}),...
import random import sys import time from scenario.example import sc1_simple_lockdown_removal, sc2_yoyo_lockdown_removal, sc0_base_lockdown, \ scx_base_just_a_flu, sc3_loose_lockdown, sc4_rogue_citizen, sc5_rogue_neighborhood, sc6_travelers from simulator.constants.keys import scenario_id_key, random_seed_key, dra...
[ "scenario.example.sc2_yoyo_lockdown_removal.launch_run", "scenario.example.sc4_rogue_citizen.launch_run", "scenario.example.sc6_travelers.launch_run", "random.seed", "simulator.helper.simulation.get_default_params", "simulator.helper.parser.get_parser", "scenario.example.sc1_simple_lockdown_removal.laun...
[((597, 617), 'simulator.helper.simulation.get_default_params', 'get_default_params', ([], {}), '()\n', (615, 617), False, 'from simulator.helper.simulation import get_default_params\n'), ((790, 826), 'random.seed', 'random.seed', (['params[random_seed_key]'], {}), '(params[random_seed_key])\n', (801, 826), False, 'imp...
# Create your views here. from django.shortcuts import render, redirect from django.contrib.auth import authenticate, login from django.contrib.auth.models import User from django.template import loader from django.forms.utils import ErrorList from django.http import HttpResponse from .origo import Origo_Thread from .o...
[ "os.path.exists", "math.ceil", "zipfile.ZipFile", "django.http.HttpResponse", "os.path.join", "xlsxwriter.Workbook", "os.path.dirname", "datetime.datetime.now", "django.template.loader.get_template" ]
[((1075, 1092), 'os.path.dirname', 'dirname', (['__file__'], {}), '(__file__)\n', (1082, 1092), False, 'from os.path import join, dirname\n'), ((2161, 2199), 'django.template.loader.get_template', 'loader.get_template', (['"""main/index.html"""'], {}), "('main/index.html')\n", (2180, 2199), False, 'from django.template...
#!/usr/bin/env python # -*- coding: utf-8 vi:et import sys, io, os, logging import re import json import tempfile import subprocess import urllib.request, urllib.error logger = logging.getLogger(__name__) __all__ = ( "get_remote", "create_release", "download_default_release_asset", "upload_release_asset", "u...
[ "logging.getLogger", "subprocess.run", "re.match", "os.path.join", "io.open", "json.dumps", "os.path.basename" ]
[((181, 208), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (198, 208), False, 'import sys, io, os, logging\n'), ((591, 651), 'subprocess.run', 'subprocess.run', (['cmd'], {'stdout': 'subprocess.PIPE', 'cwd': 'target_repo'}), '(cmd, stdout=subprocess.PIPE, cwd=target_repo)\n', (605, 651)...
from pygsti.report.table import ReportTable from ..util import BaseCase class TableInstanceTester(BaseCase): custom_headings = { 'html': 'test', 'python': 'test', 'latex': 'test' } def setUp(self): self.table = ReportTable(self.custom_headings, ['Normal'] * 4) # Four form...
[ "pygsti.report.table.ReportTable" ]
[((258, 307), 'pygsti.report.table.ReportTable', 'ReportTable', (['self.custom_headings', "(['Normal'] * 4)"], {}), "(self.custom_headings, ['Normal'] * 4)\n", (269, 307), False, 'from pygsti.report.table import ReportTable\n'), ((2820, 2872), 'pygsti.report.table.ReportTable', 'ReportTable', (['[0.1]', "['Normal']", '...
from django.contrib.auth.models import User from datetime import datetime, timedelta from django.core.urlresolvers import reverse from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect from django.template import RequestContext from django.views.generic.simple im...
[ "schedule.models.Event.objects.all", "django.views.generic.simple.direct_to_template", "django.contrib.auth.models.User.objects.filter", "datetime.datetime.now", "datetime.timedelta" ]
[((647, 694), 'django.contrib.auth.models.User.objects.filter', 'User.objects.filter', ([], {'profile__is_available': '(True)'}), '(profile__is_available=True)\n', (666, 694), False, 'from django.contrib.auth.models import User\n'), ((708, 727), 'schedule.models.Event.objects.all', 'Event.objects.all', ([], {}), '()\n'...
from keras.models import Model from keras.layers import Input from keras.layers.core import Activation from keras.layers.convolutional import Conv3D, Deconv3D from keras.layers.advanced_activations import LeakyReLU from keras.layers.normalization import BatchNormalization def generator(phase_train=True, params={'z_siz...
[ "keras.layers.core.Activation", "keras.layers.normalization.BatchNormalization", "keras.layers.convolutional.Conv3D", "keras.layers.convolutional.Deconv3D", "keras.layers.Input", "keras.models.Model", "keras.layers.advanced_activations.LeakyReLU" ]
[((762, 792), 'keras.layers.Input', 'Input', ([], {'shape': '(1, 1, 1, z_size)'}), '(shape=(1, 1, 1, z_size))\n', (767, 792), False, 'from keras.layers import Input\n'), ((2269, 2301), 'keras.models.Model', 'Model', ([], {'inputs': 'inputs', 'outputs': 'g5'}), '(inputs=inputs, outputs=g5)\n', (2274, 2301), False, 'from...
# Add paths toward dependecies in different subdirectories import os import sys sys.path.append(os.path.abspath('./drone')) sys.path.append(os.path.abspath('./log')) # Add dependencies from drone_list import DroneList from environment import Environment from setup_logging import LogsConfig logsConfig = LogsConfig() l...
[ "environment.Environment.is_in_simulation", "environment.Environment.launch_simulation", "setup_logging.LogsConfig", "drone_list.DroneList.initial_posisitions.extend", "drone_list.DroneList.initial_posisitions.clear", "drone_list.DroneList.delete_drones", "environment.Environment.set_mode", "os.path.a...
[((306, 318), 'setup_logging.LogsConfig', 'LogsConfig', ([], {}), '()\n', (316, 318), False, 'from setup_logging import LogsConfig\n'), ((96, 122), 'os.path.abspath', 'os.path.abspath', (['"""./drone"""'], {}), "('./drone')\n", (111, 122), False, 'import os\n'), ((140, 164), 'os.path.abspath', 'os.path.abspath', (['"""...
import ansiblemetrics.utils as utils from ansiblemetrics.ansible_metric import AnsibleMetric class NumIncludedVars(AnsibleMetric): """ This class measures the number of included variables in a playbook. """ def count(self): """Return the number of included variables. Example ----...
[ "ansiblemetrics.utils.all_keys" ]
[((815, 837), 'ansiblemetrics.utils.all_keys', 'utils.all_keys', (['script'], {}), '(script)\n', (829, 837), True, 'import ansiblemetrics.utils as utils\n')]
from allennlp.data.vocabulary import Vocabulary from content_analyzer.models.rnn_classifier import RnnClassifier from allennlp.data.tokenizers.word_tokenizer import WordTokenizer from content_analyzer.data.dataset_readers.twitter import TwitterNLPDatasetReader from allennlp.data.token_indexers import PretrainedBertInde...
[ "allennlp.data.token_indexers.PretrainedBertIndexer", "allennlp.modules.text_field_embedders.BasicTextFieldEmbedder", "content_analyzer.data.dataset_readers.twitter.TwitterNLPDatasetReader", "torch.load", "allennlp.data.vocabulary.Vocabulary.from_files", "allennlp.modules.token_embedders.PretrainedBertEmb...
[((746, 788), 'allennlp.data.token_indexers.PretrainedBertIndexer', 'PretrainedBertIndexer', (['"""bert-base-uncased"""'], {}), "('bert-base-uncased')\n", (767, 788), False, 'from allennlp.data.token_indexers import PretrainedBertIndexer\n'), ((794, 809), 'allennlp.data.tokenizers.word_tokenizer.WordTokenizer', 'WordTo...
import math import numpy as np from scipy.special import expit, logit import matplotlib.pyplot as plt from mmur.viz import _set_plot_style COLORS = _set_plot_style() def plot_logstic_dgp(N=500, figsize=None): """Plot example of DGP as used in mmur.generators.LogisticGenerator. Parameters ---------- ...
[ "numpy.random.normal", "numpy.ones", "math.floor", "numpy.sort", "scipy.special.expit", "numpy.array", "numpy.argsort", "scipy.special.logit", "mmur.viz._set_plot_style", "numpy.random.uniform", "matplotlib.pyplot.subplots", "numpy.random.binomial" ]
[((150, 167), 'mmur.viz._set_plot_style', '_set_plot_style', ([], {}), '()\n', (165, 167), False, 'from mmur.viz import _set_plot_style\n'), ((599, 619), 'numpy.array', 'np.array', (['(0.5, 1.2)'], {}), '((0.5, 1.2))\n', (607, 619), True, 'import numpy as np\n'), ((628, 643), 'numpy.ones', 'np.ones', (['(N, 2)'], {}), ...
import unittest from SubTypeTree import SubTypeTreeFactory from SubTypeTree import VenderTreeFactory from SubTypeTree import SubTypeTree from SubTypeTree import VenderTree from SubTypeTree import GitHubVenderTree from SubTypeTree import StandardTree from SubTypeTree import ParsonalTree from SubTypeTree import Unregiste...
[ "SubTypeTree.StandardTree" ]
[((451, 474), 'SubTypeTree.StandardTree', 'StandardTree', (['tree_list'], {}), '(tree_list)\n', (463, 474), False, 'from SubTypeTree import StandardTree\n')]
# -*- coding: utf-8 -*- from django.forms.models import modelform_factory try: from unittest.case import TestCase, expectedFailure except ImportError: from django.utils.unittest.case import TestCase, expectedFailure from django_ace import AceWidget from editregions.contrib.embeds.forms import JavaScriptEditorFo...
[ "editregions.contrib.embeds.forms.JavascriptAssetForm", "editregions.contrib.embeds.forms.StylesheetAssetForm", "django.forms.models.modelform_factory" ]
[((968, 989), 'editregions.contrib.embeds.forms.StylesheetAssetForm', 'StylesheetAssetForm', ([], {}), '()\n', (987, 989), False, 'from editregions.contrib.embeds.forms import JavaScriptEditorForm, StylesheetAssetForm, JavascriptAssetForm\n'), ((1193, 1243), 'editregions.contrib.embeds.forms.StylesheetAssetForm', 'Styl...
from __future__ import print_function import sys import os import re import numpy as np import subprocess from matplotlib import pyplot as plt inputpath = os.path.join(os.path.realpath('..'),'INPUT/') print("Initialising") fig, ax = plt.subplots() n=0 for filenum in ['INPUT/0.txt','INPUT/1.txt','INPUT/2.txt']: os.ren...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.ylabel", "os.rename", "matplotlib.pyplot.xlabel", "numpy.max", "os.path.realpath", "matplotlib.pyplot.figure", "numpy.zeros", "subprocess.call", "numpy.min", "matplotlib.pyplot.ylim", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show" ]
[((234, 248), 'matplotlib.pyplot.subplots', 'plt.subplots', ([], {}), '()\n', (246, 248), True, 'from matplotlib import pyplot as plt\n'), ((1454, 1464), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (1462, 1464), True, 'from matplotlib import pyplot as plt\n'), ((169, 191), 'os.path.realpath', 'os.path.realp...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import os from typing import Any, Dict, Generator, cast import pytest from _pytest.fixtures import SubRequest from _pytest.monkeypatch import MonkeyPatch from omegaconf import OmegaConf from torchgeo.datamodules import Ches...
[ "torchgeo.trainers.chesapeake.ChesapeakeCVPRSegmentationTask", "os.path.join", "omegaconf.OmegaConf.to_object", "pytest.fixture", "typing.cast" ]
[((511, 555), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""class"""', 'params': '[5, 7]'}), "(scope='class', params=[5, 7])\n", (525, 555), False, 'import pytest\n'), ((655, 684), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""class"""'}), "(scope='class')\n", (669, 684), False, 'import pytest\n'), ((...
import logging import os from typing import Generic, List, Type, Any import torch import torch.nn as nn from ..downloading.downloading_utils import from_cache from ..featurization.featurization_api import T_BatchEncoding, T_Config, PretrainedFeaturizerMixin class PretrainedModelBase(nn.Module, Generic[T_BatchEncodi...
[ "os.path.exists", "torch.nn.init.xavier_uniform_", "torch.load", "logging.warning", "torch.nn.init.xavier_normal_", "torch.save", "logging.info", "os.path.expanduser" ]
[((2459, 2500), 'torch.load', 'torch.load', (['file_path'], {'map_location': '"""cpu"""'}), "(file_path, map_location='cpu')\n", (2469, 2500), False, 'import torch\n'), ((3086, 3119), 'torch.save', 'torch.save', (['state_dict', 'file_path'], {}), '(state_dict, file_path)\n', (3096, 3119), False, 'import torch\n'), ((12...
from fixture.orm import ORMFixture from fixture.db import DbFixture from model.group import Group from model.contact import Contact database = ORMFixture(host="localhost", name="addressbook", user="root", password="") try: l = database.get_contacts_in_group(Group(id="174")) # l = sorted(database.get_groups_con...
[ "model.group.Group", "fixture.orm.ORMFixture" ]
[((144, 218), 'fixture.orm.ORMFixture', 'ORMFixture', ([], {'host': '"""localhost"""', 'name': '"""addressbook"""', 'user': '"""root"""', 'password': '""""""'}), "(host='localhost', name='addressbook', user='root', password='')\n", (154, 218), False, 'from fixture.orm import ORMFixture\n'), ((264, 279), 'model.group.Gr...