gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import hashlib import htpc import imghdr import logging from cherrypy.lib.static import serve_file from urllib2 import Request, urlopen import urllib import time from functools import wraps from operator import itemgetter import itertools from mako import excepti...
# Copyright (c) 2017, Henrique Miranda # All rights reserved. # # This file is part of the yambopy project # from yambopy import * from cmath import polar from yambopy.units import * from itertools import product class YamboExcitonDB(YamboSaveDB): """ Read the excitonic states database from yambo """ def ...
# Copyright 2015 OpenMarket Ltd # # 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 writin...
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Unit test for checking fields in mapping and unmapping.""" import unittest from ddt import data, ddt, unpack from ggrc import utils class BaseTestMappingRules(unittest.TestCase): """Base TestCase fo...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Audio analysis ''' import os import pandas as pd import numpy as np import soundfile as sf import librosa from .feature import Feature, FeatureCollection from .timing import TimingList class Audio(object): """ The base Audio object: wraps the ouput from l...
# 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...
import py from rpython.rlib.jit import JitDriver from rpython.jit.metainterp.test.support import LLJitMixin from rpython.jit.metainterp.blackhole import BlackholeInterpBuilder from rpython.jit.metainterp.blackhole import BlackholeInterpreter from rpython.jit.metainterp.blackhole import convert_and_run_from_pyjitpl from...
import os import requests import logging import sys import zipfile import tempfile import shutil import base64 from urllib.parse import urlparse # Make sure the current directory is in the # path so that we can run this from anywhere. this_dir = os.path.dirname(__file__) if this_dir not in sys.path: sys.path.inser...
import json from contextlib import contextmanager from pathlib import Path from unittest import mock import pytest from django_dynamic_fixture import get from readthedocs.builds.storage import BuildMediaFileSystemStorage from readthedocs.projects.constants import MKDOCS, SPHINX from readthedocs.projects.models import...
import numpy as np from numpy.testing import (assert_almost_equal, assert_array_almost_equal, assert_equal, assert_, assert_allclose, assert_warns) from pytest import raises as assert_raises import pytest from scipy.fft import fft from scipy.special import sinc fro...
#!/usr/bin/env python # Copyright (c) 2011 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 at # http://src.chromium.org/viewvc/chrome/trunk/src/LICENSE # This file is NOT under GPL. """Queries buildbot through the json inte...
""" Support for interfacing with the XBMC/Kodi JSON-RPC API. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.kodi/ """ import asyncio from collections import OrderedDict from functools import wraps import logging import re import socket impor...
#!/usr/bin/env python # -*- test-case-name: calendarserver.tools.test.test_export -*- ## # Copyright (c) 2006-2017 Apple 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...
import warnings import numpy as np __all__ = ["timtraceline", "timtracelines"] _future_warning_metadata = ( "In a future version traces will be returned as a dictionary containing " "metadata together with the trace. To already get the new behavior use " "metadata=True." ) def timtraceline(ml, xstart, ...
''' 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 this ...
#!/usr/bin/env python3 # # Copyright (c) 2019, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # ...
import struct import numpy import pickle debug_level = 0 def unpack_stream(stream): if debug_level > 0: print('> packet: waiting for next character') buffer = stream.read(1) if not buffer: raise NameError('read failed') (btype,) = struct.unpack('c', buffer) if debug_level > 0: ...
#!/usr/bin/env python # -*- coding:utf-8 -*- from peewee import * from playhouse.pool import PooledMySQLDatabase # mysql connection pool db = PooledMySQLDatabase( database='oms', host='127.0.0.1', port=3306, user='root', passwd='123456', charset='utf8', max_connections=20, stale_timeou...
# coding: utf-8 from sqlalchemy import BINARY, Column, Index, Integer, String, VARBINARY from sqlalchemy import String, Unicode, ForeignKey from sqlalchemy.orm import relationship, backref from dbdatetime import dbdatetime from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() metadata = Ba...
#! /usr/bin/env python3 """ This script performs event averaging for particle spectra and anisotropic flow coefficients calculated from event-by-event simulations v_n is analyzed up to n = 6 Format for particle_XXX_vndata.dat file: n_order real_part real_part_err imag_part imag_par...
# # Copyright (c) 2016-2018 Nest Labs, 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 # # ...
import csv from datetime import datetime, date import json import os import re import six from urlparse import urlparse from zipfile import ZipFile from django.core.files.base import File from django.core.files.temp import NamedTemporaryFile from django.core.files.storage import get_storage_class from django.contrib.a...
import sys import datetime import logging import json import subprocess import socket import time import os from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException from twisted.internet import threads, reactor, defer, task from twisted.python.failure import Failure from twisted.enterprise import adbapi fro...
# Copyright 2017-present Open Networking 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 agr...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2011 OpenStack Foundation # 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 ...
#!/usr/bin/python2.4 # # Copyright 2008 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...
# pylama:ignore=E501 # TODO: Modify all calls to get a Well to use the `wells` method from unittest import mock import pytest from opentrons.legacy_api.containers import load as containers_load from opentrons.legacy_api.instruments import Pipette from opentrons.legacy_api.containers.placeable import unpack_location ...
#!/usr/bin/env python3 import unittest import sparse_binary_number class TestSparseBinaryNumber(unittest.TestCase): def setUp(self): self.sparse_numbers = [ 0b00000000, 0b00000001, 0b00000010, 0b00000100, 0b00000101, 0b00001000, ...
import threading import zmq import logging import time import socket __all__ = ['EventPublisher', 'EventSubscriber', 'EventMessage', 'EventCodes'] class EventPublisher(object): """ Event broadcast class for Labtronyx :param port: Port to bind for event notifications :type port: int ...
# -*- coding: utf-8 -*- # This file is part of RRMPG. # # RRMPG is free software with the aim to provide a playground for experiments # with hydrological rainfall-runoff-models while achieving competitive # performance results. # # You should have received a copy of the MIT License along with RRMPG. If not, # see <http...
from mongoengine import ReferenceField, ListField from mongoengine.base import BaseDocument, DocumentMetaclass, get_document from wtforms import fields, validators from flask_mongoengine.wtf import orm, fields as mongo_fields from flask_admin import form from flask_admin.model.form import FieldPlaceholder from flask_...
import json from psycopg2.extras import DateRange, DateTimeTZRange, NumericRange, Range from django.contrib.postgres import forms, lookups from django.db import models from .utils import AttributeSetter __all__ = [ 'RangeField', 'IntegerRangeField', 'BigIntegerRangeField', 'FloatRangeField', 'DateTimeRangeF...
# 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...
'''tzinfo timezone information for Australia/Lord_Howe.''' from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class Lord_Howe(DstTzInfo): '''Australia/Lord_Howe timezone definition. See datetime.tzinfo for details''' zone = 'Australi...
# -*- coding: utf8 -*- __author__ = 'sergey' from dedupsqlfs.db.mysql.table import Table class TableTree( Table ): _table_name = "tree" def create( self ): cur = self.getCursor() # Create table cur.execute( "CREATE TABLE IF NOT EXISTS `%s` (" % self._table_name+ ...
from scipy.integrate import trapz import numpy as np import matplotlib.pyplot as plt class Results: """Results of a simulation of a single particle cluster The results contain the time-varying magnetisation and field resulting from stochastic simulation of a particle cluster consisting of `N` particles. ...
# -*- coding: utf-8 -*- from gluon import * from s3 import * # ============================================================================= class S3MainMenuLayout(S3NavigationItem): """ Application Main Menu Layout """ @staticmethod def layout(item): """ Custom Layout Method """ ...
# 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...
#!/usr/bin/python ################################################################################################# ################################################################################################# # # To create a schema with 1 million subscribers, first create the schema and 1M subscribers: # # $ ./...
import collections import operator import pytest from pandas.compat import PY36 import pandas as pd from pandas.tests.extension import base import pandas.util.testing as tm from .array import JSONArray, JSONDtype, make_data @pytest.fixture def dtype(): return JSONDtype() @pytest.fixture def data(): """L...
#!/usr/bin/env python2 import os,re,sys,json,yaml from StringIO import StringIO from Tools.pretty import prettyPrint from Tools.argue import Argue args = Argue() @args.argument(short='v', flag=True) def verbose(): return False #_______________________________________________________________ @args.command(name...
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com thumbor@googlegroups.com from shutil import rmtree import tempfile import re from preggy imp...
"""Append module search paths for third-party packages to sys.path. **************************************************************** * This module is automatically imported during initialization. * **************************************************************** In earlier versions of Python (up to 1.5a3), scripts or...
#!/usr/bin/python # # Copyright 2017 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...
# -*- coding: utf-8 -*- from collections import OrderedDict from collections import namedtuple from tensorflow.python.platform import gfile from tensorflow.core.framework import graph_pb2 from tensorflow.python.framework import graph_util from tensorflow.python.framework import dtypes from tensorflow.python.framewor...
""" Nodes for representing the parse tree. The return type for `.rule.Rule.parse`. """ from __future__ import unicode_literals from pygments.token import Token __all__ = ('AnyNode', 'LiteralNode', 'RepeatNode', 'SequenceNode', 'VariableNode') class ParseNode(object): def __init__(self, rule): self.rul...
import unittest import mock import numpy as np import chainer from chainer import cuda from chainer import optimizer from chainer import optimizers from chainer import testing from chainer.testing import attr class TestOptimizerUtility(unittest.TestCase): def setUp(self): self.x = np.linspace(-1.0, 1.5...
# General utilities from __future__ import print_function, division from math import * import inspect import numpy as np import sys import astropy from astropy.table import Table # arrays def extractm(x, M): """Return every Mth element of x (array-like)""" N = np.size(x) inc = np.arange(N) ind = np.where(inc%M==...
"""Support for Dyson Pure Cool Link Sensors.""" import logging from libpurecool.dyson_pure_cool import DysonPureCool from libpurecool.dyson_pure_cool_link import DysonPureCoolLink from homeassistant.const import PERCENTAGE, STATE_OFF, TEMP_CELSIUS, TIME_HOURS from homeassistant.helpers.entity import Entity from . im...
from . import _pyrest_core class Identifier(_pyrest_core.BaseObject): """""" class Sequence(_pyrest_core.BaseObject): """""" class Feature(_pyrest_core.BaseObject): """""" seq_region_name = property(_pyrest_core.fget("_seq_region_name"), None, None, """Name of the chromosome, scaffold, etc the feat...
""" Meta-analysis tools """ import logging import numpy as np from scipy.stats import norm from neurosynth.base import imageutils from neurosynth.analysis import stats from os.path import join, exists from os import makedirs logger = logging.getLogger('neurosynth.meta') def analyze_features(dataset, features=None, ...
# In[1]: import sys sys.path.append("/Users/rbiswas/src/interfacecosmology") import halomass as hm from interfaces import FCPL import psutils as psu import numpy as np import matplotlib.ticker as ticker import matplotlib.pyplot as plt import camb_utils.cambio as cio import psutils as psu from interfaces import FCPL...
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """This module contains object generation utilities.""" import datetime import random import names from ggrc import db from ggrc import models from ggrc.app import app from ggrc.services import common fro...
# 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 under the...
import operator import sys from spec import Spec, skip, eq_, ok_, raises, assert_raises from invoke.collection import Collection from invoke.tasks import task, Task from invoke.vendor import six from invoke.vendor.six.moves import reduce from _utils import load, support_path @task def _mytask(): six.print_("wo...
"""Subcluster core module""" __author__ = "Jens Thomas, and Felix Simkovic" __date__ = "01 Oct 2016" __version__ = "1.0" from collections import namedtuple import itertools import logging import mmtbx.superpose import numpy import re import os import shutil from ample.util import ample_util, pdb_edit logger = loggi...
from __future__ import unicode_literals from django.core.urlresolvers import reverse from django.http import Http404, HttpResponseForbidden from django.shortcuts import redirect, get_object_or_404 from django.utils.http import base36_to_int, int_to_base36 from django.utils.translation import ugettext_lazy as _ from dj...
from collections import namedtuple,OrderedDict import re import sys from inspect import isgeneratorfunction,getargspec import csv from io import StringIO from datetime import datetime def print_error(err_string): """Function to write to stderr""" sys.stderr.write("ERROR[UDF]: " + str(err_string) + "\n") # Postgre...
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging impor...
# 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...
''' Copyright (C) 2016 Turi All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. ''' import unittest import numpy as np from numpy import nan import array import datetime as dt from ..data_structures import image from .. import SArray ...
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin import json import os from mock import patch from flexget import __version__ from flexget.api import __version__ as __api_version__ from flexget.manager import Manager from te...
# *-* coding: utf-8 *-* # This file is part of butterfly # # butterfly Copyright (C) 2014 Florian Mounier # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (...
# -*- coding: utf-8 -*- import pytest from warnings import catch_warnings import numpy as np from datetime import datetime from pandas.util import testing as tm import pandas as pd from pandas.core import config as cf from pandas.compat import u from pandas._libs import missing as libmissing from pandas._libs.tslib ...
# 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...
# Copyright 2011 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 logging from typing import Optional from . import context from .lexer import Lexer from .utils import log logger = logging.getLogger('parser').print_pos tree_logger = logging.getLogger('tree').print_pos class Token(Lexer): def __init__(self, *args, **kwargs): super(Token, self).__init__(*args, **...
""" ltisys -- a collection of classes and functions for modeling linear time invariant systems. """ from __future__ import division, print_function, absolute_import # # Author: Travis Oliphant 2001 # # Feb 2010: Warren Weckesser # Rewrote lsim2 and added impulse2. # Aug 2013: Juan Luis Cano # Rewrote abcd_normaliz...
#!/usr/bin/env python """ m2g.stats.qa_reg.py ~~~~~~~~~~~~~~~~~~~~~~ The qa for registration step in the pipeline. In this module, m2g compares the registered and reference brain data to show the quality of each registration by plotting 9 overlay brain slices. """ import warnings warnings.simplefilter("ignore") impo...
''' MathDoku solver module. @author: Radian Baskoro ''' import itertools from datetime import datetime from Utility import Utility class Solver: ''' Solver class used to solve the MathDoku problem. ''' __debugLevel = 0 __iterationCount = 0 __initFlag = False boardSize = 0 ...
# coding: utf-8 """ Functions for working with pitch data This file depends on the praat script get_pitch_and_intensity.praat (which depends on praat) to extract pitch and intensity values from audio data. Once the data is extracted, there are functions for data normalization and calculating various measures from the...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
from distutils.core import setup, Extension from distutils.sysconfig import get_python_lib import os, os.path import sys if sys.platform == "darwin": # Don't create resource files on OS X tar. os.environ['COPY_EXTENDED_ATTRIBUTES_DISABLE'] = 'true' os.environ['COPYFILE_DISABLE'] = 'true' setup_args = {} ...
from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State from direct.fsm import State from panda3d.core import * from panda3d.direct import * from otp.avatar import Avatar from toontown.hood import ZoneUtil from toontown.launcher import DownloadForceAcknowledge from toontown.safezone....
import json as jsonlib import pytz from urlparse import urljoin from django.conf import settings from django.core.urlresolvers import reverse from django.forms import CheckboxInput from django.template import defaultfilters from django.utils import translation from django.utils.encoding import smart_unicode import co...
from datetime import datetime import re import numpy as np import pytest from pandas._libs.tslib import iNaT import pandas.core.algorithms as algos import pandas.util.testing as tm @pytest.fixture(params=[True, False]) def writeable(request): return request.param # Check that take_nd works both with writeabl...
import sys sys.path.insert(1, "../../") import h2o, tests def metric_accessors(): cars = h2o.import_file(path=h2o.locate("smalldata/junit/cars_20mpg.csv")) r = cars[0].runif() train = cars[r > .2] valid = cars[r <= .2] # regression response_col = "economy" distribution = "gaussian" pr...
# Copyright 2020 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 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 us...
from django.core.exceptions import ValidationError from cyder.base.tests import ModelTestMixin from cyder.core.ctnr.models import Ctnr from cyder.core.system.models import System from cyder.cydhcp.interface.static_intr.models import StaticInterface from cyder.cydhcp.range.models import Range from cyder.cydhcp.constant...
# -*- coding: utf-8 -*- """ Tests proxyobject mechanisms with ExampleRawIO """ import unittest import numpy as np import quantities as pq from neo.rawio.examplerawio import ExampleRawIO from neo.io.proxyobjects import (AnalogSignalProxy, SpikeTrainProxy, EventProxy, EpochProxy) from neo.core import ...
import sys import os import numpy as np from pprint import pprint from datetime import datetime from datetime import timedelta import mysql.connector import math import calendar import matplotlib.pyplot as plt import matplotlib.cm as cm from matplotlib import dates start = datetime(2012,5,20,0,2) #2009 - 20090628 2...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r''' --- module: bigip_hostname short_de...
from __future__ import with_statement import os import time import logging from concurrence import unittest, Tasklet, Channel, Timeout from concurrence.memcache import MemcacheResult, Memcache, MemcacheProtocol, MemcacheConnection, MemcacheConnectionManager, MemcacheError, MemcacheBehaviour, MemcacheCodec MEMCACHE_I...
#!/usr/bin/env python ################################################################################ # The MIT License (MIT) # # Copyright (c) 2015 Gerley Machado # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), ...
# Copyright 2022 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
# coding=utf-8 __author__ = 'bjorne' """An module for analysis on data from Evalans SensiStep. Calculates the error between the peakvalues in an exerciseresult and the targetvalue. It produces a result for the chosen exerciseresult and another result with mean errors of several other exerciseresult. """ from Analys...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 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.a...
""" Evaluation of Python code in |jedi| is based on three assumptions: * The code uses as least side effects as possible. Jedi understands certain list/tuple/set modifications, but there's no guarantee that Jedi detects everything (list.append in different modules for example). * No magic is being used: - metac...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Flango: A simple WSGI based webframework for learning. Flango is a WSGI based webframework in pure Python, without any third-party dependency. flango include a simple router, which provide the request routing, a template engine for template rendering, a simple wrapper...
# Copyright 2016 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. DEPS = [ 'depot_tools/bot_update', 'depot_tools/gclient', 'ios', 'recipe_engine/path', 'recipe_engine/platform', 'recipe_engine/properties', 'w...
''' Creates tiles of when tree cover loss coincides with burning or preceded burning by one year. There are four steps to this: 1) acquire raw hdfs from MODIS burned area sftp; 2) make tifs of burned area for each year in each MODUS h-v tile; 3) make annual Hansen-style (extent, res, etc.) tiles of burned area; 4) make...
# Copyright 2014 Rackspace, 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 writin...
# Copyright 2020 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 agreed to in writing, ...
"""Testing backup functionality """ import unittest import tarfile import os.path as pth from itertools import chain import gludb.config from gludb.simple import DBObject, Field from gludb.backup import Backup, is_backup_class, backup_name, strip_line # Note that we expect our s3server.py mock server to be running,...
import os, csv, re, difflib, math, sys, time, json, sqlite3, plistlib from pprint import pprint reload(sys) sys.setdefaultencoding('utf-8') def dict_factory(cursor, row): d = {} for idx, col in enumerate(cursor.description): d[col[0]] = row[idx] return d # parse options from command line from optparse import ...