gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# -*- 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...
# # 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...
# Copyright 2008-2014 Nokia Solutions and Networks # # 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 copy import os from bgwgen import qe fixtures_dir = os.path.join('tests', 'fixtures', '1-qe') config = { '&control': { 'prefix': '\'MoS2\'', 'pseudo_dir': '\'../pseudo\'', }, '&system': { 'ibrav': '4', 'celldm(1)': '3.169', 'celldm(3)': '20.0', 'ecutw...
#!/usr/bin/env python __author__ = "Gabriel Bassett" """ AUTHOR: {0} DATE: <DATE> DEPENDENCIES: <a list of modules requiring installation> Copyright <YEAR> {0} LICENSE: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this wo...
"""Directory-related unit tests for AD Connect Directory Services. The logic to check the details of VPCs and Subnets is shared between the "create directory" APIs, so it will not be repeated here. """ from datetime import datetime, timezone import boto3 from botocore.exceptions import ClientError import pytest from...
# 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 the...
# -*- coding: UTF-8 -*- import os, sys import datetime import time from redis_model.redis_client import RedisClient from redis_model.models.mongo_utils import * class MAttribute(object): redis = RedisClient.getInstance().redis def __init__(self): """ intialize base object reference object description ...
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'valerio cosentino' from util.db_util import DbUtil class GitDao(): """ This class handles the persistence and retrieval of Git data """ def __init__(self, config, logger): """ :type config: dict :param config: the DB...
import filecmp import os import shutil import tempfile import unittest from test import support from test.support import os_helper class FileCompareTestCase(unittest.TestCase): def setUp(self): self.name = os_helper.TESTFN self.name_same = os_helper.TESTFN + '-same' self.name_diff = os_he...
"""This is the main collection of functions that redrain uses to do basically everything. """ import time import re import os import urllib from feedparser import parse from re import search, match from datetime import datetime import sys # globals CONFIG = dict() # basic config file, for bootstrapping everythin...
# Copyright 2013 The Swarming Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 that # can be found in the LICENSE file. """Classes and functions for generic network communication over HTTP.""" import cookielib import cStringIO as StringIO import datetime import...
# -*- coding: utf-8 -*- # # 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 #...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Ver...
"""Translation helper functions.""" import functools import gettext as gettext_module import os import re import sys import warnings from collections import OrderedDict from threading import local from django.apps import apps from django.conf import settings from django.conf.locale import LANG_INFO from django.core.ex...
import base64 import json from twisted.internet.defer import inlineCallbacks, DeferredQueue, returnValue from twisted.web.http_headers import Headers from twisted.web import http from twisted.web.server import NOT_DONE_YET from vumi.config import ConfigContext from vumi.message import TransportUserMessage, TransportE...
# # lasoverlapPro.py # # (c) 2013, martin isenburg - http://rapidlasso.com # rapidlasso GmbH - fast tools to catch reality # # uses lasoverlap.exe to check the flightline overlap # and alignment for a folder of LiDAR files # # LiDAR input: LAS/LAZ/BIN/TXT/SHP/BIL/ASC/DTM # raster output: BIL/ASC/IMG/TIF/DTM/PNG/J...
""" Copyright (C) 2010 - 2013 TopCoder Inc., All Rights Reserved. This module contains the definitions of syntax tree nodes. Each node class defines the __repr__ method to support repr() actions on these node objects for debugging purposes, which converts a syntax tree to a linear form. In order to support future ex...
import numpy from orangecontrib.xoppy.util.xoppy_undulators import xoppy_calc_undulator_power_density, xoppy_calc_undulator_spectrum from orangecontrib.xoppy.util.xoppy_xraylib_util import xpower_calc from orangecontrib.xoppy.util.fit_gaussian2d import fit_gaussian2d, info_params, twoD_Gaussian from srxraylib.plot.go...
# coding=utf-8 # Copyright 2019 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
# Copyright 2021 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 agreed to in writing, ...
""" Provide authentication using simple LDAP binds :depends: - ldap Python module """ import itertools import logging import salt.utils.data import salt.utils.stringutils from jinja2 import Environment from salt.exceptions import CommandExecutionError, SaltInvocationError log = logging.getLogger(__name__) try: ...
# Copyright (c) 2013 Mirantis 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 to in writ...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Helper script to repack paks for a list of locales. Gyp doesn't have any built-in looping capability, so this just provides a w...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
#!/usr/bin/env python # Lint as: python3 """Prometheus-based statistics collection.""" import collections from typing import Dict, Text import prometheus_client import six from grr_response_core.lib import utils from grr_response_core.lib.rdfvalues import stats as rdf_stats from grr_response_core.lib.util import co...
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function from asn1crypto import pem, x509 from oscrypto import trust_list from ._errors import pretty_message from ._types import byte_cls, type_name from .errors import PathBuildingError, DuplicateCertificateError from .path im...
# Zed Attack Proxy (ZAP) and its related class files. # # ZAP is an HTTP/HTTPS proxy for assessing web application security. # # Copyright 2016 the ZAP development team # # 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...
import os # Path helper location = lambda x: os.path.join( os.path.dirname(os.path.realpath(__file__)), x) USE_TZ = True DEBUG = True TEMPLATE_DEBUG = True SQL_DEBUG = True ALLOWED_HOSTS = ['latest.oscarcommerce.com', 'sandbox.oscar.tangentlabs.co.uk', 'master.oscarcommerce.com...
import errno import json import os import platform import shutil import stat import subprocess import sys import tempfile from contextlib import contextmanager from zipfile import ZipFile import requests import toml from packaging.requirements import Requirement from packaging.specifiers import SpecifierSet from virtu...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Expenditure' db.create_table('lobbyingph_expenditure', ( ('id', self.gf('django....
#!/usr/bin/env python # -*- coding: utf-8 -*- """Plot flux graphs.""" import numpy as np from astropy import log from astropy.time import Time import copy from . import config, graph ############ # CONSTANTS ############ DEFAULT_MIN_METEORS = 100 # meteors DEFAULT_MIN_ECA = 50000 # km^2 h DEFAULT_MIN_ECA_STATION ...
#!/usr/bin/python # -*- coding: utf-8 -*- import unittest import numpy import rmgpy.quantity from rmgpy.molecule import Molecule from rmgpy.species import Species from rmgpy.reaction import Reaction from rmgpy.kinetics import Arrhenius from rmgpy.thermo import ThermoData from rmgpy.solver.simple import SimpleReactor...
# 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 ...
from .requests_mixin import RequestsMixin from .exceptions import ResponseDispatchError from .exceptions import InvalidMessageNameException from .exceptions import AuthenticationError, InvalidParametersError, AuthorizationError, ResourceNotFoundError import concurrent.futures import time class MessageSenderMixin(Req...
import os import json from ansible import constants as C from ansible.plugins.callback import CallbackBase from django.conf import settings try: from __main__ import display as global_display except ImportError: from ansible.utils.display import Display global_display = Display() class AdHocCallback(Cal...
#coding: UTF-8 from seahub.share.models import FileShare, UploadLinkShare from seahub.test_utils import BaseTestCase from tests.common.utils import urljoin, randstring from tests.api.apitestbase import ApiTestBase from tests.api.urls import SHARED_LINKS_URL #class SharesApiTest(ApiTestBase): # def test_create_file...
# Copyright 2017 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...
from __future__ import unicode_literals from django.contrib.auth.models import User from kgb import SpyAgency from reviewboard.accounts.models import Profile, LocalSiteProfile from reviewboard.reviews.errors import NotModifiedError from reviewboard.reviews.models import (Group, ReviewRequest, ...
#!/usr/bin/env python from __future__ import print_function import logging import os import subprocess import textwrap import warnings from datetime import datetime import argparse from builtins import input from collections import namedtuple from dateutil.parser import parse as parsedate import json import daemon fr...
import re from rest_framework import serializers from pyparsing import ParseException from lims.permissions.permissions import SerializerPermissionsMixin from lims.equipment.models import Equipment from lims.filetemplate.models import FileTemplate from lims.inventory.models import ItemType, AmountMeasure from lims.i...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.python import ( core, gradient_checker, rnn_cell, workspace, scope, utils ) from caffe2.python.attention import AttentionType from caffe2.python.model_hel...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from classytags.arguments import Argument from classytags.core import Options, Tag from classytags.helpers import InclusionTag from cms.constants import PUBLISHER_STATE_PENDING from django import template from django.conf import settings from django.cont...
import os import platform import textwrap import unittest import pytest from parameterized import parameterized_class from conans.test.assets.genconanfile import GenConanfile from conans.test.assets.pkg_cmake import pkg_cmake from conans.test.assets.sources import gen_function_cpp, gen_function_h from conans.test.ass...
""" Grants are the heart of OAuth 2.0. Each Grant defines one way for a client to retrieve an authorization. They are defined in `Section 4 <http://tools.ietf.org/html/rfc6749#section-4>`_ of the OAuth 2.0 spec. OAuth 2.0 comes in two flavours of how an access token is issued: two-legged and three-legged auth. To avoi...
#!/usr/bin/env python3 """Generate an updated requirements_all.txt.""" import difflib import importlib import os from pathlib import Path import pkgutil import re import sys from script.hassfest.model import Integration from homeassistant.util.yaml.loader import load_yaml COMMENT_REQUIREMENTS = ( "Adafruit_BBIO"...
# -*- coding: utf-8 -*- # Copyright 2015 Spanish National Research Council # # 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...
# # # Copyright (C) 2012, 2013 Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of condition...
"""Implementation of :class:`ModularInteger` class. """ from __future__ import print_function, division import operator from sympy.polys.polyutils import PicklableWithSlots from sympy.polys.polyerrors import CoercionFailed from sympy.polys.domains.domainelement import DomainElement from sympy.utilities import publi...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- from __future__ import absolute_import, division, unicode_literals, print_function import os import re import itertools import datetime import six from six.moves.urllib.parse import urlencode from ..results import iter_results f...
#!/usr/bin/env python2.5 # # Copyright 2009 the Melange 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 # # Unless required by applic...
from django.contrib.auth.models import User, Group from rest_framework import viewsets from richtigTanken.serializers import UserSerializer, GroupSerializer, FahrtDatenSerializer, UserPositionsSerializer #hieranders from models import FahrtDaten, UserPositions from django.http import HttpResponse from django.http impor...
import re import os # from app.subsystem.courses import Course from app.subsystem.courses.academicprogram import AcademicProgram from app.subsystem.courses.course import Course from app.subsystem.courses.option import Option from app.subsystem.courses.option import OptionChoices from app.subsystem.courses.option impor...
import boto3 import re import os import socket import json # List of all EIPs in the given region def list_eips(region, filter): all_eips = [] print("Connecting to ec2...") client = boto3.client('ec2', region_name=region) if client: # print("Connected!") print("Getting all EIPs in regi...
#!/usr/bin/env python """ The WiPy firmware update script. Transmits the specified firmware file over FTP, and then resets the WiPy and optionally verifies that software was correctly updated. Usage: ./update-wipy.py --file "path_to_mcuimg.bin" --verify Or: python update-wipy.py --file "path_to_mcuimg.bin"...
""" Module handles the heavy lifting, building the various site directories. """ import git, shutil, os, yaml, tempfile, datetime, time, copy from drupdates.utils import Utils from drupdates.settings import Settings from drupdates.settings import DrupdatesError from drupdates.drush import Drush from drupdates.construct...
#! usr/bin/python # coding=utf-8 # Copyright 2014 Baidu, 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 l...
# Copyright 2021 DeepMind Technologies Limited. 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...
#! /usr/bin/env python # MIT License # # Copyright (c) 2018 Michael J Simms. All rights reserved. # # 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...
import pytest from openshift_checks.logging.fluentd_config import FluentdConfig, OpenShiftCheckException def canned_fluentd_pod(containers): return { "metadata": { "labels": {"component": "fluentd", "deploymentconfig": "logging-fluentd"}, "name": "logging-fluentd-1", }, ...
# Copyright 2018 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 agreed to in writing, s...
import tensorflow as tf import numpy as np from scipy.misc import imsave from skimage.transform import resize from copy import deepcopy import os import constants as c from loss_functions import combined_loss from utils import psnr_error, sharp_diff_error from tfutils import w, b # noinspection PyShadowingNames class...
import logging from datetime import timedelta from hashlib import md5 from os import path # Import some externalized utilities to work with the Telegram types and more from . import helpers as utils from .errors import ( RPCError, FloodWaitError, FileMigrateError, TypeNotFoundError ) from .network import authentic...
''' Created on 06.08.2014 ''' import unittest import types import time try: from java.lang import System except: pass class GCDetector(): gcIndex = 0 def __del__(self): GCDetector.gcIndex += 1 maxGCRun = 10 def runGCIfJython(): try: currentIndex = GCDetector.gcIndex ...
# # TAP.py - TAP parser # # A pyparsing parser to process the output of the Perl # "Test Anything Protocol" # (http://search.cpan.org/~petdance/TAP-1.00/TAP.pm) # # TAP output lines are preceded or followed by a test number range: # 1..n # with 'n' TAP output lines. # # The general format of a TAP output line is:...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright 2013 Kitware 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 cop...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. # MIT License. See license.txt from __future__ import unicode_literals """build query for doclistview and return results""" import webnotes, json import webnotes.defaults tables = None doctypes = {} roles = [] @webnotes.whitelist() def get(): return compress(e...
import codecs import copy import io import pickle from io import BytesIO, StringIO, TextIOBase import pytest from pytest import raises import jprops from jprops import text_type @pytest.mark.parametrize('lines', [ b'a\nb\nc\n', # Unix b'a\r\nb\r\nc\r\n', # Windows b'a\rb\rc\r', # Mac ]) def test_p...
#encoding: utf-8 import datetime from hashlib import sha1 from django.conf import settings from django.contrib.sites.models import Site from django.core.cache import cache from django.db.models.options import get_verbose_name as convert_camelcase from django.utils import simplejson as json from django.utils.http impor...
#!/usr/bin/env python3.4 # # Copyright 2016 Google 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...
import os import json import glob import copy from xml.etree.ElementTree import Element, SubElement, Comment, tostring import argparse import sys sys.path.insert(0, os.environ['GOFFISH_CONFIG']) import helper from confdata import GoffishConf ''' * client script for gofs * assumption is that the script will run only...
############################################################################### ## ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary for...
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
""" module for generating C, C++, Fortran77, Fortran90 and python routines that evaluate sympy expressions. This module is work in progress. Only the milestones with a '+' character in the list below have been completed. --- How is sympy.utilities.codegen different from sympy.printing.ccode? --- We considered the ide...
# coding: utf-8 """Expose data to different interface ZMQStream explose to a ZeroMQ socket in a REQ/REP pattern. Copyright (c) 2017, European X-Ray Free-Electron Laser Facility GmbH All rights reserved. You should have received a copy of the 3-Clause BSD License along with this program. If not, see <https://opensour...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright 2015-2018 by Exopy Authors, see AUTHORS for more details. # # Distributed under the terms of the BSD license. # # The full license is in the file LICENCE, distributed with this software. # ---------------...
#!/usr/bin/env python # Copyright 2017-present Open Networking 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 b...
#!/usr/bin/python # # Copyright 2021 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 ag...
#!/usr/bin/python import sys import os import sqlite3 sys.path.append("../../src/") import cxxtags_util as cxxtags sys.path.append("../util/") import clang.cindex # for kind types err = 0 def test_one(db, q, a): global err res = list(db.execute(q).fetchall()) if len(res) != 1: print "ERROR: resul...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ From a system-installed copy of the toolchain, packages all the required bits into a .zip file. It assumes default install locations for tools, in parti...
import unittest import numpy import chainer from chainer import cuda import chainer.functions as F from chainer import gradient_check from chainer.testing import attr from chainer.testing import condition if cuda.available: cuda.init() class BinaryOpTestBase(object): def make_data(self): raise No...
# system configuration generated and used by the sysconfig module build_time_vars = {'AC_APPLE_UNIVERSAL_BUILD': 1, 'AIX_GENUINE_CPLUSPLUS': 0, 'AR': 'ar', 'ARFLAGS': 'rc', 'ASDLGEN': './Parser/asdl_c.py', 'ASDLGEN_FILES': './Parser/asdl.py ./Parser/asdl_c.py', 'AST_ASDL': './Parser/Python.asdl', 'AST_C': 'Pytho...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
import sys,string,os sys.path.insert(1, os.path.join(sys.path[0], '..')) ### import parent dir dependencies import scipy, numpy import statistics from visualization_scripts import clustering def evaluateMultiLinRegulatoryStructure(all_genes_TPM,MarkerFinder,SignatureGenes,state=None,query=None): all_indexes, grou...
from flask import Blueprint, redirect, render_template, url_for, g, session, \ get_template_attribute, current_app, request, make_response, jsonify from werkzeug import secure_filename from flask_application.controllers import TemplateView from flask_application.profiles.decorators import ajax_catch_error from fla...
# Copyright 2018 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...
# Copyright 2017 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...
# Copyright 2015 Metaswitch Networks # # 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 w...
# -*- coding: utf-8 -*- ''' Support for ``pkgng``, the new package manager for FreeBSD .. warning:: This module has been completely rewritten. Up to and including version 0.17.x, it was available as the ``pkgng`` module, (``pkgng.install``, ``pkgng.delete``, etc.), but moving forward this module will no l...
# -*- coding: utf-8 -*- ''' ____ ___ ____________ ___ ___ ____ _________________ / __ \/ _ | / __/ _/ __/ / _ \/ _ \/ __ \__ / / __/ ___/_ __/ / /_/ / __ |_\ \_/ /_\ \ / ___/ , _/ /_/ / // / _// /__ / / \____/_/ |_/___/___/___/ /_/ /_/|_|\____/\___/___/\___/ /_/ Operational Aid Source ...
import requests import sys import time from pymongo import MongoClient NUM_MATCH_IDS = 1000 api_keys = [] api_file = open('.env') for line in api_file: api_keys.append(line.strip('\n')) item_list = [ "Abyssal Scepter", "Archangel's Staff", "Ardent Censer", "Athene's Unholy Grail", "Banner of Command", "Banshee's V...
from django.core.exceptions import FieldDoesNotExist from django.apps import apps # import the logging library import warnings import logging import collections import persisting_theory # Get an instance of a logger logger = logging.getLogger(__name__) #: The package where autodiscover will try to find preferences t...
''' Framework for parsing geolocated satellite files Instantiates appropriate class with filename and optional strings specifying the subtype of file and an override extension. All classes store the following parameters: name - the full pathname of the file ext - the extension of the file sub - the subty...
""" Tkinter UI for StaSh """ import six from six.moves import tkinter, tkinter_messagebox, tkinter_scrolledtext, queue from ..shscreens import ShChar from ..shcommon import K_CC, K_CD, K_HUP, K_HDN, K_LEFT, K_RIGHT, K_CU, K_TAB, K_HIST, K_CZ, K_KB from .base import ShBaseUI, ShBaseTerminal, ShBaseSequentialRenderer ...
from threeML.minimizer import minimization import collections import numpy import scipy.optimize import scipy.stats import sys import matplotlib.pyplot as plt class JointLikelihood(object): def __init__(self,likelihoodModel,**kwargs): #Process optional keyword parameters self.verbose = Fals...
# Copyright 2012 Tsutomu Uchino # # 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 ...
import numpy as np import tensorflow as tf import pickle import sys import io import os try: nonlinearity_name = sys.argv[1] # 'relu', 'elu', 'gelu', or 'silu' except: print('Defaulted to gelu since no nonlinearity specified through command line') nonlinearity_name = 'gelu' try: learning_rate = ...
import os import typing as t from gettext import gettext as _ from gettext import ngettext from ._compat import get_text_stderr from .utils import echo if t.TYPE_CHECKING: from .core import Context from .core import Parameter def _join_param_hints( param_hint: t.Optional[t.Union[t.Sequence[str], str]] )...
import random import logging import os import claripy from ...sim_type import SimTypeFunction, SimTypeInt from ... import sim_options as so from ... import SIM_LIBRARIES from ... import BP_BEFORE, BP_AFTER from ...storage.file import SimFile, SimFileDescriptor from ...state_plugins import SimSystemPosix from ...erro...