gt
stringclasses
1 value
context
stringlengths
2.49k
119k
import logging import xmpp import re import time from cylon.conf import Settings from cylon.command import Loader from cylon.plugin import Plugin from cylon.hook import Hook from optparse import OptionParser class Cylon: MSG_OK = 'Accept my fraking request. Now.' MSG_KO = 'DENIED.' def __init__(...
# -*- coding: utf-8 -*- # Copyright (c) 2014, imageio contributors # imageio is distributed under the terms of the (new) BSD License. """ Various utilities for imageio """ from __future__ import absolute_import, print_function, division import re import os import sys import time import numpy as np IS_PYPY = '__py...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # Copyright 2014 Steve Huang # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this...
# -*- coding: utf-8 -*- """ Defines the fields that can be added to redisco models. """ import time import sys from datetime import datetime, date, timedelta from dateutil.tz import tzutc, tzlocal from calendar import timegm from redisco.containers import List from .exceptions import FieldValidationError, MissingID __...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Tests for ``flocker.provision._install``. """ import yaml from twisted.trial.unittest import SynchronousTestCase from pyrsistent import freeze, thaw from textwrap import dedent from .._install import ( task_configure_flocker_agent, task_enab...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
""" Collect all the interesting data for analysis """ import os import errno import json import archive import logging import copy import glob from subprocess import Popen, PIPE, STDOUT from tempfile import NamedTemporaryFile from ..contrib.soscleaner import SOSCleaner from utilities import _expand_paths, generate_ana...
"""Provides device automations for MQTT.""" import logging from typing import Callable, List, Optional import attr import voluptuous as vol from homeassistant.components import mqtt from homeassistant.components.automation import AutomationActionType import homeassistant.components.automation.mqtt as automation_mqtt ...
""" China(mainland)-specific Form helpers """ from __future__ import absolute_import, unicode_literals import re from django.forms import ValidationError from django.forms.fields import CharField, RegexField, Select from django.utils.translation import ugettext_lazy as _ from .cn_provinces import CN_PROVINCE_CHOICE...
''' Naive Bayes Clustering ''' import numpy as np import random from spnss.mathutil import argmax_fair, argmin_fair, logsumexp, log import knobs from fast import nbmix_likelihood_from_model as fast_nbmix_likelihood_from_model from history import best_index def nbmix_model(data, nvals, qa, smooth=0.1): data = d...
## Amazon S3 manager ## Author: Michal Ludvig <michal@logix.cz> ## http://www.logix.cz/michal ## License: GPL Version 2 import datetime import os import sys import time import re import string import random import rfc822 import hmac import base64 import errno import urllib from logging import debug, info, war...
""" Act as a wrapper around pandas_datareader and write the responses to the database to be accessed later. """ import datetime as dt import logging from typing import Dict, Iterable, Union, Tuple import numpy as np import pandas as pd import pandas_datareader as pdr from arctic.date import DateRange from arctic.excep...
from canon.mpi.init import * import numpy as np import os import sys from timeit import default_timer as timer from itertools import groupby from sklearn.decomposition import PCA from sklearn.preprocessing import StandardScaler from canon.dat.datreader import read_dats, read_txt, idx2XY, blacklist from canon.pattern...
from __future__ import unicode_literals import django from django import forms from django.conf import settings from guardian.compat import url, patterns from django.contrib import admin from django.contrib import messages from django.contrib.admin.widgets import FilteredSelectMultiple from django.core.urlresolvers im...
# Generated by Snowball 2.1.0 - https://snowballstem.org/ from .basestemmer import BaseStemmer from .among import Among class EnglishStemmer(BaseStemmer): ''' This class implements the stemming algorithm defined by a snowball script. Generated by Snowball 2.1.0 - https://snowballstem.org/ ''' a_...
"""TestSuite""" import sys import unittest from django.utils.unittest import case, util __unittest = True class BaseTestSuite(unittest.TestSuite): """A simple test suite that doesn't provide class or module shared fixtures. """ def __init__(self, tests=()): self._tests = [] self.addTests...
import sublime import sublime_plugin import os import re from . import context from . import util from . import processor from .salesforce.lib.panel import Printer class OpenLightningDocReferences(sublime_plugin.WindowCommand): def __init__(self, *args, **kwargs): super(OpenLightningDocReferences, self)....
# -*- coding: utf-8 -*- from __future__ import print_function import operator import pytest from pandas.compat import (zip, range, lrange, StringIO) from pandas import DataFrame, Series, Index, MultiIndex, date_range import pandas as pd import numpy as np from numpy.random import randn from pandas.util.testing imp...
#!/usr/bin/env python import os import sys import traceback import time ### import dbcon import matchstate as ms import proxy import sandbox import shorten import rgkit.game import tools S_MATCH_REST = 2.0 TIME_RATE = 0.1 WIN_RATE = 0.05 SYMMETRIC = True def get_cpu_time(pid): clk_tck = float(os.sysconf(os.sysc...
# 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...
import click import csv from sklearn import tree from sklearn import ensemble try: # later versions of sklearn move the scoring tools from sklearn import model_selection as mscv except ImportError: from sklearn import cross_validation as mscv class Contig(object): # to store contigs for analysis def __i...
# flake8: noqa I201 from Child import Child from Node import Node DECL_NODES = [ # type-assignment -> '=' type Node('TypeInitializerClause', kind='Syntax', children=[ Child('Equal', kind='EqualToken'), Child('Value', kind='Type'), ]), # typealias-declaration ->...
#!/usr/bin/env python """ Transport layer abstractions TODOS: - split listen() into two subcalls (for StreamSubscriber) """ __author__ = 'Dave Foster <dfoster@asascience.com>' from pyon.util.log import log from pyon.util.containers import DotDict from gevent.event import AsyncResult, Event from gevent.queue import...
from __future__ import print_function, absolute_import, division import itertools import numpy as np from numba import utils from numba import unittest_support as unittest from .support import TestCase, skip_on_numpy_16 DBL_EPSILON = 2**-52 FLT_EPSILON = 2**-23 INF = float('inf') NAN = float('nan') class TestAss...
from __future__ import unicode_literals import pytest from dtypes.binary_heap import BinaryHeap # (in, expected) for constructors valid_constructor_args = [ ["qzdfwqefnsadnfoiaweod", "a"], [[6, 7, 9, 4, 2, 1, 56, 8, 0, 43523], 0], [[1243.12235, 13262.3, 26523.15, 98653.234], 1243.12235] ] valid_construct...
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- from io im...
import speclite.filters as spec_filters import astropy.units as astro_units import numpy as np import astropy.constants as constants from threeML.utils.interval import IntervalSet class NotASpeclikeFilter(RuntimeError): pass class FilterSet(object): def __init__(self, filter, mask=None): """ ...
"""The tests for the Entity component helper.""" # pylint: disable=protected-access from collections import OrderedDict import logging from unittest.mock import patch, Mock from datetime import timedelta import asynctest import pytest import homeassistant.core as ha from homeassistant.exceptions import PlatformNotRea...
# 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...
""" Utility functions for working with simulated targets """ import os import sys import numpy as np import yaml from desimodel.focalplane import FocalPlane import desimodel.io from desispec import brick from desispec.io.fibermap import empty_fibermap from desisim import io def sample_objtype(nobj): """ R...
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Adrian Sampson. # # 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 t...
from PyQt4 import QtGui, QtCore import sys from Playlist import Playlist import vlc import urllib __author__ = 'postrowski' # -*-coding: utf-8-*- class SystemTray(QtGui.QSystemTrayIcon): """ Class System Tray which show app indicator and supports its actions. """ def __init__(self, parent): ...
from django.core.exceptions import ValidationError import pytest from django_super_deduper.merge import MergedModelInstance from django_super_deduper.models import ModelMeta from tests.factories import ( ArticleFactory, EarningsReportFactory, NewsAgencyFactory, PlaceFactory, PublicationFactory, ...
""" Django settings for bar project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ import os import dj_database_url from django.contrib import messages from djan...
#!/usr/bin/env python3 ############################################################################ # Copyright 2017 RIFT.IO Inc # # # # Licensed under the Apache License, Version 2.0 (the "License");...
from enum import Enum import math import random import numpy as np ############### # FUNCTIONS # ############### N_FUNS = 15 SUM = 0 SUB = 1 MUL = 2 DIV = 3 EQ = 4 GRT = 5 LRT = 6 ZER = 7 EXP = 8 LOG = 9 ABS = 10 MIN = 11 MAX = 12 POW = 13 AFF = 14 funs_names = {SUM: '+', SUB: '-', M...
""" This module include the cost-sensitive logistic regression method. """ # Authors: Alejandro Correa Bahnsen <al.bahnsen@gmail.com> # License: BSD 3 clause import numpy as np import math from scipy.optimize import minimize from sklearn.base import BaseEstimator # from sklearn.linear_model.logistic import _intercept...
from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.test import Client from django.test.utils import override_settings from funfactory.helpers import urlparams from mock import patch from nose.tools import ok_, eq_ from mozillians.common.helpers import r...
# 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...
# Copyright 2011 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 l...
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
""" Unit tests for sheet and sheetcoords. $Id$ """ __version__='$Revision$' import unittest from numpy import array from topo.base.sheetcoords import SheetCoordinateSystem,Slice from topo.base.sheet import * from topo.base.boundingregion import BoundingBox from topo.base.sheetview import SheetView # CEBALERT: # C...
import copy import json import uuid import time import urlparse import mox import requests import testtools from keystoneclient.v3 import client def parameterize(ref): """Rewrites attributes to match the kwarg naming convention in client. >>> paramterize({'project_id': 0}) {'project': 0} """ p...
#! /usr/bin/env python import datetime import logging import logging.handlers import threading import time import traceback import os import pwd import sys from pprint import pprint from autopyfactory.apfexceptions import FactoryConfigurationFailure, CondorStatusFailure, PandaStatusFailure from autopyfactory.logserv...
#!/usr/bin/env python3 import argparse import configparser import ipaddress import logging import logging.handlers import sys from collections import namedtuple import requests CONFIG_FILE = 'godaddy-dyndns.conf' LOG_FILE = 'godaddy-dyndns.log' PREVIOUS_IP_FILE = 'previous-ip.txt' class GdClient: BASE_URI = 'ht...
import numpy as np import theano import theano.tensor as T from . import model """ optimizer.py (module) The optimizer module contains the Optimizer class that is used to configure low-rank MNE models, initialize the solver, and minimize the (possibly constrained and regularized) objective function. ...
#!/usr/bin/env python3 # Copyright (C) 2020-2021 The btclib developers # # This file is part of btclib. It is subject to the license terms in the # LICENSE file found in the top-level directory of this distribution. # # No part of btclib including this file, may be copied, modified, propagated, # or distributed except...
#! /usr/bin/env python # # ipg.py -- Module for simple FITS viewer in an HTML5 canvas web browser. # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # """ This example illustrates using a Ginga widget in a web browser, All the rendering is done on the server ...
# 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...
from otp.ai.AIBaseGlobal import * from direct.distributed.ClockDelta import * import DistributedBossCogAI from direct.directnotify import DirectNotifyGlobal from otp.avatar import DistributedAvatarAI import DistributedSuitAI from toontown.battle import BattleExperienceAI from direct.fsm import FSM from toontown.toonbas...
import os import time from tools.assertions import assert_all, assert_none, assert_one from dtest import Tester, debug from sstable_generation_loading_test import BaseSStableLoaderTest from tools.decorators import since from tools.misc import new_node LEGACY_SSTABLES_JVM_ARGS = ["-Dcassandra.streamdes.initial_mem_buf...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Taobao 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/lic...
#!/usr/bin/env python2.7 """Eject multiple tapes from a Dell PowerVault 124T autoloader in one go. No way to do this over SCSI. Instead this works over HTTP through the autoloader's web interface. From: https://github.com/Robpol86/tape_bulk_eject. Supply credentials through ~/.pv124t.json: { "host": "192.168.0.50...
from django.forms import widgets from requests.exceptions import ConnectionError from rest_framework import serializers from rest_framework.reverse import reverse from django.core.cache import cache from django.db.models import Count from onadata.apps.logger.models import XForm, Instance from onadata.libs.permissions ...
import datetime as dt import pandas as pd from hyperparameters import load_parameters from commands import train def hyperscan(x, y, data, epochs, flatten, dropout, batch_sizes, batch_sizes_step, layers, ...
# Interface for Rabbit MQ to intercommunicate with ARGO jobs import sys,os,ssl import time #import logging from pUtil import tolog try: import pika except: tolog("pika module does not exist - ARGO interface will fail") #logger = logging.getLogger(__name__) #logging.getLogger('pika').setLevel(logging.WARNIN...
import os import sys import utils import logging import traceback import datetime import hash_version import copy import fnmatch from sets import Set class InvalidPlatform(Exception): def __init__(self, plat): self._plat = plat def __str__(self): return "Invalid platform detected: %s" % self._...
# unmask_jemalloc - De Mysteriis Dom jemalloc # # Copyright (c) 2014 Patroklos Argyroudis <argp at domain census-labs.com> # Copyright (c) 2014 Chariton Karamitas <huku at domain census-labs.com> # Copyright (c) 2014 Census, Inc. (http://www.census-labs.com/) import os import sys import warnings sys.path.append('.')...
#!/usr/bin/env pythonw # pylint: disable=W0612,C0111,C0103,W0201,E402 print("-I- Importing Pmag GUI dependencies") from pmag_env import set_env import matplotlib matplotlib.use('WXAgg') import sys import wx import wx.lib.buttons as buttons import wx.lib.newevent as newevent import os import webbrowser from pmagpy im...
#!/usr/bin/env python import os import sys import argparse import collections import json import logging import random import requests import subprocess import yaml import time logging.basicConfig(format="%(message)s") POD = collections.namedtuple('Pod', ['name', 'namespace', 'ip', 'labels']) """ XDS fetches ...
# Generated by Django 2.1 on 2018-08-31 13:17 import django.db.models.deletion from django.conf import settings from django.contrib.auth.models import Permission from django.db import migrations, models import openslides def create_comment_sections_from_config_and_move_comments_to_own_model( apps, schema_editor...
import numpy as np from skimage.feature.util import (FeatureDetector, DescriptorExtractor, _mask_border_keypoints, _prepare_grayscale_input_2D) from skimage.feature import (corner_fast, corner_orientations, corner_peaks, ...
# 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...
import numpy as np import h5py import ctypes as ct from os import path from numpy.ctypeslib import ndpointer from scipy.fftpack import dct, idct from sys import float_info from collections import Counter class CONSTANTS(ct.Structure): _fields_ = [ ('N', ct.c_int), ('P', ct.c_int), ('M', ct...
# Copyright 2008 by Michiel de Hoon. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Parser for XML results returned by NCBI's Entrez Utilities. This parser is used by the re...
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # 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 with...
""" Title: CycleGAN Author: [A_K_Nain](https://twitter.com/A_K_Nain) Date created: 2020/08/12 Last modified: 2020/08/12 Description: Implementation of CycleGAN. """ """ ## CycleGAN CycleGAN is a model that aims to solve the image-to-image translation problem. The goal of the image-to-image translation problem is to l...
import os import numpy as np from time import strftime as strftime #for reduction time/date only from astropy.io import fits as pyfits from astropy.io import ascii import pickle from astropy.time import Time from datetime import datetime #to run this stuff #reducebysubfolder(os.getcwd()) #should get it going debug=F...
""" Query and response objects for the Meduza protocol. ** * * WARNING * * ** Note that these objects are encoded to BSON and the server decodes them and expects them to have certain fields in a very specific naming. So DO NOT ALTER these objects - not field names, not object names, not removing fields - without know...
# -*- coding: utf-8 -*- """ 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. """ import os import sys import tarfile im...
#!/usr/bin/env python """ mbed SDK Copyright (c) 2011-2013 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 ...
# Copyright (c) 2017 DataCore Software Corp. 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...
"""Interface to access face detectors from the dlib library. """ # standard imports import os import sys import logging # third party imports import numpy as np import dlib # toolbox imports from ..base.meta import Metadata from ..base.image import BoundingBox from ..tool.face.detector import Detector as FaceDetecto...
# Copyright (C) Schweizerische Bundesbahnen SBB, 2016 # Python 3.4 __author__ = 'florianseidl' from base64 import b64encode from urllib import request from urllib.request import urlopen, HTTPError, URLError, ContentTooShortError, Request from time import sleep from threading import Condition import logging import ssl ...
import pytest from api.base.settings.defaults import API_BASE from framework.auth.core import Auth from osf_tests.factories import ( AuthUserFactory, NodeFactory, RegistrationFactory, ) from rest_framework import exceptions @pytest.mark.django_db class LinkedRegistrationsTestCase: @pytest.fixture() ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module tests model set evaluation for some common use cases. """ import pytest import numpy as np from numpy.testing.utils import assert_allclose from ..models import Polynomial1D, Polynomial2D from ..fitting import LinearLSQFitter from ..core im...
import graphene import pytest from unittest.mock import patch, Mock from saleor.order import OrderEvents, OrderEventsEmails from saleor.order.models import FulfillmentStatus from tests.api.utils import get_graphql_content CREATE_FULFILLMENT_QUERY = """ mutation fulfillOrder( $order: ID, $lines: [Fulfillm...
# -*- coding: utf-8 -*- # # Copyright (C) 2008-2010 Edgewall Software # 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://genshi.edgewall.org/wiki/License. # # This software consist...
#!/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...
"""Low-level utilities used internally by NDB. These are not meant for use by code outside NDB. """ import logging import os import sys import threading __all__ = [] DEBUG = True # Set to False for some speedups def logging_debug(*args): # NOTE: If you want to see debug messages, set the logging level # manu...
from django.core.serializers.json import json, DjangoJSONEncoder from ..channel import Group, Channel from ..auth import channel_session_user_from_http from ..sessions import enforce_ordering from .base import BaseConsumer class WebsocketConsumer(BaseConsumer): """ Base WebSocket consumer. Provides a general...
""" Record Arrays ============= Record arrays expose the fields of structured arrays as properties. Most commonly, ndarrays contain elements of a single type, e.g. floats, integers, bools etc. However, it is possible for elements to be combinations of these, such as:: >>> a = np.array([(1, 2.0), (1, 2.0)], dtype=[...
# Copyright: Copyright 2011-2021 Rumma & Ko Ltd # License: GNU Affero General Public License v3 (see file COPYING for details) """ Two TestCase classes for writing tests be run using Django's test runner (i.e. `manage.py test`). """ import logging ; logger = logging.getLogger(__name__) import sys import json import ...
import os from gi.repository import Gtk class ConfigWindow: def __init__(self, main_window): self.gtkwin = Gtk.Window() self.gtkwin.set_position(Gtk.WindowPosition.CENTER) self.gtkwin.connect("destroy", self.on_destroy) self.gtkwin.set_size_request(640, 320) self.gtkwin.set_title("Kismon Preferences") se...
import os import json import logging import select import psycopg2 from redash.query_runner import * from redash.utils import JSONEncoder logger = logging.getLogger(__name__) types_map = { 20: TYPE_INTEGER, 21: TYPE_INTEGER, 23: TYPE_INTEGER, 700: TYPE_FLOAT, 1700: TYPE_FLOAT, 701: TYPE_FLOA...
# -*- coding: utf-8 -* from django.utils.translation import ugettext as _ COUNTRIES = ( ('AF', 'AFG', '004', _('Afghanistan')), ('AX', 'ALA', '248', _('Aland Islands')), ('AL', 'ALB', '008', _('Albania')), ('DZ', 'DZA', '012', _('Algeria')), ('AS', 'ASM', '016', _('American Samoa')), ('AD', 'A...
# # 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...
# Copyright 2021 DeepMind Technologies Limited. 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 ...
# Copyright 2016 pmrevelle # # 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, softwa...
# -*- coding: UTF-8 -*- # from machete import __version__ from machete import log # from machete import log_filename import shutil # import errno import os from os.path import expanduser import subprocess # import stat import tempfile IGNORE_PATTERNS = ('*.pyc') is_chicken = False windows = os.name == 'nt' def os_c...
import os import report import program_report import config_report import target import paths def generate(program_run_ids): __prepare(program_run_ids) program_runs = {} for program_run_id in program_run_ids: program_report.generate_for_completed(program_run_id) # recreate reports program_...
# Copyright 2014 Dave Kludt # # 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, s...
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
from django.shortcuts import render from django.http import HttpResponse, HttpResponseNotFound, JsonResponse from django.conf import settings from django_countries import countries from timeSeries.models import Series, Value, Forecast, SatelliteData, Location, DataProvider, DataType, User from .decoder import decode #=...
''' Copyright (c) 2018 by Tobias Houska This file is part of Statistical Parameter Optimization Tool for Python(SPOTPY). :author: Tobias Houska This file holds the standards for every algorithm. ''' from __future__ import absolute_import from __future__ import division from __future__ import print_function from __futu...
# Copyright 2012 Managed I.T. # # Author: Kiall Mac Innes <kiall@managedit.ie> # # 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...
from django.test import TestCase from django.utils import timezone from .. import models import tmdb3 import datetime import time from mock import patch from django.template import Template, Context class MockTMDBPoster(object): def sizes(self): return ['100', '200'] def geturl(self, size): re...
#Author: Andy O'Connell <aoconnel@bu.edu> <andrewoconnell89@gmail.com> # # -------------------------- R-Format -------------------------- # o----------------------------------------------------------------o # | opcode | rs | rt | rd | shift (shamt) | funct | # |---------|---------|----------|------...
""" Handle files and directories over SSH. The `scp` command line tool is preferred to paramiko for performance reasons. Then to avoid mixing command line tools and paramiko, `ssh` is also used. Please refer to `ssh` and `ssh_config` documentation to configure session multiplexing. Examples ======== >>> import os >>...
import tox import py import pytest import sys from tox._pytestplugin import ReportExpectMock try: import json except ImportError: import simplejson as json pytest_plugins = "pytester" from tox._cmdline import Session from tox._config import parseconfig def test_report_protocol(newconfig): config = newcon...