text
stringlengths
475
200k
# 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 os import sys sys.path.append(os.path.join(os.path.dirname(__file__), "lib")) import facebook import websites import feeds #import beachstatus from event import EventVault import logging import datetime import time import locale locale.setlocale(locale.LC_TIME, '') # locale for date, time an the infamous germ...
#!/usr/bin/env python # generate logging code # this requires an analysis of the parameters for verbose and do actual call import sys, string, re from read import read_gl def do_logfunc(f_in, f_out): (gl, wgl, glX) = read_gl(f_in) for l in (gl, glX): for t in l: # process ret type to strip trailing spaces ...
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsRange .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. """ __author_...
#!/usr/bin/env trial import gflags import json import mock import sys import urlparse from ct.client import log_client from ct.client import async_log_client from ct.client import log_client_test_util as test_util from ct.client.db import database from twisted.internet import defer from twisted.internet import task fr...
from pyui.import_image import Ui_ImportImage from PyQt5.QtWidgets import QWidget, QToolBar, QDialog, QDialogButtonBox, QProgressDialog, QMessageBox from PyQt5.QtGui import QIcon from PyQt5.QtCore import Qt, QCoreApplication from qmathplotwidget import QMathPlotWidget, QImPlotWidget import matplotlib.pyplot as plt from ...
from ..route_handler import ModelRouter from ..pubsub_providers.base_provider import PUBACTIONS from .dragon_test_case import DragonTestCase from .models import FooSelfPub, BarSelfPub from .serializers import FooSelfPubSerializer, BarSelfPubSerializer from datetime import datetime class FooModelRouter(ModelRouter): ...
""" Tests for the DjangoXBlockUserService. """ from django.test import TestCase from xblock_django.user_service import ( DjangoXBlockUserService, ATTR_KEY_IS_AUTHENTICATED, ATTR_KEY_USER_ID, ATTR_KEY_USERNAME, ATTR_KEY_USER_IS_STAFF, ) from student.models import anonymous_id_for_user from student.te...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a ...
#!/usr/bin/env python # # Copyright 2005,2007,2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your ...
from django.conf.urls import patterns, url from radpress.views import ( ArticleArchiveView, ArticleDetailView, ArticleListView, PreviewView, PageDetailView, SearchView, ZenModeView, ZenModeUpdateView) from radpress.feeds import ArticleFeed urlpatterns = patterns( '', url(r'^$', view=ArticleLis...
# 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...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
# -*- coding: utf-8 -*- ############################################################################## # # ______ Releasing children from poverty _ # / ____/___ ____ ___ ____ ____ ___________(_)___ ____ # / / / __ \/ __ `__ \/ __ \/ __ `/ ___/ ___/ / __ \/ __ \ # / /___/ /_/ / / / / / / /_/...
def check_requirements(installed_dists): missing_reqs_dict = {} incompatible_reqs_dict = {} for dist in installed_dists: key = '%s==%s' % (dist.project_name, dist.version) missing_reqs = list(get_missing_reqs(dist, installed_dists)) if missing_reqs: missing_reqs_dict[...
""" Models to support Course Surveys feature """ import logging from lxml import etree from collections import OrderedDict from django.db import models from student.models import User from django.core.exceptions import ValidationError from model_utils.models import TimeStampedModel from survey.exceptions import Surv...
""" Class for reading data from Neuralynx files. This IO supports NCS, NEV and NSE file formats. This module is an older implementation with old neo.io API. A new class NeuralynxIO compunded by NeuralynxRawIO and BaseFromIO superseed this one. Depends on: numpy Supported: Read Author: Julia Sprenger, Carlos Canova...
#!/usr/bin/env python # Copyright 2014 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ This script runs every build as a hook. If it detects that the build should be clobbered, it will touch the file <build_dir>/.lan...
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
#!/usr/bin/env python #weight_heuristic.py import random from alphabeta import UPPER_BOUND from alphabeta import LOWER_BOUND class WeightHeuristic(object): def __init__(self, weight_m): self.weights = weight_m self.wins = 0 self.losses = 0 def __call__(self, game_state): value = 0 state = self.parse(gam...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
from werkzeug.utils import redirect from werkzeug.exceptions import NotFound from couchy.utils import render_template, expose, \ validate_url, url_for, Pagination from couchy.models import URL @expose('/') def new(request): error = url = '' if request.method == 'POST': url = request.form.get('url...
# # Copyright 2013-2015 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (http...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License...
from django.core.urlresolvers import reverse from rest_framework.compat import patterns, url from rest_framework.test import APITestCase from rest_framework.tests.models import NullableForeignKeySource from rest_framework.tests.serializers import NullableFKSourceSerializer from rest_framework.tests.views import Nullab...
# -*- coding: utf-8 -*- # Copyright 2017 Dag Wieers <[EMAIL]> # Copyright 2017 Swetha Chunduri (@schunduri) # This file is part of Ansible by Red Hat # # Ansible 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 Foundatio...
import os import sys import unittest if sys.platform != 'win32': raise unittest.SkipTest('Windows only') import _winapi import asyncio from asyncio import _overlapped from asyncio import test_utils from asyncio import windows_events class UpperProto(asyncio.Protocol): def __init__(self): self.buf =...
"""Trust Region Reflective algorithm for least-squares optimization. The algorithm is based on ideas from paper [STIR]_. The main idea is to account for the presence of the bounds by appropriate scaling of the variables (or, equivalently, changing a trust-region shape). Let's introduce a vector v: | ub[i] ...
from past.builtins import basestring from rest_framework import status as http_status from django.utils.translation import ugettext_lazy as _ from rest_framework import status from rest_framework.exceptions import APIException, AuthenticationFailed, ErrorDetail def get_resource_object_member(error_key, context): ...
""" A module for generating sequence signatures for the given two sets of proteins. """ from django.conf import settings from django.core import exceptions from alignment.functions import strip_html_tags, get_format_props Alignment = getattr(__import__( 'common.alignment_' + settings.SITE_NAME, fromlist=['Alig...
# Copyright 2014 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. from telemetry import test from benchmarks import silk_flags from measurements import thread_times class ThreadTimesKeySilkCases(test.Test): """Measures ...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Joris Weijters <[EMAIL]> # # This file is part of Ansible # # Ansible 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 -*- # 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 "Lice...
# Copyright 2014 Violin Memory, 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 requi...
#!/usr/bin/env python """Before launching the LightDock simulation, a setup step is required. This step parses the input PDB structures, calculates the minimum ellipsoid containing each of them, calculates the swarms on the surface of the receptor and populates each swarm with random coordinates for each glowworm's...
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j E Y' TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = 'j E Y H:i:s' YEAR_MONTH_F...
# Based on local.py (c) 2012, Michael DeHaan <[EMAIL]> # and chroot.py (c) 2013, Maykel Moya <[EMAIL]> # and jail.py (c) 2013, Michael Scherer <[EMAIL]> # (c) 2015, Dagobert Michelsen <[EMAIL]> # (c) 2015, Toshio Kuratomi <[EMAIL]> # # This file is part of Ansible # # Ansible is free software: you can redistr...
# Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ import datetime import json import logging import os import random import socket import sys import tempfile import warnings from django.core.exceptions import ValidationError SESSION_...
import json import re from lib.ModFilter import ModFilterType from lib.ModFilterGroup import PSEUDO_MODS from lib.Utility import AppException class ModsHelper: MODS_FNAME = 'res\\mods.json' MOD_TEXT_REGEX = re.compile('\(([^()]+)\)\s+(.*)') def __init__(self): self.mod_list = None self.m...
"""util_test.py - test classes for util module This file is part of cMonkey Python. Please see README and LICENSE for more information and licensing details. """ import unittest import util import operator import numpy as np class DelimitedFileTest(unittest.TestCase): # pylint: disable-msg=R0904 """Test class f...
from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import (run_module_suite, assert_equal, assert_array_equal, assert_array_almost_equal, assert_approx_equal, assert_raises, assert_allclose) from scipy.special import xlogy from scipy.stats.contingen...
# Copyright (c) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
def main(): students = [ Student("Larsson", 37), Student("BonJovi", 55), ] printHeader() selection = getUserSelection() if selection == 0: printStudentsByAge(students) elif selection == 1: pass elif selection == 2: pass else: print "SELECTION NOT RECOGNIZED" class Student: d...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2012, Jim Richardson <[EMAIL]> # All rights reserved. # # This file is part of Ansible # # Ansible 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, eith...
# 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...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting model 'OriginPermission' db.rename_table('cors_originpermission', 'cors_origin') db.renam...
# # C naming conventions # # # Prefixes for generating C names. # Collected here to facilitate ensuring uniqueness. # pyrex_prefix = "__pyx_" codewriter_temp_prefix = pyrex_prefix + "t_" temp_prefix = u"__cyt_" builtin_prefix = pyrex_prefix + "builtin_" arg_prefix = pyrex_prefix + "arg_" f...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2010 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
#!/usr/bin/python # Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # Copyright (c) 2013, Benno Joy <[EMAIL]> # # This module 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 t...
from __future__ import unicode_literals import re from .common import InfoExtractor class ParliamentLiveUKIE(InfoExtractor): IE_NAME = 'parliamentlive.tv' IE_DESC = 'UK parliament videos' _VALID_URL = r'https?://www\.parliamentlive\.tv/Main/Player\.aspx\?(?:[^&]+&)*?meetingId=(?P<id>[0-9]+)' _TEST ...
"""Fixer for operator functions. operator.isCallable(obj) -> hasattr(obj, '__call__') operator.sequenceIncludes(obj) -> operator.contains(obj) operator.isSequenceType(obj) -> isinstance(obj, collections.Sequence) operator.isMappingType(obj) -> isinstance(obj, collections.Mapping) operator.isNumberType(obj) ...
# Copyright (c) 2010-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 agree...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
# 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- from base import TestRailAPIBase class Plan(TestRailAPIBase): """ Use the following API methods to request details ...
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from dplcm_estimation_config import dplcm_configuration as dplcm_gridcell_config from estimation_zone_config import run_configuration as config class dplcm_configuration(dplcm_gridcell_config):...
# vi: ts=4 expandtab # # Copyright (C) 2012 Yahoo! Inc. # # Author: Joshua Harlow <[EMAIL]> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3, as # published by the Free Software Foundation. # # This program is dis...
# 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...
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ This module contains classes that help to emulate xcodebuild behavior on top of other build systems, such as make and ninja. """ import copy import gyp.common...
# Copyright 2012 OpenStack Foundation # Copyright 2013 IBM 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/LIC...
#!/usr/bin/python # # Copyright 2009 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 b...
# Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 """ TODO: provider policy execution initialization for outputs """ import datetime import logging import time try: from google.cloud.storage import Bucket, Client as StorageClient except ImportError: Bucket, StorageClient = None,...
# Copyright 2005-2011 Mark Dufour and contributors; License Expat (See LICENSE) # model for module socket for shed skin # from python 2.5.1 documentation SHUT_RD=0 SHUT_WR=1 SHUT_RDWR=2 SOL_IP=0 SOL_SOCKET=1 SO_REUSEADDR=2 AI_PASSIVE=1 AF_UNIX=1 AF_INET=2 AF_INET6=10 IP_TOS=1 SOCK_STREAM=1 SOCK_DGRAM=2 SOMAXCO...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2016 University of Dundee & Open Microscopy Environment. # All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Founda...
# -*- test-case-name: twisted.internet.test.test_endpoints -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Implementations of L{IStreamServerEndpoint} and L{IStreamClientEndpoint} that wrap the L{IReactorTCP}, L{IReactorSSL}, and L{IReactorUNIX} interfaces. This also implements an exte...
# vim:set et sts=4 sw=4: # # ibus - The Input Bus # # Copyright (c) 2007-2010 Peng Huang <[EMAIL]> # Copyright (c) 2007-2010 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation...
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse_unquote, compat_urllib_parse_urlparse, ) from ..utils import ( ExtractorError, float_or_none, sanitized_Request, unescapeHTML, update_url_query, ...
# # gdb helper commands and functions for Linux kernel debugging # # load kernel and module symbols # # Copyright (c) Siemens AG, 2011-2013 # # Authors: # Jan Kiszka <[EMAIL]> # # This work is licensed under the terms of the GNU GPL version 2. # import gdb import os import re import string from linux import modules...
"""Shadow-volume implementation A volume is cast by a light from an edgeset, it's basically the volume of space which is shadowed by the given edgeset/object. """ from OpenGLContext.arrays import * from OpenGL.GL import * import weakref class Volume( object ): """A shadow-volume object This object represents...
import distutils.command.bdist_rpm as orig class bdist_rpm(orig.bdist_rpm): """ Override the default bdist_rpm behavior to do the following: 1. Run egg_info to ensure the name and version are properly calculated. 2. Always run 'install' using --single-version-externally-managed to disable eggs...
"""Thread module emulating a subset of Java's threading model.""" import sys as _sys try: import thread except ImportError: del _sys.modules[__name__] raise import warnings from collections import deque as _deque from itertools import count as _count from time import time as _time, sleep as _sleep from ...
#!/usr/bin/env python ''' Copyright (C) 2014, Digium, Inc. Mark Michelson <[EMAIL]> This program is free software, distributed under the terms of the GNU General Public License Version 2. ''' class MWISender(object): '''Test module that updates MWI on the sending Asterisk server. This reads test module conf...
# Copyright 2014 DreamHost, LLC # # Author: DreamHost, 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 applicabl...
import os from sys import maxint _proc_status = '/proc/%d/status' % os.getpid() #_scale = {'kB': 1024.0, 'mB': 1024.0*1024.0, # 'KB': 1024.0, 'MB': 1024.0*1024.0} _scale = {'kB': 1, 'mB': 1024, 'gB': 1024 * 1024, 'KB': 1, 'MB': 1024, 'GB': 1024 * 1024} def _VmB(VmKey): '''Private. ''' ...
""" Kuwait-specific Form helpers """ import re from datetime import date from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField from django.utils.translation import gettext as _ id_re = re.compile(r'^(?P<initial>\d{1})(?P<yy>\d\d)(?P<...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2018 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[EMAIL]> # # The licence is in the file __manifest__.py # #########...
# -*- coding: utf-8 -*- # Copyright 2012 Francesco OpenCode Apruzzese <[EMAIL]> # # 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,...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import cstr from frappe import _ import json from frappe.model.document import Document class CustomField(Document): def autoname(self): self.s...
from __future__ import nested_scopes # Backward compat for 2.1 from unittest import TestCase from wsgiref.util import setup_testing_defaults from wsgiref.headers import Headers from wsgiref.handlers import BaseHandler, BaseCGIHandler from wsgiref import util from wsgiref.validate import validator from wsgiref.simple...
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. from __future__ import with_statement import errno import os import tempfile class Pidfile(object): """\ Manage a PID file. If a specific name is provided it and '"%s.oldpid" % ...
import logging log = logging.getLogger("Thug") def DownloadFile(self, *arg): log.ThugLogging.add_behavior_warn('[ZenturiProgramChecker ActiveX] Attack in DownloadFile function') log.ThugLogging.add_behavior_warn('[ZenturiProgramChecker ActiveX] Downloading from %s' % (arg[0], )) log.ThugLogging.add_beha...
# -*- coding: utf-8 -*- """ *************************************************************************** PointsToPaths.py --------------------- Date : April 2014 Copyright : (C) 2014 by Alexander Bruy Email : alexander dot bruy at gmail dot com *************...
#imports for database engine import os from sqlalchemy import create_engine from sqlalchemy.pool import NullPool from sqlalchemy.orm import scoped_session, sessionmaker #imports for models from datetime import datetime, timedelta from sqlalchemy import MetaData, Column, ForeignKey, Integer, String, DateTime, Float, Bo...
import os from django_evolution import EvolutionException, is_multi_db from django_evolution.builtin_evolutions import BUILTIN_SEQUENCES from django_evolution.models import Evolution from django_evolution.mutations import SQLMutation def get_evolution_sequence(app): "Obtain the full evolution sequence for an app...
#!/usr/bin/env python # # Copyright 2010 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...
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j N Y' DATETIME_FORMAT = "j N Y, G:i:s" TIME_FORMAT = 'G:i:s' YEAR_MONTH_...
""" KeepNote Editor widget in main window """ # # KeepNote # Copyright (c) 2008-2011 Matt Rasmussen # Author: Matt Rasmussen <[EMAIL]> # # 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 Founda...
r""" Calculate the potential fields of a homogeneous sphere. **Magnetic** Calculates the magnetic effect produced by an sphere. The functions are based on Blakely (1995). * :func:`~fatiando.gravmag.sphere.tf`: calculates the total-field anomaly * :func:`~fatiando.gravmag.sphere.bx`: calculates the x component of the...
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 # # Unle...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
# 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...
# -*- coding: utf-8 -*- # Copyright 2014 Rob Ruana # Licensed under the BSD License, see LICENSE file for details. """Classes for docstring parsing and formatting.""" import collections import inspect import re import sys from six.moves import range from pockets import modify_iter from six import string_types _dire...
# (c) 2015, Hartmut Goebel <[EMAIL]> # Based on `runner/lookup_plugins/items.py` for Ansible # (c) 2012, Michael DeHaan <[EMAIL]> # # This file is part of Debops. # This file is NOT part of Ansible yet. # # Debops is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public L...
from __future__ import print_function import numpy as np import tensorflow as tf from A2_fullyconnected.p1_relulayer import HiddenRelu import math import utility.logger_tool import logging class Mulilayer_HiddenRelu(HiddenRelu): def __init__(self): HiddenRelu.__init__(self) self.num_steps = 120 * ...
"""Remote control for MacOS FontLab. initFontLabRemote() registers a callback for appleevents and runFontLabRemote() sends the code from a different application, such as a Mac Python IDE or Python interpreter. """ from robofab.world import world if world.inFontLab and world.mac is not None: from Carbon import AE as ...
#!/usr/bin/env python # png.py - PNG encoder/decoder in pure Python # # Copyright (C) 2006 Johann C. Rocholl <[EMAIL]> # Portions Copyright (C) 2009 David Jones <[EMAIL]> # And probably portions Copyright (C) 2006 Nicko van Someren <[EMAIL]> # # Original concept by Johann C. Rocholl. # # LICENCE (MIT) # # Permission i...
from __future__ import unicode_literals import warnings from django import forms from django.conf import settings from django.contrib.admin.templatetags.admin_static import static from django.contrib.admin.utils import ( display_for_field, flatten_fieldsets, help_text_for_field, label_for_field, lookup_field,...