text
stringlengths
2
999k
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import pulumi import pulumi.runtime from .. import utilities, tables class Document(pulumi.CustomResource)...
# -*- coding: utf-8 -*- # Resource object code # # Created: st 14. 10 21:40:05 2015 # by: The Resource Compiler for PySide (Qt v4.8.7) # # WARNING! All changes made in this file will be lost! from PySide import QtCore qt_resource_data = b"\x00\x00\x03T\x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\x00\x00 \x00...
#!/usr/bin/env python import sys import simplejson as json print json.dumps(json.loads(sys.stdin.read()), indent = 4) sys.exit(0)
from jupyterworkflow.data import get_fremont_data import pandas as pd import numpy as np def test_fremont_data(): assert all(data.columns ==['Total', 'East', 'West']) #this is to make sure the columns are right assert isinstance(data.index, pd.DatetimeIndex) assert len(np.unique(data.index.time)==24) #to e...
""" Closuers Free variables and closures Remember: Functions defined inside another function can access the outer (nonLocal) variables """ def outer(): x = 'python' / this x refers to the one in outer's scope', this nonlocal variable x is called a free varia...
import numpy as np import scipy.fftpack as fourier_transform class Kubo(object): """ The kubo model contains all attributions: C(t), g(t), I(w) Attributes ---------- tau : float The decay constant. Must be the same unit with time t. AUt is preferred. delta : float ...
# pylint: disable=unused-argument from charms.reactive import when, when_not, set_state, remove_state from charmhelpers.core import hookenv from charms.layer.magpie_tools import check_nodes, safe_status, Iperf, Lldp def _set_states(check_result): if 'fail' in check_result['icmp']: set_state('magpie-icmp.f...
#! /usr/bin/python #*********************************************************** #* Software License Agreement (BSD License) #* #* Copyright (c) 2016, Felix Duvallet #* All rights reserved. #* #* Redistribution and use in source and binary forms, with or without #* modification, are permitted provided that the follo...
#!/usr/bin/env python3 # Generate an extension database, a JSON file mapping from qualified well known # extension name to metadata derived from the envoy_cc_extension target. import json import os import pathlib import shutil import subprocess import sys from importlib.util import spec_from_loader, module_from_spec...
#!/usr/bin/env python3 from typing import Any, Callable, List, Tuple, Union import torch from torch.nn import Module from captum.log import log_usage from ...._utils.common import _verify_select_column from ...._utils.typing import BaselineType, TensorOrTupleOfTensorsGeneric from ..._utils.attribution import NeuronA...
import numpy as np from pandas import DataFrame from sklearn.cluster import DBSCAN from GoMapClustering.AngularClustering import FCM4DDHard from GoMapClustering.base import GoMapClusterMixin class DBSCANFCM4DD(GoMapClusterMixin): def __init__( self, c: int, max_spatial_dista...
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="family", parent_name="mesh3d.legendgrouptitle.font", **kwargs ): super(FamilyValidator, self).__init__( plotly_name=plotly_name, par...
import json from typing import Any, Dict, List class Record: def __init__(self, id: int, data: str, label: List[Any], user: str, metadata: Dict[Any, Any]): self.id = id self.data = data self.label = label...
import os from os.path import join from utils.utils import str2bool def add_eval_args(parser): parser.add_argument('--fps', default=0, type=int, help='Enable sync mode with adjustable FPS. Default (0) means default, e.g. for Doom its FPS (~35), or unlimited if not specified by env. Leave at 0 for Doom multiplaye...
# -*- coding: utf-8 -*- """ flask_on_fhir ~~~~ Flask-on-FHIR is a flask extension helping you to build FHIR API :license: MIT, see LICENSE for more details. """ from .extension import FHIR from .data_engine import DataEngine, CapabilityStatementDataEngine __all__ = ['FHIR', 'DataEngine', 'CapabilitySta...
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
import os from sage.misc.cachefunc import cached_function from sage.rings.integer import Integer from sage.structure.sage_object import load from sage.misc.misc import SAGE_SHARE @cached_function def cunningham_prime_factors(): """ List of all the prime numbers occuring in the so called Cunningham table. T...
from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils import timezone import datetime # Create your models here. class GlobalAppPermission(models.Model): class Meta: managed = False # No database table creation or deletion operations \ ...
# @license # Copyright 2016 Google Inc. # 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...
#!/usr/bin/env python3 # MIT License # # Copyright (c) 2020 FABRIC Testbed # # 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 ...
""" OVERALL CREDIT TO: t0mm0, Eldorado, VOINAGE, BSTRDMKR, tknorris, smokdpi, TheHighway urlresolver XBMC Addon Copyright (C) 2011 t0mm0 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free So...
from ._version import get_versions __version__ = get_versions()['version'] del get_versions import intake # Import this first to avoid circular imports during discovery. del intake from .spark_sources import SparkRDD, SparkDataFrame from .spark_cat import SparkTablesCatalog
from __future__ import division import torch # Beam decoding with KL divergence import numpy as np from scipy.stats import entropy class Beam(object): """ Class for managing the internals of the beam search process. Takes care of beams, back pointers, and scores. Args: size (int): beam size ...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import ...
"""Provides the Objector class.""" from typing import Any, Dict, List, Optional, TypeVar, Union from .exceptions import APIException, ClientException from .models.reddit.base import RedditBase from .util import snake_case_keys Reddit = TypeVar("Reddit") class Objector: """The objector builds :class:`.RedditBas...
from .producer import AIOKafkaProducer, BaseProducer, MultiTXNProducer __all__ = ["AIOKafkaProducer"]
# 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 # ...
""" Class for reading data from a MEArec simulated data. See: https://mearec.readthedocs.io/en/latest/ https://github.com/alejoe91/MEArec https://link.springer.com/article/10.1007/s12021-020-09467-7 Author : Alessio Buccino """ from .baserawio import (BaseRawIO, _signal_channel_dtype, _unit_channel_dtype, ...
#!/usr/bin/env python3 # -*-coding: utf-8-*- # Author : LiangjunFeng # Blog : http://my.csdn.net/Liangjun_Feng # GitHub : https://www.github.com/LiangjunFeng # File : support_vector_machine.py # Date : 2017/09/21 11:12 # Version: 0.1 # Description: support_vector_machine import numpy import cvxopt import matplot...
from .Origami import Origami from .Kresling import Kresling from .Bendy import Bendy
import itertools from typing import Iterable, Union, Tuple, List import numpy as np from emukit.core.parameter import Parameter class CandidateStringParameter(Parameter): """ A class for string inputs consisting of a set of valid strings """ def __init__(self, name: str, candidates: np.ndarray): ...
import os, json, logging from dku_aws.eksctl_command import EksctlCommand from .kubectl_command import run_with_timeout def has_gpu_driver(kube_config_path): env = os.environ.copy() env['KUBECONFIG'] = kube_config_path cmd = ['kubectl', 'get', 'pods', '--namespace', 'kube-system', '-l', 'name=nvidia-devic...
# -*- coding: utf-8 -*- # # Copyright (C) 2020 CERN. # # Invenio-Banners is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Create and show banners with useful messages to users.""" from .ext import InvenioBanners from .version import...
from collections import OrderedDict from functools import reduce from operator import mul from math import ceil from cached_property import cached_property import ctypes from devito.exceptions import InvalidOperator from devito.logger import info, perf, warning, is_log_enabled_for from devito.ir.equations import Lowe...
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
""" S.P.Q.R Senātus Populusque Rōmānus ^ ^ ^ ^ The Senate and People of Rome Just a Library to allow you be backward compatible with old numeral systems. """ __version__ = "0.0.6" import copy class RomanNumeral: def __init__(self, val): if type(val) is list: self.stack = val...
"""TODO(blended_skill_talk): Add a description here.""" import json import os import datasets # TODO(blended_skill_talk): BibTeX citation _CITATION = """\ @misc{smith2020evaluating, title={Can You Put it All Together: Evaluating Conversational Agents' Ability to Blend Skills}, author={Eric Michael Smith an...
# (c) [Muhammed] @PR0FESS0R-99 # (s) @Mo_Tech_YT , @Mo_Tech_Group, @MT_Botz # Copyright permission under MIT License # All rights reserved by PR0FESS0R-99 # License -> https://github.com/PR0FESS0R-99/DonLee-Robot-V2/blob/Professor-99/LICENSE from DonLee_Robot_V2 import Import # Covid 19-20 API = "https://api.sumanjay....
from typing import Optional from pydantic import BaseModel import sqlalchemy as sa from sqlalchemy.sql import expression from sqlalchemy.ext.compiler import compiles from api.models import meta class Token(BaseModel): access_token: str token_type: str class TokenData(BaseModel): username: Optional[str] ...
import os import sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) import rdfs
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Created on Thu Dec 14 12:40:18 2017 @author: wolfgang-302 """ from distutils.core import setup setup(name='fun-expr', version='0.1', description='Create a sympy function from an expression', author='wolfgang-302', author_email='11839527+wolfga...
import csv import itertools import logging import matplotlib.pyplot as plt import numpy as np import pandas as pd from sklearn.metrics import confusion_matrix from horus.core.util import definitions from horus.core.feature_extraction import Core def confusion_matrix_analysis(horus_matrix): df = pd.DataFrame(horus...
def test(num): zero = 0 while num != zero: num -= 1 test(100000000)
"""Qt implementation of _Renderer and GUI.""" # Authors: Guillaume Favelier <guillaume.favelier@gmail.com> # Eric Larson <larson.eric.d@gmail.com> # # License: Simplified BSD from contextlib import contextmanager import pyvista from pyvistaqt.plotting import FileDialog from PyQt5.QtCore import Qt, pyqtSign...
""" .. _tut_viz_epochs: Visualize Epochs data ===================== """ import os.path as op import mne data_path = op.join(mne.datasets.sample.data_path(), 'MEG', 'sample') raw = mne.io.read_raw_fif( op.join(data_path, 'sample_audvis_raw.fif'), preload=True) raw.load_data().filter(None, 9, fir_design='firwin')...
from typing import List class Solution: def findMaxLength(self, nums: List[int]) -> int: count = 0 d = {} max_length = 0 d[0] = -1 for idx, num in enumerate(nums): count = count + 1 if num == 1 else count - 1 if count not in d: d[cou...
# Reinforcement Learning (DQN) tutorial # ===================================== import gym import math import random import numpy as np import matplotlib import matplotlib.pyplot as plt from collections import namedtuple from itertools import count from copy import deepcopy from PIL import Image import torch import t...
import numpy as np import warnings import math from tqdm import tqdm from skimage.measure import regionprops from skimage.draw import polygon from csbdeep.utils import _raise, axes_check_and_normalize, axes_dict from itertools import product from .geometry import polygons_to_label_coord, polyhedron_to_label OBJECT_...
import sys import logging import logmatic from app.helpers.requestid import RequestIdFilter def init_app(app): # pylint: disable=protected-access log_level = logging._nameToLevel[app.config['LOG_LEVEL']] log_type = app.config['LOG_FORMATTER'] # Configure JSON filesystem log handler handler = log...
from geopandas._config import options # noqa from geopandas.geoseries import GeoSeries # noqa from geopandas.geodataframe import GeoDataFrame # noqa from geopandas.array import points_from_xy # noqa from geopandas.io.file import _read_file as read_file # noqa from geopandas.io.arrow import _read_parquet as read_...
from django.template import TemplateSyntaxError from django.test import SimpleTestCase from ..utils import setup class SimpleTagTests(SimpleTestCase): libraries = {"custom": "template_tests.templatetags.custom"} @setup({"simpletag-renamed01": "{% load custom %}{% minusone 7 %}"}) def test_simpletag_rena...
# Copyright OpenSearch Contributors. # SPDX-License-Identifier: Apache-2.0 import os import shutil import yaml from manifests.build_manifest import BuildManifest class BuildRecorder: def __init__(self, build_id, output_dir, name, version, arch, snapshot): self.output_dir = output_dir self.build_ma...
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'rhaokar.settings') try: from django.core.management import execute_from_command_line ...
# encoding: utf-8 """ An application for managing IPython profiles. To be invoked as the `ipython profile` subcommand. Authors: * Min RK """ #----------------------------------------------------------------------------- # Copyright (C) 2008 The IPython Development Team # # Distributed under the terms of the BSD...
import murmur import string import unittest class TestMurmur(unittest.TestCase): def test_string_hash(self): expected_dict = {'a': 2456313694, 'c': 754329161, 'b': 2260187636, 'e': 3115762238, 'd': 4163039750, 'g': 1545794298, 'f': 4226522672, 'i': 3451942824, 'h': 1069002520, 'k': 3288208012, 'j': 313138...
# Copyright 2018 The ops Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
from __future__ import print_function, absolute_import, unicode_literals import wormhole from twisted.internet import reactor from twisted.internet.defer import Deferred, inlineCallbacks, gatherResults from twisted.internet.protocol import Protocol, Factory from twisted.trial import unittest from ..common import Serve...
#!/Users/upendra_35/Documents/git.repos/container_camp_2018/buildenv/bin/python3.5 # $Id: rst2html4.py 7994 2016-12-10 17:41:45Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ A minimal front end to the Docutils Publisher, producing (X)HTML. Th...
# Copyright (c) Facebook, Inc. and its affiliates. # MMBTModel, ModalEmbeddings is copied from [1] # as we have internal dependency on transformers v2.3. # These will be removed when we upgrade to package v2.5+. # [1]: https://github.com/huggingface/transformers/blob/master/src/transformers/modeling_mmbt.py # noqa im...
from enum import Enum import tensorflow as tf # our stuff from nnu import gss_layer class ModelType(Enum): SSL = 0 FTT = 1 ReLU = 2 def get_standard_batch_specs( ndim=3, nsamples=10000, kernel='lanczos', input_f_spec: str = 'laplace_0', batch_label='', test_res_runs=1, ): ba...
from __future__ import absolute_import from flask import request from flask.json import JSONEncoder import six from decimal import Decimal from .util import PrettyDecimal if six.PY3: unicode = str class IterableEncoder(JSONEncoder): def default(self, o): try: iterator = iter(o) ex...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Data structures.""" class LinkedList: """Linked list implementation.""" def __init__(self): self.first = None self.current = None def add_last(self, key, value): """Add new node to the last position of this linked list.""" ...
# vim: set fileencoding=utf-8 : from __future__ import absolute_import, print_function, unicode_literals import functools import operator from itertools import chain import logbook from twisted.internet import defer import stethoscope.api.endpoints.utils import stethoscope.plugins.utils import stethoscope.validatio...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-07-01 19:05 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('post', '0003_channel_detail'), ] operations = [ migrations.AddField( ...
"""This module is responsible for reading the `.sampler_servers.ini` configuration file, and establishing gRPC connections to each endpoint listed in that file. If that file is empty, we also read `sampler_servers.ini.dist`. Each entry has the form [upstream_name] hostname = hostname # defaults to upstream_name port...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import os import pickle import random import re import time from datetime import datetime, timedelta from urllib import parse import requests from bs4 import BeautifulSoup import CustomBrowser import address_util from config import global_config from exception...
""" A client that talks to tensorflow_serving loaded with kaggle model. The client read kaggle feature data set, queries the service with such feature data to get predictions, and calculates the inference error rate. """ import pickle import json import requests import numpy as np from predictor_dl_model.pipeline.ut...
# Copyright 2017, 2021 IBM Corp. # # 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 ag...
""" Config.py 配置文件 """ settings = { #一天申请的限制个数 'maxApplyNum' : 300 , #试用类型 #家用电器737 手机数码652 电脑办公670 家居家装1620 服饰鞋包1315 生鲜美食12218 钟表奢品5025 家庭清洁15901 食品饮料1320 'cids' : ['737', '652' ,'670', '1620', '1315', '12218' ,'5025' , '15901' ,'1320' ,] , #申请商品价格下限 单位 元 'goodPrice' : 30 , #浏览器button最...
# -*- coding: utf-8 -*- # Copyright 2021 National Institute of Information and Communication Technology (Raj Dabre) # # 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, i...
description = 'neutron camera' group = 'optional' tango_base = 'tango://kompasshw.kompass.frm2:10000/kompass/' sysconfig = dict( datasinks = ['tifformat'], ) devices = dict( camtimer = device('nicos.devices.entangle.TimerChannel', description = 'timer for the Neutron camera', tangodevice = ta...
#!/usr/bin/env python # handWaveFull.py - Choose full screen image by waving hand. # (c) Kimmo Karvinen & Tero Karvinen http://BotBook.com import gtk, os, serial, gobject # Global variables dir="data" pixbufs=[] image=None bg=None pos=0 ser=None # Pixbuf manipulation def fitRect(thing, box): # scale ...
""" Testfile for the contactplan.py implementations """ from collections import OrderedDict import math import logging import pytest from jsonschema import ValidationError from pydtnsim import ContactPlan def test_create_contactplan_object(): # Create contact plan object cp = ContactPlan(1000.1, 42.42) ...
""" Migration script to modify the 'notify' field in the 'request' table from a boolean to a JSONType """ from __future__ import print_function import logging from json import dumps from sqlalchemy import ( Boolean, Column, MetaData, Table ) from galaxy.model.custom_types import JSONType from galaxy....
#!/usr/bin/env python # Copyright 2012-2018 CERN for the benefit of the ATLAS collaboration. # # 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 ...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from functools import partial from pathlib import Path from typing import List, Union from fastai.basic_data import DeviceDataLoader from fastai.basic_train import Learner import numpy as np import PIL from sklearn.metrics im...
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(10 ** 7) # nの素数判定 def is_prime(n): if n == 1: return False for i in range(2, int(n**0.5)+1): if n % i == 0: return False return True n = i...
""" Movie Recommender Project Hongbin Qu This program examines the basic infomation of the datasets and generates some plots """ import pandas as pd import numpy as np import matplotlib.pyplot as plt links = '../dataset/links.csv' movies = '../dataset/movies.csv' ratings = '../dataset/ratings.csv' tags = '../dataset/...
from .auth_chooser import auth_chooser
from __future__ import print_function from builtins import str import rospy from turtlesim.msg import * x = None y = None theta = None turtle_name = "" def save_turtle_pose(pose): global x global y global theta x = pose.x y = pose.y theta = pose.theta def execute(self, inputs, outputs, gvm...
# -*- coding: utf-8 -*- import unittest import logging import cantools from cantools.subparsers.dump import formatting class CanToolsDumpTest(unittest.TestCase): def test_the_homer(self): db = cantools.db.load_file('tests/files/kcd/the_homer.kcd') self.assertEqual(db.messages[1].signal_tree, ...
import numpy as np import pickle import logging import chess from raspberryturk import RaspberryTurkError, opt_path from raspberryturk.core.data.raw_pixels_extractor import RawPixelsExtractor from raspberryturk.core.data.class_encoding import empty_or_not def _convert_to_32bit_pca(pca): pca.components_ = pca.compo...
from sklearn.model_selection import train_test_split from sklearn.base import BaseEstimator, TransformerMixin from regression_model.get_data import read_data import pandas as pd from regression_model.config import config class SplitTrainTest(BaseEstimator, TransformerMixin): """Split data into train and test""" ...
#!/usr/bin/env python import os from flask import request from imsearchtools import query as image_query from imsearchtools import process as image_process from imsearchtools import postproc_modules def imsearch_query(query, engine, query_params, query_timeout=-1.0): # prepare input arguments for searcher init...
""" Copyright 2020 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES O...
import torch import torch.nn as nn from mmcv.cnn import normal_init from mmcv.runner import force_fp32 from mmdet.core import (anchor_inside_flags, build_anchor_generator, build_assigner, build_bbox_coder, build_sampler, images_to_levels, multi_apply, multiclass_nms, unm...
from termcolor import colored from requests import post from json import dumps def createRepo(inputObject, head, type): RepoDetails = { 'name':inputObject.RepoName, 'description':inputObject.RepoDescription, 'visibility':type } print() print( "Create repository in organization")...
import os __author__ = 'Ollie Bennett | http://olliebennett.co.uk/' LOG_PATH_TWITTER = "logs" + os.sep + "twitter.log" LOG_PATH_TEMPERATURE = "logs" + os.sep + "temperature.log" LOG_PATH_TORRENT = "logs" + os.sep + "torrents.log" LOG_PATH_SERVER = "logs" + os.sep + "server.log"
#!/usr/bin/python # # Copyright (c) 2020, kobbled # # 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...
from robot.api.deco import keyword from robot.libraries.BuiltIn import BuiltIn from SeleniumLibrary import SeleniumLibrary from json import dumps import sys import random from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.co...
import random import math import copy from datasets import miniImageNet_few_shot, tiered_ImageNet_few_shot, ImageNet_few_shot from collections import OrderedDict import warnings import models import time import data import utils import sys import numpy as np import os import argparse from tqdm import tqdm import torch ...
import os import sys import urllib2 #new_path = [ os.path.join( os.path.dirname( __file__ ), '..', '..', 'lib' ) ] #new_path.extend( sys.path[1:] ) #sys.path = new_path import json import logging log = logging.getLogger( __name__ ) def make_url( api_key, url, args=None ): # Adds the API Key to the URL if it's n...
# -*- encoding: utf-8 -*- # # Copyright 2014 Telefonica Investigación y Desarrollo, S.A.U # # This file is part of FI-WARE project. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # # You may obtain a copy of the License at: # # ...
from django import forms class UploadContentsForm(forms.Form): file = forms.FileField()
""" This file offers the methods to automatically retrieve the graph Fusarium oxysporum f. sp. cubense race 4. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11...
from pygame import * # Создаем оконо win_width = 700 win_height = 500 display.set_caption("ping-pong") window = display.set_mode((win_width, win_height)) background = transform.scale(image.load(img_back), (win_width, win_height))
from fixtures.constants import ResponseText from fixtures.register.model import RegisterUser, RegisterUserResponse class TestRegisterUser: def test_register_user_with_valid_data(self, app): """ 1. Try to register user with valid data 2. Check that status code is 201 3. Check respon...
import os import requests from lxml import objectify from delorean import Delorean BART_API_KEY = os.getenv('BART_API_KEY') def build_request(**kwargs): cmd = kwargs.get('cmd', 'etd') orig = kwargs.get('orig', 'DBRK') direction = kwargs.get('direction', 's') key = kwargs.get('key', 'MW9S-E7SL-26DU-VV8...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Hugo helpers.""" import yaml from datetime import datetime import hashlib r""" # Set type to 'posts' if you want to render page as blogpost type = "posts" # Set page weight to re-arrange items in file-tree menu. weight = 10 # Set how many table of contents levels to ...