text
stringlengths
475
200k
# 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 f...
# Copyright (c) 2007-2008 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 imp...
# -*- coding: utf-8 -*- from south.v2 import SchemaMigration class Migration(SchemaMigration): # # cdodge: This is basically an empty migration since everything has - up to now - managed in the django_comment_client app # But going forward we should be using this migration # def forwards(self, orm): pass ...
# (c) 2016 Red Hat Inc. # # 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 # (at your option) any later version. # # Ansible is dis...
""" Utility functions to return a formatted name and description for a given view. """ from __future__ import unicode_literals import re from django.utils.encoding import force_text from django.utils.html import escape from django.utils.safestring import mark_safe from rest_framework.compat import apply_markdown d...
"""SocksiPy - Python SOCKS module. Version 1.00 Copyright 2006 Dan-Haim. 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 ...
""" simplified test for continulet without checking for partial writes to enable continulets you only need to call uwsgi_pypy_setup_continulets() soon after startup: uwsgi --pypy-wsgi-file t/pypy/t_continulet1.py --http-socket :9090 --pypy-home /opt/pypy --pypy-eval "uwsgi_pypy_setup_continulets()" --async 8 """ imp...
from django.conf import settings from django.contrib.sessions.backends.base import CreateError, SessionBase from django.core.cache import caches from django.utils.six.moves import range KEY_PREFIX = "django.contrib.sessions.cache" class SessionStore(SessionBase): """ A cache-based session store. """ ...
"""wrapper for libmpq""" # 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. # # This program is distributed in the hope th...
""" Django ORM model specifications for the User API application """ from django.contrib.auth.models import User from django.core.validators import RegexValidator from django.db import models from django.db.models.signals import post_delete, pre_save, post_save from django.dispatch import receiver from model_utils.mode...
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ The astropy.time package provides functionality for manipulating times and dates. Specific emphasis is placed on supporting time scales (e.g. UTC, TAI, UT1) and time representations (e.g. JD, MJD, ISO 8601) that are used in astr...
# (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import os from datadog_checks.base.utils.common import get_docker_hostname HERE = os.path.dirname(os.path.abspath(__file__)) # Networking HOST = get_docker_hostname() GITLAB_TEST_TOKEN = "ddtesttoken"...
from django.core.urlresolvers import reverse from django.db import models from django.db.models import QuerySet from django.db.models.manager import BaseManager from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Artist(models.Model): name = models.CharField(max_length...
#!/usr/bin/env python3 import os, glob, sys import numpy as np from scipy.optimize import fmin out_form="The output is #latox, latoy, latoz, latot, beta and then\n" out_form+="i, <Q^2>/vol, b_2, b_4, k_1/vol, k_2/vol, k_3/vol, k_4/vol, <Q Q_{noncool}>/<Q^2> \n" out_form+="where Q=top. charge after i*cooling and k_n a...
# -*- coding: utf-8 -*- """ End-to-end tests for LibraryContent block in LMS """ import ddt import textwrap from nose.plugins.attrib import attr from ..helpers import UniqueCourseTest, TestWithSearchIndexMixin from ...pages.studio.auto_auth import AutoAuthPage from ...pages.studio.overview import CourseOutlinePage fro...
from . import widget from browser import html, document class Dialog(widget.DraggableWidget): def __init__(self, id=None): self._div_shell=html.DIV( Class="ui-dialog ui-widget ui-widget-content ui-corner-all ui-front ui-draggable ui-resizable", style={'position': 'absolute', 'height': 'auto',...
# -*- coding: utf-8 -*- """ pygments.lexers.trafficscript ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexer for RiverBed's TrafficScript (RTS) language. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexe...
#Python 2.7.9 (default, Apr 5 2015, 22:21:35) import sys, os # file with raw classifications (csv) # put this way up here so if there are no inputs we exit quickly before even trying to load everything else try: classfile_in = sys.argv[1] except: #classfile_in = 'data/2e3d12a2-56ca-4d1f-930a-9ecc7fd39885.csv'...
#!/usr/bin/env python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Combines the javascript files needed by jstemplate into a single file.""" import httplib import urllib def main(): srcs = [...
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- #------------------------------------------------------------------- # tarfile.py #------------------------------------------------------------------- # Copyright (C) 2002 Lars Gustäbel <[EMAIL]> # All rights reserved. # # Permission is hereby granted, free of char...
# 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,...
# 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 datetime import logging import os import random import shutil import sys import tempfile from py_utils import cloud_storage # pylint: disable=import...
class Set: def __init__(self): self.name = "" self.code = "" self.code_magiccards = "" self.is_promo = False self.date = "" def setName(self, name): self.name = name def getName(self, name): return self.name def setCode(self, code): sel...
#!/usr/bin/python """ Copyright 2013 Google Inc. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. Calulate differences between image pairs, and store them in a database. """ import contextlib import csv import logging import os import re import shutil import sys impo...
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
# Copyright (C) 2001-2006 Python Software Foundation # Author: Ben Gertzfield # Contact: [EMAIL] """Quoted-printable content transfer encoding per RFCs 2045-2047. This module handles the content transfer encoding method defined in RFC 2045 to encode US ASCII-like 8-bit data called `quoted-printable'. It is used to s...
from __future__ import unicode_literals import os import sys from subprocess import PIPE, Popen from django.utils import six from django.utils.encoding import DEFAULT_LOCALE_ENCODING, force_text from .base import CommandError def popen_wrapper(args, os_err_exc_type=CommandError, universal_newlines=True): """ ...
# -*- coding: utf-8 -*- """ Created on Thu May 12 12:34:57 2016 @author: okada $Id: convert.py 208 2017-08-16 06:16:25Z aokada $ """ import paplot.subcode.tools as tools def prohibition(text): import re new_text = re.sub(r'[\'"/;:\[\] ]', "_", text) if re.match(r'^[0-9]', new_text): new_text = "_...
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class CandleBenchmarks(Package): """ECP-CANDLE Benchmarks""" homepage = "https://github.com...
''' Create GCE resources for use in integration tests. Takes a prefix as a command-line argument and creates two persistent disks named ${prefix}-base and ${prefix}-extra and a snapshot of the base disk named ${prefix}-snapshot. prefix will be forced to lowercase, to ensure the names are legal GCE resource names. ''' ...
#!/usr/bin/env python # # Copyright 2008-2009 Jose Fonseca # # This program 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, either version 3 of the License, or # (at your option) any later version. # # ...
# Copyright 2021 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from django.test import TestCase from django.test.client import Client from django.test.utils import override_settings import simplejson as json from spotseeker_server.models import Spot, SpotExtendedInfo from spotseeker_server.org_...
from rest_framework import decorators, permissions, status from rest_framework.renderers import JSONPRenderer, JSONRenderer, BrowsableAPIRenderer from rest_framework.response import Response import json import requests from django.conf import settings from django.core.cache import cache from django.shortcuts import g...
""" Helper methods for push notifications from Studio. """ from uuid import uuid4 from django.conf import settings from logging import exception as log_exception from contentstore.tasks import push_course_update_task from contentstore.models import PushNotificationConfig from xmodule.modulestore.django import modules...
#!/bin/python3 """ Primitive calculator Given ops *3, *2, +1, what is the fewest ops to reach n from 1? """ import os import sys def main(): sequence = optimal_sequence_linear(int(input())) print(len(sequence) - 1) print(*sequence) def optimal_sequence_linear(n): """ Solve by calculating min-st...
# Copyright (c) 2012 Rackspace Hosting # 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 req...
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2015 Thomas Voegtlin # # 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...
''' This module provides a newnext() function in Python 2 that mimics the behaviour of ``next()`` in Python 3, falling back to Python 2's behaviour for compatibility if this fails. ``newnext(iterator)`` calls the iterator's ``__next__()`` method if it exists. If this doesn't exist, it falls back to calling a ``next()`...
# -*- 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...
from _pydev_bundle import pydev_log import traceback from _pydevd_bundle import pydevd_extension_utils from _pydevd_bundle import pydevd_resolver import sys from _pydevd_bundle.pydevd_constants import dict_iter_items, dict_keys, IS_PY3K, \ BUILTINS_MODULE_NAME, MAXIMUM_VARIABLE_REPRESENTATION_SIZE, RETURN_VALUES_DI...
#! /usr/bin/env python from __future__ import print_function from openturns import * TESTPREAMBLE() RandomGenerator.SetSeed(0) try: # We create a numerical math function myFunction = NumericalMathFunction( ('E', 'F', 'L', 'I'), ('y',), ('-F*L^3/(3.*E*I)',)) dim = myFunction.getInputDimension() ...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 ~ 2012 Deepin, Inc. # 2011 ~ 2012 Hai longqiu. # # Author: Hai longqiu <[EMAIL]> # Maintainer: Hai longqiu <[EMAIL]> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General P...
# -*- 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...
import os import sys from distutils.sysconfig import get_python_lib from setuptools import find_packages, setup # Warn if we are installing over top of an existing installation. This can # cause issues where files that were deleted from a more recent Django are # still present in site-packages. See #18115. overlay_wa...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe import _, throw import frappe.utils.user from frappe.permissions import check_admin_or_system_manager from frappe.model.db_schema import type_map def...
# 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 ...
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2017-03-09 16:05 from __future__ import unicode_literals from django.db import migrations, models import django_extensions.db.fields.json import functools import instance.models.utils class Migration(migrations.Migration): dependencies = [ ('instan...
#!/usr/bin/env python2.7 # -*- coding: utf-8 -* # Author: Nic Wolfe <[EMAIL]> # URL: http://code.google.com/p/sickbeard/ # # Rewrite Author: miigotu <[EMAIL]> # URL: https://sickrage.github.io # # This file is part of SickRage. # # SickRage is free software: you can redistribute it and/or modify # it under the terms of...
"""SCons.Tool.suncc Tool-specific initialization for Sun Solaris (Forte) CC and cc. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010...
#!/usr/bin/python # # Sched-credit tests modified from SEDF tests # import re from XmTestLib import * paramsRE = re.compile(r'^[^ ]* *[^ ]* *([^ ]*) *([^ ]*)$') def get_sched_credit_params(domain): status, output = traceCommand("xm sched-credit -d %s | tail -1" % domain.getName...
# Copyright 2013 Google Inc. All Rights Reserved. """Tests for utils.py.""" import unittest from protorpc import messages from . import utils class UtilsTests(unittest.TestCase): """Comprehensive test for the endpoints_proto_datastore.utils module.""" def testIsSubclass(self): """Tests the utils.IsSubcl...
# -*-coding:Utf-8 -* # Copyright (c) 2010 LE GOFF Vincent # 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 # l...
# Copyright 2010 Jacob Kaplan-Moss # # 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 writ...
# Copyright 2015, 2017 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/LICENSE-2.0 # # Unless require...
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """Implementations of unittest features from the future.""" # Use unittest2 if it's available, otherwise unittest. This gives us # back-ported features for 2.6. t...
"""text and font classes, helps everyone to text""" import pygame, pygame.font, gfx #old versions of SysFont were buggy if pygame.ver <= '1.6.1': from mysysfont import SysFont else: SysFont = pygame.font.SysFont FontPool = {} def initialize(): pygame.font.init() return 1 class Font: def __i...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP S.A. (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the term...
""" We're using snmpsim to simulate various target devices for our tests. Before we do anything, we should probably make sure it's actually running """ import pytest from subprocess import run, PIPE SNMP_TEST_SRV_HOST = '127.0.0.1:10000' SYSDESCR_OID = '.1.3.6.1.2.1.1.1.0' @pytest.fixture(scope="session", autouse=...
import errno import os import tempfile from django.conf import settings from django.contrib.sessions.backends.base import SessionBase, CreateError from django.core.exceptions import SuspiciousOperation, ImproperlyConfigured class SessionStore(SessionBase): """ Implements a file based session store. """ ...
#!/usr/bin/python # Author: Zion Orent <[EMAIL]> # Copyright (c) 2015 Intel Corporation. # # 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 "BSD license"] # Copyright (c) 2013 Terence Parr # Copyright (c) 2013 Sam Harwell # Copyright (c) 2014 Eric Vergnaud # 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. Redistr...
from warnings import warn from pyimzml.ontology.ontology import lookup_and_convert_cv_param, convert_xml_value, convert_term_name XMLNS_PREFIX = "{http://psi.hupo.org/ms/mzml}" def _deep_pretty(obj): if isinstance(obj, list): return [_deep_pretty(item) for item in obj] if isinstance(obj, dict): ...
""" Management command `manage_group` is used to idempotently create Django groups and set their permissions by name. """ from django.apps import apps from django.contrib.auth.models import Group, Permission from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ValidationError f...
# -*- coding: utf-8 -*- # # Copyright (C) 2009-2010 Per Arneng <[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 2 of the License, or # (at your option) ...
import os import csv class Reader(object): """ This is an abstract class and not to be used as is. Expects the text files start with a header """ INPUT_DELIMITER='\t' OUTPUT_DELIMITER='\t' def __init__(self, filename=None): self._filename=filename self._filehandle=None...
import pandas_vectors as pv import pandas as pd import numpy as np import unittest class PvTest(unittest.TestCase): def test_indexer(self): self.assertListEqual(pv.indexer('a'), ['a_x', 'a_y', 'a_z']) self.assertListEqual(pv.indexer(['a']), ['a_x', 'a_y', 'a_z']) self.assertListEqual(pv.in...
# Generated by Django 2.2.9 on 2020-01-22 13:47 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('scanners', '0020_auto_20200116_1250'), ] operations = [ migrations.AlterField( model_name='scannerqueryresult', name...
import re from tower import ugettext_lazy as _lazy from tower import ugettext as _ from django import forms from django.conf import settings from django.forms.widgets import CheckboxSelectMultiple from kuma.contentflagging.forms import ContentFlagForm import kuma.wiki.content from kuma.core.form_fields import Strip...
""" Common tools used by plugins implementing search plugin api """ from __future__ import unicode_literals, division, absolute_import import re from unicodedata import normalize from flexget.utils.titles.parser import TitleParser def clean_symbols(text): """Replaces common symbols with spaces. Also normalize un...
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright 2002 Ben Escoto <[EMAIL]> # Copyright 2007 Kenneth Loafman <[EMAIL]> # # This file is part of duplicity. # # Duplicity is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the...
""" Testing mio5_utils Cython module """ from __future__ import division, print_function, absolute_import import sys from io import BytesIO cStringIO = BytesIO import numpy as np from nose.tools import (assert_true, assert_equal, assert_raises) from numpy.testing import (assert_array_equal, run_module_suite) fro...
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, [EMAIL] # import unittest from ...compatibility import StringIO from ..helperfunctions import _xml_to_list from ...workbook import Workbook class TestAssembleWorkbook...
"""Test script for the binhex C module Uses the mechanism of the python binhex module Based on an original test by Roger E. Masse. """ import binhex import os import unittest from test import support class BinHexTestCase(unittest.TestCase): def setUp(self): self.fname1 = support.TESTFN + "1" ...
# Generated by Django 2.2.4 on 2019-08-27 22:02 from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import model_utils.fields class Migration(migrations.Migration): initial = True dependencies = [ ('conferences', '0007_auto_20190811_1953'), ] ...
#!/usr/bin/env python # Copyright (C) 2009-2014: # Gabes Jean, [EMAIL] # Gerhard Lausser, [EMAIL] # # This file is part of Shinken. # # Shinken 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 Foundation, eith...
''' Float Layout ============ :class:`FloatLayout` honors the :attr:`~kivy.uix.widget.Widget.pos_hint` and the :attr:`~kivy.uix.widget.Widget.size_hint` properties of its children. .. only:: html .. image:: images/floatlayout.gif :align: right .. only:: latex .. image:: images/floatlayout.png ...
# 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]> # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see C...
""" This module defines export functions for decision trees. """ # Authors: Gilles Louppe <[EMAIL]> # Peter Prettenhofer <[EMAIL]> # Brian Holt <[EMAIL]> # Noel Dawe <[EMAIL]> # Satrajit Gosh <[EMAIL]> # Trevor Stephens <[EMAIL]> # License: BSD 3 clause import numpy as np ...
# 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 ...
#! /usr/bin/env bash # # Copyright (C) 2013-2017 Bilibili # Copyright (C) 2013-2017 Zhang Rui <[EMAIL]> # # 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...
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # 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, modi...
import numpy as np from sklearn.linear_model import LogisticRegression from sklearn.datasets import make_blobs from sklearn.utils.class_weight import compute_class_weight from sklearn.utils.class_weight import compute_sample_weight from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testin...
#!/usr/bin/python # 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 # (at your option) any later version. # # Ansible is distributed...
# # Proximate - Peer-to-peer social networking # # Copyright (c) 2008-2011 Nokia Corporation # # All rights reserved. # # This software is licensed under The Clear BSD license. # See the LICENSE file for more details. # from gobject import timeout_add_seconds from datetime import datetime, timedelta from os import list...
# 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...
import json, errno from twisted.web.resource import Resource, NoResource, ErrorPage class SlydJsonResource(Resource): """Base Resource for Slyd Resources This sets the content type to JSON and handles errors """ def render(self, request): request.setResponseCode(200) request.setHeade...
# -*- coding: utf-8 -*- """ pygments.styles.manni ~~~~~~~~~~~~~~~~~~~~~ A colorful style, inspired by the terminal highlighting style. This is a port of the style used in the `php port`_ of pygments by Manni. The style is called 'default' there. :copyright: Copyright 2006-2013 by the Pygments...
""" PLN Simple Deduction Agent Example Demonstrates the simplest possible forward inference agent that implements a chainer with one inference rule and one link type For instructions, refer to the README for PLN. """ from opencog.cogserver import MindAgent from opencog.atomspace import types from pln.chainers import...
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from textwrap import dedent from pants.backend.codegen.thrift.java.java_thrift_library import JavaThriftLibrary from pants.backend.graph_info.tasks.dependees import ReverseDepmap from pan...
""" Acceptance tests for Studio related to edit/save peer grading interface. """ from ...fixtures.course import XBlockFixtureDesc from ...pages.studio.import_export import ExportCoursePage from ...pages.studio.component_editor import ComponentEditorView from ...pages.studio.overview import CourseOutlinePage from base_...
# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # 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 restrict...
# Pretty-printer utilities. # Copyright (C) 2010-2014 Free Software Foundation, 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 License, or # (at your option) any l...
from __future__ import print_function ######################################################################################################################################################################### # Author: Raphael Maurin, [EMAIL] # 24/11/2017 # # Reproduce the experimental comparison of Maurin et al (2015),...
""" The :mod:`sklearn.decomposition` module includes matrix decomposition algorithms, including among others PCA, NMF or ICA. Most of the algorithms of this module can be regarded as dimensionality reduction techniques. """ from .nmf import NMF, ProjectedGradientNMF from .pca import PCA, RandomizedPCA from .incrementa...
# Copyright 2011 James McCauley # Copyright 2008 (C) Nicira, 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 ap...
# -*- coding: utf-8 -*- ## ## ## This file is part of Indico. ## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN). ## ## Indico 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 2014 Cisco Systems,Inc. # # Author: Pradeep Kilambi <[EMAIL]> # # 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 ...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Vincent Renaville # Copyright 2013 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # p...
# (c) 2012-2014, Michael DeHaan <[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 # (at your option) any later version. ...