text
stringlengths
2
999k
from Variable import Variable from Rollback import Rollback
# Copyright 2018 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 recipe_engine import post_process from recipe_engine.config import List from recipe_engine.recipe_api import Property from RECIPE_MODULES.infra.support...
import numpy as np blockName = 'cinderblock' blockSize = np.array([15 + 5/8.0, 15 + 3/8.0, 5 + 5/8.0]) * 0.0254 # meters blockTiltAngle = 15 # degrees # F=sloping up forward (+x), B=sloping up backward (-x), # R=sloping up rightward (-y), L=sloping up leftward (+y) # last row is closest to robot (robot is on bottom ...
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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 applicab...
from setuptools import setup, find_packages version = '2.2.8' setup(name='metaflow', version=version, description='Metaflow: More Data Science, Less Engineering', author='Machine Learning Infrastructure Team at Netflix', author_email='help@metaflow.org', license='Apache License 2.0', ...
"""Test type selectors.""" from __future__ import unicode_literals from .. import util from soupsieve import SelectorSyntaxError class TestType(util.TestCase): """Test type selectors.""" MARKUP = """ <Tag id="1"> <tag id="2"></tag> <TAG id="3"></TAG> </Tag> """ def test_basic_type(se...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 5/15/20 4:49 PM # @File : grover.py # qubit number=4 # total number=13 import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np class Opty(cirq.PointOptimizer): def optimization_at( ...
{% import 'macros.jinja2' as utils %} {% import 'base.python.jinja2' as py %} {% set template = namespace(enum=false, sign=false, math=false, struct=false, time=false) %} {{ utils.pad_string('# ', utils.license(info.copyright.name, info.copyright.date, info.license.name)) -}} # # Auto-generated file for {{ info.title }...
""" Support for Google - Calendar Event Devices. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/google/ NOTE TO OTHER DEVELOPERS: IF YOU ADD MORE SCOPES TO THE OAUTH THAN JUST CALENDAR THEN USERS WILL NEED TO DELETE THEIR TOKEN_FILE. THEY WILL LOSE THEI...
""" Bloom Filter This is a variation of the Bloom Filter; this provides a fast and memory efficient way to tell if an item is in a list. https://en.wikipedia.org/wiki/Bloom_filter (C) 2021 Justin Joyce. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance wi...
##################### ### Dependencies ### ##################### from flask import Flask, request, render_template, redirect ################ ### Globals ### ################ app = Flask(__name__) # Constants DebugMode = "DEBUG" ReleaseMode = "RELEASE" admin_username = "admin" admin_password = "admin" staff_usernam...
from django.contrib import admin from adminsortable2.admin import SortableInlineAdminMixin from places.models import Place, Image class ImageInline(SortableInlineAdminMixin, admin.TabularInline): model = Image readonly_fields = ["image_preview"] fields = ("image_file", "image_preview", "image_order") ...
# coding = utf-8 # 从sklearn.datasets中导入20类新闻文本抓取器。 from sklearn.datasets import fetch_20newsgroups # 导入numpy,并且重命名为np。 import numpy as np # 使用新闻抓取器从互联网上下载所有数据,并且存储在变量news中。 news = fetch_20newsgroups(subset='all') # 从sklearn.cross_validation导入train_test_split用来分割数据。 from sklearn.cross_validation import train_test_spl...
""" Stain normalization based on the method of: M. Macenko et al., ‘A method for normalizing histology slides for quantitative analysis’, in 2009 IEEE International Symposium on Biomedical Imaging: From Nano to Macro, 2009, pp. 1107–1110. Uses the spams package: http://spams-devel.gforge.inria.fr/index.html Use wit...
# Generated by Django 3.1.3 on 2021-03-30 01:19 import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('genes', '0022_auto_20210225_1521'), ] operations = [ migrations.RenameField( model_name='geneco...
import sys import os, json import click import logging import re import wget import tarfile from threading import Thread from glob import glob from sqlalchemy import create_engine from sqlalchemy.exc import IntegrityError from bayleef import api from bayleef.utils import get_path from bayleef.sql import func_map LO...
# -*- coding: utf-8 -*- # @Time : 4/3/2022 6:28 PM # @Author : Lazurite # @Email : lazurite@tom.com # @File : h5_create.py # @Software: PyCharm import os import tqdm import h5py import numpy as np h5_paths = ["../data/nuscenes/v1.0-trainval/samples.h5", "../data/nuscenes/v1.0-trainval/sweeps.h5"] ...
from pathlib import Path import click import numpy as np from knapsack_solver.knapsack_problem import KnapsackProblem from knapsack_solver.plots_util import save_plots from knapsack_solver.weight import Weight @click.command() @click.argument("output-directory", type=click.Path(file_okay=False)) @click.option("--me...
from neuron import h, nrn, nrn_dll_sym from . import species, node, section1d, region from .nodelist import NodeList import weakref import numpy import ctypes import atexit from . import options from .rxdException import RxDException from . import initializer import collections import os from distutils import sysconf...
from itertools import zip_longest import os import warnings import pytest np = pytest.importorskip("numpy") import itertools import dask.array as da from dask.array.utils import assert_eq as _assert_eq, same_keys from dask.core import get_deps import dask.config as config def assert_eq(a, b): _assert_eq(a, b,...
from uuid import uuid4 from google.api_core.exceptions import InvalidArgument from pytalentsolution import ( CustomAttributes, EmploymentType, Job, JobQuery, ...
from Common.utils import * import sublime import sublime_plugin class LoadAllSnowRecordCommand(sublime_plugin.WindowCommand): this_dirs = [] def run(self, dirs): self.this_dirs = dirs self.window.show_input_panel("Enter an encoded query (or leave blank):", "", self.get_records, None, None) ...
import re from core.cli_helpers import CLIHelper from core.plugins.system import SystemChecksBase YAML_PRIORITY = 0 class SystemGeneral(SystemChecksBase): def get_system_info(self): self._output["hostname"] = self.hostname if self.os_release_name: self._output["os"] = self.os_releas...
"""TabsExtra lib."""
""" GPS Training GUI The GPS Training GUI is used to interact with the GPS algorithm during training. It contains the below seven functionalities: Action Panel contains buttons for stop, reset, go, fail Action Status Textbox displays action status Algorithm Status Textbox displays algorithm st...
# -*- coding: utf-8 -*- """ Local settings - Run in Debug mode - Use console backend for emails - Add Django Debug Toolbar - Add django-extensions as app """ from .common import * # noqa # DEBUG # ------------------------------------------------------------------------------ DEBUG = env.bool('DJANGO_DEBUG', default...
from flask import ( Blueprint, flash, g, redirect, render_template, request, url_for ) import json from sneratio.src.adapter import Methods import io import base64 bp = Blueprint('', __name__) Methods.initialise_options() @bp.route('/', methods=('GET', 'POST')) def main(): fig = Methods.get_empty_plot() ...
import os import unittest from pyramid.config import Configurator from kinto.core.testing import get_user_headers from kinto.events import ServerFlushed from .support import (BaseWebTest, MINIMALIST_BUCKET, MINIMALIST_COLLECTION, MINIMALIST_RECORD) class FlushViewTest(Ba...
from setuptools import setup setup( name = 'buildtools', packages = [ 'buildtools', ], )
#!/usr/bin/python # # Copyright 2016 Google 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 b...
# Driver for official MicroPython LCD160CR display # MIT license; Copyright (c) 2017 Damien P. George from micropython import const from utime import sleep_ms from ustruct import calcsize, pack_into import uerrno, machine # for set_orient PORTRAIT = const(0) LANDSCAPE = const(1) PORTRAIT_UPSIDEDOWN = const(2) LANDSCA...
from sqlalchemy import Column, create_engine, DateTime, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import scoped_session, sessionmaker Base = declarative_base() class Pet(Base): __tablename__ = "pets" id = Column(String(20), primary_key=True) name = Column(String(1...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
import json import os from typing import cast import openai from openai import api_requestor, util from openai.api_resources.abstract import DeletableAPIResource, ListableAPIResource class File(ListableAPIResource, DeletableAPIResource): OBJECT_NAME = "file" @classmethod def create( cls, ...
from datetime import date from decimal import Decimal from functools import partial from django.conf import settings from django.db import models from django.db.models import F, Q from django.utils.encoding import smart_text from django.utils.translation import pgettext, pgettext_lazy from django_countries import coun...
import pymongo import pandas as pd #连接到数据库 #连接到数据库 client = pymongo.MongoClient("localhost",27017) lianjia = client["ershoufang"] info = lianjia["lianjia_solded"] location = lianjia['locations'] new_info = lianjia['cd_lianjia_solded_total_2'] #将数据表1(包含原始10w+房源信息)转化为DataFrame data1 = pd.DataFrame(list(info...
import click import os import pandas as pd from assembly_predictor.digraph import deBruijnGraph from assembly_predictor.utils import read_fasta, reads_generator, write_fastq, read_fastq, write_fasta from assembly_predictor.startup import CACHE_PATH from assembly_predictor.contig import Contig from assembly_predictor.a...
#!/usr/bin/python # # Copyright 2013 Greg Neagle # # 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...
#!/usr/bin/env python3 # Copyright (c) 2017-2018 The Cerebralcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test HD Wallet keypool restore function. Two nodes. Node1 is under test. Node0 is providing trans...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from numpy.testing import assert_allclose from astropy.tests.helper import pytest from ..cutouts import cutout_footprint XCS...
#Final Project for CS 5001 #Brian Meyer #Shujun Xiao #Xiaoliang Xu import Adafruit_DHT as DHT import json import time import psutil import twilio from twilio.rest import Client import matplotlib.pyplot as plt import csv from matplotlib import rcParams import http.client import urllib # Turn on the interactive mode pl...
""" Django settings for app project. Generated by 'django-admin startproject' using Django 4.0.2. For more information on this file, see https://docs.djangoproject.com/en/4.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/4.0/ref/settings/ """ from pathlib imp...
"""This is the Solution for Year 2020 Day 04""" import re from aoc.abstracts.solver import Answers, StrLines Passport = dict[str, str] def parse_passport(passport: str) -> Passport: """Convert passport string into dictionary""" items = [item.split(":") for item in passport.split() if ":" in item] retur...
import numpy as np from collections import Iterable from .form.utils import docval, popargs, call_docval_func from . import register_class, CORE_NAMESPACE from .base import TimeSeries, _default_resolution, _default_conversion @register_class('ImageSeries', CORE_NAMESPACE) class ImageSeries(TimeSeries): ''' ...
# from django.utils.datetime_safe import datetime # from rest_framework.serializers import ValidationError # from .base_test_case import BaseTestCase # from ..models.model_year_report import ModelYearReport # from ..models.supplemental_report import SupplementalReport # from ..models.model_year_report_statuses import ...
# -*- codeing = utf-8 -*- # @Time : 2022/4/2 15:25 # @Author : linyaxuan # @File : qny.py # @Software : PyCharm from qiniu import Auth # AK,SK access_key = 'ZxuCr1dxnenWx0-gGIBZcxOMcjytXtZISwgix36L' secret_key = 'SJl9JmW7zB0j1xHlDPmyjTwJf5E7ksoQicqIDQT8' # 构建鉴权对象 def qn_token(): q = Auth(access_key, secret_key) ...
""" some useful defs for bayes programs """ import numpy as np #------- # globals CREDIBLE_MIN = 2.5 # lower percentile for credible interval CREDIBLE_MAX = 97.5 # upper percentile for credible interval # covers 95% #CREDIBLE_MIN = 5. # lower percentile for credible interval #CREDIBLE_MAX = 95. # upper percentile for c...
def distance(): pass
from rdkit import Chem import numpy as np from pysmiles import read_smiles import networkx as nx from molecule import Molecule import pickle import pandas as pd class RegressionData(): """ :param mols: list of nx.Graph molecules describing respective SMILES string :param labels: list of labels where...
# -*- coding: utf-8 -*- # __ # /__) _ _ _ _ _/ _ # / ( (- (/ (/ (- _) / _) # / """ Requests HTTP library ~~~~~~~~~~~~~~~~~~~~~ Requests is an HTTP library, written in Python, for human beings. Basic GET usage: >>> import requests >>> r = requests.get('https://www.python.org') >>> ...
import pytest from pytest_lazyfixture import lazy_fixture # All fixtures must be visible for lazy_fixture() call. from .octahedral import * # noqa from .paddlewheel import * # noqa from .porphyrin import * # noqa from .square_planar import * # noqa @pytest.fixture( params=( lazy_fixture('metal_comple...
"""Unconventional rounding of number.""" def round_odd(x): """Round X to nearest odd integer.""" return int(x + 1 - x % 2)
# Generated by Django 4.0.1 on 2022-03-17 15:23 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Steps', fields=[ ('id', models.IntegerField...
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-10-18 10:03 from __future__ import unicode_literals import shoptools.abstractions.models import shoptools.util import datetime from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrat...
# qubit number=4 # total number=41 import pyquil from pyquil.api import local_forest_runtime, QVMConnection from pyquil import Program, get_qc from pyquil.gates import * import numpy as np conn = QVMConnection() def make_circuit()-> Program: prog = Program() # circuit begin prog += CNOT(0,3) # number=13 ...
# Load Balancer Stuff import time from enum import Enum import requests from pymemcache.client import base client = base.Client(('0.0.0.0', 11211)) client.set('num_requests', 0) # Declare Load Balancer Strategies class STRATEGIES(Enum): ROUND_ROBBIN = 0, LEAST_CONNECTIONS = 1, STICKY_SESSIONS = 2 # E...
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # # License: BSD (3-clause) from time import time from copy import deepcopy import re import numpy as np from scipy import linalg, sparse import shu...
# SPDX-License-Identifier: 0BSD # Copyright 2019 Alexander Kozhevnikov <mentalisttraceur@gmail.com> """``weakref`` for threads. Allows threads in Python to create "weak references" to themselves that detect when the thread is no longer running, similar to how a weak reference detects when its referent object is no lo...
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from builtins import object import sys import os import logging import coloredlogs from avatar.util....
#!/usr/bin/env python # coding: utf-8 # # LOGISTIC REGRESSION WITH CUSTOM DATA # In[1]: import os import numpy as np import tensorflow as tf import matplotlib.pyplot as plt print ("Packages loaded") # # Load data # In[2]: # Load them! cwd = os.getcwd() loadpath = cwd + "/data/custom_data.npz" l = np.load(loadp...
from .experiments import ExperimentValidator from .library import LibraryValidator from .runtime import RuntimeValidator
""" Custom Abstract Base Classes to implement Restrictions. Developed for DataObject concept. :date_created: 2018-12-05 """ from builtins import object from .constants import ConstABCR from .messages import SystemMessages from .utils import already_declared, compare_cls from ..utils import classproperty class ABCRe...
from django.contrib import admin # Register your models here. from .models import Nav_cards admin.site.register(Nav_cards)
import csv import time import math import numpy as np import warnings from rdkit import Chem, DataStructs from rdkit.Chem import QED from sklearn.model_selection import KFold, StratifiedKFold import torch import torch.nn as nn from torch.optim.lr_scheduler import ExponentialLR, StepLR import torch.nn.functional as F ...
# encoding: utf-8 import datetime __all__ = [ 'info', ] def info(): return { 'birthday': datetime.date(1993, 8, 13), 'class': 4, 'family_name_en': u'naruse', 'family_name_kana': u'なるせ', 'first_name_en': u'risa', 'first_name_kana': u'...
import json import base64 import requests import threading from uuid import UUID from os import urandom from time import timezone, sleep from typing import BinaryIO from binascii import hexlify from time import time as timestamp from locale import getdefaultlocale as locale from .lib.util import exceptions, headers, ...
import asyncio import pyppeteer import random import time import string import requests import logging from threading import Thread # Import Detection From Stealth from .stealth import stealth from .get_acrawler import get_acrawler async_support = False def set_async(): global async_support async_support = T...
import torch import torch.nn as nn from torch.autograd import Variable class RNN(nn.Module): def __init__(self, input_size, hidden_size, output_size, all_categories, n_categories, all_letters, n_letters): super(RNN, self).__init__() self.hidden_size = hidden_size self.all_categories = all...
# # Copyright The NOMAD Authors. # # This file is part of NOMAD. # See https://nomad-lab.eu for further info. # # 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...
import torch, copy, random import torch.utils.data as data class SearchDataset(data.Dataset): def __init__(self, name, data, train_split, valid_split, check=True): self.datasetname = name self.data = data self.train_split = train_split.copy() self.valid_split = valid_split.copy() if chec...
import numpy as np from math import * import pymultinest import sys sys.path.insert(0, '/home/kochenma/pysb') from pysb.integrate import Solver import csv import datetime import time as tm from model_599 import model from pysb.pathfinder import set_path set_path('bng', '/home/kochenma/BioNetGen') data_object = [] wi...
""" Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: MIT-0 """ import re import sys import logging from copy import deepcopy import six LOGGER = logging.getLogger(__name__) class TemplateAttributeError(AttributeError): """ Custom error to capture Attribute Errors in the...
from __future__ import print_function import glob import os import datetime import argparse import json import csv import re def read_file(filename): if not os.path.isfile(filename): print("File not found {}".format(filename)) return "" try: with open(filename, 'r') as f: ...
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-12-15 17:37 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('experiments', '0082_auto_20171213_0904'), ] operat...
# Tests invocation of the interpreter with various command line arguments # Most tests are executed with environment variables ignored # See test_cmd_line_script.py for testing of script execution import os import subprocess import sys import sysconfig import tempfile import unittest from test import support from test...
from tests import ScraperTest from recipe_scrapers.thenutritiouskitchen import TheNutritiousKitchen class TestTheNutritiousKitchenScraper(ScraperTest): scraper_class = TheNutritiousKitchen def test_host(self): self.assertEqual("thenutritiouskitchen.co", self.harvester_class.host()) def test_au...
# Copyright 2019 The FastEstimator Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
import re import csv from collections import OrderedDict import numpy as np from prune_rules import contains_empty_col, add_empty_col import datetime WRAP_1 = True WRAP_2 = True WRAP_3 = True PRUNE_1 = True delimiters = "[]()-_,!@#$%^&*{}|/;:+`~=' " + '"' + "\\" + "\n" def f_join_char(table, p1, c): if p1 > len...
import demistomock as demisto def test_main(mocker): from IsRFC1918Address import main mocker.patch.object(demisto, 'args', return_value={'value': '172.16.0.1'}) mocker.patch.object(demisto, 'results') main() assert demisto.results.call_count == 1 results = demisto.results.call_args asser...
""" test calculations """ from nose.tools import ok_, eq_ from carousel.core.calculations import Calc, CalcParameter from carousel.core.calculators import Calculator from carousel.tests import PROJ_PATH, sandia_performance_model import os import uncertainties from pvlib.solarposition import get_solarposition as solpos...
"""Algorithms for integration lecture.""" import chaospy as cp import numpy as np def quadrature_newton_trapezoid_one(f, a, b, n): """Return quadrature newton trapezoid example.""" xvals = np.linspace(a, b, n + 1) fvals = np.tile(np.nan, n + 1) h = xvals[1] - xvals[0] weights = np.tile(h, n + 1) ...
# -*- coding: utf-8 -*- # Copyright 2018 The Blueoil Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unles...
def summarizing(sentences, similarity_scores, n_summary_sentences): """ Given similarity scores of clean_sentences with original_query, the function extracts the clean_sentences with the top n scores as the summary. """ sorted_sentences = {} j = -1 orders = similarity_scores sort_orders = s...
# -*- coding: utf-8 - """ 自定义的MySQL 的Column,为了支持MySQL不支持的复杂类型 Reference: https://yiyibooks.cn/wizard/sqlalchemy_11/orm_extensions_mutable.html """ from __future__ import unicode_literals from sqlalchemy.types import TypeDecorator, VARCHAR from sqlalchemy.ext.mutable import Mutable import json class JSONEncodedDict(...
import base64 import json import logging import pathlib import re import sys import uuid import streamlit as st import yaml from obsei.configuration import ObseiConfiguration logger = logging.getLogger(__name__) logging.basicConfig(stream=sys.stdout, level=logging.INFO) def img_to_bytes(img_path): img_bytes = ...
#!/usr/bin/env python # Copyright 2012 Google Inc. All Rights Reserved. """Classes to perform filtering of objects based on their data members. Given a list of objects and a textual filter expression, these classes allow you to determine which objects match the filter. The system has two main pieces: A parser for the ...
# 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, Dict, List, Mapping, Optional, Tuple, Union from .. import ...
from exchangelib import Message, Mailbox, CalendarItem from exchangelib.extended_properties import ExtendedProperty from exchangelib.folders import Inbox from .common import get_random_int from .test_items.test_basics import BaseItemTest class ExtendedPropertyTest(BaseItemTest): TEST_FOLDER = 'inbox' FOLDER_...
from . import features from . import segmentation from . import filter
import logging from iptv_proxy.providers.iptv_provider.validations import ProviderValidations from iptv_proxy.providers.king.constants import KingConstants logger = logging.getLogger(__name__) class KingValidations(ProviderValidations): __slots__ = [] _provider_name = KingConstants.PROVIDER_NAME.lower()
import torch import time import sys import os import math import random from termcolor import colored from .distributions import Empirical from . import util, state, TraceMode, PriorInflation, InferenceEngine, InferenceNetwork, ImportanceWeighting, Optimizer, LearningRateScheduler, AddressDictionary from .nn import In...
# Copyright 2018 3YOURMIND GmbH # 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, soft...
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('adoffice', '0009_auto_20150714_0825'), ] operations = [ migrations.CreateModel( name='Quota', fields...
""" File: complement.py Name: Andrew Chao ---------------------------- This program uses string manipulation to tackle a real world problem - finding the complement strand of a DNA sequence. THe program asks uses for a DNA sequence as a python string that is case-insensitive. Your job is to output the complement of it...
# chat/consumers.py import json from asgiref.sync import async_to_sync from channels.generic.websocket import WebsocketConsumer from .models import * from django.contrib.auth.models import User class ChatConsumer(WebsocketConsumer): def fetch_messages(self, data): messages = self.last_50_messages(data) ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Pull down the MPU6050 datasheet from Invensys and extract the register contents """ DS_url='https://www.invensense.com/wp-content/uploads/2015/02/MPU-6000-Register-Map1.pdf' import logging logging.basicConfig( level = logging.ERROR ) log = logging.getLogger(__na...
#!/usr/bin/env python import sys import pytest if __name__ == "__main__": # show output results from every test function args = ["-v"] # show the message output for skipped and expected failure tests if len(sys.argv) > 1: args.extend(sys.argv[1:]) print("pytest arguments: {}".format(args))...
# -*- coding: utf-8 -*- # Copyright 2015 Mirantis, 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 requi...
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 7 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class StatisticsKeyPolicy(object...