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
CloudServer/nova
nova/version.py
61
2298
# Copyright 2011 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 l...
apache-2.0
disruptek/boto
boto/dynamodb/layer2.py
18
33732
# Copyright (c) 2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011 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 without ...
mit
xupit3r/askpgh
askbot/migrations/0034_auto__add_field_user_avatar_url.py
13
26131
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from askbot.migrations_api import safe_add_column class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Tag.avatar_url' safe_add_column(u'au...
gpl-3.0
waheedahmed/edx-platform
common/djangoapps/student/management/tests/test_manage_group.py
50
7602
""" Unit tests for user_management management commands. """ import sys import ddt from django.contrib.auth.models import Group, Permission from django.contrib.contenttypes.models import ContentType from django.core.management import call_command, CommandError from django.test import TestCase TEST_EMAIL = 'test@exampl...
agpl-3.0
prampey/servo
tests/wpt/web-platform-tests/tools/pytest/testing/test_nose.py
173
10146
import pytest def setup_module(mod): mod.nose = pytest.importorskip("nose") def test_nose_setup(testdir): p = testdir.makepyfile(""" l = [] from nose.tools import with_setup @with_setup(lambda: l.append(1), lambda: l.append(2)) def test_hello(): assert l == [1] ...
mpl-2.0
xiaotianyi/INTELLI-City
docs/refer_project/wx_with_web/wenpl/divide.py
1
10289
# encoding=utf-8 ''' 程序入口showreply ''' import jieba.posseg as pseg import jieba import sys import urllib2 import json import re import copy import datetime import time import calendar from parsedate import parseDate from getdata import* from showAll import* #增加用户词汇库,此处的绝对定位,以后要修改 jieba.load_userdict('wendata/dict/di...
mit
ujenmr/ansible
contrib/inventory/ec2.py
18
73063
#!/usr/bin/env python ''' EC2 external inventory script ================================= Generates inventory that Ansible can understand by making API request to AWS EC2 using the Boto library. NOTE: This script assumes Ansible is being executed where the environment variables needed for Boto have already been set:...
gpl-3.0
prakritish/ansible
lib/ansible/parsing/dataloader.py
25
17727
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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) an...
gpl-3.0
schleichdi2/OPENNFR-6.3-CORE
opennfr-openembedded-core/meta/lib/oeqa/utils/decorators.py
1
10411
# # Copyright (C) 2013 Intel Corporation # # SPDX-License-Identifier: MIT # # Some custom decorators that can be used by unittests # Most useful is skipUnlessPassed which can be used for # creating dependecies between two test methods. import os import logging import sys import unittest import threading import signal...
gpl-2.0
CINPLA/expipe-dev
python-neo/neo/io/elphyio.py
6
158913
# -*- coding: utf-8 -*- """ README ===================================================================================== This is the implementation of the NEO IO for Elphy files. IO dependencies: - NEO - types - numpy - quantities Quick reference: =====================================================================...
gpl-3.0
CiscoSystems/tempest
tempest/cli/simple_read_only/telemetry/test_ceilometer.py
7
1983
# 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.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
pierrelb/RMG-Java
source/cclib/parser/data.py
11
9767
""" cclib (http://cclib.sf.net) is (c) 2007, the cclib development team and licensed under the LGPL (http://www.gnu.org/copyleft/lgpl.html). gmagoon 4/5/10-4/6/10 (this notice added 4/29/10): Gregory Magoon modified this file from cclib 1.0 """ import cPickle as pickle import os import sys import numpy ...
mit
GetBlimp/boards-backend
blimp_boards/comments/tests/test_permissions.py
2
2581
from django.contrib.auth.models import AnonymousUser from rest_framework.test import APIRequestFactory from rest_framework.views import APIView from ...utils.tests import BaseTestCase from ..models import Comment from ..permissions import CommentPermission class MockView(APIView): pass mock_view = MockView.as_v...
agpl-3.0
nthien/pulp
server/test/unit/server/auth/test_authorization.py
16
1161
import unittest from pulp.server.auth import authorization class TestAuthorization(unittest.TestCase): def test_module_level_attributes(self): """ Assert that the expected module level variables are correct. """ self.assertEqual(authorization.CREATE, 0) self.assertEqual(a...
gpl-2.0
nttks/jenkins-test
lms/lib/comment_client/comment.py
27
3334
from .utils import CommentClientRequestError, perform_request from .thread import Thread, _url_for_flag_abuse_thread, _url_for_unflag_abuse_thread import models import settings class Comment(models.Model): accessible_fields = [ 'id', 'body', 'anonymous', 'anonymous_to_peers', 'course_id', 'endor...
agpl-3.0
Huyuwei/tvm
tests/python/unittest/test_schedule_lstm.py
2
3710
# 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...
apache-2.0
p0psicles/SickGear
lib/requests/packages/chardet/escsm.py
2930
7839
######################## 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...
gpl-3.0
sharescience/ardupilot
Tools/autotest/apmrover2.py
1
21420
#!/usr/bin/env python # Drive APMrover2 in SITL from __future__ import print_function import os import pexpect import shutil import time from common import AutoTest from pysim import util from pymavlink import mavutil # get location of scripts testdir = os.path.dirname(os.path.realpath(__file__)) # HOME = mavuti...
gpl-3.0
ramccor/lector
lector/utils/settings.py
6
1767
# -*- coding: utf-8 -*- """ Functions to access settings """ #pylint: disable-msg=C0103 from PyQt4.QtCore import QSettings, QVariant, QDir from PyQt4.QtGui import QFont from PyQt4.QtGui import QDesktopServices def set(name, value): """ Set setting """ settings = QSettings("Davide Setti", "Lector") s...
gpl-2.0
PinguinoIDE/pinguino-ide
pinguino/qtgui/ide/tools/paths.py
1
5277
#!/usr/bin/env python #-*- coding: utf-8 -*- #import os from PySide2 import QtCore ## Python3 compatibility #if os.getenv("PINGUINO_PYTHON") is "3": ##Python3 #from configparser import RawConfigParser #else: ##Python2 #from ConfigParser import RawConfigParser from ..methods.dialogs import Dialogs ...
gpl-2.0
lake-lerna/hydra
src/main/python/hydra/zmqtest/zmq_sub.py
4
5975
__author__ = 'sushil, abdullahS' import zmq import logging import os import time import psutil import json from hydra.lib import util from hydra.lib.hdaemon import HDaemonRepSrv from hydra.lib.childmgr import ChildManager from pprint import pformat l = util.createlogger('HSub', logging.INFO) class HDZmqsRepSrv(HDae...
apache-2.0
Peekmo/three.js
utils/exporters/blender/addons/io_three/exporter/api/light.py
195
1099
from bpy import data, types from .. import utilities, logger def _lamp(func): """ :param func: """ def inner(name, *args, **kwargs): """ :param name: :param *args: :param **kwargs: """ if isinstance(name, types.Lamp): lamp = name ...
mit
motine/Ohouse
src/vendor/worker/workerdb.py
4
2398
import os.path from datetime import datetime from sqlalchemy import Table, Column, MetaData, ForeignKey, PickleType, DateTime, String, Integer, Text, create_engine, select, and_, or_, not_, event from sqlalchemy.orm import scoped_session, sessionmaker, mapper from sqlalchemy.orm.exc import MultipleResultsFound, NoResu...
bsd-3-clause
TissueMAPS/TmDeploy
tmdeploy/config.py
2
25162
# TmDeploy - Automated deployment of TissueMAPS in the cloud. # Copyright (C) 2016 Markus D. Herrmann, University of Zurich # 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 ...
gpl-3.0
xindus40223115/w17_test
man4.py
16
11453
import cherrypy # 這是 MAN 類別的定義 ''' # 在 application 中導入子模組 import programs.cdag30.man as cdag30_man # 加入 cdag30 模組下的 man.py 且以子模組 man 對應其 MAN() 類別 root.cdag30.man = cdag30_man.MAN() # 完成設定後, 可以利用 /cdag30/man/assembly # 呼叫 man.py 中 MAN 類別的 assembly 方法 ''' class MAN(object): # 各組利用 index 引導隨後的程式執行 @cherrypy.exp...
gpl-3.0
maciekcc/tensorflow
tensorflow/python/ops/metrics.py
72
1589
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
hrishioa/Aviato
kartograph/kartograph/geometry/utils.py
4
2952
""" geometry utils """ def is_clockwise(pts): """ returns true if a given linear ring is in clockwise order """ s = 0 for i in range(len(pts) - 1): if 'x' in pts[i]: x1 = pts[i].x y1 = pts[i].y x2 = pts[i + 1].x y2 = pts[i + 1].y else: ...
gpl-2.0
alexanderfefelov/nav
python/nav/smidumps/itw_mibv3.py
1
895755
# python version 1.0 DO NOT EDIT # # Generated by smidump version 0.4.8: # # smidump -f python IT-WATCHDOGS-MIB-V3 FILENAME = "./itw_mibv3.mib" MIB = { "moduleName" : "IT-WATCHDOGS-MIB-V3", "IT-WATCHDOGS-MIB-V3" : { "nodetype" : "module", "language" : "SMIv2", "organization" : ...
gpl-2.0
InQuest/ThreatKB
migrations/versions/bc0fab3363f7_create_cfg_category_range_mapping_table.py
1
1736
"""create cfg_category_range_mapping table Revision ID: bc0fab3363f7 Revises: 960676c435b2 Create Date: 2017-08-12 23:11:42.385100 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'bc0fab3363f7' down_revision = '960676c435b2' branch_labels = None depends_on = No...
gpl-2.0
tndatacommons/tndata_backend
tndata_backend/rewards/management/commands/load_reward_content.py
2
4893
import csv from django.core.management.base import BaseCommand, CommandError from rewards.models import FunContent class Command(BaseCommand): """A command to import data from a CSV file into the `FunContent` model. This command is fairly flexible, letting you read content from one or more columns, and s...
mit
matbu/ansible-modules-extras
cloud/cloudstack/cs_network.py
48
16787
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # # 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 Lice...
gpl-3.0
jbowes/ansible-modules-extras
cloud/centurylink/clc_group.py
60
13838
#!/usr/bin/python # # Copyright (c) 2015 CenturyLink # # 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 la...
gpl-3.0
scalable-networks/gnuradio-3.7.0.1
gr-trellis/examples/python/test_tcm_bit.py
13
5140
#!/usr/bin/env python from gnuradio import gr from gnuradio import trellis, digital, blocks from gnuradio import eng_notation import math import sys import random import fsm_utils from gnuradio.eng_option import eng_option from optparse import OptionParser try: from gnuradio import analog except ImportError: ...
gpl-3.0
apple/llvm-project
lldb/test/API/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py
4
18396
""" Test breakpoint names. """ import os import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class BreakpointNames(TestBase): mydir = TestBase.compute_mydir(__file__) NO_DEBUG_INFO_TESTCASE = True @add_test_categories(['pyapi']...
apache-2.0
kaflesudip/grabfeed
docs/source/conf.py
1
11341
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Grabfeed documentation build configuration file, created by # sphinx-quickstart on Tue Jan 19 09:26:38 2016. # # 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 # a...
apache-2.0
caseyrygt/osf.io
tests/test_metadata.py
27
1206
# -*- coding: utf-8 -*- '''Unit tests for models and their factories.''' import unittest from nose.tools import * # PEP8 asserts from framework.forms.utils import process_payload from website.project.model import MetaSchema from website.project.model import ensure_schemas from website.project.metadata.schemas import...
apache-2.0
DONIKAN/django
django/core/management/commands/loaddata.py
294
12977
from __future__ import unicode_literals import glob import gzip import os import warnings import zipfile from itertools import product from django.apps import apps from django.conf import settings from django.core import serializers from django.core.exceptions import ImproperlyConfigured from django.core.management.b...
bsd-3-clause
kperun/nestml
pynestml/visitors/ast_line_operation_visitor.py
1
1699
# # ASTLineOperatorVisitor.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 o...
gpl-2.0
ammarkhann/FinalSeniorCode
lib/python2.7/site-packages/mpmath/tests/test_linalg.py
2
10275
# TODO: don't use round from __future__ import division from mpmath import * xrange = libmp.backend.xrange # XXX: these shouldn't be visible(?) LU_decomp = mp.LU_decomp L_solve = mp.L_solve U_solve = mp.U_solve householder = mp.householder improve_solution = mp.improve_solution A1 = matrix([[3, 1, 6], ...
mit
bodhiconnolly/python-day-one-client
location.py
1
7437
#------------------------------------------------------------------------------- # Name: location v1.0 # Purpose: get location input from user and find relevant weather # # Author: Bodhi Connolly # # Created: 24/05/2014 # Copyright: (c) Bodhi Connolly 2014 # Licence: GNU General Public License...
gpl-3.0
IllusionRom-deprecated/android_platform_external_ceres-solver
docs/source/conf.py
8
7844
# -*- coding: utf-8 -*- # # Ceres Solver documentation build configuration file, created by # sphinx-quickstart on Sun Jan 20 20:34:07 2013. # # 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. # ...
bsd-3-clause
Jaxkr/TruthBot.org
Truthbot/news/migrations/0001_initial.py
1
3654
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-08-06 00:21 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True depend...
gpl-2.0
bdacode/hoster
hoster/mediafire_com.py
1
5195
# -*- coding: utf-8 -*- """Copyright (C) 2013 COLDWELL AG 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 later version. This program is dist...
gpl-3.0
conejoninja/xbmc-seriesly
servers/rapidshare.py
1
1655
# -*- coding: utf-8 -*- #------------------------------------------------------------ # seriesly - XBMC Plugin # Conector para rapidshare # http://blog.tvalacarta.info/plugin-xbmc/seriesly/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core import scrap...
gpl-3.0
2013Commons/HUE-SHARK
build/env/lib/python2.7/site-packages/Markdown-2.0.3-py2.7.egg/markdown/extensions/footnotes.py
107
10628
""" ========================= FOOTNOTES ================================= This section adds footnote handling to markdown. It can be used as an example for extending python-markdown with relatively complex functionality. While in this case the extension is included inside the module itself, it could just as easily b...
apache-2.0
rickerc/nova_audit
nova/virt/xenapi/vm_utils.py
6
92118
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010 Citrix Systems, Inc. # Copyright 2011 Piston Cloud Computing, Inc. # 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 ...
apache-2.0
leoliujie/odoo
addons/account_bank_statement_extensions/wizard/cancel_statement_line.py
381
1484
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under ...
agpl-3.0
androidrbox/android_kernel_amazon_bueller
Documentation/networking/cxacru-cf.py
14668
1626
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # 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 i...
gpl-2.0
hyperized/ansible
contrib/inventory/serf.py
79
2967
#!/usr/bin/env python # (c) 2015, Marc Abramowitz <marca@surveymonkey.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 # (...
gpl-3.0
vup1120/oq-hazardlib
openquake/hazardlib/tests/gsim/cauzzi_2014_test.py
2
4588
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2014-2016 GEM Foundation # # OpenQuake 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, either version 3 of the Licen...
agpl-3.0
sdecoder/CMDS-HDFS
common/build/contrib/hod/hodlib/Common/xmlrpc.py
182
2374
#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 use thi...
apache-2.0
RedHatInsights/insights-core
insights/combiners/md5check.py
1
1060
""" NormalMD5 Combiner for the NormalMD5 Parser =========================================== Combiner for the :class:`insights.parsers.md5check.NormalMD5` parser. This parser is multioutput, one parser instance for each file md5sum. Ths combiner puts all of them back together and presents them as a dict where the keys...
apache-2.0
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/boto/pyami/copybot.py
153
4261
# Copyright (c) 2006,2007 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...
agpl-3.0
ifarup/colourlab
tests/test_misc.py
1
1116
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ test_misc: Unittests for all functions in the misc module. Copyright (C) 2017 Ivar Farup 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 ver...
gpl-3.0
anaran/olympia
migrations/578-migrate-remora-admin-events.py
7
2440
from datetime import datetime from itertools import chain import amo from access.models import Group from devhub.models import ActivityLog from editors.models import EventLog from users.models import UserProfile # Are there other group changes we care about here? # All of the old group IDs aside from Admins seem to h...
bsd-3-clause
zstyblik/infernal-twin
build/reportlab/src/reportlab/pdfgen/textobject.py
25
19420
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/pdfgen/textobject.py __version__=''' $Id$ ''' __doc__=""" PDFTextObject is an efficient way to add text to a Canvas. Do not instantiate directly, obtai...
gpl-3.0
kbrebanov/ansible-modules-extras
packaging/kibana_plugin.py
2
6899
#!/usr/bin/python # -*- coding: utf-8 -*- """ Ansible module to manage elasticsearch shield role (c) 2016, Thierno IB. BARRY @barryib Sponsored by Polyconseil http://polyconseil.fr. 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 Publ...
gpl-3.0
scrollback/kuma
vendor/packages/nose/unit_tests/test_capture_plugin.py
10
2779
# -*- coding: utf-8 -*- import sys import unittest from optparse import OptionParser from nose.config import Config from nose.plugins.capture import Capture class TestCapturePlugin(unittest.TestCase): def setUp(self): self._stdout = sys.stdout def tearDown(self): sys.stdout = self._stdout ...
mpl-2.0
miteshvp/fabric8-analytics-worker
alembic/versions/f8bb0efac483_nuget_ecosystem.py
3
3035
"""nuget ecosystem. Revision ID: f8bb0efac483 Revises: e2762a61d34c Create Date: 2017-08-03 13:55:04.065158 """ # revision identifiers, used by Alembic. revision = 'f8bb0efac483' down_revision = 'e2762a61d34c' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa from sqlalchemy.dial...
gpl-3.0
Greennut/ostproject
django/contrib/gis/gdal/tests/test_srs.py
351
11199
from django.contrib.gis.gdal import SpatialReference, CoordTransform, OGRException, SRSException from django.utils import unittest class TestSRS: def __init__(self, wkt, **kwargs): self.wkt = wkt for key, value in kwargs.items(): setattr(self, key, value) # Some Spatial Reference exam...
bsd-3-clause
ngpestelos/ansible
lib/ansible/plugins/action/fail.py
227
1391
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2012, Dag Wieers <dag@wieers.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 ...
gpl-3.0
victor-prado/broker-manager
environment/lib/python3.5/site-packages/numpy/polynomial/legendre.py
22
57303
""" Legendre Series (:mod: `numpy.polynomial.legendre`) =================================================== .. currentmodule:: numpy.polynomial.polynomial This module provides a number of objects (mostly functions) useful for dealing with Legendre series, including a `Legendre` class that encapsulates the usual arith...
mit
takeshineshiro/horizon
openstack_dashboard/test/test_plugins/panel_tests.py
23
3503
# 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 # d...
apache-2.0
Answeror/pypaper
pypaper/acm.py
1
4948
#!/usr/bin/env python # -*- coding: utf-8 -*- from pyquery import PyQuery as pq import yapbib.biblist as biblist class ACM(object): def __init__(self, id): self.id = id @property def title(self): if not hasattr(self, 'b'): self.b = self._full_bibtex() return self.b.g...
mit
timoschwarzer/blendworks
BlendWorks Server/python/Lib/_sitebuiltins.py
5
2896
""" The objects used by the site module to add custom builtins. """ # Those objects are almost immortal and they keep a reference to their module # globals. Defining them in the site module would keep too many references # alive. # Note this means this module should also avoid keep things alive in its # globals. imp...
gpl-2.0
palimadra/namebench
libnamebench/util_test.py
175
1787
#!/usr/bin/env python # Copyright 2009 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...
apache-2.0
likaiwalkman/elasticsearch
dev-tools/prepare_release_create_release_version.py
9
6411
# Licensed to Elasticsearch under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this file except...
apache-2.0
guokeno0/vitess
py/vtdb/vtgate_client.py
1
13325
# Copyright 2015 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. """This module defines the vtgate client interface. """ from vtdb import vtgate_cursor # mapping from protocol to python class. vtgate_client_conn_classes = dict() ...
bsd-3-clause
Gagaro/django
django/conf/locale/de/formats.py
504
1100
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # 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 = 'H:i' DATET...
bsd-3-clause
eleonrk/SickRage
lib/github/tests/Issue158.py
9
2210
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> # # ...
gpl-3.0
wbg-optronix-lab/emergence-lab
project_management/urls/literature.py
2
1717
from __future__ import absolute_import, unicode_literals from django.conf.urls import url import project_management.views as views urlpatterns = [ url(r'^search$', views.MendeleyLibrarySearchView.as_view(), name="mendeley_search"), url(r'^$', views.LiteratureLandingView.as_view(), ...
mit
abhishekarora12/ansible
lib/ansible/utils/module_docs_fragments/openstack.py
97
4021
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # # 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
valtandor/easybuild-easyblocks
easybuild/easyblocks/e/esmf.py
2
4293
## # Copyright 2013 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (http://w...
gpl-2.0
CitoEngine/cito_plugin_server
cito_plugin_server/settings/base.py
1
5183
"""Copyright 2014 Cyrus Dasadia 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 distr...
apache-2.0
lucernae/inasafe
safe/plugin.py
6
43925
# coding=utf-8 """InaSAFE Plugin.""" import sys import os from functools import partial from distutils.version import StrictVersion # noinspection PyUnresolvedReferences import qgis # NOQA pylint: disable=unused-import # Import the PyQt and QGIS libraries from qgis.core import ( QgsRectangle, QgsRasterLayer,...
gpl-3.0
catapult-project/catapult-csm
third_party/html5lib-python/html5lib/treebuilders/etree_lxml.py
1724
14031
"""Module for supporting the lxml.etree library. The idea here is to use as much of the native library as possible, without using fragile hacks like custom element names that break between releases. The downside of this is that we cannot represent all possible trees; specifically the following are known to cause proble...
bsd-3-clause
psav/cfme_tests
cfme/test_requirements.py
7
2719
"""Test requirements mapping This module contains predefined pytest markers for CFME product requirements. Please import the module instead of elements: .. code-block:: python from cfme import test_requirements pytestmark = [test_requirements.alert] @test_requirments.quota def test_quota_alert(): ...
gpl-2.0
Mirantis/mos-horizon
openstack_dashboard/test/integration_tests/pages/identity/userspage.py
1
6565
# 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 # d...
apache-2.0
MichaelNedzelsky/intellij-community
python/lib/Lib/site-packages/django/contrib/comments/signals.py
425
1079
""" Signals relating to comments. """ from django.dispatch import Signal # Sent just before a comment will be posted (after it's been approved and # moderated; this can be used to modify the comment (in place) with posting # details or other such actions. If any receiver returns False the comment will be # discarded a...
apache-2.0
theguardian/JIRA-APPy
lib/passlib/tests/test_registry.py
2
9501
"""tests for passlib.pwhash -- (c) Assurance Technologies 2003-2009""" #============================================================================= # imports #============================================================================= from __future__ import with_statement # core import hashlib from logging import g...
gpl-2.0
defance/edx-platform
lms/djangoapps/support/tests/test_views.py
15
10144
# coding: UTF-8 """ Tests for support views. """ from datetime import datetime, timedelta import itertools import json import re import ddt from django.core.urlresolvers import reverse from pytz import UTC from course_modes.models import CourseMode from course_modes.tests.factories import CourseModeFactory from lms....
agpl-3.0
ProfessionalIT/professionalit-webiste
sdk/google_appengine/google/appengine/tools/devappserver2/scheduled_executor.py
7
3997
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
lgpl-3.0
mosaic-cloud/mosaic-distribution-dependencies
dependencies/nodejs/0.10.32/tools/gyp/pylib/gyp/ninja_syntax.py
2485
5536
# This file comes from # https://github.com/martine/ninja/blob/master/misc/ninja_syntax.py # Do not edit! Edit the upstream one instead. """Python module for generating .ninja files. Note that this is emphatically not a required piece of Ninja; it's just a helpful utility for build-file-generation systems that alr...
apache-2.0
fighterCui/L4ReFiascoOC
l4/pkg/python/contrib/Lib/shelve.py
59
7866
"""Manage shelves of pickled objects. A "shelf" is a persistent, dictionary-like object. The difference with dbm databases is that the values (not the keys!) in a shelf can be essentially arbitrary Python objects -- anything that the "pickle" module can handle. This includes most class instances, recursive data type...
gpl-2.0
joone/chromium-crosswalk
native_client_sdk/src/build_tools/tests/verify_filelist_test.py
132
3854
#!/usr/bin/env python # Copyright (c) 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 os import sys import unittest SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) BUILD_TOOLS_DIR = os.path.dirname(SCR...
bsd-3-clause
benoitsteiner/tensorflow-xsmm
tensorflow/contrib/distributions/python/kernel_tests/mvn_diag_plus_low_rank_test.py
85
15449
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
gwr/samba
lib/dnspython/dns/rdtypes/ANY/HINFO.py
248
2659
# Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
gpl-3.0
sebrandon1/neutron
neutron/agent/l3/dvr_fip_ns.py
3
12410
# Copyright (c) 2015 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 ...
apache-2.0
sserrot/champion_relationships
venv/Lib/site-packages/pygments/styles/algol_nu.py
4
2278
# -*- coding: utf-8 -*- """ pygments.styles.algol_nu ~~~~~~~~~~~~~~~~~~~~~~~~ Algol publication style without underlining of keywords. This style renders source code for publication of algorithms in scientific papers and academic texts, where its format is frequently used. It is based on the ...
mit
j-griffith/cinder
cinder/manager.py
3
13090
# 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 except in compliance with the License. You may obtain # a ...
apache-2.0
frreiss/tensorflow-fred
tensorflow/python/ops/standard_ops.py
15
5803
# 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...
apache-2.0
poeschlr/kicad-3d-models-in-freecad
cadquery/FCAD_script_generator/Connector_Dsub/cq_common.py
4
16211
# -*- coding: utf8 -*- #!/usr/bin/python # #**************************************************************************** #* * #* base classes for generating part models in STEP AP214 * #* ...
gpl-2.0
turbinenreiter/micropython
tests/basics/int_big_and2.py
61
2185
# test + + print( 97989513389222316022151446562729620153292831887555425160965597396 & 23716683549865351578586448630079789776107310103486834795830390982) print( 53817081128841898634258263553430908085326601592682411889506742059 & 37042558948907407488299113387826240429667200950043601129661240876) print( 2616...
mit
tomka/CATMAID
django/applications/catmaid/views/image_block_source_importer.py
2
4518
# -*- coding: utf-8 -*- import json from django import forms from django.core.exceptions import ValidationError from django.contrib import messages from django.shortcuts import redirect from formtools.wizard.views import SessionWizardView from catmaid.models import ( Stack, StackMirror, Project, ProjectStack, S...
gpl-3.0
depristo/xvfbwrapper
setup.py
1
1339
#!/usr/bin/env python """disutils setup/install script for xvfbwrapper""" import os from distutils.core import setup this_dir = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(this_dir, 'README.rst')) as f: LONG_DESCRIPTION = '\n' + f.read() setup( name='xvfbwrapper', version='0.2....
mit
zstackorg/zstack-utility
kvmagent/kvmagent/plugins/ha_plugin.py
1
27718
from kvmagent import kvmagent from zstacklib.utils import jsonobject from zstacklib.utils import http from zstacklib.utils import log from zstacklib.utils import shell from zstacklib.utils import linux from zstacklib.utils import lvm from zstacklib.utils import thread import os.path import time import traceback import ...
apache-2.0
eblade/telegram
tkRAD/xml/rad_xml_window.py
2
1635
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ tkRAD - tkinter Rapid Application Development library (c) 2013+ Raphaël SEBAN <motus@laposte.net> 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 S...
mit
samuellefever/server-tools
auth_admin_passkey/model/res_config.py
61
3206
# -*- encoding: utf-8 -*- ############################################################################## # # Admin Passkey module for OpenERP # Copyright (C) 2013-2014 GRAP (http://www.grap.coop) # @author Sylvain LE GAL (https://twitter.com/legalsylvain) # # This program is free software: you can redistrib...
agpl-3.0
diegocortassa/TACTIC
src/context/client/tactic-api-python-4.0.api04/Lib/cmd.py
4
15367
"""A generic class to build line-oriented command interpreters. Interpreters constructed with this class obey the following conventions: 1. End of file on input is processed as the command 'EOF'. 2. A command is parsed out of each line by collecting the prefix composed of characters in the identchars member....
epl-1.0
gspilio/nova
nova/tests/api/openstack/compute/contrib/test_agents.py
13
6991
# Copyright 2012 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 agreed t...
apache-2.0