gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# Copyright 2013 OpenStack Foundation
# Copyright 2015 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/license... | |
import itertools
import random
import string
import re
import sys
import time
import math
# constants and dictionary
yv = 'aeo'
yc = 'rst'
bv = 'i'
bc = 'bcdmp'
gv = 'u'
gc = 'gn'
pi = 'fwvhy'
og = 'lk'
pu = 'jx'
red = 'qz'
grid_letters = (red*3)+(pu*3)+(og*4)+(pi*6)+(gc*12)+(gv*9)+(bc*11)+(bv*8)+(yc*20)+(yv*34)
gri... | |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
# -*- coding: utf-8 -*-
# Copyright (c) 2016 Ansible, Inc.
# All Rights Reserved.
from __future__ import unicode_literals
import awx.main.fields
from django.db import migrations, models
import django.db.models.deletion
from django.conf import settings
from django.utils.timezone import now
import jsonfield.fields
i... | |
# Copyright 2011 OpenStack Foundation.
# 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 w... | |
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation
#
# 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 limitati... | |
# Copyright 2013 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... | |
import numpy as np
import _correlate
import numpy.fft as dft
import iraf_frame
VALID = 0
SAME = 1
FULL = 2
PASS = 3
convolution_modes = {
"valid":0,
"same":1,
"full":2,
"pass":3,
}
def _condition_inputs(data, kernel):
data, kernel = np.asarray(data), np.asarray(kernel)
if np.rank(data)... | |
from django.conf import settings
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.contrib.sites.models import Site
from django.core.urlresolvers import reverse
from django.core.mail import send_mail
from django.http import (HttpResponseForbidden, HttpResponseRedi... | |
""" Vanilla RNN
@author Graham Taylor
"""
import numpy as np
import theano
import theano.tensor as T
from sklearn.base import BaseEstimator
import logging
import time
import os
import datetime
import pickle as pickle
import math
import matplotlib.pyplot as plt
plt.ion()
mode = theano.Mode(linker='cvm')
#mode = '... | |
#!/usr/bin/env python
#
# Protein Engineering Analysis Tool DataBase (PEATDB)
# Copyright (C) 2010 Damien Farrell & Jens Erik Nielsen
#
# 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 ver... | |
from hamcrest import assert_that, is_, contains, has_entries, has_entry
from backdrop.core.nested_merge import nested_merge, group_by, \
apply_collect_to_group, collect_all_values
from backdrop.core.timeseries import WEEK, MONTH
def datum(name=None, version=None, place=None, age=None, stamp=None, count=1):
re... | |
"""
Test breakpoint names.
"""
from __future__ import print_function
import os
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class BreakpointNames(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = Tr... | |
# Copyright 2015 Geoscience Australia
#
# 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 la... | |
# 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... | |
import os, sys
from datetime import datetime, timedelta
from time import sleep
from timeit import default_timer as timer
from story import Story
from utils import ERROR, SUCCESS, WARNING, CAPTURE_WAIT
from utils import DateIterator, clear_screen, ffi_channel, fmt, fmt_text, force_input, get_lang
def build_paths(sess... | |
from ..robotsim import *
from ..math import vectorops,so3,se3
import random
from .. import vis
import time
import math
from ..model.trajectory import Trajectory
from ..model.contact import ContactPoint
def settle(world,obj,
forcedir=(0,0,-1),forcept=(0,0,0),
settletol=1e-4,orientationDamping=0.0,
perturb=... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = r'''
---
module: bigip_monitor_https
sho... | |
# $Filename$
# $Authors$
# Last Changed: $Date$ $Committer$ $Revision-Id$
#
# Copyright (c) 2003-2011, German Aerospace Center (DLR)
# All rights reserved.
#
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions are
#met:
#
# * Redistr... | |
#!/usr/bin/python
# Copyright (c) 2015, Michael LeBeane
# The University of Texas at Austin
# The Laboratory for Computer Architecture (LCA)
# All rights reserved.
#
# Redistribution of this source or derived binaries is not authorized without
# the express written consent of the original copyright holders.
#
# THIS SO... | |
from ..sequential import Sequential
from ..graph import Graph
from ..node import StartNode, HiddenNode, EndNode
from . import Conv2D, MaxPooling, RELU, ELU, BatchNormalization, Sum, \
Concat, AvgPooling, Conv2D_Transpose, Dropout, BaseModel
from ..utils import same_nd, valid_nd, devalid_nd, desame_nd
imp... | |
"""Add the effects of instrumental noise into the simulation.
This is separated out into multiple tasks. The first, :class:`ReceiverTemperature`
adds in the effects of instrumental noise bias into the data. The second,
:class:`SampleNoise`, takes a timestream which is assumed to be the expected (or
average) value and ... | |
#!/usr/bin/env python
# encoding: utf-8
import os
from modularodm import Q
from modularodm.exceptions import ModularOdmException
from framework.auth.core import User
from website import settings
from website.app import init_app
from website.conferences.model import Conference
def main():
init_app(set_backends... | |
# 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=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... | |
# 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
# d... | |
# Copyright 2015 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... | |
# ##### 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/env python -Es
"""
Script to set up a custom genome for bcbio-nextgen
"""
import argparse
from argparse import ArgumentParser
import os
import toolz as tz
from bcbio.utils import safe_makedir, file_exists, chdir
from bcbio.pipeline import config_utils
from bcbio.distributed.transaction import file_transacti... | |
#!/usr/bin/env python
"""
This is an Ansible dynamic inventory for OpenStack.
It requires your OpenStack credentials to be set in clouds.yaml or your shell
environment.
"""
from __future__ import print_function
import argparse
import json
import os
try:
import ConfigParser
except ImportError:
import configp... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# king_phisher/client/mailer.py
#
# 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, th... | |
from __future__ import print_function
import MimecastV2
from CommonServerPython import *
# Parameters for Get arguments test
policy_data = {
'description': 'new',
'fromPart': 'bla bla',
'fromType': 'free_mail_domains',
'fromValue': 'gmail.com',
'toType': 'email_domain',
'toValue': 'gmail.com'... | |
import distutils.sysconfig
import logging as log
import platform
import zipfile
import sys
from distutils.command.build import build as _build
from distutils.command.build_py import build_py as _build_py
from distutils.command.install_data import install_data as _install_data
from distutils.errors import DistutilsSetup... | |
# -*- coding: utf-8 -*-
from __future__ import division
from math import sqrt
from dataloader import loadJsonObjectToDict
import pickle
import os
import json
PENALTY_RATIO = 9
def sim_tanimoto(prefs, personA, personB):
keys_a = set(prefs[personA])
keys_b = set(prefs[personB])
intersection = keys_a & keys_... | |
# detached process management (used in Phenix GUI)
# This is intended to imitate running a process using libtbx.thread_utils,
# but split across truly independent processes (potentially on different
# systems). I use something like this to start a server:
#
# easy_run.call("libtbx.start_process run.pkl &")
# FIXME... | |
"""
forms for django-form-utils
Time-stamp: <2010-04-28 02:57:16 carljm forms.py>
"""
from copy import deepcopy
from django import forms
from django.forms.util import flatatt, ErrorDict
from django.utils.safestring import mark_safe
class Fieldset(object):
"""
An iterable Fieldset with a legend and a set of ... | |
"""A multi-producer, multi-consumer queue."""
from time import time as _time
try:
import threading as _threading
except ImportError:
import dummy_threading as _threading
from collections import deque
import heapq
__all__ = ['Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue']
class Empty(Exception):
"... | |
import simpy
import functools
import random
import time
from enum import Enum
DEBUG = False
simlog = open("simlog.log", "w")
def dprint(*text):
if(DEBUG):
print("[", time.strftime("%H:%M:%S"),"]:", end="", file=simlog)
for t in text:
print("", t, end="", file=simlog)
print("", file=simlog)
# Default attrib... | |
from __future__ import division, absolute_import, print_function
import sys
import warnings
from numpy.testing import *
from numpy.compat import asbytes, asunicode
import numpy as np
# This is the structure of the table used for plain objects:
#
# +-+-+-+
# |x|y|z|
# +-+-+-+
# Structure of a plain array description:... | |
from django.core.management.base import BaseCommand, CommandError
from django.utils.dateparse import parse_datetime, parse_date
from django.utils.text import slugify
from django.db.utils import IntegrityError, DataError
from core.models import Person, Bill, Organization, Action, ActionRelatedEntity, \
... | |
# Copyright 2011 OpenStack Foundation
# Copyright 2012 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.apache.org/l... | |
# Copyright (C) 2013 Nippon Telegraph and Telephone 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 required by applicab... | |
import os
import sys
import collections
import glob
import configparser
import argparse
NAME = 'LAF-Fabric'
VERSION = '4.8.4'
APIREF = 'http://laf-fabric.readthedocs.org/en/latest/texts/API-reference.html'
DEFAULT_DATA_DIR = 'laf-fabric-data'
MAIN_CFG = 'laf-fabric.cfg'
ALL_PARTS = ['monad', 'section', 'lingo']
clas... | |
import pytest, py
from _pytest import python as funcargs
class TestMetafunc:
def Metafunc(self, func):
# the unit tests of this class check if things work correctly
# on the funcarg level, so we don't need a full blown
# initiliazation
class FixtureInfo:
name2fixturedef... | |
# coding=utf-8
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
from typing import Optional
from qrl.core import config
from qrl.core.misc import logger, db
from qrl.generated import qrl_pb2, qrlstateinfo_pb2
class State:
def... | |
import json
import math
import pdb
import random
import numpy as np
import sys
import time
sys.path.extend(['.', '..'])
from itertools import chain, repeat, izip
from collections import defaultdict
from operator import mul, and_, or_
from scipy.optimize import fsolve
from matplotlib import pyplot as plt
from ..util i... | |
#!/usr/bin/python2.5
# Copyright (C) 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | |
#!/usr/bin/env python
"""An interface to the Earth Engine batch processing system.
Use the static methods on the Export class to create export tasks, call start()
on them to launch them, then poll status() to find out when they are finished.
The function styling uses camelCase to match the JavaScript names.
"""
# pyl... | |
"""
Support for ZWave HVAC devices.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/hvac.zwave/
"""
# Because we do not compile openzwave on CI
# pylint: disable=import-error
import logging
from homeassistant.components.hvac import DOMAIN
from homeassista... | |
"""Module with functions operating on IndexedBase, Indexed and Idx objects
- Check shape conformance
- Determine indices in resulting expression
etc.
Methods in this module could be implemented by calling methods on Expr
objects instead. When things stabilize this could be a useful
refactori... | |
#!/usr/bin/python
import csv
import datetime
import os.path
import nltk
from nltk.collocations import *
import re
import tempfile
import shutil
global tagbagFirstFile
global tagbagSecondFile
print "* * * * * * *"
print "Thank you for choosing the semantic harmonization tool"
print "Let us begin with asking you some ... | |
"""
This tutorial introduces the multilayer perceptron using Theano.
A multilayer perceptron is a logistic regressor where
instead of feeding the input to the logistic regression you insert a
intermediate layer, called the hidden layer, that has a nonlinear
activation function (usually tanh or sigmoid) . One can use ... | |
# Copyright 2015-2017 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 ... | |
###############################################################################
##
## Copyright (C) 2014-2016, 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.
##
## ... | |
'''tzinfo timezone information for Europe/Ljubljana.'''
from pytz.tzinfo import DstTzInfo
from pytz.tzinfo import memorized_datetime as d
from pytz.tzinfo import memorized_ttinfo as i
class Ljubljana(DstTzInfo):
'''Europe/Ljubljana timezone definition. See datetime.tzinfo for details'''
zone = 'Europe/Ljublja... | |
""" The CLI entry point for exporting projects from the mbed tools to any of the
supported IDEs or project structures.
"""
import sys
from os.path import join, abspath, dirname, exists, basename
ROOT = abspath(join(dirname(__file__), ".."))
sys.path.insert(0, ROOT)
from shutil import move, rmtree
from argparse import ... | |
#----------------------------------------------------------------------
# Copyright (c) 2010-2013 Raytheon BBN Technologies
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and/or hardware specification (the "Work") to
# deal in the Work without restriction, including ... | |
#Embedded file name: ACEStream\Core\APIImplementation\DownloadRuntimeConfig.pyo
import sys
import binascii
from ACEStream.Core.simpledefs import *
from ACEStream.Core.DownloadConfig import DownloadConfigInterface
from ACEStream.Core.exceptions import OperationNotPossibleAtRuntimeException
from ACEStream.Core.Utilities.... | |
#!/usr/bin/env python
# coding=utf-8
# Author: YAO Matrix (yaoweifeng0301@126.com)
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import gzip
import os
import sys
import time
import datetime
import logging
import numpy as np
import tensorflow as tf
from... | |
# -*- coding: utf-8 -*-
"""
paperchase.tasks
~~~~~~~~~~~~~~
paperchase tasks module
"""
import dateutil.parser
import datetime
import feedparser
import requests
import urlparse
import os
from pytz import utc
from datetime import timedelta
from celery.utils.log import get_task_logger
from xml.etree import ... | |
import inspect
from copy import copy
from django.conf import settings
from django.utils import timezone
from django.utils.functional import cached_property
from django.utils.six.moves import range
from .query_utils import QueryWrapper
class RegisterLookupMixin(object):
def _get_lookup(self, lookup_name):
... | |
from subprocess import Popen, PIPE
from signal import SIGINT, signal
import threading
import Queue
import argparse
from itertools import product
import re
import time
from functools import partial
def print_with_color(data, color):
print "\033[%dm%s\033[0m" % (color, data)
def split_strip_and_filter(input, delime... | |
# -*- coding: utf-8 -*-
# This file is part of the pymfony package.
#
# (c) Alexandre Quercia <alquerci@email.com>
#
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
from __future__ import absolute_import;
import os;
from time import time;
im... | |
"""
Copyright (c) 2015-2021 Ad Schellevis <ad@opnsense.org>
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,
... | |
import json
import logging
import sys
from datetime import datetime
from datetime import timedelta
from django.http import HttpResponse
from django.template import Context, loader
from django.shortcuts import render, redirect
from mapper.models import Event, Location
from mapper.utils import FixedOffset
def index(r... | |
#!/usr/bin/python3
"""
test-anatomize.py
APP: Inquisition
DESC: Unit test for Anatomize.py library
CREATION_DATE: 2017-04-28
"""
# MODULES
# | Native
import configparser
import unittest
# | Third-Party
# | Custom
from lib.anatomize.Anatomize import Anatomize
# METADATA
__author__ = 'Joshua Carlson-Purcell'
__cop... | |
#!/usr/bin/env python
from __future__ import division
from __future__ import with_statement
import numpy as np
#from pylab import ion
import matplotlib as mpl
#from matplotlib.path import Path
from matplotlib import pyplot as plt
from scipy.optimize import curve_fit
#import numexpr as ne
from numba import autojit
im... | |
#!/usr/bin/env python
# Copyright 2014 Hewlett-Packard Development Company, L.P.
# Copyright 2014 Samsung Electronics
# 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
#... | |
#!/usr/bin/env python
"""Tests for hunts output plugins."""
import csv
import StringIO
import sys
# pylint: disable=unused-import,g-bad-import-order
from grr.lib import server_plugins
# pylint: enable=unused-import,g-bad-import-order
from grr.lib import aff4
from grr.lib import config_lib
from grr.lib import emai... | |
#!/usr/bin/env python
import argparse
import sys
import os
from pprint import pprint
import re
import logging
from six import StringIO
MAX_LINE_WIDTH=79
FILE_EXTENSIONS = [
"swift",
"strings",
"cs",
"txt",
"shader"
]
TARGET_FILE_EXTENSIONS = [
"asciidoc",
"md"
]
def build_fil... | |
"""COLORS."""
# --- import --------------------------------------------------------------------------------------
import os
import pathlib
import collections
import numpy as np
from scipy.interpolate import griddata
from ._data import Data
from .. import kit as wt_kit
# --- define -----------------------------... | |
import copy
from django.http.response import HttpResponse
from django.utils.translation import ugettext as _
from corehq.apps.groups.models import Group
from corehq.apps.reports.cache import request_cache
from corehq.apps.reports.standard.cases.basic import CaseListReport
from corehq.apps.api.es import CaseES
from cor... | |
# -*- coding: utf-8 -*-
from future.builtins import filter, int, range, str, super, zip
from future.utils import with_metaclass
from copy import copy
from datetime import date
import datetime
from itertools import dropwhile, takewhile
from locale import localeconv
from re import match
from django import forms
from dj... | |
# The MIT License (MIT)
#
# Copyright (c) 2016 Francis T. O'Donovan
#
# 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, co... | |
# 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... | |
from __future__ import absolute_import, print_function, division
import numpy
import theano
import theano.tensor as T
from six.moves import xrange
from theano.gof import local_optimizer
from theano.sandbox.cuda.basic_ops import as_cuda_ndarray_variable
from theano.misc import strutil
from theano.tensor.nnet.ConvGrad3... | |
from collections import defaultdict
import random
import sys
import numpy as np
import matplotlib.pyplot as plt
from weather_model import fft, read_daily, simulate_temp, snowfall_rainfall_model, simulate_precip, simulate_wind_speed
from weather_model import wind_chill_model, wind_chill_transaction_probability, rainfa... | |
# COMMON.PY
# A common module for all scripts in the Interactions toolbox.
import sys, os, arcpy, operator, traceback, numpy, random
# constants defining neighbour table field names
NEIGH_FROM_FLD = 'ID_FROM'
NEIGH_TO_FLD = 'ID_TO'
# signals if debug messages are to be printed
debugMode = False
try:
from debug imp... | |
"""Approximate nearest neighbor search"""
# Author: Maheshakya Wijewardena <maheshakya.10@cse.mrt.ac.lk>
# Joel Nothman <joel.nothman@gmail.com>
import numpy as np
import warnings
from scipy import sparse
from .base import KNeighborsMixin, RadiusNeighborsMixin
from ..base import BaseEstimator
from ..utils.va... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
:py:mod:`feature_test.py` - Feature testing
-------------------------------------------
A simple test that plots a bunch of different light curves.
The output should be similar to this figure:
.. figure:: ../pysyzygy/img/feature_test.png
:width: 600px
:align: ... | |
#-*- coding: utf-8 -*-
# Copyright 2010 Bastian Bowe
#
# This file is part of JayDeBeApi.
# JayDeBeApi is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your opt... | |
"""Test homekit_controller stateless triggers."""
from aiohomekit.model.characteristics import CharacteristicsTypes
from aiohomekit.model.services import ServicesTypes
import pytest
import homeassistant.components.automation as automation
from homeassistant.components.homekit_controller.const import DOMAIN
from homeas... | |
# coding: utf-8
from __future__ import unicode_literals
import json
from .base_object import BaseObject
from boxsdk.config import API
from boxsdk.exception import BoxAPIException
class Item(BaseObject):
"""Box API endpoint for interacting with files and folders."""
def _get_accelerator_upload_url(self, fi... | |
# Copyright 2010-2012 the SGC project developers.
# See the LICENSE file at the top-level directory of this distribution
# and at http://program.sambull.org/sgc/license.html.
"""
Scroll box. A container widget that provides scroll bars to be able to
view a larger widget.
"""
import pygame.mouse
from pygame.locals im... | |
# coding=utf-8
"""
The CPUCollector collects CPU utilization metric using /proc/stat.
#### Dependencies
* /proc/stat
"""
import diamond.collector
import os
import time
from diamond.collector import str_to_bool
try:
import psutil
psutil # workaround for pyflakes issue #13
except ImportError:
psutil =... | |
from common import*
from net.mask_rcnn.lib.rcnn_nms import *
from net.mask_rcnn.lib.rcnn_target import *
from net.mask_rcnn.lib.rcnn_loss import *
from net.mask_rcnn.lib.rpn_nms import *
from net.mask_rcnn.lib.rpn_target import *
from net.mask_rcnn.lib.rpn_loss import *
from net.mask_rcnn.model.simple.configuration ... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2009-2011, Nicolas Clairon
# 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 abov... | |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
# -*- coding: iso-8859-1 -*-
"""Get useful information from live Python objects.
This module encapsulates the interface provided by the internal special
attributes (func_*, co_*, im_*, tb_*, etc.) in a friendlier fashion.
It also provides some help for examining source code and class layout.
Here are some of the usef... | |
# coding: utf-8
"""
.. _U.S. 1976 Standard Atmosphere: http://ntrs.nasa.gov/search.jsp?R=19770009539
COESA model, based on the `U.S. 1976 Standard Atmosphere`_.
"""
from __future__ import absolute_import, division
import numpy as np
from scipy import constants, interpolate
from skaero.atmosphere import util
# Co... | |
"""cdbfunctions.py
Developer: Noelle Todd
Last Updated: August 30, 2014
This module consists of functions which will be called by the user
interface, in order to insert, delete, update, etc. data in the database.
This module is still in its early testing stages; many more functions will
be added or edited in the foll... | |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | |
#!/usr/bin/env python3
# Copyright (c) 2014-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the importmulti RPC.
Test importmulti by generating keys on node0, importing the scriptPubKeys an... | |
# python 2.7
from __future__ import absolute_import, unicode_literals
from builtins import str
# builtins
from collections import OrderedDict
from copy import deepcopy
import logging
# plugins
from pypandoc import convert
# custom
import blowdrycss_settings as settings
__author__ = 'chad nelson'
__project__ = 'blowdry... | |
# Copyright (c) 2013 eBay Inc.
# Copyright (c) 2013 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
#
# ... | |
#!/usr/bin/env python
# Copyright (C) 2015 Wayne Warren
#
# 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) 2005 The Regents of The University of Michigan
# 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 ... | |
import httplib
import urllib
import base64
import socket
from celery.utils.log import get_task_logger
log = get_task_logger(__name__)
from django.utils import simplejson
from django.conf import settings
from celery import Celery
from mixpanel.conf import settings as mp_settings
celery = Celery('mixpanel')
celery.c... | |
from .academicearth import AcademicEarthCourseIE
from .addanime import AddAnimeIE
from .aftonbladet import AftonbladetIE
from .anitube import AnitubeIE
from .aol import AolIE
from .aparat import AparatIE
from .appletrailers import AppleTrailersIE
from .archiveorg import ArchiveOrgIE
from .ard import ARDIE
from .arte im... | |
#!/usr/bin/env python
# Copyright (c) 2010 Anil Kumar
# All rights reserved.
#
# License: BSD
import os
import re
import array
from PyQt4 import QtGui
from PyQt4.QtGui import *
from PyQt4.QtCore import *
try:
from PyQt4.Qsci import QsciScintilla, QsciScintillaBase
from PyQt4.Qsci import QsciLexerCPP, QsciLexerJa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.