repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
kerr-huang/SL4A
refs/heads/master
python/src/Demo/zlib/zlibdemo.py
43
#!/usr/bin/env python # Takes an optional filename, defaulting to this file itself. # Reads the file and compresses the content using level 1 and level 9 # compression, printing a summary of the results. import zlib, sys def main(): if len(sys.argv) > 1: filename = sys.argv[1] else: filename ...
kaffeel/oppia
refs/heads/develop
extensions/interactions/CodeRepl/CodeRepl.py
4
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
carlvlewis/bokeh
refs/heads/master
bokeh/charts/builder/tests/test_bar_builder.py
33
""" This is the Bokeh charts testing interface. """ #----------------------------------------------------------------------------- # Copyright (c) 2012 - 2014, Continuum Analytics, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with thi...
eusi/MissionPlanerHM
refs/heads/master
Lib/site-packages/numpy/matrixlib/tests/test_multiarray.py
54
import numpy as np from numpy.testing import * class TestView(TestCase): def test_type(self): x = np.array([1,2,3]) assert(isinstance(x.view(np.matrix),np.matrix)) def test_keywords(self): x = np.array([(1,2)],dtype=[('a',np.int8),('b',np.int8)]) # We must be specific about the...
andmos/ansible
refs/heads/devel
test/units/modules/network/dellos9/test_dellos9_facts.py
56
# (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...
CiscoSystems/tempest
refs/heads/master
tempest/api/image/__init__.py
12133432
ChainsAutomation/chains
refs/heads/master
lib/chains/services/phidgetskit/__init__.py
1
from __future__ import absolute_import import time from Phidgets.PhidgetException import * from Phidgets.Events.Events import * from Phidgets.Services.InterfaceKit import * from chains.service import Service from chains.common import log def bint(arg): if type(arg) == type(True): if arg: return 1 ...
t4ls/ShinyServer
refs/heads/master
ext/node/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/sun_tool.py
314
#!/usr/bin/env python # Copyright (c) 2011 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """These functions are executed via gyp-sun-tool when using the Makefile generator.""" import fcntl import os import struct import subproces...
pepsi7959/ProtocolBuffer-c
refs/heads/master
gtest/test/gtest_filter_unittest.py
2826
#!/usr/bin/env python # # Copyright 2005 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...
BaconPancakes/valor
refs/heads/master
lib/pip/_vendor/requests/packages/chardet/euctwprober.py
2993
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
srajag/nova
refs/heads/master
nova/tests/virt/vmwareapi/test_imagecache.py
1
# Copyright (c) 2014 VMware, 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 a...
KunihikoKido/sublime-elasticsearch-client
refs/heads/master
commands/multiple_percolate.py
1
from .base import BaseCommand class MultiplePercolateCommand(BaseCommand): command_name = "elasticsearch:multiple-percolate" def run_request(self): options = dict( index=self.settings.index, doc_type=self.settings.doc_type, body=self.get_text() ) re...
carlmw/oscar-wager
refs/heads/master
django/contrib/localflavor/nl/nl_provinces.py
528
from django.utils.translation import ugettext_lazy as _ PROVINCE_CHOICES = ( ('DR', _('Drenthe')), ('FL', _('Flevoland')), ('FR', _('Friesland')), ('GL', _('Gelderland')), ('GR', _('Groningen')), ('LB', _('Limburg')), ('NB', _('Noord-Brabant')), ('NH', _('Noord-Holland')), ('OV', _(...
scrypter/azure-quickstart-templates
refs/heads/master
scrapy-on-ubuntu/myspider.py
255
from scrapy import Spider, Item, Field class Post(Item): title = Field() class BlogSpider(Spider): name, start_urls = 'blogspider', ['http://blog.scrapinghub.com'] def parse(self, response): return [Post(title=e.extract()) for e in response.css("h2 a::text")]
youprofit/scikit-image
refs/heads/master
skimage/novice/_novice.py
19
import os import imghdr from collections import namedtuple import numpy as np from .. import io, img_as_ubyte from ..transform import resize from ..color import color_dict from ..io.util import file_or_url_context, is_url import six from six.moves.urllib import request urlopen = request.urlopen # Convert colors from...
adlius/osf.io
refs/heads/develop
api_tests/requests/views/__init__.py
12133432
nkoech/csacompendium
refs/heads/master
csacompendium/research/api/nitrogenapplied/__init__.py
12133432
balloob/home-assistant
refs/heads/dev
tests/components/cloudflare/conftest.py
5
"""Define fixtures available for all tests.""" from pytest import fixture from . import _get_mock_cfupdate from tests.async_mock import patch @fixture def cfupdate(hass): """Mock the CloudflareUpdater for easier testing.""" mock_cfupdate = _get_mock_cfupdate() with patch( "homeassistant.componen...
aericson/Djax
refs/heads/master
example/triggermap.py
2
""" Example of trigger integration for Djax. """ from djax.triggers import trigger, affinity_trigger from example.models import Article triggers = ( trigger(r'^$','pageview','home'), affnity_trigger(r'^article/(?P<article_id>\d+)/$','affinity','article',pk='article_id',model=Article), trigger(r'^topic/(?P...
SimeonFritz/aima-python
refs/heads/master
submissions/Conklin/myCSPs.py
18
import csp rgb = ['R', 'G', 'B'] # domains = { # 'AM': rgb, # 'ES': rgb, # 'LK': rgb, # 'RB': rgb, # 'FL': rgb, # 'G': rgb, # 'S': rgb, # 'M': rgb, # 'BL': rgb, # 'C': rgb, # 'H': rgb # } domains = { 'Dragonblight': rgb, 'Borean Tundra': rgb, 'Scholozar Basin':...
dnozay/lettuce
refs/heads/master
tests/integration/lib/Django-1.3/django/conf/locale/sk/formats.py
232
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'G:i:s' DATETIME_FORMAT = 'j. F Y G:i:s' YEAR_MONTH...
petercable/mi-dataset
refs/heads/master
mi/dataset/parser/flort_dj_cspp.py
3
#!/usr/bin/env python """ @package mi.dataset.parser @file marine-integrations/mi/dataset/parser/flort_dj_cspp.py @author Jeremy Amundson @brief Parser for the flort_dj_cspp dataset driver Release notes: initial release """ __author__ = 'Jeremy Amundson' __license__ = 'Apache 2.0' import numpy fro...
SimVascular/VTK
refs/heads/master
Accelerators/Piston/Testing/Python/TestSlice.py
21
#!/usr/bin/env python """ This tests VTK's use of Piston's slice operator. """ import sys import vtk from vtk.test import Testing from PistonTestCommon import * def widgetCallBack(obj,event): global plane, filter obj.GetPlane(plane) filter.Update() #TODO: Why is this necessary? class TestSlice(Testi...
ZhaoCJ/django
refs/heads/master
tests/sites_framework/models.py
115
from django.contrib.sites.managers import CurrentSiteManager from django.contrib.sites.models import Site from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class AbstractArticle(models.Model): title = models.CharField(max_length=50) objects...
kanagasabapathi/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/logging/config.py
45
# Copyright 2001-2010 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
apixandru/intellij-community
refs/heads/master
python/testData/addImport/ignoreImportedAsModule.after.py
35
import numpy import numpy as np np.ones(3) numpy.asarray([1,2,3]) # <-- invoke qfix here
tgsmith61591/pyramid
refs/heads/master
pmdarima/preprocessing/__init__.py
1
# -*- coding: utf-8 -*- from .base import * from .endog import * from .exog import * __all__ = [s for s in dir() if not s.startswith("_")]
crosswalk-project/chromium-crosswalk-efl
refs/heads/efl/crosswalk-10/39.0.2171.19
tools/telemetry/telemetry/core/backends/webdriver/webdriver_tab_backend.py
33
# Copyright 2013 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 from telemetry.core import bitmap class WebDriverTabBackend(object): def __init__(self, browser_backend, window_handle): self._browse...
laborautonomo/youtube-dl
refs/heads/master
youtube_dl/extractor/vimeo.py
4
# encoding: utf-8 from __future__ import unicode_literals import json import re import itertools from .common import InfoExtractor from .subtitles import SubtitlesInfoExtractor from ..utils import ( compat_HTTPError, compat_urllib_parse, compat_urllib_request, clean_html, get_element_by_attribute,...
liikGit/MissionPlanner
refs/heads/master
Lib/io.py
53
"""The io module provides the Python interfaces to stream handling. The builtin open function is defined in this module. At the top of the I/O hierarchy is the abstract base class IOBase. It defines the basic interface to a stream. Note, however, that there is no separation between reading and writing to streams;...
astronaut1712/taiga-back
refs/heads/master
taiga/userstorage/models.py
20
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the F...
dongritengfei/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/QueueStatusServer/model/attachment.py
119
# Copyright (C) 2009 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...
hyowon/servo
refs/heads/master
tests/wpt/harness/wptrunner/config.py
196
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import ConfigParser import os import sys from collections import OrderedDict here = os.path.split(__file__)[0] class C...
kevalds51/sympy
refs/heads/master
sympy/physics/quantum/circuitutils.py
99
"""Primitive circuit operations on quantum circuits.""" from __future__ import print_function, division from sympy import Symbol, Tuple, Mul, sympify, default_sort_key from sympy.utilities import numbered_symbols from sympy.core.compatibility import reduce from sympy.physics.quantum.gate import Gate __all__ = [ ...
tmenjo/cinder-2015.1.0
refs/heads/master
cinder/api/contrib/volume_image_metadata.py
5
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
rhndg/openedx
refs/heads/master
common/djangoapps/edxmako/templatetag_helpers.py
250
from django.template import loader from django.template.base import Template, Context from django.template.loader import get_template, select_template def django_template_include(file_name, mako_context): """ This can be used within a mako template to include a django template in the way that a django-sty...
farhaanbukhsh/junction
refs/heads/master
settings/test_settings.py
4
# -*- coding: utf-8 -*-# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import os from .common import * # noqa DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(ROOT_DIR, 'test.sqlite3'), ...
marrow/mongo
refs/heads/develop
marrow/mongo/core/__init__.py
1
# encoding: utf-8 from __future__ import unicode_literals from .release import version as __version__ from .field import Field from .index import Index from .document import Document __all__ = ['__version__', 'Field', 'Index', 'Document']
demarle/VTK
refs/heads/master
ThirdParty/Twisted/twisted/conch/error.py
67
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ An error to represent bad things happening in Conch. Maintainer: Paul Swartz """ from twisted.cred.error import UnauthorizedLogin class ConchError(Exception): def __init__(self, value, data = None): Exception.__init__(self, va...
shubhdev/edx-platform
refs/heads/master
common/__init__.py
12133432
mammique/django
refs/heads/tp_alpha
tests/regressiontests/test_runner/__init__.py
12133432
jamesls/boto
refs/heads/develop
tests/integration/elasticache/__init__.py
12133432
wikiteams/github-gender-studies
refs/heads/master
sources/gender_api/__init__.py
12133432
kaedroho/wagtail
refs/heads/master
wagtail/admin/signal_handlers.py
6
from wagtail.admin.mail import ( GroupApprovalTaskStateSubmissionEmailNotifier, WorkflowStateApprovalEmailNotifier, WorkflowStateRejectionEmailNotifier, WorkflowStateSubmissionEmailNotifier) from wagtail.core.models import TaskState, WorkflowState from wagtail.core.signals import ( task_submitted, workflow_...
commshare/APE_Server
refs/heads/master
deps/js/src/tests/manifest.py
7
# Library for JSTest manifests. # # This includes classes for representing and parsing JS manifests. import os, re, sys from subprocess import * from tests import TestCase class XULInfo: def __init__(self, abi, os, isdebug): self.abi = abi self.os = os self.isdebug = isdebug def as_j...
libvirt/autotest
refs/heads/master
client/virt/virt_video_maker.py
9
""" Video Maker transforms screenshots taken during a test into a HTML 5 compatible video, so that one can watch the screen activity of the whole test from inside your own browser. This relies on generally available multimedia libraries, frameworks and tools. """ import os, time, glob, logging __all__ = ['GstPytho...
sachinpro/sachinpro.github.io
refs/heads/master
tensorflow/python/ops/histogram_ops_test.py
10
# Copyright 2015 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 a...
ThiagoGarciaAlves/intellij-community
refs/heads/master
python/testData/testRunner/env/createConfigurationTest/test_with_src/foo/src/test_test.py
30
def test_test(): pass
yuruofeifei/mxnet
refs/heads/master
example/neural-style/nstyle.py
52
# 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...
caot/intellij-community
refs/heads/master
python/testData/mover/insideDocComment.py
80
def fcn(self, foo, bar): """ :type <caret>foo: int :type bar: str """ self.foo = foo self.bar = bar
bak1an/django
refs/heads/master
tests/i18n/utils.py
75
import os import re import shutil import tempfile source_code_dir = os.path.dirname(__file__) def copytree(src, dst): shutil.copytree(src, dst, ignore=shutil.ignore_patterns('__pycache__')) class POFileAssertionMixin: def _assertPoKeyword(self, keyword, expected_value, haystack, use_quotes=True): ...
CVML/pybrain
refs/heads/master
pybrain/rl/environments/mazes/polarmaze.py
25
__author__ = 'Tom Schaul, tom@idsia.ch' from scipy import zeros from random import choice, random from .maze import Maze class PolarMaze(Maze): """ Mazes with the emphasis on Perseus: allow him to turn, go forward or backward. Thus there are 4 states per position. """ actions = 5 Stay = 0 ...
evaautomation/findutils
refs/heads/master
build-aux/src-sniff.py
5
#! /usr/bin/env python # src-sniff.py: checks source code for patterns that look like common errors. # Copyright (C) 2007, 2010, 2011 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 Fr...
tysonclugg/django
refs/heads/master
django/contrib/gis/db/models/__init__.py
123
from django.db.models import * # NOQA isort:skip from django.db.models import __all__ as models_all # isort:skip import django.contrib.gis.db.models.functions # NOQA import django.contrib.gis.db.models.lookups # NOQA from django.contrib.gis.db.models.aggregates import * # NOQA from django.contrib.gis.db.models.agg...
linaro-technologies/jobserv
refs/heads/master
jobserv/storage/local_storage.py
1
# Copyright (C) 2017 Linaro Limited # Author: Andy Doan <andy.doan@linaro.org> import hmac import os import mimetypes import shutil from flask import Blueprint, request, send_file, url_for from jobserv.jsend import get_or_404 from jobserv.models import Build, Project, Run from jobserv.settings import INTERNAL_API_KE...
gjtorikian/readthedocs.org
refs/heads/master
readthedocs/redirects/views.py
12133432
popoyz/charts
refs/heads/master
hillinsight/www/__init__.py
12133432
sarvex/django
refs/heads/master
tests/m2m_through/__init__.py
12133432
weigj/django-multidb
refs/heads/master
tests/modeltests/field_subclassing/__init__.py
12133432
SerCeMan/intellij-community
refs/heads/master
python/testData/resolve/multiFile/nestedPackageElement/foo/__init__.py
12133432
openaps/openaps
refs/heads/master
openaps/controllers/__init__.py
12133432
mwieler/django-registration-1.5
refs/heads/master
registration/tests/__init__.py
59
from django.test import TestCase import registration from registration.tests.backends import * from registration.tests.forms import * from registration.tests.models import * from registration.tests.views import * class RegistrationVersionInfoTests(TestCase): """ Test django-registration's internal version-r...
cfrs2005/flask_blog
refs/heads/master
lib/__init__.py
1
__author__ = 'aj'
MinerKasch/dd-agent
refs/heads/master
checks.d/varnish.py
5
# (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib from collections import defaultdict import re import xml.parsers.expat # python 2.4 compatible # project from checks import AgentCheck from utils.subprocess_output import get_subprocess_output class Ba...
ktaneishi/deepchem
refs/heads/master
deepchem/models/tensorgraph/robust_multitask.py
1
from __future__ import division from __future__ import unicode_literals import numpy as np import tensorflow as tf import collections from deepchem.metrics import to_one_hot from deepchem.models.tensorgraph.tensor_graph import TensorGraph, TFWrapper from deepchem.models.tensorgraph.layers import Feature, Label, Weig...
a0c/odoo
refs/heads/master
addons/website_event_sale/controllers/main.py
54
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
nabsboss/CouchPotatoServer
refs/heads/develop
libs/oauthlib/oauth1/rfc5849/signature.py
112
# -*- coding: utf-8 -*- from __future__ import absolute_import """ oauthlib.oauth1.rfc5849.signature ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module represents a direct implementation of `section 3.4`_ of the spec. Terminology: * Client: software interfacing with an OAuth API * Server: the API provider * Resource Ow...
tuxfux-hlp-notes/python-batches
refs/heads/master
batch-67/12-modules/myenv/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.py
327
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import with_metaclass, viewkeys, PY3 import types try: from collections import OrderedDict except ImportError: from pip._vendor.ordereddict import OrderedDict from . import _inputstream from . import _tokenizer from . im...
BeATz-UnKNoWN/python-for-android
refs/heads/master
python-build/python-libs/gdata/tests/all_tests_coverage.py
87
#!/usr/bin/env python # # Copyright (C) 2009 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...
bluevoda/BloggyBlog
refs/heads/master
lib/python3.4/site-packages/django/utils/ipv6.py
71
# This code was mostly based on ipaddr-py # Copyright 2007 Google Inc. https://github.com/google/ipaddr-py # Licensed under the Apache License, Version 2.0 (the "License"). import re from django.core.exceptions import ValidationError from django.utils.six.moves import range from django.utils.translation import ugettex...
nkgilley/home-assistant
refs/heads/dev
tests/components/rflink/test_init.py
6
"""Common functions for RFLink component tests and generic platform tests.""" import pytest from voluptuous.error import MultipleInvalid from homeassistant.bootstrap import async_setup_component from homeassistant.components.rflink import ( CONF_RECONNECT_INTERVAL, DATA_ENTITY_LOOKUP, EVENT_KEY_COMMAND, ...
CloudVLab/professional-services
refs/heads/master
tools/cloud-vision-utils/cloud_vision_utils/dataset.py
2
# python3 # Copyright 2019 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 applica...
campagnola/neuroanalysis
refs/heads/master
neuroanalysis/neuronsim/components.py
1
# -*- coding: utf-8 -*- """ Simple neuron simulator for Python. Also simulates voltage clamp and current clamp with access resistance. Luke Campagnola 2015 """ from collections import OrderedDict from .sim import SimObject from ..units import pF, mV, uF, cm class Mechanism(SimObject): """Base class for simulati...
drjeep/django
refs/heads/master
tests/gis_tests/test_measure.py
325
""" Distance and Area objects to allow for sensible and convenient calculation and conversions. Here are some tests. """ import unittest from django.contrib.gis.measure import A, D, Area, Distance class DistanceTest(unittest.TestCase): "Testing the Distance object" def testInit(self): "Testing init...
mapennell/ansible
refs/heads/devel
v1/ansible/runner/action_plugins/pause.py
143
# Copyright 2012, Tim Bielawa <tbielawa@redhat.com> # # 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...
menegon/geonode
refs/heads/master
geonode/contrib/geosites/templatetags/__init__.py
12133432
llcao/keras
refs/heads/master
tests/auto/test_regularizers.py
75
import unittest import numpy as np np.random.seed(1337) # for reproducibility from keras.models import Sequential from keras.layers.core import Merge, Dense, Activation, Flatten, ActivityRegularization from keras.layers.embeddings import Embedding from keras.datasets import mnist from keras.utils import np_utils from ...
pyQode/pyqode.python
refs/heads/master
examples/pynotepad/pynotepad/forms/resources_rc.py
2
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt5 (Qt v5.5.1) # # WARNING! All changes made in this file will be lost! from pyqode.qt import QtCore qt_resource_data = b"\ \x00\x00\x04\xbb\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x2...
mwx1993/TACTIC
refs/heads/master
src/client/tactic_client_lib/scm/scm_impl.py
7
############################################################ # # Copyright (c) 2012, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way witho...
singlebrook/AWS-ElasticBeanstalk-CLI
refs/heads/master
eb/macosx/python2.7/lib/aws/requests/packages/charade/euctwprober.py
2993
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
sjdv1982/seamless
refs/heads/master
seamless/highlevel/library/include.py
1
from copy import deepcopy from inspect import Signature, Parameter from collections import OrderedDict class IncludedLibraryContainer: def __init__(self, ctx, path): assert isinstance(ctx, Context) self._ctx = ctx self._path = path def __dir__(self): ctx = self._ctx libs...
mlufei/depot_tools
refs/heads/master
third_party/logilab/astroid/bases.py
58
# copyright 2003-2013 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 #...
michalliu/OpenWrt-Firefly-Libraries
refs/heads/master
staging_dir/host/lib/python3.4/test/test_os.py
8
# As a test suite for the os module, this is woefully inadequate, but this # does add tests for a few functions which have been determined to be more # portable than they had been thought to be. import os import errno import unittest import warnings import sys import signal import subprocess import time import shutil ...
ingokegel/intellij-community
refs/heads/master
python/testData/refactoring/move/moveUnreferencedFunctionToUnimportableModule/after/src/src.py
12133432
tzaffi/git-in-practice-repo
refs/heads/master
book/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/__init__.py
12133432
jgoclawski/django
refs/heads/master
tests/ordering/__init__.py
12133432
cpausmit/IntelROCCS
refs/heads/master
CUADRnT/src/python/cuadrnt/data_analysis/rankings/generic.py
4
#!/usr/bin/env python2.7 """ File : generic.py Author : Bjorn Barrefors <bjorn dot peter dot barrefors AT cern dot ch> Description: Generic class for all ranking algorithms """ # system modules import logging import datetime import json import math import numpy as np from sklearn.externals import joblib # p...
sander76/home-assistant
refs/heads/dev
homeassistant/components/wolflink/sensor.py
5
"""The Wolf SmartSet sensors.""" from wolf_smartset.models import ( HoursParameter, ListItemParameter, Parameter, PercentageParameter, Pressure, SimpleParameter, Temperature, ) from homeassistant.components.sensor import SensorEntity from homeassistant.const import ( DEVICE_CLASS_PRESSU...
andreif/django
refs/heads/master
tests/urlpatterns_reverse/included_named_urls2.py
452
from django.conf.urls import url from .views import empty_view urlpatterns = [ url(r'^$', empty_view, name="named-url5"), url(r'^extra/(?P<extra>\w+)/$', empty_view, name="named-url6"), url(r'^(?P<one>[0-9]+)|(?P<two>[0-9]+)/$', empty_view), ]
throwable-one/lettuce
refs/heads/master
tests/integration/lib/Django-1.3/tests/regressiontests/comment_tests/models.py
102
""" Comments may be attached to any object. See the comment documentation for more information. """ from django.db import models from django.test import TestCase class Author(models.Model): first_name = models.CharField(max_length=30) last_name = models.CharField(max_length=30) def __str__(self): ...
himmih/cluedo
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/lint.py
500
from __future__ import absolute_import, division, unicode_literals from . import _base from ..constants import cdataElements, rcdataElements, voidElements from ..constants import spaceCharacters spaceCharacters = "".join(spaceCharacters) class LintError(Exception): pass class Filter(_base.Filter): def __i...
adityacs/ansible
refs/heads/devel
test/runner/lib/cover.py
43
"""Code coverage utilities.""" from __future__ import absolute_import, print_function import os import re from lib.target import ( walk_module_targets, ) from lib.util import ( display, ApplicationError, EnvironmentConfig, run_command, ) from lib.executor import ( Delegate, install_comm...
conjurinc/api-python
refs/heads/master
conjur/layer.py
1
# # Copyright (C) 2014 Conjur Inc # # 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, modify, merge, publish, distri...
Zhongqilong/mykbengineer
refs/heads/master
kbe/src/lib/python/Lib/test/final_a.py
103
""" Fodder for module finalization tests in test_module. """ import shutil import test.final_b x = 'a' class C: def __del__(self): # Inspect module globals and builtins print("x =", x) print("final_b.x =", test.final_b.x) print("shutil.rmtree =", getattr(shutil.rmtree, '__name__',...
dbmi-pitt/DIKB-Micropublication
refs/heads/master
scripts/mp-scripts/Bio/SeqIO/InsdcIO.py
1
# Copyright 2007 by Peter Cock. All rights reserved. # # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. from Bio.GenBank.Scanner import GenBankScanner, EmblScanner from Bio.Alphabet import generic_pr...
tzoiker/gensim
refs/heads/develop
gensim/test/test_doc2vec.py
4
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Automated tests for checking transformation algorithms (the models package). """ from __future__ import with_statement import logg...
gauribhoite/personfinder
refs/heads/master
env/site-packages/pygments/styles/emacs.py
135
# -*- coding: utf-8 -*- """ pygments.styles.emacs ~~~~~~~~~~~~~~~~~~~~~ A highlighting style for Pygments, inspired by Emacs. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import ...
Yusa95/numpy
refs/heads/master
numpy/core/tests/test_errstate.py
146
from __future__ import division, absolute_import, print_function import platform import numpy as np from numpy.testing import TestCase, assert_, run_module_suite, dec class TestErrstate(TestCase): @dec.skipif(platform.machine() == "armv5tel", "See gh-413.") def test_invalid(self): with np.errstate(a...
lancezlin/pylearn2
refs/heads/master
pylearn2/utils/image.py
39
""" Utility functions for working with images. """ import logging import numpy as np plt = None axes = None from theano.compat.six.moves import xrange from theano.compat.six import string_types import warnings try: import matplotlib.pyplot as plt import matplotlib.axes except (RuntimeError, ImportError, TypeErr...
liuqr/edx-xiaodun
refs/heads/master
common/lib/xmodule/xmodule/seq_module.py
6
import json import logging from lxml import etree from xblock.fields import Integer, Scope from xblock.fragment import Fragment from pkg_resources import resource_string from .exceptions import NotFoundError from .fields import Date from .mako_module import MakoModuleDescriptor from .progress import Progress from .x...