text
stringlengths
1
927k
_base_ = './denseclip_plus_r50_deeplabv2_r101-d8_512x512_2k_voc12aug_20.py' model = dict( decode_head=dict( clip_channels=3072, channels=768, text_channels=768, text_embeddings_path='pretrain/voc_RN50x16_clip_text.pth', clip_weights_path='pretrain/RN50x16_clip_weights.pth', ...
import zmq from threading import Thread import time import json class StandaloneClient: def __init__(self, interface, host, user, target): self.interface = interface self.host = host self.connect_port = target.message_port self.bind_port = user.message_port self.heart_port ...
from typing_extensions import TypedDict, Literal from typing import Optional, Dict, Any, List, Union ClauseName = str ClauseType = str ClauseBody = Dict[str, Any] Meta = Dict[str, Any] # Script class Script(TypedDict, total=False): lang: str id: str source: str params: Dict[str, Any] GapPolicy = Li...
# -*- Mode: Python; tab-width: 4 -*- # Id: asynchat.py,v 2.26 2000/09/07 22:29:26 rushing Exp # Author: Sam Rushing <rushing@nightmare.com> # ====================================================================== # Copyright 1996 by Sam Rushing # # All Rights Reserved # # Permission...
#!/usr/bin/env python3 # Copyright (c) 2017 The CloudComputingChain Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """An example functional test The module-level docstring should include a high-level description o...
# ****************************************************************************** # Copyright 2019 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.o...
""" This is an explicit DG method: we invert the mass matrix and perform a matrix-vector multiplication to get the solution in a time step """ from math import * import mpi4py import numpy as np from time import time import sys import os import cProfile from firedrake import * from firedrake.petsc import PETSc from ...
import unittest import xml.etree.ElementTree as ET from programy.bot import Bot from programy.brain import Brain from programy.config import ClientConfiguration, BrainConfiguration from programy.dialog import Question, Sentence from programy.parser.template.graph import TemplateGraph from programy.parser.template.node...
from collections import OrderedDict import hashlib import base64 import hmac import httplib import json import random import string import time import urllib """ API configuration. """ API_HOSTNAME = 'api.formcorp.com.au' # Module constants _constants = { 'SIGNATURE_ENCODING': "utf-8", 'REQUEST_TYPE_POST': 'P...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import colorful.fields import django.contrib.gis.db.models.fields from django.conf import settings import webmap.utils class Migration(migrations.Migration): dependencies = [ migrations.swappable_dep...
#!/usr/bin/env python import rospy from std_msgs.msg import Bool from dbw_mkz_msgs.msg import ThrottleCmd, SteeringCmd, BrakeCmd, SteeringReport from geometry_msgs.msg import TwistStamped import math from twist_controller import Controller ''' You can build this node only after you have built (or partially built) th...
# Whiskers_Roam_Expanded.py from cyberbot import * bot(22).tone(2000, 300) while True: left = bot(7).read_digital() right = bot(9).read_digital() if left == 1 and right == 1: #Go forward bot(18).servo_speed(75) bot(19).servo_speed(-75) display.show(Image.ARROW_S) bot(15).write_digital(0) bot(0).write_d...
# 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, ...
# Copyright 2013 NTT Data # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
""" With these settings, tests run faster. """ from .base import * # noqa from .base import env # GENERAL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET_KEY = env( "DJANGO_SECRET_KEY", default="UwkbY3fge...
#!/usr/bin/env python # ------------------------------------------------------------------------------------------------------% # Created by "Thieu Nguyen" at 14:53, 17/03/2020 % # ...
""" StatusCake API Copyright (c) 2022 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, me...
from maml_zoo.baselines.base import Baseline import numpy as np class ZeroBaseline(Baseline): """ Dummy baseline """ def __init__(self): super(ZeroBaseline, self).__init__() def get_param_values(self, **kwargs): """ Returns the parameter values of the baseline object ...
#!/usr/bin/python # -*- coding: utf-8 -*- # <bitbar.title>kcli list</bitbar.title> # <bitbar.version>v1.0</bitbar.version> # <bitbar.author>Karim Boumedhel</bitbar.author> # <bitbar.author.github>karmab</bitbar.author.github> # <bitbar.desc>Lists running vms using kcli</bitbar.desc> # <bitbar.image>https://raw.githubu...
""" Initial application specifications """ from flask import Flask, redirect from flask_sqlalchemy import SQLAlchemy from instance.config import app_config from flasgger import Swagger # pylint: disable=C0103 db = SQLAlchemy() def create_app(config_name): """ Function for creating application depending on confi...
# # Third party imports # import unittest # import json # # Local imports # from app import create_app # class TestMeetups(unittest.TestCase): # def setUp(self): # self.app = create_app("testing") # self.client = self.app.test_client() # self.meetup_incomplete ={ # "topic...
import pkg_resources try: __version__ = pkg_resources.require("sqla-wrapper")[0].version except Exception: # pragma: no cover __version__ = None
from summarizer import Summarizer from transformers import AutoConfig, AutoTokenizer, AutoModel test_file = 'tests/test_news_source.txt' model_spec = "distilbert-base-uncased" f = open(test_file, 'r') body = f.read() f.close() custom_config = AutoConfig.from_pretrained(model_spec) custom_config.output_hidden_states=...
# Generated by Django 3.2.9 on 2021-11-17 15:36 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('run', '0005_alter_run_start_time'), ] operations = [ migrations.AlterField( model_name='run', name='start_time', ...
# Generated by Django 2.2.2 on 2019-09-13 23:27 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0001_initial'), ] operations = [ migrations.AddField( model_name='profile', name='bio', field=m...
#!/usr/bin/env python import shutil from pathlib import Path import uvicorn from fastapi import FastAPI from starlette.middleware.cors import CORSMiddleware from settings import PROD_TORTOISE_ORM, TEST_TORTOISE_ORM from tortoise import Tortoise from crud import hacks, locations, participants, teams, users from setti...
import numpy as np import tensorflow as tf import matplotlib.pyplot as plt from logistic_adam import * #learing rate = 1,batch_size = 500, epoch=15, lamda = 0.01 logging = runLogistic(1,500,15,0.01) #print(logging) plt.plot(logging[:,0],marker='+',label='learning rate = 1') #learing rate = 0.1,batch_size = 500, epoc...
import ibmsecurity.utilities.tools import logging from ibmsecurity.utilities import tools logger = logging.getLogger(__name__) module_uri = "/isam/felb/configuration/ha" requires_modules = None requires_version = None requires_model = "Appliance" def get(isamAppliance, check_mode=False, force=False): """ R...
#encoding:utf-8 import torch import numpy as np from ..utils.utils import model_device,load_bert class Predicter(object): def __init__(self, model, logger, n_gpu, model_path ): self.model = model self.logger = logg...
from __future__ import absolute_import, division, print_function from pyro.nn.auto_reg_nn import AutoRegressiveNN, ConditionalAutoRegressiveNN, MaskedLinear from pyro.nn.dense_nn import DenseNN __all__ = [ "AutoRegressiveNN", "ConditionalAutoRegressiveNN", "DenseNN", "MaskedLinear", ]
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import utool as ut import ubelt as ub try: import wbia.guitool as gt from wbia.guitool import mpl_widget INSPECT_BASE = gt.GuitoolWidget MatplotlibWidget = mpl_widget.MatplotlibWidget except (ImportError, TypeErro...
import tensorflow as tf from functools import partial from smart_compose.utils.parsing_utils import get_input_files, InputFtrType, iterate_items_with_list_val def _read_specified_features(inputs, feature_type2name): """Only reads in features specified in the DeText arguments""" required_inputs = {} for _...
from django.contrib.auth.models import User from django.db.models.signals import post_save from django.dispatch import receiver from .models import Profile # @receiver(post_save, sender=User) def create_profile(sender, instance, created, **kwargs): if created: Profile.objects.create(user=instance) # @re...
import networkx as nx import pickle from bokeh.io import show, output_file from bokeh.plotting import figure from bokeh.models.graphs import from_networkx processed_data_folder = 'C:\\Users\\Alex\\Documents\\GitHub\\insight-articles-project\\data\\processed\\' filename = processed_data_folder + 'graph_and_labels' wi...
"""SCons.Tool.ifl Tool-specific initialization for the Intel Fortran compiler. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons...
# coding=utf-8 # Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from itertools import chain from flask import url_for from markupsafe import escape, Markup impo...
from selenium import webdriver from time import sleep import re browser = webdriver.Firefox() browser.get('https://jw.ustc.edu.cn') input() windows = browser.window_handles browser.switch_to.window(windows[1]) while True: element = browser.find_element_by_id('table') elementText = element.text number = ...
################################################################################################################################ ## constants.py ## Contains various constants and defaults used both on the urscript side and the python side ## The defaults can be oveeriden when calling utils.load_script, by including the...
import requests import bs4 import json import os # define git commit function def gitCommit(): os.chdir('..') os.system('git status') os.system("git add .") os.system("git status") os.system('git commit -m "update data information"') os.system("git push") # get page response url = 'http://www....
import sys sys.path.append("../") import json import os import argparse import torch import shutil import numpy as np num_loop = 1 #for i in range(num_loop): # op = 'CUDA_VISIBLE_DEVICES=2 python ar_test.py -i 0 -em test -analyze -ns -write_time -beam_size 1' # os.system(op) ''' for bs in [1, 5, 6]: op = ...
# This code is part of Qiskit. # # (C) Copyright IBM 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
import argparse import time import os import logging from baselines import logger, bench from baselines.common.misc_util import ( set_global_seeds, boolean_flag, ) #import baselines.ddpg.training as training import training as training from baselines.ddpg.models import Actor, Critic from baselines.ddpg.memory i...
from __future__ import absolute_import, unicode_literals from django.contrib import admin from django.core.exceptions import ImproperlyConfigured from django.db import models from django.utils.translation import ugettext_lazy as _ from feincms.admin.item_editor import FeinCMSInline from feincms._internal import ct_re...
from src.StarDelegate import * from src.driverUi.callReview import * from datetime import * from src.utilities.SqlTools import * from PyQt5.QtGui import QStandardItemModel, QStandardItem class TypingExercise(): def __init__(self, main_window, word_deck, parent=None): super(TypingExercise, self).__init__() ...
"""This module defines the base Packet class and helper functions.""" import enum import inspect from copy import copy from typing import Iterable, Dict, Union, Any, Callable, List, Type from kifurushi.utils.network import hexdump from .abc import Field, CommonField from .fields import BitsField, FieldPart, Conditiona...
import FWCore.ParameterSet.Config as cms hltEgammaClusterShapeL1Seeded = cms.EDProducer("EgammaHLTClusterShapeProducer", ecalRechitEB = cms.InputTag("hltRechitInRegionsECAL","EcalRecHitsEB"), ecalRechitEE = cms.InputTag("hltRechitInRegionsECAL","EcalRecHitsEE"), isIeta = cms.bool(True), recoEcalCandida...
# coding=utf-8 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- from ...
# This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for license information # See https://swift.org/CONTRIBUTORS.txt for the list o...
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT """ This test will initialize the display using displayio and draw a solid white background, a smaller black rectangle, and some white text. """ import board import displayio import terminalio from adafruit_display_text impo...
"""Blueprint for HacsRepositoryThemes.""" # pylint: disable=too-many-instance-attributes,invalid-name,broad-except,access-member-before-definition import logging from .hacsrepositorybase import HacsRepositoryBase from ..hacsbase.exceptions import HacsRequirement _LOGGER = logging.getLogger("custom_components.hacs.rep...
#!/bin/env python # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
import sys, os, inspect from ctypes import * import math MY_DIR = os.path.dirname(os.path.abspath(inspect.getframeinfo(inspect.currentframe())[0])) HELPER_DIR = os.path.abspath(os.path.join(MY_DIR, '..', 'helpers')) sys.path.append(HELPER_DIR) import dhlog class _API: is_init = False @staticmethod def i...
#!/usr/bin/env python3 import click from swsscommon.swsscommon import ConfigDBConnector from tabulate import tabulate from sonic_py_common import multi_asic from utilities_common.general import load_db_config from utilities_common import multi_asic as multi_asic_util class Crm: def __init__(self, db=None): ...
from collections import namedtuple import os import numpy as np import pytest from brian2 import prefs, clear_cache, _cache_dirs_and_extensions from brian2.codegen.cpp_prefs import compiler_supports_c99 from brian2.codegen.optimisation import optimise_statements from brian2.codegen.translation import (analyse_identif...
import time import threading import traceback from queue import PriorityQueue from collections import defaultdict from qiskit import IBMQ, Aer, execute from qiskit.providers.ibmq import least_busy from qiskit.tools.monitor import backend_overview, job_monitor from core import app def log(task_id, message): ...
# coding: utf-8 """ Copyright 2017 Square, 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 la...
import argparse from utils.config import get_config from model.flowbot import Flowbot def main(): parser = argparse.ArgumentParser() parser.add_argument('--train', action='store_true') parser.add_argument('--bot', default='lstm_attention') args = parser.parse_args() testing = not args.train c...
# Copyright (c) Xavier Figueroa # 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, sof...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import bisect import copy import logging import torch.utils.data from maskrcnn.utils.comm import get_world_size from maskrcnn.utils.imports import import_file from . import datasets as D from . import samplers from .collate_batch import BatchCol...
#!/usr/bin/env python # coding: utf-8 # In[ ]: import os import numpy as np import flask import pickle from flask import Flask,render_template,request app=Flask(__name__) @app.route('/') @app.route('/index') def index: return flask.render_template('index.html') # In[ ]: #prediction function def ValuePredic...
from yaml.composer import Composer from yaml.parser import Parser from yaml.reader import Reader from yaml.resolver import Resolver from yaml.scanner import Scanner from ..openapi_spec_validator.constructors import ExtendedSafeConstructor class ExtendedSafeLoader( Reader, Scanner, Parser, Composer, ExtendedS...
# -*- coding: utf-8 -*- # # db_manager.py # # The module is part of pydavis. # """ Interacting with MySQL databases through the DatabaseManager. """ __author__ = 'Severin E. R. Langberg' __email__ = 'Langberg91@gmail.no' __status__ = 'Operational' import pymysql from pydavis import utils from datetime import datet...
import time import robin_stocks.robinhood as rh from pyotp import TOTP as otp from environ import Env env = Env() def robinhood_login(): totp = otp(env('RH_DEVICE_TOKEN')).now() rh.authentication.login( username=env('RH_USERNAME'), password=env('RH_PASSWORD'), mfa_code=totp ) ...
# Subject/Observer usage example. from ocempgui.events import Subject, IObserver # The subject that should notify observers about state changes. class MyObject (Subject): def __init__ (self): Subject.__init__ (self, "MyObject") self._x = "Simple Attribute" self._y = 1234567890 self....
""" Implement white-box attacks on top of IBM ART. @author: Ying Meng (y(dot)meng201011(at)gmail(dot)com) """ import numpy as np import torch # from art.attacks.evasion.fast_gradient import FastGradientMethod # from art.attacks.evasion.projected_gradient_descent import ProjectedGradientDescent from art.attacks.evasio...
import keras.backend as K from keras.losses import categorical_crossentropy def hard_dice_coef(y_true, y_pred, smooth=1e-3): y_true_f = K.flatten(K.round(y_true[..., 0])) y_pred_f = K.flatten(K.round(y_pred[..., 0])) intersection = K.sum(y_true_f * y_pred_f) return 100. * (2. * intersection + smooth) ...
"""Tests for the Samsung TV Integration.""" from unittest.mock import Mock, call, patch from homeassistant.components.media_player.const import DOMAIN, SUPPORT_TURN_ON from homeassistant.components.samsungtv.const import ( CONF_ON_ACTION, DOMAIN as SAMSUNGTV_DOMAIN, METHOD_WEBSOCKET, ) from homeassistant.c...
# -*- coding: utf-8 -*- u""" Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U. This file is part of Toolium. 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/lic...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** 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 from ... import _utilities, _tables __a...
############################################################################### # Copyright (c) 2013 INRIA # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation; # # This program is distr...
import sys try: from django.conf import settings settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", } }, ROOT_URLCONF="taggit_serializer.urls", INSTALLED_APPS=[ ...
class Translation(object): START_TEXT = """<b>Hai {}!!!</b> <code>Im Simple Telegraph Uploader Bot😜</code> <b>» You Must Join My Updates Channel for using me</b> <i>Click Help Button For More Details</i>""" HELP_TEXT = """<b>Hey {}!!!,Please Folow these Steps</b> ➥ <code>Send any Image, Gif or Video(Mp4 Only) ...
import unittest from libconda.toposort import toposort, pop_key class TopoSortTests(unittest.TestCase): def test_pop_key(self): key = pop_key({'a':{'b', 'c'}, 'b':{'c'}}) self.assertEqual(key, 'b') key = pop_key({'a':{'b'}, 'b':{'c', 'a'}}) self.assertEqual(key, 'a') key ...
# Copyright (c) 2015 # # All rights reserved. # # This file is distributed under the Clear BSD license. # The full text can be found in LICENSE in the root directory. from boardfarm.devices import prompt from boardfarm.tests import rootfs_boot class NetperfRFC2544(rootfs_boot.RootFSBootTest): '''Single test to s...
from pathlib import Path from typing import Dict, List, Tuple, Union import numpy as np import pandas as pd import xarray from neuralhydrology.datasetzoo.basedataset import BaseDataset from neuralhydrology.utils.config import Config class CamelsUS(BaseDataset): """Data set class for the CAMELS US data set by [#...
from typing import Optional from sqlalchemy.orm import Session from app.models.actor import Actor from app.schemas.actor import ActorCreate, ActorInDB from app.core.exceptions import exceptions class CRUDActor: def get_by_name(self, db: Session, name: str) -> Optional[Actor]: return db.query(Actor).filt...
from __future__ import annotations from cleo.exceptions import CleoSimpleException class PoetrySimpleConsoleException(CleoSimpleException): pass
import unittest import uuid import ground.client as client class TestClient(unittest.TestCase): @classmethod def setUpClass(cls): cls.client = client.GroundClient() def test_node(self): """ Tests most of the node access methods """ source_key = uuid.uuid4().hex ...
class FrugalCollection: id = None snapshots = None def __init__(self, collection_id): snapshots = {} self.id = collection_id def __str__(self): return "<Collection {0}>".format(self.id)
from matplotlib.dates import date2num, num2date from matplotlib.colors import ListedColormap from matplotlib import dates as mdates from matplotlib.patches import Patch from matplotlib import pyplot as plt from matplotlib import ticker import os def plot_fit(df_fit, df_data, y_label='Deaths', y_lim_up = 200, color='b...
class Take(object): def __init__(self, stage, unit, entity, not_found_proc, finished_proc): self._stage = stage self._unit = unit self._entity = entity self._finished_proc = finished_proc self._not_found_proc = not_found_proc def enact(self): if ...
from ..messenger import Messenger from . import pytest def test_send_message_should_fail(): messenger = Messenger() with pytest.raises(Exception) as exception_info: messenger.send("user", "message") assert "implemented" in str(exception_info) def test_mark_writing_on_should_do_nothing(): mes...
#!/usr/bin/env python2 # Copyright (c) 2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import socket import traceback, sys from binascii import hexlify import time, os from socks5 import Socks5Conf...
from rest_framework import status from rest_framework.response import Response from rest_framework.generics import GenericAPIView from ..permissions import IsAuthenticated from django.core.cache import cache from django.conf import settings from ..app_settings import ( CreateMembershipSerializer, UpdateMembers...
from .base import APIException class LimitActiveException(APIException): message = "LIMIT_ACTIVE" description = "number activation has already been completed" limit: int def __init__(self, response): self.limit = response['limit'] super(LimitActiveException, self).__init__(description...
"""Test illud.outputs.standard_output.""" import sys from typing import Any from unittest.mock import MagicMock, patch import pytest from illud.output import Output from illud.outputs.standard_output import StandardOutput def test_inheritance() -> None: """Test illud.outputs.standard_output.StandardOutput inher...
#Packages import os os.system("cls") lista=[] #Functions def llenar_lista(x): lista.append(x) #def validacion_lista(): # print("Validación :") #def mostrar_lista(): # print("Mostrar") #Main num=int(input("Ingrese No: ")) op=int(input("::::Desea Agregar un nuevo Número a la Lista : \n1. Si\n2. No : ")) if ...
import warnings import django from django.db import transaction from django.db.models import ManyToManyField from django.forms.models import model_to_dict from simple_history.exceptions import AlternativeManagerError, NotHistoricalModelError def update_change_reason(instance, reason): attrs = {} model = typ...
""" Arrows """ #***************************************************************************** # Copyright (C) 2006 Alex Clemesha <clemesha@gmail.com>, # William Stein <wstein@gmail.com>, # 2008 Mike Hansen <mhansen@gmail.com>, # 2009 Emily Kirkman #...
try: from typing import Dict, List, Optional, Tuple from integral_timber_joints.process import RobotClampAssemblyProcess except: pass import itertools from compas.data import Data from compas.geometry import Frame from compas.geometry.transformations.transformation import Transformation from compas.robot...
# Copyright 2009-2010 Yelp # # 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, softwa...
import datetime from .extensions import db Column = db.Column relationship = db.relationship class CRUDMixin(object): """Mixin that adds convenience methods for CRUD (create, read, update, delete) operations.""" @classmethod def create(cls, **kwargs): """Create a new record and save it the datab...
# coding: utf-8 # In[1]: import pandas as pd # for working with data in Python import numpy as np import matplotlib.pyplot as plt # for visualization from sklearn.model_selection import train_test_split from sklearn.metrics import mean_squared_error from sklearn import linear_model # use Pandas ...
#!/usr/bin/env python3 # Copyright (c) 2014-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test RPCs related to blockchainstate. Test the following RPCs: - getblockchaininfo - gettxouts...
LIST_OF_EXPERIMENTS_RESPONSE_JSON = { "data": [ { "dtCreated": "2019-03-21T07:47:05.616096+00:00", "dtDeleted": None, "dtFinished": None, "dtModified": "2019-03-21T07:47:05.616096+00:00", "dtProvisioningFinished": None, "dtProvisioningS...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** 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 from ... import _utilities, _tables __a...
from git_speed import __version__ def test_version(): assert __version__ == "1.1.1"
# Copyright 2017 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
""" Kevin and Stuart want to play the 'The Minion Game'. Game Rules: Both players are given the same string, S. Both players have to make substrings using the letters of the string S. Stuart has to make words starting with consonants. Kevin has to make words starting with vowels. The game ends when both players have m...
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from survae.transforms.bijections import Bijection class Conv1x1(Bijection): """ Invertible 1x1 Convolution [1]. The weight matrix is initialized as a random rotation matrix as described in Section 3.2 of [1]. A...