repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
iuliat/nova
refs/heads/master
nova/db/base.py
64
# 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 in compliance with the License. You may obtain # a ...
kdwink/intellij-community
refs/heads/master
python/lib/Lib/distutils/command/config.py
138
"""distutils.command.config Implements the Distutils 'config' command, a (mostly) empty command class that exists mainly to be sub-classed by specific module distributions and applications. The idea is that while every "config" command is different, at least they're all named the same, and users always see "config" i...
constverum/PyProxyChecker
refs/heads/master
proxybroker/__init__.py
2
""" Copyright © 2015-2018 Constverum <constverum@gmail.com>. 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 ...
tiagocoutinho/bliss
refs/heads/master
bliss/config/plugins/emotion.py
1
# -*- coding: utf-8 -*- # # This file is part of the bliss project # # Copyright (c) 2016 Beamline Control Unit, ESRF # Distributed under the GNU LGPLv3. See LICENSE for more info. from __future__ import absolute_import import os import sys import pkgutil import weakref from bliss.common.axis import Axis, AxisRef fro...
QinerTech/QinerApps
refs/heads/master
openerp/addons/l10n_sa/__openerp__.py
23
# coding: utf-8 { 'name': 'Saudi Arabia - Accounting', 'version': '1.1', 'author': 'DVIT.ME', 'category': 'Localization/Account Charts', 'description': """ Odoo Arabic localization for most arabic countries and Saudi Arabia. This initially includes chart of accounts of USA translated to Arabic. I...
hslee16/ansible-modules-extras
refs/heads/devel
cloud/openstack/os_group.py
67
#!/usr/bin/python # Copyright (c) 2016 IBM # # This module 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. # # This software is distrib...
tinkerinestudio/Tinkerine-Suite
refs/heads/master
TinkerineSuite/PIL/GimpPaletteFile.py
14
# # Python Imaging Library # $Id$ # # stuff to read GIMP palette files # # History: # 1997-08-23 fl Created # 2004-09-07 fl Support GIMP 2.0 palette files. # # Copyright (c) Secret Labs AB 1997-2004. All rights reserved. # Copyright (c) Fredrik Lundh 1997-2004. # # See the README file for information on usage ...
UdK-VPT/Open_eQuarter
refs/heads/master
mole/extensions/eval_enev/oeq_QTE_Wall.py
1
# -*- coding: utf-8 -*- import os,math from qgis.core import NULL from mole import oeq_global from mole.project import config from mole.extensions import OeQExtension from mole.stat_corr import rb_contemporary_base_uvalue_by_building_age_lookup def calculation(self=None, parameters={},feature = None): from math i...
apocquet/django
refs/heads/master
tests/i18n/contenttypes/tests.py
367
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os from django.contrib.contenttypes.models import ContentType from django.test import TestCase, override_settings from django.utils import six, translation from django.utils._os import upath @override_settings( USE_I18N=True, LOCALE_PATH...
wrr/wwwhisper
refs/heads/master
wwwhisper_service/wsgi.py
1
""" WSGI config for service project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` ...
kdaily/cloudbiolinux
refs/heads/master
cloudbio/biodata/ggd.py
6
"""Process GGD (Get Genomics Data) configurations for installation in biodata directories. Builds off work done by Aaron Quinlan to define and install genomic data: https://github.com/arq5x/ggd """ import collections import contextlib from distutils.version import LooseVersion import os import shutil import subproces...
edx-solutions/edx-platform
refs/heads/master
common/djangoapps/course_modes/tests/test_signals.py
4
""" Unit tests for the course_mode signals """ from datetime import datetime, timedelta import ddt from django.conf import settings from mock import patch from pytz import UTC from course_modes.models import CourseMode from course_modes.signals import _listen_for_course_publish from xmodule.modulestore import Modul...
axinging/crosswalk
refs/heads/master
PRESUBMIT.py
9
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Copyright (c) 2016 Intel Corporation. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Presubmit checks for Crosswalk. These checks are performed automatically by our Trybots ...
bodylabs/rigger
refs/heads/master
bodylabs_rigger/factory.py
2
class RiggedModelFactory(object): """Generates rigged models from vertices. The factory is initialized with the static data for the model rig: the mesh topology and texture map, the joint hierarchy, and the vertex weight map. The RiggedModelFactory can then be used to generate FbxScene objects bind...
aherlihy/mongo-python-driver
refs/heads/master
test/test_legacy_api.py
2
# Copyright 2015 MongoDB, 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, so...
santhoshtr/silpa
refs/heads/master
src/silpa/modules/hyphenator/hyph.py
3
# -*- coding: utf-8 -*- """ This is a Pure Python module to hyphenate text. It is inspired by Ruby's Text::Hyphen, but currently reads standard *.dic files, that must be installed separately. In the future it's maybe nice if dictionaries could be distributed together with this module, in a slightly prepared form, li...
gnowxilef/Wox
refs/heads/master
PythonHome/Lib/site-packages/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.py
1093
# Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy. # Passes Python2.7's test suite and incorporates all the latest updates. # Copyright 2009 Raymond Hettinger, released under the MIT License. # http://code.activestate.com/recipes/576693/ try: from thread import get_ident as _get_ide...
carlodri/moviepy
refs/heads/master
moviepy/audio/fx/audio_fadeout.py
18
from moviepy.decorators import audio_video_fx, requires_duration import numpy as np @audio_video_fx @requires_duration def audio_fadeout(clip, duration): """ Return a sound clip where the sound fades out progressively over ``duration`` seconds at the end of the clip. """ def fading(gf,t): ...
netsec-ethz/scion
refs/heads/scionlab
acceptance/common/go.py
2
# Copyright 2020 Anapaya Systems from plumbum import local from plumbum.machines import LocalMachine from typing import Tuple from pathlib import Path def test(package: str) -> Tuple[int, str, str]: """ Runs the Go tests in package. Set argument go_from_bazel to true to retrieve the go binary from the b...
ramezquitao/pyoptools
refs/heads/master
pyoptools/misc/resources/__init__.py
2
from .resources import (detectCPUs, detectOpenCL, has_double_support, has_amd_double_support) __all__ = ["detectCPUs", "detectOpenCL", "has_double_support", "has_amd_double_support"]
Aiacos/DevPyLib
refs/heads/master
mayaLib/rigLib/utils/proxyGeo.py
1
__author__ = 'Lorenzo Argentieri' import pymel.core as pm from mayaLib.rigLib.utils import util, common from mayaLib.rigLib.utils import name from mayaLib.rigLib.utils import skin def invertSelection(shape, faces): pm.select(shape+'.f[*]') pm.select(faces, deselect=True) #mel.eval('InvertSelection;') ...
Qinusty/rethinkdb
refs/heads/next
test/memcached_workloads/multi_serial_mix.py
21
#!/usr/bin/env python # Copyright 2010-2012 RethinkDB, all rights reserved. from __future__ import print_function import sys, os sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'common'))) import multiprocessing, time, pickle import memcached_workload_common, serial_mix from v...
youdonghai/intellij-community
refs/heads/master
python/testData/override/overriddenMethodRaisesNotImplementedError.py
79
class A: def m(self): """Abstract method.""" raise NotImplementedError('Should not be called directly') class B(A): pass
juharris/tensorflow
refs/heads/master
tensorflow/contrib/distributions/python/kernel_tests/gamma_test.py
8
# 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...
ljhljh235/AutoRest
refs/heads/master
src/generator/AutoRest.Python.Tests/Expected/AcceptanceTests/Http/auto_rest_http_infrastructure_test_service/models/__init__.py
31
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
cedadev/dapbench
refs/heads/master
dapbench/thredds/lib/configuration.py
1
# BSD Licence # Copyright (c) 2012, Science & Technology Facilities Council (STFC) # All rights reserved. # # See the LICENSE file in the source distribution of this software for # the full license text. ''' Checker configuration class. Created on 29 Sep 2011 @author: rwilkinson ''' class Configuration(object): ...
asedunov/intellij-community
refs/heads/master
python/testData/formatter/commentInEmptyTuple.py
80
var_name = ( # comment )
petrus-v/odoo
refs/heads/8.0
addons/l10n_pl/__openerp__.py
277
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009 - now Grzegorz Grzelak grzegorz.grzelak@openglobe.pl # All Rights Reserved # $Id$ # # This program is free software: you can redistrib...
elfnor/sverchok
refs/heads/master
nodes/list_struct/repeater.py
3
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 distrib...
grengojbo/st2
refs/heads/master
st2actions/st2actions/cmd/actionrunner.py
3
import eventlet import os import sys from st2actions import config from st2actions import scheduler, worker from st2common import log as logging from st2common.service_setup import setup as common_setup from st2common.service_setup import teardown as common_teardown LOG = logging.getLogger(__name__) eventlet.monkey...
lvh/pyopenssl
refs/heads/master
examples/sni/server.py
63
# Copyright (C) Jean-Paul Calderone # See LICENSE for details. if __name__ == '__main__': import server raise SystemExit(server.main()) from sys import stdout from socket import SOL_SOCKET, SO_REUSEADDR, socket from OpenSSL.crypto import FILETYPE_PEM, load_privatekey, load_certificate from OpenSSL.SSL import...
pando85/gourmet
refs/heads/master
gourmet/test_plugin_loader.py
7
import unittest import tempfile import os import gourmet.gglobals # clear out Gourmet's DB tmpdir = tempfile.mktemp() os.makedirs(tmpdir) gourmet.gglobals.gourmetdir = tmpdir import gourmet.GourmetRecipeManager import gourmet.backends.db gourmet.backends.db.RecData.__single = None gourmet.GourmetRecipeManager.Gourm...
mikewiebe-ansible/ansible
refs/heads/devel
lib/ansible/modules/identity/ipa/ipa_service.py
8
#!/usr/bin/python # -*- coding: utf-8 -*- # 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
basicworld/py_structure
refs/heads/master
chap5_squeue.py
2
# -*- coding: utf-8 -*- """ 使用python的list实现队列功能 自己管理list的存储 自动扩容 """ class QueueUnderflow(ValueError): pass class SQueue(object): """ 对满就是self._num = self._len 下一个空位的下标是:(self._head + self._num) % self._len """ def __init__(self, init_len=8): self._len = init_len self._elems...
todaychi/hue
refs/heads/master
desktop/core/ext-py/cffi-1.5.2/setup_base.py
12
import sys, os from setup import include_dirs, sources, libraries, define_macros from setup import library_dirs, extra_compile_args, extra_link_args if __name__ == '__main__': from distutils.core import setup from distutils.extension import Extension standard = '__pypy__' not in sys.builtin_module_names...
0x90sled/catapult
refs/heads/master
dashboard/dashboard/add_point_test.py
1
# 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 json import math import unittest import mock import webapp2 import webtest from google.appengine.api import datastore_errors from google.appengine.e...
juanalfonsopr/odoo
refs/heads/8.0
openerp/addons/base/module/module.py
68
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2014 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
alheinecke/tensorflow-xsmm
refs/heads/master
tensorflow/contrib/learn/python/learn/dataframe/transforms/sparsify.py
76
# 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...
jordanemedlock/psychtruths
refs/heads/master
temboo/Library/Google/Plus/Domains/Circles/Get.py
5
# -*- coding: utf-8 -*- ############################################################################### # # Get # Retrieves a specific circle. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in comp...
warmspringwinds/scikit-image
refs/heads/master
skimage/color/tests/test_colorconv.py
8
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for color conversion functions. Authors ------- - the rgb2hsv test was written by Nicolas Pinto, 2009 - other tests written by Ralf Gommers, 2009 :license: modified BSD """ from __future__ import division import os.path import numpy as np from numpy.testing im...
CingHu/neutron-ustack
refs/heads/master
neutron/db/migration/alembic_migrations/versions/e28dc49e9e4_add_lbaas_pool_subnet_network_id.py
1
# Copyright 2014 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 applicable law ...
kalaspuff/tomodachi
refs/heads/master
tests/services/test/service.py
5
import tomodachi from tomodachi.discovery.dummy_registry import DummyRegistry from tomodachi.envelope.json_base import JsonBase from .code import test_func @tomodachi.service class DummyService(tomodachi.Service): name = "test_dummy" discovery = [DummyRegistry] message_envelope = JsonBase options = {...
matmutant/sl4a
refs/heads/master
python-build/python-libs/python-twitter/twitter_test.py
90
#!/usr/bin/python2.4 # -*- coding: utf-8 -*-# # # Copyright 2007 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/LICENS...
Venturi/cms
refs/heads/master
env/lib/python2.7/site-packages/unidecode/x0b3.py
253
data = ( 'dae', # 0x00 'daeg', # 0x01 'daegg', # 0x02 'daegs', # 0x03 'daen', # 0x04 'daenj', # 0x05 'daenh', # 0x06 'daed', # 0x07 'dael', # 0x08 'daelg', # 0x09 'daelm', # 0x0a 'daelb', # 0x0b 'daels', # 0x0c 'daelt', # 0x0d 'daelp', # 0x0e 'daelh', # 0x0f 'daem', # ...
traff/dtcov
refs/heads/master
test/test_parser.py
1
import unittest import textwrap from dtcov.dt_report import DjangoTemplateCodeParser class ParserTest(unittest.TestCase): def parse_source(self, text): text = textwrap.dedent(text) cp = DjangoTemplateCodeParser(text=text, exclude="nocover") ret = cp.parse_source() return cp, ret ...
jorgealmerio/QEsg
refs/heads/master
core/ezdxf/tools/codepage.py
1
# Purpose: constant values # Created: 10.03.2011 # Copyright (C) 2011, Manfred Moitzi # License: MIT License from __future__ import unicode_literals __author__ = "mozman <mozman@gmx.at>" codepage_to_encoding = { '874': 'cp874', # Thai, '932': 'cp932', # Japanese '936': 'gbk', # UnifiedChinese '949':...
KevinShawn/WinObjC
refs/heads/master
deps/3rdparty/cairolegacy/perf/make-html.py
169
#!/usr/bin/python from string import strip from sys import stdin targets = {} smilies = {'slowdown': '&#9785;' , 'speedup': '&#9786;'} for line in stdin: line = map(strip, filter(None, line.split(' '))) if 9 == len(line): target, name = line[0:2] factor, dir = line[-2:] name = name.split('-') name, size ...
rvlm/rvlm-paraform
refs/heads/init
src/rvlm/paraform/utils.py
1
r""" Helper functions ================ This document describes functions from RVLM Paraform project, which get available after the following module import: .. code-block:: python import rvlm.paraform.utils Despite this module isn't for internal use only, it's recommended for library user to rely on its content ...
malept/youtube-dl
refs/heads/master
youtube_dl/extractor/rds.py
57
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( parse_duration, parse_iso8601, js_to_json, ) from ..compat import compat_str class RDSIE(InfoExtractor): IE_DESC = 'RDS.ca' _VALID_URL = r'https?://(?:www\.)?rds\.ca/vid(?:[eé]|%C3%A9)o...
shadowcoin/lightcoin
refs/heads/master
share/qt/extract_strings_qt.py
2945
#!/usr/bin/python ''' Extract _("...") strings for translation and convert to Qt4 stringdefs so that they can be picked up by Qt linguist. ''' from subprocess import Popen, PIPE import glob import operator OUT_CPP="src/qt/bitcoinstrings.cpp" EMPTY=['""'] def parse_po(text): """ Parse 'po' format produced by x...
SoftwareLiteracyFoundation/Python-Programs
refs/heads/master
program_8_List_Functions.py
1
# Create a list of state names stateList1 = ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California'] stateList2 = ['Colorado', 'Conneticut', 'Delaware', 'Florida', 'Georgia'] stateList3 = ['Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas'] # a function to print the functions of a list def PrintListFuncti...
buguelos/odoo
refs/heads/master
openerp/addons/base/ir/ir_rule.py
312
# -*- 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 GNU...
digrich/bubblechart-panel
refs/heads/master
node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_sln.py
1831
#!/usr/bin/env python # 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. """Prints the information in a sln file in a diffable way. It first outputs each projects in alphabetical order with their dependenci...
mthssdrbrg/mopidy-scrobbler
refs/heads/master
tests/test_frontend.py
1
import unittest import mock from mopidy import models import pylast from mopidy_scrobbler import frontend as frontend_lib @mock.patch('mopidy_scrobbler.frontend.pylast', spec=pylast) class FrontendTest(unittest.TestCase): def setUp(self): self.config = { 'scrobbler': { 'us...
golden1232004/webrtc_new
refs/heads/master
chromium/src/build/android/pylib/utils/zip_utils.py
24
# 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. # pylint: disable=unused-wildcard-import # pylint: disable=wildcard-import from devil.utils.zip_utils import *
Tokyo-Buffalo/tokyosouth
refs/heads/master
env/lib/python3.6/site-packages/twisted/words/xish/utility.py
13
# -*- test-case-name: twisted.words.test.test_xishutil -*- # # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Event Dispatching and Callback utilities. """ from __future__ import absolute_import, division from twisted.python import log from twisted.python.compat import iteritems from twist...
webmull/phantomjs
refs/heads/master
src/breakpad/src/tools/gyp/pylib/gyp/MSVSToolFile.py
138
#!/usr/bin/python2.4 # Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Visual Studio project reader/writer.""" import common import xml.dom import xml.dom.minidom #------------------------------------------...
tianyang-li/de-novo-rna-seq-quant-1
refs/heads/master
boost_1_51_0/libs/python/test/bienstman2.py
46
# Copyright David Abrahams 2004. Distributed under 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) ''' >>> import bienstman2_ext ''' def run(args = None): import sys import doctest if args is not None: sys.argv = a...
ake-koomsin/mapnik_nvpr
refs/heads/master
scons/scons-local-2.2.0/SCons/Tool/filesystem.py
14
"""SCons.Tool.filesystem Tool-specific initialization for the filesystem tools. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 20...
commercehub-oss/kerb-sts
refs/heads/master
tests/test_awsrole.py
1
# Copyright 2016 Commerce Technologies, 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
rosmo/ansible
refs/heads/devel
test/units/modules/network/netscaler/test_netscaler_cs_vserver.py
68
# Copyright (c) 2017 Citrix Systems # # 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. # # ...
kalahbrown/HueBigSQL
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/utils/unittest/collector.py
572
import os import sys from django.utils.unittest.loader import defaultTestLoader def collector(): # import __main__ triggers code re-execution __main__ = sys.modules['__main__'] setupDir = os.path.abspath(os.path.dirname(__main__.__file__)) return defaultTestLoader.discover(setupDir)
karstenw/nodebox-pyobjc
refs/heads/master
examples/Extended Application/sklearn/examples/cluster/plot_kmeans_silhouette_analysis.py
1
""" =============================================================================== Selecting the number of clusters with silhouette analysis on KMeans clustering =============================================================================== Silhouette analysis can be used to study the separation distance between the...
ubiar/odoo
refs/heads/8.0
addons/document/wizard/__init__.py
444
# -*- 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...
yantrabuddhi/opencog
refs/heads/master
opencog/nlp/sentiment/basic_sentiment_analysis.py
11
# coding: utf-8 """ basic_sentiment_analysis ~~~~~~~~~~~~~~~~~~~~~~~~ This module contains the code and examples described in http://fjavieralba.com/basic-sentiment-analysis-with-python.html Modified by Ruiting Lian, 2016/7 """ import nltk import yaml import sys import os import re class Splitter(object): def...
pinterest/pymemcache
refs/heads/master
pymemcache/test/conftest.py
1
import os.path import pytest import socket import ssl def pytest_addoption(parser): parser.addoption('--server', action='store', default='localhost', help='memcached server') parser.addoption('--port', action='store', default='11211', help='memcached server port') ...
darkless456/Python
refs/heads/master
sl默认语法.py
1
print ("默认语法")
oesteban/preprocessing-workflow
refs/heads/master
fmriprep/workflows/fieldmap/phdiff.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ .. _sdc_phasediff : Phase-difference B0 estimation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The field inhomogeneity inside the scanner (fieldmap) is proportional to...
wweiradio/django-guardian
refs/heads/master
guardian/tests/forms_test.py
86
from __future__ import unicode_literals from django.contrib.contenttypes.models import ContentType from django.test import TestCase from guardian.compat import get_user_model from guardian.forms import BaseObjectPermissionsForm class BaseObjectPermissionsFormTests(TestCase): def setUp(self): self.user = ...
rs2/pandas
refs/heads/master
asv_bench/benchmarks/frame_methods.py
1
import string import warnings import numpy as np from pandas import DataFrame, MultiIndex, NaT, Series, date_range, isnull, period_range from .pandas_vb_common import tm class GetNumericData: def setup(self): self.df = DataFrame(np.random.randn(10000, 25)) self.df["foo"] = "bar" self.df...
bcheung92/Paperproject
refs/heads/master
gem5/src/arch/arm/ArmISA.py
6
# Copyright (c) 2012-2013, 2015 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the fun...
adrienbrault/home-assistant
refs/heads/dev
homeassistant/components/sms/notify.py
6
"""Support for SMS notification services.""" import logging import gammu # pylint: disable=import-error import voluptuous as vol from homeassistant.components.notify import PLATFORM_SCHEMA, BaseNotificationService from homeassistant.const import CONF_NAME, CONF_RECIPIENT import homeassistant.helpers.config_validatio...
felipenaselva/felipe.repository
refs/heads/master
script.module.placenta/lib/resources/lib/modules/jsunpack.py
3
""" resolveurl XBMC Addon Copyright (C) 2013 Bstrdsmkr 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) any later version. ...
siosio/intellij-community
refs/heads/master
python/testData/completion/heavyStarPropagation/lib/_pkg1/_pkg1_0/_pkg1_0_0/_pkg1_0_0_1/__init__.py
30
from ._pkg1_0_0_1_0 import * from ._pkg1_0_0_1_1 import *
UXJera/JeremiahNyman.com
refs/heads/master
node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/gyp/pylib/gyp/easy_xml.py
1049
# 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. import re import os def XmlToString(content, encoding='utf-8', pretty=False): """ Writes the XML content to disk, touching the file only if it has changed. ...
Linutux/Gourmet
refs/heads/master
gourmet/plugins/import_export/gxml_plugin/gxml_importer.py
1
import xml.sax, re, sys, xml.sax.saxutils from gourmet.importers import xml_importer from gourmet.gdebug import * from gourmet.gglobals import * import base64 unquoteattr = xml_importer.unquoteattr class RecHandler (xml_importer.RecHandler): def __init__ (self, total=None, conv=None, parent_thread=None): ...
dushu1203/chromium.src
refs/heads/nw12
chrome/common/extensions/docs/server2/whats_new_data_source.py
41
# 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. from itertools import groupby from operator import itemgetter import posixpath from data_source import DataSource from extensions_paths import JSON_TEMPLATE...
turbokongen/home-assistant
refs/heads/dev
tests/components/device_automation/test_init.py
3
"""The test for light device automation.""" import pytest import homeassistant.components.automation as automation from homeassistant.components.websocket_api.const import TYPE_RESULT from homeassistant.const import CONF_PLATFORM, STATE_OFF, STATE_ON from homeassistant.helpers import device_registry from homeassistant...
ultcoin/EasterCoin2014
refs/heads/master
contrib/testgen/gen_base58_test_vectors.py
1000
#!/usr/bin/env python ''' Generate valid and invalid base58 address and private key test vectors. Usage: gen_base58_test_vectors.py valid 50 > ../../src/test/data/base58_keys_valid.json gen_base58_test_vectors.py invalid 50 > ../../src/test/data/base58_keys_invalid.json ''' # 2012 Wladimir J. van der Laan # R...
SerCeMan/intellij-community
refs/heads/master
python/testData/refactoring/move/importFirstWithSlash/after/src/file2.py
83
__author__ = 'catherine' def function_1(): pass
karlito40/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/manifest/log.py
317
import logging logging.basicConfig() logger = logging.getLogger("manifest") logger.setLevel(logging.DEBUG) def get_logger(): return logger
shijx12/DeepSim
refs/heads/master
lib/networks/PVAnet_test.py
3
# -------------------------------------------------------- # TFFRCNN - Resnet50 # Copyright (c) 2016 # Licensed under The MIT License [see LICENSE for details] # Written by miraclebiu # -------------------------------------------------------- import tensorflow as tf from .network import Network from ..fast_rcnn.config ...
kapiziak/mtasa-blue
refs/heads/master
vendor/google-breakpad/src/third_party/protobuf/protobuf/python/google/protobuf/message.py
261
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
bigswitch/nova
refs/heads/master
plugins/xenserver/networking/etc/xensource/scripts/vif_rules.py
113
#!/usr/bin/env python # Copyright 2010-2011 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/LIC...
HyperionROM/android_external_chromium
refs/heads/kitkat
build/apply_locales.py
295
#!/usr/bin/env python # Copyright (c) 2009 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. # TODO: remove this script when GYP has for loops import sys import optparse def main(argv): parser = optparse.OptionParser() ...
rishibarve/incubator-airflow
refs/heads/master
airflow/operators/hive_to_druid.py
39
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
hoosteeno/mozillians
refs/heads/master
vendor-local/lib/python/celery/loaders/app.py
14
# -*- coding: utf-8 -*- """ celery.loaders.app ~~~~~~~~~~~~~~~~~~ The default loader used with custom app instances. :copyright: (c) 2009 - 2012 by Ask Solem. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from .base import BaseLoader class AppLoader(Ba...
provaleks/o8
refs/heads/8.0
openerp/addons/base/res/res_currency.py
4
# -*- 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 GNU...
ThiagoGarciaAlves/intellij-community
refs/heads/master
python/testData/mover/innerIf_afterUp.py
80
if value is not None: print "here" if not False or value <= 2: pass
grpc/grpc
refs/heads/master
bazel/test/python_test_repo/namespaced/upper/example/import_no_strip_test.py
10
# Copyright 2020 the gRPC authors. # # 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 wri...
zhouyao1994/incubator-superset
refs/heads/master
superset/views/log/__init__.py
1
# 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...
vertcoin/eyeglass
refs/heads/master
contrib/seeds/makeseeds.py
24
#!/usr/bin/env python # # Generate pnSeed[] from Bengt's DNS seeder # NSEEDS=600 import re import sys from subprocess import check_output def main(): lines = sys.stdin.readlines() ips = [] pattern = re.compile(r"^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3}):5889") for line in lines: m = patter...
jjscarafia/odoo
refs/heads/master
addons/hr_timesheet/hr_timesheet.py
37
# -*- 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...
poorboy44/Data-Science-45min-Intros
refs/heads/master
python-logging-201/dog.py
26
import logging from pet import Pet logger = logging.getLogger("pet_world." + __name__) class Dog(Pet): def __init__(self, **kwargs): # default values self.name = "Fido" self.word = "Arf!" self.legs = 4 super(Dog,self).__init__(**kwargs) self.logger = logger ...
HesselTjeerdsma/Cyber-Physical-Pacman-Game
refs/heads/master
Algor/flask/lib/python2.7/site-packages/docutils/languages/zh_cn.py
148
# -*- coding: utf-8 -*- # $Id: zh_cn.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: Pan Junyong <panjy@zopechina.com> # 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 ...
pgonda/servo
refs/heads/master
tests/wpt/css-tests/tools/sslutils/pregenerated.py
470
class PregeneratedSSLEnvironment(object): """SSL environment to use with existing key/certificate files e.g. when running on a server with a public domain name """ ssl_enabled = True def __init__(self, logger, host_key_path, host_cert_path, ca_cert_path=None): self._ca_cert...
ToonTownInfiniteRepo/ToontownInfinite
refs/heads/master
toontown/minigame/FogOverlay.py
4
from pandac.PandaModules import * from toontown.toonbase.ToonBaseGlobal import * from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM, State from direct.fsm import State from direct.task import Task from toontown.toonbase import ToontownGlobals impor...
hkernbach/arangodb
refs/heads/devel
3rdParty/V8/v5.7.492.77/tools/gyp/test/no-output/gyptest-no-output.py
349
#!/usr/bin/env python # Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verified things don't explode when there are targets without outputs. """ import TestGyp # TODO(evan): in ninja when there are no targ...
pshen/ansible
refs/heads/devel
test/units/playbook/test_taggable.py
119
# (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...
william-richard/moto
refs/heads/master
moto/kinesisvideo/__init__.py
2
from __future__ import unicode_literals from .models import kinesisvideo_backends from ..core.models import base_decorator kinesisvideo_backend = kinesisvideo_backends["us-east-1"] mock_kinesisvideo = base_decorator(kinesisvideo_backends)