gt
stringclasses
1 value
context
stringlengths
2.49k
119k
"""Plugwise Sensor component for Home Assistant.""" import logging from homeassistant.components.sensor import ( SensorDeviceClass, SensorEntity, SensorStateClass, ) from homeassistant.const import ( ENERGY_KILO_WATT_HOUR, ENERGY_WATT_HOUR, PERCENTAGE, POWER_WATT, PRESSURE_BAR, TEM...
class Juggler: def __init__(self, name, h, e, p, pref): self.name = name self.h = int(h) self.e = int(e) self.p = int(p) self.pref = pref self.choice = 0 self.assigned = "" self.dotproduct = {} def getName(self): return self.name ...
import os import sh import unittest from unittest import mock from pythonforandroid.bootstrap import ( _cmp_bootstraps_by_priority, Bootstrap, expand_dependencies, ) from pythonforandroid.distribution import Distribution from pythonforandroid.recipe import Recipe from pythonforandroid.archs import ArchARMv7_a fr...
# -*- coding: 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 model 'Documentation' db.create_table(u'catalog_documentation', ( (u'id', self.gf('djan...
""" Tests that apply specifically to the CParser. Unless specifically stated as a CParser-specific issue, the goal is to eventually move as many of these tests out of this module as soon as the Python parser can accept further arguments when parsing. """ from io import ( BytesIO, StringIO, TextIOWrapper, )...
# Copyright 2009, Peter A. Bigot # # 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 ...
from __future__ import unicode_literals import logging import sys from raven.utils.testutils import TestCase from raven.utils import six from raven.base import Client from raven.handlers.logging import SentryHandler from raven.utils.stacks import iter_stack_frames class TempStoreClient(Client): def __init__(self...
from __future__ import print_function from __future__ import division import sys import numpy as np import matplotlib.pyplot as plt import cvxpy as cvx import hypergraph import hypergraph.core from hypergraph.core import Graph, Edge from hypergraph.convert.nx import networkx_export import networkx from scipy....
# -*- coding: utf-8 -*- # # Copyright (C) 2010 Brian Meeker # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.org/wiki/TracLicense. # # This software consists of vol...
from __future__ import absolute_import, division, unicode_literals from future.builtins import int, open, str from hashlib import md5 from json import loads import os try: from urllib.request import urlopen from urllib.parse import urlencode, quote, unquote except ImportError: from urllib import urlopen, u...
# 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...
# Copyright (c) Facebook, Inc. and its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
#!/usr/bin/env python3 # _*_ coding: utf-8 _*_ ### # Project : KeepWP # FileName : tasks.py # ----------------------------------------------------------------------------- # Author : sham # E-Mail : mauricesham@gmail.com # -----------------------------------------------------------...
import warnings from sympy import (cos, expand, Matrix, sin, symbols, tan, sqrt, S, simplify, zeros) from sympy.utilities.exceptions import SymPyDeprecationWarning from sympy.physics.mechanics import (dynamicsymbols, ReferenceFrame, Point, RigidBody, KanesMethod,...
# encoding=utf8 import os import sys import parse_xls import shutil reload(sys) sys.setdefaultencoding('utf-8') XLS_DIR = "" AS_DIR = "" def init_path(): global XLS_DIR global AS_DIR XLS_DIR = check_path(sys.argv[1]) AS_DIR = check_path(sys.argv[2]) def check_path(path): # windows os if os.name == 'nt': ...
# -*- test-case-name: twisted.test.test_threadpool -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ twisted.python.threadpool: a pool of threads to which we dispatch tasks. In most cases you can just use C{reactor.callInThread} and friends instead of creating a thread pool directly. """...
# 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 datetime from django.core.urlresolvers import reverse from nose.tools import eq_ from pyquery import PyQuery as pq import amo import amo.tests from amo.tests import formset from mkt.developers.models import ActivityLog from mkt.site.fixtures import fixture from mkt.users.models import UserProfile from mkt.web...
import re import random import bisect import numpy as np #http://www.gefeg.com/edifact/d03a/s3/codes/cl1h.htm #This is a terrible method, but it works for now state_names = ['Andhra Pradesh', 'Arunachal Pradesh', 'Assam', 'Bihar', 'Chhattisgarh', 'Delhi', 'Goa', 'Gujarat', 'Haryana', 'Himachal Pradesh', 'Jammu and Kas...
import re import warnings from datetime import datetime from dateutil import parser as dateparser import structlog from pyramid.events import NewRequest, NewResponse from pyramid.exceptions import ConfigurationError from pyramid.httpexceptions import (HTTPTemporaryRedirect, HTTPGone, ...
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import logging from textwrap import dedent from pants.backend.jvm.subsystems.scala_platform import ScalaPlatform from pants.backend.jvm.subsystems.scalastyle import Scalastyle from pants....
from __future__ import division, print_function, absolute_import import numpy as np from dipy.tracking import utils from dipy.reconst.interpolate import NearestNeighborInterpolator from dipy.tracking.markov import (BoundaryStepper, _closest_peak, FixedSizeStepper, MarkovIntegrator, ...
import collections import logging import re import sys import time import warnings from contextlib import contextmanager from functools import wraps from io import StringIO from types import SimpleNamespace from unittest import TestCase, skipIf, skipUnless from xml.dom.minidom import Node, parseString from django.apps...
# === imports =================================== import argparse import os import MatchboxLib # === definitions =============================== BOW_FILE_NAME = "bow.xml" KNN_THRESHOLD = 0 configuration = "Linux" configs = {} configs["PC-Alex"] = {} configs["PC-Alex"]["BIN_EXTRACTFEATU...
"""Generic socket server classes. This module tries to capture the various aspects of defining a server: For socket-based servers: - address family: - AF_INET{,6}: IP (Internet Protocol) sockets (default) - AF_UNIX: Unix domain sockets - others, e.g. AF_DECNET are conceivable (see <socket.h> ...
#!/usr/bin/env python import os from Bio import SeqIO import argparse from multiprocessing import Pool import subprocess import time import sys import traceback #Function definitions: # def log(txt, out): # if VERBOSE: # print(txt) # out.write(txt+'\n') # out.flush() def process_psl(sample, cont...
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
# This is the generic auto-tagging plugin. # # We feed the classifier the same terms as go into the search engine, # which should allow us to actually introspect a bit into the behavior # of the classifier. import math import time import datetime import mailpile.config from mailpile.commands import Command from mailp...
#!/usr/local/bin/python # # This script analyzes sys/conf/files*, sys/conf/options*, # sys/conf/NOTES, and sys/*/conf/NOTES and checks for inconsistencies # such as options or devices that are not specified in any NOTES files # or MI devices specified in MD NOTES files. # # $FreeBSD: soc2013/dpl/head/tools/tools/notesc...
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
# Copyright 2017-present Adtran, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
#!/usr/bin/env python -O """ Script to test database capabilities and the DB-API interface for functionality and memory leaks. Adapted from a script by M-A Lemburg. """ import sys from time import time try: import unittest2 as unittest except ImportError: import unittest PY2 = sys.version_info[0] == ...
# Copyright 2013 IBM Corp # # 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...
# Lint as: python2, python3 # 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 # ...
# -*- coding: utf-8 -*- import v2_swagger_client from library.base import _assert_status_code from v2_swagger_client.models.role_request import RoleRequest from v2_swagger_client.rest import ApiException import base def is_member_exist_in_project(members, member_user_name, expected_member_role_id = None): resul...
# 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 ...
from flask import abort, Response import werkzeug import sys sys.path.append('../../../') import time from plugit.utils import action, cache, only_logged_user, only_member_user, only_admin_user, only_orga_member_user, only_orga_admin_user, user_info, json_only, no_template, PlugItRedirect, PlugItSendFile, PlugItS...
# -*- coding: UTF-8 -*- # Copyright 2011-2018 Rumma & Ko Ltd # License: BSD (see file COPYING for details) from __future__ import unicode_literals from builtins import str import six import datetime from django.db import models from django.db.models import Q from django.conf import settings from django.core.validat...
from __future__ import unicode_literals import base64 import datetime import hashlib import json import netrc import os import re import socket import sys import time import xml.etree.ElementTree from ..compat import ( compat_cookiejar, compat_HTTPError, compat_http_client, compat_urllib_error, co...
#!/usr/bin/env python3 """ Karl Toby Rosenberg Dictionary and Word Frequency Testing June 2016 """ import sys import os """ clean_word returns string with all non-alphabetical characters from given string (word) omitted params: string word return: string cleaned """ def clean_word(word): cleaned = '' for...
# 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...
""" Form Widget classes specific to the Django admin site. """ from __future__ import unicode_literals import copy from django import forms from django.contrib.admin.templatetags.admin_static import static from django.core.urlresolvers import reverse from django.db.models.deletion import CASCADE from django.forms.wid...
# -*- coding: utf-8 -*- # !/usr/bin/python ################################### PART0 DESCRIPTION ################################# # Filename: class_read_csv_input_data_save_word_to_database.py # Description: # # Author: Shuai Yuan # E-mail: ysh329@sina.com # Create: 2015-12-06 15:22:38 # Last: __author__ = 'yuens' ...
# Inspired by David Farrow, vecpy, (2015), GitHub repository, https://github.com/undefx/vecpy.git # Created by Yongshan Ding in May, 2016 # ARM NEON support from neoncompile.kernel import * from neoncompile.compiler_constants import * class Compiler_Arm: def compile_kernel(k, options): src = Formatter() sr...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime try: import pytz except ImportError: pytz = None from unittest import skipIf import django from django.utils import timezone from django.test import RequestFactory, TestCase from django.test.utils import override_settings from ...
""" Config class. represents global configurations for pynetwork script. """ import os import sys import fsutil import datetime import timeutil import logging import logging.handlers from os.path import expanduser from configSlack import SlackConfig LOG_NAME = "PYNETWORK" class Config(object): """Global ...
#!/usr/bin/env python3 # I have now got packer to make .ova files from .iso files. # And I think I can get the right VMWare tools installed onto the images with the # right options set. Good. # After disabling IPV6 and disabling password-based log-in and re-jigging the .ovf file # I should be able to transmit the ima...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals """ This module contains the main object used to identify the coordination environments in a given structure. """ __author__ = "David Waroquiers" __copyright_...
from math import hypot from struct import pack from unicodedata import normalize from .cff import cff from .command import moveto, lineto, quadto, closepath from .readable import readable class otf(object): @staticmethod def valid(data): for version in (b'\0\1\0\0', b'OTTO', b'true', b'typ1', b...
import numpy as np import subprocess import os #-------------------------------------------------------------------------- #Some constants arcsec_opts = ['arcseconds', 'arcsecond', 'arcsec', 'a'] radian_opts = ['radians', 'radian', 'rad', 'r'] degree_opts = ['degrees', 'degree', 'deg', 'd'] #-------------------------...
import sublime, sublime_plugin import os.path # Normal: Motions apply to all the characters they select MOTION_MODE_NORMAL = 0 # Used in visual line mode: Motions are extended to BOL and EOL. MOTION_MODE_LINE = 2 # Registers are used for clipboards and macro storage g_registers = {} # Represents the current input st...
## @package lstm_benchmark # Module caffe2.python.lstm_benchmark from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.proto import caffe2_pb2 from caffe2.python import workspace, core, utils, rnn_cell, model_hel...
import os from xml.sax.saxutils import quoteattr from json import JSONEncoder from lit.BooleanExpression import BooleanExpression # Test result codes. class ResultCode(object): """Test result codes.""" # We override __new__ and __getnewargs__ to ensure that pickling still # provides unique ResultCode ob...
#!/usr/bin/env python3 import collections import hashlib class VerificationFailed(Exception): pass EllipticCurve = collections.namedtuple('EllipticCurve', 'seed p a b') # All the following curves except the last one were taken from the OpenSSL # source code (crypto/ec/ec_curve.c). The last four are fake cur...
# -*- 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 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Feb 9 18:13:18 2017 @author: Ivan Luchko (luchko.ivan@gmail.com) This module contains the definition of the matplotlib manipulation pane. class Arrow3D(FancyArrowPatch): class Annotation3D(Annotation): class GraphEdgesEditor(object): ...
#!/usr/bin/env python3 import mysql.connector as mysql import datetime from math import floor from threading import RLock from configparser import ConfigParser class PlaylistDatabase(): ''' This database is designed to manage songs played by a internet radio station. It stores the web address of the sta...
"""The tests for the MQTT Template light platform. Configuration example with all features: light: platform: mqtt_template name: mqtt_template_light_1 state_topic: 'home/rgb1' command_topic: 'home/rgb1/set' command_on_template: > on,{{ brightness|d }},{{ red|d }}-{{ green|d }}-{{ blue|d }} command_off...
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
#!/usr/bin/env python from PyQt4.QtCore import * from PyQt4.QtGui import * from structdata import Action from structdata import Param from structdata.requirement import Requirement from structdata import VarRequirement from structdata import ItemRequirement from structdata.project import g_project from varreqlistw...
"""Functions for Github authorisation.""" from __future__ import print_function try: input = raw_input except NameError: pass import os import requests import getpass import json # Keyring stores passwords by a 'username', but we're not storing a username and # password fake_username = 'networkx-tests' cla...
# Copyright 2013-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 or agreed to in w...
import sys import re from collections import OrderedDict from twisted.internet import defer from polyjit.buildbot.builders import register from polyjit.buildbot import slaves from polyjit.buildbot.utils import (builder, define, git, ucmd, ucompile, cmd, upload_file, ip, s_sbranch, ...
from __future__ import print_function import numpy as np import matplotlib as plt import cv2 import os import time import urllib2 from zipfile import ZipFile from PIL import Image import io np.random.seed(7) # for reproducibility from keras import backend as K from keras.models import Model, model_from_json, model_f...
from __future__ import print_function, absolute_import, division import sys import numpy as np import threading import random from numba import unittest_support as unittest from numba import njit from numba import utils from numba.numpy_support import version as numpy_version from .support import MemoryLeakMixin, Tes...
## @package onnx # Module caffe2.python.onnx.frontend """Caffe2 Protobuf to ONNX converter To run this, you will need to have Caffe2 installed as well. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import iter...
# Copyright The IETF Trust 2007, All Rights Reserved import datetime from email.utils import parseaddr from django.conf import settings from django.core.urlresolvers import reverse from django.db.models import Q from django.core.validators import email_re from django.http import HttpResponse, HttpResponseRedirect, Htt...
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
import pytest from openshift_health_check import ActionModule, resolve_checks from openshift_checks import OpenShiftCheckException def fake_check(name='fake_check', tags=None, is_active=True, run_return=None, run_exception=None): """Returns a new class that is compatible with OpenShiftCheck for testing.""" ...
# # 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...
# 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Johnny's main caching functionality.""" import sys import re try: from functools import wraps except ImportError: from django.utils.functional import wraps # Python 2.3, 2.4 fallback. from uuid import uuid4 try: from hashlib import md5 except ImportError:...
#!/usr/bin/env python # # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Process Android resources to generate R.java, and prepare for packaging. This will crunch images and generate v14 compatible ...
# -*- coding: utf-8 -*- # # This file is part of PyBuilder # # Copyright 2011-2020 PyBuilder Team # # 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...
__author__ = 'ramapriyasridharan' import os, pprint import paramiko from fabric.api import * import time from server import * from general import * import argparse import ConfigParser from postgres_magic import * # Script based on this tutorial http://www.linuxjournal.com/content/fabric-system-administrators-best-fr...
# # Copyright (c) 2015 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...
"""Helpers for interacting with the filesystem.""" # ============================================================================= # CONTENTS # ----------------------------------------------------------------------------- # phlsys_fs # # Public Classes: # LockfileExistsError # # Public Functions: # read_file_lock_c...
#!/usr/bin/env python # Copyright (c) 2012, George Oikonomou (oikonomou@users.sf.net) # 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 co...
from __future__ import print_function import argparse import os import random import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim as optim import torch.utils.data import torchvision.datasets as dset import torchvision.transforms as transforms import torchv...
import random import math from django.shortcuts import render, get_object_or_404 from django.http import JsonResponse from django.contrib.auth.decorators import permission_required from django.db.models import Q from django.shortcuts import redirect, reverse from django.utils import timezone from mittab.apps.tab.help...
import logging import json import random from weakref import WeakValueDictionary from .transport import create_transport from .bucket import BucketType, Bucket from aioriak.resolver import default_resolver from riak.util import bytes_to_str, str_to_bytes from aioriak.datatypes import TYPES logger = logging.getLogger(...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from collections import OrderedDict from colorama import init, Fore, Back, Style init(autoreset = True) class Sudoku(object): """ Sudoku(values) A class for a Sudoku puzzle. Arguments: * values -- a list containing the 81 values of a puzzle horiz...
from envi.const import * import envi.archs.amd64 as e_amd64 from vivisect.symboliks.common import * import vivisect.symboliks.archs.i386 as vsym_i386 import vivisect.symboliks.analysis as vsym_analysis import vivisect.symboliks.callconv as vsym_callconv from envi.archs.amd64.vmcslookup import VMCS_NAMES class VMCS_Fi...
# 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. """Defines the commands provided by Telemetry: Run, List.""" from __future__ import print_function from __future__ import absolute_import import json import ...
#!/usr/bin/env python """ SMILE Decode """ import os import json import struct import logging import collections from pysmile.constants import * from pysmile import util log = logging.getLogger() if not log.handlers: log.addHandler(logging.NullHandler()) __author__ = 'Jonathan Hosmer' class SMILEDecodeError(St...
# Copyright 2015 Huawei Technologies Co., Ltd. # All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
""" ============================================================================= Manifold learning on handwritten digits: Locally Linear Embedding, Isomap... ============================================================================= An illustration of various embeddings on the digits dataset. The RandomTreesEmbed...
# -*- coding: UTF-8 -*- """ Flask application """ from datetime import datetime, timedelta from itertools import groupby, izip from operator import itemgetter from collections import OrderedDict import bisect from flask import Flask, jsonify, request, render_template from celery import Celery from celery.schedules imp...
# This file is part of the File Deduper project. It is subject to # the the revised 3-clause BSD license terms as set out in the LICENSE # file found in the top-level directory of this distribution. No part of this # project, including this file, may be copied, modified, propagated, or # distributed except according to...
# -*- coding: utf-8 -*- """ Author ------ Bo Zhang Email ----- bozhang@nao.cas.cn Created on ---------- - Mon Nov 28 15:00:00 2016 Modifications ------------- - Aims ---- - utils for calibration """ import itertools import numpy as np from astropy.io import fits from joblib import Parallel, delayed from scipy.i...
# 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...
# Copyright 2011 Nicholas Bray # # 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...
# LIBRARIES from django.db import models from django.db.utils import IntegrityError from django.contrib.contenttypes.models import ContentType # DJANGAE from djangae.db import transaction from djangae.fields import ( ComputedCharField, GenericRelationField, ListField, RelatedSetField, RelatedListFi...
from importlib import import_module import itertools import os import re import warnings from django.apps import apps from django.conf import global_settings, settings from django.contrib.sites.requests import RequestSite from django.contrib.admin.models import LogEntry from django.contrib.auth.models import User from...
# 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 -*- #!/usr/bin/env python #title :ml-example.py #description :Machine learning examples #author :aarora79 #date :20151112 #version :0.1.0 #usage :python ml-example.py #notes : Machine learning example for a dataset downloaded from https:/...
# 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...
# -*- 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): # Removing unique constraint on 'PendingTeamMember', fields ['team', 'email'] ...
import os from ruamel import yaml import great_expectations as ge from great_expectations.core.batch import BatchRequest context = ge.get_context() datasource_yaml = f""" name: taxi_datasource class_name: Datasource module_name: great_expectations.datasource execution_engine: module_name: great_expectations.execu...