gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
from __future__ import absolute_import import bisect import functools import logging import math import operator import zlib from calendar import Calendar from collections import OrderedDict, namedtuple from datetime import datetime, timedelta import pytz from django.utils import dateformat, timezone from sentry.app...
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function import os import threading import sys import shellenv import sublime if sys.version_info < (3,): str_cls = unicode # noqa py2 = True else: str_cls = str py2 = False __version__ = '0.9.0' __version_inf...
#!/usr/bin/env python # coding=utf-8 from datetime import datetime import mock import os import pytest import tempfile import sys from sacred.run import Run from sacred.config.config_summary import ConfigSummary from sacred.utils import ( ObserverError, SacredInterrupt, TimeoutInterrupt, apply_backspa...
import random import colors class Field(object): ''' The Field is the data structure that will hold all blocks currently on-screen, as well as the block currently falling. It is a list of lists, where for any <self.cells[i][j]>, i represents the row and j represents the column. ''' def __i...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # metadata from __future__ import unicode_literals import frappe, json from frappe.utils import cstr, cint from frappe.model import integer_docfield_properties, default_fields from frappe.model.document import Docum...
# # CORE # Copyright (c)2011-2012 the Boeing Company. # See the LICENSE file included in this distribution. # # author: Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com> # ''' xorp.py: defines routing services provided by the XORP routing suite. ''' import os from core.service import CoreService, addservice from core.m...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ python modules for beamline matching utilities: matchwizard: main GUI framework for beamline matching Author: Tong Zhang Created: Sep. 23rd, 2015 """ import wx import time from . import funutils from . import pltutils import beamline import os class MatchWizar...
""" Loan analysis ============================================================================== Overview ------------------------------------------------------------------------------- Computes the amorization schedule for the following types of loans: * ``fixed_rate_loan``: In this loan, the interest rate is fixed...
# Copyright 2013: Mirantis 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 b...
#!/usr/bin/env python from __future__ import print_function from optparse import OptionParser import copy, os, pdb, random, subprocess, sys import h5py import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from PIL import Image import seaborn as sns import dna_io from seq_logo imp...
# ----------------------------------------------------------------------------- # Copyright (c) 2014--, The Qiita Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
# 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...
# Copyright 2014-2016 OpenMarket Ltd # Copyright 2018-2019 New Vector Ltd # Copyright 2019 The Matrix.org Foundation C.I.C. # # 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....
from textwrap import dedent from pontoon.base.tests import ( assert_attributes_equal, TestCase, UserFactory ) from pontoon.base.utils import aware_datetime from pontoon.sync import KEY_SEPARATOR from pontoon.sync.formats import po from pontoon.sync.tests.formats import FormatTestsMixin BASE_POFILE = """ ...
from time import sleep from datetime import datetime, timedelta import cmdo from .tty_netconf import tty_netconf __all__ = ['Terminal'] # ========================================================================= # Terminal class # ========================================================================= class Termin...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright: This module has been placed in the public domain. import pp.preprocessor as pp import libeasytorq import sys def default_option_values(): return { 'd' : True, 'r' : True, 's' : True, 'k' : False } def getname(): return "java" def getversion(): ...
#!/usr/bin/env python # Copyright (c) 2016 GoSecure Inc. from construct import * from definitions import * meta = None def unserialize_zend_function(): return Zend_Op_Array("op_array") def unserialize_class(): return Zend_Class_Entry("class") def Empty(): return "Empty" / Struct() def Z_Val(name, cal...
from p2ner.core.namespace import Namespace, initNS # Copyright 2012 Loris Corazza, Sakis Christakidis # # 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/l...
# -*- coding: utf-8 -*- """ perforce.models ~~~~~~~~~~~~~~~ This module implements the main data models used by perforce :copyright: (c) 2015 by Brett Dixon :license: MIT, see LICENSE for more details """ import subprocess import datetime import traceback import os import marshal import logging import re from colle...
#!/usr/bin/env python # # DSC extension # # Copyright 2015 Microsoft Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from django.apps.registry import Apps, apps from django.conf import settings from django.contrib.contenttypes import management as contenttypes_management from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRela...
from __future__ import unicode_literals import unittest from fontMath.mathFunctions import _roundNumber from fontMath.mathKerning import MathKerning class TestKerning(object): """Mockup Kerning class""" def __init__(self): self._kerning = {} def clear(self): self._kerning = {} def as...
# -*- coding: utf-8 -*- from __future__ import unicode_literals ''' Developer Navdeep Ghai Email navdeep@korecent.com License Korecent Solution Pvt. Ltd. ''' import frappe from frappe import _, msgprint, throw from bcommerce.utils.api import get_connection, is_exists from erpnext.controllers.item_variant import cr...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 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 # # Unle...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import os import shutil import sys # Bump pyglet/__init__.py version as well. VERSION = '1.2dev' long_description = '''pyglet provides an object-oriented programming interface for developing games and other visually-rich applicat...
""" Customisable progressbar decorator for iterators. Includes a default (x)range iterator printing to stderr. Usage: >>> from tqdm import trange[, tqdm] >>> for i in trange(10): #same as: for i in tqdm(xrange(10)) ... ... """ from __future__ import absolute_import # integer division / : float, // : int from...
# Copyright 2012 NEC 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 required b...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django_hstore.fields import events.models from django.conf import settings import mptt.fields import django.contrib.gis.db.models.fields class Migration(migrations.Migration): dependencies = [ ...
import shutil import asyncio import synapse.exc as s_exc import synapse.common as s_common import synapse.lib.coro as s_coro import synapse.lib.lmdbslab as s_lmdbslab import synapse.lib.multislabseqn as s_multislabseqn import synapse.tests.utils as s_t_utils from synapse.tests.utils import alist class MultiSlabSeqn...
# encoding: utf-8 # Copyright 2013 maker # License """ Project Management: test suites """ from django.test import TestCase from django.test.client import Client from django.core.urlresolvers import reverse from django.contrib.auth.models import User as DjangoUser from maker.core.models import User, Group, Perspe...
#! /usr/bin/env python # # example3_mpl.py -- Copy attributes from a Ginga Qt widget into a Matplotlib # figure. # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # # """ $ ./example3_mpl.py [fits file] example3 displays a native ging...
#!/usr/bin/python # ***************************************************************************** # # Copyright (c) 2016, EPAM SYSTEMS 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 # #...
import os import logging, re from google.appengine.ext import ereporter from google.appengine.ext import deferred from google.appengine.ext import ndb import web import engineauth from app.core.stackprinterdownloader import StackExchangeDownloader from app.core.stackprinterdownloader import StackAuthDownloader from a...
from typing import List, Dict, Type import pyqtgraph as pg from vnpy.trader.ui import QtGui, QtWidgets, QtCore from vnpy.trader.object import BarData from .manager import BarManager from .base import ( GREY_COLOR, WHITE_COLOR, CURSOR_COLOR, BLACK_COLOR, to_int, NORMAL_FONT ) from .axis import DatetimeAxis fr...
""" SQL Alchemy Testing Aircraft report defined as a record from the mode-s BEAST feed Each report is sent to Kafka for ingestion into Postgres/PostGIS and a Storm Spout """ import json import logging import os import time import shutil # TODO: Refactor the DB connection into a param, so there's not need to import...
# # 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...
#!/usr/bin/env python2 import errno import fcntl import re import os import subprocess import socket import sys import threading import tempfile import codexconfig # verboseness options WRITE_TO_STDOUT=True LOG_REPLAY_RECORDS=False XV6_KERNEL=os.path.dirname(os.path.realpath(__file__)) + '/../o.codex/kernel.elf' QEM...
# -*- coding: utf-8 -*- import json import click from tqdm import tqdm from prettytable import PrettyTable from bitshares.block import Block, BlockHeader from bitshares.account import Account from .decorators import onlineChain, unlockWallet, unlock from .ui import print_permissions, pprintOperation, print_table, print...
import numpy as np from statsmodels.tsa.tsatools import lagmat import critical_values class Johansen(object): """Implementation of the Johansen test for cointegration. References: - Hamilton, J. D. (1994) 'Time Series Analysis', Princeton Univ. Press. - MacKinnon, Haug, Michelis (1996) 'Nume...
#!/usr/bin/env python # FTW Telecommunications Research Center Vienna (www.ftw.at) # Dietmar Schabus (schabus@ftw.at) # July 2014 # library imports import pygame import pygame.locals # imports from this project import memory_config import memory_text import liblog # =================================================...
# Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. from __future__ import absolute_import import os import re import tempfile import flask import numpy as np import werkzeug.exceptions from .forms import ImageClassificationModelForm from .job import ImageClassificationModelJob from digits import fr...
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # 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 copyrigh...
# Authors: Nicolas Goix <nicolas.goix@telecom-paristech.fr> # Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # License: BSD 3 clause import numbers import numpy as np from scipy.sparse import issparse from warnings import warn from ..tree import ExtraTreeRegressor from ..utils import ( chec...
import numpy as np import gym import cv2 from gym import spaces from collections import deque from helper import set_random_seed # Assume Atari Environment def create_env(**kwargs): set_random_seed(kwargs['task_index'] * 89) assert "." not in kwargs['env_id'] return create_atari_baselines_env(kwargs['env_i...
"""Conversation objects.""" import asyncio import datetime import logging from hangups import (parsers, event, user, conversation_event, exceptions, hangouts_pb2) logger = logging.getLogger(__name__) CONVERSATIONS_PER_REQUEST = 100 MAX_CONVERSATION_PAGES = 100 async def build_user_conversatio...
import os.path import time import zope.interface import json import boto import boto.ec2 from .base import IProvider, MixinProvider, IInstance, MixinInstance import logging from ...utils import braced_param from ..worker_exceptions import InstanceDoesNotExist, InstanceException, \ DeployException, Unauthor...
""" mbed CMSIS-DAP debugger Copyright (c) 2015 ARM Limited 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...
""" """ import os import numpy as np import pandas as pd from .dataprep import IO from .dataprep import extract_floats as extr from .dataprep import dict_values as dvals class Analysis(): """ """ def __init__(self): self.loc = os.getcwd() self.structs = next(os.walk('.'))[1] self....
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: type_Result.py from types import * import mcl.object.MclTime RESULT_CELL_INFO_FLAG_IS_TRUNCATED = 1 RESULT_CELL_INFO_FLAG_IS_NULL = 2 class ResultEr...
# Copyright 2014 Insight Software Consortium. # Copyright 2004-2008 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. # See http://www.boost.org/LICENSE_1_0.txt """Defines :class:`scopedef_t` class""" import time from . import algorithm from . import templates from . import declaration fro...
# Copyright 2012 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 a...
# # Copyright (c) 2015 Red Hat # Licensed under The MIT License (MIT) # http://opensource.org/licenses/MIT # """ Django settings for pdc project. Generated by 'django-admin startproject' using Django 1.8.1. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full lis...
# encoding: 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 field 'GeoLevel.shapefile' db.add_column(u'profiles_geolevel', 'shapefile', self.gf('django.db.mo...
#!/usr/bin/env python3 import editme import subprocess import praw from hashlib import sha1 from flask import Flask from flask import Response from flask import request from io import StringIO from base64 import b64encode from base64 import b64decode import os import markdown import bleach # encoding=utf8 import sys fr...
# Copyright 2013 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 agre...
""" Unix system checks. """ # stdlib import operator import platform import re import sys import time # project from checks import Check from util import get_hostname from utils.platform import Platform from utils.subprocess_output import get_subprocess_output # 3rd party try: import psutil except ImportError: ...
from __future__ import unicode_literals import os from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse, clear_url_caches, set_script_prefix from django.http import HttpResponsePermanentRedirect from django.middleware.locale import LocaleMiddleware from django.test impor...
# Copyright (c) 2009-2010, Cloud Matrix Pty. Ltd. # All rights reserved; available under the terms of the BSD License. """ esky.bdist_esky.f_cxfreeze: bdist_esky support for cx_Freeze """ import os import sys import imp import time import zipfile import marshal import struct import shutil import inspect import...
# -*- coding: utf-8 -*- """ Created on Fri Sep 1 19:11:52 2017 @author: mariapanteli """ import pytest import os import numpy as np import pandas as pd import scripts.load_features as load_features feat_loader = load_features.FeatureLoader(win2sec=8) TEST_METADATA_FILE = os.path.join(os.path.dirname(__file__), '...
# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project # All rights reserved. # # This file is part of NeuroM <https://github.com/BlueBrain/NeuroM> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
"""Adds support for generic thermostat units.""" import asyncio import logging import voluptuous as vol from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateDevice from homeassistant.components.climate.const import ( ATTR_PRESET_MODE, CURRENT_HVAC_COOL, CURRENT_HVAC_HEAT, CURRENT_HVAC_...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'itemform.ui' # # Created: Sun Jul 07 15:54:55 2013 # by: PyQt4 UI code generator 4.9.6 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Attrib...
import pytest from fontTools.misc.loggingTools import CapturingLogHandler from ufo2ft.filters.flattenComponents import FlattenComponentsFilter, logger @pytest.fixture( params=[ { "glyphs": [ {"name": "space", "width": 500}, { "name": "contou...
# coding=utf-8 # Copyright 2021 The HuggingFace Inc. team. 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 r...
# -*- coding: utf-8 -*- import copy import marshal import struct import time import traceback from .._compat import PY2, exists, copyreg, integer_types, implements_bool, \ iterkeys, itervalues, iteritems from .serializers import serializers long = integer_types[-1] @implements_bool class BasicStorage(object): ...
# coding=utf-8 # Distributed under the MIT software license, see the accompanying # file LICENSE or http://www.opensource.org/licenses/mit-license.php. from concurrent.futures import ThreadPoolExecutor import os import logging import grpc from time import sleep from daemonize import Daemonize from pyqrllib.pyqrllib i...
# Copyright 2014: Mirantis 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 b...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Product.shipping' db.add_column('products', 'shipping', ...
# 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 to in writing,...
import functools import gzip import os import re from difflib import SequenceMatcher from django.conf import settings from django.core.exceptions import ( FieldDoesNotExist, ImproperlyConfigured, ValidationError, ) from django.utils.functional import lazy from django.utils.html import format_html from django.utils...
#!/usr/bin/python __author__ = 'ksk_s' import argparse import time import os import errno import subprocess import math import numpy as np import scipy.ndimage as nd import PIL.Image from google.protobuf import text_format import caffe # a couple of utility functions for converting to and from Caffe's input image l...
# Tweepy # Copyright 2009-2010 Joshua Roesslein # See LICENSE for details. import logging import requests from requests.exceptions import Timeout from threading import Thread from time import sleep from HTMLParser import HTMLParser import ssl from tweepy.models import Status from tweepy.api import API from tweepy.err...
import string from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.utils.datastructures import SortedDict #from django.contrib.auth.models import User from django.conf import settings from ratings import managers # MODELS ...
#!/usr/bin/python # Copyright 2020 Makani Technologies 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 applicabl...
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 License, or (at your option) any later version. # # This program is distrib...
#!/usr/bin/python -tt # 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; version 2 of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; wi...
from __future__ import absolute_import from __future__ import print_function from __future__ import with_statement from __future__ import unicode_literals import os import sys import random import time from mock import call, patch, create_autospec from tornado.ioloop import IOLoop # shunt '..' into sys.path since we...
# 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 ...
# 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 to in writing, ...
#!/usr/bin/env python import atexit import copy import logging import os import shutil import subprocess import sys import tempfile import warnings from argparse import ArgumentParser import django from django.apps import apps from django.conf import settings from django.db import connection, connections from django.t...
# ---------------------------------------------------------------------------- # Copyright (c) 2015--, ghost-tree development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the LICENSE file, distributed with this software. # ------------------------------------------------...
# Copyright 2007 Matt Chaput. 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 conditions and the...
from __future__ import absolute_import, print_function, division import os import re import time import platform import subprocess import ConfigParser from lwp.exceptions import ContainerNotExists, LxcConfigFileNotComplete from lwp.lxclite import exists, stopped from lwp.lxclite import lxcdir from lwp.utils import cg...
""" Tests for django test runner """ from __future__ import unicode_literals import unittest from admin_scripts.tests import AdminScriptTestCase from django import db from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.management import call_command from django.t...
# # Copyright 2016 The BigDL 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 ...
from django.conf import settings from django.template import (Library, Node, TemplateSyntaxError) from django.utils.encoding import smart_str register = Library() class Reversible(object): def __init__(self, view, args, kwargs): self.view = view self.args = args self.kwargs = kwargs ...
import synapse.datamodel as s_datamodel from synapse.tests.common import * class DataModelTest(SynTest): def test_datamodel_types(self): model = s_datamodel.DataModel() model.addTufoForm('foo') model.addTufoProp('foo', 'bar', ptype='int') model.addTufoProp('foo', 'baz', ptype='st...
#!/usr/bin/env python # # Copyright 2013 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. import optparse import os import shutil import re import sys import textwrap from util import build_utils import jar sys.path.appe...
import functools import math import sys from typing import Tuple class Point(object): def __init__(self, x=None, y=None): if x is not None: self.x = float(x) else: self.x = None if y is not None: self.y = float(y) else: self.y = None ...
# 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 ...
# Copyright 2020 Google LLC 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 ag...
"""Config flow for Logitech Squeezebox integration.""" import asyncio from http import HTTPStatus import logging from typing import TYPE_CHECKING from pysqueezebox import Server, async_discover import voluptuous as vol from homeassistant import config_entries, data_entry_flow from homeassistant.components import dhcp...
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import os import re import subprocess import sys from datetime import date import click import yaml from...
import logging from typing import Tuple, Dict, Any, Optional, Sequence from PyQt5 import QtWidgets, QtCore, QtGui from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg, NavigationToolbar2QT from matplotlib.figure import Figure from .geometry_ui import Ui_Form from .spacerselector import SpacerSelectorDialo...
# Copyright 2019 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 """ Name: sim_gbs_snps.py Author: Michael G. Harvey Date: 16 October 2013 See readme for details. """ import os import sys import random import re import readline import argparse import ConfigParser from subprocess import check_call, call, PIPE from Bio import AlignIO def get_args(): pars...
"""Virtual oscilloscope. If ran as a script, connects to a NIDAQserver and serves as a virtual oscilloscope. If imported as a module, exports the various components of the oscilloscope as classes. """ __author__ = "Karim Liman-Tinguiri <klt@mit.edu>" __version__ = "0.1" __date__ = "25 June 2007" import wx import num...
import importlib as imp import sys import time from collections import deque from pprint import pprint import requests from utils.robotexclusionrulesparser import RobotExclusionRulesParser from utils import logutils, urlutils, crawlutils, profileutil, listutils sys.path.append('filters') from utils.bloomdClient import...
#! /usr/bin/env python """ Implements baseband digital signal processing for waveform-level simulation of IEEE 802.11n PHY protocol; contains `Dot11N_DSP` class. Revision Info ============= * $LastChangedBy: mandke $ * $LastChangedDate: 2011-10-19 13:31:24 -0500 (Wed, 19 Oct 2011) $ * $LastChangedRevision: 5214 $ :...