text
stringlengths
2
999k
from subprocess import run # Links from http://sose.ucsd.edu/BSOSE6_iter122_solution.html # Also see: http://sose.ucsd.edu/SO6/ITER122/budgets/available_diagnostics.log urls = [ ## Grid "http://sose.ucsd.edu/SO6/SETUP/grid.nc", ## 3D physical diagnostics # Potential temperature [degC] "http://s...
from flask import Flask, render_template app = Flask(__name__) @app.route('/') def index_route(): return render_template('/index.html') @app.route('/<target>') @app.route('/<target>.html') def nav_target_route(target): return render_template(target+'.html') if __name__ == '__main__': app.run()
########################################################################## # # WooferBot, an interactive BrowserSource Bot for streamers # Copyright (C) 2020 Tomaae # (https://wooferbot.com/) # # This file is part of WooferBot. # # WooferBot is distributed in the hope that it will be useful, # but WI...
# fileutils.py import hashlib import logging import os.path logger = logging.getLogger('omserver.fileutils') def getHash(filename): ''' returns hash for a file content empty string is files does not exist Ready to use ''' if not os.path.isfile(filename): logger.error("File doesn'...
from exchange.settings import ExchangeSettings from categories.settings import CategorySettings from attributes.settings import AttributeSettings class CargoSettings(ExchangeSettings, CategorySettings, AttributeSettings): @property def INSTALLED_APPS(self): return super().INSTALLED_APPS + [ ...
from dinosaurs.models import Dinosaur from rest_framework import serializers class DinosaurSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Dinosaur fields = ('url', 'species')
from enum import Enum __all__ = [ 'SourceLang', 'TargetLang', 'SplitSentences', 'PreserveFormatting', 'Formality' ] class GetFormatted(Enum): json = 'json' csv = 'csv'
#!/usr/bin/env python2 # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Exercise the wallet. Ported from wallet.sh. # Does the following: # a) creates 3 nodes, with an emp...
#!/usr/bin/env python # coding: utf-8 # Copyright (c) 2020, NVIDIA 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/LI...
import os import tempfile from torch.testing._internal.common_utils import TestCase, run_tests import tools.codegen.gen_backend_stubs path = os.path.dirname(os.path.realpath(__file__)) gen_backend_stubs_path = os.path.join(path, '../tools/codegen/gen_backend_stubs.py') # gen_backend_stubs.py is an integration point ...
""" SimpleModel record.py TODO: - improve type checking and validation in _validateData """ import sys class Record(object): def __init__(self, simplemodel): self.__dict__['_simplemodel'] = simplemodel self.__dict__['_properties'] = {} self.__dict__['_excludeColumns'] = [] def __setattr__(self, name, ...
while True: string = raw_input('hexstring: ').strip() print string.decode('hex')
import datetime from repachain import RepaBlock, InvalidBlockException import pytest def test_block_creation(): now = datetime.datetime.now() block = RepaBlock(0, now, "test", "prevhash") assert block.index == 0 assert block.timestamp == now assert block.data == "test" assert block.previous_...
#!/usr/bin/env python3 ########################################## # Duino-Coin Python AVR Miner (v2.5) # https://github.com/revoxhere/duino-coin # Distributed under MIT license # © Duino-Coin Community 2019-2021 ########################################## # Import libraries import sys from configparser import ConfigPars...
# Copyright 2015 IBM 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 applicable law or ...
"""! @brief Running an experiment with the improved version of SuDoRmRf on universal source separation with multiple sources. @author Efthymios Tzinis {etzinis2@illinois.edu} @copyright University of Illinois at Urbana-Champaign """ import os import sys current_dir = os.path.dirname(os.path.abspath('__file__')) root_...
# -*- coding: utf-8 -*- # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, # non-exclusive license to e...
# -*- coding: utf-8 -*- """ :copyright: Copyright 2016-2021 Sphinx Confluence Builder Contributors (AUTHORS) :license: BSD-2-Clause (LICENSE) """ from tests.lib import build_sphinx from tests.lib import parse from tests.lib import prepare_conf import os import unittest class TestConfluenceSphinxToctree(unittest.Test...
# # 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.0 # (the "License"); you may not us...
############################################################## # # # Niek Huijsmansen # # Textmining medical notes for cognition # # Outlier Z score # # ...
# Generated by Django 3.2 on 2022-02-27 11:38 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('my_spotless_app', '0001_initial'), ] operations = [ migrations.AlterField( model_name='service', name='picture_url', ...
#!/usr/bin/env python from itertools import product import sys, os sys.path.append(os.pardir) from common.gates import OR if __name__ == '__main__': for x in product((0, 1), (0, 1)): print(f"{x} -> {OR(*x)}")
import random import time import re from toontown.toon import Experience from toontown.toon import ToonExperience from toontown.toon import InventoryBase from toontown.toon import ModuleListAI from toontown.toon import ToonDNA from direct.directnotify import DirectNotifyGlobal from direct.distributed import Di...
# -*- coding: utf-8-*- import os import base64 import tempfile import pypinyin from aip import AipSpeech from . import utils, config, constants from robot import logging from pathlib import Path from pypinyin import lazy_pinyin from pydub import AudioSegment from abc import ABCMeta, abstractmethod from .sdk import Tenc...
# -*- coding: utf-8 -*- ### # (C) Copyright (2012-2017) Hewlett Packard Enterprise Development LP # # 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 limi...
from typing import List import lark from elasticsearch_dsl import Q, Text, Keyword, Integer, Field from optimade.models import CHEMICAL_SYMBOLS, ATOMIC_NUMBERS _cmp_operators = {">": "gt", ">=": "gte", "<": "lt", "<=": "lte"} _rev_cmp_operators = {">": "<", ">=": "<=", "<": ">", "<=": "=>"} _has_operators = {"ALL": ...
# -*- coding: utf-8 -*- # Copyright 2020 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...
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
# Generated by Django 3.2.9 on 2021-12-02 16:31 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("jbank", "0013_euriborrate"), ] operations = [ migrations.AddField( model_name="payoutstatus", name="timestamp", ...
import os import sys import pyNastran from docopt import docopt def run_arg_parse(mode=''): msg = "Usage:\n" msg += " pyNastran%s BDFNAME [--old=<OLD>] [--out=<OUT>]\n" % mode msg += ' [--k=<K_MATRIX>] [--m=<MASS_MATRIX>] [--f=<F_MATRIX>] [-d]\n' msg += ' pyNastran%s -h | --help\n' % mo...
# Copyright 2011 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 l...
import datetime import re import sqlite3 import uuid import discord DB_PATH = '../db.sqlite3' REGEX_PICTURE = r'.+\.(png|jpe?g)' with open('.token') as f: TOKEN = f.read().strip() client = discord.Client() @client.event async def on_message(msg: discord.Message) -> None: if msg.author.bot: return ...
import logging import os from pathlib import Path from typing import Text, Optional, Dict, List, Union import rasa.shared.data import rasa.shared.utils.io from rasa.shared.core.domain import Domain from rasa.shared.core.training_data.story_reader.markdown_story_reader import ( MarkdownStoryReader, ) from rasa.shar...
import re import numpy as np with open("../true_results.txt", 'r') as file: true_results_arr = list() for line in file: new_line = line.split(" ") print(len(new_line)) if len(new_line) > 1: for rs in new_line: print(rs) rs = rs.replace('\n','')...
''' Example implementation of SARSA algorithm for learning the path through frozen lake. The is_slippery flag lets us change the rules of the game, if True the probability of changing the chosen direction is 4 out of 10. ''' import gym import numpy as np import time import pygame class Game: stan = 0; def _...
from tests.cryptocompy_vcr import cryptocompy_vcr from cryptocompy import mining @cryptocompy_vcr.use_cassette() def test_get_mining_contracts(): coin_data, mining_contracts = mining.get_mining_contracts() assert coin_data == {} assert len(mining_contracts) == 192 assert '16762' in mining_contracts...
#!/usr/bin/env python """ Copyright (c) 2014-2018 Alex Forencich 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,...
import os import csv import logging import coloredlogs import argparse import copy import json import re import pprint from benchmark import * def write_model_info_to_file(model, path): with open(path, 'w') as file: file.write(json.dumps(model)) # use `json.loads` to do the reverse def get_ep_list(compari...
# -------------------------------------------------------------------------------------------- # 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) 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 ...
# (C) Datadog, Inc. 2019 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from datadog_checks.dev import get_here HERE = get_here() INSTANCE = {'ticket_location': 'foo'} KAFKA_METRIC = { u'metric': u'mapr.process.context_switch_involuntary', u'value': 6308, u'tags': { ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from .models import GSTGoods,GSTServices # Register your models here. admin.site.register(GSTGoods) admin.site.register(GSTServices)
# django from django.urls import path # views from students import views urlpatterns = [ # url get path( route='api/students-list/', view= views.studentsList, name= 'students_list' ), path( route='api/tecnologies-list/', view= views.tecnologieList, name...
import sklearn.model_selection from sklearn.model_selection import (ShuffleSplit, StratifiedKFold, StratifiedShuffleSplit) def normal(X, labels, test_size): """Split a dataset into training and test parts. Args: X (numpy.ndarray): 2D features matrix label...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Related to AboutOpenClasses in the Ruby Koans # from runner.koan import * class AboutMonkeyPatching(Koan): class Dog: def bark(self): return "WOOF" def test_as_defined_dogs_do_bark(self): fido = self.Dog() self.assertEqual...
""" Entrypoint module, in case you use `python -mnameless`. Why does this file exist, and why __main__? For more info, read: - https://www.python.org/dev/peps/pep-0338/ - https://docs.python.org/2/using/cmdline.html#cmdoption-m - https://docs.python.org/3/using/cmdline.html#cmdoption-m """ import sys from nameless....
# USAGE: # python3 api.py API_KEY test.simc # file is saved to [simId].json from __future__ import print_function import time import sys import argparse import json import urllib.request import urllib.parse from urllib.error import URLError, HTTPError def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kw...
# -*- coding: utf-8 -*- """ test/test_frame ~~~~~~~~~~~~~~~ Tests of the SPDY frame. """ import zlib from spdypy.frame import * from spdypy.data import SPDY_3_ZLIB_DICT from pytest import raises class NullDecompressor(object): """ Useful decompressor that just returns the data put in. """ def decompre...
#!/usr/bin/env python import vtk from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # Demonstrates vtkCellDerivatives for all cell types # ren1 = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren1) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWindow(renWin) # creat...
## settings of different datasets import numpy as np import torchvision.transforms as transforms def dataset_setting(dataset, nSupport, nQuery=15): if 'miniImageNet' in dataset : mean = [x/255.0 for x in [120.39586422, 115.59361427, 104.54012653]] std = [x/255.0 for x in [70.68188272, 68.2763544...
from flask import Flask app = Flask(__name__) from app import routes if __name__ == '__main__': app.run(host='0.0.0.0')
import os import torch from data.base_dataset import BaseDataset from util.util import is_mesh_file, pad, pad_vertices import numpy as np from models.layers.mesh import Mesh class AutoEncoderData(BaseDataset): def __init__(self, opt): BaseDataset.__init__(self, opt) self.opt = opt self.dev...
""" lexical array set operations these operations are based upon the one dimensional array set operations from numpy.lib.arraysetops, but generalised to work for sets of m-tuples, where each element is stored as a row of a 2d m by n array, using numpy's 'lexsort' lexical sorting function. """ import numpy def unique...
import os from pathlib import Path BATCH_SIZE = 512 IMG_SIZE = 32 PATCH_SIZE = 4 DIM = 512 NUM_ATTENTION_HEADS = 8 SUMMA_DIM = 2 NUM_CLASSES = 10 DEPTH = 6 train_data = dict( dataset=dict( type='CIFAR10Dataset', root=Path(os.environ['DATA']), transform_pipeline=[ dict(type='Ran...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # import os import shlex import sys extensions = ["sphinx.ext.todo", "sphinx.ext.githubpages"] # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] # The suffix(es) of source filenames. # You can specify multiple suffi...
# 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 # d...
from PlotGraph.D2Graph.D2GraphPlot import * # Data node_csv_2d = pd.read_csv('data/noeuds_2D.csv', sep=';') edge_csv_2d = pd.read_csv('data/aretes_2D.csv', sep=';') # Plot fig_2D = graphe_2d(nodes=node_csv_2d, edges=edge_csv_2d, titre="myTitle") plot(fig_2D)
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/tools/pythonpoint/customshapes.py __version__=''' $Id$ ''' # xml parser stuff for PythonPoint # PythonPoint Markup Language! __doc__=""" This demonst...
# -*- coding: utf-8 -*- """ Sahana Eden Security Model @copyright: 2012-15 (c) Sahana Software Foundation @license: MIT 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 withou...
"""Config flow for Overkiz (by Somfy) integration.""" from __future__ import annotations from typing import Any, cast from aiohttp import ClientError from pyoverkiz.client import OverkizClient from pyoverkiz.const import SUPPORTED_SERVERS from pyoverkiz.exceptions import ( BadCredentialsException, Maintenance...
############################### LICENSE ################################## # Copyright (c) 2009, South African Astronomical Observatory (SAAO) # # All rights reserved. See License file for more details # # # ##############...
from __future__ import unicode_literals import json from urllib.parse import quote import pytest import sure # noqa import moto.server as server from moto import mock_iot """ Test the different server responses """ @mock_iot def test_iot_list(): backend = server.create_backend_app("iot") test_client = ba...
# !/usr/bin/env python # -*- coding:utf-8 -*- # time: 2020-04-28 22:08:34 # 描述: 三数之和 # 难点:去重 class Solution1: '''hash-map''' def threeSum(self, nums): ''' Arguments: nums {[int]} -- [description] ''' if len(nums) < 3: return [] '''先对数组排序, 遍历数组遇...
from datetime import datetime from jtgpy.events import EventManager class Entity(dict): """Common functionality for racing entities""" SESSION_ID = datetime.now() database = None event_manager = EventManager() scraper = None @classmethod def create_index(cls, index): """Create a database index""" cls....
__author__ = 'Oleg Butovich' __copyright__ = '(c) Oleg Butovich 2013-2017' __version__ = '1.0.4' __licence__ = 'MIT' from .core import *
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import os from contextlib import contextmanager from pants.fs.archive import archiver_for_path, create_archiver from pants.util.contextutil import temporary_dir from pants_test.pants_run_...
import torch.nn as nn class VGG11(nn.Module): def __init__(self): super().__init__() conv_layers = nn.Sequential( nn.Conv2d(3, 64, kernel_size=3, padding=1), nn.ReLU(True), nn.MaxPool2d((2, 2), 2), nn.Conv2d(64, 128, kernel_size=3, padding=1), ...
import boto3 def lambda_handler(event, context): """This function can stop an ec2 instance on a scheduled basis""" # Create ec2 Boto3 client for low-level API mapping ec2 = boto3.client('ec2') # Generate a list of regions using describe_regions API call # Assign regions list to variable 'regions'...
import discord from error import EmbedError from roller.base import Base class Roller(Base): """The main dice roller for the dice bot :param int guild: The discord server the command was submitted on :type guild: :class: Discord.Guild :var dict emojis: The dictionary map of emojis that represent dic...
import os.path as osp import sys import torch import torch.nn as nn sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__)))) from criteria_comparing_sets_pcs.jsd_calculator import JsdCalculator from metrics_from_point_flow.evaluation_metrics import compute_all_metrics class AllMetricsCalculator(nn.Module):...
""" dynamic programming 1. state 2. transit function: stay, climb1, climb2 dp[i] the number of distinct ways to climb to the step i dp[i-1] dp[i-2] dp[i] = dp[i-1] + dp[i-2] initail condition: dp[0] = 0, dp[1] = 1 """ class Solution: def climbStairs(self, n: int) -> int: dp = [0]*(n+1) dp...
import logging from fastapi.logger import logger class WebLogger(object): @classmethod def set_new_loghandler(cls, filename): mylog = logging.FileHandler( filename=filename ) # , filemode='w', level=logging.INFO) mylog.setLevel(logging.INFO) mylog.setFormatter( ...
from urllib.request import urlopen from bs4 import BeautifulSoup import re html = urlopen('http://www.pythonscraping.com/pages/page3.html') soup = BeautifulSoup(html, 'html.parser') images = soup.findAll('img', {'src':re.compile('\.\.\/img\/gifts\/img.\.jpg')}) for image in images: print(image['src'])
import floppyforms as forms from django.template.loader import render_to_string from django.utils.safestring import mark_safe class ConfirmationWidget(forms.TextInput): def render(self, name, value=None, attrs=None): output = super(ConfirmationWidget, self).render( name, value=value, attrs=a...
import pytest from sciencebeam_trainer_delft.sequence_labelling.config import ModelConfig from sciencebeam_trainer_delft.sequence_labelling.models import ( CustomBidLSTM_CRF, BidLSTM_CRF_FEATURES, updated_implicit_model_config_props ) @pytest.fixture(name='model_config') def _model_config(): config =...
from __future__ import division import os import time import run_tests import iotbx.pdb import libtbx.load_env from libtbx.test_utils import approx_equal from scitbx.array_family import flex qrefine = libtbx.env.find_in_repositories("qrefine") qr_unit_tests = os.path.join(qrefine, "tests","unit") def run(prefix): ...
""" @Time : 2019/6/6 15:12 @author Logic923 @Project : src @FileName: util.py @Software: PyCharm """ import time def date_to_str(date): ''' 时间格式转换从%Y/ %m/ %d 转换为 %Y-%m-%d :param date: :return: ''' tempTime = time.strptime(date,'%Y/ %m/ %d') resTime = time.strftime('%Y-%m-%d',tempTime) ...
import requests import json import time ACCESS_TOKEN = '' class Commit(object): def __init__(self): self.sha = None self.url = None self.repository = None self.message = None self.nn = None self.rf = None self.languages_url = None def populate_la...
# coding=utf-8 import json import logging import uuid from datetime import datetime import traceback from json_logging import util from json_logging.framework_base import RequestAdapter, ResponseAdapter, AppRequestInstrumentationConfigurator, \ FrameworkConfigurator from json_logging.util import get_library_logger...
n = input() print(n[::-1])
names = ['Peter Parker', 'Clark Kent', 'Wade Wilson', 'Bruce Wayne'] heroes = ['Spiderman', 'Superman', 'Deadpool', 'Batman'] for peepee, poopoo in enumerate(names): peepee = heroes[peepee] print(f'{poopoo} is actually {peepee}')
# Licensed under a 3-clause BSD style license - see LICENSE.rst import os.path as op import itertools import warnings import numpy as np from numpy.testing import assert_allclose import pytest from astropy.table import Table from astropy.utils.exceptions import AstropyUserWarning from ..findstars import DAOStarFind...
#!/usr/bin/env python # coding: utf-8 from __future__ import unicode_literals from datetime import datetime import platform import uuid import socket import urllib import urllib.request import urllib.parse import json import sys import math from .version import __elk_version__, __version__ from urllib.parse import urlp...
# This code is part of Qiskit. # # (C) Copyright IBM 2021, 2022. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
#coding:utf-8 from ple.games.pong import Pong from ple import PLE import numpy as np def get_obs(env): # game_state = env.getGameState() # obs = list(game_state.values()) """ 预处理 210x160x3 uint8 frame into 6400 (80x80) 1维 float vector """ # image = env.getScreenRGB() # image = image[35:195] # 裁剪 ...
# Generated by Django 3.2.9 on 2021-11-20 19:33 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0001_initial'), ] operations = [ migrations.AddField( model_name='user', name='disabled', field...
import click from lxml import etree import xlrd, xlwt, mmap from xml.dom import minidom nsmap = {"xml": "http://www.w3.org/XML/1998/namespace"} def XLSDictReader(f, sheet_index=0): book = xlrd.open_workbook(file_contents=mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)) sheet = book.sheet_by_index(sheet...
#-*- coding:utf-8 -*- ############################################################################## # # Copyright (C) 2012 Michael Telahun Makonnen <mmakonnen@gmail.com>. # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero G...
from django.conf.urls import patterns, url from . import views urlpatterns = patterns('', url(r'^$', views.UserList.as_view(), name='user_list'), url(r'^edit/$', views.UserUpdate.as_view(), name='user_profile_edit'), url(r'^membership/$', views.MembershipUpdate.as_view(), name='user_membership_edit'), ...
# -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2018-02-11 01:08 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('recipes', '0024_auto_20180211_0104'), ] operations...
from typing import Optional, List from pydantic import StrictStr, StrictInt, StrictFloat, StrictBool from tensorfn.config import ( MainConfig, Config, Optimizer, Scheduler, DataLoader, Instance, ) import diffusion import model class Dataset(Config): name: StrictStr pa...
import sys import time import obspy import pyasdf import os, glob import datetime import numpy as np import pandas as pd from mpi4py import MPI import matplotlib.pyplot as plt from obspy.signal.filter import bandpass sys.path.insert(1,'../') import noise_module # register datetime converter from pandas.plotting impor...
# # (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible 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 your option) any later version. # # Ansible is d...
# -*- coding: utf-8 -*- modern_tech_stack_intro = "The vendor shall provide technology solutions which enable development teams to work efficiently and enable services to scale easily and cost-effectively. Recommendations for choices for hosting infrastructure, databases, software frameworks, programming languages and ...
import sys from matalg.executor import main, ErrorCode def test_main(): assert main([]) == ErrorCode.HELP_SHOWN assert main(["-f", "./algorithms/MT/clear.txt", "-T", "-M"]) == ErrorCode.BAD_MODEL assert main(["-f", "./algorithms/MT/clear.txt", "-T", "-i", "-3"]) == ErrorCode.BAD_TIMEOUT_VALUE assert ...
# Copyright 2020 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...
#coding:utf8 ''' Created on 2013-10-25 @author: lan (www.9miao.com) ''' PLAYER_PLAYER =1 PLAYER_PET = 2 MONSTER_MONSTER =1 MATRIXLIST = [100001,100002,100003,100004,100005,100006,100007,100008,100009] class BattleSide(object): '''战斗方类''' def __init__(self,character): '''初始化战斗方 ''' ...
# -*- coding: utf-8 -*- """ Created on Wed Jul 7 15:47:27 2021 @author: jpeacock """ # ============================================================================= # Imports # ============================================================================= from pathlib import Path from obspy.clients import fdsn from o...
# 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 ...