text
stringlengths
1
927k
import json import os import uuid from typing import Tuple import requests from qrcode import QRCode from requests import Response PAYMENT_EVENT_TYPES = ( 'TransferOutEvent', 'TransferInEvent', 'TransferOutReversalEvent', 'BarcodePaymentEvent', 'DebitPurchaseEvent', 'DebitPurchaseReversalEvent...
#%% import pandas as pd #%% df1 = pd.read_csv('df1.csv', index_col=0) # %% df2 = pd.read_csv('df2.csv', index_col=0) # %% df3 = pd.read_csv('df3.csv', index_col=0) # %% df1.merge(df2, on='proj_id').merge(df3, on='doc_id') # %% df1.merge(df2, on='proj_id', how='left').merge(df3, on='doc_id', how='left') # %%
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from gaiatest import GaiaTestCase from gaiatest.apps.settings.app import Settings class TestSettingsMediaStorage(GaiaT...
""" Module for radiometric normalization Credits: Copyright (c) 2018-2019 Johannes Schmid (GeoVille) Copyright (c) 2017-2019 Matej Aleksandrov, Matic Lubej, Devis Peresutti (Sinergise) This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. """ import n...
# coding: utf-8 """ FlashArray REST API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.11 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re import six import typing from ...
from fastai.basic_train import Learner, LearnerCallback from fastai.vision.gan import GANLearner class GANSaveCallback(LearnerCallback): """A `LearnerCallback` that saves history of metrics while training `learn` into CSV `filename`.""" def __init__( self, learn: GANLearner, learn_gen...
from passgen import args def test_num_words(): mock_argv = ['passgen', '-n', '22'] options = args.get_cli_options(mock_argv) assert 22 == options.num_words mock_argv = ['passgen', '--num-words', '33'] options = args.get_cli_options(mock_argv) assert 33 == options.num_words mock_argv = ['pa...
import tensorflow as tf class BaseTrain: """Standard base_train-class for easy multiple-inheritance. It is responsible for defining the functions to be implemented with any child. Attributes: sess: Tensorflow session to use. model: Model to be trained. data: Data_loader object...
''' SIGNUS V1 post API ''' from flask import g from app.api.signus_v1 import signus_v1 as api from app.api.decorators import timer, login_required, login_optional from app.controllers.post import (post_like, post_unlike, post_view) @api.route("/post/...
"""empty message Revision ID: f0a99f6b5e5e Revises: he536vdwh29f Create Date: 2019-05-31 15:57:36.032393 """ # revision identifiers, used by Alembic. revision = 'f0a99f6b5e5e' down_revision = 'he536vdwh29f' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - ...
# -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "...
""" Copyright BOOSTRY 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 agreed to in writing, software distr...
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, SubmitField, IntegerField from wtforms.validators import ValidationError, DataRequired, Email, EqualTo from app.models import User class LoginForm(FlaskForm): username = StringField('Username', validators=[DataRequired(...
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-06-02 18:17 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('signup', '0001_initial'), ] operations = [ migrations.AddField( ...
# Generated by Django 3.2.8 on 2021-11-05 00:25 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('moviestore', '0006_movie_user_charge'), ] operations = [ migrations.AlterField( model_name='movie', name='user_charg...
# Open file and search through words list # Return number of words with no e in them import os file = os.path.dirname(__file__) + "/words.txt" rows = open(file) def has_no_e(word): for letter in word: if letter == "e": return False return True W = [] # words E = [] # word with no e for ...
from setuptools import setup setup(name='predictitpy', version='0.2', py_modules=['predictitpy'], description='A very light wrapper around the PredictIt.org market data api.', url='https://github.com/adamjoshuagray/predictitpy', author='Adam J. Gray', author_email='adam.joshua.gray@...
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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...
#!/usr/bin/env python RED = '\033[38;5;196;1m' ORANGE = '\033[38;5;202;1m' WHITE = '\033[1;37m' BLUE = '\033[1;34m' BASE_C = '\033[0m' GREEN = '\033[38;5;40;1m' PURPLE = '\033[38;5;135;1m' GREY = '\033[1;30m' YELLOW = '\033[1;33m'
from scipy.integrate import solve_ivp import matplotlib.pyplot as plt plt.style.use('seaborn-whitegrid') def derivatives(t, y, vaccine_rate, birth_rate=0.01): """Defines the system of differential equations that describe the epidemiology model. Args: t: a positive float y: a tuple of three...
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * class AlipayOpenServicemarketOrderCreateRequest(object): def __init__(self, biz_model=None): self._biz_model = biz_model sel...
#!/usr/bin/python # Copyright (c) 2020, 2021 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
from typing import List, Set from io_utils import read_input_file def day6_1(): input_list = read_input_file("day6.txt", input_type=str) answers = get_all_yes_answers_per_group(input_list) amount_yes_answers = 0 for answers_per_group in answers: amount_yes_answers += len(answers_per_group) ...
# Generated by Django 2.2.1 on 2019-05-29 07:21 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('votes', '0001_initial'), ] operations = [ migrations.RenameField( model_name='vote', old_name='to_country', new_...
from collections import deque n, m = map(int, input().split()) graph = [list() for _ in range(n)] for _ in range(n - 1): u, k = [int(x) for x in input().split()] # uは頂点番号、kは隣接頂点の個数 u, k = u - 1, k - 1 graph[u].append(k) graph[k].append(u) # 無向グラフ dist = [-1] * n #距離 dist[0] = 0 #startは0 q = dequ...
#!/usr/bin/env python3 # # Author: eaglewings # E-Mail: ZWFnbGV3aW5ncy55aUBnbWFpbC5jb20= # Created Time: 2019-04-17 15:17 # Last Modified: # Description: # - Project: BT Trackers Updater # - File Name: update.py # - Trackers Updater import os import re from typing import NoReturn class Filer...
#------------------------------------------------------------------------------- # This file contains functions that: # (1) define the boundaries (ice-air,ice-water,ice-bed) of the mesh, AND... # (2) mark the boundaries of the mesh #------------------------------------------------------------------------------- from pa...
print("Scrape the dataset from...") # import the necessary library from bs4 import BeautifulSoup import requests import pandas as pd # Request to website and download HTML contents url='https://www.gadgetbytenepal.com/category/laptop-price-in-nepal/' # write data in a file. file1 = open("alldata.txt","w") req=req...
from os import path import pytest from client.client import Client from tools import utils from tools.paths import ACCOUNT_PATH from tools.utils import assert_run_failure from .contract_paths import CONTRACT_PATH TRANSFER_ARGS = ['--burn-cap', '0.257'] @pytest.mark.incremental class TestRawContext: def test_del...
# Copyright 2001 by Katharine Lindner. All rights reserved. # Copyright 2006 by PeterC. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Hold GEO data in a straightforward fo...
from setuptools import setup setup( name = 'iAST', version = '0.2.1', url = 'https://github.com/brandjon/iast', author = 'Jon Brandvein', author_email = 'jon.brandvein@gmail.com', license = 'MIT License', description = 'A library for defining an...
# # MIT License # # Copyright (c) 2020 Airbyte # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, pu...
from unittest.mock import MagicMock, Mock, patch from .mock_mongo import MockPyMongo import json import sys import os ### TEST SETUP ### EXPECTED_DATA_FRAME_FILENAME = os.path.join(os.path.dirname(__file__), 'expected_response.json') EXPECTED_DATA_FRAME = open(EXPECTED_DATA_FR...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from __future__ import absolute_import, division, print_function, unicode_literals import argparse import logging imp...
import itertools import types import numpy as np import torch import click import gym import time import yaml from robos2r.model import build_model from .agent import Agent from .script_agent import ScriptAgent, make_noised from .utils import Rate from PIL import Image from pathlib import Path from einops import rear...
import os import boto3 import typeguard from botocore.exceptions import ClientError from os import listdir from os.path import isfile, join from benchmark_runner.common.clouds.shared.s3.s3_operations_exceptions import S3FileNotUploaded, S3FileNotDownloaded, S3FileNotDeleted, S3KeyNotCreated, S3FileNotExist, S3FailedCr...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from . import CNN from . import CNN1D from . import CNN1D_Rx from . import CNN1D_Tx from . import DFN # Globally-importable models. from .CNN import get_cnn_relu from .CNN1D import get_...
from dotenv import load_dotenv import os import redis load_dotenv() class ApplicationConfig: SECRET_KEY = os.environ["SECRET_KEY"] SQLALCHEMY_TRACK_MODIFICATIONS = False SQLALCHEMY_ECHO = True SQLALCHEMY_DATABASE_URI = r"sqlite:///./db.sqlite" SESSION_TYPE = "redis" SESSION_PERMANENT = False...
import torch import torch.nn as nn import math from torch.autograd import Variable class Embedder(nn.Module): def __init__(self, vocab_size, d_model): super().__init__() self.d_model = d_model self.embed = nn.Embedding(vocab_size, d_model) def forward(self, x): return self.emb...
import torch import torch.optim as optm import torch.nn.functional as F import numpy as np from torch.autograd import Variable from torch.utils.data import Dataset, DataLoader from data.graph import Graph from collections import namedtuple SavedAction = namedtuple('SavedAction', ['log_prob', 'value_current']) # Mont...
#!/usr/bin/env python3 """ An example script to send data to CommCare using the Submission API Usage: $ export CCHQ_PROJECT_SPACE=my-project-space $ export CCHQ_CASE_TYPE=person $ export CCHQ_USERNAME=user@example.com $ export CCHQ_PASSWORD=MijByG_se3EcKr.t $ export CCHQ_USER_ID=c0ffeeeeeb574eb8b5...
from setuptools import setup setup( name='krozark-meteofrance', version='0.3.9', description = 'Meteo-France weather forecast', author = 'victorcerutti', author_email = 'maxime.barbier1991+meteofrance@gmail.com', url = 'https://github.com/Krozark/meteofrance-py', packages=['meteofrance',], ...
import unittest import zserio from testutils import getZserioApi class UInt64ParamChoiceTest(unittest.TestCase): @classmethod def setUpClass(cls): cls.api = getZserioApi(__file__, "choice_types.zs").uint64_param_choice def testSelectorConstructor(self): uint64ParamChoice = self.api.UInt64...
default_app_config = 'subjects.apps.SubjectsConfig'
import time from appium import webdriver from Appium_learning import app_settings driver = webdriver.Remote('http://localhost:4723/wd/hub', app_settings.desired_caps) print(driver.current_package) print(driver.current_activity) print(driver.context) time.sleep(5) # adb shell dumpsys window windows | findstr(grep) mFo...
#!/usr/bin/env python """ ChatterBot setup file. """ from setuptools import setup # Dynamically retrieve the version information from the chatterbot module CHATTERBOT = __import__('chatterbot') VERSION = CHATTERBOT.__version__ AUTHOR = CHATTERBOT.__author__ AUTHOR_EMAIL = CHATTERBOT.__email__ URL = CHATTERBOT.__url__...
""" This module contains methods for opening jquery-confirm boxes. These helper methods SHOULD NOT be called directly from tests. """ from seleniumbase.fixtures import constants from seleniumbase.fixtures import js_utils form_code = """'<form align="center" action="" class="jqc_form">' + '<div class="form-group">...
import time import sys class ShowProcess(): # """ # 显示处理进度的类 # 调用该类相关函数即可实现处理进度的显示 # """ i = 0 # 当前的处理进度 max_steps = 0 # 总共需要处理的次数 max_arrow = 50 #进度条的长度 infoDone = 'done' # 初始化函数,需要知道总共的处理次数 def __init__(self, max_steps, infoDone = 'Done'): self.max_steps = max_steps ...
''' Description: Author: Jiaqi Gu (jqgu@utexas.edu) Date: 2021-09-27 23:48:01 LastEditors: Jiaqi Gu (jqgu@utexas.edu) LastEditTime: 2022-02-26 02:22:52 ''' import torch from core.models.layers.super_mesh import super_layer_name_dict def test(): device=torch.device("cuda:0") p, q, k = 2, 2, 4 x = torch.eye(...
from parsons.utilities import files from parsons.utilities import check_env import json import os def setup_google_application_credentials(app_creds, env_var_name='GOOGLE_APPLICATION_CREDENTIALS'): # Detect if app_creds is a dict, path string or json string, and if it is a # json string, then convert it to a ...
import textwrap from IPython.core.magic import Magics, magics_class, line_magic from IPython.core import magic_arguments import attr from .formatting import format_var_dims from .model import Model from .utils import variables_dict setup_template = """ import xsimlab as xs ds_in = xs.create_setup( model={model...
# Generated by Django 2.2.3 on 2019-08-04 18:30 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('tournaments', '0001_initial'), ] operations = [ migrations.AlterField( model_name='game', ...
# -*- coding: utf-8 -*- __author__ = 'dorota' from sys import maxsize class Contact: def __init__(self, first_name=None, middle_name=None, last_name=None, nickname=None, title=None, company=None, address=None, home_number=None, mobile_number=None, work_number=None, fax=None, first_email=None, ...
import os import numpy as np import PIL.Image as Image import matplotlib.pylab as plt import time import tensorflow as tf import tensorflow_hub as hub from tensorflow.keras import layers os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' def image_analysis(classifier, image_shape, img_array): result = classifier.predict(...
from .imagenet_dataset import ImageNetDataset, RankedImageNetDataset, DecoderResizeImageNetDataset # noqa from .custom_dataset import CustomDataset # noqa from .imagnetc import ImageNet_C_Dataset
# Generated by Django 3.2.12 on 2022-04-27 05:44 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('blog', '0005_auto_20220427_1002'), ] operations = [ migrations.RemoveField( model_name='post', name='category', ), ...
# Copyright (c) 2014 NetApp, Inc. # 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...
"""Implements various elements to get user selection.""" from functools import partial from kivy.animation import Animation from kivy.factory import Factory from kivy.lang import Builder from kivy.properties import ( BooleanProperty, ListProperty, NumericProperty, ObjectProperty, OptionProperty, ...
# # ovirt-engine-setup -- ovirt engine setup # # Copyright oVirt Authors # SPDX-License-Identifier: Apache-2.0 # # """ovirt-imageio setup plugin.""" from otopi import util from . import config @util.export def createPlugins(context): config.Plugin(context=context)
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "effe_portal.settings") try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. ...
# expected: fail import audioop import sys import unittest import struct from test.test_support import run_unittest formats = { 1: 'b', 2: 'h', 4: 'i', } def pack(width, data): return struct.pack('=%d%s' % (len(data), formats[width]), *data) packs = { 1: lambda *data: pack(1, data), 2: lambd...
from boofuzz import * # All POST mimetypes that I could think of/find # List of all blocks defined here (for easy copy/paste) """ sess.connect(s_get("HTTP VERBS POST")) sess.connect(s_get("HTTP VERBS POST ALL")) sess.connect(s_get("HTTP VERBS POST REQ")) """ # Fuzz POST requests with most MIMETypes known s_initial...
""" ------------------------ GILDAS CLASS file reader ------------------------ Read a CLASS file into an :class:`pyspeckit.spectrum.ObsBlock` """ from __future__ import print_function from six.moves import xrange from six import iteritems import six import astropy.io.fits as pyfits import numpy import numpy as np from...
from .UserGroup import UserGroup from .UserGroupProfile import UserGroupProfile from .UserGroupRule import UserGroupRule
import os import logging import pandas as pd from datetime import date from shioaji import Shioaji class Session(Shioaji): def __init__(self, simulation: bool = False, timeout: int = 10000) -> None: """ Args: simulation: timeout: Notes: The ID of test account ran...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. 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 cop...
# -*- coding: utf-8 -*- """ Created on Mon May 14 14:15:52 2012 Plot mit TeX-Formatierung der Labels (LaTeX muss auf dem Rechner installiert sein) """ import numpy as np from matplotlib import rc import matplotlib.pyplot as plt rc('text', usetex=True) plt.figure(1) ax = plt.axes([0.1, 0.1, 0.8, 0.7]) t = np.arange(0...
''' Dummy driver that produces no output but gives all expected callbacks. Useful for testing and as a model for real drivers. Copyright (c) 2009, 2013 Peter Parente Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright n...
# Copyright (c) 2015 Quobyte, Inc. # 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 require...
#!/usr/bin/python # -*- coding: utf-8 -*- ## Add path to library (just for examples; you do not need this) import initExample from scipy import random from numpy import linspace from pyqtgraph.Qt import QtGui, QtCore import pyqtgraph as pg from pyqtgraph import MultiPlotWidget try: from pyqtgraph.metaarray import...
####################################################################### # Copyright (C) 2011-2020 by Carnegie Mellon University. # # @OPENSOURCE_LICENSE_START@ # See license information in ../../../LICENSE.txt # @OPENSOURCE_LICENSE_END@ # ####################################################################### ########...
# Scraper for California's First District Court of Appeal # CourtID: calctapp_1st # Court Short Name: Cal. Ct. App. from juriscraper.opinions.united_states.state import cal class Site(cal.Site): def __init__(self, *args, **kwargs): super(Site, self).__init__(*args, **kwargs) self.court_id = self....
# coding: utf-8 """ Trend Micro Deep Security API Copyright 2018 - 2020 Trend Micro Incorporated.<br/>Get protected, stay secured, and keep informed with Trend Micro Deep Security's new RESTful API. Access system data and manage security configurations to automate your security workflows and integrate Deep Se...
import pytest import numpy as np import cirq from cirq.contrib.svg import circuit_to_svg def test_svg(): a, b, c = cirq.LineQubit.range(3) svg_text = circuit_to_svg( cirq.Circuit( cirq.CNOT(a, b), cirq.CZ(b, c), cirq.SWAP(a, c), cirq.PhasedXPowGate(exp...
from conans import AutoToolsBuildEnvironment, CMake, ConanFile, tools from contextlib import contextmanager import glob import os import shutil class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "cmake" test_type = "explicit" short_paths = True @prop...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ Backbone modules. """ import torch import torch.nn.functional as F import torchvision from torch import nn from torchvision.models._utils import IntermediateLayerGetter from typing import Dict, List from util.misc import NestedTensor, is_main_p...
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_backend_api.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: r...
def add(a,b): return a + b def subtract(a,b): return a - b def product(a,b): return a * b
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: job_tasks.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf i...
#!/usr/bin/env python3 # Copyright (c) 2018-2021 The MobileCoin Foundation """ The purpose of this script is to print the balances for all keys in a given account directory. Example setup and usage: ``` python3 balances.py --key-dir ../../../target/sample_data/master/keys/ ``` """ import argparse import grpc imp...
"Test posix functions" z test zaimportuj support # Skip these tests jeżeli there jest no posix module. posix = support.import_module('posix') zaimportuj errno zaimportuj sys zaimportuj time zaimportuj os zaimportuj platform zaimportuj pwd zaimportuj shutil zaimportuj stat zaimportuj tempfile zaimportuj unittest zaim...
""" Module with the parent abstract class DataManagement. \n Carmine Schipani, 2021 """ from abc import ABC, abstractmethod from OpenSeesPyAssistant.ErrorHandling import * import numpy as np class DataManagement(ABC): """ Abstract parent class for data management. Using the associated MATLAB class \n ...
stops = list(input()) command = input().split(":") while command[0] != "Travel": if command[0] == "Add Stop": if 0 <= int(command[1]) < len(stops): index = int(command[1]) for letter in command[2]: stops.insert(index, letter) index += 1 elif comma...
import collections.abc import os class HydrusException( Exception ): def __str__( self ): if isinstance( self.args, collections.abc.Iterable ): s = [] for arg in self.args: try: ...
# -*- coding: utf-8 -*- # Copyright 2015, 2016 OpenMarket 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 applica...
from numpy.core.numeric import full from numpy.lib.function_base import append import prody as pr import os import numpy import matplotlib as mpl import pylab from itertools import combinations, combinations_with_replacement from docopt import docopt import itertools import pickle import sys from scipy.linalg.basic imp...
from .conf import Configuration, parse_config, read_config from .model import OpenAmundsen, Model from . import constants, errors, terrain # Get version (method as used by matplotlib: https://github.com/matplotlib/matplotlib/blob/bcc1ce8461f5b6e874baaaa02ef776d0243a4abe/lib/matplotlib/__init__.py#L133-L151) def __get...
import sys sys.path.insert(1, "../../") import h2o def offset_1897(ip, port): h2o.init(ip, port) print 'Checking binomial models for GLM with and without offset' print 'Import prostate dataset into H2O and R...' prostate_hex = h2o.import_frame(h2o.locate("smalldata/prostate/prostate.csv")) print ...
"""The tests for the MQTT JSON light platform. Configuration with RGB, brightness, color temp, effect, white value and XY: light: platform: mqtt_json name: mqtt_json_light_1 state_topic: "home/rgb1" command_topic: "home/rgb1/set" brightness: true color_temp: true effect: true rgb: true white_value: ...
"""Tests for settings.""" import sublime import imp from os import path from EasyClangComplete.tests.gui_test_wrapper import GuiTestWrapper from EasyClangComplete.plugin.settings import settings_manager from EasyClangComplete.plugin.settings import settings_storage from EasyClangComplete.plugin.utils import flag im...
# https://leetcode.com/problems/count-number-of-pairs-with-absolute-difference-k/ from collections import Counter class Solution(object): # Brute Force Approach # TC : O(N # SC : O(N) def countKDifference(self, nums, k): """ :type nums: List[int] :type k: int ...
# # Copyright 2016 The BigDL Authors. # # 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 ...
import re from pyramid_debugtoolbar.tbtools import Traceback from pyramid_debugtoolbar.panels import DebugPanel from pyramid_debugtoolbar.utils import escape from pyramid_debugtoolbar.utils import STATIC_PATH from pyramid_debugtoolbar.utils import ROOT_ROUTE_NAME from pyramid_debugtoolbar.utils import EXC_ROUTE_NAME ...
#!/usr/bin/python3 import sys import pathlib from datetime import datetime import pytest from falcon import testing sys.path.append( str(pathlib.Path(__file__).resolve().parent) + '/../' ) import main @pytest.fixture() def client(): return testing.TestClient(main.create_service()) def test_api_version(clien...
try: from GracefulKiller.GracefulKiller import GracefulKiller, Loop except: from src.GracefulKiller.GracefulKiller import GracefulKiller, Loop
from unittest import TestCase from rapidtest import Result, Test, Case, TreeNode class TestTest(TestCase): def test_check_result(self): t = Test(list, operation=True) t.add_case(Case('append', [1], 'pop', Result(1), 'append', [2], ...
"""The RAAML Modeling Language module is the entrypoint for RAAML related assets.""" import gaphor.SysML.propertypages # noqa from gaphor.abc import ModelingLanguage from gaphor.core import gettext from gaphor.diagram.diagramtoolbox import ToolboxDefinition from gaphor.RAAML import diagramitems, raaml from gaphor.RAA...
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Mathieu Blondel <mathieu@mblondel.org> # Olivier Grisel <olivier.grisel@ensta.org> # Andreas Mueller <amueller@ais.uni-bonn.de> # Joel Nothman <joel.nothman@gmail.com> # Hamzeh Alsalhi <ha258@cornell.edu> # Licens...
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.value import scalar from metrics import Metric NETWORK_DATA_NOT_FOUND = 'Network data could not be found.' # This is experimental. crbug....