gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# 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...
""" <Program> nodemanager.py <Started> 28 June 2009 <Author> Justin Cappos Justin Samuel <Purpose> This is the nodemanager api for seattlegeni. Unless you are are developing the backend server, all you will use this module for is to first call init_nodemanager() and then to call either of these tw...
import datetime import json import re import os import time import winreg from comtypes import COMError from zashel.winhttp import Requests, encode, decode, LOCALPATH from functools import partial, wraps from math import floor #LOCALPATH = os.path.join(os.environ["LOCALAPPDATA"], "zashel", "gapi") # SCOPES class SCO...
# Copyright (C) 2018 NTT DATA, 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 require...
# Copyright (c) 2017 Tigera, 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...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright 2015-2018 by ExopyHqcLegacy 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. # ------...
import json import io import demistomock as demisto from BoxV2 import Client def util_load_json(path): """ Simple test utility to open the recorded JSON files. :param path: str - Path to the JSON file :return: dict - A dict representation of the JSON """ with io.open(path, mode='r', encoding=...
# Copyright 2016 IBM 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 t...
import contextlib from concurrent.futures import ThreadPoolExecutor from threading import Lock import numpy as np import pandas as pd import pytest import dask.array as da import dask.dataframe as dd from dask.dataframe._compat import tm from dask.dataframe.io.io import _meta_from_array from dask.dataframe.utils impo...
import hashlib import operator import warnings from .exceptions import ( ConnectionError, InvalidData, RedisError, ResponseError, NoScriptRunning, ScriptDoesNotExist, WatchError ) from .utils import list_or_args from twisted.python.failure import Failure from twisted.internet.defer import ( fail, inlineCa...
# 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 ...
# Copyright 2018 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 Chromium Authors. # # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file or at # https://developers.google.com/open-source/licenses/bsd. """Command line interface to Chromium Code Search. Currently emits JSON formatted responses from the Chromium Cod...
# -*- coding: utf-8 -*- from __future__ import absolute_import import theano import theano.tensor as T from .. import activations, initializations, regularizers, constraints from ..utils.theano_utils import shared_zeros from ..layers.core import Layer class Convolution1D(Layer): def __init__(self, input_dim, nb...
import copy import math from django.test import TestCase from mock import patch, call, MagicMock from graphite.render.datalib import TimeSeries from graphite.render import functions from graphite.render.functions import NormalizeEmptyResultError def return_greater(series, value): return [i for i in series if i is...
# Copyright 2016 Rackspace Hosting 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 re...
import cv2 from cv2 import aruco import numpy as np from abc import ABC, abstractmethod from tqdm import trange from collections import defaultdict def get_video_params_cap(cap): params = dict() params['width'] = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)) params['height'] = int(cap.get(cv2.CAP_PROP_FRAME_HEIG...
#!/usr/bin/env python3 # # Copyright (c) 2016, 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 # ...
#!/usr/bin/env python """sorno_feedly.py manages feeds stored in Feedly. This script does not implement an oauth flow, so just get a developer token from https://developer.feedly.com/v3/developer to use this script. Quickstart: First, get a developer access token through https://developer.feedly.com/v3/devel...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015 Ericsson 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 r...
#SPDX-License-Identifier: MIT from multiprocessing import Process, Queue from urllib.parse import urlparse import pandas as pd import sqlalchemy as s import requests import time import logging import json import os import math from datetime import datetime from workers.worker_base import Worker class GitHubWorker(Work...
from nose.tools import assert_equal import numpy as np from scipy import linalg from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_less from sklearn.utils.testing import assert_greater from sklearn.utils.testing import ass...
""" Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 datetime import decimal from dateutil.relativedelta import relativedelta from django.db import transaction from django.db.models import Sum from django.http import HttpResponse from django.utils.translation import ugettext_lazy as _ from django_filters.rest_framework import DjangoFilterBackend from rest_framewo...
# all is object def hi(name = 'yasoob'): return "hi " + name print(hi()) greet = hi print(greet()) del hi # print(hi()) print(greet()) def hi2(name = 'yasoob'): print("now you are inside the hi2() function") def greet2(): return "now you are in the greet2() function" def welcom...
# Copyright 2013 Huawei Technologies Co.,LTD. # 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 # # Unl...
"""Various helper functions""" import base64 import binascii import io import os import uuid import urllib.parse from collections import namedtuple from wsgiref.handlers import format_date_time from . import hdrs, multidict __all__ = ['BasicAuth', 'FormData', 'parse_mimetype'] class BasicAuth(namedtuple('BasicAuth'...
# Copyright (c) 2011 matt # Copyright (c) 2011 Paul Colomiets # Copyright (c) 2011-2014 Tycho Andersen # Copyright (c) 2012 dmpayton # Copyright (c) 2012 hbc # Copyright (c) 2012 Tim Neumann # Copyright (c) 2012 uberj # Copyright (c) 2012-2013 Craig Barnes # Copyright (c) 2013 Tao Sauvage # Copyright (c) 2014 Sean Vig ...
# 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...
<<<<<<< HEAD <<<<<<< HEAD from .. import abc from .. import util from . import util as source_util importlib = util.import_importlib('importlib') importlib_abc = util.import_importlib('importlib.abc') machinery = util.import_importlib('importlib.machinery') importlib_util = util.import_importlib('importlib.util') imp...
#!/usr/bin/python # # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import os import sys import argparse import platform import socket from contrail_vrouter_provisioning import local from contrail_vrouter_provisioning.base import ContrailSetup from contrail_vrouter_provisioning.toragent.templates im...
# Allow access to command-line arguments import sys import os import subprocess import markdown import codecs import pickle # Import the core and GUI elements of Qt from PySide.QtCore import * from PySide.QtGui import * #Useful script! from send2trash import send2trash # Extra module for markdown from markdownEditor ...
# Copyright (c) 2012 NetApp, Inc. All rights reserved. # Copyright (c) 2014 Ben Swartzlander. All rights reserved. # Copyright (c) 2014 Navneet Singh. All rights reserved. # Copyright (c) 2014 Clinton Knight. All rights reserved. # Copyright (c) 2014 Alex Meade. All rights reserved. # Copyright (c) 2014 Andrew Ker...
# # 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 # ...
#coding:utf-8 # 2020-1-21 # build by qianqians # genmodule import uuid import tools def gen_module_module(module_name, funcs, dependent_struct, dependent_enum, enum): code_constructor = " class " + module_name + "_module : public Imodule, public std::enable_shared_from_this<" + module_name + "_module>{\n" ...
# 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 (c) 2010 Howard Hughes Medical Institute. # All rights reserved. # Use is subject to Janelia Farm Research Campus Software Copyright 1.1 license terms. # http://license.janelia.org/license/jfrc_copyright_1_1.html import os, sys import wx, wx.grid from pydispatch import dispatcher from inspection.inspec...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 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 import StringIO from py_vulcanize import fake_fs from py_vulcanize import generate from py_vulcanize import html_generation_contro...
import wx import os import re import time import base64 import calendar import urllib2 import urlparse import threading import feedparser from htmlentitydefs import name2codepoint from settings import settings def start_thread(func, *args): thread = threading.Thread(target=func, args=args) thread.setDaemon(Tru...
''' Functions for helping with serialization and deserialization of Bokeh objects. Certain NunPy array dtypes can be serialized to a binary format for performance and efficiency. The list of supported dtypes is: {binary_array_types} ''' from __future__ import absolute_import import logging log = logging.getLogger(_...
# FUZZY LOGIC # # (C) 2012-2013 by Daniel Nyga (nyga@cs.tum.edu) # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy,...
import envelopes import envelopes.connstack from flask import Flask import flask import hmac import json import logging import os import os.path import rollbar import rollbar.contrib.flask import sha app = Flask(__name__) logging.basicConfig(level=logging.INFO) @app.before_first_request def init_rollbar(): """C...
try: from StringIO import StringIO except ImportError: from io import StringIO import sys import json import os.path import re import networkx as nx from ndlib.models.CompositeModel import CompositeModel __author__ = 'Giulio Rossetti' __license__ = "BSD-2-Clause" __email__ = "giulio.rossetti@gmail.com" class...
#Copyright 2015 Daniel Gusenleitner, Stefano Monti #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 t...
# 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...
# # 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 m...
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-10-19 08:07 from __future__ import unicode_literals from decimal import Decimal from django.conf import settings import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion import uuid class Migrati...
#!/usr/bin/env python """This module implements User managers and Access control managers. These are concrete implementations of the classes defined in access_control.py: AccessControlManager Classes: NullAccessControlManager: Gives everyone full access to everything. BasicAccessControlManager: Provides basic Adm...
"""This class extends pexpect.spawn to specialize setting up SSH connections. This adds methods for login, logout, and expecting the shell prompt. $Id: pxssh.py 513 2008-02-09 18:26:13Z noah $ """ from pexpect import * import pexpect import time __all__ = ['ExceptionPxssh', 'pxssh'] # Exception classes used by this...
from django.db import models from django.contrib.auth.models import User import random import string import plistlib from xml.parsers.expat import ExpatError import base64 import bz2 from datetime import datetime import watson def GenerateKey(): key = ''.join(random.choice(string.ascii_lowercase + string.digits) f...
# copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of astroid. # # astroid 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 F...
#!/usr/bin/python # import sys from collections import deque import os import time import mxnet as mx import numpy as np import random from utilities import * import logging logging.basicConfig(level=logging.DEBUG) import gym ITER_SUM_SIZE = 32 LEARNING_BATCH_SIZE = 8 REPLAY_SIZE = 256 INITIAL_EPSILON = 0.5 FINAL_EP...
"""Code for computing window functions with ibis and pandas.""" import operator import re from typing import Any, Callable, List, NoReturn, Optional, Union import pandas as pd import toolz from multipledispatch import Dispatcher from pandas.core.groupby import SeriesGroupBy import ibis.common.exceptions as com impor...
# 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...
"""Array printing function $Id: arrayprint.py,v 1.9 2005/09/13 13:58:44 teoliphant Exp $ """ from __future__ import division, absolute_import, print_function __all__ = ["array2string", "set_printoptions", "get_printoptions"] __docformat__ = 'restructuredtext' # # Written by Konrad Hinsen <hinsenk@ere.umontreal.ca> ...
#!/usr/bin/env python # # Copyright 2009 Facebook # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
from __future__ import absolute_import import logging from typing import Any, Dict, List, Set, Tuple, Optional, Text from django.contrib.auth.backends import RemoteUserBackend from django.conf import settings from django.http import HttpResponse import django.contrib.auth from django_auth_ldap.backend import LDAPBac...
# # 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 logging import socket import subprocess import time import json import struct import os from adapter import Adapter DROIDBOT_APP_REMOTE_ADDR = "tcp:7336" DROIDBOT_APP_PACKAGE = "io.github.ylimit.droidbotapp" DROIDBOT_APP_PACKET_HEAD_LEN = 6 ACCESSIBILITY_SERVICE = DROIDBOT_APP_PACKAGE + "/io.github.privacystrea...
#!/usr/bin/env python # -*- coding: utf-8 -*- # CAVEAT UTILITOR # # This file was automatically generated by TatSu. # # https://pypi.python.org/pypi/tatsu/ # # Any changes you make to it will be overwritten the next time # the file is generated. from __future__ import print_function, division, absolute_import, un...
# # Copyright 2014-2016 Vinay Vasista, Ravi Teja Mullapudi, Uday Bondhugula, # and others from Multicore Computing Lab, Department of Computer Science # and Automation, Indian Institute of Science # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with ...
import six import pytest import io from punch import replacer def file_like(file_content): if six.PY2: return io.StringIO(unicode(file_content)) # NOQA else: return io.StringIO(file_content) def test_replace_content_without_config(): with pytest.raises(TypeError): replacer.Rep...
#!/usr/bin/env python """ @package ion.agents.platform.test.test_platform_agent @file ion/agents/platform/test/test_platform_agent.py @author Carlos Rueda @brief Test cases for platform agent interacting with CI RSN OMS Simulator """ __author__ = 'Carlos Rueda' # See base class BaseIntTestPlatform (base_test_p...
import weakref from collections import OrderedDict from collections.abc import MutableMapping import h5py import numpy as np from packaging.version import Version class Dimensions(MutableMapping): def __init__(self, group): self._group_ref = weakref.ref(group) self._objects = OrderedDict() @...
# -*- coding: utf-8 -*- import json import re import datetime import scrapy import platform from pixiv_hot.items import PixivItem, BigImage from scrapy.utils.project import get_project_settings class ImageCrawler(scrapy.Spider): name = "pixiv" max_page = 5 current = 1 url_list = [] _cookie...
# 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 _Framework.CompoundComponent import CompoundComponent from _Framework.Control import ButtonControl, control_list from _Framework.ControlSurfaceComponent import ControlSurfaceComponent from _Framework.DisplayDataSource import DisplayDataSource from _Framework.Util import in_range, clamp from _Framework import Task...
from __future__ import unicode_literals import datetime import pickle from decimal import Decimal from operator import attrgetter from django.core.exceptions import FieldError from django.contrib.contenttypes.models import ContentType from django.db.models import Count, Max, Avg, Sum, StdDev, Variance, F, Q from djan...
# -*- 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): db.delete_column('contacts_and_people_personlite', 'title_backup_id') # Renaming column for 'PersonLite.titl...
""" Limit Class for url-fetch """ from ...iso8601 import * from ...jsonval import * from ...jqfilter import * from ...psjson import * from ...pstime import * from ...psurl import * DATA_VALIDATOR = { "type": "object", "properties": { "url": { "$ref": "#/pScheduler/URL" }, "url-transform": { "...
import os import errno import importlib.machinery import py_compile import shutil import unittest import tempfile from test import support import modulefinder TEST_DIR = tempfile.mkdtemp() TEST_PATH = [TEST_DIR, os.path.dirname(tempfile.__file__)] # Each test description is a list of 5 items: # # 1. a module name t...
import numpy as np from nanocut.common import EPSILON from nanocut.output import error, printstatus class Geometry: """Class for handling crystal structure, containing unit-cell-vectors, atom coordinates and names of atoms.""" def __init__(self, latvecs, basis, basis_names_idx, basis_names, ...
#!/usr/bin/env python # Require python3 import os, sys, random from PIL import Image # Docs at http://pillow.readthedocs.org/index.html import numpy as np import math as m import statistics as s try: k_value = 3 if sys.argv[1][0] == "-": skip_opap = "O" in sys.argv[1] reversing = "R" in sys.a...
from django_tables2 import SingleTableView, RequestConfig from defcdb.models import ( Site, Area, Finds, DC_chronological_system, ResearchEvent, DC_researchevent_institution) from defcdb.models import Interpretation from .filters import ( SiteListFilter, AreaListFilter, FindsListFilter, ResearchEventListFil...
#!/usr/bin/env python # 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 "Licen...
# Finding coefficients in ranking algorithm by comparing results to actual ranking # Improvements to make # 1) use enumerate to remove arguments from functions. # 2) *Consider exercises that were completed more often to be easier and others more difficult (a lot of error here).* # 3) Implement householder QR decomp...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 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.apach...
#!/usr/bin/env python # # 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 # "...
from __future__ import print_function import enum import pprint class ArrayFlag(enum.IntEnum): Scalar = 0x00 VarSizeArray = 0x01 BoundSizeArray = 0x02 FixedSizeArray = 0x03 def __str__(self): return self.name class DataFlag(enum.IntEnum): # Boolean Boolean = 0 # Integer ...
import os.path as op from pathlib import Path import re import numpy as np from numpy.testing import (assert_array_almost_equal, assert_equal, assert_allclose, assert_array_equal, assert_array_less) from scipy import sparse import pytest import copy import mne fr...
#!/usr/bin/env python3 # # Copyright (c) 2017 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 # # vim: ai:ts=4:sw=4 import sys import pprint def read_until(line, fd, end): out = [line] while True: idx = line.find(end) if idx < 0: line = clean_line(fd.readline(), fd) ...
#!/usr/bin/python2.5 # # Copyright 2012 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 requir...
from core.models.goal import Goal as TheModel import re from datetime import datetime as dt, timedelta as td class Goal: @staticmethod def _group_by_family(goal_iterable): goal_family_subset_list = [] augmented_goal_list = [] # add picked flag to each goal for goal in goal_iter...
# -*- coding: utf-8 -*- """ Sahana Eden Delphi Decision Maker Model @copyright: 2009-2013 (c) Sahana Software Foundation @license: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the ...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed unde...
# -*- coding: utf-8 -*- """Helper for interacting with git.""" from __future__ import unicode_literals import os from l2tdevtools.review_helpers import cli class GitHelper(cli.CLIHelper): """Git command helper.""" def __init__(self, git_repo_url): """Initializes a git helper. Args: git_repo_url...
# Natural Language Toolkit: Glue Semantics # # Author: Dan Garrette <dhgarrette@gmail.com> # # Copyright (C) 2001-2017 NLTK Project # URL: <http://nltk.org/> # For license information, see LICENSE.TXT from __future__ import print_function, division, unicode_literals import os from itertools import chain from six impo...
#!/usr/bin/env python # Copyright (c) 2014 Sergey Bunatyan <sergey.bunatyan@gmail.com> # # 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 # # Un...
from itertools import izip, imap from copy import deepcopy missing = object() class odict(dict): """ Ordered dict example implementation. This is the proposed interface for a an ordered dict as proposed on the Python mailinglist (proposal_). It's a dict subclass and provides some list functions....
# Copyright 2013 Google Inc. All Rights Reserved. """Config for Google Cloud Platform CLIs.""" import json import os from googlecloudsdk.core import exceptions from googlecloudsdk.core.util import files as file_utils from googlecloudsdk.core.util import platforms class Error(Exception): """Exceptions for the cl...
# Copyright 2015 TellApart, 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 writi...
""" Convolutional Neural Network for kaggle facial keypoints detection contest. Note: Only the labels contain missing values in all of the data. """ # THEANO_FLAGS=mode=FAST_RUN,device=cpu,floatX=float32 python CNN.py from __future__ import division, print_function import time import theano import lasagne import log...
# 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 json from django.core.urlresolvers import reverse from django.http import Http404, HttpResponse from django.shortcuts import render, get_object_or_404, redirect from django.template import loader, Context from django.contrib.auth.decorators import login_required from django.contrib import messages from django....
import sys import pytest from pytest_django.lazy_django import get_django_version from pytest_django_test.db_helpers import (db_exists, drop_database, mark_database, mark_exists, skip_if_sqlite_in_memory) skip_on_python32 = pytest....
from django.db import connection, transaction from django.db.models import signals, get_model from django.db.models.fields import AutoField, Field, IntegerField, PositiveIntegerField, PositiveSmallIntegerField, get_ul_class, FieldDoesNotExist from django.db.models.related import RelatedObject from django.db.models.quer...
""" This module contains the 'base' GEOSGeometry object -- all GEOS Geometries inherit from this object. """ import re from ctypes import addressof, byref, c_double from django.contrib.gis import gdal from django.contrib.gis.geometry.regex import hex_regex, json_regex, wkt_regex from django.contrib.gis.geos import p...
import numpy as np from numpy.testing import (assert_equal, assert_array_equal, assert_array_almost_equal, assert_raises) from dipy.align import floating from dipy.align import expectmax as em def test_compute_em_demons_step_2d(): r"...
# Copyright 2014 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 or agreed to in writing, ...