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
weaver-viii/EventSource
test_server/evsutils/log.py
4
4140
# -*- coding: utf-8 -*- """ shared.log ~~~~~~~~~~ AmvTek attend to take control of twisted logging :copyright: (c) 2012 by sc AmvTek srl :email: devel@amvtek.com """ import sys from logging import DEBUG,INFO,WARNING,ERROR,FATAL from zope.interface import implements from twisted.python import co...
mit
idncom/odoo
addons/l10n_in_hr_payroll/__init__.py
430
1117
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP SA (<http://openerp.com>). All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under th...
agpl-3.0
t1g0r/npyscreen
npyscreen/wgmultilinetree.py
15
15458
#!/usr/bin/python import curses import weakref from . import wgmultiline as multiline from . import wgtextbox as textbox from npyscreen.compatibility_code import npysNPSTree as NPSTree from .npysTree import TreeData class TreeLine(textbox.TextfieldBase): def __init__(self, *args, **keywords): sel...
bsd-2-clause
aospx-kitkat/platform_external_chromium_org
chrome/test/chromedriver/util.py
30
4177
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Generic utilities for all python scripts.""" import atexit import httplib import os import signal import stat import subprocess import sys import tem...
bsd-3-clause
datacratic/StarCluster
utils/missingcloud.py
19
6969
import sys import time import json import urllib2 import traceback from BeautifulSoup import BeautifulSoup as bs from starcluster import config class MissingCloud(object): ITYPES_HTML_URL = "http://aws.amazon.com/ec2/instance-types/" LINUX_OD_JSON = " http://aws.amazon.com/ec2/pricing/json/linux-od.json" ...
gpl-3.0
rhertzog/django
tests/forms_tests/widget_tests/test_passwordinput.py
247
1052
from django.forms import PasswordInput from .base import WidgetTest class PasswordInputTest(WidgetTest): widget = PasswordInput() def test_render(self): self.check_html(self.widget, 'password', '', html='<input type="password" name="password" />') def test_render_ignore_value(self): sel...
bsd-3-clause
matk86/pymatgen
pymatgen/analysis/tests/test_substrate_analyzer.py
7
2937
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals """ TODO: Modify unittest doc. """ __author__ = "Shyam Dwaraknath" __copyright__ = "Copyright 2016, The Materials Project" __version__ = "0.1" __maintainer__ ...
mit
spino327/sdr_testbed
DistributedTestbed/receiver/RXGui.py
1
8188
''' Copyright (c) 2010, Universidad Industrial de Santander, Colombia University of Delaware All rights reserved. @author: Sergio Pino @author: Henry Arguello Website: http://www.eecis.udel.edu/ emails : sergiop@udel.edu - henarfu@udel.edu Date : Nov, 2010 ''' from gnuradio.wxgui import fftsink2, scopesink2 from g...
apache-2.0
Curso-OpenShift/Formulario
OverFlow/ProjectFormulario/env/lib/python2.7/site-packages/django/contrib/auth/handlers/modwsgi.py
537
1344
from django import db from django.contrib import auth from django.utils.encoding import force_bytes def check_password(environ, username, password): """ Authenticates against Django's auth database mod_wsgi docs specify None, True, False as return value depending on whether the user exists and authen...
gpl-3.0
trustedanalytics/spark-tk
regression-tests/sparktkregtests/testcases/scoretests/svm_model_test.py
10
3519
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel 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 require...
apache-2.0
Geode/geonode
geonode/groups/models.py
5
10027
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
gpl-3.0
jeffrey4l/nova
nova/image/glance.py
5
25786
# Copyright 2010 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
quheng/scikit-learn
sklearn/preprocessing/tests/test_data.py
71
38516
import warnings import numpy as np import numpy.linalg as la from scipy import sparse from distutils.version import LooseVersion from sklearn.utils.testing import assert_almost_equal, clean_warning_registry from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_array_equal...
bsd-3-clause
SilkNetwork/Silk-Core
qa/rpc-tests/keypool.py
2
4268
#!/usr/bin/env python2 # Copyright (c) 2014 The Bitcoin Developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Exercise the wallet keypool, and interaction with wallet encryption/locking # Add python-sequencerpc to module s...
mit
maheshp/novatest
tools/hacking.py
6
23870
#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012, Cloudscaling # 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 # # ...
apache-2.0
kmonsoor/ruffus
ruffus/test/test_proxy_logger.py
5
1957
#!/usr/bin/env python from __future__ import print_function """ test_cmdline.py """ import os tempdir = os.path.relpath(os.path.abspath(os.path.splitext(__file__)[0])) + "/" import sys # add grandparent to search path for testing grandparent_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ...
mit
nfqsolutions/nfq-conductor
nfq/conductor/server.py
1
5092
# NFQ Conductor. A tool for centralizing and visualizing logs. # Copyright (C) 2017 Guillem Borrell Nogueras # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # Li...
agpl-3.0
akhilaananthram/nupic.research
classification/LanguageSensor.py
1
9726
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions...
gpl-3.0
McIntyre-Lab/semnet
doc/conf.py
2
8429
# -*- coding: utf-8 -*- # # SEMNET documentation build configuration file, created by # sphinx-quickstart on Tue Mar 10 13:19:31 2015. # # 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. # # Al...
gpl-3.0
google-research/fixmatch
ict.py
1
5150
# Copyright 2019 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
axiom-data-science/paegan
paegan/cdm/dsg/features/station.py
2
2934
from shapely.geometry import MultiPoint from paegan.cdm.dsg.collections.base.point_collection import PointCollection class Station(PointCollection): """ A collection of points at a single location """ def __init__(self, **kwargs): super(Station,self).__init__(**kwargs) self._type =...
gpl-3.0
markyoder/vq
quakelib/test/GreenUnitTest.py
3
9385
#!/usr/bin/env python import quakelib import unittest import math class TestGreenFunctionCalc(unittest.TestCase): def setUp(self): self.ok = quakelib.Okada() self.slip_rad = math.pi self.slip_vec = quakelib.Vec3(math.sin(self.slip_rad), math.cos(self.slip_rad), 0) self.dip_rad = ma...
mit
beckastar/django
django/contrib/admin/sites.py
6
20491
from functools import update_wrapper from django.http import Http404, HttpResponseRedirect from django.contrib.admin import ModelAdmin, actions from django.contrib.auth import REDIRECT_FIELD_NAME from django.contrib.auth.views import redirect_to_login from django.views.decorators.csrf import csrf_protect from django.db...
bsd-3-clause
karstenw/nodebox-pyobjc
examples/Extended Application/sklearn/examples/calibration/plot_calibration_multiclass.py
1
7780
""" ================================================== Probability Calibration for 3-class classification ================================================== This example illustrates how sigmoid calibration changes predicted probabilities for a 3-class classification problem. Illustrated is the standard 2-simplex, wher...
mit
siemens/django-dingos
dingos/migrations/0007_auto__add_userdata__add_unique_userdata_user_data_kind.py
1
16414
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'UserData' db.create_table(u'dingos_userdata', ( (u'id', self.gf('django.db.model...
gpl-2.0
openstack/oslo.context
doc/source/user/examples/usage.py
1
1601
#!/usr/bin/env python3 # # 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 appl...
apache-2.0
KyleJamesWalker/ansible
lib/ansible/plugins/action/add_host.py
5
3210
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # Copyright 2012, Seth Vidal <skvidal@fedoraproject.org> # # 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, ...
gpl-3.0
nycz/useful-sisters
process_game_menus.py
5
2032
import string import types from module_info import * from module_game_menus import * from process_common import * from process_operations import * def save_game_menu_item(ofile,variable_list,variable_uses,menu_item,tag_uses,quick_strings): ofile.write(" mno_%s "%(menu_item[0])) save_statement_block(of...
mit
alfonsokim/nupic
external/linux32/lib/python2.6/site-packages/matplotlib/quiver.py
69
36790
""" Support for plotting vector fields. Presently this contains Quiver and Barb. Quiver plots an arrow in the direction of the vector, with the size of the arrow related to the magnitude of the vector. Barbs are like quiver in that they point along a vector, but the magnitude of the vector is given schematically by t...
agpl-3.0
luxus/home-assistant
tests/util/test_color.py
4
2244
"""Test Home Assistant color util methods.""" import unittest import homeassistant.util.color as color_util class TestColorUtil(unittest.TestCase): """Test color util methods.""" # pylint: disable=invalid-name def test_color_RGB_to_xy(self): """Test color_RGB_to_xy.""" self.assertEqual((0...
mit
fr34k8/Archipel
ArchipelAgent/archipel-platformrequest-defaultcomputingunit/setup.py
5
3172
# # setup.py # # Copyright (C) 2010 Antoine Mercadal <antoine.mercadal@inframonde.eu> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option...
agpl-3.0
pombredanne/pulp
server/test/unit/server/managers/auth/cert/test_cert_generator.py
10
4161
#!/usr/bin/python # # Copyright (c) 2011 Red Hat, Inc. # # # This software is licensed to you under the GNU General Public # License as published by the Free Software Foundation; either version # 2 of the License (GPLv2) or (at your option) any later version. # There is NO WARRANTY for this software, express or implied...
gpl-2.0
MartinSavc/scikit-learn
sklearn/manifold/mds.py
257
15138
""" Multi-dimensional Scaling (MDS) """ # author: Nelle Varoquaux <nelle.varoquaux@gmail.com> # Licence: BSD import numpy as np import warnings from ..base import BaseEstimator from ..metrics import euclidean_distances from ..utils import check_random_state, check_array, check_symmetric from ..externals.joblib impo...
bsd-3-clause
wojciechpolak/webxiangpianbu
tools/staticgen.py
1
12710
#!/usr/bin/env python # -*- coding: utf-8 -*- # # WebXiangpianbu Copyright (C) 2014, 2015 Wojciech Polak # # 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...
gpl-3.0
sinbazhou/odoo
addons/crm/res_partner.py
159
5149
# -*- 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
hyperized/ansible
lib/ansible/modules/packaging/language/easy_install.py
102
6683
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Matt Wright <matt@nobien.net> # 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
MrLoick/python-for-android
python-build/python-libs/gdata/src/gdata/spreadsheet/service.py
143
16416
#!/usr/bin/python # # Copyright (C) 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 ...
apache-2.0
WiredProgrammers/collegeProjects
WifiCalling/server.py
2
1331
from __future__ import print_function import socket import threading import socketserver as SocketServer import audio import pyaudio import queue import time class SoundHandler(SocketServer.StreamRequestHandler): def __init__(self,*args): print("Starting the audio channel for ",*args) self.lock =...
mit
AnthonyHullDiamond/scanning
org.eclipse.scanning.points/scripts/scanpointgenerator/plotgenerator.py
2
4453
### # Copyright (c) 2016, 2017 Diamond Light Source Ltd. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at # http://www.eclipse.org/legal/epl-v10.html # # Contributors: #...
epl-1.0
JavaRabbit/CS496_capstone
compute/metadata/main_test.py
9
1692
# Copyright 2016, 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 or agreed to in writing, s...
apache-2.0
UManPychron/pychron
pychron/pipeline/plot/plotter/dashboard_series.py
2
4347
# =============================================================================== # Copyright 2013 Jake Ross # # 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/licens...
apache-2.0
theimaginaire/dayone
node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py
1366
120842
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Xcode project file generator. This module is both an Xcode project file generator and a documentation of the Xcode project file format. Knowledge of the proje...
mit
msurovcak/PerfKitBenchmarker
perfkitbenchmarker/openstack/os_disk.py
4
3587
# Copyright 2015 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
apache-2.0
michalliu/OpenWrt-Firefly-Libraries
staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python3.4/json/scanner.py
106
2416
"""JSON token scanner """ import re try: from _json import make_scanner as c_make_scanner except ImportError: c_make_scanner = None __all__ = ['make_scanner'] NUMBER_RE = re.compile( r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?', (re.VERBOSE | re.MULTILINE | re.DOTALL)) def py_make_scanner(context): ...
gpl-2.0
bmng-dev/PyBitmessage
src/inventory.py
1
10082
import collections import Queue import time from threading import enumerate as threadingEnumerate from threading import RLock, current_thread from helper_sql import SqlBulkExecute, sqlExecute, sqlQuery from singleton import Singleton @Singleton class Inventory(collections.MutableMapping): def __init__(self): ...
mit
LorDClockaN/LorDmodUE
scripts/tracing/draw_functrace.py
14676
3560
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
gpl-2.0
ar7z1/ansible
lib/ansible/modules/cloud/google/gce_tag.py
66
7227
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, 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', ...
gpl-3.0
edofic/ggrc-core
test/selenium/src/tests/conftest.py
5
5886
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """PyTest fixtures""" import pytest # pylint: disable=import-error from lib import constants from lib.page.widget import info_widget from lib.constants.test import batch from lib.service.rest_service imp...
apache-2.0
duncanhawthorne/drupebox
legacy/requests/_internal_utils.py
414
1096
# -*- coding: utf-8 -*- """ requests._internal_utils ~~~~~~~~~~~~~~ Provides utility functions that are consumed internally by Requests which depend on extremely few external helpers (such as compat) """ from .compat import is_py2, builtin_str, str def to_native_string(string, encoding='ascii'): """Given a str...
mit
badlogicmanpreet/nupic
src/nupic/data/generators/pattern_machine.py
37
5229
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
wangyj1/sees
lib/main.py
9
2509
try: import sys import argparse import os from config import Config_Parser from exceptions import SeesExceptions from common import * except ImportError,e: import sys sys.stdout.write("%s\n" %e) sys.exit(1) def is_file_exists(file_list): for file in file_list: i...
mit
joepler/centerparallax
node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py
2698
3270
#!/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. """ Unit tests for the easy_xml.py file. """ import gyp.easy_xml as easy_xml import unittest import StringIO class TestSequenceFunctions(...
mit
Leoniela/nipype
nipype/interfaces/ants/visualization.py
9
7262
"""The ants visualisation module provides basic functions based on ITK. Change directory to provide relative paths for doctests >>> import os >>> filepath = os.path.dirname( os.path.realpath( __file__ ) ) >>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data')) >>> os.chdir(datadir) "...
bsd-3-clause
pombredanne/pythran
pythran/transformations/expand_globals.py
2
3014
""" ExpandGlobals replaces globals variables by function call. It also turn globals assignment in function definition. """ from pythran.analyses import LocalNameDeclarations from pythran.passmanager import Transformation from pythran.syntax import PythranSyntaxError from pythran import metadata import ast class E...
bsd-3-clause
kaiyou/pyircbot
src/pyircbot/behavior.py
1
6125
#!/usr/bin/python # # PyIRCBot # Copyright (C) Pierre Jaury 2011 <pierre@jaury.eu> # # PyIRCBot 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...
gpl-3.0
openstack/octavia
octavia/tests/unit/controller/worker/v1/flows/test_health_monitor_flows.py
1
2762
# Copyright 2015 Hewlett-Packard Development Company, L.P. # # 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...
apache-2.0
martinblech/mimerender
src/test.py
1
10283
# unit tests try: import unittest2 as unittest except ImportError: import unittest import mimerender from mimerender import _MIME_TYPES class TestMimeRender(mimerender.MimeRenderBase): def __init__(self, request_parameters=None, accept_header=None, *args, **kwargs): super(TestMimeRen...
mit
tomchadwin/qgis2web
qgis2web/maindialog.py
1
39316
# -*- coding: utf-8 -*- # qgis-ol3 Creates OpenLayers map from QGIS layers # Copyright (C) 2014 Victor Olaya (volayaf@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...
gpl-2.0
ChenJunor/hue
desktop/core/ext-py/Django-1.6.10/django/utils/functional.py
105
15418
import copy import operator from functools import wraps import sys from django.utils import six from django.utils.six.moves import copyreg # You can't trivially replace this with `functools.partial` because this binds # to classes and returns bound instances, whereas functools.partial (on # CPython) is a type and it...
apache-2.0
codrut3/tensorflow
tensorflow/python/keras/_impl/keras/callbacks_test.py
17
28981
# 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
henriqueguchi/SikuliServer
new/Lib/robot/model/__init__.py
2
1629
# Copyright 2008-2015 Nokia Solutions and Networks # # 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...
mit
markrawlingson/SickRage
lib/pysrt/srtfile.py
71
10521
# -*- coding: utf-8 -*- import os import sys import codecs try: from collections import UserList except ImportError: from UserList import UserList from itertools import chain from copy import copy from pysrt.srtexc import Error from pysrt.srtitem import SubRipItem from pysrt.compat import str BOMS = ((codec...
gpl-3.0
Theb-1/home-assistant
homeassistant/components/light/tellstick.py
6
4570
""" homeassistant.components.light.tellstick ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support for Tellstick lights. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/light.tellstick/ """ from homeassistant.components.light import Light, ATTR_BRIGHTNESS from...
mit
inean/python-oauth2
oauth2/__init__.py
1
24530
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel 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 ...
mit
GdZ/scriptfile
software/googleAppEngine/lib/django_1_4/tests/regressiontests/generic_views/urls.py
29
10284
from __future__ import absolute_import from django.conf.urls import patterns, url from django.views.decorators.cache import cache_page from django.views.generic import TemplateView from . import views urlpatterns = patterns('', # base #(r'^about/login-required/$', # views.DecoratedAboutView()), ...
mit
wweiradio/django
django/contrib/syndication/views.py
192
8680
from __future__ import unicode_literals from calendar import timegm from django.conf import settings from django.contrib.sites.shortcuts import get_current_site from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from django.http import Http404, HttpResponse from django.template import Templat...
bsd-3-clause
JioCloud/nova
nova/cells/driver.py
126
1393
# Copyright (c) 2012 Rackspace Hosting # 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 req...
apache-2.0
sosguns2002/interactive-mining
interactive-mining-3rdparty-madis/madis/src/lib/textcat.py
5
5608
#!/usr/bin/env python # Copyright (c) 2006 Thomas Mangin # Modifications 25.11.2007 by Christoph Burgmer # christoph.burgmer@stud.uni-karlsruhe.de # Not the best match is taken but a language from a given list is prefered in # the order the languages are given to the class: if a given language is found # under the be...
gpl-3.0
zooba/PTVS
Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/pip/_vendor/chardet/langthaimodel.py
269
11290
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client 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 R...
apache-2.0
apache/cloudstack-ec2stack
tests/instances_tests.py
3
23950
#!/usr/bin/env python # encoding: utf-8 # # 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 Licens...
apache-2.0
rossburton/yocto-autobuilder
lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/process/users/users.py
4
5846
# 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
OptiPop/external_chromium_org
tools/telemetry/telemetry/core/platform/power_monitor/__init__.py
69
1150
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.core import exceptions class PowerMonitor(object): """A power profiler. Provides an interface to register power consumption during a te...
bsd-3-clause
sarutobi/ritmserdtsa
rynda/message/tests/functional/test_message_views.py
2
1412
# coding: utf-8 from django_webtest import WebTest from django.core.urlresolvers import reverse from rynda.message.factories import MessageFactory from rynda.message.models import Message from rynda.test.factories import UserFactory class TestMessagesList(WebTest): def setUp(self): self.page = self.app...
mit
sushantgoel/Flask
Work/Trivia - Module 5/env/Lib/site-packages/pip/_vendor/requests/packages/chardet/codingstatemachine.py
2931
2318
######################## 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...
apache-2.0
JDShu/SCOPE
askbot/migrations/0041_add_field_comment_offensive_flag_count.py
2
26934
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Comment.offensive_flag_count' db.add_column(u'comment', 'offensive_flag_count', self.gf('d...
gpl-3.0
pombredanne/cliques
poll/views.py
1
5047
from collections import defaultdict import datetime import logging import operator import random from django.contrib.auth import get_user_model from django.http import HttpResponse, HttpResponseRedirect, HttpResponseNotFound from django.utils.timezone import utc from django.views.generic import CreateView, DetailView ...
apache-2.0
kisna72/django
tests/forms_tests/tests/test_validators.py
261
1540
from __future__ import unicode_literals import re from unittest import TestCase from django import forms from django.core import validators from django.core.exceptions import ValidationError class UserForm(forms.Form): full_name = forms.CharField( max_length=50, validators=[ validato...
bsd-3-clause
sebastian-software/jasy
jasy/core/Util.py
1
4039
# # Jasy - Web Tooling Framework # Copyright 2010-2012 Zynga Inc. # Copyright 2013-2014 Sebastian Werner # import re import os import hashlib import tempfile import subprocess import sys import shlex import jasy.core.Console as Console import jasy.core.Base62 as Base62 def executeCommand(args, failMessage=None, pat...
mit
GraemeFulton/job-search
docutils-0.12/build/lib/docutils/languages/eo.py
148
1948
# $Id: eo.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: Marcelo Huerta San Martin <richieadler@users.sourceforge.net> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two...
gpl-2.0
fs714/concurrency-example
asynchronous/py27/performance/eventlet_io_bound.py
2
1040
import eventlet from eventlet.green import urllib2 import logging import time import requests logging.basicConfig() logger = logging.getLogger('eventlet') logger.setLevel(logging.DEBUG) LOOP = 1000 URL = 'http://127.0.0.1:1234/1' elapsed_time = {} def fetch(url): body = urllib2.urlopen(url).read() return u...
apache-2.0
pozytywnie/webapp-health-monitor
webapp_health_monitor/management/commands/verify.py
1
1307
import importlib import sys from django.apps import apps from django.core.management.base import BaseCommand from webapp_health_monitor.verification_suit import VerificationSuit class Command(BaseCommand): SUBMODULE_NAME = 'verificators' def add_arguments(self, parser): parser.add_argument('--tag', ...
mit
dwaynebailey/virtaal
virtaal/test/test_scaffolding.py
4
3305
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2008-2009 Zuza Software Foundation # # This file is part of Virtaal. # # 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 ...
gpl-2.0
cbears/octoform
test/forms/studentaid.py
1
4935
# -*- coding: utf-8 -*- from django.core.management import setup_environ import forms.form_models.bfsql as bfsql import forms.form_models.bform as bforms from forms.form_models.bfbdb import * bf = bforms.BerkeleyForm() bf.baseFont='palatino' bf.theme=('demos',) """ Don't just write documents, create an information ...
gpl-3.0
MyAOSP/external_chromium_org
native_client_sdk/src/tools/tests/chrome_mock.py
107
1498
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import optparse import sys import time import urllib2 def PrintAndFlush(s): print s sys.stdout.flush() def main(args): pars...
bsd-3-clause
mlperf/training_results_v0.6
Fujitsu/benchmarks/resnet/implementations/mxnet/example/bayesian-methods/data_loader.py
20
2449
# 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
devclone/enigma2-9f38fd6
lib/python/Components/ConditionalWidget.py
84
1700
from GUIComponent import GUIComponent from enigma import eTimer class ConditionalWidget(GUIComponent): def __init__(self, withTimer = True): GUIComponent.__init__(self) self.setConnect(None) if withTimer: self.conditionCheckTimer = eTimer() self.conditionCheckTimer.callback.append(self.update) self.c...
gpl-2.0
rubencabrera/odoo
openerp/tools/amount_to_text.py
393
7719
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/pylint/test/functional/bad_reversed_sequence.py
4
1787
""" Checks that reversed() receive proper argument """ # pylint: disable=too-few-public-methods,no-self-use,no-absolute-import from collections import deque __revision__ = 0 class GoodReversed(object): """ Implements __reversed__ """ def __reversed__(self): return [1, 2, 3] class SecondGoodReversed(...
agpl-3.0
ramadhane/odoo
addons/sale_journal/__openerp__.py
262
2637
# -*- 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
pilou-/ansible
lib/ansible/plugins/lookup/__init__.py
89
4408
# (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
petercable/mi-dataset
mi/dataset/parser/dcl_file_common.py
3
6255
#!/usr/bin/env python """ @package mi.dataset.parser.dcl_file_common @file marine-integrations/mi/dataset/parser/dcl_file_common.py @author Ronald Ronquillo @brief Parser for the file type for the dcl Release notes: initial release """ import re from mi.core.log import get_logger from mi.core.instrument.data_parti...
bsd-2-clause
qmarlats/pyquizz
env-3/lib/python3.5/site-packages/pygments/lexers/_cl_builtins.py
48
14053
# -*- coding: utf-8 -*- """ pygments.lexers._cl_builtins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ANSI Common Lisp builtins. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ BUILTIN_FUNCTIONS = set(( # 638 functions '<', '<=', '=', '>', '>=',...
gpl-3.0
kevalds51/sympy
sympy/polys/tests/test_polyfuncs.py
73
2910
"""Tests for high-level polynomials manipulation functions. """ from sympy.polys.polyfuncs import ( symmetrize, horner, interpolate, viete, ) from sympy.polys.polyerrors import ( MultivariatePolynomialError, ) from sympy import symbols from sympy.utilities.pytest import raises from sympy.abc import a, b, c,...
bsd-3-clause
MeGotsThis/BotGotsThis
bot/_config.py
1
7551
import configparser import os import aiofiles from typing import Dict, List, Optional, Union # noqa: F401 class BotConfig: def __init__(self) -> None: self.development: bool = False self.botnick: str = '' self.password: str = '' self.owner: str = '' self.awsServer: str...
gpl-3.0
AsgerPetersen/QGIS
tests/src/python/test_qgsappstartup.py
3
7768
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsApplication. From build dir: ctest -R PyQgsAppStartup -V .. note:: 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, ...
gpl-2.0
CapeDrew/DCMTK-ITK
Utilities/Maintenance/BuildHeaderTest.py
3
4969
#!/usr/bin/env python #========================================================================== # # Copyright Insight Software Consortium # # 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 Licen...
apache-2.0
chennan47/osf.io
addons/googledrive/tests/test_models.py
19
4141
# -*- coding: utf-8 -*- import mock from nose.tools import * # noqa (PEP8 asserts) import pytest import unittest from framework.auth import Auth from addons.base.tests.models import (OAuthAddonNodeSettingsTestSuiteMixin, OAuthAddonUserSettingTestSuiteMixin) from addons.googledri...
apache-2.0
michalfita/nis2ldap
tests/test_ldap_group.py
1
4491
# nis2ldap - Smarter NIS to LDAP synchronization tool # Copyright (C) 2015 Michal Fita # # 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) an...
gpl-3.0
tapomayukh/projects_in_python
sandbox_tapo/src/refs/diveintopython-pdf-5.4/diveintopython-5.4/py/plural/stage2/pluraltest2.py
4
1615
"""Unit test for plural2.py This program is part of "Dive Into Python", a free Python book for experienced programmers. Visit http://diveintopython.org/ for the latest version. """ __author__ = "Mark Pilgrim (mark@diveintopython.org)" __version__ = "$Revision: 1.2 $" __date__ = "$Date: 2004/03/17 14:34:40 $" __copyr...
mit
zrhans/pythonanywhere
.virtualenvs/django19/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/universaldetector.py
1776
6840
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
apache-2.0