text
stringlengths
2
999k
#!/usr/bin/python # -*- coding: UTF-8 -*- import os import platform import socket import string import struct import sys import time import random import datetime # 依照source格式生成随机数据 source = "begin_time='2016-11-30 13:36:34' end_time='2016-11-30 13:36:36' alive_time=2 src_mac=265F10E90700 " \ "dst_mac=6BB5...
import quadtree import unittest def output_points(pts, fh): for pt in pts: fh.write("POINT({0[0]} {0[1]})\n".format(pt)) def do_output_quadtree(qt): print("OUTPUTTING quadTREE") with open("/tmp/stored_pts.wkt", "w") as fh: fh.write("wkt\n") output_points((pt for pt in qt), fh) ...
#!/usr/bin/env python """Utils common to macOS and Linux.""" from __future__ import unicode_literals import logging import os import threading import time from builtins import range # pylint: disable=redefined-builtin import psutil import xattr from google.protobuf import message from grr_response_core import conf...
# -*- coding:utf-8 -*- import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="deepdata", version="0.2.1", license="Apache License", author="killf", author_email="killf@foxmail.com", description="A general toolkit for deep learning dataset....
from conans import ConanFile, tools import os class ProtozeroConan(ConanFile): name = "protozero" description = "Minimalist protocol buffer decoder and encoder in C++." topics = ("protozero", "protobuf") license = "BSD-2-Clause" homepage = "https://github.com/mapbox/protozero" url = "https://g...
# Copyright (C) 2017 The LineageOS 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
# -*- coding: utf-8 -*- import os import redis from ohmyrss.settings import REDIS_FEED_DB, REDIS_HOST, REDIS_PORT import time import urllib R = redis.Redis(host=REDIS_HOST, port=REDIS_PORT, db=REDIS_FEED_DB, decode_responses=True) CRAWL_PREFIX = 'CRAWL/' def mkdir(directory): return os.makedirs(directory, exis...
import numpy as np import cirq import qflexcirq.interface.qflex_virtual_device as qdevice import qflexcirq.interface.qflex_order as qorder import qflexcirq.interface.data_storage_interface as tmpi import qflexcirq.utils as qflexutils class QFlexCircuit(cirq.Circuit): def __init__(self, cirq_c...
import os import keras import keras.backend as K import matplotlib.pyplot as plt import numpy as np import scipy.signal from utils.utils_metrics import evaluate class LossHistory(keras.callbacks.Callback): def __init__(self, log_dir): import datetime curr_time = datetime.datetime.n...
# 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 GetSolutionStackResult: """...
from utils.misc import color_filter, cut_roi, wait from template_finder import TemplateFinder from screen import Screen from config import Config from utils.custom_mouse import mouse import keyboard import cv2 from logger import Logger import time class DeathManager: def __init__(self, screen: Screen): se...
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Anscombe'] , ['LinearTrend'] , ['BestCycle'] , ['LSTM'] );
from typing import ( Any, Callable, Dict, Tuple, ) from platon_typing import ( ContractName, ) from platonpm import ( Package, ) from platon.tools.pytest_platon.exceptions import ( DeployerError, ) from platon.tools.pytest_platon.linker import ( deploy, linker, ) class Deployer: ...
import random import typing import discord from discord.ext import commands from discord.ext.commands.cooldowns import BucketType import utils class Moderation(commands.Cog): "Commands For Moderators to use" def __init__(self, bot): self.bot = bot @commands.cooldown(1, 90, BucketType.user) ...
from setuptools import setup, find_packages setup(name="PACKAGENAME", packages=find_packages())
from pathlib import Path from git import Repo GITHUB_REPO = "pikesley/jlock" def get_git_data(): """Assemble some Git metadata.""" repo = Repo(Path(Path(__file__).resolve().parent.parent)) timestamp = repo.head.object.authored_datetime.isoformat() timestamp = timestamp.split("+")[0].replace("T", " ...
import time import pdb import copy import logging from milvus_benchmark import parser from milvus_benchmark.runners import utils from milvus_benchmark.runners.base import BaseRunner logger = logging.getLogger("milvus_benchmark.runners.insert") class InsertRunner(BaseRunner): """run insert""" name = "insert_p...
# -*- coding: utf-8 -*- # pylint: disable-msg=W0612,E1101,W0141 from warnings import catch_warnings import datetime import itertools import pytest import pytz from numpy.random import randn import numpy as np from pandas.core.index import Index, MultiIndex from pandas import Panel, DataFrame, Series, notna, isna, Tim...
"""ukweather - climate and weather data for UK infrastructure modelling scenarios """ import pkg_resources try: __version__ = pkg_resources.get_distribution(__name__).version except pkg_resources.DistributionNotFound: __version__ = 'unknown'
import os import tensorflow as tf from tensorflow import keras from TfUtils import get_data from LeakyReLU import LeakyReLU physical_devices = tf.config.experimental.list_physical_devices('GPU') tf.config.experimental.set_visible_devices(physical_devices[1], 'GPU') for gpu in physical_devices[1:2]: tf.config.exper...
#!/usr/bin/env python # kate: replace-tabs on; indent-width 4; from __future__ import unicode_literals '''Generate header file for nanopb from a ProtoBuf FileDescriptorSet.''' nanopb_version = "nanopb-0.4.2-dev" import sys import re import codecs import copy import tempfile import os from functools import reduce tr...
# -*- coding: utf-8 -*- # # Copyright 2019 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...
# iorw_to.py Emulate a device which can read and write one character at a time # and test timeouts. # Copyright (c) Peter Hinch 2019 # Released under the MIT licence # This requires the modified version of uasyncio (fast_io directory). # Slow hardware is emulated using timers. # MyIO.write() ouputs a single character...
# -*- coding: utf-8 -*- # Copyright (C) 2014 Yahoo! 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...
#!/usr/bin/env python3 # Launches a CCM cluster # # stdout: # {'id': ... # 'url': ..., # 'auth_token': ...} # # cluster.properties file (if WORKSPACE is set in env): # CLUSTER_ID=... # CLUSTER_URL=... # CLUSTER_AUTH_TOKEN=... # # Configuration: Mostly through env vars. See README.md. import argparse import http.cli...
import math import torch from dataset_file import DatasetFile from converter import ImageConverter, LabelConverter, FlexibleLabelConverter class CustomDataloader(object): def __init__(self, dataset='mnist.dataset', batch_size=16, fold='train', shuffle=True, last_batch=False, example_count=None, **kwargs): ...
# It's not possible to create a new attribute (global var) in another module # at runtime in strict mode (all globals should be pre-defined). import mod mod.bar = "mine" print(mod.bar) del mod.bar mod.bar = "mine2" print(mod.bar) def __main__(): print("in __main__") # del mod.bar mod.bar = "mine3" ...
import argparse import pandas as pd if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("submissions", nargs="+") parser.add_argument("output") args = parser.parse_args() ensembled = [pd.read_csv(name, index_col="uid") for name in args.submissions] (sum(ensembled...
from src.services.mortality_data_service.model import MortalityDataService import matplotlib.pyplot as plt from src.commons import utils import pandas class SuicideUiService(object): def __init__(self): pandas.set_option('display.max_rows', None) pandas.set_option('display.max_columns', None) ...
""" terminal reporting of the full testing process. This is a good source for looking at the various reporting hooks. """ from _pytest.main import EXIT_OK, EXIT_TESTSFAILED, EXIT_INTERRUPTED, \ EXIT_USAGEERROR, EXIT_NOTESTSCOLLECTED import pytest import py import sys import time import platform import _pytest._pl...
''' Bitcoin base58 encoding and decoding. Based on https://alqotalk.org/index.php?topic=1026.0 (public domain) ''' import hashlib # for compatibility with following code... class SHA256: new = hashlib.sha256 if str != bytes: # Python 3.x def ord(c): return c def chr(n): return bytes( ...
import re from typing import NamedTuple class Resultado(NamedTuple): hora: str data: str local: str = None def get_data(phrase: str) -> object: """ Use regex to get info about some event trigged by "!" prefix """ try: reghora = '[0-9]{2}:[0-9]{2}' dias = [...
from django.apps import apps from django.test import TestCase, TransactionTestCase from django_test_migrations.contrib.unittest_case import MigratorTestCase from mayan.apps.acls.tests.mixins import ACLTestCaseMixin from mayan.apps.converter.tests.mixins import LayerTestCaseMixin from mayan.apps.events.tests.mixins im...
# Auto generated from importee.yaml by pythongen.py version: 0.9.0 # Generation date: 2021-03-26 14:21 # Schema: importee # # id: https://example.org/importee # description: A minimal element to import # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses import sys import re from typing imp...
from typing import TYPE_CHECKING, Coroutine if TYPE_CHECKING: from Platforms.Web.main_web import PhaazebotWeb from Platforms.Discord.main_discord import PhaazebotDiscord import json import asyncio import discord from aiohttp.web import Response from Utils.Classes.discordserversettings import DiscordServerSettings fr...
from wnlu.translate.Utils import Utils #### ## This class provides an encapsulization for a schema, which is characterized by: ## 1) A "premise" string, containing a sentence (or potentially sequence of sentences). ## 2) A reference to an ambiguous pronoun within the premise. ## 3) Two potential noun options for that ...
"""blogproject URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-b...
class Constants: ENV_VAR_REGION = 'REGION' ENV_VAR_TABLE_NAME = 'TABLE_NAME' EVENT_BODY = 'body' OPERATION_INSERT = 'INSERT' OPERATION_MODIFY = 'MODIFY' JSON_ATTRIBUTE_NAME_OPERATION = 'operation' JSON_ATTRIBUTE_NAME_RESOURCE = 'resource' RESPONSE_STATUS_CODE = 'statusCode' RESPO...
# # This file is part of the PyMeasure package. # # Copyright (c) 2013-2019 PyMeasure Developers # # 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 limit...
# Copyright 2018 Delft University of Technology # # 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 agr...
"""Jednostavni SQL parser, samo za nizove CREATE i SELECT naredbi. Ovaj fragment SQLa je zapravo regularan -- nigdje nema ugnježđivanja! Semantički analizator u obliku name resolvera: provjerava jesu li svi selektirani stupci prisutni, te broji pristupe. Na dnu je lista ideja za dalji razvoj. """ from pj import ...
version = '0.1.0'
""" Usage: launch.py <init_filename> launch.py <init_filename> <zip_path> [--noS3 | --noupload] Arguments: initExp_path (required) : path to a YAML file for arguments to launch experiment zip_path (optional) : zip file that contains the targets (which are then uploaded to S3)....
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-05-26 17:58 from __future__ import unicode_literals from django.conf import settings import django.contrib.gis.db.models.fields from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = Tr...
import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation from supervised.logistic_regression import LogisticRegression from supervised.linear_regression import AnalyticalLinearRegression from utils.preprocessing import add_dummy_feature seed = 2 np.random.seed(seed) n_samples = 8 ...
"""__main__.py Provide an easy way to run nmfishingreport: python3 -m nmfishingreport -c config.ini """ import argparse from . import internet_on from . import nmfishingreport parser = argparse.ArgumentParser(prog="nmfishingreport") parser.add_argument( "-c", "--config", default="config.ini", h...
# -*- coding: utf-8 -*- # cython: language_level=3 # Copyright (c) 2020 Nekokatt # Copyright (c) 2021-present davfsa # # 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, inc...
import aiohttp import asyncio import json import re from bs4 import BeautifulSoup class Crawler: data = [] news = [] headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36' } # 获取源码 async def fetch(sel...
# # ジャイロ加速度センサー(MPU6886またはSH200Q). # 動作未確認. # ################################################## # import ################################################## import lcd from machine import I2C ################################################## # constants ##################################################...
import functools import requests import time from django.conf import settings class CustomMetricTimedNode(object): def __init__(self, name): self.name = name self.start_time = None self.end_time = None def __enter__(self): self.start_time = time.time() return self ...
""" Evacuation planning based on network flow algorithms. """ from __future__ import annotations from collections import deque from itertools import groupby from sys import stderr from typing import Dict, List, Tuple, NamedTuple import networkx as nx from .level import Level from .graph.reservation_graph import Reser...
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # 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...
# REMOVE ISLANDS # O(wh) time and space def removeIslands(matrix): # Write your code here. m = len(matrix) n = len(matrix[0]) for i in range(n): if matrix[0][i] == 1: markAllBorderBlacks(matrix, 0, i) for i in range(m): if matrix[i][0] == 1: markAllBorderBlacks(matrix, i, 0) for i in r...
import random import torch import torch.nn as nn import torch.nn.functional as F from .Attention import Attention class DecoderRNN(nn.Module): """ Provides functionality for decoding in a seq2seq framework, with an option for attention. Args: vocab_size (int): size of the vocabulary max_...
# Copyright 2014-2016 Presslabs SRL # # 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...
#!/usr/bin/env python # encoding:utf-8 """ Author : Yuanqing Mei Date : 2021/4/12 Time: 15:36 File: RocMeta.py HomePage : http://github.com/yuanqingmei Email : dg1533019@smail.nju.edu.cn Deriving supervised method threshold by meta-analysis. Supervised methods include: maximizing the AUC value and ROC、BPP、MFM、GM value...
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: david@reciprocitylabs.com # Maintained By: david@reciprocitylabs.com from behave import then @then('"{resource_type}" collection only contains stu...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0036_auto_20160923_1155'), ] operations = [ migrations.AddField( model_name='advancedsettings', ...
#!/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', 'giftme.settings') try: from django.core.management import execute_from_command_line except Impor...
# $Filename$ # $Authors$ # Last Changed: $Date$ $Committer$ $Revision-Id$ # # Copyright (c) 2003-2011, German Aerospace Center (DLR) # All rights reserved. # # #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions are #met: # ...
### PANDAS CON DATA.FRAME ### ###Crear Data.frame desde cero import pandas as pd import numpy as np pd_DF = pd.DataFrame(np.random.rand(3,2), columns=['columna_1', 'clumna_2'], index=['a','b','c']) print(pd_DF) ### Ejercicio 1 con data.frames produccion = pd.Seri...
import psycopg2 import datetime def dbLogin(): """ dbLogin: logs into database for stock market program return: sql connection object or failure boolean """ try: return psycopg2.connect("dbname=StockMarket user=postgres password=mathmatician3") except: return False def createTa...
""" Read graphs in LEDA format. LEDA is a C++ class library for efficient data types and algorithms. Format ------ See http://www.algorithmic-solutions.info/leda_guide/graphs/leda_native_graph_fileformat.html """ # Original author: D. Eppstein, UC Irvine, August 12, 2003. # The original code at http://www.ics.uci.ed...
"""Helpful functions that can only be computed (easily) for univarate GMMs. """ import numpy as np import scipy as sp from .condGMM import * class UniGMM(object): """Conditional Gaussian mixture model of a single random variable. This class exists to provide helpful routines, such as computing CDFs and PPF...
# coding=utf-8 from flask import Blueprint api = Blueprint('api', __name__) from . import authentication, posts, users, comments, errors
# Copyright 2017 Battelle Energy Alliance, 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 t...
# coding: utf-8 """A lightweight Python library for simulating Chinese handwriting Created by Chenghui Li (Gsllchb). Licensed under BSD 3-Clause. A minimal example: ``` text = "我能吞下玻璃而不伤身体。" template = Template( background=PIL.Image.new(mode="1", size=(1024, 2048), color=1), font_size=100, font=PIL.Image...
# Copyright 2015 LinkedIn Corp. # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2....
def pytest_addoption(parser): parser.addoption('--extended', action='store_true', default=False, help='Test against all supported encoding types') def resolve_encodings(option): from pymerkle.hashing import SUPPORTED_ENCODINGS if option.extended: return SUPPORTED_ENCODINGS ...
#coding:utf-8 #パラメータ設定ファイル #Akira Taniguchi 2016/05/31- import numpy as np ####################パラメータ#################### D = 20#8#10 #全データ数 num_iter = 200 #学習のイテレーション回数 CNNmode = 0#2 #CNN→PCA(2)・特徴抽出をCNNにする(1)・SIFTにする(0)・DSIFTのBoFにする(-1) if CNNmode == 0: Descriptor = "SIFT_BoF" k...
# Copyright (c) James Percent, Byron Galbraith and Unlock contributors. # All rights reserved. # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notic...
from settings import CharacterSettings from pyostra import pyprint, LogTypes from core import GeneralPaths from copy import deepcopy from pathlib import Path from typing import Union import random class Randomize: """Handles all the random NFT generation (list of paths). """ @staticmethod def r...
import time import requests from bs4 import BeautifulSoup from crawlers.generic import BaseCrawler from settings import BEGIN_CRAWL_SINCE class LaughTardCrawler(BaseCrawler): def __init__(self, *args, **kwargs): super(LaughTardCrawler, self).__init__(source='laugh_tard', *args, **kwargs) self.ur...
import discord from discord.ext import commands, menus from mysqldb import the_database, the_django_database from .player import Player, Skill from .enums import QuestEnum from extra.menu import ConfirmSkill, SwitchTribePages from extra import utils import os import asyncio from datetime import datetime from typing i...
#! /usr/bin/env python """ @author : Luc ardaillon created : 17/01/2019 last revision : 10/04/2019 conversion from the ground truth f0 value to the target vector of pitch classes to be predicted by the models (for training) """ import numpy as np def freq2cents(f0, f_ref = 10.): ''' Convert a given frequency...
import os import pytest from funcx_endpoint.endpoint.endpoint import app from typer.testing import CliRunner runner = CliRunner() config_string = ''' from funcx_endpoint.endpoint.utils.config import Config from parsl.providers import LocalProvider config = Config( scaling_enabled=True, provider=LocalProvide...
from . import augmentation_methods as am import glob import os import math def pipeline(image_path, output_path, size=(608, 608)): processes = 6 step = 1 if not am.check_file_for(image_path): print('No bounding box file found for: {}'.format(image_path)) return [] # 1 print('({}{}...
#!/usr/bin/python3 import testUtils import argparse import random import signal ############################################################### # Test for different test scenarios. # Nodes can be producing or non-producing. # -p <producing nodes count> # -c <chain strategy[replay|resync|none]> # -s <topology> # -d <...
from typing import TYPE_CHECKING, List from dis_snek.const import MISSING from dis_snek.models.route import Route if TYPE_CHECKING: from dis_snek.http_client import HTTPClient from dis_snek.models.snowflake import Snowflake_Type class EmojiRequests: request: "HTTPClient.request" async def get_all_g...
from typing import Iterable, Text, Iterator from pyfilter.src.transport.proto import ( TextFilterServiceServicer, SingleTextFilterRequest, SingleTextFilterResponse, MultiFilterResponse ) from pyfilter.src.text_filter import TextFilter class TextFilterService(TextFilterServiceServicer): def __init__(self...
# Copyright 2015-2016 F-Secure # 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, ...
from __future__ import absolute_import import atexit import copy import logging import socket import threading import time import weakref from kafka.vendor import six import kafka.errors as Errors from kafka.client_async import KafkaClient, selectors from kafka.codec import has_gzip, has_snappy, has_lz4, has_zstd fr...
# # Copyright(c) 2020 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause-Clear # import pytest from api.cas import casadm, cli, cli_messages from core.test_run import TestRun from storage_devices.disk import DiskType, DiskTypeSet, DiskTypeLowerThan from test_utils.size import Size, Unit @pytest.mark.require_...
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Mcpp(AutotoolsPackage, SourceforgePackage): """MCPP is an alternative C/C++ preprocessor w...
# 2019-01-06 circle oscope test v13 Trellis.py # oscilloscope x-y graphics test # # 2019 Cedar Grove Studios # ### Setup ### import board from math import sin, cos, pi import busio import adafruit_mcp4725 import time import neopixel as neo from analogio import AnalogIn, AnalogOut ext_i2c = busio.I2C(board.SCL, board...
import os.path try: from setuptools_scm import get_version version = get_version(root=os.path.join('..', '..'), relative_to=__file__) except ImportError: from ._version import version
"""Clovek ne jezi se game board and plays""" from math import pi from typing import Sequence, Union import warnings import attr import numpy as np import matplotlib.colors as colors from matplotlib import cm import networkx as nx import matplotlib.pyplot as plt from .utils import ( make_even_points_on_circle, ...
#!/usr/bin/python3 ''' * Copyright (C) 2021 Raúl Osuna Sánchez-Infante * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE.txt file for details. ''' import matplotlib as mpl mpl.use('TkAgg') import matplotlib.pyplot as plt import qiskit as q from qiskit.visuali...
# Generated by Django 2.2 on 2019-08-22 20:34 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permissions'), ] operations = [ migrations.CreateModel( name='UserProfile', ...
from ..service import Service class Users(Service): def __init__(self, client): super(Users, self).__init__(client) def list_users(self, search='', limit=25, offset=0, order_type='ASC'): """List Users""" params = {} path = '/users' params['search'] = search p...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
# -*- coding: utf-8 -*- # # Copyright (C) 2004-2020 Edgewall Software # Copyright (C) 2004 Daniel Lundin <daniel@edgewall.com> # Copyright (C) 2005-2006 Christopher Lenz <cmlenz@gmx.de> # Copyright (C) 2006-2007 Christian Boos <cboos@edgewall.org> # All rights reserved. # # This software is licensed as described in the...
# Copyright 2012 IBM Corp. # Copyright 2013 Red Hat, 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 r...
import numbers import torch.nn as nn from networks.modular_downscaling_model.base_modules import ParametricModule class ConvBlock(ParametricModule): __options__ = { 'input_channels': None, 'output_channels': None, 'kernel_size': 5, 'stride': (1, 1), # can be used for downsampling...
# -*- coding: utf-8 -*- # # Copyright 2016 Erik Bernhardsson # # 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 l...
#!/usr/bin/env python # Copyright (c) 2013 Turbulenz Limited from sys import argv, stdout from json import loads as load_json, dumps as dump_json from yaml import load as load_yaml from os.path import join as path_join, exists as path_exists, splitext, basename, normpath, getmtime, dirname from os import makedirs, lis...
# 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...
#!/usr/bin/env python3 from MCTS_bot import * import botbowl as botbowl import time as time config = botbowl.load_config("bot-bowl") config.competition_mode = False config.pathfinding_enabled = True config.debug_mode = False ruleset = botbowl.load_rule_set(config.ruleset, all_rules=False) # We don't need all the rul...
# Copyright 2002 Gary Strangman. All rights reserved # Copyright 2002-2016 The SciPy Developers # # The original code from Gary Strangman was heavily adapted for # use in SciPy by Travis Oliphant. The original code came with the # following disclaimer: # # This software is provided "as-is". There are no expressed or...
import math from simple_playgrounds.engine import Engine from simple_playgrounds.playground.layouts import SingleRoom from simple_playgrounds.element.elements.teleport import InvisibleBeam, VisibleBeamHoming, Portal, PortalColor from simple_playgrounds.common.position_utils import CoordinateSampler from simple_playgr...