text
stringlengths
1
927k
# This is a script to migrate infrastructure from Comware-based switches, such as the # HPE A-series, to Meraki MS switches. The script reads an input file which defines which # Comware switch will be migrated to which MS. Configuration is read from Comware through SSH, # converted to Meraki form and uploaded to the...
#!/usr/bin/env python """Service managing marine facility sites and deployments""" import string import time import logging from collections import defaultdict from pyon.core.governance import ORG_MANAGER_ROLE, DATA_OPERATOR, OBSERVATORY_OPERATOR, INSTRUMENT_OPERATOR, GovernanceHeaderValues, has_org_role from ooi....
import json from datetime import datetime, timedelta from app import app, db from app.utils.testing import ApiTestCase from app.users.models import AppUser, PasswordReset, UserCategory, Country, UserComment from app.events.models import Event, EventRole from app.applicationModel.models import ApplicationForm from app...
import sys import time import socket import urllib2 import argparse import threading __author__ = 'n00py' # These variables must be shared by all threads dynamically correct_pairs = {} total = 0 def has_colours(stream): if not hasattr(stream, "isatty"): return False if not stream.isatty(): retu...
#!/usr/bin/env python """Allows the user to specify rotation type and rotation angle. History: 2001-11-05 ROwen First version with history. 2002-06-11 ROwen Disables invalid rot types based on coordSysvar. 2002-06-25 ROwen Removed an unneeded keyword from inputCont. 2002-07-31 ROwen Modified to use the RO....
# # Module which supports allocation of memory from an mmap # # multiprocessing/heap.py # # Copyright (c) 2006-2008, R Oudkerk # 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. Redistributi...
# Generated by Django 3.1.3 on 2021-05-12 18:49 from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('jdhapi', '0006_auto_20201127_1355'), ] operations = [ migrations.CreateModel( ...
from tkinter import * import tkinter.font from gpiozero import LED import RPi.GPIO RPi.GPIO.setmode(RPi.GPIO.BCM) ### HARDWARE DEFINITIONS ### # LED pin definitions led0 = LED(7) led1 = LED(8) led2 = LED(25) led3 = LED(23) led4 = LED(24) led5 = LED(18) led6 = LED(15) led7 = LED(14) # Arrange LEDs into a list leds = [l...
from uwallet.blockchain import unet from uwallet.blockchain import ArithUint256 GENESIS_BITS = 0x1f07ffff MAX_TARGET = 0x0007FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF N_TARGET_TIMESPAN = 150 def check_bits(bits): bitsN = (bits >> 24) & 0xff assert 0x03 <= bitsN <= 0x1f, \ ...
""" This code parses INI files in a nested manor. """ __author__ = "Brian Allen Vanderburg II" __copyright__ = "Copyright 2016" __license__ = "Apache License 2.0" try: from collections import OrderedDict as dict except ImportError: pass class NestedIniParser(object): def __init__(self, p...
import pytest from awsassume.assume_role_cache_executor import AssumeRoleCacheExecutor from awsassume.assume_role_executor_factory import AssumeRoleExecutorFactory from awsassume.assume_role_no_cache_executor import AssumeRoleNoCacheExecutor from awsassume.data_models import CliArgs @pytest.fixture(scope='module', p...
import unittest from cupy._creation import from_data from cupy import cuda from cupy import testing from cupy.testing import attr class TestStream(unittest.TestCase): @attr.gpu def test_eq(self): null0 = cuda.Stream.null null1 = cuda.Stream(True) null2 = cuda.Stream(True) nul...
#!/usr/bin/env python3 """ xturtle-example-suite: xtx_kites_and_darts.py Constructs two aperiodic penrose-tilings, consisting of kites and darts, by the method of inflation in six steps. Starting points are the patterns "sun" consisting of five kites and "star" consisting of five darts. For more inf...
#!/usr/bin/env python from __future__ import print_function import yaml from mongodb_kube_client import MongoDBEnterpriseKubeClient def parse_config_file(path): ''' Parses the config file in the given path ''' with open(path, 'r') as parameters: try: return yaml.load(parameters) ...
# -*- coding: utf-8 -*- """ wsproto/events ~~~~~~~~~~~~~~ Events that result from processing data on a WebSocket connection. """ from abc import ABC from dataclasses import dataclass, field from typing import Generic, List, Optional, Sequence, TypeVar, Union from .extensions import Extension from .typing import Heade...
"""The Met Office integration.""" import logging from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_API_KEY, CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME from homeassistant.core import HomeAssistant from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.helpers....
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
# Entry point for the application. from . import app # For application discovery by the 'flask' command. from . import dxc_app # For import side-effects of setting up routes.
#!/usr/bin/env python3 # Copyright (c) 2019-2020 The Widecoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Test Taproot softfork (BIPs 340-342) from test_framework.blocktools import ( COINBASE_MATURITY, ...
import pytest from app.routers import taxons from fastapi.testclient import TestClient TEST_JSON = {"gbif_id": 15, "canonical_name": "test", "rank": "class"} TEST_JSON_0 = { "gbif_id": 0, "canonical_name": "Canis Lupus Familiaris", "rank": "subspecies", } client = TestClient(taxons.router) def test_rea...
# Module for running CNN-BiLSTM vad model, # may also be run directly as a script # Author: Nick Wilkinson 2021 import argparse import os import numpy as np import pandas as pd import tensorflow as tf from typing import Tuple from tensorflow.keras import models from voxseg import utils from scipy.signal import medfilt ...
# coding: utf8 """ Tests for the Paged Media 3 parser ---------------------------------- :copyright: (c) 2012 by Simon Sapin. :license: BSD, see LICENSE for more details. """ from __future__ import unicode_literals import pytest from tinycss.css21 import CSS21Parser from tinycss.page3 import CSSPag...
def test_aws_acl(acl_string): if acl_string not in ('private', 'public-read', 'public-read-write', 'authenticated-read', 'aws-exec-read', 'bucket-owner-read', 'bucket-owner-full-control'): raise ValueError('ACL string must be one of: ', ('private', ...
from rest_framework import serializers from .models import Host class HostSerializer(serializers.ModelSerializer): class Meta: model = Host fields = ['id','species', 'size', 'cost']
# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. 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 requ...
""" The Ramer-Douglas-Peucker algorithm roughly ported from the pseudo-code provided by http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm """ from math import sqrt def distance(a, b): return sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2) def point_line_distance(point, start, end): if (start == en...
# noqa: D100 import logging from typing import Dict, Optional import hail as hl logging.basicConfig( format="%(asctime)s (%(name)s %(lineno)s): %(message)s", datefmt="%m/%d/%Y %I:%M:%S %p", ) logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) def compute_ranked_bin( ht: hl.Table, sc...
from itertools import permutations def snailfishAdd(num1: list, num2: list) -> list: result = ["["] + num1 + num2 + ["]"] changeMade = True while changeMade: changeAlreadyMade = False nestedLevel = 0 for i in range(len(result)): char = result[i] if char == "[...
# coding: utf-8 # 2021/6/19 @ tongshiwei from EduCDM.IRR import IRT def test_irr_irt(train_data, test_data, params, tmp_path): cdm = IRT(params.user_num, params.item_num, params.knowledge_num) cdm.train(train_data, test_data=test_data, epoch=2) filepath = tmp_path / "irr.params" cdm.save(filepath) ...
""" Training 3D U-Net Model @author: Milad Sadeghi DM - EverLookNeverSee@GitHub """ import os import argparse import numpy as np import pandas as pd import matplotlib.pyplot as plt from model import build_unet_model from sklearn.model_selection import KFold from tensorflow.keras.optimizers import Adam from im...
# qubit number=4 # total number=37 import cirq import qiskit from qiskit.providers.aer import QasmSimulator from qiskit.test.mock import FakeVigo from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import ...
# Generated by Django 3.2.7 on 2021-09-18 16:04 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('user', '0003_auto_20210918_2131'), ] operations = [ migrations.AddField( model_name='specializa...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# 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...
from fbs_runtime.application_context import cached_property from imagewao import QImageWAO class Combiner: def __init__(self, ctx): self.ctx = ctx @cached_property def window(self): return QImageWAO() def run(self): with open(self.ctx.get_resource("style.qss")) as f: ...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Jasper N. Brouwer <jasper@nerdsweide.nl> # (c) 2014, Ramon de la Fuente <ramon@delafuente.nl> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclas...
from django.contrib.auth.decorators import \ login_required # unused for now but for making sure the person on the page is logged in from django.shortcuts import render, redirect, get_object_or_404 # pulling redirect from django.http import HttpResponse # used for testing purposes # Create your views here. from ...
import pytest from knack.util import CLIError from azext_iot.common.utility import validate_min_python_version from azext_iot.common.deps import ensure_uamqp from azext_iot._validators import mode2_iot_login_handler from azext_iot.constants import EVENT_LIB class TestMinPython(): @pytest.mark.parametrize("pymajor...
import cv2 as cv import numpy as np import os import cv2 pth = '/home/prathmesh/Desktop/UMIC/Autumn-of-Automation/ML/UMIC/Yes' obj = os.listdir(pth) for j in obj: img = cv2.imread(pth + '/' + j) img_flip_lr = cv2.flip(img, 1) cv2.imwrite('A{}.jpg'.format(j.replace('.jpg','')), img_flip_lr)
import FWCore.ParameterSet.Config as cms process = cms.Process("PROD") process.load("FWCore.MessageService.MessageLogger_cfi") process.MessageLogger.debugModules = cms.untracked.vstring('*') process.MessageLogger.destinations = cms.untracked.vstring('cerr') process.MessageLogger.categories.append('resolution') proces...
import os from .installer import Installer class NodeInstaller(Installer): versions = ('14', '15', '16', '17') __source_file_path = '/etc/apt/sources.list.d/nodesource.list' def install(self, version: str) -> None: if version not in self.versions: self.ctx.fail('Invalid node version')...
import os import json import sys import random import time filename = "db.json" def init(): """Initialize Database""" if os.path.isfile(filename) != True: db = open(filename, 'w').close() else: db = open(filename, 'r') try: content = json.load(db) except ValueError: content = [] return content de...
from ..common.exceptions import DoesNotExist class UserDoesNotExist(DoesNotExist): entity_name = "User" class EmailAlreadyExists(Exception): def __init__(self, email: str) -> None: super().__init__(f"Email already exists: {email!r}") class LoginFailed(Exception): pass
from __future__ import absolute_import from __future__ import print_function import json import logging import requests from .base import Provider as BaseProvider logger = logging.getLogger(__name__) def ProviderParser(subparser): subparser.add_argument("--auth-token", help="specify token used authenticate to...
from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker from utils.config import DB_URL # SQLALCHEMY_DATABASE_URL = "postgresql://user:password@postgresserver/db" engine = create_engine( DB_URL, connect_args={"check_same_thread": False} ...
from django.test import Client, TestCase from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( email='admin@danoscarmike.com', ...
#!/usr/bin/env python """ Generic python script. """ __author__ = "Alex Drlica-Wagner" from collections import OrderedDict as odict import logging import copy import numpy as np import pandas as pd import dateutil.parser import ephem from obztak.utils import fileio from obztak.utils.date import datestring from obztak...
from pony.orm import * from model.group import Group from model.contact import Contact class ORMFixture: db = Database() class ORMGroup(db.Entity): _table_ = 'group_list' id = PrimaryKey(int, column='group_id') name = Optional(str, column='group_name') header = Optional(str, ...
maxdivider = 20 def task5(maxdivider): num = 11 test = 1 while test != 0: test = 0 for div in range(1,maxdivider): test += num%div num += 1 return num - 1 print(task5(maxdivider))
"""nesara URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/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-based ...
from typing import List, Set, Dict import json import pytumblr from api_tumblr.pytumblr_wrapper import RateLimitClient API_KEYS_TYPE = List[str] class BotSpecificConstants: """Values specific to my development environment and/or the social context of my bot, e.g. specific posts IDs where I need apply some overr...
""" Background Color Behavior ========================= Copyright (c) 2015 Andrés Rodríguez and KivyMD contributors - KivyMD library up to version 0.1.2 Copyright (c) 2019 Ivanov Yuri and KivyMD contributors - KivyMD library version 0.1.3 and higher For suggestions and questions: <kivydevelopment@gmail.com> ...
from mapping.map import Map from utils.position import Position from utils.utils import bresenham_line, filled_midpoint_circle import matplotlib.pyplot as plt def map_to_grid_pos(): print('Test: map_to_grid_pos') lower_left_pos = Position(-5.0, -5.0) upper_right_pos = Position(5.0, 5.0) test_map = Map(...
# AUTOGENERATED BY NBDEV! DO NOT EDIT! __all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"ConnectionError": "00_DBcm.ipynb", "CredentialsError": "00_DBcm.ipynb", "SQLError": "00_DBcm.ipynb", "UseDatabase": "00_DBcm.ipynb"} modules = ["DBcm.py"] doc_url = "https://barr...
from eth_utils import decode_hex class ContractConfigError(Exception): pass class InvalidW3Error(Exception): pass class SLContract(): def __init__(self, node, address=None, provided_abi=None): self._contract = None self._node = node if not self._node.w3.isConnected(): ...
import os import unittest from antlr4 import FileStream from dynabuffers.Dynabuffers import Dynabuffers class Schema05Test(unittest.TestCase): root_dir = os.path.dirname(os.path.realpath(__file__)) def test_parse(self): with open(self.root_dir + "/1.jpg", 'rb') as f: data = b"".join(f.r...
__all__ = ['php']
from django.conf.urls import url from django.contrib import admin from . import views urlpatterns = [ url(r'^addresses',views.AddressView.as_view()), # 获取省信息 url(r'^areas/$', views.AreasView.as_view()), # 保存收貨地址 url(r'addresses/create/$',views.AddressCreateView.as_view()), # 修改收貨地址 # url(r'addresse...
from enum import Enum #Constantes del método Cocomo class Cocomo(): class Tipo(Enum): ORGANICO = 1 SEMI_ACOPLADO = 2 EMPOTRADO = 3 class Modelo(Enum): BASICO = 1 INTERMEDIO = 2 AVANZADO = 3 constantes = { Modelo.BASICO : { Tipo.ORGANICO ...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import torch import pycocotools.mask as mask_utils from pycocotools import mask as maskUtils import numpy as np # from maskrcnn_benchmark.utils.miscellaneous # transpose FLIP_LEFT_RIGHT = 0 FLIP_TOP_BOTTOM = 1 class Mask(object): """ Thi...
from django.contrib.auth import get_user_model from django.core.validators import MinValueValidator from django.db import models User = get_user_model() class Tag(models.Model): """Describes a tag object.""" name = models.CharField(max_length=255, verbose_name='Имя') color = models.CharField(max_length=1...
import __init_paths import os import numpy as np from tqdm import tqdm import torch from torch.autograd import Variable from torch.optim.lr_scheduler import LambdaLR from torch.utils.data import DataLoader import torchvision.transforms as transforms from lib.VIDDataset import VIDDataset from lib.DataAugmentation imp...
import logging import requests from django.conf import settings from django.template.loader import render_to_string logger = logging.getLogger(__name__) class TextMessagingAPIException(Exception): pass class TextMessagingAPI: API_BASE_URL = "https://application.textline.com/api" GROUPS = { "d...
print("a b".split()) print(" a b ".split(None)) print(" a b ".split(None, 1)) print(" a b ".split(None, 2)) print(" a b c ".split(None, 1)) print(" a b c ".split(None, 0)) print(" a b c ".split(None, -1))
#!/usr/bin/env python # Copyright 2017 Marco Galardini and John Lees '''Script to annotate kmer hits''' import sys import os import re import tempfile import subprocess import pybedtools from .bwa import bwa_index from .bwa import bwa_iter def get_options(): import argparse description = 'Iteratively annot...
import setuptools with open("README.md", "r") as f: long_description = f.read() about = {} with open("tkpy/__attrs__.py") as f: exec(f.read(), about) setuptools.setup( name=about["__name__"], version=about["__version__"], description=about["__description__"], long_description=long_descript...
#!/usr/env/python # -*- coding: utf-8 -*- ''' Python class for Forza Motorsport 7's data stream format. Copyright (c) 2018 Morten Wang 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 rest...
from .stochnorm import * from .bss import * from .co_tuning import * from .delta import * from .bi_tuning import * __all__ = ['stochnorm', 'bss', 'co_tuning', 'delta', 'bi_tuning']
import time import numpy as np import pyaudio import config import sys def start_stream(callback): p = pyaudio.PyAudio() frames_per_buffer = int(config.MIC_RATE / config.FPS) stream = p.open(format=pyaudio.paInt16, channels=1, rate=config.MIC_RATE, ...
import torch.nn as nn class Encoder(nn.Module): pass
import itertools, sys, time frequencies = [int(x) for x in sys.stdin] print(sum(frequencies)) startTime = time.time() # initialize frequency counter int at zero and occurrences set at zero f = 0 o = {0: 1} for i in itertools.cycle(frequencies): # maintain the frequency count as we loop f += i # add this f...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads_v1/proto/common/feed_common.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from go...
import tensorflow as tf import numpy as np from functions import * n_features = 2 n_clusters = 3 n_samples_per_cluster = 500 seed = 700 embiggen_factor = 70 np.random.seed() data_centroids, samples = create_samples(n_clusters, n_samples_per_cluster, n_features, embiggen_factor, seed) initial_centroids = choose_...
#!/usr/bin/env python from setuptools import setup try: from pypandoc import convert_file read_me = lambda f: convert_file(f, 'rst') except ImportError: print('pypandoc is not installed.') read_me = lambda f: open(f, 'r').read() setup(name='echonetlite', version='0.1.0', description='Echo...
from modulos import moeda p = float(input('Digite o preço: R$ ')) moeda.resumo(p, 80, 35)
import time import logging logger = logging.getLogger(__name__) def timeit(method): def timed(*args, **kw): ts = time.time() result = method(*args, **kw) te = time.time() if 'log_time' in kw: name = kw.get('log_name', method.__name__.upper()) kw['log_time']...
''' Created on Aug 9, 2012 :author: Sana Development Team :version: 2.0 ''' from django.db import models from mds.api.utils import make_uuid QUEUE_STATUS=((0,'Failed Dispatch')) class EncounterQueueElement(models.Model): """ An element that is being processed """ class Meta: app_label = "core" ...
# This code is based on: https://github.com/nutonomy/second.pytorch.git # # MIT License # Copyright (c) 2018 # 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 w...
import random import application.BChain_WordList as bwords import pandas as pd from flask import Flask, redirect, request, url_for,render_template, Response, jsonify from application import app @app.route('/mnemonic_generator', methods=['GET']) def mnemonic_generator(): seedphrase_words = [] while len(seedph...
from Topsis_Sakshi_101917011.topsis import MyTopsis
"""AyudaEnPython: https://www.facebook.com/groups/ayudapython """ from prototools import int_input, menu_input, banner, text_align ADICIONAL = 1.5 IVA = 0.12 PRECIOS = {"pequeña": 6.5, "mediana": 12.35, "familiar": 22.5} iva = lambda precio: precio * IVA precio_con_iva = lambda precio, iva: precio + iva precio_sin_iv...
import sys from moviepy.editor import VideoFileClip import camera import image_thresholding import line_fitting import matplotlib.image as mpimg class Line(): def __init__(self): self.detected = False # lane line detected in previous iteration self.fit = None # most recent polynomial fit ...
# plot.py # --------------- # # Import Packages # # --------------- # import os import pandas as pd import matplotlib.pyplot as plt import seaborn as sns # Set seaborn as default plot config sns.set() sns.set_style("whitegrid") from itertools import cycle # ---------------------------------- # # Define Subdirectories...
from decouple import config from wordpress import API # Configurações do WooCommerce consumer_key = config("WC_CK", False) consumer_secret = config("WC_CS", False) woo_commerce_url = config("WC_URL", False) wpapi = API( url=woo_commerce_url, api="wp-json", version='wc/v3', consumer_key=consumer_key, ...
# # This file is part of LiteX-Boards. # # Copyright (c) 2019 Antony Pavlov <antonynpavlov@gmail.com> # SPDX-License-Identifier: BSD-2-Clause from litex.build.generic_platform import * from litex.build.altera import AlteraPlatform from litex.build.altera.programmer import USBBlaster # IOs ----------------------------...
# This Python file uses the following encoding: utf-8 # The above line is required for the MultiLingualTests class import copy import tempfile import unittest from jsgf import * from jsgf.ext import Dictation class BasicGrammarCase(unittest.TestCase): def setUp(self): rule2 = PrivateRule("greetWord", Al...
from flask.json import JSONEncoder from node import Node from application import Application class CustomJSONEncoder(JSONEncoder): def default(self, obj): if isinstance(obj, Node): return { 'node_id' : obj.node_id, 'image' : obj.image, 'ip_addr' :...
import copy import logging import numpy as np import tensorflow as tf from typing import Any, Dict, Optional, Text, Tuple, Union, List, Type from rasa.shared.nlu.training_data import util import rasa.shared.utils.io from rasa.nlu.config import InvalidConfigError from rasa.shared.nlu.training_data.training_data impor...
"""note Revision ID: b66e30eb6816 Revises: 8add39cb253d Create Date: 2019-02-26 13:09:27.596374 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = 'b66e30eb6816' down_revision = '8add39cb253d' branch_labels = None depends_on = None def upgrade(): op.create_ta...
import re from semantic_version import Version _USER_AGENT_SEARCH_REGEX = re.compile(r'docker\/([0-9]+(?:\.[0-9]+){1,2})') _EXACT_1_5_USER_AGENT = re.compile(r'^Go 1\.1 package http$') _ONE_FIVE_ZERO = '1.5.0' def docker_version(user_agent_string): """ Extract the Docker version from the user agent, taking special...
"""Define os padrões de URL para a aplicação""" from django.conf.urls import url from . import views app_name="questionarios" urlpatterns = [ # Mostra a confirmação do envio do formulário url(r'^confirmacao/$', views.ConfirmacaoView.as_view(), name='confirmacao'), # Questionário para o diretor de escol...
import os import pickle import uuid import six from dagster import ( AssetMaterialization, ExpectationResult, Failure, Materialization, ModeDefinition, PipelineDefinition, SolidDefinition, TypeCheck, check, seven, ) from dagster.core.definitions.dependency import SolidHandle fr...
# Copyright 2020 IBM 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 writing, ...
# -*- coding: utf-8 -*- ''' Installation of Cabal Packages ============================== .. versionadded:: 2015.8.0 These states manage the installed packages for Haskell using cabal. Note that cabal-install must be installed for these states to be available, so cabal states should include a requisite to a pkg.insta...
# Generated by Django 3.2.2 on 2021-05-28 06:35 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('family', '0001_initial'), ] operations = [ migrations.AlterField( model_name='family', name='id_grupo', ...
from __future__ import unicode_literals from django.apps import AppConfig class UsersConfig(AppConfig): name = 'users' def ready(self): import users.signals
# -*- coding: utf-8 -*- """ Object representation for Headset device. """ import serial import logging from pymongo import MongoClient from InputDeviceInterface import InputDeviceInterface from HeadsetThreadReader import HeadsetThreadReader from TimeBuffer import TimeBuffer import helpers import constants class Hea...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import logging import pprint import re import sys import os import unittest if sys.version_info < (3, ): import unicodecsv as csv else: import csv import pytest from hgvs.exceptions import HGVSError i...
from lib.object_detector import ObjectDetector, gather_res import torch import torch.nn as nn import torch.nn.parallel from combine_sg2im_neural_motifs.sg2im_model import Sg2ImModel from combine_sg2im_neural_motifs.discriminators import PatchDiscriminator, AcCropDiscriminator import os from collections import defaultdi...
from . import ShtikerPage from direct.gui.DirectGui import * from pandac.PandaModules import * from toontown.toon import NPCFriendPanel from toontown.toonbase import TTLocalizer class NPCFriendPage(ShtikerPage.ShtikerPage): def __init__(self): ShtikerPage.ShtikerPage.__init__(self) def load(self): ...