repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
washort/zamboni
refs/heads/master
mkt/site/migrations/0002_auto_20151109_1326.py
6
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def remove_preload_waffle(apps, schema_editor): # We can't import the Switch model directly as it may be a newer # version than this migration expects. We use the historical version. Switch = apps.get_model('...
cgstudiomap/cgstudiomap
refs/heads/develop
main/eggs/requests-2.8.1-py2.7.egg/requests/hooks.py
390
# -*- coding: utf-8 -*- """ requests.hooks ~~~~~~~~~~~~~~ This module provides the capabilities for the Requests hooks system. Available hooks: ``response``: The response generated from a Request. """ HOOKS = ['response'] def default_hooks(): return dict((event, []) for event in HOOKS) # TODO: response i...
Rctue/nao-lib
refs/heads/master
gestures/QuestionGesture_1.py
2
# Choregraphe bezier export in Python. from naoqi import ALProxy names = list() times = list() keys = list() names.append("LShoulderPitch") times.append([ 0.50000, 1.00000]) keys.append([ [ 1.56300, [ 3, -0.16667, 0.00000], [ 3, 0.16667, 0.00000]], [ 1.39626, [ 3, -0.16667, 0.00000], [ 3, 0.00000, 0.00000]]]) names.a...
beezee/GAE-Django-base-app
refs/heads/master
django/contrib/gis/tests/distapp/__init__.py
12133432
B-UMMI/INNUca
refs/heads/master
modules/__init__.py
12133432
theolind/home-assistant
refs/heads/master
tests/util/__init__.py
12133432
isandlaTech/cohorte-demos
refs/heads/dev
led/dump/led-demo-raspberry/cohorte/dist/cohorte-1.0.0-1.0.0-20141201.234602-19-python-distribution/repo/sleekxmpp/plugins/xep_0221/media.py
14
""" SleekXMPP: The Sleek XMPP Library Copyright (C) 2012 Nathanael C. Fritz, Lance J.T. Stout This file is part of SleekXMPP. See the file LICENSE for copying permission. """ import logging from sleekxmpp.plugins import BasePlugin from sleekxmpp.xmlstream import register_stanza_plugin from sleekxmpp....
klnprj/testapp
refs/heads/master
django/contrib/messages/constants.py
630
DEBUG = 10 INFO = 20 SUCCESS = 25 WARNING = 30 ERROR = 40 DEFAULT_TAGS = { DEBUG: 'debug', INFO: 'info', SUCCESS: 'success', WARNING: 'warning', ERROR: 'error', }
yonglong009/pycharmNoteBook
refs/heads/master
lean_python3/pytools/for_excel/ctl_excel.py
1
import os __author__ = 'MaYonglong' # -*- coding: utf-8 -*- # http://www.jb51.net/article/60510.htm python 读写excel # http://www.python-excel.org/
nishant8BITS/node-gyp
refs/heads/master
gyp/pylib/gyp/generator/gypd.py
1824
# 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. """gypd output module This module produces gyp input as its output. Output files are given the .gypd extension to avoid overwriting the .gyp files that they are ...
alqfahad/odoo
refs/heads/8.0
addons/survey_crm/__openerp__.py
312
# -*- 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...
BassantMorsi/finderApp
refs/heads/master
lib/python2.7/site-packages/django/contrib/gis/geos/prototypes/__init__.py
163
""" This module contains all of the GEOS ctypes function prototypes. Each prototype handles the interaction between the GEOS library and Python via ctypes. """ from django.contrib.gis.geos.prototypes.coordseq import ( # NOQA create_cs, cs_clone, cs_getdims, cs_getordinate, cs_getsize, cs_getx, cs_gety, cs_...
peterwilletts24/Monsoon-Python-Scripts
refs/heads/master
pp_load_mean_pickle_multiple_l_s_rain_30181.py
1
""" Load multiple pp diagnostic files, aggregate by year, day etc, calcualte mean, sum etc and pickle """ import os, sys import glob import itertools import numpy as np import cPickle as pickle import iris import iris.coords as coords import iris.coord_categorisation from iris.analysis.interpolate import linea...
yasoob/PythonRSSReader
refs/heads/master
venv/lib/python2.7/dist-packages/twisted/test/test_defgen.py
34
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.internet.defer.deferredGenerator} and related APIs. """ from __future__ import division, absolute_import import sys from twisted.internet import reactor from twisted.trial import unittest from twisted.internet.defer im...
mhugent/Quantum-GIS
refs/heads/master
python/plugins/processing/tests/GdalTest.py
8
# -*- coding: utf-8 -*- """ *************************************************************************** GdalTest.py --------------------- Date : April 2013 Copyright : (C) 2013 by Victor Olaya Email : volayaf at gmail dot com *******************************...
twalpole/selenium
refs/heads/master
py/test/selenium/webdriver/common/click_tests.py
39
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
smilusingjavascript/blink
refs/heads/master
LayoutTests/http/tests/media/resources/media-source/generate-config-change-tests.py
55
#!/usr/bin/python # Copyright (C) 2013 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 c...
EthereumWebhooks/blockhooks
refs/heads/master
lib/ethereum/tests/test_transactions.py
2
import ethereum.transactions as transactions import ethereum.utils as utils import rlp from rlp.utils import decode_hex, encode_hex, str_to_bytes import ethereum.testutils as testutils from ethereum.testutils import fixture_to_bytes import ethereum.config as config import sys import json from ethereum.slogging import ...
allenlavoie/tensorflow
refs/heads/master
tensorflow/python/ops/nn_batchnorm_test.py
3
# 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...
marcanpilami/MAGE
refs/heads/master
ref/views/duplicate.py
2
# coding: utf-8 from django.shortcuts import render, redirect from django import forms from ref.models.instances import ComponentInstance, Environment from ref.creation import duplicate_envt from django.forms.formsets import formset_factory from django.contrib.auth.decorators import permission_required from django.db....
crepererum/invenio
refs/heads/master
invenio/legacy/bibupload/scripts/__init__.py
12133432
PolicyStat/django
refs/heads/master
django/contrib/gis/geos/tests/__init__.py
12133432
bloer/bgexplorer
refs/heads/master
bgexplorer/modeleditor/__init__.py
12133432
agilemobiledev/spiderfoot
refs/heads/master
ext/dns/tokenizer.py
44
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
tectronics/madcow
refs/heads/master
madcow/include/simplejson/tests/test_separators.py
136
import textwrap from unittest import TestCase import simplejson as json class TestSeparators(TestCase): def test_separators(self): h = [['blorpie'], ['whoops'], [], 'd-shtaeou', 'd-nthiouh', 'i-vhbjkhnth', {'nifty': 87}, {'field': 'yes', 'morefield': False} ] expect = textwrap.deden...
GehenHe/Recognize-Face-on-Android
refs/heads/master
tensorflow/contrib/learn/python/learn/estimators/multioutput_test.py
18
# 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...
simleo/pydoop
refs/heads/develop
int_test/opaque_split/gen_splits.py
2
#!/usr/bin/env python # BEGIN_COPYRIGHT # # Copyright 2009-2021 CRS4. # # 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 ap...
jochemdu/nyanchain
refs/heads/master
Abe/BCDataStream.py
53
# # Workalike python implementation of Bitcoin's CDataStream class. # import struct import StringIO import mmap class SerializationError(Exception): """ Thrown when there's a problem deserializing or serializing """ class BCDataStream(object): def __init__(self): self.input = None self.read_cursor = 0 ...
vmanoria/bluemix-hue-filebrowser
refs/heads/master
hue-3.8.1-bluemix/apps/search/src/search/urls.py
9
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
taroplus/spark
refs/heads/master
python/pyspark/ml/param/__init__.py
53
# # 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 us...
elkingtonmcb/django
refs/heads/master
django/db/backends/mysql/base.py
323
""" MySQL database backend for Django. Requires mysqlclient: https://pypi.python.org/pypi/mysqlclient/ MySQLdb is supported for Python 2 only: http://sourceforge.net/projects/mysql-python """ from __future__ import unicode_literals import datetime import re import sys import warnings from django.conf import settings...
raffaelespazzoli/origin
refs/heads/master
vendor/github.com/google/certificate-transparency/python/ct/cert_analysis/dnsnames_test.py
17
#!/usr/bin/env python # coding=utf-8 import unittest import mock from ct.cert_analysis import base_check_test from ct.cert_analysis import dnsnames from ct.cert_analysis import tld_list from ct.cert_analysis import tld_check from ct.test import test_config def gen_dns_name(name): dns_name = mock.Mock() dns_na...
vamanea/u-boot
refs/heads/master
tools/patman/series.py
10
# Copyright (c) 2011 The Chromium OS Authors. # # See file CREDITS for list of people who contributed to this # project. # # 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 # t...
jorik041/robotframework
refs/heads/master
src/robot/parsing/model.py
17
# 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...
Distrotech/bzr
refs/heads/distrotech-bzr
bzrlib/tests/per_repository_vf/test_repository.py
2
# Copyright (C) 2011 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in ...
sangh/LaserShow
refs/heads/master
pyglet-hg/pyglet/image/codecs/pil.py
10
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
douggeiger/gnuradio
refs/heads/master
gr-filter/python/filter/qa_freq_xlating_fir_filter.py
51
#!/usr/bin/env python # # Copyright 2008,2010,2012,2013 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 ...
devs1991/test_edx_docmode
refs/heads/master
venv/lib/python2.7/site-packages/networkx/utils/union_find.py
44
""" Union-find data structure. """ # 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 class UnionFind: """Union-find data structure. Each unionFind inst...
rven/odoo
refs/heads/14.0-fix-partner-merge-mail-activity
addons/stock/__init__.py
6
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from . import controllers from . import models from . import report from . import wizard from odoo import api, SUPERUSER_ID # TODO: Apply proper fix & remove in master def pre_init_hook(cr): env = api.Environment...
jikortus/pykickstart
refs/heads/master
translation-canary/translation_canary/translated/test_usability.py
5
# Check a .mo file for basic usability # # This will test that the file is well-formed and that the Plural-Forms value # is parseable # # Copyright (C) 2015 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of ...
minorua/QGIS
refs/heads/master
python/plugins/processing/algs/grass7/ext/r_li_shape.py
45
# -*- coding: utf-8 -*- """ *************************************************************************** r_li_shape.py ------------- Date : February 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr ********************************...
TeamExodus/external_chromium_org
refs/heads/EXODUS-5.1
build/android/pylib/junit/test_dispatcher.py
38
# 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. def RunTests(tests, runner_factory): """Runs a set of java tests on the host. Return: A tuple containing the results & the exit code. """ def ru...
vivitsu/dbxuploader
refs/heads/master
main.py
1
import urllib.request import shutil import argparse import urllib.parse import os from dbx import DBX parser = argparse.ArgumentParser() parser.add_argument("url", help="The URL of the file you want to upload") args = parser.parse_args() url = args.url o = urllib.parse.urlparse(url) """ Will work in very select case...
xhat/micropython
refs/heads/master
tests/bench/var-8-namedtuple-1st.py
52
import bench from _collections import namedtuple T = namedtuple("Tup", ["num", "bar"]) def test(num): t = T(20000000, 0) i = 0 while i < t.num: i += 1 bench.run(test)
davidzchen/tensorflow
refs/heads/master
tensorflow/python/tools/strip_unused_lib.py
23
# pylint: disable=g-bad-file-header # 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/LICENS...
dankeder/ansible-modules-extras
refs/heads/devel
packaging/svr4pkg.py
51
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Boyd Adamson <boyd () boydadamson.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 th...
51reboot/actual_09_homework
refs/heads/master
08/tanshuai/cmdb_v5/log2db.py
2
#!/usr/bin/env python # -*- coding: utf-8 -*- import dbutils import time s = time.time() # print 'start after:', time.time() - s def log2db(log_files='', topn=10, fetch=True): sql = 'insert into accesslog(ip,url,status,count) values(%s,%s,%s,%s)' rt_dict = {} _rt = [] if fetch: # 查询数据 _columns...
azat/qtcreator
refs/heads/master
scripts/deployqt.py
5
#!/usr/bin/env python ################################################################################ # Copyright (c) 2011 Nokia Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # ...
kcarnold/autograd
refs/heads/master
autograd/numpy/gpu_array_node.py
7
from __future__ import absolute_import from autograd.core import Node, primitive, cast, getval from . import numpy_wrapper as anp from .numpy_extra import ArrayNode, array_dtype_mappings, SparseArray from .use_gpu_numpy import use_gpu_numpy assert use_gpu_numpy() class GpuArrayNode(ArrayNode): @staticmethod d...
JosmanPS/scikit-learn
refs/heads/master
sklearn/linear_model/tests/test_bayes.py
299
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Fabian Pedregosa <fabian.pedregosa@inria.fr> # # License: BSD 3 clause import numpy as np from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import SkipTest from sklearn.linear_model.bayes import BayesianRidge, ARDRegres...
KiranJKurian/XScheduler
refs/heads/master
venv/lib/python2.7/site-packages/flask/testsuite/test_apps/lib/python2.5/site-packages/site_package/__init__.py
1799
import flask app = flask.Flask(__name__)
kevinburke/hamms
refs/heads/master
setup.py
1
from setuptools import setup # XXX: also update version in hamms/__init__.py __version__ = '1.3' setup( name='hamms', packages=['hamms'], version=__version__, description='Malformed servers to test your HTTP client', author='Kevin Burke', author_email='kev@inburke.com', url='https://github...
idrogeno/enigma2
refs/heads/master
lib/python/Tools/BoundFunction.py
120
class boundFunction: def __init__(self, fnc, *args, **kwargs): self.fnc = fnc self.args = args self.kwargs = kwargs def __call__(self, *args, **kwargs): newkwargs = self.kwargs newkwargs.update(kwargs) return self.fnc(*self.args + args, **newkwargs)
openstack/nova-solver-scheduler
refs/heads/master
nova_solverscheduler/tests/scheduler/solvers/constraints/test_aggregate_disk.py
1
# Copyright (c) 2014 Cisco Systems, 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 r...
mxOBS/deb-pkg_trusty_chromium-browser
refs/heads/master
mojo/public/tools/bindings/pylib/mojom_tests/parse/__init__.py
12133432
agiliq/django
refs/heads/master
django/contrib/gis/tests/gis_migrations/migrations/__init__.py
12133432
akaihola/django
refs/heads/master
tests/regressiontests/db_typecasts/__init__.py
12133432
uclouvain/osis
refs/heads/dev
base/tests/scripts/__init__.py
12133432
richardcornish/richardcornish
refs/heads/master
richardcornish/contact/templatetags/__init__.py
12133432
TanguyPatte/phantomjs-packaging
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/port/pulseaudio_sanitizer.py
122
# Copyright (C) 2010 Google Inc. All rights reserved. # Copyrigth (C) 2012 Intel Corporation # # 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 # n...
wikimedia/operations-debs-check_ganglia
refs/heads/master
check_ganglia/nagios.py
2
#!/usr/bin/python import sys import optparse from constants import * class OptionParser (optparse.OptionParser): def __init__ (self): optparse.OptionParser.__init__(self) self.add_option('-w', '--warn', help='Warn threshold.') self.add_option('-c', '--critical', ...
spirrello/spirrello-pynet-work
refs/heads/master
applied_python/lib/python2.7/site-packages/pylint/test/functional/eval_used.py
3
"""test for eval usage""" eval('os.listdir(".")') # [eval-used] eval('os.listdir(".")', globals={}) # [eval-used] eval('os.listdir(".")', globals=globals()) # [eval-used] def func(): """ eval in local scope""" eval('b = 1') # [eval-used]
ovnicraft/odoo
refs/heads/8.0
addons/website_sale_options/models/sale_order.py
237
# -*- coding: utf-8 -*- from openerp import SUPERUSER_ID from openerp.osv import osv, orm, fields from openerp.tools.translate import _ class sale_order_line(osv.Model): _inherit = "sale.order.line" _columns = { 'linked_line_id': fields.many2one('sale.order.line', 'Linked Order Line', domain="[('orde...
zestrada/nova-cs498cc
refs/heads/master
nova/hooks.py
10
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 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.a...
SnabbCo/neutron
refs/heads/master
neutron/tests/unit/vmware/db/test_nsx_db.py
13
# Copyright 2013 VMware, 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, ...
b-com/watcher-metering
refs/heads/master
watcher_metering/tests/agent/test_agent.py
1
# -*- encoding: utf-8 -*- # Copyright (c) 2015 b<>com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
goldsborough/.emacs
refs/heads/master
.emacs.d/.python-environments/default/lib/python3.5/site-packages/pkg_resources/_vendor/six.py
2715
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2015 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...
lidalei/DataMining
refs/heads/master
random_forests.py
1
import os, time from joblib import Parallel, delayed from openml.apiconnector import APIConnector from scipy.io.arff import loadarff import numpy as np import matplotlib.pylab as plt from sklearn.ensemble import RandomForestClassifier from sklearn.cross_validation import cross_val_score from sklearn.metrics import get_...
fernand/scipy
refs/heads/master
scipy/_lib/_testutils.py
39
""" Generic test utilities and decorators. """ from __future__ import division, print_function, absolute_import import os import sys from numpy.testing import dec __all__ = ['knownfailure_overridable', 'suppressed_stdout'] def knownfailure_overridable(msg=None): if not msg: msg = "Undiagnosed issues ...
whereismyjetpack/ansible
refs/heads/devel
lib/ansible/utils/module_docs_fragments/aws.py
14
# (c) 2014, Will Thames <will@thames.id.au> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version...
anirudhvenkats/clowdflows
refs/heads/master
workflows/vipercharts/views.py
12133432
quantum13/mlbootcamp5
refs/heads/master
qml_workdir/__init__.py
12133432
stevenewey/django
refs/heads/master
tests/m2m_intermediary/__init__.py
12133432
richpolis/siveinpy
refs/heads/master
env/lib/python2.7/site-packages/django/conf/locale/fa/__init__.py
12133432
viniciusgama/blog_gae
refs/heads/master
django/test/client.py
73
import urllib from urlparse import urlparse, urlunparse, urlsplit import sys import os import re import mimetypes import warnings from copy import copy try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.conf import settings from django.contrib.auth import authenti...
kevinwilde/WildeBot
refs/heads/master
src/mybot/Lib/site-packages/click/core.py
63
import os import sys from contextlib import contextmanager from itertools import repeat from functools import update_wrapper from .types import convert_type, IntRange, BOOL from .utils import make_str, make_default_short_help, echo, get_os_args from .exceptions import ClickException, UsageError, BadParameter, Abort, \...
paperreduction/fabric-bolt
refs/heads/master
fabric_bolt/core/mixins/models.py
32
"""Some generic model mixins""" from django.db import models class TrackingFields(models.Model): """Generic model for some generic fields related to when a record was created, updated and deleted In some cases the date_delete field is not useful since the actual record won't be there. However, we're us...
shakamunyi/neutron-dvr
refs/heads/master
neutron/plugins/vmware/common/securitygroups.py
36
# Copyright 2013 VMware, 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 a...
divio/django-cms
refs/heads/develop
cms/admin/placeholderadmin.py
1
import uuid import warnings from urllib.parse import parse_qsl, urlparse from django.urls import re_path from django.contrib.admin.helpers import AdminForm from django.contrib.admin.utils import get_deleted_objects from django.core.exceptions import PermissionDenied from django.db import router, transaction from djan...
paplorinc/intellij-community
refs/heads/master
python/testData/codeInsight/smartEnter/googleDocStringColonAndIndentAfterSection.py
53
def func(): """ A<caret>rgs """
zhulin2609/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_hybi.py
628
# Copyright 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 and the f...
WebSpider/headphones
refs/heads/master
lib/gntp/config.py
128
# Copyright: 2013 Paul Traylor # These sources are released under the terms of the MIT license: see LICENSE """ The gntp.config module is provided as an extended GrowlNotifier object that takes advantage of the ConfigParser module to allow us to setup some default values (such as hostname, password, and port) in a mor...
gbiggs/rtlogplayer
refs/heads/master
rt_logplayer/simpkl_log.py
1
#!/usr/bin/env python # -*- Python -*- # -*- coding: utf-8 -*- '''rtshell Copyright (C) 2009-2011 Geoffrey Biggs RT-Synthesis Research Group Intelligent Systems Research Institute, National Institute of Advanced Industrial Science and Technology (AIST), Japan All rights reserved. Licensed unde...
damonkohler/sl4a
refs/heads/master
python/src/Lib/multiprocessing/pool.py
52
# # Module providing the `Pool` class for managing a process pool # # multiprocessing/pool.py # # Copyright (c) 2007-2008, R Oudkerk --- see COPYING.txt # __all__ = ['Pool'] # # Imports # import threading import Queue import itertools import collections import time from multiprocessing import Process, cpu_count, Ti...
hendradarwin/VTK
refs/heads/master
Imaging/Core/Testing/Python/ReslicePermuteSlab.py
20
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # this script tests vtkImageReslice with different slab modes # Image pipeline reader = vtk.vtkImageReader() reader.ReleaseDataFlagOff() reader.SetDataByteOrderToLittleEndian() reader...
plotly/python-api
refs/heads/master
packages/python/plotly/plotly/validators/scattercarpet/hoverlabel/font/_size.py
1
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattercarpet.hoverlabel.font", **kwargs ): super(SizeValidator, self).__init__( plotly_name=plotly_name, parent_n...
currychou/1
refs/heads/master
static/Brython3.1.0-20150301-090019/Lib/formatter.py
751
"""Generic output formatting. Formatter objects transform an abstract flow of formatting events into specific output events on writer objects. Formatters manage several stack structures to allow various properties of a writer object to be changed and restored; writers need not be able to handle relative changes nor an...
lumig242/Hue-Integration-with-CDAP
refs/heads/pull3
desktop/core/ext-py/Paste-2.0.1/paste/urlmap.py
33
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php """ Map URL prefixes to WSGI applications. See ``URLMap`` """ import re import os import cgi try: # Python 3 from collections import MutableM...
837468220/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/idlelib/tabbedpages.py
49
"""An implementation of tabbed pages using only standard Tkinter. Originally developed for use in IDLE. Based on tabpage.py. Classes exported: TabbedPageSet -- A Tkinter implementation of a tabbed-page widget. TabSet -- A widget containing tabs (buttons) in one or more rows. """ from tkinter import * class InvalidN...
neherlab/treetool
refs/heads/master
augur/src/mutation_tree.py
1
import time, re, os, argparse,shutil, sys from tree_refine import tree_refine from virus_clean import virus_clean from virus_filter import flu_filter from date_util import numerical_date from collections import defaultdict from process import process, virus_config from Bio import SeqIO, AlignIO from Bio.Seq import Seq ...
nandub/yammer
refs/heads/master
test/lib/NavStoreParser.py
1
# # Copyright 2002, 2004 John T. Reese. # email: jtr at ofb.net # # This file is part of Yammer. # # Yammer 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 opt...
brett-lempereur/rfidreader
refs/heads/master
rfidreader/__init__.py
1
""" This package provides an interface and commands for interacting with the SL030 RFID reader on a Raspberry Pi. """
chugunovyar/factoryForBuild
refs/heads/master
env/lib/python2.7/site-packages/pybrain/supervised/evolino/gindividual.py
35
__author__ = 'Michael Isik' class Individual(object): """ Simple abstract template for a minimal individual """ def getGenome(self): """ Should return a reference to the genome. """ raise NotImplementedError() def copy(self): """ Should return a full copy of the individual...
Andrei-III/troll_updater
refs/heads/master
core/__init__.py
12133432
hrpt-se/hrpt
refs/heads/master
apps/pollster/migrations/__init__.py
12133432
pasqualguerrero/django
refs/heads/master
tests/model_formsets/__init__.py
12133432
csm0042/rpihome
refs/heads/master
tests/schedule_test.py
1
#!/usr/bin/python3 """ schedule_test.py: """ # Import Required Libraries (Standard, Third Party, Local) **************************************** import copy import datetime import logging import multiprocessing import unittest import sys if __name__ == "__main__": sys.path.append("..") from rpihome.modules.schedu...
schacon/git
refs/heads/master
git_remote_helpers/git/importer.py
1
import os import subprocess class GitImporter(object): """An importer for testgit repositories. This importer simply delegates to git fast-import. """ def __init__(self, repo): """Creates a new importer for the specified repo. """ self.repo = repo def do_import(self, ba...
selboo/xunlei-lixian
refs/heads/master
lixian_commands/delete.py
2
from lixian_commands.util import * from lixian_cli_parser import * from lixian_encoding import default_encoding from lixian_colors import colors import lixian_help import lixian_query @command_line_parser(help=lixian_help.delete) @with_parser(parse_login) @with_parser(parse_colors) @with_parser(parse_logging) @comman...
TomBaxter/osf.io
refs/heads/develop
osf/management/commands/add_notification_subscription.py
22
# -*- coding: utf-8 -*- # This is a management command, rather than a migration script, for two primary reasons: # 1. It makes no changes to database structure (e.g. AlterField), only database content. # 2. It takes a long time to run and the site doesn't need to be down that long. from __future__ import unicode_l...