text
stringlengths
2
999k
# 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 ...
# encoding: utf-8 # STANDARD LIB from unittest import skipIf # THIRD PARTY from django.apps.registry import apps # Apps from django.conf import settings from django.db import connection, models from django.db.migrations.state import ProjectState from django.test import override_settings from google.appengine.api impo...
import csv import json csvfile = open('20180308.csv', 'r') jsonfile = open('20180308.json', 'w') reader = csv.DictReader(csvfile) out = json.dumps( [ row for row in reader ] ) jsonfile.write(out)
import json import os from typing import Mapping _TESTS_DIR_PATH = os.path.dirname(__file__) def get_test_file_path(path: str) -> str: filepath = os.path.join( _TESTS_DIR_PATH, path, ) return filepath def read_test_file_bytes(path: str) -> bytes: filepath = os.path.join( _T...
import os import sys import json import jsonschema from subprocess import Popen, PIPE from threading import Thread from traceback import format_exc from cc_container_worker.application_container.telemetry import Telemetry from cc_container_worker.commons.data import ac_download, ac_upload, tracing_upload from cc_conta...
from matplotlib import pyplot as plt import pandas as pd import numpy as np import math import scipy.stats as stats def inter_p_value(p_value): # interpretation if p_value >= 0 and p_value < 0.01: inter_p = 'Overwhelming Evidence' elif p_value >= 0.01 and p_value < 0.05: inter_p = 'Strong ...
#!/usr/bin/env python ##################################### # Installation module for gpp-decrypt ##################################### # AUTHOR OF MODULE NAME AUTHOR="Larry Spohn (Spoonman)" # DESCRIPTION OF THE MODULE DESCRIPTION="This module will install/upgrade gpp-decrypt - a tool for decrypting passwords found ...
#!/usr/bin/env python # # Copyright (c) 2001 - 2016 The SCons Foundation # # 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 us...
import inspect from abc import ABCMeta, abstractmethod from bottle import PluginError, request from conans.util.log import logger class AuthorizationHeader(object): """ Generic plugin to handle Authorization header. Must be extended and implement some abstract methods in subclasses """ __metaclass__ = A...
""" core implementation of testing process: init, session, runtest loop. """ import re import py import pytest, _pytest import os, sys, imp try: from collections import MutableMapping as MappingMixin except ImportError: from UserDict import DictMixin as MappingMixin from _pytest.runner import collect_one_node...
import numpy as np from PyQt5.QtCore import (QAbstractTableModel, QModelIndex, QObject, Qt, QVariant, pyqtProperty, pyqtSignal, pyqtSlot) from ..hub import Hub, Message class PlotDataModel(QAbstractTableModel): # DataRole = Qt.UserRole + 1 def __init__(self, *args, **kwargs): ...
import pretty_midi import glob import os import copy from collections import Counter from multiprocessing.dummy import Pool as ThreadPool from tqdm import tqdm # Import shared files import sys sys.path.append('..') from Shared_Files.Global_Util import * from Shared_Files.Constants import * import warnings warnings.f...
# Copyright 2019 Intel, 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 applicable law or agreed...
from utils import* from random import* formattedProxies = [] def chooseProxy(tasknum): if tasknum + 1 <= len(proxieslines): proxy = proxieslines[tasknum].rstrip() if tasknum + 1 > len(proxieslines): if len(proxieslines) > 1: a = randint(1, len(proxieslines) - 1) if len(proxieslines) == 1: a = 0 proxy...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re from .subtitles import SubtitlesInfoExtractor from ..compat import ( compat_urllib_request, compat_urllib_parse, compat_urllib_parse_urlparse, ) from ..utils import ( ExtractorError, float_or_none, ) class CeskaTelevizeIE(...
from collections.abc import Iterable, Mapping from typing import Any from profile_generator.feature.colors.white_balance.schema import DEFAULT from profile_generator.model.view import raw_therapee from profile_generator.model.view.raw_therapee import EqPoint, LinearEqPoint from profile_generator.schema import object_o...
""" Author: Shreck Ye Date: June 16, 2019 Time complexity: O(log(N)) Let's think in the mathematical way. Obviously, the recursion formula represents a linear relationship. By viewing it as a recursion formula of a single vector F_n = (f_n, f_{n + 1})' with a transition matrix M = (0, 1; 1, 1), which is (f_{n + 1}, f_...
stacks_data = [ { 'name': 'Python', 'image': '../assets/images/python.png' }, { 'name': 'Plotly', 'image': '../assets/images/plotly.png' }, { 'name': 'Dash', 'image': '../assets/images/dash.png' }, { 'name': 'Pandas', 'image': '...
# python imports import numpy as np from PIL import Image import torch from torch import nn, optim import torch.nn.functional as F from torchvision import datasets, transforms, models from collections import OrderedDict from sys import exit # File containing all of the functions used in the predict program def load_ch...
import logging from django.contrib.auth.models import User from django.db import models, transaction from django.db.models import Q from django.utils import timezone from eve_api.models import Structure, EVEPlayerCharacter, ObjectType from dataclasses import dataclass from django.apps import apps from django.core.cache...
# Copyright (c) 2012 OpenStack Foundation # 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 ...
import unittest from katas.kyu_6.regexp_basics_is_it_ipv4_address import ipv4_address class IPV4AddressTestCase(unittest.TestCase): def test_true(self): self.assertTrue(ipv4_address('127.0.0.1')) def test_true_2(self): self.assertTrue(ipv4_address('0.0.0.0')) def test_true_3(self): ...
import os import pytest from xebec.src import _validate as vd def test_validate_table(data_paths, tmp_path): err_biom = os.path.join(tmp_path, "err.biom") with open(err_biom, "w") as f: f.write("kachow") with pytest.raises(ValueError) as exc_info: vd.validate_table(err_biom) exp_err...
""" Copyright (C) 2018-2020 Intel 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 i...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import unittest import frappe import frappe.utils from frappe.desk.page.setup_wizard.install_fixtures import update_global_search_doctypes from frappe.test_runner import make_te...
#!/bin/python3 -*- coding: utf-8 -*- """ @Author : Jessy JOSE -- Pierre VAUDRY IPSA Aero1 - Prim2 Release date: 09/12/2020 [other information] Licence: MIT [Description] SMC is a security message communication. This program is the part of server program. The server uses the socket module to work. T...
# Django settings for test_project project. import os def map_path(directory_name): return os.path.join(os.path.dirname(__file__), '../' + directory_name).replace('\\', '/') DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = {...
import math from typing import Iterable from .base import BaseMeasure class OverlapMeasure(BaseMeasure): def __init__(self, db=None, maxsize: int = 100) -> None: super().__init__() if db: self.maxsize = db.max_feature_size() else: self.maxsize = maxsize def min...
from fastapi import Depends, HTTPException, status, Header from fastapi.security import OAuth2PasswordBearer from pydantic import ValidationError from jose import jwt from webapi.db.config import async_session from webapi.db import models, schemas from webapi.db.dals.user_dal import UserDAL from webapi.setting import ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Spaghetti: Web Application Security Scanner # # @url: https://github.com/m4ll0k/Spaghetti # @author: Momo Outaadi (M4ll0k) # @license: See the file 'doc/LICENSE' import re class Binarysec(): @staticmethod def Run(headers): _ = False try: ...
import RPi.GPIO as GPIO import time #0 #1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12 #13 #list=[261.6256|,293.6648|,329.6276|,349.2282|,391.9954|,440|,493.8833|,523.2511|,587.3295|,659.2551|,698.4565|,783.9909|,880|,987.7666] #num=[2,...
# -*- 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 © 2021 Province of British Columbia # # 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...
#!/usr/bin/env python """Memory Map File Analyser for ARM mbed""" import sys import os import re import csv import json import argparse from prettytable import PrettyTable from tools.utils import argparse_filestring_type, \ argparse_lowercase_hyphen_type, argparse_uppercase_type DEBUG = False RE_ARMCC = re.comp...
#!/usr/bin/env python3 """ 1. 实现微信消息的抓取 :author Wang Weiwei <email>weiwei02@vip.qq.com / weiwei.wang@100credit.com</email> :sine 2017/8/11 :version 1.0 """ import itchat,time import queue import _thread XIAOBING_ID = 'xiaoice-ms' msgQueue = queue.Queue(maxsize=100) @itchat.msg_register(itchat.conte...
""" isort:skip_file """ import pickle import pytest dask = pytest.importorskip("dask") # isort:skip distributed = pytest.importorskip("distributed") # isort:skip from dask.distributed import Client, Lock from distributed.utils_test import cluster, gen_cluster from distributed.utils_test import loop from distribute...
#!/usr/bin/env python3 # # LMS-AutoPlay # # Copyright (c) 2020 Craig Drummond <craig.p.drummond@gmail.com> # MIT license. # import hashlib import os import re import requests import shutil import sys REPO_XML = "repo.xml" PLUGIN_NAME = "VolumeCheck" PLUGIN_GIT_NAME = "lms-volumecheck" def info(s): print("INFO:...
import json import os from base64 import b64decode from datetime import timedelta from threading import Semaphore import github from dotmap import DotMap from github import GithubException from conan_inquiry.transformers.base import BaseGithubTransformer from conan_inquiry.util.general import render_readme from conan...
# 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! *** # Export this package's modules as members: from ._enums import * from .configuration_store import * from .get_configuration_store import * from .list_...
"""inventory URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/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-bas...
import higher from leap import Leap import numpy as np import os import torch import torch.nn as nn import gc def train(model, source_corpus, char2idx, args, device): model = model.to(device) optimizer = torch.optim.Adam(model.parameters(), lr=args.lr_init) lr_scheduler = torch.optim.lr_scheduler.ReduceLR...
import asyncio import collections import contextlib import functools from typing import ( Any, DefaultDict, Dict, List, Sequence, Set, Tuple, Type, TYPE_CHECKING, Union, ) from async_service import Service from async_service.asyncio import cleanup_tasks from cached_property imp...
a = str(input('Enter the number you want to reverse:')) b = (a[::-1]) c = int(b) print('the reversed number is',c)
# # This file is part of pretix (Community Edition). # # Copyright (C) 2014-2020 Raphael Michel and contributors # Copyright (C) 2020-2021 rami.io GmbH and contributors # # This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General # Public License as published by ...
# Generated by Django 2.1 on 2018-09-07 13:48 from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [("analytics", "0007_dependencyusage_version")] operations = [ migrations.AddField( ...
import argparse import sys import pprint from pygobo import OBOParser, query_generate if __name__ == '__main__': argparser = argparse.ArgumentParser(description='Article importer') argparser.add_argument('--host',help='Redis host',default='0.0.0.0') argparser.add_argument('--port',help='Redis port',type=int...
import keras from keras.models import Sequential from keras.models import load_model from keras.layers import Dense, LSTM, Dropout from keras.optimizers import Adam import numpy as np import random from collections import deque class Agent: def __init__(self, state_size, is_eval=False, model_name=""): sel...
from ..extensions import db from flask_login import UserMixin as FlaskLoginUser from uuid import uuid4 from damgard_jurik import keygen class Authority(db.Model, FlaskLoginUser): """ Implements an Authority class that can be accessed by flask-login and handled by flask-sqlalchemy. Any human has a unique A...
expected = "\x1b[3m Rich features \x1b[0m\n\x1b[1;31m \x1b[0m \n\x1b[1;31m \x1b[0m\x1b[1;31m Colors \x1b[0m\x1b[1;31m \x1b[0m✓ \x1...
from .auto_argparse import make_parser, parse_args_and_run
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2019 The MLIR 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 #...
# importing the requests library import sys, os if len(sys.argv) > 6: title = sys.argv[1] s = sys.argv[2] a = int(sys.argv[3]) b = int(sys.argv[4]) sourceLanguage = sys.argv[5] targetLanguage = sys.argv[6] else: print("please enter the title, season number, first episode number, last episo...
#!/usr/bin/python3 # Copyright 2020 Google LLC # Copyright 2021 Fraunhofer FKIE # # 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...
import unittest from core import collect class TestCollect(unittest.TestCase): def test_if_we_get_viz_release(self): mock_data = { "name": "a", "img": "img", "link": "link", "publisher": "publisher", } response = collect.get_viz()...
#!/usr/bin/python #-*-coding:utf-8 -*- # author: mld # email: miradel51@126.com # date : 2017/9/28 import sys import string import re def de_tokenizestr(original_str): after_de_tok = "" original_str = original_str.replace("[ ","[") original_str = original_str.replace(" ]","]") original_str =...
#!/usr/bin/env python3 """ Command line tool to publish balls on the /ball_in_image topic """ import rospy from humanoid_league_msgs.msg import BallInImage, BallInImageArray import sys import signal def _signal_term_handler(signal, frame): rospy.logerr('User Keyboard interrupt') sys.exit(0) if __name__ == ...
#!/usr/bin/env python # # ------------------------------------------------------------------------------------------------------# # Created by "Thieu Nguyen" at 02:05, 15/12/2019 # # ...
import json from django.core.exceptions import ObjectDoesNotExist import mock from curling.lib import HttpClientError from mock import ANY from nose.tools import eq_, ok_, raises from pyquery import PyQuery as pq import amo import amo.tests from amo.urlresolvers import reverse from addons.models import (Addon, Addon...
# # Copyright (c) 2017 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...
import numpy as np import pandas as pd import openturns as ot from .conf_file_generation import GENERATION_CONF, post_process_generated_dataset def sample_from_conf( var_conf: dict, corr_conf: dict, n_sample: int, seed: int = None ) -> pd.DataFrame: """ Generate dataset with n_sample form configuration f...
import os import sys sys.path.append(os.path.normpath(os.path.join(os.path.abspath(__file__), '..', '..', '..', "common"))) from env_indigo import * indigo = Indigo() for m in indigo.iterateSDFile(joinPathPy('molecules/partial_arom.sdf', __file__)): print("Smiles: " + m.smiles()) # count number of aromatic bonds...
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
import getopt, os, time, re, gzip, json, traceback import sys, uuid from config import DBConfig, Config from part import PartitionedList from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, Integer, String from sqlalchemy.orm import sessionmaker ...
# Copyright (c) 2020 # Author: xiaoweixiang import distutils.command.bdist_wininst as orig class bdist_wininst(orig.bdist_wininst): def reinitialize_command(self, command, reinit_subcommands=0): """ Supplement reinitialize_command to work around http://bugs.python.org/issue20819 ...
#!/usr/bin/env python3 # Copyright (c) 2015-2018 The Luascoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test node responses to invalid blocks. In this test we connect to one node over p2p, and test block r...
"""Pipeline class implementing Pipes and Filters pattern. A generic pipeline to process messages efficiently in a pipes-and-filter manner (multiprocessing possible). Inspired, but not copied from https://deparkes.co.uk/2019/12/08/simple-python-pipes-and-filters/ Authors: - Lukas Block - Adrian Raiser Todo:...
from setuptools import setup, find_packages setup(name="semparse", description="semparse", author="Sum-Ting Wong", author_email="sumting@wo.ng", install_requires=[], packages=["semparse"], )
# Copyright 2013-2022 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.package import * class PerlMoose(PerlPackage): """A postmodern object system for Perl 5""" homepage ...
import json from pyscf import gto,scf,mcscf, fci, lo, ci, cc from pyscf.scf import ROHF, UHF,ROKS import numpy as np import pandas as pd # THIS IS WERE IT STARTS ==================================== df=json.load(open("../../../trail.json")) spins={'Sc':1, 'Ti':2, 'V':3, 'Cr':6, 'Mn':5, 'Fe':4, 'Cu':1} nd={'Sc':(1,0...
class ALU(): def __init__(self): self.Rs = None self.Rt = None self.Rd = None def alu(self, opcode): if (opcode == 0): self.Rd = self.Rs + self.Rt return self.Rd elif (opcode == 1): self.Rd = self.Rs - self.Rt return self....
from .intraday import *
import numpy as np import matplotlib.pyplot as plt from matplotlib.collections import LineCollection,PolyCollection def showNetwork(network,savefig=None): node_x_coords=[] node_y_coords=[] link_coords=[] poi_coords=[] for _,node in network.node_dict.items(): node_x_coords.append(node.x_coo...
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
import random from pytest_bdd import given, when, then # пометки from model.group import Group # STEPS FOR ADD GROUP # предусловие @given('a group list', target_fixture="group_list") # эти штуки представляют собой фикстуры, а их можно передавать в кач-ве параметра, что мы сделали в ф-ции verify_group_added def grou...
# Generated by Django 3.1.4 on 2020-12-23 21:48 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('blackbook', '0013_add_uuid_to_other_models'), ] operations = [ migrations.AlterField( model_nam...
from typing import Union, Tuple from torch_geometric.typing import OptTensor, OptPairTensor, Adj, Size from torch import Tensor from torch_sparse import SparseTensor, matmul from torch_geometric.nn.dense.linear import Linear from torch_geometric.nn.conv import MessagePassing class GraphConv(MessagePassing): r"""...
from optparse import make_option from django.core.management.base import BaseCommand from apps.statistics.models import MStatistics class Command(BaseCommand): option_list = BaseCommand.option_list + ( ) def handle(self, *args, **options): MStatistics.collect_statistics()
# # This file is part of LiteX-Boards. # # Copyright (c) 2021 Brendan Christy <brendan.christy@hs-rm.de> # SPDX-License-Identifier: BSD-2-Clause from litex.build.generic_platform import * from litex.build.xilinx import XilinxPlatform, VivadoProgrammer from litex.build.openocd import OpenOCD # IOs --------------------...
from functools import total_ordering from django.db.migrations.state import ProjectState from .exceptions import CircularDependencyError, NodeNotFoundError @total_ordering class Node: """ A single node in the migration graph. Contains direct links to adjacent nodes in either direction. """ def _...
# compare contents of two files in binary form import sys def compareFile(srcFile,destFile): with open(srcFile,"rb") as src: srcData = src.read() with open(destFile,"rb") as dest: destData = dest.read() checked = False if(len(srcData)!=len(destData)): print("It unequal between ...
import math import itertools digits = [] def search(): for perm in itertools.combinations(digits, 6): total = 0.0 for x in perm: total += (1 / x) if total > 1.0: break if total == 1.0: print('Solution: ' + str(perm)) r...
# # Copyright (c) 2013-2018 Quarkslab. # This file is part of IRMA 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 in the top-level directory # of this distribution and at: # # http:...
"""Chartexchange view""" __docformat__ = "numpy" import os from tabulate import tabulate from gamestonk_terminal.helper_funcs import export_data from gamestonk_terminal import feature_flags as gtff from gamestonk_terminal.options import chartexchange_model def display_raw( export: str, ticker: str, date: str, ...
# coding: utf-8 # ---------------------------------------------------------------------------- # <copyright company="Aspose" file="ai_bcr_parse_request.py"> # Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved. # </copyright> # <summary> # Permission is hereby granted, free of charge, to any person ...
from typing import Dict from typing import List import numpy from fbsrankings.domain.model.affiliation import Subdivision from fbsrankings.domain.model.game import Game from fbsrankings.domain.model.game import GameStatus from fbsrankings.domain.model.ranking import Ranking from fbsrankings.domain.model.ranking impor...
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" from setuptools import setup, find_packages with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = [ "requests-futures", "xmltodi...
from django.conf.urls import url from rest_framework.routers import SimpleRouter, Route class DiscoveryAPIRouter(SimpleRouter): routes = [ # List route. Route( url=r'^{prefix}{trailing_slash}$', mapping={ 'get': 'list' }, name='...
import tracc import pandas as pd import numpy as np class costs: def __init__(self, travelcosts_df, columns = None ): """ Inputs data and prunes columns if desired """ if columns is not None: self.data = travelcosts_df[columns] else: ...
# Copyright 2018/2019 The RLgraph 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 time from http import HTTPStatus from typing import Dict, List, Optional, Type import pytest from aioauth.storage import BaseStorage from aioauth.config import Settings from aioauth.models import Token from aioauth.requests import Post, Request from aioauth.server import AuthorizationServer from aioauth.types i...
#ABC051d import sys input = sys.stdin.readline sys.setrecursionlimit(10**6)
""" Revision ID: 0256_set_postage_tmplt_hstr Revises: 0255_another_letter_org Create Date: 2019-02-05 14:51:30.808067 """ from alembic import op import sqlalchemy as sa revision = '0256_set_postage_tmplt_hstr' down_revision = '0255_another_letter_org' def upgrade(): # ### commands auto generated by Alembic - ...
#!/usr/bin/env python import vtk from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() import sys # create pipeline - structured grid # pl3d = vtk.vtkMultiBlockPLOT3DReader() pl3d.SetXYZFileName("" + str(VTK_DATA_ROOT) + "/Data/combxyz.bin") pl3d.SetQFileName("" + str(VTK_DATA_ROOT) + "/Data/combq....
from __future__ import absolute_import, division, print_function from scitbx import matrix from dials.algorithms.refinement.parameterisation.scan_varying_model_parameters import ( ScanVaryingParameterSet, ScanVaryingModelParameterisation, GaussianSmoother, ) from dials.algorithms.refinement.parameterisation...
# ElectrumSV - lightweight BitcoinSV client # Copyright (C) 2012 thomasv@gitorious # Copyright (C) 2019-2020 The ElectrumSV 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 withou...
import pygame import os import holder as ch import time textAsset = [] texture2D = os.listdir('texture2D') textAsset = os.listdir('textAsset') text_ = [] for text in textAsset: text_.append(text.split('.')) textAsset = [] for text in text_: textAsset.append(text[0]) textAsset = set(textAsset) te...
# -*- coding: utf-8 -*- from pyramid_oereb.standard.xtf_import.util import parse_string, parse_multilingual_text, parse_ref class PublicLawRestriction(object): TAG_INFORMATION = 'Aussage' TAG_SUB_THEME = 'SubThema' TAG_OTHER_THEME = 'WeiteresThema' TAG_TYPE_CODE = 'ArtCode' TAG_TYPE_CODE_LIST = '...
# Created by Andrzej Lach @ 2021 # https://github.com/AndrzejLach89 from aqa.math import * from varmain.primitiv import * from varmain.custom import * import math @activate(Group="Support", Ports=1, TooltipShort="Support - insulated, anchor", TooltipLong="Support - insulated, anchor", LengthUnit="mm") @group("MainD...
# -*- coding: utf-8 -*- __version__ = '20.9.1.dev0' PROJECT_NAME = "galaxy-util" PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" PROJECT_URL = "https://github.com/galaxyproject/galaxy" PROJECT_AUTHOR = 'Galaxy Project and Community' PROJECT_DESCRIPTION = 'Galaxy Generic Utilities' PROJECT_EMAIL = 'galaxy-committers...
''' Training a trivial parametric monomial function "wx" (with no bias parameter) to approximate the true hypothesis f(x)= 2x given 3 datapoints of observation (1, 2),(2, 4),(3, 6) This learner has no practical usage (hence, its name). We are using non-stochastic gradient descent and running weig...