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
Rouslan/NTracer
setup.py
1
21004
import sys import os import os.path import re import subprocess from setuptools import setup,Extension from distutils import sysconfig # at the time of this writing, there is no setuptools.command.build module from distutils.command.build import build from setuptools.command.build_ext import build_ext from distutils...
mit
ales-erjavec/orange-canvas
orangecanvas/scheme/readwrite.py
1
26167
""" Scheme save/load routines. """ import numbers import sys import types import warnings import base64 import binascii import itertools from xml.etree.ElementTree import TreeBuilder, Element, ElementTree, parse from collections import defaultdict from itertools import chain, count import pickle import json import ...
gpl-3.0
2013Commons/HUE-SHARK
build/env/lib/python2.7/site-packages/Django-1.2.3-py2.7.egg/django/contrib/admindocs/urls.py
336
1089
from django.conf.urls.defaults import * from django.contrib.admindocs import views urlpatterns = patterns('', url('^$', views.doc_index, name='django-admindocs-docroot' ), url('^bookmarklets/$', views.bookmarklets, name='django-admindocs-bookmarklets' ), url('^tags/$...
apache-2.0
crosswalk-project/chromium-crosswalk-efl
tools/telemetry/telemetry/page/actions/loop.py
47
1727
# 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. """A Telemetry page_action that loops media playback. Action parameters are: - loop_count: The number of times to loop media. - selector: If no selector is ...
bsd-3-clause
yongshengwang/builthue
desktop/core/ext-py/South-0.8.2/south/exceptions.py
33
5072
from __future__ import print_function from traceback import format_exception, format_exc class SouthError(RuntimeError): pass class SouthWarning(RuntimeWarning): pass class BrokenMigration(SouthError): def __init__(self, migration, exc_info): self.migration = migration self.exc_info = ex...
apache-2.0
Chilledheart/chromium
tools/perf/profile_creators/fast_navigation_profile_extender_unittest.py
13
2754
# Copyright 2015 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 unittest from profile_creators.fast_navigation_profile_extender import ( FastNavigationProfileExtender) from telemetry.testing import options_for_...
bsd-3-clause
40223104/2015cd_0512
static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/SDL.py
603
1813
from browser import document SDL_INIT_VIDEO=0 SDL_GL_DOUBLEBUFFER=1 SDL_GL_DEPTH_SIZE=2 SDL_DOUBLEBUF=3 SDL_ANYFORMAT=4 SDL_ACTIVEEVENT=5 SDL_ALLEVENTS=5 SDL_KEYDOWN=6 SDL_KEYUP=7 SDL_MOUSEMOTION=8 SDL_MOUSEBUTTONDOWN=9 SDL_MOUSEBUTTONUP=10 SDL_JOYAXISMOTION=11 SDL_JOYBALLMOTION=12 SDL_JOYHATMOTION=13 SDL_JOYBUTTON...
agpl-3.0
hardbyte/python-can
can/interfaces/neousys/neousys.py
1
7555
""" Neousys CAN bus driver """ # # This kind of interface can be found for example on Neousys POC-551VTC # One needs to have correct drivers and DLL (Share object for Linux) from Neousys # # https://www.neousys-tech.com/en/support-service/resources/category/299-poc-551vtc-driver # # Beware this is only tested on Linux...
lgpl-3.0
SamiHiltunen/invenio-deposit
invenio_deposit/fields/notes.py
7
1262
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2012, 2013, 2014 CERN. # # Invenio 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 optio...
gpl-2.0
legoktm/pywikipedia-rewrite
pywikibot/textlib.py
1
43381
# -*- coding: utf-8 -*- """ Functions for manipulating wiki-text. Unless otherwise noted, all functions take a unicode string as the argument and return a unicode string. """ # # (C) Pywikipedia bot team, 2008-2013 # # Distributed under the terms of the MIT license. # __version__ = '$Id$' try: import mwparserfr...
mit
Crevil/grpc
examples/python/helloworld/helloworld_pb2_grpc.py
85
1378
import grpc from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities import helloworld_pb2 as helloworld__pb2 class GreeterStub(object): """The greeting service definition. """ def __init__(self, channel): """Constructor. Args: channel...
apache-2.0
tobegit3hub/cinder_docker
cinder/volume/drivers/netapp/dataontap/nfs_base.py
3
41872
# Copyright (c) 2012 NetApp, Inc. All rights reserved. # Copyright (c) 2014 Ben Swartzlander. All rights reserved. # Copyright (c) 2014 Navneet Singh. All rights reserved. # Copyright (c) 2014 Clinton Knight. All rights reserved. # Copyright (c) 2014 Alex Meade. All rights reserved. # Copyright (c) 2014 Bob Callaw...
apache-2.0
dekom/threepress-bookworm-read-only
bookworm/gdata/src/gdata/auth.py
190
37921
#!/usr/bin/python # # Copyright (C) 2007 - 2009 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 applicab...
bsd-3-clause
gangadhar-kadam/nassimlib
webnotes/utils/email_lib/bulk.py
34
4808
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import webnotes from webnotes.model.doc import Document from webnotes.utils import cint class BulkLimitCrossedError(webnotes.ValidationError): pass def send(recipients=None,...
mit
darkforestzero/buck
third-party/py/setuptools/pkg_resources/tests/test_resources.py
242
23622
import os import sys import tempfile import shutil import string import pytest import pkg_resources from pkg_resources import (parse_requirements, VersionConflict, parse_version, Distribution, EntryPoint, Requirement, safe_version, safe_name, WorkingSet) packaging = pkg_resources.packaging def safe_repr(ob...
apache-2.0
nikitos/npui
netprofile_core/setup.py
3
1979
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README_LOCAL = open(os.path.join(here, 'README.rst')).read() README_GLOBAL = open(os.path.join(here, 'README-NP.rst')).read() requires = [ 'setuptools', 'cracklib',...
agpl-3.0
feroda/odoo
addons/mrp_operations/__init__.py
443
1091
# -*- 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...
agpl-3.0
jiajiechen/mxnet
example/rcnn/rcnn/dataset/imdb.py
16
14019
# 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
thehub/hubspace
hubspace/utilities/image_preview.py
1
1697
from PIL import Image import StringIO def create_image_preview(file_object, **kwargs): height = None width = None if "height" in kwargs: height = kwargs['height'] if "width" in kwargs: width = kwargs['width'] preview = resize_image(file_object, height, width) return p...
gpl-2.0
jblackburne/scikit-learn
sklearn/feature_selection/__init__.py
140
1302
""" The :mod:`sklearn.feature_selection` module implements feature selection algorithms. It currently includes univariate filter selection methods and the recursive feature elimination algorithm. """ from .univariate_selection import chi2 from .univariate_selection import f_classif from .univariate_selection import f_...
bsd-3-clause
yangchengjian/otp
lib/asn1/test/asn1_SUITE_data/Seq.py
92
1934
Seq DEFINITIONS IMPLICIT TAGS ::= BEGIN IMPORTS Set1 FROM SeqSetLib; Seq ::= SEQUENCE { bool BOOLEAN, boolCon [20] BOOLEAN, boolPri [PRIVATE 21] BOOLEAN, boolApp [APPLICATION 22] BOOLEAN, boolExpCon [30] EXPLICIT BOOLEAN, boolExpPri [PRIVATE 31] EXPLICIT BOOLEAN, boolExpApp [APPLICATION 32] EXPLI...
apache-2.0
knownsec/workin
workin/session/backends/redis_session.py
2
3163
#!/usr/bin/python # coding: utf-8 import uuid import hmac import json import hashlib import redis import logging from workin.session import SessionData, InvalidSessionException class RedisSessionEngine(object): def __init__(self, secret, store_options, session_timeout, session_cookie_domain=None): ...
bsd-3-clause
niknow/BankCSVtoQif
bankcsvtoqif/tests/banks/test_rabo.py
1
2136
# -*- coding: utf-8 -*- # BankCSVtoQif - Smart conversion of csv files from a bank to qif # Copyright (C) 2015-2016 Nikolai Nowaczyk # # 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 v...
gpl-2.0
maxrdlf95/tf700t_maxkernel
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
ctiao/platform-external-skia
tools/tests/render_pictures_test.py
67
26449
#!/usr/bin/python """ Copyright 2014 Google Inc. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. Test the render_pictures binary. """ # System-level imports import copy import json import os import shutil import tempfile # Imports from within Skia import base_unitt...
bsd-3-clause
brachiel/pro_services
farm_mngr/views/user.py
1
2905
from django.http import HttpResponse, HttpResponseRedirect from django.template import RequestContext, loader #from django.contrib.auth.models import User from django.contrib.auth import authenticate, login as auth_login, logout as auth_logout #from django.db import IntegrityError from farm_mngr.models import HypU...
gpl-3.0
phenoxim/nova
nova/virt/vmwareapi/vmops.py
1
96843
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # Copyright (c) 2012 VMware, Inc. # Copyright (c) 2011 Citrix Systems, Inc. # Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. Yo...
apache-2.0
jmmease/pandas
pandas/core/computation/expressions.py
4
7066
""" Expressions ----------- Offer fast expression evaluation through numexpr """ import warnings import numpy as np from pandas.core.common import _values_from_object from pandas.core.computation.check import _NUMEXPR_INSTALLED from pandas.core.config import get_option if _NUMEXPR_INSTALLED: import numexpr as n...
bsd-3-clause
Wen777/beets
test/helper.py
1
17637
# This file is part of beets. # Copyright 2014, Thomas Scholtes. # # 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,...
mit
hunch/hunch-sample-app
django/contrib/auth/tests/urls.py
12
1125
from django.conf.urls.defaults import patterns from django.contrib.auth.urls import urlpatterns from django.contrib.auth.views import password_reset from django.contrib.auth.decorators import login_required from django.http import HttpResponse from django.template import Template, RequestContext def remote_user...
mit
haskelladdict/sconcho
sconcho/gui/color_widget.py
1
7755
# -*- coding: utf-8 -*- ######################################################################## # # (c) 2009-2013 Markus Dittrich # # This program is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public # License Version 3 as published by the Free Software Foundation. # #...
gpl-3.0
k3nnyfr/s2a_fr-nsis
s2a/Python/Tools/pynche/ColorDB.py
94
8941
"""Color Database. This file contains one class, called ColorDB, and several utility functions. The class must be instantiated by the get_colordb() function in this file, passing it a filename to read a database out of. The get_colordb() function will try to examine the file to figure out what the format of the file ...
gpl-3.0
kevthehermit/viper
viper/modules/rats/arcom.py
2
1784
# -*- coding: utf-8 -*- # Originally written by Kevin Breen (@KevTheHermit): # https://github.com/kevthehermit/RATDecoders/blob/master/Arcom.py import base64 from Crypto.Cipher import Blowfish def decrypt_blowfish(raw_data): key = 'CVu3388fnek3W(3ij3fkp0930di' cipher = Blowfish.new(key) return cipher.dec...
bsd-3-clause
0-wiz-0/audacity
lib-src/lv2/lv2/plugins/eg-sampler.lv2/waflib/fixpy2.py
332
1110
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os all_modifs={} def fixdir(dir): global all_modifs for k in all_modifs: for v in all_modifs[k]: modif(os.path.join(dir,'waflib'),k,v) def modif(dir,name,fun): ...
gpl-2.0
CyanogenMod/android_kernel_nvidia_shieldtablet
scripts/tracing/dma-api/plotting.py
96
4043
"""Ugly graph drawing tools""" import matplotlib.pyplot as plt import matplotlib.cm as cmap #import numpy as np from matplotlib import cbook # http://stackoverflow.com/questions/4652439/is-there-a-matplotlib-equivalent-of-matlabs-datacursormode class DataCursor(object): """A simple data cursor widget that displays...
gpl-2.0
atul-bhouraskar/django
django/core/management/commands/runserver.py
203
7383
from __future__ import unicode_literals import errno import os import re import socket import sys from datetime import datetime from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.management.base import BaseCommand, CommandError from django.core.servers.basehttp i...
bsd-3-clause
jniediek/mne-python
examples/stats/plot_linear_regression_raw.py
9
2249
""" ======================================== Regression on continuous data (rER[P/F]) ======================================== This demonstrates how rER[P/F]s - regressing the continuous data - is a generalisation of traditional averaging. If all preprocessing steps are the same, no overlap between epochs exists, and ...
bsd-3-clause
kholidfu/django
tests/template_tests/syntax_tests/test_firstof.py
199
3728
from django.template import TemplateSyntaxError from django.test import SimpleTestCase, ignore_warnings from django.utils.deprecation import RemovedInDjango110Warning from ..utils import setup class FirstOfTagTests(SimpleTestCase): libraries = {'future': 'django.templatetags.future'} @setup({'firstof01': '{...
bsd-3-clause
corvorepack/REPOIVAN
plugin.video.movie.ultra.7k/resources/lib/encodingUtils.py
16
24002
# -*- coding: latin-1 -*- import htmlentitydefs import re import sys, traceback enable_debug = True entitydefs = { 'AElig': u'\u00C6', # latin capital letter AE = latin capital ligature AE, U+00C6 ISOlat1' 'Aacute': u'\u00C1', # latin capital letter A with acute, U+00C1 ISOlat1' 'Acirc': u'\u00...
gpl-2.0
openstack-hyper-v-python/numpy
numpy/matrixlib/defmatrix.py
12
29224
from __future__ import division, absolute_import, print_function __all__ = ['matrix', 'bmat', 'mat', 'asmatrix'] import sys import numpy.core.numeric as N from numpy.core.numeric import concatenate, isscalar, binary_repr, identity, asanyarray from numpy.core.numerictypes import issubdtype # make translation table _n...
bsd-3-clause
Batyar/makeup
makeup/views.py
1
1084
from .models import Photo from django.views.generic import TemplateView from .models import Slide from django.shortcuts import render_to_response from django.template import RequestContext from django.core.exceptions import ObjectDoesNotExist class PhotoCollectionView(TemplateView): def get_context_data(self, **...
mit
calfonso/ansible
lib/ansible/modules/cloud/vmware/vmware_target_canonical_facts.py
15
6166
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Joseph Callen <jcallen () csc.com> # Copyright: (c) 2018, 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 ...
gpl-3.0
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/wiki/plugins/images/wiki_plugin.py
1
2286
# -*- coding: utf-8 -*- from django.conf.urls import patterns, url from django.utils.translation import ugettext_lazy as _ from wiki.core.plugins import registry from wiki.core.plugins.base import BasePlugin from wiki.plugins.images import views, models, settings, forms from wiki.plugins.notifications import ARTICLE_E...
agpl-3.0
maxamillion/ansible
lib/ansible/module_utils/distro/_distro.py
38
45100
# Copyright 2015,2016,2017 Nir Cohen # # 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 writi...
gpl-3.0
Akrog/cinder
cinder/cmd/all.py
5
2317
#!/usr/bin/env python # Copyright 2011 OpenStack, LLC # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except ...
apache-2.0
zynjec/darkstar
migrations/crystal_storage.py
6
1103
import array import mysql.connector def migration_name(): return "Adding crystal storage columns to char_points table" def check_preconditions(cur): return; def needs_to_run(cur): # Ensure crystal columns exist in char_points cur.execute("SHOW COLUMNS FROM char_points LIKE 'fire_crystals'") if not cur.fetchone(...
gpl-3.0
Oweoqi/metagoofil
lib/graphs.py
31
29100
""" +-------------------------------------------------------------------+ | H T M L - G R A P H S (v4.8) | | | | Copyright Gerd Tentler www.gerd-tentler.de/tools | | Created: Sep. 17, 2002 ...
gpl-2.0
thesuperzapper/tensorflow
tensorflow/contrib/factorization/python/ops/gmm_ops_test.py
53
7705
# 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
carrillo/scikit-learn
doc/conf.py
210
8446
# -*- coding: utf-8 -*- # # scikit-learn documentation build configuration file, created by # sphinx-quickstart on Fri Jan 8 09:13:42 2010. # # This file is execfile()d with the current directory set to its containing # dir. # # Note that not all possible configuration values are present in this # autogenerated file. ...
bsd-3-clause
yury-s/v8-inspector
Source/chrome/tools/telemetry/telemetry/core/backends/chrome/desktop_browser_finder_unittest.py
8
8800
# 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 unittest from telemetry.core.backends.chrome import desktop_browser_finder from telemetry.core import browser_options from telemetry.core.platform imp...
bsd-3-clause
miipl-naveen/optibizz
addons/mrp_operations/__init__.py
443
1091
# -*- 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...
agpl-3.0
tailhook/pyzza
examples/graph/colorshemes.py
1
23223
@package("graph") class Colors: def __init__(self): pass x11 = { "snow": 0xfffafa, "ghost white": 0xf8f8ff, "ghostwhite": 0xf8f8ff, "white smoke": 0xf5f5f5, "whitesmoke": 0xf5f5f5, "gainsboro": 0xdcdcdc, "floral white": 0xfffaf0, "floralwhi...
mit
debops/debops-playbooks
playbooks/library/database/ldap/ldap_attr.py
2
10876
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Peter Sagerson <psagers@getcloak.com> # (c) 2016, Jiri Tyr <jiri.tyr@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 So...
gpl-3.0
Ivaylo-Popov/Theano-Lights
models/lm_gru.py
11
3397
import theano import theano.tensor as T from theano.sandbox.rng_mrg import MRG_RandomStreams from theano.tensor.nnet.conv import conv2d from theano.tensor.signal.downsample import max_pool_2d from theano.tensor.shared_randomstreams import RandomStreams import numpy as np from toolbox import * from modelbase import * ...
mit
shacker/django
tests/sitemaps_tests/test_generic.py
80
2315
from datetime import datetime from django.contrib.sitemaps import GenericSitemap from django.test import override_settings from .base import SitemapTestsBase from .models import TestModel @override_settings(ABSOLUTE_URL_OVERRIDES={}) class GenericViewsSitemapTests(SitemapTestsBase): def test_generic_sitemap_at...
bsd-3-clause
asarium/LuaCppUtil
test/gtest-1.7.0/scripts/pump.py
2471
23673
#!/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
JPO1/BigQuery-Python
bigquery/query_builder.py
1
8741
import logging def render_query(dataset, tables, select=None, conditions=None, groupings=None, order_by=None): """Render a query that will run over the given tables using the specified parameters. Args: dataset: the BigQuery data set to query data from. tables: the tables...
apache-2.0
zozo123/buildbot
www/codeparameter/buildbot_codeparameter.py
1
1663
# 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-3.0
iiSeymour/pandashells
pandashells/test/p_regress_tests.py
3
3640
#! /usr/bin/env python import sys import re from mock import patch, MagicMock from unittest import TestCase import numpy as np import pandas as pd from pandashells.bin.p_regress import main class MainTests(TestCase): @patch( 'pandashells.bin.p_regress.sys.argv', 'p.regress -m y~x'.split()) @p...
bsd-2-clause
yxcoin/yxcoin
src/boost_1_55_0/libs/mpi/test/python/all_reduce_test.py
64
1157
# Copyright (C) 2006 Douglas Gregor <doug.gregor -at- gmail.com>. # Use, modification and distribution is subject to the Boost Software # License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) # Test all_reduce() collective. import boost.parallel.mpi as mpi fr...
mit
analurandis/Tur
backend/venv/Lib/site-packages/unidecode/x027.py
165
3783
data = ( '[?]', # 0x00 '', # 0x01 '', # 0x02 '', # 0x03 '', # 0x04 '', # 0x05 '', # 0x06 '', # 0x07 '', # 0x08 '', # 0x09 '', # 0x0a '', # 0x0b '', # 0x0c '', # 0x0d '', # 0x0e '', # 0x0f '', # 0x10 '', # 0x11 '', # 0x12 '', # 0x13 '', # 0x14 '', # 0x15 ...
mit
Julian/home-assistant
homeassistant/const.py
2
6840
# coding: utf-8 """Constants used by Home Assistant components.""" __version__ = "0.25.0.dev0" REQUIRED_PYTHON_VER = (3, 4) PLATFORM_FORMAT = '{}.{}' # Can be used to specify a catch all when registering state or event listeners. MATCH_ALL = '*' # If no name is specified DEVICE_DEFAULT_NAME = "Unnamed Device" WEEK...
mit
mrGeen/eden
private/templates/IFRC/controllers.py
3
8296
# -*- coding: utf-8 -*- from os import path from gluon import current from gluon.html import * from gluon.storage import Storage # ============================================================================= class index(): """ Custom Home Page """ def __call__(self): T = current.T response...
mit
ashwin01/hasjob
alembic/versions/d286e09aee1_created_updated_serv.py
5
1324
"""created_updated_serverdefaults Revision ID: d286e09aee1 Revises: 41d839fcecb4 Create Date: 2013-09-12 20:26:55.258656 """ # revision identifiers, used by Alembic. revision = 'd286e09aee1' down_revision = '41d839fcecb4' from alembic import op import sqlalchemy as sa def upgrade(): op.alter_column('jobcatego...
agpl-3.0
akeffalas/ft-engine
mysql-test/suite/tokudb/t/fast_upsert_int.py
73
1972
#!/usr/bin/env python import sys def main(): print "# generated by tokudb_upsert_int.py" print "source include/have_tokudb.inc;" print "source include/have_innodb.inc;" print "set default_storage_engine='tokudb';" print "disable_warnings;" print "drop table if exists tt, ti;" print "enable...
gpl-2.0
hernandito/SickRage
lib/rtorrent/common.py
74
2639
# Copyright (c) 2013 Chris Lucas, <chris@chrisjlucas.com> # 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, ...
gpl-3.0
topxiaoke/myedx
lms/envs/dev_int.py
52
1083
""" This enables use of course listings by subdomain. To see it in action, point the following domains to 127.0.0.1 in your /etc/hosts file: berkeley.dev harvard.dev mit.dev Note that OS X has a bug where using *.local domains is excruciatingly slow, so use *.dev domains instead for local testing. """ # We int...
agpl-3.0
lgarren/spack
var/spack/repos/builtin/packages/samtools/package.py
1
2415
############################################################################## # 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
e-koch/canfar_scripts
EVLA_pipeline1.2.0/EVLA_pipe_testgains.py
3
8949
###################################################################### # # Copyright (C) 2013 # Associated Universities, Inc. Washington DC, USA, # # This library is free software; you can redistribute it and/or modify it # under the terms of the GNU Library General Public License as published by # the Free Software Fo...
mit
salbertperso/ansible-modules-core
cloud/azure/azure_rm_subnet.py
19
11499
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.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 Soft...
gpl-3.0
jzt5132/scikit-learn
examples/linear_model/plot_robust_fit.py
238
2414
""" Robust linear estimator fitting =============================== Here a sine function is fit with a polynomial of order 3, for values close to zero. Robust fitting is demoed in different situations: - No measurement errors, only modelling errors (fitting a sine with a polynomial) - Measurement errors in X - M...
bsd-3-clause
sorenk/ansible
lib/ansible/modules/network/f5/bigip_iapplx_package.py
28
12047
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
drwyrm/Flexget
flexget/tests/api_tests/test_database_api.py
4
1740
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import json from flexget.api.app import base_message from flexget.api.core.database import ObjectsContainer as OC class TestDatabaseAPI(object): config = 'tasks: {}'...
mit
laiqiqi886/kbengine
kbe/src/lib/python/Lib/plistlib.py
84
31477
r"""plistlib.py -- a tool to generate and parse MacOSX .plist files. The property list (.plist) file format is a simple XML pickle supporting basic object types, like dictionaries, lists, numbers and strings. Usually the top level object is a dictionary. To write out a plist file, use the dump(value, file) function. ...
lgpl-3.0
jpshort/odoo
addons/l10n_at/__openerp__.py
430
1785
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) conexus # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Lic...
agpl-3.0
hantek/fuel
fuel/bin/fuel_download.py
18
2403
#!/usr/bin/env python """Fuel dataset downloading utility.""" import argparse import importlib import os import fuel from fuel import downloaders from fuel.downloaders.base import NeedURLPrefix url_prefix_message = """ Some files for this dataset do not have a download URL. Provide a URL prefix with --url-prefix to ...
mit
fast01/zerorpc-python
tests/test_client.py
128
1919
# -*- coding: utf-8 -*- # Open Source Initiative OSI - The MIT License (MIT):Licensing # # The MIT License (MIT) # Copyright (c) 2012 DotCloud Inc (opensource@dotcloud.com) # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Softwa...
mit
tizianasellitto/servo
components/script/dom/bindings/codegen/parser/tests/test_bytestring.py
118
3772
# -*- coding: UTF-8 -*- import WebIDL def WebIDLTest(parser, harness): parser.parse(""" interface TestByteString { attribute ByteString bs; attribute DOMString ds; }; """) results = parser.finish(); harness.ok(True, "TestByteString interface parsed without error...
mpl-2.0
OpusVL/odoo
addons/mrp/__openerp__.py
1
3715
# -*- 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
jumpstarter-io/cinder
cinder/api/views/qos_specs.py
17
2170
# Copyright (C) 2013 eBay 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...
apache-2.0
christianbrodbeck/zotero-cleanup
zoterocleanup/_automerge.py
1
1687
# Author: Christian Brodbeck <christianbrodbeck@nyu.edu> from collections import defaultdict from ._zotero import connect, date_added def auto_merge(library=None): """Merge duplicate items Parameters ---------- library : str | int Library ID. Notes ----- Find duplicate items by ...
gpl-2.0
mdaniel/intellij-community
python/helpers/third_party/thriftpy/_shaded_thriftpy/thrift.py
5
13235
# -*- coding: utf-8 -*- """ _shaded_thriftpy.thrift ~~~~~~~~~~~~~~~~~~ Thrift simplified. """ from __future__ import absolute_import import functools import linecache import types from ._compat import with_metaclass, PY3 if PY3: from itertools import zip_longest else: from itertools import izip...
apache-2.0
smartdevicelink/sdl_core
src/3rd_party-static/gmock-1.7.0/test/gmock_leak_test.py
779
4384
#!/usr/bin/env python # # Copyright 2009, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
bsd-3-clause
feilongfl/micropython
tools/gendoc.py
101
16995
""" Generate documentation for pyboard API from C files. """ import os import argparse import re import markdown # given a list of (name,regex) pairs, find the first one that matches the given line def re_match_first(regexs, line): for name, regex in regexs: match = re.match(regex, line) if match:...
mit
Aliced3645/DataCenterMarketing
impacket/impacket/dcerpc/svcctl.py
3
35869
# Copyright (c) 2003-2012 CORE Security Technologies # # This software is provided under under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # # $Id: svcctl.py 531 2012-05-01 23:20:26Z bethus@gmail.com $ # # Author: Alberto Solino # # Description...
apache-2.0
Eureka22/ASM_xf
PythonD/lib/python2.4/test/test_binascii.py
17
5932
"""Test the binascii C module.""" from test import test_support import unittest import binascii class BinASCIITest(unittest.TestCase): # Create binary test data data = "The quick brown fox jumps over the lazy dog.\r\n" # Be slow so we don't depend on other modules data += "".join(map(chr, xrange(256)...
gpl-2.0
CUCWD/edx-platform
openedx/core/djangoapps/plugins/plugin_signals.py
16
2467
from logging import getLogger from . import constants, registry, utils log = getLogger(__name__) def connect_receivers(project_type): for signals_module, signals_config in _iter_plugins(project_type): for signal, receiver_func, receiver_config in _iter_receivers(signals_module, signals_config): ...
agpl-3.0
Pencroff/ai-hackathon-2017
Backend/venv/lib/python3.6/site-packages/pip/_vendor/requests/packages/chardet/langthaimodel.py
2930
11275
######################## 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...
mit
newworldnewlife/TensorFlow-Tutorials
cache.py
12
4764
######################################################################## # # Cache-wrapper for a function or class. # # Save the result of calling a function or creating an object-instance # to harddisk. This is used to persist the data so it can be reloaded # very quickly and easily. # # Implemented in Python 3.5 # ##...
mit
chongtianfeiyu/kbengine
kbe/src/lib/python/Lib/email/mime/text.py
83
1367
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Class representing text/* type MIME documents.""" __all__ = ['MIMEText'] from email.mime.nonmultipart import MIMENonMultipart class MIMEText(MIMENonMultipart): """Class for generating text/* type MI...
lgpl-3.0
pulinagrawal/nupic
src/nupic/support/loophelpers.py
5
3262
# ---------------------------------------------------------------------- # 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...
agpl-3.0
stwunsch/gnuradio
gr-filter/python/filter/design/api_object.py
45
2638
# Copyright 2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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. # # G...
gpl-3.0
CNR-Engineering/ModelerTools
common/arg_command_line.py
1
1258
""" Custom argparse with a custom formatter_class and optional arguments """ import argparse import sys class CustomFormatter(argparse.ArgumentDefaultsHelpFormatter, argparse.RawDescriptionHelpFormatter): pass class myargparse(argparse.ArgumentParser): """ force and verbose are optional arguments "...
gpl-3.0
odoobgorg/odoo
addons/auth_oauth/controllers/main.py
27
7712
import functools import logging import json import urlparse import werkzeug.utils from werkzeug.exceptions import BadRequest import openerp from openerp import SUPERUSER_ID from openerp import http from openerp.http import request from openerp.addons.web.controllers.main import db_monodb, ensure_db, set_cookie_and_re...
gpl-3.0
squirrelo/plate-mapper
platemap/lib/tests/test_person.py
1
7544
# ----------------------------------------------------------------------------- # Copyright (c) 2016--, The Plate Mapper Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this software. # -----------------------------------------...
bsd-3-clause
luksan/kodos
modules/newUserDialog.py
1
1074
# -*- coding: utf-8; mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; truncate-lines: 0 -*- # vi: set fileencoding=utf-8 filetype=python expandtab tabstop=4 shiftwidth=4 softtabstop=4 cindent: # :mode=python:indentSize=4:tabSize=4:noTabs=true: #-----------------------------------------------------...
gpl-2.0
pilou-/ansible
lib/ansible/modules/cloud/smartos/vmadm.py
42
24306
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Jasper Lievisse Adriaanse <j@jasper.la> # 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....
gpl-3.0
kchodorow/tensorflow
tensorflow/contrib/linalg/python/kernel_tests/linear_operator_composition_test.py
13
8641
# 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
ctu-geoforall-lab/qgis-soil-erosion-plugin
test/test_init.py
121
1860
# coding=utf-8 """Tests QGIS plugin init.""" __author__ = 'Tim Sutton <tim@linfiniti.com>' __revision__ = '$Format:%H$' __date__ = '17/10/2010' __license__ = "GPL" __copyright__ = 'Copyright 2012, Australia Indonesia Facility for ' __copyright__ += 'Disaster Reduction' import os import unittest import logging import ...
gpl-3.0
ka7eh/django-oscar
tests/integration/order/creator_tests.py
45
7517
from decimal import Decimal as D from django.test import TestCase from django.test.utils import override_settings from mock import Mock from oscar.apps.catalogue.models import ProductClass, Product from oscar.apps.offer.utils import Applicator from oscar.apps.order.models import Order from oscar.apps.order.utils impo...
bsd-3-clause