gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# global import os import sys import json import platform import webbrowser import logging from twisted.internet import threads from twisted.internet import reactor import sasmodels import sasmodels.model_test import sasmodels.kernelcl from sasmodels.generate import F32, F64 import sas.qtgui.Utilities.GuiUtils as Gui...
#!/usr/bin/python # -*- coding: UTF-8 -*- """PauLLA Photomaton, exposed on THDF 2015.""" import subprocess import sys import time import os from collections import namedtuple from datetime import datetime from random import randint import pygame import RPi.GPIO as GPIO from picamera import PiCamera from pygame.loca...
# @author: Michael Vorotyntsev # @email: linkofwise@gmail.com # @github: unaxfromsibiria import asyncio import base64 import socket import time from contextlib import contextmanager from jwt.algorithms import get_default_algorithms from random import SystemRandom from .common import Configuration from .enums import ...
"""Create a new family report from an new genome quad. This requires putting all three family genomes in a folder along with a descriptor file titled 'family_manifest.csv,' which should have the following format: filename,label,external_id,sex,format,affected_status NA19238.vcf.gz,CG Yoruban Mother,1,female,vcf.gz,una...
# pykvm # https://github.com/JonathonReinhart/pykvm # (C) 2015 Jonathon Reinhart import ctypes from ctypes import Structure, Union, c_uint8, c_uint16, c_uint32, c_uint64 class kvm_regs(Structure): _fields_ = [ ('rax', c_uint64), ('rbx', c_uint64), ('rcx', c_uint64),...
from dtest import Tester, debug, TracingCursor, PRINT_DEBUG, ENABLE_VNODES from tools import putget from ccmlib.cluster import Cluster import re import os import time from collections import defaultdict TRACE_DETERMINE_REPLICAS = re.compile('Determining replicas for mutation') TRACE_SEND_MESSAGE = re.compile('Sending ...
# ================================================================= # # Authors: Tom Kralidis <tomkralidis@gmail.com>, # Just van den Broecke <justb4@gmail.com> # # Copyright (c) 2014 Tom Kralidis # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated document...
# -*- coding: utf-8 -*- """ pygments.lexers.grammar_notation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for grammer notations like BNF. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, byg...
# Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory # 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/...
# coding: utf-8 """ Wavefront REST API Documentation <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the W...
# Copyright (c) 2012 OpenStack Foundation. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
#!/usr/bin/env python """An implementation of an in-memory data store for testing.""" import re import sys import threading import time from grr.lib import config_lib from grr.lib import data_store from grr.lib import utils class FakeTransaction(data_store.CommonTransaction): """A fake transaction object for tes...
from math import log from multiprocessing import Pool from numpy import mean from ..batches import STATIC_MINIMA_LIMITED from .. import cost from ..cost import costs from ..model import run_model from .utils import plt, plt_title, plt_save, make_scaling_plot def merge(*dict_args): result = {} for dictionary...
import re from question import Question ######################################################################## class Parser(object): """ The parser breaks up a string into tokens and then looks through those tokens to determine what is the stem and what are the options. """ maxlen = 100000 ...
from django.contrib.auth.models import User from django.db import models from django.core.exceptions import ObjectDoesNotExist from epl.custommodels import IntegerRangeField from hyquest.constants import QUESTSET_TITLE_LEN, QUESTSET_DESC_LEN, QUEST_TITLE_LEN, \ TASK_TITLE_LEN, TASK_CODE_LE...
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def convert_community_job_to_opportunity(self, community_job, model=None): def category_from_str(str): import re from ummeli.oppo...
import os from . import room def do(): got_thing = False x = 30 while x < 40: path = "C:\Python"+ str(x) +"\Lib\site-packages\easygui.py" #credit Hlynur path2 = "C:\Python"+ str(x) +"\Lib\easygui.py" cool = os.path.exists(path) cool2 = os.path.exists(path2) print(path...
# 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. """Class for running instrumentation tests on a single device.""" import logging import os import re import time from pylib import android_commands fro...
# Copyright 2012 Viewfinder Inc. All Rights Reserved. """Test photo unsharing. """ __author__ = 'andy@emailscrubbed.com (Andy Kimball)' import mock import time from copy import deepcopy from viewfinder.backend.base import util from viewfinder.backend.db.activity import Activity from viewfinder.backend.db.db_client ...
# Copyright 2015 - 2016 OpenMarket Ltd # Copyright 2017 Vector Creations Ltd # # 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...
#!/usr/bin/env python """ Copyright (c) 2014-2016 Miroslav Stampar (@stamparm) See the file 'LICENSE' for copying permission """ from __future__ import print_function # Requires: Python >= 2.6 import sys sys.dont_write_bytecode = True import core.versioncheck import math import mmap import optparse import os imp...
import sys import inspect import traceback from logger import log from viz import * from projections import * from output import * from symbology import * class model(object): """Model for the UI Contains abstractions of all the chosen options for output to d3""" def __init__(self, backgroundColor): ...
# # 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 2013-2014 MongoDB, 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 writin...
# -*- coding: utf-8 -*- from __future__ import with_statement import sys from cms.apphook_pool import apphook_pool from cms.utils.compat.type_checks import string_types from cms.utils.i18n import force_language, get_language_list from cms.models.pagemodel import Page from django.conf import settings from django.conf.u...
# Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the Apache 2.0 License. # See the LICENSE file in the project root for more information. # Excel COM Interop tests from iptest.assert_util import * skiptest("win32", "cli64", "posix") from iptest.comi...
""" Provides a menu that display the list of recent files and a RecentFilesManager which use your application's QSettings to store the list of recent files. """ import sys import os from pyqode.core import icons from pyqode.qt import QtCore, QtGui, QtWidgets class RecentFilesManager(QtCore.QObject): """ Mana...
# Module 'ntpath' -- common operations on WinNT/Win95 pathnames """Common pathname manipulations, WindowsNT/95 version. Instead of importing this module directly, import os and refer to this module as os.path. """ import os import stat import sys __all__ = ["normcase","isabs","join","splitdrive","split","splitext", ...
# Copyright (c) 2014, Fundacion Dr. Manuel Sadosky # 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 condit...
# -*- coding: utf-8 -*- """ Plugin responsible for setting OpenStack global options """ import glob import logging import os import re import uuid from packstack.installer import (basedefs, exceptions, processors, utils, validators) from packstack.modules.common import filtered_host...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
import os import pytest import time from caching import SQLiteStorage @pytest.fixture def storage(tmpdir): filepath = f'{tmpdir}/cache' with SQLiteStorage( filepath=filepath, ttl=60, maxsize=100, ) as s: assert os.path.isfile(filepath) yield s def test_repr(tmpd...
########################################################################## # # Copyright 2008-2010 VMware, Inc. # 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 withou...
from __future__ import print_function # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Denis Engemann <denis.engemann@gmail.com> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Eric Larson <larson.eric.d@gmail.com> # # License: Simplified BSD import copy import os.pa...
# Copyright (c) 2018 PaddlePaddle 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...
# Graph class from __future__ import print_function from builtins import range from future.utils import iteritems import numpy as np from node import FacNode, VarNode import pdb """ Factor Graph classes forming structure for PGMs Basic structure is port of MATLAB code by J. Pacheco Central difference: nbrs sto...
# Copyright 2012, 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 agree...
# -*- coding: utf-8 -*- # This code is part of Ansible, but is an independent component # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own lic...
# # 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 # ...
""" Flask Management Commands.""" from flask import url_for from subprocess import call import cmd import os.path as op import os import sys import json from socket import gethostname from datetime import date from pltk.flask_utils.monitor_command import main as monitor_command_main # Declare options only if they are...
# 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 ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('cookie_app', '0022_auto_20150128_0519'), ] operations = [ migrations.RemoveField( model_name='initial_borr_list_...
import hashlib import inspect import logging import os import pickle import tempfile import time from shutil import move, rmtree from fsspec import AbstractFileSystem, filesystem from fsspec.callbacks import _DEFAULT_CALLBACK from fsspec.compression import compr from fsspec.core import BaseCache, MMapCache from fsspec...
import sys import os import unittest import itertools import time import threading from array import array from weakref import proxy from test import test_support from test.test_support import TESTFN, findfile, run_unittest from UserList import UserList class AutoFileTests(unittest.TestCase): # file tests for whi...
#!/usr/bin/python # # $Id: deduce.py,v 1.4 2004/01/28 19:03:53 virtex Exp $ # Copyright (C) 1995-2004 James Williams # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the Li...
#!/usr/bin/env python """ A simple example of a Notepad-like text editor. """ import datetime from asyncio import Future, ensure_future from prompt_toolkit.application import Application from prompt_toolkit.application.current import get_app from prompt_toolkit.completion import PathCompleter from prompt_toolkit.filte...
#! /usr/bin/env python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ...
#!/usr/bin/python # This program is an example of using the SciCast API. # # Copyright (c) 2014, Jay Kominek # # Permission to use, copy, modify, and/or distribute this software for # any purpose with or without fee is hereby granted, provided that the # above copyright notice and this permission notice appear in all ...
# 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...
# -*- coding: utf-8 - import operator from .local_time import get_now, TZ from copy import deepcopy from datetime import timedelta from dateutil.parser import parse from dpath.util import new as xpathnew from haversine import haversine from json import load, loads from jsonpath_rw import parse as parse_path from munch ...
#!/usr/bin/env python from __future__ import print_function """ test_job_history_with_exceptions.py Make sure that when an exception is thrown only the current and following tasks fail """ workdir = 'tmp_test_job_history_with_exceptions' #sub-1s resolution in system? one_second_per_job = None throw_exce...
# # 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...
# -*- coding: utf-8 -*- # Copyright (C) 2004-2019 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. # # Authors: Eben Kenah # Aric Hagberg (hagberg@lanl.gov) # Christopher Ellison # B...
# This script creates the K2_rotation_poster_child.pdf figure # it can also plot the FFT of the eigen light curves, # the 2nd K2pgram (periodogram of a 2nd frequency), # the data conditioned on the best freqency and the top # eigen light curves. import numpy as np import matplotlib.pyplot as plt import fitsio from K2p...
#!/usr/bin/env python from __future__ import absolute_import, division import numpy as np from scipy.optimize import brentq from constants import EPSILON import isentropic_flow as ise_flow import normal_shock_wave as nsw from common import Model class Diffuser(Model): def __init__(self, in_m...
# Copyright (c) 2014 GigaSpaces Technologies Ltd. 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 ...
from __future__ import absolute_import import os import pytest import zipfile from mock import patch from six import BytesIO from django.conf import settings from django.core.urlresolvers import reverse from django.core.files.uploadedfile import SimpleUploadedFile from sentry.testutils import TestCase from sentry.la...
# Copyright 2015, Pinterest, 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...
# -*- coding: utf-8 -*- import json # parse cli's json import socket # connect with cli import atexit # shutdown nicely import inspect # resultparser exceptions import logging # well, logging. Duh. import threading # so we don't miss messages. from time import sleep # waiting on reconnect from co...
# -*- coding: utf-8 -*- """Module for Application storage.""" import logging from collections import namedtuple from ..signals import ( pre_create_instance, post_create_instance, pre_update_instance, post_update_instance, pre_delete_instance, post_delete_instance, ) from .idgenerators import UUIDGenerator f...
# Copyright 2011 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 applicable law or agreed to in wr...
from __future__ import unicode_literals from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.views import shortcut from django.contrib.sites.models import Site, get_current_site from django.http import HttpRequest, Http404 from django.test import Test...
#!/usr/bin/env python __author__ = 'Thomas R. Lennan' from mock import Mock, patch from nose.plugins.attrib import attr import gevent import unittest from unittest.case import skip from pyon.util.unit_test import PyonTestCase from pyon.util.int_test import IonIntegrationTestCase from pyon.core.exception import Unaut...
import os import subprocess import time import distutils.dir_util from distutils.version import LooseVersion import pytest import logging from ccmlib import common as ccmcommon from ccmlib.node import ToolError from dtest import Tester, create_ks, create_cf, MAJOR_VERSION_4 from tools.assertions import assert_all, a...
# Copyright 2014 Open Source Robotics Foundation, 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...
""" SleekXMPP: The Sleek XMPP Library Copyright (C) 2010 Nathanael C. Fritz This file is part of SleekXMPP. See the file LICENSE for copying permission. """ from __future__ import with_statement, unicode_literals import sys import copy import logging import sleekxmpp from sleekxmpp import plugins ...
# Copyright 2014 Open Source Robotics Foundation, 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...
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2013,2014,2015,2016 Contributor # # 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 Li...
#!/usr/bin/env python """ Copyright (c) 2018 Alex Forencich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merg...
#!/usr/bin/env python3 import collections class BigInt: def __init__(self): self.number = [0] def skim(self): carrier = 0 for i in range(len(self.number)): self.number[i] += carrier head = self.number[i] % 10 carrier = (self.number[i] - head) /...
# Copyright 2016 Capital One Services, 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...
"""Random variable generators. integers -------- uniform within range sequences --------- pick random element pick random sample generate random permutation distributions on the real line: ------------------------------ uniform ...
# -*- 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...
from collections.abc import Mapping from ctypes import c_int, c_int32, c_double, c_char_p, POINTER, c_size_t from weakref import WeakValueDictionary import numpy as np from numpy.ctypeslib import as_array from openmc.exceptions import AllocationError, InvalidIDError, OpenMCError from . import _dll, Nuclide from .core...
# # 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 accompanyi...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# Copyright (c) 2015 Uber Technologies, Inc. # # 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, publ...
# Copyright 2012 Nebula, 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 agree...
import os from xml.etree import ElementTree from django.test import SimpleTestCase, TestCase import mock from casexml.apps.phone.tests.utils import create_restore_user from corehq.apps.app_manager.fixtures import report_fixture_generator from corehq.apps.users.dbaccessors.all_commcare_users import delete_all_users fro...
"""Support for KNX/IP climate devices.""" from typing import Optional, List import voluptuous as vol from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateDevice from homeassistant.components.climate.const import ( HVAC_MODE_DRY, HVAC_MODE_FAN_ONLY, HVAC_MODE_HEAT, HVAC_MODE_OFF, HV...
import reprlib import struct from typing import Union, List, Set, Dict, Optional from twisted.internet import defer, tcp from twisted.internet.protocol import ClientFactory from twisted.names import dns from twisted.names.dns import DNSProtocol, Message, DNSDatagramProtocol, randomSource from twisted.python.failure im...
#!/usr/bin/env python import binascii import bitstring import serial import struct import threading class Create2: """Python class for interfacing with a locally-connected iRobot Create 2 robot""" def __init__(self, dev = "/dev/ttyUSB0", baud=115200): """Open the connection with the device""" ...
"""versatileimagefield tests.""" from __future__ import division, unicode_literals from functools import reduce import math import operator import os from shutil import rmtree from unittest import skipIf import django from testfixtures import compare from django import VERSION as DJANGO_VERSION from django.conf impo...
from django.test import TestCase from socialp2p.models import Author, FriendRequest, Post, Comment from django.contrib.auth.models import User from rest_framework import status from rest_framework.test import APITestCase, APIClient from django.core.urlresolvers import reverse from api.serializations import * import uui...
# Copyright 2015, 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: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
import bpy import gpu from gpu_extras.batch import batch_for_shader from ...rfb_utils import transform_utils from ...rman_constants import RMAN_AREA_LIGHT_TYPES from .barn_light_filter_draw_helper import BarnLightFilterDrawHelper from mathutils import Vector, Matrix import mathutils import math _DRAW_HANDLER_ = None _...
# Copyright (c) 2013 NTT DOCOMO, 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 requ...
from core.himesis import Himesis, HimesisPreConditionPatternLHS class HM5ThenClausePart1CompleteLHS(HimesisPreConditionPatternLHS): def __init__(self): """ Creates the himesis graph representing the AToM3 model HM5ThenClausePart1CompleteLHS. """ # Flag this instance as compiled no...
""" click._termui_impl ~~~~~~~~~~~~~~~~~~ This module contains implementations for the termui module. To keep the import time of Click down, some infrequently used functionality is placed in this module and only imported as needed. :copyright: (c) 2014 by Armin Ronacher. :license: BSD, se...
# Derived from the Salt codebase (due to implementing the ip interface); that # is Apache-2 so license compatible. import logging import salt.utils.validate.net # Define the module's virtual name __virtualname__ = 'ip' # From rh_ip.py _CONFIG_TRUE = ['yes', 'on', 'true', '1', True] _CONFIG_FALSE = ['no', 'off', 'fa...
DEBUG = False import os import subprocess from pybythec import utils from pybythec.utils import PybythecError log = utils.log class BuildElements: def __init__(self, osType = None, compiler = None, buildType = None, binaryFormat = None, p...
# Copyright (c) 2012 IBM # # 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 ...
# Copyright (C) 2018 Henrique Pereira Coutada Miranda, Alejandro Molina Sanchez # All rights reserved. # # This file is part of yambopy # from __future__ import print_function, division import os import re from math import sqrt import numpy as np from qepy.auxiliary import * eVtocm1 = 8065.54429 cm1toeV = 1.0/eVtocm1 ...
#!/usr/bin/python3 # # Copyright (c) 2016, Alliance for Open Media. All rights reserved # # This source code is subject to the terms of the BSD 2 Clause License and # the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License # was not distributed with this source code in the LICENSE file, you can # ob...
import re import requests import httpretty import mock import pytest from leadrouter import Client, HTTPError def test_create_lead_request(): c = Client('api.com', 'user', 'token') c._request = mock.Mock() c.create_lead('123', {'email': 'lead@gmail.com'}) c._request.assert_called_once_with('post', ...
############################################################################### ## ## Copyright (C) 2014-2015, New York University. ## 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. ## ## ...
import weakref import unicodedata from fontTools.agl import AGL2UV from defcon.tools import unicodeTools from defcon.objects.base import BaseDictObject class UnicodeData(BaseDictObject): """ This object serves Unicode data for the font. **This object posts the following notifications:** ===========...
# 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...
# Copyright Hybrid Logic Ltd. # Copyright 2015-2016 EMC Corporation # See LICENSE file for details.. from uuid import UUID, uuid4 from decimal import * from flocker.node.agents.blockdevice import ( VolumeException, AlreadyAttachedVolume, UnknownVolume, UnattachedVolume, IBlockDeviceAPI, BlockDeviceVolume,...
from PIL import Image import sys import os class ImageSplitter: format = "%(z)d.%(x)d.%(y)d.jpg" def __init__(self, target, images=(())): self.target = target self.size = 256 self.images = images def start(self): self._splitImages() level = 0 while True: ...