repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
bartvm/pylearn2
pylearn2/scripts/dbm/show_negative_chains.py
37
2849
#!/usr/bin/env python """ Usage: python show_negative_chains.py <path_to_a_saved_DBM.pkl> Show negative chains of a saved DBM model. """ from __future__ import print_function __authors__ = "Ian Goodfellow" __copyright__ = "Copyright 2012, Universite de Montreal" __credits__ = ["Ian Goodfellow"] __license__ = "3-claus...
bsd-3-clause
arbrandes/edx-platform
lms/djangoapps/course_blocks/transformers/load_override_data.py
9
2595
""" Load Override Data Transformer """ import json from lms.djangoapps.courseware.models import StudentFieldOverride from openedx.core.djangoapps.content.block_structure.transformer import BlockStructureTransformer # The list of fields are in support of Individual due dates and could be expanded for other use cases...
agpl-3.0
Knowledge-is-Power/Movie-Platform
node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
2779
1665
# 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. """gypsh output module gypsh is a GYP shell. It's not really a generator per se. All it does is fire up an interactive Python session with a few local variables...
mit
edmundgentle/schoolscript
SchoolScript/bin/Debug/pythonlib/Lib/distutils/tests/test_sdist.py
1
12108
"""Tests for distutils.command.sdist.""" import os import unittest import shutil import zipfile from os.path import join import sys import tempfile import warnings from test.support import captured_stdout, check_warnings, run_unittest from distutils.command.sdist import sdist, show_formats from distutils...
gpl-2.0
JGarcia-Panach/odoo
addons/payment_ogone/tests/test_ogone.py
430
9309
# -*- coding: utf-8 -*- from lxml import objectify import time import urlparse from openerp.addons.payment.models.payment_acquirer import ValidationError from openerp.addons.payment.tests.common import PaymentAcquirerCommon from openerp.addons.payment_ogone.controllers.main import OgoneController from openerp.tools i...
agpl-3.0
marcsans/cnn-physics-perception
phy/lib/python2.7/site-packages/numpy/lib/function_base.py
15
150516
from __future__ import division, absolute_import, print_function import warnings import sys import collections import operator import numpy as np import numpy.core.numeric as _nx from numpy.core import linspace, atleast_1d, atleast_2d from numpy.core.numeric import ( ones, zeros, arange, concatenate, array, asarr...
mit
AlexHill/django
django/db/backends/postgresql_psycopg2/introspection.py
81
9244
from __future__ import unicode_literals from django.db.backends import BaseDatabaseIntrospection, FieldInfo from django.utils.encoding import force_text class DatabaseIntrospection(BaseDatabaseIntrospection): # Maps type codes to Django Field types. data_types_reverse = { 16: 'BooleanField', ...
bsd-3-clause
android-ia/platform_external_chromium_org_testing_gtest
test/gtest_catch_exceptions_test.py
2139
9901
#!/usr/bin/env python # # Copyright 2010 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 o...
bsd-3-clause
usc-isi/nova
nova/network/quantum/nova_ipam_lib.py
7
12127
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Nicira Networks, 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.apach...
apache-2.0
AttiJeong98/Solid_Kernel-Stock
tools/perf/scripts/python/syscall-counts.py
11181
1522
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
gpl-2.0
tima/ansible
lib/ansible/modules/network/ordnance/ordnance_facts.py
43
8505
#!/usr/bin/python # # Copyright: Ansible Project # 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', 'status': ['preview'],...
gpl-3.0
hbrunn/OCB
addons/stock_landed_costs/__init__.py
373
1087
# -*- 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
louispotok/pandas
pandas/tests/scalar/test_nat.py
3
10360
import pytest from datetime import datetime, timedelta import pytz import numpy as np from pandas import (NaT, Index, Timestamp, Timedelta, Period, DatetimeIndex, PeriodIndex, TimedeltaIndex, Series, isna) from pandas.util import testing as tm from pandas._libs.tslib import iNa...
bsd-3-clause
madsryvang/LVsbp
python/sbp/acquisition.py
5
6151
#!/usr/bin/env python # Copyright (C) 2015 Swift Navigation Inc. # Contact: Fergus Noble <fergus@swiftnav.com> # # This source is subject to the license found in the file 'LICENSE' which must # be be distributed together with this source. All other rights reserved. # # THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITH...
lgpl-3.0
rui-castro/Sick-Beard
lib/six.py
547
20588
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2013 Benjamin Peterson # # 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 with...
gpl-3.0
jeffery-do/Vizdoombot
doom/lib/python3.5/site-packages/pip/operations/check.py
342
1590
def check_requirements(installed_dists): missing_reqs_dict = {} incompatible_reqs_dict = {} for dist in installed_dists: key = '%s==%s' % (dist.project_name, dist.version) missing_reqs = list(get_missing_reqs(dist, installed_dists)) if missing_reqs: missing_reqs_dict[...
mit
gpsgibb/tetr_lev00_Chimera_plugin
ChimeraExtension.py
2
1635
# -*- coding: utf-8 -*- """ Created on Tue May 31 10:40:14 2016 @author: jeremy """ import chimera.extension class TetrEMO(chimera.extension.EMO): def name(self): return 'Tetr' def description(self): return 'Run the Tetr utility' def categories(self): return ['Utilities'] d...
bsd-2-clause
inovtec-solutions/OpenERP
openerp/addons/hr_payroll_account/__init__.py
433
1116
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # d$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
lrocheWB/navitia
source/jormungandr/jormungandr/module_resource.py
3
2362
# coding=utf-8 # Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open p...
agpl-3.0
unicri/edx-platform
openedx/core/djangoapps/user_api/tests/test_views.py
11
67189
"""Tests for the user API at the HTTP request level. """ import datetime import base64 import json import re from unittest import skipUnless, SkipTest import ddt import httpretty from pytz import UTC import mock from django.conf import settings from django.core.urlresolvers import reverse from django.core import mai...
agpl-3.0
lgarren/spack
var/spack/repos/builtin/packages/libxsmm/package.py
3
4859
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
Nicop06/ansible
lib/ansible/modules/system/facter.py
25
1368
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # 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': '...
gpl-3.0
fredRos/pypmc
doc/conf.py
1
8272
# -*- coding: utf-8 -*- # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys, os # If extensions (or modules to document with autodoc) are in another directory, #...
gpl-2.0
Universal-Model-Converter/UMC3.0a
data/Python/x86/Lib/site-packages/OpenGL/GL/EXT/texture_snorm.py
4
1079
'''OpenGL extension EXT.texture_snorm This module customises the behaviour of the OpenGL.raw.GL.EXT.texture_snorm to provide a more Python-friendly API Overview (from the spec) Fixed-point textures in unextended OpenGL have integer components, but those values are taken to represent floating-point values in th...
mit
zodex/lge-kernel-clean
scripts/gcc-wrapper.py
501
3410
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2011-2012, Code Aurora Forum. 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 a...
gpl-2.0
qkitgroup/qkit
qkit/drivers/Anritsu_VNA.py
1
29225
# Anritsu_VNA.py # Pascal Macha <pascalmacha@googlemail.com>, 2010 # # 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. # ...
gpl-2.0
sergeneren/anima
anima/env/mayaEnv/ui.py
1
6823
# -*- coding: utf-8 -*- # Copyright (c) 2012-2015, Anima Istanbul # # This module is part of anima-tools and is released under the BSD 2 # License: http://www.opensource.org/licenses/BSD-2-Clause """Anima Previs Editor """ import os import pymel import anima from anima.env.mayaEnv import Maya from pymel import core...
bsd-2-clause
proxysh/Safejumper-for-Desktop
buildmac/Resources/env/lib/python2.7/site-packages/twisted/logger/test/test_file.py
13
5622
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Test cases for L{twisted.logger._file}. """ from io import StringIO from zope.interface.verify import verifyObject, BrokenMethodImplementation from twisted.trial.unittest import TestCase from twisted.python.failure import Failure from twis...
gpl-2.0
sergeykolychev/mxnet
example/image-classification/train_cifar10.py
41
2423
# 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
ramadhane/odoo
addons/account/wizard/account_report_partner_ledger.py
378
3538
# -*- 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
boa19861105/B2-Test
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
11088
3246
# Core.py - Python extension for perf script, core functions # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. from collections import defaultdict def aut...
gpl-2.0
Botong/Data_Pipeline_Byte1
lib/werkzeug/contrib/iterio.py
318
10718
# -*- coding: utf-8 -*- r""" werkzeug.contrib.iterio ~~~~~~~~~~~~~~~~~~~~~~~ This module implements a :class:`IterIO` that converts an iterator into a stream object and the other way round. Converting streams into iterators requires the `greenlet`_ module. To convert an iterator into a stream...
apache-2.0
jonathanwcrane/boto
boto/sdb/db/manager/xmlmanager.py
153
18612
# Copyright (c) 2006-2008 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...
mit
davidcusatis/horizon
openstack_dashboard/dashboards/project/networks/subnets/tables.py
61
5330
# Copyright 2012 NEC Corporation # # 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 ag...
apache-2.0
r0e/servo
tests/wpt/css-tests/tools/webdriver/webdriver/keys.py
263
1481
"""Constants for special keys.""" class Keys: """Constants for special keys.""" NULL = '\uE000' CANCEL = '\uE001' HELP = '\uE002' BACK_SPACE = '\uE003' TAB = '\uE004' CLEAR = '\uE005' RETURN = '\uE006' ENTER = '\uE007' SHIFT = '\uE008' LEFT_SHIFT = '\uE008' CONTROL = '\u...
mpl-2.0
elssar/calibre
src/calibre/utils/recycle_bin.py
14
5429
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import print_function __license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import os, shutil, time, sys from calibre import isbytestring from calibre.constant...
gpl-3.0
Charlex/django-calaccess-raw-data
example/project/settings.py
28
1539
import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) REPO_DIR = os.path.join(BASE_DIR, os.pardir) SECRET_KEY = 'w11nbg_3n4+e@qk^b55qgo5qygesn^3=&s1kwtlbpkai$(1jv3' DEBUG = False TEMPLATE_DEBUG = True ALLOWED_HOSTS = [ 'localhost', '127.0.0.1', ] STATIC_ROOT = os.path.join(BASE_DIR, ".static") INSTAL...
mit
ahamilton55/ansible
lib/ansible/modules/packaging/language/bower.py
70
7403
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Michael Warkentin <mwarkentin@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 ...
gpl-3.0
idncom/odoo
addons/base_report_designer/wizard/base_report_designer_modify.py
314
6128
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
yashaswi-reddy/icsisumm
icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk/classify/naivebayes.py
9
9711
# Natural Language Toolkit: Naive Bayes Classifiers # # Copyright (C) 2001-2008 University of Pennsylvania # Author: Edward Loper <edloper@gradient.cis.upenn.edu> # URL: <http://nltk.sf.net> # For license information, see LICENSE.TXT # # $Id: naivebayes.py 2063 2004-07-17 21:02:24Z edloper $ """ A classifier based on ...
gpl-3.0
SUSE/azure-sdk-for-python
azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/azure_iaa_svm_error_info.py
4
1546
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
apark263/tensorflow
tensorflow/contrib/quantization/python/nn_ops.py
179
1142
# 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
ptdtan/Ragout
lib/networkx/linalg/spectrum.py
35
2271
""" Eigenvalue spectrum of graphs. """ # Copyright (C) 2004-2011 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. import networkx as nx __author__ = "\n".join(['Aric Hagberg (hagberg@lanl.gov)', ...
gpl-3.0
thesuperzapper/tensorflow
tensorflow/python/ops/math_ops.py
1
80610
# 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
lfz/Guided-Denoise
Attackset/Iter4_v4_eps16/nets/resnet_v1.py
33
15274
# 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 applicable ...
apache-2.0
demarle/VTK
Examples/Infovis/Python/csv_to_graph.py
27
1777
#!/usr/bin/env python from vtk import * FILENAME_VERT_TABLE = "nodes.csv" FILENAME_EDGE_TABLE = "edges.csv" # Load the vertex table from CSV file csv_vert_source = vtkDelimitedTextReader() csv_vert_source.SetFieldDelimiterCharacters(",") csv_vert_source.DetectNumericColumnsOn() csv_vert_source.SetHaveHeaders(True) ...
bsd-3-clause
michaelkourlas/gini
backend/src/gloader/xml/dom/html/HTMLAreaElement.py
10
2959
######################################################################## # # File Name: HTMLAreaElement # # ### This file is automatically generated by GenerateHtml.py. ### DO NOT EDIT! """ WWW: http://4suite.com/4DOM e-mail: support@4suite.com Copyright (c) 2000 Fourthought Inc, USA. All Rights...
mit
adelina-t/nova
nova/tests/unit/scheduler/filters/test_trusted_filters.py
56
12674
# 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
karlgrz/karlgrz.com-plugins
disqus_static/disqus_static.py
2
2911
# -*- coding: utf-8 -*- """ Disqus static comment plugin for Pelican ==================================== This plugin adds a disqus_comments property to all articles. Comments are fetched at generation time using disqus API. """ from disqusapi import DisqusAPI, Paginator from pelican import signals def init...
agpl-3.0
tlakshman26/cinder-new-branch
cinder/tests/unit/keymgr/test_barbican.py
16
10681
# Copyright (c) 2014 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 License at # # http://www.apache.org/...
apache-2.0
adrienbrault/home-assistant
homeassistant/components/roomba/braava.py
5
4506
"""Class for Braava devices.""" import logging from homeassistant.components.vacuum import SUPPORT_FAN_SPEED from .irobot_base import SUPPORT_IROBOT, IRobotVacuum _LOGGER = logging.getLogger(__name__) ATTR_DETECTED_PAD = "detected_pad" ATTR_LID_CLOSED = "lid_closed" ATTR_TANK_PRESENT = "tank_present" ATTR_TANK_LEVE...
mit
aolindahl/epicea
epicea/_electron_calibration_helper.py
1
16761
# -*- coding: utf-8 -*- """ Created on Wed Mar 4 10:35:23 2015 @author: Anton O Lindhal """ import numpy as np import lmfit from . progress import update_progress _2pi = 2 * np.pi _gauss_fwhm_factor = 2 * np.sqrt(2 * np.log(2)) def gaussian(x, amplitude, center, sigma): return amplitude * np.exp(-(x-center)**...
gpl-2.0
soarpenguin/ansible
contrib/inventory/foreman.py
29
16408
#!/usr/bin/env python # vim: set fileencoding=utf-8 : # # Copyright (C) 2016 Guido Günther <agx@sigxcpu.org>, # Daniel Lobato Garcia <dlobatog@redhat.com> # # This script is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # t...
gpl-3.0
fgesora/odoo
addons/mrp/__openerp__.py
259
3564
# -*- 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
tectronics/arsenalsuite
cpp/apps/burner/plugins/fusion.py
11
9309
from blur.Stone import * from blur.Classes import * from blur.Burner import * from PyQt4.QtCore import * from PyQt4.QtSql import * import re, traceback class FusionBurner(JobBurner): def __init__(self,job,slave): JobBurner.__init__(self,job,slave) self.Job = job self.Slave = slave self.CurrentFrame = None s...
gpl-2.0
jaredweiss/nupic
nupic/regions/ImageSensorFilters/PadToFit.py
17
2066
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, 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...
gpl-3.0
eunchong/build
third_party/twisted_10_2/twisted/runner/procmon.py
49
10916
# -*- test-case-name: twisted.runner.test.test_procmon -*- # Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ Support for starting, monitoring, and restarting child process. """ import warnings from twisted.python import log from twisted.internet import error, protocol, reactor as _...
bsd-3-clause
dwiprabowo/tambalban-server
user_guide_src/source/conf.py
10
8546
# -*- coding: utf-8 -*- # # CodeIgniter documentation build configuration file, created by # sphinx-quickstart on Sun Aug 28 07:24:38 2011. # # 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. # #...
mit
kirca/OpenUpgrade
openerp/addons/base/tests/test_expression.py
260
29589
import unittest2 import openerp from openerp.osv.expression import get_unaccent_wrapper from openerp.osv.orm import BaseModel import openerp.tests.common as common class test_expression(common.TransactionCase): def _reinit_mock(self): self.query_list = list() def _mock_base_model_where_calc(self, mo...
agpl-3.0
dybiszb/ParallelisingConwaysGameOfLife
testing/catch/scripts/fixWhitespace.py
46
1319
#!/usr/bin/env python from __future__ import print_function import os from scriptCommon import catchPath changedFiles = 0 def isSourceFile( path ): return path.endswith( ".cpp" ) or path.endswith( ".h" ) or path.endswith( ".hpp" ) def fixAllFilesInDir( dir ): for f in os.listdir( dir ): path = os....
mit
miurahr/translate
translate/storage/qph.py
25
5194
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2008, 2010 Zuza Software Foundation # # This file is part of translate. # # translate 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 ...
gpl-2.0
fhoring/autorest
src/generator/AutoRest.Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/operations/inheritance_operations.py
1
4687
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
darjeeling/django
tests/modeladmin/tests.py
8
27039
from datetime import date from django import forms from django.contrib.admin.models import LogEntry from django.contrib.admin.options import ( HORIZONTAL, VERTICAL, ModelAdmin, TabularInline, ) from django.contrib.admin.sites import AdminSite from django.contrib.admin.widgets import AdminDateWidget, AdminRadioSele...
bsd-3-clause
seanli9jan/tensorflow
tensorflow/contrib/learn/python/learn/evaluable.py
18
5277
# 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
eduardoklosowski/palestrita
palestra/migrations/0001_initial.py
1
3029
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.core.validators class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Palestra', fields=[ ...
mit
NeuralEnsemble/neuroConstruct
lib/jython/Lib/test/test_docxmlrpc.py
67
8008
from DocXMLRPCServer import DocXMLRPCServer import httplib import sys from test import test_support threading = test_support.import_module('threading') import time import socket import unittest PORT = None def make_request_and_skipIf(condition, reason): # If we skip the test, we have to make a request because the...
gpl-2.0
gregorschatz/pymodbus3
examples/common/callback-server.py
3
5075
#!/usr/bin/env python ''' Pymodbus Server With Callbacks -------------------------------------------------------------------------- This is an example of adding callbacks to a running modbus server when a value is written to it. In order for this to work, it needs a device-mapping file. ''' #--------------------------...
bsd-3-clause
SnakeJenny/TensorFlow
tensorflow/python/training/training_ops.py
131
1046
# 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
mat128/netman
tests/global_reactor.py
2
1997
# Copyright 2015 Internap. # # 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, so...
apache-2.0
TurangaLeela/lambdamod
source/exam_additional.py
1
1292
#1 #Поиск работает в основном быстрее для set и dict т.к это hash таблицы. #Перебор элементов быстрее в list и tuple,т.к это обычные массивы а set и dict для этого не предназначены. #2 #Разница в том, что в первом случае массив будет содеержать три указателя на дин и тот же массив. # Если мы изменим элемент в одном из...
gpl-2.0
infoINGenieria/Zweb
z_web/core/migrations/0018_auto_20170812_1333.py
1
1025
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings def crear_unidad_negocio_y_asociar(apps, schema_editor): UnidadNegocio = apps.get_model('organizacion.UnidadNegocio') ms, _ = UnidadNegocio.objects.get_or_create(codigo='M...
gpl-2.0
itziakos/haas
haas/haas_application.py
3
5152
# -*- coding: utf-8 -*- # Copyright (c) 2013-2014 Simon Jagoe # All rights reserved. # # This software may be modified and distributed under the terms # of the 3-clause BSD license. See the LICENSE.txt file for details. from __future__ import absolute_import, unicode_literals import argparse import os import haas fr...
bsd-3-clause
Iconoclasteinc/tgit
cute/robot.py
1
4559
# -*- coding: utf-8 -*- import time from PyQt5.QtCore import Qt, QPoint from PyQt5.QtGui import QCursor from PyQt5.QtTest import QTest from PyQt5.QtWidgets import QApplication from . import event_loop from .gestures import Automaton, MIN_TIME_TO_AVOID_DOUBLE_CLICK ONE_SECOND_IN_MILLIS = 1000 class KeyboardLayout: ...
gpl-3.0
moazzemi/HAMEX
cpu/gem5/tests/configs/learning-gem5-p1-simple.py
2
1862
# -*- coding: utf-8 -*- # Copyright (c) 2015 Jason Lowe-Power # 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 o...
mit
jfmartinez64/test
libs/suds/cache.py
164
9133
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
gpl-3.0
gabrielfalcao/lettuce
tests/integration/lib/Django-1.3/tests/regressiontests/views/tests/specials.py
99
1326
# coding: utf-8 from django.test import TestCase class URLHandling(TestCase): """ Tests for URL handling in views and responses. """ redirect_target = "/views/%E4%B8%AD%E6%96%87/target/" def test_combining_redirect(self): """ Tests that redirecting to an IRI, requiring encoding bef...
gpl-3.0
itucsdb1618/itucsdb1618
favorite.py
1
3818
import psycopg2 as dbapi2 import datetime class Favorite: def __init__(self, app): self.app = app def initialize_Favorite(self): with dbapi2.connect(self.app.config['dsn']) as connection: try: cursor = connection.cursor() cursor.execute(""...
gpl-3.0
ninuxorg/netengine
netengine/backends/snmp/openwrt.py
1
12930
""" NetEngine SNMP OpenWRT backend """ __all__ = ['OpenWRT'] import binascii from datetime import timedelta from netengine.backends.snmp import SNMP class OpenWRT(SNMP): """ OpenWRT SNMP backend """ _oid_to_retrieve = '1.3.6.1.2.1.2.2.1.1' _interface_dict = {} def __str__(self): ...
mit
sunlightlabs/python-transparencydata
docs/conf.py
1
7356
# -*- coding: utf-8 -*- # # python-transparencydata documentation build configuration file, created by # sphinx-quickstart on Fri Mar 18 11:16:10 2011. # # 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 # autogenerat...
bsd-3-clause
admetricks/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/layout_tests/views/printing.py
117
18029
# Copyright (C) 2010, 2012 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions an...
bsd-3-clause
halfbro/juliet
juliet_graphics.py
1
5199
import os import pygame from threading import Thread import juliet_importer from juliet_input import Juliet_Input BLACK = (0,0,0) WHITE = (255,255,255) class Juliet_Graphics (Thread): screen = None current_modules = [] stop_running = False def __init__(self): Thread.__init__(self) sel...
bsd-2-clause
anthkris/oppia
core/controllers/dashboard_test.py
4
27082
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
apache-2.0
feliperfranca/django-nonrel-example
django/conf/locale/pt_BR/formats.py
231
1530
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r'j \de N \de Y' TIME_FORMAT = 'H:i' DATETIME_FORMAT = r'j \de N \de Y à\s...
bsd-3-clause
mikalstill/nova
nova/tests/functional/api_sample_tests/test_migrate_server.py
2
7507
# Copyright 2012 Nebula, Inc. # Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
apache-2.0
sym3tri/mitro
browser-ext/third_party/firefox-addon-sdk/python-lib/cuddlefish/tests/__init__.py
35
1531
# 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 os import unittest import doctest import glob env_root = os.environ['CUDDLEFISH_ROOT'] def get_tests(): imp...
gpl-3.0
silkyar/570_Big_Little
tests/configs/o3-timing-mp-ruby.py
7
2393
# 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
vladryk/horizon
horizon/browsers/breadcrumb.py
86
1803
# Copyright 2012 Nebula, 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 agree...
apache-2.0
kamalx/edx-platform
lms/djangoapps/discussion_api/tests/test_permissions.py
1
3008
""" Tests for discussion API permission logic """ import itertools from unittest import TestCase import ddt from discussion_api.permissions import can_delete, get_editable_fields from lms.lib.comment_client.comment import Comment from lms.lib.comment_client.thread import Thread from lms.lib.comment_client.user import...
agpl-3.0
KaranToor/MA450
google-cloud-sdk/.install/.backup/lib/googlecloudsdk/api_lib/cloudkms/base.py
2
1436
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
apache-2.0
mbauskar/tele-frappe
frappe/desk/search.py
13
4091
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # Search from __future__ import unicode_literals import frappe import frappe.desk.reportview from frappe.utils import cstr, unique # this is called by the Link Field @frappe.whitelist() def search_link(doctype, txt, qu...
mit
katstalk/android_external_chromium_org
tools/telemetry/telemetry/core/platform/profiler/android_screen_recorder_profiler.py
23
1438
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import subprocess from telemetry.core import util from telemetry.core.backends.chrome import android_browser_finder from telemetry.core.platform i...
bsd-3-clause
MER-GROUP/intellij-community
python/helpers/py3only/docutils/utils/urischemes.py
154
6275
# $Id: urischemes.py 7464 2012-06-25 13:16:03Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ `schemes` is a dictionary with lowercase URI addressing schemes as keys and descriptions as values. It was compiled from the index at http://www.iana.or...
apache-2.0
nysan/yocto-autobuilder
lib/python2.6/site-packages/buildbot-0.8.4p1-py2.6.egg/buildbot/status/base.py
4
2492
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
cp16net/virgo-base
tools/gyp/test/include_dirs/gyptest-default.py
102
1073
#!/usr/bin/env python # Copyright (c) 2009 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. """ Verifies use of include_dirs when using the default build target. """ import TestGyp test = TestGyp.TestGyp() if test.format == 'scon...
apache-2.0
yangdw/repo.python
src/annotation/WeRoBot/docs/conf.py
13
7983
# -*- coding: utf-8 -*- # # WeRoBot documentation build configuration file, created by # sphinx-quickstart on Mon Feb 4 16:51:10 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. # # All...
mit
simonwydooghe/ansible
lib/ansible/modules/cloud/azure/azure_rm_rediscachefirewallrule.py
24
10947
#!/usr/bin/python # # Copyright (c) 2019 Yunge Zhu, <yungez@microsoft.com> # # 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
lumy/mingus
mingus/extra/fft.py
10
6014
#!/usr/bin/python # -*- coding: utf-8 -*- # mingus - Music theory Python package, fft module. # Copyright (C) 2008-2009, Bart Spaans # # 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 Foundat...
gpl-3.0
ashemedai/ansible
lib/ansible/modules/utilities/logic/async_status.py
56
3386
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>, and others # # 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 ...
gpl-3.0
twz915/django
tests/template_backends/test_utils.py
133
1803
from django.core.exceptions import ImproperlyConfigured from django.template import engines from django.test import SimpleTestCase, override_settings class TemplateUtilsTests(SimpleTestCase): @override_settings(TEMPLATES=[{'BACKEND': 'raise.import.error'}]) def test_backend_import_error(self): """ ...
bsd-3-clause
morenopc/edx-platform
common/lib/xmodule/xmodule/tests/test_xblock_wrappers.py
3
14068
""" Tests for the wrapping layer that provides the XBlock API using XModule/Descriptor functionality """ # For tests, ignore access to protected members # pylint: disable=protected-access import webob import ddt from factory import ( BUILD_STRATEGY, Factory, lazy_attribute, LazyAttributeSequence, p...
agpl-3.0