gt
stringclasses
1 value
context
stringlengths
2.49k
119k
import os import sys import logging import boto3 import pandas as pd from datetime import datetime import urllib.request from dataactbroker.helpers.pandas_helper import check_dataframe_diff from dataactbroker.helpers.uri_helper import RetrieveFileFromUri from dataactcore.logging import configure_logging from dataactc...
# 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 2010 OpenStack Foundation # Copyright 2012 University Of Minho # # 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....
## DESIGN ## This script takes in an url pointing to the main page of a comic/manga/manhwa in Batoto.net ## It then parses the chapter links, goes to each, downloads the images for each chapter and compresses ## them into zip files. ## Alternatively, we may be able to specify a name, and have the script search for it a...
import pytest import sqlalchemy as sa from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy_utils.relationships import select_correlated_expression @pytest.fixture def group_user_tbl(Base): return sa.Table( 'group_user', Base.metadata, sa.Column('user_id', sa.Integer, sa.Forei...
import sys from genStubs import * stub = Stubs( "systemMessages", sys.argv[1], sys.argv[2] ) stub.include( "nanopb/IMessage.h" ) stub.include( "systemMessages/AGLMsg.pb.h" ) stub.include( "systemMessages/AGLOffsetMsg.pb.h" ) stub.include( "systemMessages/AGLRawMsg.pb.h" ) stub.include( "systemMessages/AbortLaunchMsg....
# 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...
from __future__ import annotations from contextlib import contextmanager import os from pathlib import Path from shutil import rmtree import tempfile from typing import ( IO, Any, ) import uuid import numpy as np from pandas import set_option from pandas.io.common import get_handle @contextmanager def dec...
# -*- coding: utf-8 -*- # FOGLAMP_BEGIN # See: http://foglamp.readthedocs.io/ # FOGLAMP_END import datetime import uuid from aiohttp import web from foglamp.services.core import server from foglamp.services.core.scheduler.entities import Schedule, StartUpSchedule, TimedSchedule, IntervalSchedule, \ ManualSchedule...
# License: BSD 3 clause from warnings import warn import numpy as np from tick.base import Base from tick.base_model import ModelLipschitz from .learner_optim import LearnerOptim class LearnerGLM(LearnerOptim): """Learner for a Generalized Linear Model (GML). Not intended for end-users, but for development...
# proc: Simple interface to Linux process information. # # Author: Peter Odding <peter@peterodding.com> # Last Change: April 26, 2020 # URL: https://proc.readthedocs.io """ The :mod:`proc.cron` module implements graceful termination of cron_. .. contents:: :local: Introduction to cron ==================== The cr...
import asyncio import time import traceback from sortedcontainers import SortedDict from . import platform from . import helper if platform.is_raspberry(): from adafruit import pca9685 from adafruit import wirebus else: from .dummy import pca9685 from .dummy import wirebus def parse_config(config, l...
# -*- coding: utf-8 -*- """ sphinx.util ~~~~~~~~~~~ Utility functions for Sphinx. :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os import re import sys import shutil import fnmatch import tempfile import posixpath import traceb...
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import dataclasses import hashlib import logging from dataclasses import dataclass from enum import Enum from textwrap import dedent from typing import ...
#------------------------------------------------------------------------------- # Name: moveMotors # Purpose: move steppers motors with the position and velocity of the blue joints # # Author: Luis Felipe Leiva H. # # Created: 09-10-2017 # Copyright: (c) felipe 2017 # Licence: <your licence> ...
#import sqlalchemy #from sqlalchemy.ext.declarative import declared_attr from flask_simple_alchemy import RelationshipFactories, simple_table_factory from testers import * FakeTableFK = fact.foreign_key_factory('faketable') FakeTableOneToOne = fact.one_to_one_factory('FakeTable', FakeTableFK) FakeTableManyToOne = f...
from numba.core import utils, ir, analysis, transforms, ir_utils class YieldPoint(object): def __init__(self, block, inst): assert isinstance(block, ir.Block) assert isinstance(inst, ir.Yield) self.block = block self.inst = inst self.live_vars = None self.weak_live...
# 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 from itertools import compress import os import sys import time from xfcs.FCSFile.FCSFile import FCSFile, channel_name_keywords from xfcs.utils import metadata_csv, metadata_time, metadata_plot from xfcs.utils.locator import locate_fcs_files from xfcs.utils.metadata_stats import add_param_mean ...
# -*- coding: utf-8 -*- from typing import Iterable, Iterator, List, Sequence, Tuple, cast, Set from multiset import Multiset from ..expressions.expressions import ( Expression, Pattern, Operation, Symbol, SymbolWildcard, Wildcard, AssociativeOperation, CommutativeOperation, OneIdentityOperation ) from ..expressi...
# -*- coding: utf-8 -*- import unittest from typing import Set, Tuple from pybel import BELGraph from pybel.constants import ANNOTATIONS from pybel.dsl import BaseEntity, Protein from pybel.struct.filters import ( and_edge_predicates, concatenate_node_predicates, count_passed_edge_filter, count_passed...
#!/usr/bin/env python """ Copyright (c) 2014 Alex Forencich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merg...
# Copyright (c) 2014, Menno Smits # Released subject to the New BSD License # Please see http://en.wikipedia.org/wiki/BSD_licenses from __future__ import unicode_literals import itertools import socket import sys from datetime import datetime from mock import patch, sentinel, Mock from imapclient import six from ima...
import unittest import time from AerospikeClientMock import AerospikeClientMock class TestAerospikeClientTtlMock(unittest.TestCase): def setUp(self): pass def get_time(self, ttl=0): return int(time.time()) + ttl def test_blank_init(self): asm = AerospikeClientMock(default_ttl=2) ...
""" Family of two-dimensional functions indexed by x and y. All functions are written to be valid both for scalar x and y, and for numpy arrays of x and y (in which case the result is also an array); the functions therefore have the same mathematical behaviour as numpy. $Id$ """ from __future__ import with_statement...
# -*- coding: utf-8 -*- """ Contains code that defines the behaviour of the local node in the DHT network. """ from .routingtable import RoutingTable from .lookup import Lookup from .storage import DictDataStore from .contact import PeerNode from .crypto import check_seal, get_seal, verify_item, construct_key from .err...
from __future__ import unicode_literals import datetime from decimal import Decimal import re import warnings from django.core.exceptions import FieldError from django.db import connection from django.db.models import ( Avg, Sum, Count, Max, Min, Aggregate, F, Value, Func, IntegerField, FloatField, Decima...
# -*- coding: utf-8 -*- # # 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 "L...
#! /usr/bin/env python """Interfaces for launching and remotely controlling Web browsers.""" # Maintained by Georg Brandl. import io import os import shlex import sys import stat import subprocess import time __all__ = ["Error", "open", "open_new", "open_new_tab", "get", "register"] class Error(Exception): pass ...
# Copyright 2014 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 agre...
#!/usr/bin/python # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Validate or replace the standard gdata authorization token.""" import filecmp import optparse import os import shutil from chro...
# -*- coding: utf-8 -*- """ Model-Definitions and Signal-Handlers for radonCMS """ import os import re from django.db import models from django.db.models.signals import pre_save from django.db.models.signals import post_delete from django.template.defaultfilters import filesizeformat from radoncms.managers import ...
import csv import glob import os import codecs import re import sys import traceback #import random from collections import Counter from itertools import chain import nltk from nltk.tokenize import word_tokenize from nltk.corpus import stopwords from nltk.stem.porter import PorterStemmer from matteautils.randomdict imp...
# Copyright 2017 University of Rome La Sapienza and Battelle Energy Alliance, 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 req...
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
"""Tests for module gramcore.data.images""" import os import numpy from PIL import Image, ImageStat from nose.tools import assert_equal, raises from gramcore.data import images def setup(): """Create image fixtures for test_load_* To create an image PIL requires size (width, height in pixels) and mode ...
''' Copyright (c) 2018 Yogesh Khatri This file is part of mac_apt (macOS Artifact Parsing Tool). Usage or distribution of this software/code is subject to the terms of the MIT License. iDevice_backups.py ------------ This plugin will scan for iPad/iPhone backups and export all files and databases...
import json import sqlite3 import sys import re import dateutil.parser import datetime # API Reference is at # http://developer.trademe.co.nz/api-reference/search-methods/residential-search/ def create_table_residential(dbPath): conn = sqlite3.connect(dbPath) with conn: cur = conn.cursor() ...
#!/usr/bin/env python3 # Copyright (c) 2018-2020 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 bitcoin-wallet.""" import hashlib import os import stat import subprocess import textwrap from t...
#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ Pelix remote services: MQTT discovery provider A discovery packet contains JSON representation of an ImportEndpoint bean. This module depends on the paho-mqtt package (ex-mosquitto), provided by the Eclipse Foundation: see http://www.eclipse.org/paho :author: ...
""" Class definition for a BleedOut.""" import numpy as np from collections.abc import Iterable import openmdao.api as om from pycycle.thermo.cea import species_data from pycycle.thermo.thermo import Thermo from pycycle.flow_in import FlowIn from pycycle.passthrough import PassThrough from pycycle.element_base impo...
# -*- coding: utf-8 -*- # # Warthog - Simple client for A10 load balancers # # Copyright 2014-2016 Smarter Travel # # Available under the MIT license. See LICENSE for details. # """ warthog.cli ~~~~~~~~~~~ CLI interface for interacting with a load balancer using the Warthog client. """ import functools import os impo...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import unicode_literals import numpy as np from pymatgen.util.coord import Simplex from functools import cmp_to_key from scipy.spatial import HalfspaceIntersection, ConvexHull from pymatgen.an...
# 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 2015 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# 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 # distributed unde...
import json import re from collections import namedtuple from django.conf import settings from django.core.exceptions import ValidationError from django.core.validators import RegexValidator from django.db import models from django.utils.translation import ugettext_lazy from accounts.models import UserSettings from a...
import functools import re from itertools import chain from django.conf import settings from django.db import models from django.db.migrations import operations from django.db.migrations.migration import Migration from django.db.migrations.operations.models import AlterModelOptions from django.db.migrations.optimizer ...
#!/usr/bin/python2.4 # Copyright (c) 2006-2008 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. '''Handling of the <message> element. ''' import re import types from grit.node import base import grit.format.rc_header imp...
# coding: utf-8 # # Copyright 2018 The Oppia 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 requi...
# 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...
import logging from apps.atencion.forms.ConsultaForm import ConsultaForm from apps.atencion.forms.DetalleRecetaForm import DetalleRecetaForm from apps.atencion.forms.TratamientoForm import TratamientoForm from apps.atencion.models import Consulta, AntecedenteMedico, DiagnosticoConsulta, Tratamiento, DetalleReceta log...
from __future__ import annotations import procrunner import pytest import iotbx.mtz from dxtbx.serialize import load import xia2.Test.regression def split_xinfo(data_dir, tmpdir): split_xinfo_template = """/ BEGIN PROJECT AUTOMATIC BEGIN CRYSTAL DEFAULT BEGIN WAVELENGTH NATIVE WAVELENGTH 0.979500 END WAVELENG...
import json, os, os.path from bsddb3 import db from Catalog.Schema import DBSchema, DBSchemaEncoder, DBSchemaDecoder from Catalog.Identifiers import FileId, PageId, TupleId class IndexManager: """ An index manager class. This provides indexes on top of the heap files in our storage layer with...
"""Asyncio backports for Python 3.4.3 compatibility.""" import concurrent.futures import threading import logging from asyncio import coroutines from asyncio.events import AbstractEventLoop from asyncio.futures import Future import asyncio from asyncio import ensure_future from typing import Any, Union, Coroutine, Cal...
# -*- 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...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www....
''' Created on 03.06.2011 @author: Sergey Khayrulin ''' import math, re, pprint class ParserException(Exception): ''' User Exception ''' def __init__(self,value): self.value = value def __str__(self): return repr(self.value) class HelpPoint: ''' Helper Class ''' d...
#!/usr/bin/python """ Example script for bridging the semantic gap from SATA -> Disk actions -> File system activity (c) 2015 Massachusetts Institute of Technology """ # Native import os import sys import argparse import time import multiprocessing import subprocess import logging logger = logging.getLogg...
import cPickle import gzip import os, sys, errno import time import math import glob import struct # numpy & theano imports need to be done in this order (only for some numpy installations, not sure why) import numpy # we need to explicitly import this in some cases, not sure why this doesn't get imported with numpy...
# -*- coding: utf-8 -*- """ requests_toolbelt.multipart =========================== This holds all of the implementation details of the MultipartEncoder """ from requests.utils import super_len from requests.packages.urllib3.filepost import iter_field_objects from uuid import uuid4 import io def encode_with(stri...
"""GUI with pyqtgraph for digitizing images . """ from __future__ import division import numpy as np import matplotlib.pyplot as plt import pyqtgraph as pg import skimage as si from skimage import color, io, exposure from multiprocessing import Pool import glob import time import sys # these are the suspicous impo...
# -*- coding: utf-8 -*- """ Created on Wed Mar 18 17:45:51 2020 Author: Josef Perktold License: BSD-3 """ import numpy as np from numpy.testing import assert_allclose, assert_equal import pytest from statsmodels.regression.linear_model import OLS import statsmodels.stats.power as smpwr import statsmodels.stats.one...
import unittest from hub_dispatch import HubDispatch class TestTopology(unittest.TestCase): def test_empty_graph(self): h = HubDispatch() with self.assertRaises(Exception) as exc: h.remove_hub('foo') self.assertEqual( exc.exception.message, "Hub 'foo' d...
''' Run the tests using testrunner.py script in the project root directory. Usage: testrunner.py SDK_PATH TEST_PATH Run unit tests for App Engine apps. SDK_PATH Path to the SDK installation TEST_PATH Path to package containing test modules Options: -h, --help show this help message and exit ''' import unitt...
# Copyright (c) 2012-2015 Netforce Co. Ltd. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publ...
import os import random import weakref from aredis import StrictRedis from aredis.connection import Connection from aredis.pool import ConnectionPool from aredis.exceptions import (ConnectionError, ResponseError, ReadOnlyError, TimeoutError) from aredis.utils import iteritems, nativestr ...
from .. utils import TranspileTestCase, UnaryOperationTestCase, BinaryOperationTestCase, InplaceOperationTestCase class BytesTests(TranspileTestCase): def test_setattr(self): self.assertCodeExecution(""" x = b'hello, world' try: x.attr = 42 except Attrib...
# -*- coding: utf-8 -*- """ <DefineSource> @Date : Fri Nov 14 13:20:38 2014 \n @Author : Erwan Ledoux \n\n </DefineSource> A Brianer """ #<DefineAugmentation> import ShareYourSystem as SYS BaseModuleStr="ShareYourSystem.Specials.Simulaters.Simulater" DecorationModuleStr="ShareYourSystem.Standards.Classors.Classer...
"""Base and mixin classes for nearest neighbors""" # Authors: Jake Vanderplas <vanderplas@astro.washington.edu> # Fabian Pedregosa <fabian.pedregosa@inria.fr> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Sparseness support by Lars Buitinck <L.J.Buitinck@uva.nl> # # License: BSD, (C) I...
# Copyright 2017 Google LLC. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # #...
"""The tests for Alarm control panel device triggers.""" import pytest from homeassistant.components.alarm_control_panel import DOMAIN import homeassistant.components.automation as automation from homeassistant.const import ( STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_ARMED_NIGHT, STAT...
""" webencodings.labels ~~~~~~~~~~~~~~~~~~~ Map encoding labels to their name. :copyright: Copyright 2012 by Simon Sapin :license: BSD, see LICENSE for details. """ # XXX Do not edit! # This file is automatically generated by mklabels.py LABELS = { 'unicode-1-1-utf-8': 'utf-8', 'utf-...
# 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...
from abc import ABC from collections import namedtuple from functools import partial import os from unittest.mock import patch from nativeconfig.exceptions import DeserializationError, ValidationError from test import StubConfig Option = namedtuple('OptionName', [ 'option_type', 'value', 'alternate_valu...
# 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...
from direct.directnotify import DirectNotifyGlobal from toontown.cogdominium.DistCogdoGameAI import DistCogdoGameAI import CogdoMazeGameGlobals from direct.distributed.ClockDelta import * from direct.task import Timer from toontown.battle import BattleBase from toontown.building.ElevatorConstants import * ALL_ABOARD_L...
#!/usr/bin/env python """ @package mi.dataset.parser.test.test_dosta_abcdjm_dcl @file marine-integrations/mi/dataset/parser/test/test_dosta_abcdjm_dcl.py @author Steve Myerson @brief Test code for a Dosta_abcdjm_dcl data parser In the following files, Metadata consists of 4 records and Garbled consist of 3 records. T...
from __future__ import unicode_literals import pytz from nose.tools import * # flake8: noqa from api.base.settings.defaults import API_BASE from api_tests import utils as api_utils from framework.auth.core import Auth from tests.base import ApiTestCase, capture_signals from tests.factories import ( ProjectFacto...
from oslo_config import cfg from oslo_log import log as logging from nca47.common import service from oslo_utils import timeutils from nca47.common.i18n import _ from nca47.common.i18n import _LI from nca47 import agent from nca47 import objects from nca47.agent.agentFlag.agent_rpcapi import AgentAPI from oslo_service...
########################################################################## # # Copyright 2012 VMware, Inc. # All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without res...
#!/usr/bin/env python # # Copyright 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 law o...
#!/usr/bin/python2.4 # # Copyright (C) 2006 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 l...
""" sentry.utils.models ~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import hashlib import logging from django.db import models, router, transaction, IntegrityError from django.db.models import signals from django.db....
# 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 # distrib...
# -*- coding: utf-8 -*- # Copyright (c)2012 Rackspace US, 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/LIC...
# 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 applicable ...
# Copyright 2014 Mirantis, 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 ...
#!/usr/bin/env python ############################################################################# # The MIT License (MIT) # # Copyright (c) 2015 Jason Pruitt # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to de...
# Copyright 2013 Cloudbase Solutions Srl # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
""" Tests for riak contacts backend and collection. """ from datetime import datetime from twisted.internet.defer import inlineCallbacks, returnValue from zope.interface.verify import verifyObject from vumi.tests.helpers import VumiTestCase from vumi.tests.helpers import PersistenceHelper from go.vumitools.contact ...
# 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...
import time import numpy as np import numpy.random as nr import h5py #from scipy import ndimage as nd from scipy import io as sio #from dpLoadh5 import dpLoadh5 #from dpWriteh5 import dpWriteh5 #from emdrp.utils.typesh5 import emLabels from scipy import linalg as sla from scipy import optimize as opt from scipy impo...
#! /usr/bin/env python from MFT import MFTEnumerator import array import re import logging import datetime import argparse from jinja2 import Template from BinaryParser import Mmap from MFT import Cache from MFT import ATTR_TYPE from MFT import MREF from MFT import MSEQNO from MFT import IndexRootHeader from MFT im...
# Two tcp flows between two host pairs, both flows go through same # bottleneck but delay is different # # $Id: $ import sys import datetime from fabric.api import env # # Fabric config # # User and password env.user = 'root' env.password = 'rootpw' # Set shell used to execute commands env.shell = '/bin/sh -c' ...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import now_datetime, cint import re def set_new_name(doc): """Sets the `name`` property for the document based on various ru...
# -*- coding: utf-8 -*- """App utilities: Compat settings, bug-report tool, pickling apps.""" from __future__ import absolute_import, unicode_literals import os import platform as _platform import re from collections import Mapping, namedtuple from copy import deepcopy from types import ModuleType from kombu.utils.ur...
from __future__ import unicode_literals import time import unittest from django.core.exceptions import ImproperlyConfigured from django.http import HttpResponse from django.test import TestCase, RequestFactory from django.views.generic import View, TemplateView, RedirectView from . import views class SimpleView(Vie...
# -*- coding: utf-8 -*- # # Copyright 2015 Simone Campagna # # 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...
import datetime from dateutil.rrule import rrule, YEARLY, MONTHLY, WEEKLY, DAILY from operator import itemgetter from django.conf import settings from django.urls import reverse from django.db import models from django.db.models import Q from django.template.defaultfilters import date from django.utils import timezone...