gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# -*- coding: utf-8 -*- """ Organisation Registry - Controllers @author: Fran Boon @author: Michael Howden """ prefix = request.controller resourcename = request.function if prefix not in deployment_settings.modules: session.error = T("Module disabled!") redirect(URL(r=request, c="default", f="inde...
# 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...
"""Base option parser setup""" import sys import optparse import pkg_resources import os from distutils.util import strtobool from pip.backwardcompat import ConfigParser, string_types from pip.locations import default_config_file, default_log_file class UpdatingDefaultsHelpFormatter(optparse.IndentedHelpFormatter): ...
#!/usr/bin/python # -*- coding: iso-8859-1 -*- # # progressbar - Text progressbar library for python. # Copyright (c) 2005 Nilton Volpato # # 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 Foundatio...
# Lint as: python3 # Copyright 2020 Google LLC. 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 ...
# TODO: is Lock still required? import select from threading import Lock import time import six import pycurl from grab.util.log import PycurlSigintHandler from grab.error import GrabTooManyRedirectsError from grab.transport.curl import build_grab_exception from grab.spider.base_service import BaseService ERROR_TOO...
# This file is part of the MapProxy project. # Copyright (C) 2010-2012 Omniscale <http://omniscale.de> # # 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/LI...
from abc import abstractmethod from collections import defaultdict import six import requests from google.protobuf.internal.decoder import _DecodeVarint from ..text import to_unicode from . import CoreNLP_pb2 from .data import Document, Sentence, Token, Entity from .protobuf_json import pb2json, json2pb __author__ =...
#! /usr/bin/env python # coding: utf-8 import bisect import Queue try: # bad performance on my laptop(windows xp) from blist import blist except: pass ################################### B-Tree ##################################### # based on chapter 18 of Introduction to Algorithms(Second Edition) cla...
# # 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...
import glob import os import distutils.spawn def local_path(path): return os.path.join(os.path.dirname(__file__), path) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'TEST_NAME': ':memory:' } } DEBUG = False SITE_ID = 1 INSTALLED_APPS = [ 'django.contrib.conten...
#!/usr/bin/env python3 # This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import glob import os import re import argparse from typing import...
""" This module contains the spatial lookup types, and the `get_geo_where_clause` routine for Oracle Spatial. Please note that WKT support is broken on the XE version, and thus this backend will not work on such platforms. Specifically, XE lacks support for an internal JVM, and Java libraries are required to use...
# 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. import os import unittest from telemetry import story from telemetry import page as page_module from telemetry import value class TestBase(unittest.TestCas...
# 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...
# -*- coding: utf-8 -*- """ Runs script responsible for communication with db in isolation from view functions. """ from src.modele import User,ReviewRequestModel, Review, connect_and_get from src.modele import connect_and_get as con_get from src.hashing_ import hash_password,check_password from src.config import TestC...
"""Generate mypy config.""" from __future__ import annotations import configparser import io import os from pathlib import Path from typing import Final from homeassistant.const import REQUIRED_PYTHON_VER from .model import Config, Integration # Modules which have type hints which known to be broken. # If you are a...
"""Support to set a numeric value from a slider or text box.""" import logging import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.helpers.config_validation import ENTITY_SERVICE_SCHEMA from homeassistant.const import ( ATTR_UNIT_OF_MEASUREMENT, ATTR_MODE, CONF...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 OpenStack Foundation # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use t...
""" byceps.blueprints.admin.orga_team.views ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from flask import abort, request from flask_babel import gettext from ....permissions.orga_team import OrgaTeamPermission from .......
import cPickle import gzip import os import sys import time import numpy import numpy as np import theano import theano.tensor as T from theano.tensor.signal import downsample from theano.tensor.nnet import conv from logistic_sgd import LogisticRegression, load_data from mlp import HiddenLayer, MLP, rectified_linear...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright 2015-2018 by Exopy Authors, see AUTHORS for more details. # # Distributed under the terms of the BSD license. # # The full license is in the file LICENCE, distributed with this software. # ---------------...
# encoding: utf-8 """ Gherkin step implementations for chart features. """ from __future__ import absolute_import, print_function import hashlib from itertools import islice from behave import given, then, when from pptx import Presentation from pptx.chart.chart import Legend from pptx.chart.data import BubbleCha...
# Copyright 2018 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, s...
from setuptools import setup from distutils.extension import Extension import os.path import sys extra_compile_args = ["-DDLLX="] extra_link_args = [] define_macros = [] runtime_library_dirs = [] library_dirs = [] libraries = [] include_dirs = [] if sys.platform == "win32": if sys.maxsize > 2 ** 32: # 64-bit ...
import json import pytest from rancher import ApiError from .common import random_str from .conftest import wait_for, wait_for_condition @pytest.mark.skip(reason="cluster-defaults disabled") def test_generic_initial_defaults(admin_mc): cclient = admin_mc.client schema_defaults = {} setting_defaults = {} ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ pyFPlug - F-Plug library for Python Copyright (C) 2014 SUNAGA Takahiro This software is released under the MIT License. http://opensource.org/licenses/mit-license.php """ import serial import time import datetime import sys from struct import * def hexdump(s): ...
# -*- coding: utf-8 -*- # File: monitor.py import json import numpy as np import operator import os import re import shutil import time from collections import defaultdict from datetime import datetime import six import threading from ..compat import tfv1 as tf from ..libinfo import __git_version__ from ..tfutils.su...
# Copyright (c) 2016-present, Facebook, 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...
# Copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import tempfile from telemetry.core import exceptions from telemetry.core.platform import tracing_category_filter from telemetry.core.platfor...
#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation # import sys import os import subprocess import argparse import platform from glob import glob from os.path import exists, basename from os.path import join as path_join # The PCI base class for all devices netw...
#!/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...
############################################################################### ## ## Copyright (C) 2011-2014 Tavendo GmbH ## ## 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 ## ## h...
#!/usr/bin/env python """Implementations of various collections.""" import cStringIO import struct import logging from grr.lib import aff4 from grr.lib import data_store from grr.lib import rdfvalue from grr.lib import utils from grr.lib.aff4_objects import aff4_grr class RDFValueCollection(aff4.AFF4Object): "...
# Copyright (c) 2018, Xilinx, 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: # # 1. Redistributions of source code must retain the above copyright notice, # this list of con...
import re, socket from ems.validation.abstract import Validator class RequiredValidator(Validator): def validate(self, value): if value is None: return False if isinstance(value, basestring): return bool(value.strip()) return bool(value) class FilledValidator(...
# -*- coding: utf-8 -*- """ flask_oauth ~~~~~~~~~~~ Implements basic OAuth support for Flask. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import httplib2 from functools import wraps # urlparse module has been renamed in Python 3.x try: from urlparse...
from __future__ import division from itertools import product import numpy as np import scipy.sparse as sp from scipy.sparse import coo_matrix from scipy.sparse import csc_matrix from scipy.sparse import csr_matrix from scipy.sparse import dok_matrix from scipy.sparse import issparse from scipy.sparse import lil_matr...
#!/usr/bin/env python from __future__ import print_function import math, sys import numpy as np """ This is a version of BFGS specialized for the case where the function is constrained to a particular convex region via a barrier function, and where we can efficiently evaluate (via calling f_finite(x), which returns ...
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
"""Pgbouncer check Collects metrics from the pgbouncer database. """ # stdlib import urlparse # 3p import psycopg2 as pg # project from checks import AgentCheck, CheckException class ShouldRestartException(Exception): pass class PgBouncer(AgentCheck): """Collects metrics from pgbouncer """ RATE ...
import collections import six from wtforms import Form try: from wtforms_sqlalchemy.fields import ( QuerySelectField, QuerySelectMultipleField ) HAS_SQLALCHEMY_SUPPORT = True except ImportError: try: from wtforms.ext.sqlalchemy.fields import ( QuerySelectField, ...
# Copyright 2016 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
# Copyright (C) 2013-2014 Red Hat, 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: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and...
_DISABLE_ALL_LOGS = True ##---------------------------------------------------------------------------------------------------------------------- ##---------------------------------------------------------------------------------------------------------------------- ##---------------------------------------------...
# Copyright 2013: Mirantis 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...
#!/usr/bin/env python """Slack bot class to control a webcam and post snapshots to Slack .""" import re import time import json import random import datetime as dt import subprocess import websocket import sys import logging import socket import signal from slackclient import SlackClient import psutil import utils ...
import os import json class CopyError(Exception): pass class SpiderCopier(object): """ Utility for copying spiders and items from one project to another. :source: read data from source project in read_file :destination: read and write to destination project in read_file and sa...
#!/usr/bin/python import sqlite3 import sys import traceback from StatsClass import NcaaGrabber TEAM_TABLE_NAME = "teams" TEAM_TABLE = { "year": "year", "id": "org", "name": "name", "winLoss": "winLoss" } SCHED_TABLE_NAME = "schedule" SCHED_TABLE = { "year": "year", "week": "week", "team": "team", "opp": "opponent...
from PyQt5 import QtWidgets from chainer_wing import inspector from chainer_wing import util import os class TrainParamServer(object): """Singleton parameter server """ __instance = None def __new__(cls, *args, **keys): if cls.__instance is None: cls.__instance = object.__new__(c...
# Copyright 2015-2017 ARM Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
""" An ingest module """ from lxml import html import requests import json from bs4 import BeautifulSoup import re #Python 3 import urllib.request # #Python 2 # import urllib import pymongo import os import pickle class IngestSystem(object): def __init__(self, cl): self.cities = cl def pull_and_l...
"""The tests for the automation component.""" import unittest from homeassistant.bootstrap import _setup_component import homeassistant.components.automation as automation from homeassistant.const import ATTR_ENTITY_ID from tests.common import get_test_home_assistant class TestAutomation(unittest.TestCase): """...
# 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 ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 New Dream Network, LLC (DreamHost) # # 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/li...
import copy import random from moneyed import Money from django.test import RequestFactory from rest_framework import status from rest_framework.reverse import reverse from minicash.core.models import Asset, Record, Tag from minicash.core.serializers import ( AssetSerializer, CreateRecordSerializer, Read...
# CREATED:2015-02-17 14:41:28 by Brian McFee <brian.mcfee@nyu.edu> # this function is lifted wholesale from matploblib v1.4.2, # and modified so that images are stored explicitly under the tests path from __future__ import (absolute_import, division, print_function, unicode_literals) import si...
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # 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 Lic...
# -*- coding: utf-8 -*- import datetime import io import json import os import six from six.moves import range, urllib import zipfile from .. import base from girder.models.notification import Notification, ProgressState from girder.models.collection import Collection from girder.models.item import Item from girder.m...
# Autoreloading launcher. # Borrowed from Peter Hunt and the CherryPy project (http://www.cherrypy.org). # Some taken from Ian Bicking's Paste (http://pythonpaste.org/). # # Portions copyright (c) 2004, CherryPy Team (team@cherrypy.org) # All rights reserved. # # Redistribution and use in source and binary forms, with ...
from datetime import datetime from django.contrib import messages from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import render from django.urls import reverse from django.utils.translation import ugettext as _ from django.utils.html import format_html from django.utils.safestring impo...
########################################################################## # # Copyright 2012, Electric Theatre Collective Limited. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Re...
# Feature extraction code # Header pending import os import time import subprocess import csv import shelve import re import sys import pickle import geneontology #import pdb import time import ents import ppipred import irefindex def verbosecheck(verbose): '''returns a function depending on the state of the verb...
#!/usr/bin/env python #Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details """Generate documentation for reportlab.graphics classes. Type the following for usage info: python graphdocpy.py -h """ __version__ = '0.8' import sys sys.path.insert(0, '.') import os, re, types, getopt, pickle, ...
import unittest import functools import numpy from operator import mul import chainer from chainer import backend from chainer.backends import cuda import chainer.functions as F from chainer import gradient_check from chainer import testing from chainer.testing import attr from chainer.testing import condition from c...
from django.db import models from django.contrib.auth.models import User, Group, AbstractUser from django.utils.translation import ugettext_lazy as _ import os # Create your models here. class IITGUser(models.Model): user=models.OneToOneField(User, related_name='user', default=False) is_student = models.Bool...
from __future__ import print_function import datetime import os import re import six import textwrap import time from errata_tool import ErrataException, ErrataConnector, security, User class Erratum(ErrataConnector): def fmt(self, s): # The textwrap library doesn't parse newlines, so you'll want to ...
# Copyright 2015 Hewlett-Packard Development Company, L.P.dsvsv # Copyright 2015 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 # # ...
import curses import sys import time import os.path import random import pickle from curses import wrapper gamedims = 22 currPosList = ['0','2'] def main(stdscr):#{ curses.start_color() curses.init_pair(1, curses.COLOR_WHITE, curses.COLOR_BLACK) curses.init_pair(2, curses.COLOR_BLACK, curses.COLOR_WHITE) curses.i...
#!/usr/bin/python # # Software License Agreement (BSD License) # # Copyright (c) 2008, Willow Garage, 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 m...
# Copyright 2017 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
# Copyright 2015-2017 Capital One Services, LLC # Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 import copy from datetime import datetime, timedelta import json import itertools import ipaddress import logging import os import random import re import sys import threading import time from ...
import aeropy import math import numpy as np from scipy import optimize class shell(): def __init__(self, geometry_parent, geometry_child, properties, bc, chord=1, ndim=2): """ COnstant length is assumed for the structure A: metric tensor dA: metric tensor covari...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. # -*- test-case-name: flocker.provision.test.test_install -*- """ Install flocker on a remote node. """ import posixpath from textwrap import dedent from urlparse import urljoin, urlparse from effect import Func, Effect import yaml from zope.interface impo...
# -*- coding: UTF-8 -*- ''' Created on Sep 9, 2013 @author: tanel ''' import sys from itertools import groupby import math import re import syllabifier import yaml import os LANGUAGES = yaml.load(open(os.path.dirname(__file__) + '/data/languages.yaml')) LEFT_CONTEXT = 2 RIGHT_CONTEXT = 2 USE_DURATION_FEATURE = True...
# -*- coding: utf-8 -*- """This module contains classes for constructing propeller navbars""" from django.utils.safestring import mark_safe from .utils import render_tag, add_css_class from .text import text_concat try: # pragma: no cover from django.urls import reverse except ImportError: # pragma: no cover ...
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
#!/usr/bin/python # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """NaCl SDK tool SCons.""" import __builtin__ import re import os import shutil import sys import SCons.Scanner import SCons.Scri...
import pyCGM_Single.pyCGM as pyCGM import pytest import numpy as np rounding_precision = 8 class TestUtils(): """ This class tests the utils functions in pyCGM.py: findwandmarker cross norm2d norm3d normDiv matrixmult rotmat """ rand_coor = [np.random.randint(0, 10), np.ran...
# generate generates a new recipe scraper. import ast import requests import sys from recipe_scrapers._utils import get_host_name from recipe_scrapers._abstract import HEADERS template_class_name = "Template" template_host_name = "example.com" def generate_scraper(class_name, host_name): with open("templates/sc...
from __future__ import unicode_literals import datetime import os import re import sys import types from django.conf import settings from django.http import (HttpResponse, HttpResponseServerError, HttpResponseNotFound, HttpRequest, build_request_repr) from django.template import Template, Context, TemplateDoesNot...
import time from PyQt4.QtGui import * from PyQt4.QtCore import * from electrum_gui.qt.util import * from electrum_gui.qt.amountedit import AmountEdit from electrum.bitcoin import COIN from electrum.i18n import _ from decimal import Decimal from functools import partial from electrum.plugins import hook from exchange_...
# -*- coding: utf-8 -*- # # Copyright (C) 2004-2009 Edgewall Software # Copyright (C) 2004-2005 Christopher Lenz <cmlenz@gmx.de> # Copyright (C) 2006-2007 Christian Boos <cboos@neuf.fr> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of thi...
"""sstruct.py -- SuperStruct Higher level layer on top of the struct module, enabling to bind names to struct elements. The interface is similar to struct, except the objects passed and returned are not tuples (or argument lists), but dictionaries or instances. Just like struct, we use fmt strings to describe a data ...
# 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...
import warnings import numpy as np import pytest from scipy import linalg from sklearn.base import clone from sklearn.model_selection import train_test_split from sklearn.utils._testing import assert_allclose from sklearn.utils._testing import assert_array_almost_equal from sklearn.utils._testing import ignore_warning...
# coding: utf-8 from __future__ import absolute_import from __future__ import print_function import warnings from ruamel.yaml.error import MarkedYAMLError, ReusedAnchorWarning from ruamel.yaml.compat import utf8 from ruamel.yaml.events import ( StreamStartEvent, StreamEndEvent, MappingStartEvent, MappingEndEven...
# Copyright 2014 Uri Laserson # # 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,...
''' TST - A Ternary Search Trie Author: Tim Henderson Contact: tim.tadh@hackthology.com or timothy.henderson@case.edu This File: TST Implementation. Copyright (c) 2010, Tim Henderson All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that 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...
# -*- coding: utf-8 -*- ############################ Copyrights and license ############################ # # # Copyright 2012 Michael Stead <michael.stead@gmail.com> # # Copyright 2012 Vincent Jacques <vincent@vincent-ja...
import base64 import os import re import logging from datetime import datetime from uuid import uuid4 from django.conf import settings fmt = getattr(settings, 'LOG_FORMAT', None) lvl = getattr(settings, 'LOG_LEVEL', logging.DEBUG) logging.basicConfig(format=fmt, level=lvl) from watson import search as watson from au...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'ProjectLayer.optional' db.add_column(u'orm_projectlayer',...
import math import time import itertools from src.Surface import Surface from shapely import geometry from src.Bucket import Bucket class Road(Surface): """ One of the essential building blocks of the traffic environment. A road has a number of lanes and connects to an intersection on each of its ends. Roa...
''' PipelineEnrichmentGSEA.py ============================================= :Tags: Python Usage ----- This pipeline is a wrapper of script runGSEA.py (enrichment analysis by using GSEA. Further description is provided ...
# shamelessly copied from pliExpertInfo (Vali, Mirakels, Littlesat) from enigma import iServiceInformation, iPlayableService from Components.Converter.Converter import Converter from Components.Element import cached from Components.config import config from Tools.Transponder import ConvertToHumanReadable from Tools.Ge...
# -*- coding: utf-8 -*- # Copyright (C) 2006 Joe Wreschnig # # 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. """Utilit...
# # 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...
#!/usr/bin/python # -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Copyright (c) 2012 Michael Hull. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are m...
from datetime import datetime, timedelta, timezone import logging from django.contrib.auth.models import User from django.contrib.postgres.fields import JSONField from django.conf import settings from django.core.exceptions import PermissionDenied from django.db import models from itunesiap.receipt import MissingField...