repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
aaryani/CoreTardis
tardis/tardis_portal/tests/ldap_ldif.py
6
3492
# -*- coding: utf-8 -*- # # Copyright (c) 2010-2011, Monash e-Research Centre # (Monash University, Australia) # Copyright (c) 2010-2011, VeRSI Consortium # (Victorian eResearch Strategic Initiative, Australia) # Copyright (c) 2010 VPAC # All rights reserved. # Redistribution and use in source and binary forms, wit...
bsd-3-clause
NB-Dev/cmsplugin-filer
cmsplugin_filer_folder/models.py
17
1260
from django.utils.translation import ugettext_lazy as _ from django.db import models from cms.models import CMSPlugin, Page from django.utils.translation import ugettext_lazy as _ from posixpath import join, basename, splitext, exists from filer.fields.folder import FilerFolderField from django.conf import settings fro...
bsd-3-clause
bed718/pl
node_modules/npm-shrinkwrap/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py
566
9386
# Copyright (c) 2013 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. """Utility functions shared amongst the Windows generators.""" import copy import os _TARGET_TYPE_EXT = { 'executable': '.exe', 'loadable_module': '.dll', ...
mit
muet/Espruino
boards/STM32F429IDISCOVERY.py
6
5414
#!/bin/false # This file is part of Espruino, a JavaScript interpreter for Microcontrollers # # Copyright (C) 2013 Gordon Williams <gw@pur3.co.uk> # # 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 h...
mpl-2.0
fabsx00/bjoern
python/octopus-tools/octopus/server/orientdb/orientdb_shell_mananger.py
3
1184
from octopus.server.orientdb.orientdb_server_command import OrientDBServerCommand from octopus.server.shell_manager import ShellManager class OrientDBShellManager(ShellManager): def __init__(self, server_host, server_port): self.command = OrientDBServerCommand(server_host, server_port) def create(sel...
gpl-3.0
RandomGamer342/TTM4115-plantsensor
Adafruit_MCP3008/MCP3008.py
3
4505
# Copyright (c) 2016 Adafruit Industries # Author: Tony DiCola # # 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, m...
mit
emmettk/pvrsex
tiff_file_folder_divider.py
1
5268
# -*- coding: utf-8 -*- """ Created on Thu Sep 28 16:14:22 2017 @author: ekrupczak on LaVision Divide tiffs up into subfolders with maximum number of files per folder This allows them to be imported into DaVis which seems unwilling to import more than about 10000 files at a time. Or pull all tiffs from specified fol...
mit
endlessm/chromium-browser
third_party/llvm/llvm/utils/llvm-build/llvmbuild/componentinfo.py
31
16963
""" Descriptor objects for entities that are part of the LLVM project. """ from __future__ import absolute_import, print_function try: import configparser except: import ConfigParser as configparser import sys from llvmbuild.util import fatal, warning class ParseError(Exception): pass class ComponentInf...
bsd-3-clause
Chinbob2515/diplomacy
diplomacy/scripts/dom/pulldom.py
322
11974
import xml.sax import xml.sax.handler import types try: _StringTypes = [types.StringType, types.UnicodeType] except AttributeError: _StringTypes = [types.StringType] START_ELEMENT = "START_ELEMENT" END_ELEMENT = "END_ELEMENT" COMMENT = "COMMENT" START_DOCUMENT = "START_DOCUMENT" END_DOCUMENT = "END_DOCUMENT" ...
gpl-2.0
rhyolight/nupic
tests/unit/nupic/data/generators/sequence_machine_test.py
15
3346
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
yize/grunt-tps
tasks/lib/python/Lib/python2.7/test/test_linecache.py
96
4079
""" Tests for the linecache module """ import linecache import unittest import os.path from test import test_support as support FILENAME = linecache.__file__ INVALID_NAME = '!@$)(!@#_1' EMPTY = '' TESTS = 'inspect_fodder inspect_fodder2 mapping_tests' TESTS = TESTS.split() TEST_PATH = os.path.dirname(support.__file_...
mit
alex4108/scLikesDownloader
simplejson/tests/test_fail.py
147
6346
import sys from unittest import TestCase import simplejson as json # 2007-10-05 JSONDOCS = [ # http://json.org/JSON_checker/test/fail1.json '"A JSON payload should be an object or array, not a string."', # http://json.org/JSON_checker/test/fail2.json '["Unclosed array"', # http://json.org/JSON_che...
gpl-2.0
czcorpus/kontext
lib/bgcalc/csv_cache.py
1
1387
# Copyright (c) 2021 Charles University, Faculty of Arts, # Institute of the Czech National Corpus # Copyright (c) 2021 Tomas Machalek <tomas.machalek@gmail.com> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as publis...
gpl-2.0
cloakedcode/CouchPotatoServer
libs/sqlalchemy/dialects/sybase/pysybase.py
34
3201
# sybase/pysybase.py # Copyright (C) 2010-2011 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ Support for Sybase via the python-sybase driver. http://python-sybase.sourcefo...
gpl-3.0
ntt-sic/nova
nova/keymgr/single_key_mgr.py
12
2600
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory # 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 L...
apache-2.0
machaharu/odenos
src/main/python/org/o3project/odenos/remoteobject/manager/component/component_manager.py
6
11608
# -*- coding:utf-8 -*- # Copyright 2015 NEC Corporation. # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License...
apache-2.0
arnavd96/Cinemiezer
myvenv/lib/python3.4/site-packages/music21/demos/smt2011.py
1
5140
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------- # Name: smt2011.py # Purpose: Demonstrations for the SMT 2011 demo # # Authors: Christopher Ariza # Michael Scott Cuthbert # # Copyright: Copyright © 2011 Michael Scott Cuthbert an...
mit
alephu5/Soundbyte
environment/lib/python3.3/site-packages/numpy/numarray/ufuncs.py
13
1423
from __future__ import division, absolute_import, print_function __all__ = ['abs', 'absolute', 'add', 'arccos', 'arccosh', 'arcsin', 'arcsinh', 'arctan', 'arctan2', 'arctanh', 'bitwise_and', 'bitwise_not', 'bitwise_or', 'bitwise_xor', 'ceil', 'cos', 'cosh', 'divide', 'equal', 'exp', 'f...
gpl-3.0
liu602348184/django
django/db/backends/oracle/features.py
356
2345
from django.db.backends.base.features import BaseDatabaseFeatures from django.db.utils import InterfaceError try: import pytz except ImportError: pytz = None class DatabaseFeatures(BaseDatabaseFeatures): empty_fetchmany_value = () interprets_empty_strings_as_nulls = True uses_savepoints = True ...
bsd-3-clause
goldeneye-source/ges-python
lib/test/test_importlib/import_/test_relative_imports.py
84
8813
"""Test relative imports (PEP 328).""" from .. import util from . import util as import_util import sys import unittest class RelativeImports: """PEP 328 introduced relative imports. This allows for imports to occur from within a package without having to specify the actual package name. A simple example...
gpl-3.0
neno1978/pelisalacarta
python/main-classic/channels/pelisplus.py
2
22015
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # Canal (pelisplus) por Hernan_Ar_c # ------------------------------------------------------------ import urlparse, urllib2, urllib, re import os, sys from core import logger from core import tmdb from core import scraper...
gpl-3.0
jaeddy/bripipetools
bripipetools/dbification/flowcellrun.py
1
8314
""" Class for importing data from a sequencing run into GenLIMS and the Research DB as new objects. """ import logging import os import re from .. import parsing from .. import database from .. import annotation logger = logging.getLogger(__name__) class FlowcellRunImporter(object): """ Collects FlowcellRu...
mit
donniexyz/calligra
3rdparty/google-breakpad/src/testing/gtest/scripts/upload_gtest.py
1963
2851
#!/usr/bin/env python # # Copyright 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...
gpl-2.0
appliedx/edx-platform
common/djangoapps/track/tests/test_logs.py
163
2712
"""Tests that tracking data are successfully logged""" import mock import unittest from django.test import TestCase from django.core.urlresolvers import reverse from django.conf import settings from track.models import TrackingLog from track.views import user_track @unittest.skip("TODO: these tests were not being ru...
agpl-3.0
devs1991/test_edx_docmode
common/djangoapps/third_party_auth/tests/test_pipeline.py
77
1807
"""Unit tests for third_party_auth/pipeline.py.""" import random from third_party_auth import pipeline from third_party_auth.tests import testutil import unittest # Allow tests access to protected methods (or module-protected methods) under test. # pylint: disable=protected-access class MakeRandomPasswordTest(tes...
agpl-3.0
sjlehtin/django
django/contrib/gis/gdal/geomtype.py
62
3175
from django.contrib.gis.gdal.error import GDALException class OGRGeomType: "Encapsulate OGR Geometry Types." wkb25bit = -2147483648 # Dictionary of acceptable OGRwkbGeometryType s and their string names. _types = {0: 'Unknown', 1: 'Point', 2: 'LineString', 3...
bsd-3-clause
shubhdev/edx-platform
lms/lib/comment_client/models.py
63
6046
import logging from .utils import extract, perform_request, CommentClientRequestError log = logging.getLogger(__name__) class Model(object): accessible_fields = ['id'] updatable_fields = ['id'] initializable_fields = ['id'] base_url = None default_retrieve_params = {} metric_tag_fields = [...
agpl-3.0
andriibekker/biddingsbase
django/forms/fields.py
103
38484
""" Field classes. """ import datetime import os import re import time import urlparse import warnings from decimal import Decimal, DecimalException try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.core.exceptions import ValidationError from django.core import ...
bsd-3-clause
hidashun/django-typed-models
typedmodels/tests.py
1
8182
from django.utils import unittest try: import yaml # NOQA PYYAML_AVAILABLE = True except ImportError: PYYAML_AVAILABLE = False from django.core import serializers from django.test import TestCase from django.db.models.query_utils import DeferredAttribute from .test_models import AngryBigCat, Animal, BigC...
bsd-3-clause
HydrelioxGitHub/home-assistant
homeassistant/components/sensor/waqi.py
7
5262
""" Support for the World Air Quality Index service. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.waqi/ """ import asyncio import logging from datetime import timedelta import aiohttp import voluptuous as vol from homeassistant.exceptions impo...
apache-2.0
nacl-webkit/chrome_deps
third_party/closure_linter/closure_linter/statetracker.py
135
31214
#!/usr/bin/env python # # Copyright 2007 The Closure Linter 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 #...
bsd-3-clause
hfp/tensorflow-xsmm
tensorflow/python/ops/summary_op_util.py
9
5210
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
lhilt/scipy
scipy/stats/tests/test_morestats.py
4
70469
# Author: Travis Oliphant, 2002 # # Further enhancements and tests added by numerous SciPy developers. # from __future__ import division, print_function, absolute_import import warnings import numpy as np from numpy.random import RandomState from numpy.testing import (assert_array_equal, assert_almost_equal, ass...
bsd-3-clause
snnn/tensorflow
tensorflow/python/eager/pywrap_tfe_test.py
12
11086
# 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...
apache-2.0
wangsharp/trading-with-python
spreadApp/makeDist.py
77
1720
from distutils.core import setup import py2exe manifest_template = ''' <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity version="5.0.0.0" processorArchitecture="x86" name="%(prog)s" type="win32"...
bsd-3-clause
bigbiff/android_kernel_samsung_sm900t
tools/perf/scripts/python/sctop.py
11180
1924
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
alex/kombu
kombu/tests/test_simple.py
30
3772
from __future__ import absolute_import from kombu import Connection, Exchange, Queue from .case import Case, Mock class SimpleBase(Case): abstract = True def Queue(self, name, *args, **kwargs): q = name if not isinstance(q, Queue): q = self.__class__.__name__ if name...
bsd-3-clause
batermj/algorithm-challenger
code-analysis/programming_anguage/python/source_codes/Python3.8.0/Python-3.8.0/Lib/test/test_bufio.py
11
2597
import unittest from test import support import io # C implementation. import _pyio as pyio # Python implementation. # Simple test to ensure that optimizations in the IO library deliver the # expected results. For best testing, run this under a debug-build Python too # (to exercise asserts in the C code). lengths =...
apache-2.0
jhorwit2/kubernetes
cluster/juju/layers/kubernetes-worker/reactive/kubernetes_worker.py
23
47752
#!/usr/bin/env python # Copyright 2015 The Kubernetes Authors. # # 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 appli...
apache-2.0
Zogg/Tiltai
tiltai/sdn/docker.py
1
1700
from tiltai.utils import tiltai_logs_format import socket from logbook import Logger, StderrHandler err = StderrHandler(format_string=tiltai_logs_format) log = Logger("sdn[docker]") def dockersdn(queue_name, resolver, storage): """ Get addresses and type of the socket from within docker container. A hostnam...
gpl-3.0
razzius/PyClassLessons
instructors/lessons/unittest/examples/email_tests.py
3
2013
import unittest from range_func import dummy_range_function, range_func2 class TestEmailFunctions(unittest.TestCase): def __init__(self, *args, **kwargs): super(TestEmailFunctions, self).__init__(*args, **kwargs) def setUp(self): #self.ls = range(10) self.valid_email = "me...
mit
sigma-random/scrapy
scrapy/xlib/tx/iweb.py
165
18224
# -*- test-case-name: twisted.web.test -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Interface definitions for L{twisted.web}. @var UNKNOWN_LENGTH: An opaque object which may be used as the value of L{IBodyProducer.length} to indicate that the length of the entity body is not...
bsd-3-clause
slohse/ansible
test/units/modules/network/radware/test_vdirect_file.py
32
9533
# -*- coding: utf-8 -*- # # Copyright 2017 Radware LTD. # # 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 l...
gpl-3.0
antiface/pycoin
pycoin/ecdsa/numbertheory.py
8
2978
try: from .native.library import NATIVE_LIBRARY except ImportError: NATIVE_LIBRARY = None def inverse_mod( a, m ): """Inverse of a mod m.""" if a < 0 or m <= a: a = a % m # From Ferguson and Schneier, roughly: c, d = a, m uc, vc, ud, vd = 1, 0, 0, 1 while c != 0: q, c, d = divmod( d, c ) + (...
mit
pascalchevrel/bedrock
tests/functional/firefox/test_releasenotes.py
4
6159
# 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 pytest from pages.firefox.releasenotes import FirefoxReleaseNotesPage @pytest.mark.skip_if_firefox(reason='Dow...
mpl-2.0
jounex/hue
desktop/core/ext-py/boto-2.38.0/boto/ec2/elb/listener.py
152
3377
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # 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 wi...
apache-2.0
xiaoguoai/ec-dev-swift
swift/common/middleware/keystoneauth.py
3
13951
# 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 agreed to in...
apache-2.0
jesonyang001/qarepo
askbot/mail/lamson_handlers.py
3
11009
import functools import re import sys from django.core.files.uploadedfile import SimpleUploadedFile from django.core.urlresolvers import reverse from django.conf import settings as django_settings from django.template import Context from django.template.loader import get_template from django.utils.translation import ug...
gpl-3.0
BFH-BTI7301-project1/ClockAlarm
_clockalarm/UI/NotificationWidget.py
1
3442
# ClockAlarm is a cross-platform alarm manager # Copyright (C) 2017 Loïc Charrière, Samuel Gauthier # # 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 y...
gpl-3.0
goozbach/ansible
lib/ansible/module_utils/netcfg.py
11
2329
# # (c) 2015 Peter Sprygada, <psprygada@ansible.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 late...
gpl-3.0
rickerc/nova_audit
nova/tests/virt/xenapi/image/test_utils.py
9
9072
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 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...
apache-2.0
msmolens/VTK
ThirdParty/Twisted/twisted/web/test/test_distrib.py
41
15230
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.web.distrib}. """ from os.path import abspath from xml.dom.minidom import parseString try: import pwd except ImportError: pwd = None from zope.interface.verify import verifyObject from twisted.python import log, ...
bsd-3-clause
lidan-fnst/samba
buildtools/wafsamba/generic_cc.py
45
1815
# compiler definition for a generic C compiler # based on suncc.py from waf import os, optparse import Utils, Options, Configure import ccroot, ar from Configure import conftest from compiler_cc import c_compiler c_compiler['default'] = ['gcc', 'generic_cc'] c_compiler['hpux'] = ['gcc', 'generic_cc'] @conftest def...
gpl-3.0
imbasimba/astroquery
astroquery/cds/tests/test_mocserver_remote.py
2
3112
# -*- coding: utf-8 -* # Licensed under a 3-clause BSD style license - see LICENSE.rst import sys import pytest from astropy import coordinates from astropy.table import Table try: from mocpy import MOC except ImportError: pass try: from regions import CircleSkyRegion except ImportError: pass from ...
bsd-3-clause
takus/dd-agent
tests/checks/integration/test_php_fpm.py
1
2958
# 3p from nose.plugins.attrib import attr # project from checks import AgentCheck from tests.checks.common import AgentCheckTest # sample from /status?json # { # "accepted conn": 350, # "active processes": 1, # "idle processes": 2, # "listen queue": 0, # "listen queue len": 0, # "max active p...
bsd-3-clause
Zhaoyanzhang/-myflasky
venv/lib/python2.7/site-packages/werkzeug/routing.py
87
66746
# -*- coding: utf-8 -*- """ werkzeug.routing ~~~~~~~~~~~~~~~~ When it comes to combining multiple controller or view functions (however you want to call them) you need a dispatcher. A simple way would be applying regular expression tests on the ``PATH_INFO`` and calling registered callback fun...
mit
mbrubeck/servo
tests/wpt/mozilla/tests/webgl/conformance-2.0.0/closure-library/closure/bin/build/treescan.py
582
2203
#!/usr/bin/env python # # Copyright 2010 The Closure Library 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 ...
mpl-2.0
VisTrails/VisTrails
vistrails/db/versions/v0_8_0/__init__.py
2
1965
############################################################################### ## ## Copyright (C) 2014-2016, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
bsd-3-clause
erkanay/django
django/utils/archive.py
562
7070
""" Based on "python-archive" -- http://pypi.python.org/pypi/python-archive/ Copyright (c) 2010 Gary Wilson Jr. <gary.wilson@gmail.com> and contributors. 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 So...
bsd-3-clause
aschampion/CATMAID
django/applications/catmaid/migrations/0007_auto__add_changerequest.py
4
46860
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from catmaid.models import create_concept_sub_table class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'ChangeRequest' create_concept_sub_table('...
gpl-3.0
dims/glance
tools/colorizer.py
2
11684
#!/usr/bin/env python # Copyright (c) 2013, Nebula, Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file exc...
apache-2.0
sarantapichos/faircoop-market
addons/l10n_be_invoice_bba/partner.py
379
2268
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Created by Luc De Meyer # Copyright (c) 2010 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribu...
agpl-3.0
bkeepers/pygments.rb
vendor/pygments-main/pygments/styles/native.py
364
1938
# -*- coding: utf-8 -*- """ pygments.styles.native ~~~~~~~~~~~~~~~~~~~~~~ pygments version of my "native" vim theme. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Keyword, ...
mit
patriciolobos/desa8
openerp/addons/report_webkit/header.py
342
4626
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # All Right Reserved # # Author : Nicolas Bessi (Camptocamp) # # WARNING: This program as such is intended to be used by professional # programmers who...
agpl-3.0
AlphaCluster/NewsBlur
apps/reader/migrations/0009_drop_user_story.py
18
9757
# encoding: 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): # Removing unique constraint on 'UserStory', fields ['user', 'feed', 'story'] db.delete_unique('reader_use...
mit
joshfriend/sqlalchemy-utils
tests/batch_fetch/test_one_to_many_relationships.py
2
2891
import sqlalchemy as sa from pytest import raises from sqlalchemy_utils import batch_fetch from tests import TestCase class TestBatchFetchOneToManyRelationships(TestCase): def create_models(self): class User(self.Base): __tablename__ = 'user' id = sa.Column(sa.Integer, autoincremen...
bsd-3-clause
dwrpayne/zulip
zerver/lib/notifications.py
2
24408
from __future__ import print_function from typing import Any, Tuple from confirmation.models import Confirmation from django.conf import settings from django.core.mail import EmailMultiAlternatives from django.template import loader from zerver.decorator import statsd_increment, uses_mandrill from zerver.models import...
apache-2.0
thewtex/TubeTK
examples/archive/TubeGraphKernels/download.py
7
6502
############################################################################## # # Library: TubeTK # # Copyright 2010 Kitware Inc. 28 Corporate Drive, # Clifton Park, NY, 12065, USA. # # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in comp...
apache-2.0
VagrantApe/flaskMicroblog
venv/lib/python2.7/site-packages/whoosh/util/filelock.py
96
5291
# Copyright 2010 Matt Chaput. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the...
bsd-3-clause
AdamsLee/mongo-connector
mongo_connector/connector.py
1
31437
# Copyright 2013-2014 MongoDB, 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...
apache-2.0
mlperf/training_results_v0.5
v0.5.0/google/cloud_v2.8/resnet-tpuv2-8/code/resnet/model/staging/models/rough/nmt_gpu/beam_search_decoder.py
8
44495
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
brightcove/shaka-player
third_party/gjslint/closure_linter-2.3.13/closure_linter/javascriptlintrules.py
8
37741
#!/usr/bin/env python # Copyright 2011 The Closure Linter 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 # #...
apache-2.0
gfyoung/pandas
pandas/tests/groupby/test_bin_groupby.py
2
3023
import numpy as np import pytest from pandas._libs import lib, reduction as libreduction import pandas as pd from pandas import Series import pandas._testing as tm def test_series_grouper(): obj = Series(np.random.randn(10)) dummy = obj.iloc[:0] labels = np.array([-1, -1, -1, 0, 0, 0, 1, 1, 1, 1], dtyp...
bsd-3-clause
chaeplin/p2pool-drk
p2pool/main.py
22
29726
from __future__ import division import base64 import gc import json import os import random import sys import time import signal import traceback import urlparse if '--iocp' in sys.argv: from twisted.internet import iocpreactor iocpreactor.install() from twisted.internet import defer, reactor, protocol, tcp f...
gpl-3.0
gsehub/edx-platform
openedx/core/djangoapps/user_api/tests/test_constants.py
19
7168
# -*- coding: utf-8 -*- """Constants used in the test suite. """ SORTED_COUNTRIES = [ (u"AF", u"Afghanistan"), (u"AX", u"\xc5land Islands"), (u"AL", u"Albania"), (u"DZ", u"Algeria"), (u"AS", u"American Samoa"), (u"AD", u"Andorra"), (u"AO", u"Angola"), (u"AI", u"Anguilla"), (u"AQ", u"...
agpl-3.0
fabioticconi/scikit-learn
examples/linear_model/plot_lasso_coordinate_descent_path.py
42
2944
""" ===================== Lasso and Elastic Net ===================== Lasso and elastic net (L1 and L2 penalisation) implemented using a coordinate descent. The coefficients can be forced to be positive. """ print(__doc__) # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # License: BSD 3 clause from itert...
bsd-3-clause
medallia/aurora
src/test/python/apache/aurora/client/api/test_job_monitor.py
5
4330
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under ...
apache-2.0
pawel-kieliszczyk/algorithms
libraries/googlemock/gmock-1.7.0/scripts/generator/cpp/gmock_class.py
268
8241
#!/usr/bin/env python # # Copyright 2008 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 requi...
mit
johnobrien/PyPractice
pipeg/gameboard2.py
3
3631
#!/usr/bin/env python3 # Copyright © 2012-13 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any ...
mit
phoebusliang/parallel-lettuce
tests/integration/lib/Django-1.3/django/contrib/gis/shortcuts.py
317
1161
import cStringIO, zipfile from django.conf import settings from django.http import HttpResponse from django.template import loader def compress_kml(kml): "Returns compressed KMZ from the given KML string." kmz = cStringIO.StringIO() zf = zipfile.ZipFile(kmz, 'a', zipfile.ZIP_DEFLATED) zf.writestr('doc....
gpl-3.0
dstroppa/openstack-smartos-nova-grizzly
nova/compute/vm_states.py
11
1791
# 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...
apache-2.0
xianjunzhengbackup/Cloud-Native-Python
env/lib/python3.6/site-packages/pip/_vendor/html5lib/treeadapters/sax.py
1835
1661
from __future__ import absolute_import, division, unicode_literals from xml.sax.xmlreader import AttributesNSImpl from ..constants import adjustForeignAttributes, unadjustForeignAttributes prefix_mapping = {} for prefix, localName, namespace in adjustForeignAttributes.values(): if prefix is not None: pre...
mit
wangxiangyu/horizon
openstack_dashboard/dashboards/project/data_processing/data_sources/workflows/create.py
23
4277
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
apache-2.0
willzfarmer/HadoopInspector
hadoopinspector/tests/test_registry.py
1
12740
#!/usr/bin/env python2 """ This source code is protected by the BSD license. See the file "LICENSE" in the source code root directory for the full language or refer to it here: http://opensource.org/licenses/BSD-3-Clause Copyright 2015, 2016 Will Farmer and Ken Farmer """ from __future__ import division import sys...
bsd-3-clause
sjfloat/youtube-dl
youtube_dl/extractor/zingmp3.py
94
3672
# coding=utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ExtractorError class ZingMp3BaseInfoExtractor(InfoExtractor): def _extract_item(self, item): error_message = item.find('./errormessage').text if error_message: rais...
unlicense
v4hn/ecto
test/scripts/test_tendrils.py
1
2868
#!/usr/bin/env python # # Copyright (c) 2011, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright # n...
bsd-3-clause
szenekonzept/QPSCoin-Source
share/qt/make_spinner.py
4415
1035
#!/usr/bin/env python # W.J. van der Laan, 2011 # Make spinning .mng animation from a .png # Requires imagemagick 6.7+ from __future__ import division from os import path from PIL import Image from subprocess import Popen SRC='img/reload_scaled.png' DST='../../src/qt/res/movies/update_spinner.mng' TMPDIR='/tmp' TMPNAM...
mit
openstack/neutron
neutron/tests/unit/agent/linux/test_external_process.py
2
16501
# Copyright 2012 New Dream Network, LLC (DreamHost) # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
apache-2.0
yury-s/v8-inspector
Source/chrome/tools/json_schema_compiler/cpp_type_generator.py
23
11489
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from code import Code from model import PropertyType import cpp_util from json_parse import OrderedDict import schema_util class _TypeDependency(object)...
bsd-3-clause
woshilapin/cjdns
node_build/dependencies/libuv/build/gyp/pylib/gyp/generator/msvs.py
40
129654
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import copy import ntpath import os import posixpath import re import subprocess import sys import gyp.common import gyp.easy_xml as easy_xml import gyp.generator...
gpl-3.0
danieljaouen/ansible
lib/ansible/modules/network/interface/net_lldp_interface.py
100
2126
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
lazuxd/teste-admitere-snpap
slidingpanel.py
1
3425
# -*- coding: utf-8 -*- from kivy.animation import Animation from kivy.clock import Clock from kivy.core.window import Window from kivy.lang import Builder from kivy.metrics import dp from kivy.properties import OptionProperty, NumericProperty, StringProperty, \ BooleanProperty, ListProperty from kivy.uix.boxlayout...
mit
dan1/horizon-proto
openstack_dashboard/test/integration_tests/pages/project/compute/access_and_security/keypairspage.py
49
2716
# Copyright 2014 Hewlett-Packard Development Company, L.P # 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....
apache-2.0
whitzhu/kolibri
kolibri/core/settings.py
12
1055
""" Kolibri core settings module ============================ This module is *not* the project settings but defines variables that can be configured through the project settings - and their defaults. If something in the core uses a custom project setting, it should use a naming scheme in django.conf.settings like ``K...
mit
jorik041/glances
docs/conf.py
15
8327
# -*- coding: utf-8 -*- # # Glances documentation build configuration file, created by # sphinx-quickstart on Tue Mar 25 19:57:21 2014. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All...
lgpl-3.0
darkleons/lama
addons/sale_crm/sale_crm.py
320
1429
# -*- 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...
agpl-3.0
alexanderturner/ansible
lib/ansible/utils/module_docs_fragments/ovirt.py
10
3615
# -*- coding: utf-8 -*- # # Copyright (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) ...
gpl-3.0
sommerc/bioformats
cpp/ext/gtest-1.7.0/test/gtest_throw_on_failure_test.py
2917
5766
#!/usr/bin/env python # # Copyright 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...
gpl-2.0
sophilabs/py101
py101/lists/__init__.py
1
1763
"""" Introduction Adventure Author: Ignacio Avas (iavas@sophilabs.com) """ import codecs import io import sys import unittest from story.adventures import AdventureVerificationError, BaseAdventure from story.translation import gettext as _ class TestOutput(unittest.TestCase): """Variables Adventure test""" d...
mit
lokeshh/lokeshh-stem
test/unit/descriptor/networkstatus/key_certificate.py
3
7145
""" Unit tests for the KeyCertificate of stem.descriptor.networkstatus. """ import datetime import unittest from stem.descriptor.networkstatus import KeyCertificate from test.mocking import ( get_key_certificate, CRYPTO_BLOB, KEY_CERTIFICATE_HEADER, KEY_CERTIFICATE_FOOTER, ) class TestKeyCertificate(unitte...
lgpl-3.0