repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
tboyce021/home-assistant
refs/heads/dev
homeassistant/components/picotts/tts.py
26
"""Support for the Pico TTS speech service.""" import logging import os import shutil import subprocess import tempfile import voluptuous as vol from homeassistant.components.tts import CONF_LANG, PLATFORM_SCHEMA, Provider _LOGGER = logging.getLogger(__name__) SUPPORT_LANGUAGES = ["en-US", "en-GB", "de-DE", "es-ES"...
uclouvain/osis
refs/heads/dev
base/migrations/0455_populate_repartition_volumes.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2019-05-10 09:35 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('base', '0454_auto_20190517_0935'), ] operations = [ migrations.RunSQL( ...
proxysh/Safejumper-for-Mac
refs/heads/master
buildmac/Resources/env/lib/python2.7/site-packages/Crypto/PublicKey/_slowmath.py
124
# -*- coding: utf-8 -*- # # PubKey/RSA/_slowmath.py : Pure Python implementation of the RSA portions of _fastmath # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To #...
nextgis/nextgisweb
refs/heads/updates
nextgisweb/feature_description/extension.py
1
# -*- coding: utf-8 -*- from __future__ import division, absolute_import, print_function, unicode_literals from ..feature_layer import FeatureExtension from ..models import DBSession from .model import FeatureDescription @FeatureExtension.registry.register class FeatureDescriptionExtension(FeatureExtension): id...
repotvsupertuga/repo
refs/heads/master
plugin.video.SportsDevil/lib/utils/drench.py
14
""" JavaScript encryption module ver. 2.0 by Daniel Rench Based on existing code: Copyright (c) 2003 by Andre Mueller. Init of blowfish constants with a function (init/backup errors) Copyright (c) 2003 by Rainer Wollmann This Object is open source. You can redistribute it and/or modify it under the terms of th...
lks21c/elasticsearch
refs/heads/master
dev-tools/smoke_test_rc.py
56
# Licensed to Elasticsearch under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this file except...
tpsatish95/Python-Workshop
refs/heads/master
Python Environment Setup/Alternate/1. Python/1. Installer/Python-3.4.0(Linux)/Lib/test/test_aifc.py
91
from test.support import findfile, TESTFN, unlink import unittest from test import audiotests from audioop import byteswap import os import io import sys import struct import aifc class AifcTest(audiotests.AudioWriteTests, audiotests.AudioTestsWithSourceFile): module = aifc close_fd = True ...
Asquera/bigcouch
refs/heads/master
couchjs/scons/scons-local-2.0.1/SCons/Platform/sunos.py
61
"""engine.SCons.Platform.sunos Platform-specific initialization for Sun systems. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Platform.Platform() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009...
owlas/magpy
refs/heads/master
magpy/geometry/arkus.py
2
"""Coordinates for Arkus cluster geometries. This module contains the coordinates of particles arranged into Arkus cluster geometries of varying size. Arkus clusters are *minimum energy* clusters that represent tightly packed clusters of spherical particles. Their definition (and name) are derived from: N. Arkus, V. ...
nishad-jobsglobal/odoo-marriot
refs/heads/master
addons/payment/tests/__init__.py
459
# -*- coding: utf-8 -*- import common
muntasirsyed/intellij-community
refs/heads/master
python/helpers/pydev/pydevd_utils.py
18
import traceback try: from urllib import quote except: from urllib.parse import quote import os import pydevd_constants import sys import pydev_log def save_main_module(file, module_name): # patch provided by: Scott Schlesier - when script is run, it does not # use globals from pydevd: # This wil...
comepradz/pybrain
refs/heads/master
pybrain/rl/environments/twoplayergames/capturegame.py
25
__author__ = 'Tom Schaul, tom@idsia.ch' from random import choice from scipy import zeros from .twoplayergame import TwoPlayerGame # TODO: undo operation class CaptureGame(TwoPlayerGame): """ the capture game is a simplified version of the Go game: the first player to capture a stone wins! Pass moves are ...
dagwieers/ansible
refs/heads/devel
lib/ansible/plugins/doc_fragments/cloudstack.py
31
# -*- coding: utf-8 -*- # Copyright (c) 2015, René Moser <mail@renemoser.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard cloudstack documentation fragment DOCUMENTATION = r''' options: api_key: description: ...
danielpalomino/gem5
refs/heads/master
util/stats/barchart.py
90
# Copyright (c) 2005-2006 The Regents of The University of Michigan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this ...
ahmedbodi/vertcoin
refs/heads/master
test/functional/p2p_unrequested_blocks.py
2
#!/usr/bin/env python3 # Copyright (c) 2015-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test processing of unrequested blocks. Setup: two nodes, node0+node1, not connected to each other. Nod...
slothOn/snownlp
refs/heads/master
snownlp/normal/__init__.py
7
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os import re import codecs from . import zh from . import pinyin stop_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'stopwords.txt') pinyin_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),...
ironbox360/django
refs/heads/master
tests/introspection/models.py
216
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Reporter(models.Model): first_name = models.CharField(max_length=30) last_name = models.CharField(max_length=30) email = models.EmailField(...
lisael/pg-django
refs/heads/master
django/contrib/gis/geos/coordseq.py
411
""" This module houses the GEOSCoordSeq object, which is used internally by GEOSGeometry to house the actual coordinates of the Point, LineString, and LinearRing geometries. """ from ctypes import c_double, c_uint, byref from django.contrib.gis.geos.base import GEOSBase, numpy from django.contrib.gis.geos.error impo...
arun6582/django
refs/heads/master
django/contrib/messages/apps.py
130
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class MessagesConfig(AppConfig): name = 'django.contrib.messages' verbose_name = _("Messages")
se4u/pylearn2
refs/heads/master
pylearn2/scripts/gsn_example.py
44
""" .. todo:: WRITEME """ from __future__ import print_function import cPickle as pickle import itertools import numpy as np from theano.compat.six.moves import xrange import theano.tensor as T from pylearn2.expr.activations import rescaled_softmax from pylearn2.costs.autoencoder import MeanBinaryCrossEntropy f...
basho/riagi
refs/heads/master
riagi/users/models.py
10644
from django.db import models # Create your models here.
christabor/cookiecutter
refs/heads/master
cookiecutter/compat.py
5
import sys PY3 = sys.version_info[0] == 3 OLD_PY2 = sys.version_info[:2] < (2, 7) if PY3: # pragma: no cover input_str = 'builtins.input' iteritems = lambda d: iter(d.items()) from io import StringIO else: # pragma: no cover from __builtin__ import raw_input input = raw_input input_str = ...
Matt-Deacalion/django
refs/heads/master
django/contrib/sessions/base_session.py
348
""" This module allows importing AbstractBaseSession even when django.contrib.sessions is not in INSTALLED_APPS. """ from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ class BaseSes...
bkirui/odoo
refs/heads/8.0
addons/hr_payroll/res_config.py
441
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
cesargtz/YecoraOdoo
refs/heads/master
openerp/addons/base/res/res_bank.py
242
# -*- 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...
msherry/PyXB-1.1.4
refs/heads/master
tests/datatypes/test-normalizedString.py
1
from pyxb_114.exceptions_ import * import unittest import pyxb_114.binding.datatypes as xsd class Test_normalizedString (unittest.TestCase): Cases = [ ("with\nnewline", 'with newline'), ("with\rreturn", 'with return'), ("with\ttab", 'with tab'), ("\n\nleading newline", ' ...
songfj/calibre
refs/heads/master
setup/installer/windows/freeze.py
8
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import with_statement, print_function __license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import sys, os, shutil, glob, py_compile, subprocess, re, zipfile, t...
kursion/twitchist
refs/heads/master
twitchist/__init__.py
2
""" This small application let you get a list of live stream for a specific game on twitch. Author: Yves Lange (Kursion) example: $ twitchist --game "Dota 2" --limit 50 """ from urllib import request from subprocess import call from colorama import Fore, Back, Style import json, colorama, argparse, os _livestrea...
jhseu/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/save_restore_ops_test.py
22
# 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...
sposs/DIRAC
refs/heads/integration
ResourceStatusSystem/PolicySystem/PDP.py
8
# $HeadURL $ """ PDP PDP ( PolicyDecisionPoint ) is the back-end for the PolicySystem. It discovers the policies, finds the best match, evaluates them, merges their results taking the most penalizing one, computes the set of actions to be triggered and returns all the information to the PEP which will enforce ...
CJ8664/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/py/py/_process/killproc.py
278
import py import os, sys if sys.platform == "win32" or getattr(os, '_name', '') == 'nt': try: import ctypes except ImportError: def dokill(pid): py.process.cmdexec("taskkill /F /PID %d" %(pid,)) else: def dokill(pid): PROCESS_TERMINATE = 1 handle ...
ygol/dotfiles
refs/heads/master
bin/.venv-ansible-venv/lib/python2.6/site-packages/setuptools/command/install_egg_info.py
357
from setuptools import Command from setuptools.archive_util import unpack_archive from distutils import log, dir_util import os, shutil, pkg_resources class install_egg_info(Command): """Install an .egg-info directory for the package""" description = "Install an .egg-info directory for the package" user_...
agry/NGECore2
refs/heads/master
scripts/object/tangible/hair/rodian/hair_rodian_male_s28.py
85615
import sys def setup(core, object): return
agry/NGECore2
refs/heads/master
scripts/object/tangible/quest/meatlump/mtp_hideout_quest04_stash.py
85615
import sys def setup(core, object): return
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/mobile/kwi_hue.py
85615
import sys def setup(core, object): return
ebroder/anygit
refs/heads/master
anygit/lib/helpers.py
1
"""Helper functions Consists of functions to typically be used within templates, but also available to Controllers. This module is available to templates as 'h'. """ import re from routes import util from webhelpers.pylonslib import Flash as _Flash flash = _Flash('flash') error = _Flash('error') github_com_re = re.c...
lposti/pyfJmod
refs/heads/master
setup.py
1
#!/usr/bin/env python __author__ = 'lposti' from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext from numpy import get_include from sys import argv from subprocess import Popen # Make a `veryclean` rule to get rid of intermediate and library files if "very...
louiskun/flaskGIT
refs/heads/master
venv/lib/python2.7/site-packages/setuptools/sandbox.py
109
import os import sys import tempfile import operator import functools import itertools import re import contextlib import pickle from setuptools.extern import six from setuptools.extern.six.moves import builtins, map import pkg_resources if sys.platform.startswith('java'): import org.python.modules.posix.PosixMo...
warmspringwinds/scikit-image
refs/heads/master
skimage/_shared/tests/test_testing.py
3
""" Testing decorators module """ import numpy as np from nose.tools import (assert_true, assert_raises, assert_equal) from skimage._shared.testing import doctest_skip_parser def test_skipper(): def f(): pass class c(): def __init__(self): self.me = "I think, therefore..." ...
tobes/munge
refs/heads/master
munge/cli.py
1
import argparse import os.path import config import definitions import sa_util import csv_util def import_module(args): from dependencies import dependencies_manager tables = [] for module in args.module: if not args.updateonly: definitions.get_importer(module)(verbose=args.verbose) ...
pombredanne/pydep
refs/heads/master
pydep/testdata/ex0/setup.py
4
""" A package representative of Python dependency management best practices. """ from setuptools import setup setup( name='ex0', version='0.1.2', url='http://github.com/fake/fake', packages=['ex0'], install_requires=[ 'dep1', 'dep2==0.0', 'dep3[blah]>=0.0.4', ], )
bdh1011/wau
refs/heads/master
venv/lib/python2.7/site-packages/wheel/test/test_wheelfile.py
238
import wheel.install import hashlib try: from StringIO import StringIO except ImportError: from io import BytesIO as StringIO import zipfile import pytest def test_verifying_zipfile(): if not hasattr(zipfile.ZipExtFile, '_update_crc'): pytest.skip('No ZIP verification. Missing ZipExtFile._update_cr...
jailuthra/misc
refs/heads/master
codechef/cooling.py
1
def sort(l): n = len(l) for i in range(0, n): j = i+1 m = i while j < n: if (l[j] < l[m]): m = j j += 1 l[i], l[m] = l[m], l[i] return l if __name__ == '__main__': t = input('') for _ in xrange(t): n = input('') ...
bsmr-eve/Pyfa
refs/heads/master
eos/effects/missileexplosivedmgbonusstandard.py
2
# missileExplosiveDmgBonusStandard # # Used by: # Implants named like: Zainou 'Snapshot' Light Missiles LM (6 of 6) type = "passive" def handler(fit, container, context): fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Light Missiles"), "explosiveDamage", ...
stan-dev/math
refs/heads/develop
lib/benchmark_1.5.1/googletest/googletest/scripts/upload_gtest.py
1963
#!/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...
ClimbsRocks/scikit-learn
refs/heads/master
sklearn/preprocessing/imputation.py
18
# Authors: Nicolas Tresegnie <nicolas.tresegnie@gmail.com> # License: BSD 3 clause import warnings import numpy as np import numpy.ma as ma from scipy import sparse from scipy import stats from ..base import BaseEstimator, TransformerMixin from ..utils import check_array from ..utils import safe_mask from ..utils.fi...
66CCFF/shadowsocks
refs/heads/master
tests/coverage_server.py
1072
#!/usr/bin/env python # # Copyright 2015 clowwindy # # 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 ...
zhoulingjun/django
refs/heads/master
tests/fixtures_regress/models.py
281
from __future__ import unicode_literals from django.contrib.auth.models import User from django.db import models from django.utils import six from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Animal(models.Model): name = models.CharField(max_length=150) latin_na...
jamdin/jdiner-mobile-byte3
refs/heads/master
lib/numpy/numarray/__init__.py
46
from util import * from numerictypes import * from functions import * from ufuncs import * from compat import * from session import * import util import numerictypes import functions import ufuncs import compat import session __all__ = ['session', 'numerictypes'] __all__ += util.__all__ __all__ += numerictypes.__all_...
mbayon/TFG-MachineLearning
refs/heads/master
venv/lib/python3.6/site-packages/scipy/spatial/tests/test__procrustes.py
26
from __future__ import absolute_import, division, print_function import numpy as np from numpy.testing import assert_allclose, assert_equal, assert_almost_equal from pytest import raises as assert_raises from scipy.spatial import procrustes class TestProcrustes(object): def setup_method(self): """create...
13xforever/webserver
refs/heads/master
qa/081-DocumentRoot-Common-index.py
8
from base import * MAGIC1 = "First part" MAGIC2 = "Second part" CONF = """ vserver!1!rule!810!match = directory vserver!1!rule!810!match!directory = /dr_common_index vserver!1!rule!810!handler = common vserver!1!rule!810!document_root = %s """ class Test (TestBase): def __init__ (self): TestBase.__init__...
girving/tensorflow
refs/heads/master
tensorflow/python/ops/linalg/linalg.py
13
# Copyright 2017 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...
fabianvf/osf.io
refs/heads/develop
website/addons/figshare/views/auth.py
11
# -*- coding: utf-8 -*- import os import httplib as http from flask import request from framework.flask import redirect # VOL-aware redirect from framework.exceptions import HTTPError from framework.auth.decorators import collect_auth from framework.auth.decorators import must_be_logged_in from website import mode...
willhaines/scikit-rf
refs/heads/master
doc/source/pyplots/plotting/plot_horn_smith.py
14
import pylab import skrf as rf # create a Network type from a touchstone file of a horn antenna horn = rf.Network('horn antenna.s1p') pylab.title('Return Loss (Mag)') horn.plot_s_smith(m=0,n=0) # m,n are S-Matrix indices # show the plots pylab.show()
aljim/deploymentmanager-samples
refs/heads/master
community/cloud-foundation/templates/cloud_sql/cloud_sql.py
1
# Copyright 2018 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
beezee/GAE-Django-base-app
refs/heads/master
django/contrib/formtools/tests/urls.py
245
""" This is a URLconf to be loaded by tests.py. Add any URLs needed for tests only. """ from django.conf.urls.defaults import * from django.contrib.formtools.tests import * urlpatterns = patterns('', (r'^test1/', TestFormPreview(TestForm)), (r'^test2/', UserSecuredFormPre...
kikokubo/Sick-Beard-TPB
refs/heads/ThePirateBay
lib/unidecode/x01e.py
246
data = ( 'A', # 0x00 'a', # 0x01 'B', # 0x02 'b', # 0x03 'B', # 0x04 'b', # 0x05 'B', # 0x06 'b', # 0x07 'C', # 0x08 'c', # 0x09 'D', # 0x0a 'd', # 0x0b 'D', # 0x0c 'd', # 0x0d 'D', # 0x0e 'd', # 0x0f 'D', # 0x10 'd', # 0x11 'D', # 0x12 'd', # 0x13 'E', # 0...
milin/django-qa
refs/heads/master
qa_feedback/api/viewsets.py
1
import datetime from django.core.files.base import ContentFile from django.views.decorators.csrf import csrf_exempt import simplejson as json import base64 from urlparse import urlparse from rest_framework.viewsets import ViewSet from rest_framework.response import Response from rest_framework.generics import Generic...
shrimpboyho/flappy-bird-py
refs/heads/master
pyglet-1.1.4/pyglet/window/win32/__init__.py
9
# ---------------------------------------------------------------------------- # 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: # # * Redistributi...
devendermishrajio/nova
refs/heads/master
nova/scheduler/filters/affinity_filter.py
3
# Copyright 2012, Piston Cloud Computing, Inc. # Copyright 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.apache.org/licenses...
zenodo/zenodo-migrationkit
refs/heads/master
docs/conf.py
3
# -*- coding: utf-8 -*- # # This file is part of Zenodo. # Copyright (C) 2015 CERN. # # Zenodo 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 v...
jagguli/intellij-community
refs/heads/master
python/testData/intentions/beforeDictConstructorToLiteralForm.py
83
a = dict(<caret>a=3, b=5)
leansoft/edx-platform
refs/heads/master
lms/djangoapps/lms_xblock/runtime.py
45
""" Module implementing `xblock.runtime.Runtime` functionality for the LMS """ import re import xblock.reference.plugins from django.core.urlresolvers import reverse from django.conf import settings from request_cache.middleware import RequestCache from lms.djangoapps.lms_xblock.models import XBlockAsidesConfig from ...
FATruden/boto
refs/heads/master
boto/emr/step.py
15
# Copyright (c) 2010 Spotify AB # Copyright (c) 2010-2011 Yelp # # 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, m...
servo-highfive/highfive
refs/heads/master
highfive/api_provider/github_api.py
2
from interface import APIProvider import re class GithubAPIProvider(APIProvider): base_url = 'https://api.github.com/repos/%s/%s' issue_url = base_url + '/issues/%s' branch_url = base_url + '/branches/%s' comments_post_url = issue_url + '/comments' comments_patch_url = base_url + '/issues/comments...
maryklayne/Funcao
refs/heads/master
sympy/mpmath/matrices/eigen_symmetric.py
18
#!/usr/bin/python # -*- coding: utf-8 -*- ################################################################################################## # module for the symmetric eigenvalue problem # Copyright 2013 Timo Hartmann (thartmann15 at gmail.com) # # todo: # - implement balancing # ###########################...
Deepakkothandan/ansible
refs/heads/devel
lib/ansible/plugins/terminal/vyos.py
191
# # (c) 2016 Red Hat Inc. # # 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. # # Ansible is d...
kustodian/ansible
refs/heads/devel
test/units/modules/cloud/kubevirt/test_kubevirt_rs.py
21
import pytest openshiftdynamic = pytest.importorskip("openshift.dynamic") from units.modules.utils import set_module_args from units.utils.kubevirt_fixtures import base_fixture, RESOURCE_DEFAULT_ARGS, AnsibleExitJson from ansible.module_utils.k8s.raw import KubernetesRawModule from ansible.modules.cloud.kubevirt imp...
7kbird/chrome
refs/heads/master
tools/metrics/histograms/update_use_counter_css.py
63
#!/usr/bin/env python # 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. """Scans the Chromium source of UseCounter, formats the Feature enum for histograms.xml and merges it. This script can also generate a ...
cogeorg/black_rhino
refs/heads/master
examples/degroot/networkx/algorithms/bipartite/tests/test_cluster.py
85
import networkx as nx from nose.tools import * from networkx.algorithms.bipartite.cluster import cc_dot,cc_min,cc_max import networkx.algorithms.bipartite as bipartite def test_pairwise_bipartite_cc_functions(): # Test functions for different kinds of bipartite clustering coefficients # between pairs of nodes ...
imply/chuu
refs/heads/master
third_party/libxml/src/genUnicode.py
337
#!/usr/bin/python -u # # Original script modified in November 2003 to take advantage of # the character-validation range routines, and updated to the # current Unicode information (Version 4.0.1) # # NOTE: there is an 'alias' facility for blocks which are not present in # the current release, but are needed for ABI com...
geminateCoder/Character-Archive-Website
refs/heads/master
Lib/site-packages/wtforms/ext/appengine/fields.py
177
from __future__ import unicode_literals import decimal import operator from wtforms import fields, widgets from wtforms.compat import text_type, string_types class ReferencePropertyField(fields.SelectFieldBase): """ A field for ``db.ReferenceProperty``. The list items are rendered in a select. :par...
NeCTAR-RC/nova
refs/heads/nectar/mitaka
nova/conf/ironic.py
8
# Copyright 2015 Intel Corporation # 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 require...
garnermccloud/OLD_DJANGO
refs/heads/master
south/introspection_plugins/geodjango.py
24
""" GeoDjango introspection rules """ import django from django.conf import settings from south.modelsinspector import add_introspection_rules has_gis = "django.contrib.gis" in settings.INSTALLED_APPS if has_gis: # Alright,import the field from django.contrib.gis.db.models.fields import GeometryField ...
QuantumElephant/horton
refs/heads/master
horton/grid/visual.py
4
# -*- coding: utf-8 -*- # HORTON: Helpful Open-source Research TOol for N-fermion systems. # Copyright (C) 2011-2017 The HORTON Development Team # # This file is part of HORTON. # # HORTON is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by th...
stverhae/incubator-airflow
refs/heads/master
tests/contrib/hooks/test_ftp_hook.py
25
# -*- 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 ...
dc3-plaso/plaso
refs/heads/master
tests/parsers/mcafeeav.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the McAfee AV Log parser.""" import unittest from plaso.formatters import mcafeeav # pylint: disable=unused-import from plaso.parsers import mcafeeav from tests import test_lib as shared_test_lib from tests.parsers import test_lib class McafeeAccessProtection...
mattgiguere/scikit-learn
refs/heads/master
sklearn/ensemble/tests/test_bagging.py
2
""" Testing for the bagging ensemble module (sklearn.ensemble.bagging). """ # Author: Gilles Louppe # License: BSD 3 clause import numpy as np from sklearn.base import BaseEstimator from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.te...
thakkarparth007/mailer
refs/heads/master
deltamail/campaign.py
1
'''Defines the Campaign-* classes and the CampaignFactory function This module defines the following classes: Campaign (Abstract class) BulkMailCampaign TransactionMailCampaign It also defines the CampaignFactory method used to create the Campaign objects easily. TODO(thakkarparth007): Handle previewing ...
SeedScientific/luigi
refs/heads/master
test/instance_test.py
34
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
saurabh6790/medsyn-app
refs/heads/master
accounts/doctype/sales_taxes_and_charges/__init__.py
37694
from __future__ import unicode_literals
saurabh6790/medsynaptic-app
refs/heads/develop
stock/page/stock_home/__init__.py
37694
from __future__ import unicode_literals
olympian94/gstudio
refs/heads/mongokit
gnowsys-ndf/gnowsys_ndf/ndf/urls/e-book.py
6
from django.conf.urls import patterns, url urlpatterns = patterns('gnowsys_ndf.ndf.views.e-book', url(r'^[/]$', 'ebook_listing', name='e-book'), )
mnuthan1/workflow
refs/heads/master
lib/python2.7/site-packages/setuptools/command/setopt.py
285
import distutils, os from setuptools import Command from distutils.util import convert_path from distutils import log from distutils.errors import * __all__ = ['config_file', 'edit_config', 'option_base', 'setopt'] def config_file(kind="local"): """Get the filename of the distutils, local, global, or per-user co...
takeshineshiro/keystone
refs/heads/master
keystone/common/cache/backends/memcache_pool.py
20
# Copyright 2014 Mirantis Inc # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
microcom/odoo
refs/heads/9.0
openerp/service/common.py
49
# -*- coding: utf-8 -*- import logging import openerp.release import openerp.tools from openerp.tools.translate import _ import security _logger = logging.getLogger(__name__) RPC_VERSION_1 = { 'server_version': openerp.release.version, 'server_version_info': openerp.release.version_info, 's...
prodromou87/gem5
refs/heads/master
src/cpu/inorder/InOrderCPU.py
4
# Copyright (c) 2007 MIPS Technologies, 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 ...
gnuhub/intellij-community
refs/heads/master
python/testData/refactoring/move/function/after/src/b.py
83
from lib1 import urlopen def g(): return None def f(url): '''Return the representation available at the URL. ''' return urlopen(url).read()
EthanBlackburn/sync-engine
refs/heads/master
inbox/api/ns_api.py
1
import os import base64 import email.header import uuid import gevent import time from inbox.models.session import session_scope from flask import request, g, Blueprint, make_response, Response from flask import jsonify as flask_jsonify from flask.ext.restful import reqparse from sqlalchemy import asc, or_, func from...
ActiveState/code
refs/heads/master
recipes/Python/546539_Use_PEP_263_for_metaprogramming/recipe-546539.py
1
# amachine.py # a tiny stack machine for our new language A, nothing special. import math, os, re, operator, sys end=[] def run(l): stack=[[]] for i in l: if i is end: f=stack.pop() i=f[0](*f[1:]) if callable(i): stack.append([i]) else: sta...
willingc/oh-mainline
refs/heads/master
mysite/profile/migrations/0041_asheesh_change_default_profile_photo.py
17
# This file is part of OpenHatch. # Copyright (C) 2009 OpenHatch, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later v...
rohitwaghchaure/erpnext_develop
refs/heads/develop
erpnext/stock/report/stock_ageing/stock_ageing.py
98
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import date_diff, flt def execute(filters=None): columns = get_columns() item_details = get_fif...
ra2er/django-openid-consumer
refs/heads/master
django_openid_consumer/util.py
1
import openid if openid.__version__ < '2.0.0': raise ImportError, 'You need python-openid 2.0.0 or newer' elif openid.__version__ < '2.1.0': from openid import sreg as oidsreg else: from openid.extensions import sreg as oidsreg from openid.extensions import pape as oidpape from openid.extensions im...
varunarya10/tempest
refs/heads/master
tempest/api/compute/servers/test_server_actions.py
2
# Copyright 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.apache.org/licenses/LICENSE-2.0 # # Unless requ...
jcnix/shade
refs/heads/master
social/models.py
1
from django.db import models from django_markdown.models import MarkdownField from django.contrib.auth.models import User class Language(models.Model): name = models.CharField(max_length=20) abbr = models.CharField(max_length=3) def __unicode__(self): return name class Group(models.Model): cl...
carljm/ansible-modules-extras
refs/heads/devel
packaging/language/composer.py
60
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Dimitrios Tydeas Mengidis <tydeas.dr@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...
crazcalm/Jibe_hackathon
refs/heads/master
computerInfo.py
1
import sys def info(): """ Returns the operating system name and the version of python in use. """ python_version = sys.version_info operating_system = sys.platform return (python_version, operating_system) if __name__ == "__main__": print(info())
NathanW2/QGIS
refs/heads/master
tests/src/python/test_qgsfloatingwidget.py
24
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsFloatingWidget. .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. """...
ehashman/oh-mainline
refs/heads/master
vendor/packages/gdata/tests/gdata_tests/calendar_resource/data_test.py
41
#!/usr/bin/python # # Copyright (C) 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
Partoo/scrapy
refs/heads/master
scrapy/commands/check.py
15
from __future__ import print_function import time import sys from collections import defaultdict from unittest import TextTestRunner, TextTestResult as _TextTestResult from scrapy.command import ScrapyCommand from scrapy.contracts import ContractsManager from scrapy.utils.misc import load_object from scrapy.utils.conf...