text
stringlengths
1
927k
# -*- coding: utf-8 -*- # Copyright 2014-2016 OpenMarket Ltd # Copyright 2017-2018 New Vector Ltd # Copyright 2019 The Matrix.org Foundation C.I.C. # # 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 Licens...
# # Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. # # 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 Software Foundation; version 2 of the License. # # This program is distributed in the hope...
"""RemoteJIT client/server config functions """ __all__ = ['RemoteJIT', 'Signature', 'Caller'] import os import inspect import warnings import ctypes from contextlib import nullcontext from . import irtools from .typesystem import Type, get_signature from .thrift import Server, Dispatcher, dispatchermethod, Data, Cli...
import onnx from onnx import helper from onnx import TensorProto graph = helper.make_graph( [ # nodes helper.make_node("Add", ["A", "B"], ["C"], "Add"), ], "SingleAdd", # name [ # inputs helper.make_tensor_value_info('A', TensorProto.FLOAT, [1]), helper.make_tensor_value_info...
from ploomber.sources.sources import (SQLScriptSource, SQLQuerySource, GenericSource, FileSource, EmptySource) from ploomber.sources.notebooksource import NotebookSource from ploomber.sources.pythoncallablesource import PythonCallableSource __all__ = [ 'PythonCallableSource', ...
# 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 may ...
# coding=utf-8 import os import pickle import requests from .errors import CloudFuncError class CloudFuncClient: def __init__(self, serve_address: str = None): if serve_address is None: serve_address = os.environ['CLOUDFUNC_SERVE_ADDRESS'] assert serve_address is not None, 'cloudfun...
import unittest from katas.beta.shorten_ipv6_address import shorten class ShortenIPv6TestCase(unittest.TestCase): def test_equal_1(self): self.assertEqual(shorten('2642:0006:0006:0000:0000:0000:0000:9147'), '2642:6:6::9147') def test_equal_2(self): self.assertEqual(s...
# Copyright (C) 2018 The Electrum developers # Distributed under the MIT software license, see the accompanying # file LICENCE or http://www.opensource.org/licenses/mit-license.php import asyncio import os from decimal import Decimal import random import time from typing import (Optional, Sequence, Tuple, List, Set, D...
def valid_pubsub(config): if (config.get("topic_id") is not None and config.get("project_id") is not None and config.get("subscription_id") is not None): return True return False def valid_kafka(config): if config.get("bootstrap_server") is not None and config.get("port") is not None: ...
# Lint as: python3 # Copyright 2019 Google LLC. 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 a...
# Copyright 2018 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, s...
import sys import typing from . import data_path
# -*- coding: utf-8 -*- import mock import pytest from bravado_core.model import _run_post_processing from bravado_core.model import model_discovery from bravado_core.spec import Spec @pytest.fixture def wrap__run_post_processing(): with mock.patch( 'bravado_core.model._run_post_processing', wrap...
""" Just for Python 3 """ import logging import pprint import tornado.web import tornado.httpserver from tornado.options import define, options, parse_command_line from sqlalchemy import create_engine, Column, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.ext import baked fro...
# Copyright 2019 PerfKitBenchmarker 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 appli...
import numpy as np import random import torch import torch.nn as nn from torch import optim class Encoder(nn.Module): def __init__(self, input_size, hidden_size, num_layers = 1): super(Encoder, self).__init__() self.input_size = input_size self.hidden_size = hidden_size self.num_l...
""" Dependency management for tools. """ import os.path import logging log = logging.getLogger( __name__ ) from .resolvers import INDETERMINATE_DEPENDENCY from .resolvers.galaxy_packages import GalaxyPackageDependencyResolver from .resolvers.tool_shed_packages import ToolShedPackageDependencyResolver from galaxy.uti...
# # Copyright 2019 The FATE 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 appli...
from flask import Blueprint api = Blueprint('api', __name__) from . import authentication, comments, errors, posts, users
#!/usr/bin/env python # coding: utf-8 from __future__ import absolute_import, unicode_literals import collections import contextlib import copy import datetime import errno import fileinput import io import itertools import json import locale import operator import os import platform import re import shutil import su...
# -*- coding: utf-8 -*- # # Copyright (C) 2018-2020 CERN. # # invenio-app-ils is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Invenio App ILS Circulation APIs.""" import uuid from copy import copy, deepcopy from datetime import dat...
import pytest from testplan.common.utils.testing import check_report from testplan.report import TestReport, TestGroupReport, TestCaseReport from testplan.testing.multitest import MultiTest, testsuite, testcase @testsuite(tags={"color": ["red", "blue"]}) class AlphaSuite(object): @testcase def test_method_0...
#!/usr/bin/env python3 # Copyright (c) 2014-2019 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 mining RPCs - getmininginfo - getblocktemplate proposal mode - submitblock""" import copy from d...
# -*- coding: utf-8 -*- """ twikoto3 - Twitter Client Copyright (C) 2012 azyobuzin 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 Software Foundation, either version 3 of the License, or (at you...
# Write a function called "show_excitement" where the string # "I am super excited for this course!" is returned exactly # 5 times, where each sentence is separated by a single space. # Return the string with "return". # You can only have the string once in your code. # Don't just copy/paste it 5 times into a single va...
import numpy as np #from concern.config import State from .data_process import DataProcess class MakeCenterPoints(DataProcess): box_key = 'charboxes' size = 32 def process(self, data): shape = data['image'].shape[:2] points = np.zeros((self.size, 2), dtype=np.float32) boxes = np....
from re import search from setuptools import setup, find_packages with open("src/graphql/version.py") as version_file: version = search('version = "(.*)"', version_file.read()).group(1) with open("README.md") as readme_file: readme = readme_file.read() setup( name="graphql-core", version=version, ...
import numpy import librosa import glob import os import shutil full_clips = glob.glob("Full_Clips/*.mp3") print("Number of full clips: " + str(len(full_clips))) for clip in full_clips: clip_name = clip[11:] print("Current clip: " + clip_name) signal, fs = librosa.load(clip) signal_abs = numpy.absolut...
import pytest from pytest import ( raises, ) from vyper import ( compiler, ) from vyper.exceptions import ( ParserException, StructureException, ) fail_list = [ """ @public def foo() -> uint256: doesnotexist(2, uint256) return convert(2, uint256) """, """ @public def foo() -> uint2...
from django.shortcuts import render from django.http import * # Create your views here. def test_view(request,name): data = "Hi, Welcome {}, this is first view in AWS....".format(name) return HttpResponse(data)
# # coding: utf-8 # Copyright (c) 2019 DATADVANCE # # 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,...
import os import sys import math import random import numpy as np from copy import deepcopy sys.path.append(os.path.join(os.environ["HOME"], "AlphaTTT")) from environment import Environment from alphazero.database import prepare_state np.random.seed(80085) random.seed(80085) def PUCT_score(child_value, child_prior...
import wikinet print('hello world') print(wikinet.GraphContainer())
from flask import request from flask_restful import Resource from models.category import CategoryModel from schemas.category import CategorySchema category_schema = CategorySchema() category_list_schema = CategorySchema(many=True) class Category(Resource): @classmethod def get(cls, name: str): cate...
""" Upload S3 Driver """ from masonite.contracts import UploadContract from masonite.drivers import BaseUploadDriver from masonite.exceptions import DriverLibraryNotFound from masonite.managers import UploadManager from masonite.app import App class UploadS3Driver(BaseUploadDriver, UploadContract): """ Amazo...
import os import sys import ctypes import platform import os import numpy as np from random import gauss import win32com.client as com def get_acceleration(lead_veh_acceleration,lead_veh_id,lead_veh_rel_velocity,lead_veh_type,timestep, veh_id,veh_setspeed,veh_type,veh_used_distance_headway,veh_used...
# Copyright (c) Facebook, Inc. and its affiliates. import argparse import os import sys import pickle import numpy as np import torch from torch.multiprocessing import set_start_method from torch.utils.data import DataLoader, DistributedSampler # 3DETR codebase specific imports from datasets import build_dataset fro...
"""LDAP Source""" from dataclasses import dataclass from typing import Any, Dict, Iterable, List, Optional import ldap from ldap.controls import SimplePagedResultsControl from datahub.configuration.common import ConfigModel, ConfigurationError from datahub.ingestion.api.common import PipelineContext from datahub.inge...
# Copyright 2018, Kay Hayen, mailto:kay.hayen@gmail.com # # Python test originally created or extracted from other peoples work. The # parts from me are licensed as below. It is at least Free Software where # it's copied from other people. In these cases, that will normally be # indicated. # # L...
from unittest import TestCase from followthemoney import model from followthemoney.types import registry from followthemoney.graph import Graph, Node ENTITY = { "id": "ralph", "schema": "Person", "properties": { "name": ["Ralph Tester"], "birthDate": ["1972-05-01"], "idNumber": ["...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import os import json import numpy as np import xija mdl = xija.ThermalModel(start='2010:001', stop='2010:004') tephin = mdl.add(xija.Node, 'tephin') tcylaft6 = mdl.add(xija.Node, 'tcylaft6', predict=False) coup_tephin_tcylaft6 = mdl.add(xija.Coupling, t...
from django.utils.crypto import get_random_string from django.urls import reverse from django.utils import timezone from rest_framework.test import APITestCase from oauth2_provider.models import AccessToken from oauth2_provider.models import Application from nalkinscloud_mosquitto.models import Device, DeviceType, De...
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-01-28 15:36 from django.db import migrations, models import django.db.models.deletion import labour.models.signup_extras class Migration(migrations.Migration): initial = True dependencies = [ ('core', '0029_auto_20170827_1818'), ] ...
from rest_framework import serializers # from django.contrib.auth.models import User from .models import User class UserSerializer(serializers.ModelSerializer): class Meta: model = User fields = ('username',)
import numpy as np from matplotlib.collections import PolyCollection, TriMesh from matplotlib.colors import Normalize from matplotlib.tri.triangulation import Triangulation def tripcolor(ax, *args, alpha=1.0, norm=None, cmap=None, vmin=None, vmax=None, shading='flat', facecolors=None, **kwargs): ""...
#! python3 # value_propagation_test.py - Test the VALUE Propagation behavior from behave import * from hamcrest import * import numpy @when('get VALUE from parent after UTIL propagation') def step_impl(context): set_up(context) context.dpop_to_test.util_manager.JOIN = context.util_matrix @then('should sel...
# Copyright 2012 SINA 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 copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
#!/usr/bin/python3 #!python3 #encoding:utf-8 import sys import os.path import subprocess import configparser import argparse import web.service.github.api.v3.AuthenticationsCreator import web.service.github.api.v3.AuthenticationData #import web.service.github.api.v3.CurrentUser import web.service.github.api.v3.CurrentR...
############################################################################## ## # This file is part of Sardana ## # http://www.sardana-controls.org/ ## # Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain ## # Sardana is free software: you can redistribute it and/or modify # it under the terms of the GNU Less...
import asyncio import aiosnmp async def handler(host: str, port: int, message: aiosnmp.SnmpV2TrapMessage) -> None: print(f"got packet from {host}:{port}") for d in message.data.varbinds: print(f"oid: {d.oid}, value: {d.value}") async def main(): p = aiosnmp.SnmpV2TrapServer( host="127.0...
""" @brief test log(time=13s) """ import unittest from pyquickhelper.pycode import ExtTestCase from manydataapi.plotting import plot_aggregated_ts, daily_timeseries class TestDummm(ExtTestCase): def test_agg_raise(self): df = daily_timeseries() from matplotlib import pyplot as plt _...
import unittest from ease4lmp import ( BondedAtoms, LammpsWriter, create_atoms_from_data, create_atoms_from_molecule) from ase.build import bulk, molecule import numpy as np import os import itertools def write_files(atoms): writer = LammpsWriter(atoms, atom_style="molecular") writer.set_atom_data(mol=[0...
# Generated by Django 3.2.5 on 2021-08-25 04:03 from django.db import migrations class Migration(migrations.Migration): initial = True dependencies = [ ('post', '0005_alter_post_options'), ] operations = [ migrations.CreateModel( name='PostRank', fields=[ ...
""" Martin Kersner, m.kersner@gmail.com seoulai.com 2018 Adapted by Gabriela B. to work with python 2.7 and ROS """ import random import numpy as np from base import Constants from rules import Rules class BoardEncoding(object): def __init__(self): self._constants = Constants() self._encoding ...
# -*- coding: utf-8 -*- """ Created on Mar 14, 2012 @author: moloch Copyright 2012 Root the Box 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/licen...
import smbl import snakemake import os from ._program import * PICARD = get_bin_file_path("picard.jar") ########################################## ########################################## class Picard(Program): @classmethod def get_installation_files(cls): return [ PICARD, ] @classmethod def insta...
# -*- coding: utf-8 -*- import os import pytest from ckan.cli.cli import ckan from configparser import ConfigParser, NoOptionError @pytest.fixture def config_file(tmp_path): dest = tmp_path / u'config.ini' tpl = os.path.join( os.path.dirname(__file__), u'templates/config_tool.ini.tpl') wi...
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import os import pstats import shutil import signal import sys import unittest import uui...
#Nilo soluction class Estado: def __init__(self, nome, sigla): self.nome = nome self.sigla = sigla self.cidades = [] def adiciona_cidades(self, cidade): cidade.estado = self self.cidades.append(cidade) def populacao(self): return sum([c.populacao for c in s...
#!/usr/bin/env python # # Copyright 2016 Cisco Systems, 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 applicab...
#Import Libraries #Web Scraping tools from bs4 import BeautifulSoup as bs from selenium import webdriver #from splinter import Browser #DataFrame tools import pandas as pd #Misc tools for web scraping import time import requests #Function to initianilze browser. def init_browser(): #Settings for headless mode....
# coding: utf-8 """ Machine fault diagnosis List of top level server APIs # noqa: E501 OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import swagger_client from api.model_flow_chart_node_...
from ai.api import main if __name__ == "__main__": main()
somme = 0 n = 5 # valeur quelconque i = 1 while i <= n: somme = somme + i i = i + 1 print("La somme des", n, "premiers entiers est :", somme)
# Copyright 2015 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, s...
from string import Template from dominate.tags import script, link, style from dominate.util import raw import json REQUIRED = [ script( src="https://unpkg.com/axios@0.19.0/dist/axios.min.js", crossorigin="anonymous" ), script( src="https://code.jquery.com/jquery-3.3.1.slim.min.js", ...
from lbrynet.core.Strategy import get_default_strategy, OnlyFreeStrategy from lbrynet import conf from decimal import Decimal class BasePaymentRateManager(object): def __init__(self, rate=None, info_rate=None): self.min_blob_data_payment_rate = rate if rate is not None else conf.settings['data_rate'] ...
""" Extract the reference case (``cea/examples/reference-case-open.zip``). """ from __future__ import division import os import zipfile import cea.examples import cea.config import cea.inputlocator # list the sections in the configuration file that are used by this script # this value is used to generate the help men...
import torch class BasicModel(torch.nn.Module): """ This is a basic backbone for SSD. The feature extractor outputs a list of 6 feature maps, with the sizes: [shape(-1, output_channels[0], 38, 38), shape(-1, output_channels[1], 19, 19), shape(-1, output_channels[2], 10, 10), shape(-1, o...
''' pass_argmax_dim01.py Copyright (c) Seoul National University Licensed under the MIT license. Author: Woo Sung Song torch.Tensor.argmax with dim parameter. ! This is not available since maximum stack size exceeding error has been occured ''' import torch import torch.nn as nn import torch.nn.functional as F a = t...
import asyncio import datetime import logging import secrets from main import game class GameError(Exception): pass class ForbiddenMoveError(GameError): pass class MoveIsNotPossible(GameError): pass class Game: def __init__(self): self._game = game self._is_started = False ...
# -*- coding: utf-8 -*- """ Created on Mon Mar 22 22:43:22 2021 @author: jgharris """ # -*- coding: utf-8 -*- """ Created on Mon Mar 22 21:09:34 2021 @author: jgharris """ root='C:/Users/jgharris/DocClass/' dataFile='/data/shuffled-full-set-hashed.csv' import statistics as stat import pandas as pd from sklear...
#clothes by weather import random def pickTop(clothesList): return random.choice(clothesList[0]) def pickBottoms(clothesList): return random.choice(clothesList[1]) #sorts clothes into weather type and returns a list of clothes of the correct weather def sortWeather(clothesList, weather): #eventually com...
import sys import os def start_tojas(): os.system("cd tojas && python3 tojas.py -nb && cd ..") def start_tojas_gui(): os.system("python3 lib/tojas_gui.py -nb") def start_scanizen(): os.system("cd scanizen && python3 scanizen.py -nb && cd ..") def start_doser(): os.system("cd doser && python3 doser.py -nb...
# Surrounded Regions # Total Accepted: 7716 Total Submissions: 56446 My Submissions # # Given a 2D board containing 'X' and 'O', capture all regions surrounded by # 'X'. A region is captured by flipping all 'O's into 'X's in that surrounded # region. # # For example, # X X X X # X O O X # X X O X # X O X X # # After ru...
from math import sqrt from random import randrange arr1 = [i for i in range(1, 11)] arr2 = [i for i in range(1, 11)] arr3 = [randrange(i) for i in range(1, 11)] arr4 = [randrange(i) for i in range(1, 11)] def avg(data): return sum(data) / len(data) def std(data): mu = avg(data) std = (sum([(i - mu)**2 f...
''' this script queries the gdc legacy archive via the search and retrieve api and returns msi_status object (from files endpoint on legacy) -- get uuids of xml files with the msi annotations from legacy server -- download each xml file -- parse xml files to extract msi annotations for each subject script should be ca...
import json, sys, re, urllib, urllib2, socket, json, pydoc, cgi, os, time, inspect from hashlib import md5 from datetime import datetime import time import csv from scraper import Scraper from flask import Flask from flask import Response from flask import request from flask import jsonify from flask import current_ap...
from flask_wtf import FlaskForm, RecaptchaField from wtforms import BooleanField, TextAreaField from wtforms import PasswordField from wtforms import StringField from wtforms import SubmitField, TextField from wtforms import Form, BooleanField, validators from wtforms.validators import DataRequired, InputRequired, Equa...
# Copyright (C) 2020 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """This module contains test about sending emails for proposals.""" import ddt import mock from ggrc.notifications import fast_digest from integration.ggrc import TestCase from integration.ggrc.api_helper im...
#!/usr/bin/env python3 # this file is auto-generated by gen_from_wiki.py from __future__ import annotations from .player_class import PlayerClass from ..stats import Stats STATS_BY_PLAYER_CLASS = { PlayerClass.Cleric: [ Stats(*(0, 0, 0, 0, 0, 0, 0, 0)), Stats(*(17, 11, 8, 9, 12, 12, 10, 11)), ...
from dataclasses import dataclass from abc import ABC, abstractmethod from .builder import AbstractBuilder @dataclass class AbstractScene(ABC): builder: AbstractBuilder @abstractmethod def run(self) -> None: ...
from django.contrib.auth import get_user_model, authenticate from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers class UserSerializer(serializers.ModelSerializer): """Serializer for the users object""" class Meta: model = get_user_model() fields = ('...
import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Anscombe'] , ['MovingAverage'] , ['Seasonal_MonthOfYear'] , ['ARX'] );
# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. # Modifications: # Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Parser driver. This provides a high-level interface to parse a file into a synta...
# 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 from...
#!/bin/python import importlib import logging import os import sys import argparse import shutil from clint.textui import colored try: from alacrity import lib except ImportError: lib = importlib.import_module('lib', '../alacrity') def main(): """ Entry point for the package, alacrity.exe in win and...
class NumericUpDown(UpDownBase,IComponent,IDisposable,IOleControl,IOleObject,IOleInPlaceObject,IOleInPlaceActiveObject,IOleWindow,IViewObject,IViewObject2,IPersist,IPersistStreamInit,IPersistPropertyBag,IPersistStorage,IQuickActivate,ISupportOleDropSource,IDropTarget,ISynchronizeInvoke,IWin32Window,IArrangedElement,IBi...
# Generated by Django 3.0.5 on 2020-05-18 04:14 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('core', '0016_auto_20200516_0338'), ] operations = [ migrations.AddField( model_name='reserva', ...
# -*- coding: utf-8 -*- # This file was generated import nidcpower._visatype as _visatype import nidcpower.errors as errors import array import datetime import numbers from functools import singledispatch @singledispatch def _convert_repeated_capabilities(arg, prefix): # noqa: F811 '''Base version that should ...
import FWCore.ParameterSet.Config as cms import DQMServices.Components.test.checkBooking as booking import DQMServices.Components.test.createElements as c import sys process = cms.Process("TEST") # load DQM process.load("DQMServices.Core.DQM_cfg") process.load("DQMServices.Components.DQMEnvironment_cfi") b = bookin...
# coding=utf-8 # Copyright 2018 The Tensor2Tensor 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...
import numpy as np from perfect_information_game.games import Chess from perfect_information_game.utils import iter_product from perfect_information_game.tablebases import get_verified_chess_subclass class SymmetryTransform: # noinspection PyChainedComparisons PAWNLESS_UNIQUE_SQUARE_INDICES = [(i, j) for i, j...
"""Adds config flow (UI flow) for Dahua IP cameras.""" import logging import voluptuous as vol from homeassistant import config_entries from homeassistant.core import callback from homeassistant.helpers.aiohttp_client import async_create_clientsession from homeassistant.helpers import config_validation as cv from .c...
import os import sys import logging from pyparsing import Keyword, Word, OneOrMore, printables, Group, nums,\ alphas, ZeroOrMore, Optional, Combine, QuotedString, restOfLine from itertools import cycle from avi.migrationtools.ace_converter.ace_utils import printProgressBar,\ set_excel_dict LOG = logging.getLogg...
import sys import os import time import numpy as np import tensorflow as tf from src.utils import get_train_ops from src.common_ops import stack_lstm from tensorflow.python.training import moving_averages class PTBEnasController(object): def __init__(self, rhn_depth=5, lstm_size=32, ...
# Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
from PIL import Image from PIL import ImageFilter import urllib import urllib2 import requests import re import json import ssl http://jlnetc.blog.51cto.com/10920149/1907446 http://python.jobbole.com/81359/ http://jlnetc.blog.51cto.com/10920149/1907446 https://gist.github.com/loveNight/214f82b43926528342f2
from oauthlib.common import UNICODE_ASCII_CHARACTER_SET from oauthlib.common import generate_client_id as oauthlib_generate_client_id from .settings import oauth2_settings class BaseHashGenerator: """ All generators should extend this class overriding `.hash()` method. """ def hash(self): ra...