repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
rsouflaki/RallyRequirements
MURequirement.py
1
1127
class MURequirement: """A MU requirement""" def __init__(self, id, description, dateAdded): self.id = id self.description = description self.dateAdded = dateAdded #self.tests = tests self.tests = [] self.projects = [] def validForProject(storyId): s...
mit
Teino1978-Corp/pre-commit
pre_commit/commands/run.py
4
5763
from __future__ import print_function from __future__ import unicode_literals import logging import os import sys from pre_commit import color from pre_commit import git from pre_commit.logging_handler import LoggingHandler from pre_commit.output import get_hook_message from pre_commit.output import sys_stdout_write_...
mit
datalogics/scons
test/DVIPDF/makeindex.py
2
1957
#!/usr/bin/env python # # __COPYRIGHT__ # # 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, ...
mit
sravanimantha/yaml-cpp.old-api
test/gmock-1.7.0/gtest/xcode/Scripts/versiongenerate.py
3088
4536
#!/usr/bin/env python # # Copyright 2008, 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...
mit
kxliugang/edx-platform
openedx/core/lib/api/permissions.py
74
3045
from django.conf import settings from rest_framework import permissions from django.http import Http404 from student.roles import CourseStaffRole class ApiKeyHeaderPermission(permissions.BasePermission): def has_permission(self, request, view): """ Check for permissions by matching the configured...
agpl-3.0
ehsan/airmozilla
airmozilla/suggest/tests/test_helpers.py
12
2414
from nose.tools import eq_ from django.test import TestCase from django.contrib.auth.models import User from django.utils import timezone from funfactory.urlresolvers import reverse from airmozilla.suggest.helpers import ( next_url, state_description, truncate_url ) from airmozilla.main.models import Sugg...
bsd-3-clause
arborh/tensorflow
tensorflow/python/ops/gradient_checker_test.py
9
11694
# 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
dawangjiaowolaixunshan/runtime
deps/v8/test/test262/testcfg.py
5
5659
# Copyright 2012 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditi...
apache-2.0
wunderlins/learning
python/zodb/lib/linux64/ZODB/tests/testDemoStorage.py
2
8297
############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # TH...
gpl-2.0
bradhowes/pyslimp3
server/KeyProcessor.py
1
7084
# # Copyright (C) 2009, 2010 Brad Howes. # # This file is part of Pyslimp3. # # Pyslimp3 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, or (at your option) any later version. # # Pyslimp3 is...
gpl-3.0
mo-g/iris
lib/iris/tests/test_mapping.py
11
8113
# (C) British Crown Copyright 2010 - 2015, Met Office # # This file is part of Iris. # # Iris is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option) any l...
gpl-3.0
ApuliaSoftware/odoo
addons/account/report/account_invoice_report.py
224
12489
# -*- 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
pedja1/aNmap
dSploit/jni/nmap/zenmap/zenmapGUI/BugReport.py
4
12022
#!/usr/bin/env python # -*- coding: utf-8 -*- # ***********************IMPORTANT NMAP LICENSE TERMS************************ # * * # * The Nmap Security Scanner is (C) 1996-2013 Insecure.Com LLC. Nmap is * # * also a registered trademark of Inse...
gpl-3.0
hoosteeno/kuma
vendor/packages/babel/messages/catalog.py
34
30946
# -*- coding: utf-8 -*- """ babel.messages.catalog ~~~~~~~~~~~~~~~~~~~~~~ Data structures for message catalogs. :copyright: (c) 2013 by the Babel Team. :license: BSD, see LICENSE for more details. """ import re import time from cgi import parse_header from datetime import datetime, time as time_...
mpl-2.0
sszlm/MissionPlanner
Lib/site-packages/scipy/integrate/ode.py
55
25735
# Authors: Pearu Peterson, Pauli Virtanen, John Travers """ First-order ODE integrators. User-friendly interface to various numerical integrators for solving a system of first order ODEs with prescribed initial conditions:: d y(t)[i] --------- = f(t,y(t))[i], d t y(t=0)[i] = y0[i], where:: ...
gpl-3.0
PuZZleDucK/pixelated-user-agent
service/pixelated/extensions/requests_urllib3.py
10
3360
# # Copyright (c) 2014 ThoughtWorks, Inc. # # Pixelated 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 License, or # (at your option) any later version. # # Pixelated is distrib...
agpl-3.0
tobi-wan-kenobi/bumblebee-status
bumblebee_status/modules/contrib/spotify.py
1
6553
"""Displays the current song being played and allows pausing, skipping ahead, and skipping back. Requires the following library: * python-dbus Parameters: * spotify.format: Format string (defaults to '{artist} - {title}') Available values are: {album}, {title}, {artist}, {trackNumber} * spotify.la...
mit
dagwieers/ansible
lib/ansible/modules/network/fortios/fortios_webfilter_content_header.py
24
9059
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2018 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
gpl-3.0
Bolton-and-Menk-GIS/photos-to-map
PhotosToMap/photomapper/gpsimage/PIL/XpmImagePlugin.py
40
3081
# # The Python Imaging Library. # $Id$ # # XPM File handling # # History: # 1996-12-29 fl Created # 2001-02-17 fl Use 're' instead of 'regex' (Python 2.1) (0.7) # # Copyright (c) Secret Labs AB 1997-2001. # Copyright (c) Fredrik Lundh 1996-2001. # # See the README file for information on usage and redistribution. #...
gpl-3.0
Sixshaman/networkx
networkx/algorithms/isomorphism/tests/test_isomorphism.py
99
1183
#!/usr/bin/env python from nose.tools import * import networkx as nx from networkx.algorithms import isomorphism as iso class TestIsomorph: def setUp(self): self.G1=nx.Graph() self.G2=nx.Graph() self.G3=nx.Graph() self.G4=nx.Graph() self.G1.add_edges_from([ [1,2],[1,3],[1,5...
bsd-3-clause
kkdd/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/encodings/cp1006.py
593
13824
""" Python Character Mapping Codec cp1006 generated from 'MAPPINGS/VENDORS/MISC/CP1006.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors...
apache-2.0
NamelessRom/android_kernel_lge_omap4
tools/perf/scripts/python/netdev-times.py
11271
15048
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
gpl-2.0
jbaayen/sympy
sympy/plotting/plot_window.py
15
4511
from pyglet.gl import * from managed_window import ManagedWindow from plot_camera import PlotCamera from plot_controller import PlotController from time import clock class PlotWindow(ManagedWindow): def __init__(self, plot, **kwargs): """ Named Arguments =============== antialia...
bsd-3-clause
aferr/TimingCompartments
tests/long/se/50.vortex/test.py
21
1739
# Copyright (c) 2006-2007 The Regents of The University of Michigan # 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 ...
bsd-3-clause
tanwald/passpy
pass.py
1
3781
#!/usr/bin/env python import gi import logging import sys from ConfigParser import ConfigParser gi.require_version('Gtk', '3.0') from gi.repository import Gtk, Gio, GLib from keychain.keychain import Keychain from gui.window import Window from os import path #########################################################...
gpl-3.0
hsagulo/mx
node_modules/grunt-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py
1835
1748
#!/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-flock-tool when using the Makefile generator. Used on systems that don't have a built-in flock.""" ...
mit
windyuuy/opera
chromium/src/third_party/jinja2/meta.py
406
4144
# -*- coding: utf-8 -*- """ jinja2.meta ~~~~~~~~~~~ This module implements various functions that exposes information about templates that might be interesting for various kinds of applications. :copyright: (c) 2010 by the Jinja Team, see AUTHORS for more details. :license: BSD, see LICENSE fo...
bsd-3-clause
rockneurotiko/django
tests/string_lookup/tests.py
290
2573
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.test import TestCase from .models import Article, Bar, Base, Child, Foo, Whiz class StringLookupTests(TestCase): def test_string_form_referencing(self): """ Regression test for #1661 and #1662 Check that string...
bsd-3-clause
bewing/napalm-base
napalm_base/clitools/helpers.py
2
3676
# -*- coding: utf-8 -*- ''' NAPALM CLI Tools: helpers ========================= Defines helpers for the CLI tools. ''' from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals # stdlib import ast import sys import logging import getpass import argparse impor...
apache-2.0
kalahbrown/HueBigSQL
desktop/core/ext-py/markdown/markdown/commandline.py
126
3534
""" COMMAND-LINE SPECIFIC STUFF ============================================================================= The rest of the code is specifically for handling the case where Python Markdown is called from the command line. """ import markdown import sys import logging from logging import DEBUG, INFO, WARN, ERROR, CR...
apache-2.0
nextgis/NextGIS_QGIS_open
python/plugins/processing/ui/ui_DlgHelpEdition.py
6
4336
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'DlgHelpEdition.ui' # # Created: Fri Nov 21 13:25:47 2014 # by: PyQt4 UI code generator 4.11.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except...
gpl-2.0
askulkarni2/fabric
fabric/colors.py
57
1149
""" .. versionadded:: 0.9.2 Functions for wrapping strings in ANSI color codes. Each function within this module returns the input string ``text``, wrapped with ANSI color codes for the appropriate color. For example, to print some text as green on supporting terminals:: from fabric.colors import green pri...
bsd-2-clause
stonegithubs/odoo
addons/payment_buckaroo/controllers/main.py
325
1270
# -*- coding: utf-8 -*- try: import simplejson as json except ImportError: import json import logging import pprint import werkzeug from openerp import http, SUPERUSER_ID from openerp.http import request _logger = logging.getLogger(__name__) class BuckarooController(http.Controller): _return_url = '/pa...
agpl-3.0
ossobv/exactonline
exactonline/api/manager.py
1
3444
# vim: set ts=8 sw=4 sts=4 et ai tw=79: """ Base manager class for resource helpers. This file is part of the Exact Online REST API Library in Python (EORALP), licensed under the LGPLv3+. Copyright (C) 2015-2018 Walter Doekes, OSSO B.V. """ from ..exceptions import MultipleObjectsReturned, ObjectDoesNotExist from ..ht...
lgpl-3.0
openstack/os-win
os_win/utils/hostutils.py
1
17843
# Copyright 2013 Cloudbase Solutions Srl # 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 r...
apache-2.0
loris0/Cuivre
cuivre/bundle.py
1
4154
"""Convergence notary bundle type.""" # Copyright (c) 2011-2013 Loris Cuoghi <loris.cuoghi@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 published by # the Free Software Foundation, either version 3 of the License, or # (at...
gpl-3.0
sujoykroy/motion-picture
editor/MotionPicture/gui_utils/__init__.py
1
1739
from .helper_dialogs import TextInputDialog, YesNoDialog from .name_value_combo_box import NameValueComboBox from .file_op import FileOp, FileSelect from .misc_prop_boxes import CommonShapePropBox from .misc_prop_boxes import RectangleShapePropBox from .misc_prop_boxes import OvalShapePropBox from .misc_prop_boxes imp...
gpl-3.0
kevinmel2000/brython
www/src/Lib/test/unittests/test_kqueue.py
27
6772
""" Tests for kqueue wrapper. """ import errno import os import select import socket import sys import time import unittest from test import support if not hasattr(select, "kqueue"): raise unittest.SkipTest("test works only on BSD") class TestKQueue(unittest.TestCase): def test_create_queue(self): kq ...
bsd-3-clause
aishee/sqlalchemy-migrate
migrate/tests/versioning/test_version.py
32
5951
#!/usr/bin/env python # -*- coding: utf-8 -*- from migrate.exceptions import * from migrate.versioning.version import * from migrate.tests import fixture class TestVerNum(fixture.Base): def test_invalid(self): """Disallow invalid version numbers""" versions = ('-1', -1, 'Thirteen', '') f...
mit
gwct/core
legacy-scripts/count_pos.py
1
2952
#!/usr/bin/python ############################################################################# #Script to count the total number of positions in a fasta file or a directory full of fasta files. # #Usage: python count_pos.py [input file or directory] [1,0] # #The script first checks if the input is a file or directory....
gpl-3.0
renzon/pswdless
backend/test/base.py
31
2338
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import json import unittest from google.appengine.api import files from google.appengine.ext import testbed import webapp2 from webapp2_extras import i18n from config.template import render # workaround for i18n. without this test will n...
gpl-2.0
gorjuce/odoo
addons/analytic_contract_hr_expense/analytic_contract_hr_expense.py
223
7860
# -*- 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
ClovisIRex/Snake-django
env/lib/python3.6/site-packages/django/contrib/auth/urls.py
105
1140
# The views used below are normally mapped in django.contrib.admin.urls.py # This URLs file is used to provide a reliable view deployment for test purposes. # It is also provided as a convenience to those who want to deploy these URLs # elsewhere. from django.conf.urls import url from django.contrib.auth import views ...
mit
robjordan/sitefinder
src/sitefinder_project/settings/production.py
1
1817
# In production set the environment variable like this: # DJANGO_SETTINGS_MODULE=sitefinder_project.settings.production from .base import * # NOQA import logging.config # For security and performance reasons, DEBUG is turned off DEBUG = False TEMPLATE_DEBUG = False # Must mention ALLOWED_HOSTS in produ...
mit
jellis18/libstempo
libstempo/utils.py
2
2332
"""Utility functions for noise models.""" import numpy as np def quantize_fast(times, flags, dt=1.0): isort = np.argsort(times) bucket_ref = [times[isort[0]]] bucket_ind = [[isort[0]]] for i in isort[1:]: if times[i] - bucket_ref[-1] < dt and flags[i] != "": bucket_ind[-1].appen...
mit
anurag-ks/eden
modules/templates/MCOP/controllers.py
19
7385
# -*- coding: utf-8 -*- from gluon import current from gluon.html import * from s3 import FS, S3CustomController THEME = "MCOP" # ============================================================================= class index(S3CustomController): """ Custom Home Page """ def __call__(self): response = cu...
mit
suto/infernal-twin
build/reportlab/build/lib.linux-i686-2.7/reportlab/lib/colors.py
31
35959
#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/lib/colors.py __version__=''' $Id$ ''' __doc__='''Defines standard colour-handling classes and colour names. We define standard classes to hold colour...
gpl-3.0
fyndsi/Django-facebook
docs/docs_env/Lib/encodings/iso2022_jp_2004.py
816
1073
# # iso2022_jp_2004.py: Python Unicode Codec for ISO2022_JP_2004 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_iso2022, codecs import _multibytecodec as mbc codec = _codecs_iso2022.getcodec('iso2022_jp_2004') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class I...
bsd-3-clause
TeutoNet-Netzdienste/ansible
v2/ansible/utils/hashing.py
14
3090
# (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
codypiersall/mlab
src/mlab/mlabraw.py
2
2298
#!/usr/bin/env python ''' A quick and a bit less dirty hack to wrap matlabpipe/matlabcom as if they were mlabraw. Author: Dani Valevski <daniva@gmail.com> Yauhen Yakimovich <eugeny.yakimovitch@gmail.com> License: MIT ''' import platform is_win = platform.system() == 'Windows' if is_win: from matlabcom imp...
mit