text
stringlengths
2
999k
__version__ = '0.17.7'
# Generated by Django 2.1.15 on 2021-01-02 06:07 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.CreateModel( ...
# # Copyright (c) 2006-2013 Christopher L. Felton # from myhdl import * S_BYTE0 = 0 S_BYTE1 = 1 S_CMD = 2 S_ADDRH = 3 S_ADDRL = 4 S_LEN = 5 S_BYTE6 = 6 S_BYTE7 = 7 S_WB_BUS = 8 S_GET_BYTE0 = 0 S_GET_BYTE1 = 1 S_GET_CMD = 2 S_GET_ADDRH = 3 S_GET_ADDRL = 4 S_GET_LEN = 5 S_GET_BYTE6 = 6 S_GET_BYT...
#!/usr/bin/python import csv import rospy import rospkg import cv_bridge import message_filters from std_msgs.msg import * from sensor_msgs.msg import * from geometry_msgs.msg import * from opt_msgs.msg import * from dynamic_reconfigure.server import Server from recognition.cfg import FaceFeatureExtractionConfig from ...
class Solution: def findRedundantConnection(self, edges): """ :type edges: List[List[int]] :rtype: List[int] """ N = len(edges) cc = dict() # connected components for i in range(N): cc[i + 1] = {i + 1} for u, v in edges: if cc...
import FWCore.ParameterSet.Config as cms process = cms.Process("CALIB") process.MessageLogger = cms.Service("MessageLogger", debugModules = cms.untracked.vstring(''), cout = cms.untracked.PSet( threshold = cms.untracked.string('INFO') ), destinations = cms.untracked.vstring('cout') ) process....
# Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # # LICENSE.txt # Vispy licensing terms # --------------------- # Vispy is licensed under the terms of the (new) BSD license: # # Copyright (c) 2013-2017, Vispy Development Team. All ...
""" Desenvolva uma lógica que leia o peso e a altura de uma pessoa, calcule seu IMC e mostre seu status, de acordo com a tabela abaixo: -Abaixo de 18.5: Abaixo do Peso; -Entre 18.5 e 25: Peso ideal; -25 até 30: Sobrepeso; -30 até 40: Obesidade; -Acima de 40: Obesidade mórbida; """ peso = float(input('Peso:')) altura...
from oauth2_provider.views import AuthorizationView from oauth2_provider.models import Application from oauth2_provider.views.application import ApplicationOwnerIsUserMixin from braces.views import LoginRequiredMixin from django.views.generic import CreateView, UpdateView from django.core.urlresolvers import reverse fr...
def to_molsysmt_Trajectory(item, selection='all', frame_indices='all', syntaxis='MolSysMT'): from molsysmt.tools.file_inpcrd import is_file_inpcrd from molsysmt.basic import convert if not is_file_inpcrd(item): raise ValueError tmp_item = convert(item, 'molsysmt.Trajectory', selection=selecti...
from call_seq import trace def test2(): pass def test1(): test2() return 1 + 1 def test(): test1() print 'call me' test1() @trace('output.json') def main(): test() if __name__ == '__main__': main()
import init_order assert init_order.initialized print('second')
from __future__ import unicode_literals import copy import itertools import ipaddress import json import os import re import six import warnings from pkg_resources import resource_filename import boto.ec2 from collections import defaultdict import weakref from datetime import datetime from boto.ec2.instance import I...
# Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'targets': [ { 'target_name': 'test_target_link_x86', 'type': 'executable', 'msvs_settings': { 'VCLinkerTool': { ...
from argparse import Namespace import os import torch import logging import json import numpy as np from tqdm import tqdm from fairseq import metrics, options, utils from fairseq.data import Dictionary, TaggedDataset from fairseq.tasks import FairseqTask, register_task import sentencepiece as spm EVAL_BLEU_ORDER = 4 ...
# # Example python script to generate a BOM from a KiCad generic netlist # # Example: Sorted and Grouped CSV BOM # """ @package Generate a Tab delimited list (csv file type). Components are sorted by ref and grouped by value with same footprint Fields are (if exist) 'Ref', 'Qnty', 'Value', 'Cmp nam...
#!/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", "allocator_2.settings") try: from django.core.management import execute_from_command_line except ...
import torch def corner_to_center(xmin, ymin, xmax, ymax): cx, cy = (xmin + xmax) / 2, (ymin + ymax) / 2 w = xmax - xmin h = ymax - ymin return cx, cy, w, h def center_to_corner(cx, cy, w, h): xmin, ymin = cx - 0.5 * w, cy - 0.5 * h xmax, ymax = cx + 0.5 * w, cy + 0.5 * h return xmin, ymin...
import matplotlib.pyplot as plt x=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] ,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,...
""" MTGJSON Set Builder """ import json import logging import pathlib import re import unicodedata import uuid from typing import Any, Dict, List, Optional, Set, Tuple from . import consts from .classes import ( MtgjsonCardObject, MtgjsonForeignDataObject, MtgjsonGameFormatsObject, MtgjsonLeadershipSki...
countries = ['uk','usa','france','swiss'] #countries.append('iceland') '''countries.insert(0,"spain") print(countries) del countries[0] print(countries) for country in countries: print(country) ''' for value in range(1,5): print(value)
#!/usr/bin/env python # -*- coding: utf-8 -*- # # python_boilerplate documentation build configuration file, created by # sphinx-quickstart on Fri Jun 9 13:47:02 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in...
import mysql.connector # mydb = connector.connect(host="localhost", user="liopun", passwd="zxc123") mydb = mysql.connector.connect( host="localhost", user="root", passwd="zxc123", database="liopun" ) mycursor = mydb.cursor() mycursor.execute("select * from student") for x in mycursor: print(x)
# -- encoding: UTF-8 -- from io import BytesIO import pytest from babel.messages import extract def test_django_translate(): buf = BytesIO(br""" {% translate "foo" %} """) messages = list(extract.extract('django', buf, extract.DEFAULT_KEYWORDS, [], {})) assert messages[0...
# -*- coding: utf-8 -*- """ Created on Fri Jun 21 19:42:45 2019 @author: adwait """ # import matplotlib.pyplot as plt import numpy as np # import glob import os.path # from tkinter import filedialog from PyQt5.QtWidgets import QFileDialog import tkinter as tk from statistics import mean, stdev from scipy...
x = 0 entrada = int(input()) while x < entrada: lista = input().split() a = float(lista[0]) b = float(lista[1]) c = float(lista[2]) media =(((a*2)+(b*3)+(c*5))/10) print('%.1f' %media) x +=1
# Collects a time save per pass based on largest part dimension # Defaults to two passes (one for each side) # Lines out number of passes to update at quote time units_in() sheet_metal = analyze_sheet_metal() setup_time = var('setup_time', 0.1, 'Setup time in hours', number) runtime = var('runtime', 0, 'Runtime in ho...
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickformatstop(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.polar.angularaxis" _path_str = "layout.polar.angularaxis.tickformatstop" _...
( ( ( nu*(2*Gm*(9*nu - 5) + (6*c**2 + (-15*nu + 5)*v(t)**2)*r(t))*r(t)/(3*c**3) )*nHat*nHat*S ) +( ( delta*nu*(Gm*(11*nu - 10) + (6*c**2 + (-25*nu + 5)*v(t)**2)*r(t))*r(t)/(3*c**3) )*nHat*nHat*SigmaVec ) +( ( 2*nu*(-delta*(7*nu - 2)*(Sigma_lambda*sin(t*v(t)**3) + Sigma_n*cos(t*v(t)**3)) + (-6*nu + 2)*(S_lambda*sin(t*...
# orm/properties.py # Copyright (C) 2005-2020 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """MapperProperty implementations. This is a private module which defines the beh...
class Collection: def __init__(self, type, name, fields = [], *args): self.type = type self.name = name self.fields = fields
import setuptools setuptools.setup( name='easy-beam-pipeline', version='0.1.0', install_requires=[], packages=setuptools.find_packages(), )
# Copyright 2022 Jared Hendrickson # # 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 python3 # -*- coding: utf-8 -*- """ Created on Sat Jun 13 21:53:10 2020 @author: Dequan """ # Python ≥3.5 is required import sys assert sys.version_info >= (3, 5) # Scikit-Learn ≥0.20 is required import sklearn assert sklearn.__version__ >= "0.20" # Common imports import numpy as np import os from sk...
"""Provide the RedditBase class.""" from typing import TYPE_CHECKING, Any, Dict, Optional, Union from urllib.parse import urlparse from ...exceptions import InvalidURL from ..base import PRAWBase if TYPE_CHECKING: # pragma: no cover from .... import praw class RedditBase(PRAWBase): """Base class that repre...
#!/usr/bin/env python # coding=utf-8 import tensorflow as tf #============================ setting =========================================== tf.logging.set_verbosity(tf.logging.INFO) #layers = tf.layers layer = tf.contrib.framework.add_arg_scope(tf.layers.conv1d) slim = tf.contrib.slim print_fn = tf.logging.info # ...
from django.http import HttpResponse, HttpResponseRedirect from django.template import loader, RequestContext from django.shortcuts import render from django.contrib.auth.decorators import login_required @login_required def member_index(request): t = loader.get_template('member/member-index.html') c = {} # {...
T= int(input()) for i in range(T): Amin,Bmin,Cmin,Tmin,A,B,C = map(int,input().split()) if ((Amin<=A) and (Bmin<=B) and (Cmin<=C) and (Tmin<=A+B+C)): print("YES") else: print("NO")
# -*- coding: utf-8 -*- """ Artin Groups Artin groups are implemented as a particular case of finitely presented groups. For finite-type Artin groups, there is a specific left normal form using the Garside structure associated to the lift the long element of the corresponding Coxeter group. AUTHORS: - Travis Scrimsh...
from tkinter import filedialog from tkinter import * import copy import shutil import sys import os import locg import comicvine import comicutil import archiveutil import imageutil import config import comixology import comicdb from comicapi import comicinfoxml, filenameparser SETTINGS = config.get_config() REMOVE_S...
import pytest from hypothesis import given, assume, strategies as st from hypothesis.stateful import rule, precondition, RuleBasedStateMachine import numpy as np from .context import ( BaseInstrument, ToolkitError, DeviceTypes, ZIConnection, ziDiscovery, ) class DiscoveryMock: def find(self, ...
from _pydevd_bundle.pydevd_constants import dict_iter_values, IS_PY24 from _pydev_bundle import pydev_log from _pydevd_bundle import pydevd_import_class from _pydevd_bundle.pydevd_frame_utils import add_exception_to_frame from _pydev_imps._pydev_saved_modules import threading class ExceptionBreakpoint(object):...
# 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 u...
a=input("Enter the day:") if a==("sunday")or("SUNDAY")or("SATURDAY")or("saturday"): print("yes") else: print("no")
from gwf import Workflow, AnonymousTarget import os """ This workflow is made to run fs in a slurm/gwf compliant way, which means that all processes have to be defined before the code is run """ """ By Erik Fogh Sørensen """ # # Variable definitions # gwf = Workflow(defaults={"account": "baboondiversity"}) run_name...
""" Copyright 2020 The OneFlow 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 applicable law or agr...
# -*- coding:UTF-8 -*- try: import json except ImportError: import simplejson as json print(json.dumps({'python':2.7}))
''' Module consists of functions to test ''' import requests from requests.exceptions import ConnectionError from typing import List, Union def my_mean(in_list: List[Union[int, float]]) -> float: """ Calculates mean of the provided list """ summ = 0 count = 0 for i in in_list: ...
from collections import namedtuple name = "name" nt = namedtuple(name, ["x", "y"])
"""Users serializers.""" # Django from django.contrib.auth import password_validation, authenticate from django.core.validators import RegexValidator, FileExtensionValidator # Django REST Framework from rest_framework import serializers from rest_framework.authtoken.models import Token from rest_framework.validators ...
import sys sys.path.insert(1, "../../") import h2o, tests def pyunit_assign(): pros = h2o.import_file(tests.locate("smalldata/prostate/prostate.csv")) pq = pros.quantile() PSA_outliers = pros[pros["PSA"] <= pq[1,1] or pros["PSA"] >= pq[1,9]] PSA_outliers = h2o.assign(PSA_outliers, "PSA.outliers") ...
from simpleconsent.settings import * BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # overwrite default database DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', }, }
# # PySNMP MIB module ADTRAN-AOSSNMP (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ADTRAN-AOSSNMP # Produced by pysmi-0.3.4 at Wed May 1 11:14:24 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2...
# coding:utf-8 from django import forms from django.conf import settings from django.contrib.admin.widgets import AdminTextareaWidget from django.template.loader import render_to_string from django.utils.safestring import mark_safe from django.utils.http import urlencode # import settings as USettings from . import set...
from nanome_workspace_manager import WorkspaceManager if __name__ == '__main__': WorkspaceManager.main()
#!/usr/bin/env python # vim:ts=4:sts=4:sw=4:et # # Author: Hari Sekhon # Date: 2015-11-29 15:32:25 +0000 (Sun, 29 Nov 2015) # # https://github.com/HariSekhon/DevOps-Python-tools # # License: see accompanying Hari Sekhon LICENSE file # # If you're using my code you're welcome to connect with me on LinkedIn # and ...
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, 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 cop...
def executeOnCaeStartup(): """ execute onCaeStartup function in the relevant namespace """ # callStartupMethod('onCaeStartup') pass
# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source 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 re...
import pytest @pytest.fixture(scope="session") def setupSession2(): print("\nSetting up Session 2") @pytest.fixture(scope="module", autouse=True) def setupModule2(): print("\nSetting up Module 2") @pytest.fixture(scope="function", autouse=True) def setupFunction2(): print("\nSetting up Function 2") ...
# AMZ-Driverless # Copyright (c) 2019 Authors: # - Huub Hendrikx <hhendrik@ethz.ch> # # 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 ...
list1 = [10,9,3,7,2,1,23,1,561,1,1,96,1] def cmp1(x,y): if x == 1 or y==1: c = y-x else: c = x-y return c list1.sort(cmp = cmp1) print list1
# GENERATED BY KOMAND SDK - DO NOT EDIT from .action import GetCases
# SPDX-License-Identifier: Apache-2.0 """ Tests scikit-learn's binarizer converter. """ import unittest import numpy as np from numpy.testing import assert_almost_equal from onnxruntime import InferenceSession from sklearn.base import BaseEstimator, TransformerMixin from sklearn.datasets import load_iris from sklearn....
#!/usr/bin/env python # -*- coding:utf-8 -*- # ============================================================================= __author__ = "Matthias Morath" __copyright__ = "Copyright 2021" __credits__ = ["Matthias Morath"] __license__ = "GPL" __version__ = "2.0" __maintainer__ = "Matthias Morath" __email__ = "matthias...
#!/usr/bin/env python from aparse import click from typing import List from viewformer.utils import SplitIndices from viewformer.data import transform_dataset # Use memory growth for tf try: import tensorflow as tf gpus = tf.config.list_physical_devices('GPU') if gpus: # Currently, memory growth ne...
# coding: utf-8 """ CONS3RT Web API A CONS3RT ReSTful API # noqa: E501 The version of the OpenAPI document: 1.0.0 Contact: apiteam@swagger.io Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unittest import openapi_client from openapi_client.mode...
#10. Faça uma função no Python que, utilizando a ferramenta turtle, #desenhe um quadrado de lado N. import turtle tamanho_lado=0 while (tamanho_lado==0 ): tamanho_lado = int(input('Tamanho do lado: ')) def deseha_quadrado(tam): for count in range(4): turtle.forward(tam) turtle.left(90) ...
# Configure jdbcUrl jdbcUrl = "jdbc:sqlserver://[DBSERVER]:1433;database=[DATABASE]" # Loading data from a JDBC source jdbcDF = (spark .read .format("jdbc") .option("url", jdbcUrl) .option("dbtable", "[TABLENAME]") .option("user", "[USERNAME]") .option("password", "[PASSWORD]") .load()) # Saving data to...
from firestoreauth import FirestoreAuth def create_new_user(): try: with FirestoreAuth('__all') as ctx: ctx.create_user('rob', 'xxx') except Exception as e: print(str(e)) def login(): print('logging in') try: with FirestoreAuth('__all', 'rob', 'xxx') as ctx: tes...
from Models.Analysis import Analysis from Models.Detection import Detection from Services.Writers.ReportWriter import ReportWriter class CSVReportWriter(ReportWriter): def __init__(self, analysis: Analysis, separator=";", shape=Detection.DefaultDetectionShape()): self._separator = separator ...
# -*- coding: utf-8 -*- # perceptron_primal.py """ Created by jin.xia on May 09 2017 @author: jin.xia """ import os import operator import numpy as np # class perceptron_primal(): def __init__(self, learning_rate=1): self.learning_rate = learning_rate self.w = [] self.b = 0 def learning(self, training_...
# -*- coding: utf-8 -*- # Copyright 2022 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...
#!/usr/bin/env python import sys import os import subprocess import re STREAM_PATTERN = re.compile(r'^\s*Stream\s+#(\d+):(\d+)(?:\(eng\))?:.+$') def iterate_mkvs(path): for root, dirs, files in os.walk(path): for f in files: if f.endswith('.mkv'): yield os.path.join(root, f) def get_english_streams(file): ...
s = list(S) ans = [] for i in range(n): count = 0 for j in range(i+1,n): if s[j]<s[i]: count+=1 ans.append(count) return ans
#!/usr/bin/env python2 ############################################################################ # Copyright (C) 2009, Willow Garage, Inc. # # Copyright (C) 2013 by Ralf Kaestner # # ralf.kaestner@gmail.com ...
"""Test script for the grp module.""" import grp import unittest from test import test_support class GroupDatabaseTestCase(unittest.TestCase): def check_value(self, value): # check that a grp tuple has the entries and # attributes promised by the docs self.assertEqual(len(value), 4) ...
""" The MIT License (MIT) Copyright (c) 2015 <Satyajit Sarangi> 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, ...
# # 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...
""" Utilities for using DynaMake. """ from dynamake.make import * # pylint: disable=wildcard-import,unused-wildcard-import from dynamake.make import reset_make as dm_reset_make from tgutils.application import * # pylint: disable=wildcard-import,unused-wildcard-import def tg_require(*paths: Strings) -> None: ""...
"""OutcomeImports API Version 1.0. This API client was generated using a template. Make sure this code is valid before using it. """ import logging from datetime import date, datetime from .base import BaseCanvasAPI from .base import BaseModel class OutcomeImportsAPI(BaseCanvasAPI): """OutcomeImports API Version...
# Copyright Amazon.com, Inc. or its 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompan...
# Time: O(n) # Space: O(1) # 860 # At a lemonade stand, each lemonade costs $5. # # Customers are standing in a queue to buy from you, # and order one at a time (in the order specified by bills). # # Each customer will only buy one lemonade and pay with either a $5, $10, # or $20 bill. You must provide the correct c...
import re import requests import sqlite3 gsi_endpoint = { 'revgeocode':'https://mreversegeocoder.gsi.go.jp/reverse-geocoder/LonLatToAddress', 'elevation':'https://cyberjapandata2.gsi.go.jp/general/dem/scripts/getelevation.php' } def lookup_muniCode(m): conn = sqlite3.connect('munitable.db') cur ...
from .base import * # noqa from .base import env # GENERAL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#debug DEBUG = True # https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET_KEY = env( "DJANGO_SECRET_KEY...
class UwUFilePathFucked(self): """Exception thrown when host cant be reached Attr: objName """ def __init__(self, objName, message=''): self.objName = objName self.message = message super().__init__(message) def __str__(self): return f'{self.objName} ...
import numpy as np import matplotlib.pyplot as plt import seaborn as sns import pandas as pd import os, os.path import argparse parser = argparse.ArgumentParser() parser.add_argument('--dataset', type=str, default='50', help='50 or gtea') parser.add_argument('--pooling', type=str, help='gaussian or binary') args = pa...
__author__ = 'Johannes Theodoridis' # standard imports import os import copy # third party imports import numpy as np import pygame from pygame import K_UP, K_DOWN, K_LEFT, K_RIGHT, K_COMMA, K_PERIOD, K_F15 # local imports from . import map from . import utils MANUAL=False #RANDOM=False RANDOM_NPC=False # orientat...
from django.db import models from django.core.urlresolvers import reverse from django.conf import settings class List(models.Model): owner = models.ForeignKey(settings.AUTH_USER_MODEL, blank=True, null=True) def get_absolute_url(self): return reverse('view_list', args=[self.id]) @property d...
""" ASGI config for trydjang project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETT...
from setuptools import setup, find_packages import glob config_files = [name.replace("landia/", "", 1) for name in glob.glob("landia/survival/**", recursive=True)] binary_files = [name.replace("landia/", "", 1) for name in glob.glob("landia/assets/**", recursive=True)] additional_files = binary_files + config_files ...
# Generated by Django 2.2.3 on 2019-07-17 14:07 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('product', '0003_auto_20190717_0234'), ] operations = [ migrations.AlterModelOptions( name='pric...
# This file is Copyright (c) 2020 Richard Prinz <richard.prinz@min.at> # License: BSD from litex.build.generic_platform import * from litex.build.xilinx import XilinxPlatform, XC3SProg, VivadoProgrammer from litex.build.openocd import OpenOCD # IOs ---------------------------------------------------------------------...
listAlready = [] list1 = input('Введите символы: ') list2 = input('Введите ещё символов: ') for char1 in list1: for char2 in list2: if (char1 in char2): if (char1 not in listAlready): print(char1) listAlready.append(char1)
# # PySNMP MIB module ALTEON-ASF-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ALTEON-ASF-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:20:52 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2...
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: v1.14.7 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unittest import kube...
from stable_baselines3.common.callbacks import BaseCallback from pandemic_simulator.environment.interfaces import sorted_infection_summary import wandb import numpy as np class WandbCallback(BaseCallback): """ A wandb logging callback that derives from ``BaseCallback``. :param verbose: (int) Verbosity...
from tests import reem_testing_kvs reem_testing_kvs.test_store_under_non_existant_top_key() reem_testing_kvs.test_store_under_non_existant_sub_key() reem_testing_kvs.test_kvs_upload_all() reem_testing_kvs.test_store_non_dict() reem_testing_kvs.test_new_key_read()
#!/usr/bin/env python3 import sys import argparse import numpy as np from qcore.timeseries import BBSeis from qcore.timeseries import HFSeis # the ratio of allowed zero's before being flagged as failed, 0.01 = 1% ZERO_COUNT_THRESHOLD = 0.01 if __name__ == "__main__": parser = argparse.ArgumentParser() parse...
import hashlib import subprocess import time import pytest from lib import ( TestConfig, assert_contains_hash, get_principals, load_env, outputs_audit_log, run_command, run_command_with_agent, simulate_two_teams, ) defaultTeamName = TestConfig.getDefaultTestConfig().subteam test_env_1_...