gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# -*- 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 model 'EnergyGoal'
db.create_table(u'resource_goal_energygoal', ... | |
import math
from pandac.PandaModules import CollisionSphere, CollisionNode, Vec3, Point3, deg2Rad
from direct.interval.IntervalGlobal import Sequence, Func, Parallel, ActorInterval, Wait, Parallel, LerpHprInterval, ProjectileInterval, LerpPosInterval
from direct.directnotify import DirectNotifyGlobal
from toontown.buil... | |
#!/usr/bin/env python
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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.... | |
# -*- coding: utf-8 -*-
from django.apps import apps
from django.contrib.postgres import fields
from django.contrib.auth.models import Group
from typedmodels.models import TypedModel
from api.taxonomies.utils import optimize_subject_query
from django.db import models
from django.db.models.signals import post_save
from ... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2017 F5 Networks Inc.
#
# This file is part of Ansible
#
# Ansible 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 3 of the License, or
# ... | |
from __future__ import absolute_import
import os.path
import random
import pytz
import six
from uuid import uuid4
from datetime import datetime, timedelta
from django.utils import timezone
from sentry.constants import DATA_ROOT, INTEGRATION_ID_TO_PLATFORM_DATA
from sentry.event_manager import EventManager
from sentr... | |
import os
from tempfile import mkdtemp
from contextlib import contextmanager
from fabric.operations import put
from fabric.api import env, local, sudo, run, cd, prefix, task, settings
env.roledefs = {
'staging_prep': ['root@staging.centralfitestoque.com']
}
STAGING_HOST = 'staging.centralfitestoque.com'
CHEF_V... | |
"""Implements a Nvim host for python plugins."""
import imp
import inspect
import logging
import os
import os.path
import re
from functools import partial
from traceback import format_exc
from . import script_host
from ..api import decode_if_bytes, walk
from ..compat import IS_PYTHON3, find_module
from ..msgpack_rpc i... | |
from basic import Basic, S
from operations import AssocOp
from cache import cacheit
from logic import fuzzy_not
from numbers import Integer, Rational
from symbol import Symbol, Wild
from sympy.utilities.iterables import make_list
# internal marker to indicate:
# "there are still non-commutative objects -- don't forg... | |
# 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... | |
import os
import json
import hashlib
import logging
import smtplib
from collections import defaultdict
from config import (
BUSINESS_MEMBER_RECIPIENT,
DEFAULT_MAIL_SENDER,
ENABLE_SLACK,
MAIL_PASSWORD,
MAIL_PORT,
MAIL_SERVER,
MAIL_USERNAME,
MULTIPLE_ACCOUNT_WARNING_MAIL_RECIPIENT,
SLA... | |
#!/usr/bin/env python3
# step through an executable under cosimulation and report errors
#import objgraph
import sys
import os
import json
import codecs
import traceback
import multiprocessing
import pickle
libdir = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'lib')
sys.path.append(libdir)
import uti... | |
#!/usr/bin/env python
### this is the python script created by Ferris Cheung 2017-01-01
### It is used to get the shared Cache Reuse Distance Distribution which is added up by diff core's RDD-----L2R,and it's output as name-reuse.txt
### and it gets the shared Cache Stack Distance Distribution which is collected in th... | |
# -*- coding: utf-8 -*-
# Copyright (c) 2013 Ole Krause-Sparmann
# 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,... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: mcxiaoke
# @Date: 2015-08-25 08:45:45
from __future__ import unicode_literals, division, absolute_import, print_function
from datetime import datetime
import codecs
import os
import sys
import re
import requests
import shutil
import string
import time
import ra... | |
#!/usr/bin/env python
# mammon - a useless ircd
#
# Copyright (c) 2015, William Pitcock <nenolod@dereferenced.org>
#
# 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... | |
from __future__ import absolute_import
from ..plot_object import PlotObject
from ..properties import HasProps
from ..properties import Any, Int, String, Instance, List, Dict, Either
class DataSource(PlotObject):
""" A base class for data source types. ``DataSource`` is
not generally useful to instantiate on i... | |
from __future__ import unicode_literals
from collections import OrderedDict
from datetime import date
import graphviz
from django.contrib.auth.models import User
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.core.validators impor... | |
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | |
#
# Copyright 2014 Rackspace, 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 ... | |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.core.urlresolvers import reverse
from django.shortcuts import get_object_or_404
from django.utils.decorators import method_decorator
from django.utils.translation import ugettext_lazy as _
from django.views.decorators.cache im... | |
import os
import re
import subprocess
import random
import string
from tempfile import mkstemp
class PdftkError(Exception):
pass
class DuplicateFormFieldError(Exception):
pass
class MissingFormFieldError(Exception):
pass
class InvalidOptionError(Exception):
pass
class TooManyPDFsError(Exceptio... | |
# Lint as: python3
# Copyright 2021 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 ... | |
import unittest
from django.test import TransactionTestCase
from django.conf import settings
from django.utils import timezone
from datetime import timedelta, datetime
import sys
if sys.version_info >= (3, 0):
unicode = str
from background_task.tasks import tasks, TaskSchedule, TaskProxy
from background_task.mod... | |
#!/usr/bin/python
# Copyright (c) Arni Mar Jonsson.
# See LICENSE for details.
import sys, string, unittest, itertools
class TestRocksDB(unittest.TestCase):
def setUp(self):
# import local rocksdb
import rocksdb as _rocksdb
self.rocksdb = _rocksdb
dir(self.rocksdb)
# Python2/3 compat
if hasattr(string,... | |
"""Algorithms for computing symbolic roots of polynomials. """
from __future__ import print_function, division
import math
from sympy.core.symbol import Dummy, Symbol, symbols
from sympy.core import S, I, pi
from sympy.core.mul import expand_2arg
from sympy.core.relational import Eq
from sympy.core.sympify import sy... | |
import json
import sys
from sharepa.search import ShareSearch
from sharepa.experimental_analysis_functions import convert_nested_to_dataframe
from elasticsearch_dsl.utils import AttrDict
from mock import Mock
def pretty_print(d):
print(json.dumps(d, indent=4))
def test_convert_nested_to_dataframe_crossed():
... | |
'''
Selection tests
===============
'''
import unittest
from kivy.uix.widget import Widget
from kivy.uix.listview import ListView, ListItemButton
from kivy.properties import NumericProperty, StringProperty
from kivy.adapters.listadapter import ListAdapter
from kivy.adapters.dictadapter import DictAdapter
from kivy.a... | |
"""
Load npy xy, plot and save
"""
import os, sys
import matplotlib
matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab!
import matplotlib.pyplot as plt
import matplotlib.cm as mpl_cm
from matplotlib import rc
from matplotlib.font_manager import FontProperties
from matplotlib import rcPa... | |
# 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... | |
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from builtins import * # NOQA
from future import standard_library
standard_library.install_aliases() # NOQA
from abc import ABCMeta
from abc import abstractmethod
from ... | |
##########################################################################
#
# Copyright (c) 2010-2013, Image Engine Design 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:
#
# * Redis... | |
from pythran.tests import TestEnv
from pythran.typing import *
class TestCopperhead(TestEnv):
# from copperhead test suite
# https://github.com/copperhead
def test_saxpy(self):
self.run_test(
"def saxpy(a, x, y): return list(map(lambda xi, yi: a * xi + yi, x, y))",
1.5, [1,2,3], [... | |
# 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 ... | |
#!/usr/bin/env python
"""
@package mi.dataset.parser.adcpt_m_wvs
@file marine-integrations/mi/dataset/parser/adcpt_m_wvs.py
@author Ronald Ronquillo
@brief Parser for the adcpt_m_wvs dataset driver
This file contains code for the adcpt_m_wvs parser and code to produce data particles.
The wave record structure is an ... | |
import time
from typing import Any, Dict, List, Optional
from django.core.exceptions import ImproperlyConfigured
from django.db import models
from . import logging
from .access_permissions import BaseAccessPermissions
from .auth import UserDoesNotExist
from .autoupdate import AutoupdateElement, inform_changed_data, i... | |
# coding: spec
from harpoon.executor import docker_context as docker_context_maker
from harpoon.option_spec.harpoon_specs import HarpoonSpec
from harpoon.ship.builder import Builder
from harpoon.ship.runner import Runner
from tests.helpers import HarpoonCase
from delfick_project.norms import Meta
import codecs
impor... | |
#
# 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... | |
"""
Python-specific functions for finding information about dependencies.
Classes
-------
Dependency - contains information about a Python module or package, and tries
to determine version information.
Functions
---------
find_version_by_attribute() - tries to find version information from the
... | |
import RPi.GPIO as GPIO, time, os
import random
GPIO.setmode(GPIO.BCM)
width = 26
height = 10
ledpixels = []
for i in range(0,width):
ledpixels.append([0]*height)
spidev = file("/dev/spidev0.0", "w")
characters = {}
with open('/home/pi/font.txt', 'r') as m_f:
m_lines = m_f.readlines()
for m_i in range(0,l... | |
"""
Templatetags for django-treebeard to add drag and drop capabilities to the
nodes change list - @jjdelc
"""
import datetime
from django.db import models
from django.contrib.admin.templatetags.admin_list import (
result_headers, result_hidden_fields)
from django.contrib.admin.utils import (
lookup_field, d... | |
from math import *
from numpy import *
from scipy import integrate
from scipy.interpolate import InterpolatedUnivariateSpline
fg = open("lrg", "r")
fd = open("random", "r")
sd = open("bao", "w")
# Values for the cosmic parameters
c = 3.0*10**5
Om = 0.3
H0 = 72.0
Ol = 0.7
rty = 2.0
# Formula for radial diameter distance... | |
#!/usr/bin/env python
import sys
import time
import random
import threading
import re
import heapq
import socket
import numpy
from UserString import MutableString
from datetime import timedelta
from datetime import datetime
from ReadShore import ReadShore
import ShoreParser as sp
import LaughStateEstimator as lse
f... | |
import copy
import tempfile
import xmlsec
from tests import base
consts = xmlsec.constants
class TestKeys(base.TestMemoryLeaks):
def test_key_from_memory(self):
key = xmlsec.Key.from_memory(self.load("rsakey.pem"), format=consts.KeyDataFormatPem)
self.assertIsNotNone(key)
def test_key_from_... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Cloudbase Solutions Srl
#
# 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... | |
"""AMQP 0.9.1 Adapter to connect to RabbitMQ using pika library.
Publish and subscribe to queues and exchanges in RabbitMQ
"""
import pika
import functools
import threading
from message_queue import logger
from message_queue.adapters import BaseAdapter
LOGGER = logger.get(__name__)
class AMQPAdapter(BaseAdapter):... | |
# coding=utf-8
# Copyright 2022 The Google Research 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 applicab... | |
from __future__ import unicode_literals
import os
import dvc
import time
import shutil
import filecmp
import posixpath
from dvc.logger import logger
from dvc.system import System
from mock import patch
from dvc.main import main
from dvc.utils import file_md5, load_stage_file
from dvc.stage import Stage
from dvc.exc... | |
import posixpath
from collections import defaultdict
from django.apps import apps
from django.contrib.contenttypes.models import ContentType
from django.db.models import CharField, Q
from django.db.models.functions import Length, Substr
from django.db.models.query import BaseIterable
from treebeard.mp_tree import MP_N... | |
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
from __future__ import nested_scopes
import gtk
from twisted import copyright
from twisted.internet import defer
from twisted.python import failure, log, util
from twisted.spread import pb
from twisted.cred.credentials import Usernam... | |
import os
import random
import string
import unittest
from fs.errors import ResourceNotFoundError
from fs.path import relpath
from fs.tempfs import TempFS
from fs.tests import FSTestCases
from fs.tests import ThreadingTestCases
from versioning_fs import VersioningFS
from versioning_fs.errors import VersionError
KB ... | |
from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from random import uniform
from compas.geometry import transform_points
from compas.geometry import centroid_points
from compas.geometry import bounding_box
from compas.geometry import Primitive
from compas.geo... | |
import collections
import numpy as np
import theano
import theano.tensor as TT
import rllab.misc.logger as logger
from rllab.algos.batch_polopt import BatchPolopt, BatchSampler
from rllab.algos.npo import NPO
from rllab.misc import ext
from rllab.misc.overrides import overrides
from rllab.sampler import parallel_samp... | |
# pylint: disable=W0212
import json
import logging
from datetime import datetime
from django.utils.timezone import utc
import re
import redis
import botbot_plugins.plugins
from botbot_plugins.base import PrivateMessage
from django.core.cache import cache
from django.conf import settings
from django.utils.importlib imp... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 Justin Santa Barbara
# 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.apach... | |
"""
Sample anonymous user sessions that have different bot threshold scores.
Also, samples testing data.
Usage:
anonymous_users_and_testing_data_sampling (-h|--help)
anonymous_users_and_testing_data_sampling <input_testing> <input_anonymous_user_threshold_scores> <input_anonymous_user_threshold_scores_i2> <a... | |
# 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... | |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
#!/usr/bin/python3
import asyncio
import datetime
import logging
import subprocess
import sys
import json
import aiohttp
import discord
from discord.ext import commands
import cupboard
from bs4 import BeautifulSoup
logging.basicConfig(level=logging.WARNING)
startup_time = datetime.datetime.today()
def get_version(... | |
# Copyright (c) 2012 <Jaume Devesa (jaumedevesa@gmail.com)>
#
# 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, modi... | |
# Copyright 2014 Rackspace Hosting
# 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 require... | |
# -*- coding: utf-8 -*-
# Copyright 2013 Metacloud, Inc.
# 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... | |
# -*- coding: utf-8 -*-
from genestack.core_files.genestack_file import File
from genestack.genestack_exceptions import GenestackException
from genestack.java import java_object, JAVA_STRING, JAVA_HASH_MAP, JAVA_MAP
from genestack.query_range import QueryRange
from genestack.utils import deprecated, validate_type
cl... | |
#!/usr/bin/env python
"""
Defines LineSplitter and helper functions.
-----
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License. See http://scipy.org.
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
Author: Pearu Peterson <pearu@cens.ioc.ee>
Created: May 20... | |
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | |
# -*- coding: utf-8 -*-
import collections
import datetime
import errno
import gzip
import io
import os
import signal
import sqlite3
import stat
import time
import threading
from beaver.utils import IS_GZIPPED_FILE, REOPEN_FILES, eglob, multiline_merge
from beaver.unicode_dammit import ENCODINGS
class Worker(object)... | |
#!/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
"License")... | |
# VMeter Python demos
# VMeter.net
# ver 1. 1/26/13
import pypm
import array
import time
from collections import deque
INPUT=0
OUTPUT=1
def PrintDevices(InOrOut):
for loop in range(pypm.CountDevices()):
interf,name,inp,outp,opened = pypm.GetDeviceInfo(loop)
if ((InOrOut == INPUT) & (inp == 1) |
... | |
# 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 ... | |
# -*- coding: utf-8 -*-
#
# Collection of functions related to VCF files
#
# 1 based
from future.utils import lmap
from past.builtins import xrange
from collections import namedtuple
import re
from . import g2g
from . import g2g_utils
from . import exceptions
VCF_FIELDS = ['chrom', 'pos', 'id', 'ref', 'alt', 'qua... | |
#!/usr/bin/env python
# generator.py
# simple C++ generator, originally targetted for Spidermonkey bindings
#
# Copyright (c) 2011 - Zynga Inc.
from clang import cindex
import sys
import pdb
import ConfigParser
import yaml
import re
import os
import inspect
import traceback
from Cheetah.Template import Template
type_... | |
from __future__ import absolute_import, division, print_function
import os
import imp
import sys
from collections import namedtuple
"""
Objects used to configure Glue at runtime.
"""
__all__ = ['Registry', 'SettingRegistry', 'ExporterRegistry',
'ColormapRegistry', 'DataFactoryRegistry', 'QtClientRegistry'... | |
"""Support for Luftdaten stations."""
import logging
from luftdaten import Luftdaten
from luftdaten.exceptions import LuftdatenError
import voluptuous as vol
from homeassistant.config_entries import SOURCE_IMPORT
from homeassistant.const import (
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
CONF_MONITORED_CONDIT... | |
import pickle
from io import BytesIO
import numpy as np
import scipy.sparse
from sklearn.datasets import load_digits, load_iris
from sklearn.cross_validation import cross_val_score, train_test_split
from sklearn.externals.six.moves import zip
from sklearn.utils.testing import assert_almost_equal
from sklearn.utils.te... | |
# -*- coding: utf-8 -*-
import datetime
import math
WGS84_a = 6378137.0
WGS84_b = 6356752.314245
def ecef_from_lla(lat, lon, alt):
'''
Compute ECEF XYZ from latitude, longitude and altitude.
All using the WGS94 model.
Altitude is the distance to the WGS94 ellipsoid.
Check results here http://ww... | |
import hashlib, binascii, struct, array, os, time, sys, optparse
import scrypt
from construct import *
def main():
options = get_args()
algorithm = get_algorithm(options)
# https://en.bitcoin.it/wiki/Difficulty
bits, target = get_difficulty(algorithm)
input_script = create_input_script(options.timest... | |
"""Implements nose test program and collector.
"""
from __future__ import generators
import logging
import os
import sys
import time
import unittest
from nose.config import Config, all_config_files
from nose.loader import defaultTestLoader
from nose.plugins.manager import PluginManager, DefaultPluginManager, \
R... | |
__author__ = 'oier'
import os
import numpy as np
from data.parameters import true_params
from data.parameters import false_params
import distance as dist
import numpy as np
def pdftotext(path):
os.system("pdftotext {data}".format(data=path))
return(path.replace(".pdf",".txt"))
import pandas as pd
def parse(p... | |
# Copyright 2010 http://www.collabq.com
#!/usr/bin/python
#
# Perforce Defect Tracking Integration Project
# <http://www.ravenbrook.com/project/p4dti/>
#
# COVERAGE.PY -- COVERAGE TESTING
#
# Gareth Rees, Ravenbrook Limited, 2001-12-04
# Ned Bat... | |
"""Test UniFi config flow."""
from unittest.mock import patch
import aiounifi
from homeassistant import config_entries, data_entry_flow, setup
from homeassistant.components.unifi.const import (
CONF_ALLOW_BANDWIDTH_SENSORS,
CONF_ALLOW_UPTIME_SENSORS,
CONF_BLOCK_CLIENT,
CONF_CONTROLLER,
CONF_DETECT... | |
# -*- coding: utf-8 -*-
"""Qt utilities."""
# -----------------------------------------------------------------------------
# Imports
# -----------------------------------------------------------------------------
import os
import sys
import contextlib
from ..utils._misc import _is_interactive
from ..utils.logging ... | |
# Copyright 2015 Metaswitch Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | |
import signal
import unittest
import os
from contextlib import contextmanager
from functools import wraps
import sys
import uvio
from uvio.process import ProcessOptions, Popen, PIPE
from uvio import sync
from uvio.pipes import Pipe
from inspect import iscoroutinefunction
class Test(unittest.TestCase):
def test_... | |
###############################################################################
##
## 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.
##
## ... | |
# Copyright 2018 The TensorFlow Probability 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 o... | |
from __future__ import absolute_import, unicode_literals
import unittest
import mock
from mopidy.models import Album, Artist, Playlist, Ref, SearchResult, Track
from mopidy.mpd.protocol import music_db, stored_playlists
from tests.mpd import protocol
# TODO: split into more modules for faster parallel tests?
cla... | |
<<<<<<< HEAD
<<<<<<< HEAD
import os
import sys
import linecache
import re
import tkinter as tk
from idlelib.TreeWidget import TreeNode, TreeItem, ScrolledCanvas
from idlelib.ObjectBrowser import ObjectTreeItem, make_objecttreeitem
from idlelib.PyShell import PyShellFileList
def StackBrowser(root, flist=None, tb=None,... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import unittest
from pyowm.weatherapi25.weather_manager import WeatherManager
from pyowm.commons.http_client import HttpClient
from pyowm.constants import WEATHER_API_VERSION
from pyowm.config import DEFAULT_CONFIG
from pyowm.weatherapi25.historian import Histo... | |
"""Unit tests for reviewboard.reviews.ui.base.FileAttachmentReviewUI."""
from __future__ import unicode_literals
from djblets.testing.decorators import add_fixtures
from kgb import SpyAgency
from reviewboard.reviews.ui.base import (FileAttachmentReviewUI,
register_ui,
... | |
# Copyright 2016, 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... | |
""" from a gdsfactory component write Sparameters from an FDTD Lumerical simulation
"""
import json
from collections import namedtuple
import numpy as np
import pp
from pp.layers import layer2material, layer2nm
from pp.config import materials
def write(
component,
session=None,
run=True,
overwrite=F... | |
# ===============================================================================
# Copyright 2013 Jake Ross
#
# 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... | |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
# -*- coding: utf8 -*-
from __future__ import print_function
import re
import eatiht
import requests
from breadability.readable import Article
from requests import Request, Session
from requests.adapters import HTTPAdapter
from six.moves import urllib
from sumy.models.dom import ObjectDocumentModel, Paragraph, Senten... | |
import warnings
from functools import reduce
import numpy as np
import pandas as pd
from geopandas import GeoDataFrame, GeoSeries
from geopandas.array import _check_crs, _crs_mismatch_warn
def _ensure_geometry_column(df):
"""
Helper function to ensure the geometry column is called 'geometry'.
If another... | |
# Copyright (c) 2014 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... | |
from thrift.protocol.TBinaryProtocol import TBinaryProtocol
from thrift.protocol.TCompactProtocol import TCompactProtocol
from thrift.protocol.TJSONProtocol import TJSONProtocol
from thrift.transport import TTransport
from thrift.protocol.TBase import TBase
from unimodel.model import Unimodel, Field
from unimodel.backe... | |
# Copyright (c) 2012 Rackspace Hosting
# 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 req... | |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
#----------------------------------------------------------------
# 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 unde... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.