gt
stringclasses
1 value
context
stringlengths
2.49k
119k
try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict from enum import IntEnum import functools from kwonly_args import first_kwonly_arg import six import pwnypack.asm from pwnypack.shellcode.ops import SyscallInvoke, LoadRegister from pwnypack.shellcode.translate im...
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. """ Train a network across multipl...
import os # Django settings for oscar project. PROJECT_DIR = os.path.dirname(__file__) location = lambda x: os.path.join(os.path.dirname(os.path.realpath(__file__)), x) DEBUG = True TEMPLATE_DEBUG = True SQL_DEBUG = True ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) EMAIL_BACKEND = 'django.core.mail.bac...
# -*- coding: utf-8 -*- import os from sqlalchemy import * from nose.tools import eq_ from migrate.versioning import schemadiff from migrate.changeset import SQLA_06 from migrate.tests import fixture class SchemaDiffBase(fixture.DB): level = fixture.DB.CONNECT def _make_table(self,*cols,**kw): ...
# 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...
#!/usr/bin/env python2 """ Pylookup is to lookup entries from python documentation, especially within emacs. Pylookup adopts most of ideas from haddoc, lovely toolkit by Martin Blais. (usage) ./pylookup.py -l ljust ./pylookup.py -u http://docs.python.org """ from __future__ import with_statement import os impo...
# coding: utf-8 """ DocuSign REST API The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501 OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.gi...
import json from unittest import TestCase, mock import marshmallow as ma from pyramid import testing from pyramid.response import Response from pyramid_restful import mixins class MockAPIView: def model_side_effect(**data): instance = mock.Mock() for key, val in data.items(): setat...
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
""" Default settings for the ``mezzanine.core`` app. Each of these can be overridden in your project's settings module, just like regular Django settings. The ``editable`` argument for each controls whether the setting is editable via Django's admin. Thought should be given to how a setting is actually used before mak...
# # Copyright (c) SAS Institute 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 w...
# -*- coding: UTF-8 -*- """ Usage: plumbum <template> <namespace> [region] [options]... Options: template path to the jinja2 template namespace AWS namespace. Currently supports: elasticache, elb, ec2, rds, asg, sqs region AWS region [default: us-east-1] options key value combinations, they can be ...
# -*- coding: utf-8 -*- import sys import traceback import datetime import time import os import logging import MySQLdb import labio.configWrapper import labio.argParseWrapper import labio.logWrapper import labio.dbWrapper from xml.etree import ElementTree from bs4 import * from components import PDB from components...
# Copyright (c) 2003-2016 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html # For details: https://github.com/PyCQA/pylint/blob/master/COPYING """Functional full-module tests for PyLint.""" import csv imp...
from __future__ import print_function import pandas as pd import numpy as np import os from tensorflow.keras import backend as K from tensorflow.keras.layers import Dense, Dropout, Activation, Conv1D, MaxPooling1D, Flatten, LocallyConnected1D from tensorflow.keras.models import Sequential, model_from_json, model_fro...
#!/usr/bin/env python # -*- encoding: utf-8 -*- """Test client standard actions.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import hashlib import io import sys from absl import app import mock from grr_response_client.client_actions import standa...
import sys sys.path.append("/Users/pascal/GDrive/sky_package/sky/") from utils import * from training import * from findLeaf import * from bs4 import BeautifulSoup def uniqifyOverTraining(list_of_lists): uniques = [] for x in list_of_lists[0]: if all([bool(x in y) for y in list_of_lists]): ...
import mmap import os import numpy as np import dynaphopy.dynamics as dyn import dynaphopy.atoms as atomtest from dynaphopy.interface import phonopy_link as pho_interface def diff_matrix(array_1, array_2, cell_size): """ :param array_1: supercell scaled positions respect unit cell :param array_2: superce...
# Adapted from test_file.py by Daniel Stutzbach from __future__ import unicode_literals import sys import os import errno import unittest from array import array from weakref import proxy from functools import wraps from test.test_support import TESTFN, check_warnings, run_unittest, make_bad_fd from test.test_suppor...
from __future__ import absolute_import from multiprocessing import Value, Lock, RLock from collections import deque import logging import types import time import six log = logging.getLogger(__name__) class RollingNumber(object): """ A **number** which can be used to track **counters** (increment) or set va...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # FIXME: Uses the selector service, but has no way of indicating to the # selector service that its services are no longer required. # This needs resolving. # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Con...
#!/usr/bin/env python import sys import os # Note: Need so that we can find the scapy code. bindir = os.path.dirname(os.path.abspath(sys.argv[0])) directory = '%s/..'%bindir if not directory in sys.path: sys.path.insert(0, '%s/..'%bindir) import socket import argparse import random import struct import traceback...
import gzip import json import os import shutil import hashlib from os.path import join from warnings import warn from contextlib import closing from functools import wraps from typing import Callable, Optional, Dict, Tuple, List, Any, Union import itertools from collections.abc import Generator from collections import...
import logging from intent.igt.consts import ODIN_JUDGMENT_ATTRIBUTE from intent.igt.igtutils import rgencode, get_judgment, extract_judgment from unittest import TestCase from intent.igt.igtutils import strip_leading_whitespace from intent.igt.search import normalized_tier, cleaned_tier from intent.utils.dicts impor...
# Copyright (c) 2006-2007 The Regents of The University of Michigan # Copyright (c) 2009,2015 Advanced Micro Devices, Inc. # Copyright (c) 2013 Mark D. Hill and David A. Wood # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the fol...
# coding: utf-8 """ KubeVirt API This is KubeVirt API an add-on for Kubernetes. OpenAPI spec version: 1.0.0 Contact: kubevirt-dev@googlegroups.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class V1Virtua...
#!/usr/bin/env python # -*- coding: utf8 -*- # ============================================================================ # Copyright (c) 2014 nexB Inc. http://www.nexb.com/ - All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance wi...
from ..security.security import OAuthSecurityHandler, AGOLTokenSecurityHandler from .._abstract.abstract import BaseAGOLClass import os import urlparse import parameters import json import types ######################################################################## class PortalSelf(object): """ represents the...
""" HDF5 dataset tests. """ import numpy as np import os import tempfile from pylearn2.config import yaml_parse from pylearn2.testing.datasets import ( random_dense_design_matrix, random_one_hot_dense_design_matrix, random_one_hot_topological_dense_design_matrix) from pylearn2.testing.skip import skip_if_n...
import numpy as npy import random as rand import sys import Queue import pickle import math import os.path import math import threading import processhandler import time from pymongo import MongoClient FILE_TREE = "_tree.db" FILE_DEL = "_deletedVideos.db" FILE_ADD = "_addedScenes.db" lock = threading.Lock() """ Retu...
# -*- coding: utf-8 -*- import numpy as np import pytest from pandas._libs import lib, writers as libwriters from pandas import Index import pandas.util.testing as tm class TestMisc(object): def test_max_len_string_array(self): arr = a = np.array(['foo', 'b', np.nan], dtype='object') assert l...
# Copyright (C) 2002-2007 Python Software Foundation # Contact: email-sig@python.org """Email address parsing code. Lifted directly from rfc822.py. This should eventually be rewritten. """ __all__ = [ 'mktime_tz', 'parsedate', 'parsedate_tz', 'quote', ] import time SPACE = ' ' EMPTYSTRING = ''...
#!/usr/bin/env python # # 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 "Li...
""" Module for reading and writing matlab (TM) .mat files """ # Authors: Travis Oliphant, Matthew Brett from __future__ import division, print_function, absolute_import import os import sys import warnings from scipy.lib.six import string_types from .miobase import get_matfile_version, docfiller from .mio4 import M...
# coding: utf-8 # # Copyright 2021 The Oppia 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 requi...
import os, errno, glob import discord import asyncio from discord.ext import commands import random import youtube_dl import functools import datetime import traceback import subprocess from concurrent.futures import ThreadPoolExecutor from shutil import rmtree from collections import deque from itertools import islice...
# Copyright (c) Facebook, Inc. and its affiliates. # # 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 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2010 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
import sys sys.path.append('/home/jwalker/dynamics/python/atmos-tools') sys.path.append('/home/jwalker/dynamics/python/atmos-read') import numpy as np import pandas as pd import xarray as xray import matplotlib.pyplot as plt import collections import os import json import atmos as atm import merra import indices # -...
# # Collective Knowledge (individual environment - setup) # # See CK LICENSE.txt for licensing details # See CK COPYRIGHT.txt for copyright details # # Developer: Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net # import os ############################################################################## # ...
# Copyright 2012 VMware, 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 a...
import sys from collections import OrderedDict from operator import attrgetter from typing import Any, Dict, List, Set from django.apps import AppConfig from django.conf import settings from django.db.models.signals import post_migrate class CoreAppConfig(AppConfig): name = "openslides.core" verbose_name = "...
#!/usr/bin/python2.4 # # Copyright 2009 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 or...
#!/usr/bin/env python """ Numerical integration with autowrap ----------------------------------- This example demonstrates how you can use the autowrap module in SymPy to create fast, numerical integration routines callable from python. See in the code for detailed explanations of the various steps. An autowrapped sy...
# Copyright 2016 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: utf-8 -*- """ Created on Sun Nov 5 14:48:19 2017 Author: Josef Perktold """ import numpy as np from numpy.testing import assert_allclose, assert_equal #noqa from statsmodels.stats import weightstats import statsmodels.stats.multivariate as smmv # pytest cannot import test_xxx from statsmodels.stats....
# -*- coding: utf-8 -*- """ Differential Operators ====================== When solving PDEs using the finite volume approach, inner products may contain differential operators. Where :math:`\\psi` and :math:`\\phi` are scalar quantities, and :math:`\\vec{u}` and :math:`\\vec{v}` are vector quantities, we may need to d...
"""Helpers to help coordinate updates.""" from __future__ import annotations import asyncio from datetime import datetime, timedelta import logging from time import monotonic from typing import Any, Awaitable, Callable, Generic, TypeVar import urllib.error import aiohttp import requests from homeassistant.const impo...
from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import * import pytc import inspect, math class Sliders(QWidget): """ create sliders for an experiment """ def __init__(self, param_name, parent): super().__init__() self._exp = parent._exp self._param_...
from __future__ import unicode_literals from __future__ import print_function import base64 from django.db import models from django.db.models.query import QuerySet from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.translation import ugettext_lazy as _ from dja...
# # ------------------------------------------------------------ # Copyright (c) All rights reserved # SiLab, Institute of Physics, University of Bonn # ------------------------------------------------------------ # import logging from struct import pack, unpack_from, calcsize from array import array from collections ...
# Copyright (c) The University of Edinburgh 2014 # # 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 agre...
# Copyright (C) 2010-2011 Richard Lincoln # # 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, merge, publish...
# Copyright 2012-2014 Hans Meine <hans_meine@gmx.net> # # 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 applicabl...
# Copyright (c) 2012 - 2014 EMC Corporation, 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 # # ...
# 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...
"""QR decomposition functions.""" import numpy from numpy import asarray_chkfinite # Local imports import special_matrices from blas import get_blas_funcs from lapack import get_lapack_funcs, find_best_lapack_type from misc import _datacopied def qr(a, overwrite_a=False, lwork=None, mode='full'): """Compute QR ...
"""An implementation of gates that act on qubits. Gates are unitary operators that act on the space of qubits. Medium Term Todo: * Optimize Gate._apply_operators_Qubit to remove the creation of many intermediate Qubit objects. * Add commutation relationships to all operators and use this in gate_sort. * Fix gate_s...
# Copyright 2016 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...
# # 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 # ...
# Copyright (c) 2012 Intel 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/LICENSE-2.0 # # Unless re...
import shelve from hotspotter.other.AbstractPrintable import AbstractManager from hotspotter.other.ConcretePrintable import DynStruct, Pref from hotspotter.other.logger import logmsg, logdbg, logio, logerr, logwarn from hotspotter.tpl.pyflann import FLANN from itertools import chain import numpy as np import pylab imp...
# Copyright 2015 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...
#!/usr/bin/env python # 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. """Given the output of -t commands from a ninja build for a gyp and GN generated build, report on differences between the command line...
# 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...
#!/usr/bin/env python3 import tkinter, mpd, configparser, subprocess, sys from tkinter import Listbox, Label, Canvas, Frame, Y, X from PIL import Image, ImageTk, ImageColor from subprocess import call from pathlib import Path root = tkinter.Tk() root.geometry("320x240") client = mpd.MPDClient(use_unicode=True) config ...
""" Django-environ allows you to utilize 12factor inspired environment variables to configure your Django application. """ from __future__ import unicode_literals import os import sys import re import json import warnings import logging logger = logging.getLogger(__file__) try: from django.core.exceptions import...
# 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 use ...
import random import re import socket import threading import time from coapthon.messages.message import Message from coapthon.messages.response import Response from coapthon import defines from coapthon.serializer import Serializer from coapthon.messages.request import Request # import logging as log __author__ = 'gi...
from __future__ import print_function, division from sympy.core import Mul, Basic, sympify, Add from sympy.core.compatibility import range from sympy.functions import adjoint from sympy.matrices.expressions.transpose import transpose from sympy.strategies import (rm_id, unpack, typed, flatten, exhaust, do_one,...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack 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 requ...
"""Config flow for MySensors.""" from __future__ import annotations import os from typing import Any from awesomeversion import ( AwesomeVersion, AwesomeVersionStrategy, AwesomeVersionStrategyException, ) import voluptuous as vol from homeassistant import config_entries from homeassistant.components.mqtt...
import struct from Monsoon import Operations as op import ctypes import platform import usb.core import usb.util import numpy as np import os import platform import time class USB_protocol(object): """Uses native python usb functions to communicate with the Power Monitor. Best choice for connecting to a single...
#!/usr/bin/env python ''' V2015-05-03 ''' import os import csv from itertools import ifilter import sys """ COMMON FUNCTIONS """ def output_header_file_old(infile,skip,output_handle,sup_list=[],eliminate=0): ##Version1.0 ##write header into files reader=csv.reader(open(infile,"rU"),delimite...
"""Represent the AsusWrt router.""" from __future__ import annotations from collections.abc import Callable from datetime import datetime, timedelta import logging from typing import Any from aioasuswrt.asuswrt import AsusWrt from homeassistant.components.device_tracker.const import ( CONF_CONSIDER_HOME, DEF...
# # Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. # Use of this file is governed by the BSD 3-clause license that # can be found in the LICENSE.txt file in the project root. # # The following images show the relation of states and # {@link ATNState#transitions} for various grammar constructs. # # <ul...
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import absolute_import import string import os import copy import sys import pandas as pds import numpy as np from . import _custom from . import _files from . import _orbits from . import _meta from . import utils from pysat import data_di...
# coding: utf-8 """ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import re import json import mi...
# coding=utf-8 # Copyright 2018 The Tensor2Tensor 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 applicable...
import copy import time import itertools import re import platform import sys from .utils import TestCase, skipIf, DBRef import mongomock from mongomock import Database try: import pymongo from pymongo import Connection as PymongoConnection from pymongo import MongoClient as PymongoClient from bson.o...
''' Implements the RTS generic Target fabric classes. This file is part of RTSLib. Copyright (c) 2011-2013 by Datera, Inc. Copyright (c) 2011-2014 by Red Hat, 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 ...
import collections import decimal import json as jsonlib import os import random import re from operator import attrgetter from urlparse import urljoin from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.forms import CheckboxInput from django.utils.translation import ( ...
# Copyright 2021 The QHBM Library 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
# Copyright 2015 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...
"""Tests for models.text.py.""" import types from unittest.mock import patch import numpy as np import pytest class TestW2VClassifier: @pytest.fixture def mock_load_w2v_format(self): word2idx = {'first': 0, 'second': 1, 'third': 2, 'fourth': 3} syn0 = np.array([ [0.1, 0.1, 0.1], ...
import sys import numpy as np from abc import ABCMeta, abstractmethod class OptimizationTestFunction: __metaclass__ = ABCMeta """ General class for Test Functions used for optimization """ def __init__(self, mindim=1, maxdim=None, domain=np.array([-1, 1])): self.mindim = mindim se...
''' This is intended to be a plot interface w/ 1)filenumber/filename text string filter (allowing update of current Augerfile) 2) adjustable charging energy value, 3) comparison of data with plotted line energies (including shift), entry for element list? ''' import tkinter as tk from matplotlib.figure import Fi...
#!/usr/bin/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. """Do all the steps required to build and test against nacl.""" import optparse import os.path import re import shutil import subproc...
# # Copyright 2011 Red Hat, 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...
""" :class:`.IGNFrance` is the IGN France Geocoder. """ import xml.etree.ElementTree as ET from geopy.compat import (urlencode, HTTPPasswordMgrWithDefaultRealm, HTTPBasicAuthHandler, build_opener, u, install_opener, iteritems, Request) from geopy.geocoders.base impo...
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Adrian Sampson. # # 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 t...
#Embedded file name: ACEStream\Core\BitTornado\natpunch.pyo import sys import socket import time from traceback import print_exc from subnetparse import IP_List from clock import clock from __init__ import createPeerID from ACEStream.Core.NATFirewall.upnp import UPnPPlatformIndependent, UPnPError from ACEStream.Core.NA...
from __future__ import absolute_import, division, print_function import inspect import sys import traceback from inspect import CO_VARARGS, CO_VARKEYWORDS import re from weakref import ref from _pytest.compat import _PY2, _PY3, PY35, safe_str import py builtin_repr = repr if _PY3: from traceback import format_exc...
# Copyright (c) 2014 Stefan C. Mueller # 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, merge, publish, di...
from __future__ import absolute_import, unicode_literals import json from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.crypto import get_random_string from django.utils.six.moves.urllib.parse import urlparse from elasticsearch import Elasticsearch, NotFoundError...
#!/usr/bin/env python # Copyright (c) 2011 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/LICE...
"""The tests for the Tomato device tracker platform.""" from unittest import mock import pytest import requests import requests_mock import voluptuous as vol from homeassistant.components.device_tracker import DOMAIN, tomato as tomato from homeassistant.const import (CONF_HOST, CONF_USERNAME, CONF_PASSWORD, ...
#!/usr/bin/env python # Copyright (c) 2016 CORE Security Technologies # # This software is provided under under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # # Karma SMB # # Author: # Alberto Solino (@agsolino) # Original idea by @mubix # # ...
import json import collections import os import argparse import configparser import ast def _read_file(setup_file): """ Module for reading in scenario data file """ if not os.path.isfile(setup_file): print("[ERROR] could not read file: {}".format(setup_file)) raise SystemExit() fi...
"""Web socket API for OpenZWave.""" from openzwavemqtt.const import ( ATTR_CODE_SLOT, ATTR_LABEL, ATTR_POSITION, ATTR_VALUE, EVENT_NODE_ADDED, EVENT_NODE_CHANGED, ) from openzwavemqtt.exceptions import NotFoundError, NotSupportedError from openzwavemqtt.util.lock import clear_usercode, get_code_...