repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
teoliphant/scipy
refs/heads/master
scipy/ndimage/io.py
9
__all__ = ['imread'] from numpy import array def imread(fname, flatten=False): """ Load an image from file. Parameters ---------- fname : str Image file name, e.g. ``test.jpg``. flatten : bool, optional If true, convert the output to grey-scale. Default is False. Returns ...
jbarriosc/ACSUFRO
refs/heads/master
LGPL/CommonSoftware/acssim/src/Acssim/SimServerImpl/SimServer.py
4
#! /usr/bin/env python #******************************************************************************* # ALMA - Atacama Large Millimiter Array # (c) Associated Universities Inc., 2005 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # Lice...
kvar/ansible
refs/heads/seas_master_2.9.5
test/units/modules/network/onyx/test_onyx_magp.py
52
# # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type from units.compat.mock import patch from ansible.modules.network.onyx impor...
sametmax/Django--an-app-at-a-time
refs/heads/master
ignore_this_directory/sqlparse/engine/statement_splitter.py
1
# -*- coding: utf-8 -*- # # Copyright (C) 2009-2018 the sqlparse authors and contributors # <see AUTHORS file> # # This module is part of python-sqlparse and is released under # the BSD License: https://opensource.org/licenses/BSD-3-Clause from sqlparse import sql, tokens as T class StatementSplitter(object): ""...
stefanocasazza/FrameworkBenchmarks
refs/heads/master
toolset/utils/metadata.py
2
import os import glob import json from collections import OrderedDict from colorama import Fore from toolset.databases import databases from toolset.utils.output_helper import log class Metadata: supported_dbs = [] for name in databases: supported_dbs.append((name, '...')) def __init__(self, be...
EPDCenter/android_kernel_amlogic_s805_3go_aplay2
refs/heads/master
tools/perf/scripts/python/event_analyzing_sample.py
4719
# event_analyzing_sample.py: general event handler in python # # Current perf report is already very powerful with the annotation integrated, # and this script is not trying to be as powerful as perf report, but # providing end user/developer a flexible way to analyze the events other # than trace points. # # The 2 dat...
YinongLong/scikit-learn
refs/heads/master
examples/linear_model/plot_sgd_iris.py
58
""" ======================================== Plot multi-class SGD on the iris dataset ======================================== Plot decision surface of multi-class SGD on iris dataset. The hyperplanes corresponding to the three one-versus-all (OVA) classifiers are represented by the dashed lines. """ print(__doc__) ...
curtiszimmerman/the-backdoor-factory
refs/heads/master
intel/intelCore.py
17
''' Copyright (c) 2013-2015, Joshua Pitts All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and t...
savoirfairelinux/odoo
refs/heads/master
addons/hr_attendance/__openerp__.py
62
# -*- 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...
ressu/SickGear
refs/heads/master
lib/imdb/Movie.py
126
""" Movie module (imdb package). This module provides the Movie class, used to store information about a given movie. Copyright 2004-2010 Davide Alberani <da@erlug.linux.it> 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 F...
jeffwidman/ansible-modules-core
refs/heads/devel
cloud/amazon/elasticache_subnet_group.py
53
#!/usr/bin/python # 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 distributed...
ravibhure/ansible
refs/heads/devel
contrib/inventory/nagios_livestatus.py
43
#!/usr/bin/env python # (c) 2015, Yannig Perre <yannig.perre@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 ...
lincolnloop/django-debug-logging
refs/heads/develop
docs/conf.py
1
# -*- coding: utf-8 -*- # # django-debug-logging documentation build configuration file, created by # sphinx-quickstart on Wed Nov 30 09:06:54 2011. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated ...
goodguy/satchmo
refs/heads/master
satchmo/apps/satchmo_ext/productratings/models.py
8
from django.contrib.comments.models import Comment from django.db import models from django.utils.translation import ugettext, ugettext_lazy as _ from signals_ahoy.signals import collect_urls import product import satchmo_store class ProductRating(models.Model): """A rating attached to a comment""" comment = m...
yongshengwang/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/build/lib/django/views/generic/dates.py
90
from __future__ import unicode_literals import datetime from django.conf import settings from django.db import models from django.core.exceptions import ImproperlyConfigured from django.http import Http404 from django.utils.encoding import force_str, force_text from django.utils.functional import cached_property from ...
jacinda/djangocon2015-admin-talk
refs/heads/master
library/libraryusers/views.py
6445
from django.shortcuts import render # Create your views here.
stackforge-attic/tuskar-ui-extras
refs/heads/master
manage.py
20
#!/usr/bin/env python import os import sys from django.core.management import execute_from_command_line if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "openstack_dashboard.settings") execute_from_command_line(sys.argv)
Tony-YI/Final-Year-Project
refs/heads/master
sw/ground_segment/python/real_time_plot/plotpanel.py
50
from __future__ import absolute_import, print_function, division import wx from ivy.std_api import * import logging from textdroptarget import * import math import random import sys import os import messagepicker sys.path.append(os.getenv("PAPARAZZI_HOME") + "/sw/lib/python") import messages_xml_map class plot_data...
hurricup/intellij-community
refs/heads/master
python/lib/Lib/compiler/symbols.py
100
"""Module symbol-table generator""" from compiler import ast from compiler.consts import SC_LOCAL, SC_GLOBAL, SC_FREE, SC_CELL, SC_UNKNOWN from compiler.misc import mangle import types import sys MANGLE_LEN = 256 class Scope: # XXX how much information do I need about each name? def __init__(self, name, mo...
uglyboxer/linear_neuron
refs/heads/master
net-p3/lib/python3.5/site-packages/numpy/distutils/tests/test_npy_pkg_config.py
64
from __future__ import division, absolute_import, print_function import os from tempfile import mkstemp from numpy.distutils.npy_pkg_config import read_config, parse_flags from numpy.testing import TestCase, run_module_suite simple = """\ [meta] Name = foo Description = foo lib Version = 0.1 [default] cflags = -I/u...
gyllstar/appleseed
refs/heads/debugger
debug-pox.py
5
pox.py
gaubert/gmvault
refs/heads/master
src/validation_tests.py
3
''' Gmvault: a tool to backup and restore your gmail account. Copyright (C) <since 2011> <guillaume Aubert (guillaume dot aubert at gmail do com)> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Soft...
nate97/TiKi
refs/heads/master
manager.py
20578
magus424/powerline
refs/heads/develop
powerline/bindings/ipython/pre_0_11.py
4
# vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import re from weakref import ref from IPython.Prompts import BasePrompt from IPython.ipapi import get as get_ipython from IPython.ipapi import TryNext from powerline.ipython import IPythonPowerline, R...
mihaisoloi/conpaas
refs/heads/master
conpaas-services/contrib/libcloud/compute/drivers/linode.py
3
# 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 use ...
Johnzero/erp
refs/heads/fga
openerp/addons/base_module_quality/wizard/__init__.py
9
# -*- 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...
chronicwaffle/PokemonGo-DesktopMap
refs/heads/master
app/pylibs/osx64/Cryptodome/SelfTest/PublicKey/test_import_ECC.py
2
# =================================================================== # # Copyright (c) 2015, Legrandin <helderijs@gmail.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributio...
sysadminmatmoz/addons-yelizariev
refs/heads/8.0
mail_delete_sent_by_footer/__init__.py
16
import mail_delete_sent_by_footer
agapow/biblio.webquery
refs/heads/master
biblio/webquery/querythrottle.py
1
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Classes for throttling web-queries, so as to stay within limits. """ # TODO: error-handling logic is correct? __docformat__ = 'restructuredtext en' ### IMPORTS ### import time from exceptions import ValueError, RuntimeError import impl import errors ### CONSTANT...
eudicots/Cactus
refs/heads/master
cactus/template_tags.py
2
#coding:utf-8 import os import logging from django.template.base import Library from django.conf import settings from django.utils.encoding import force_text from django.utils.safestring import mark_safe logger = logging.getLogger(__name__) register = Library() def static(context, link_url): """ Get the pa...
YinongLong/scikit-learn
refs/heads/master
sklearn/utils/tests/test_class_weight.py
50
import numpy as np from sklearn.linear_model import LogisticRegression from sklearn.datasets import make_blobs from sklearn.utils.class_weight import compute_class_weight from sklearn.utils.class_weight import compute_sample_weight from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testin...
robertmattmueller/sdac-compiler
refs/heads/master
sympy/mpmath/tests/test_hp.py
19
""" Check that the output from irrational functions is accurate for high-precision input, from 5 to 200 digits. The reference values were verified with Mathematica. """ import time from sympy.mpmath import * precs = [5, 15, 28, 35, 57, 80, 100, 150, 200] # sqrt(3) + pi/2 a = \ "3.302847134363773912758768033145623809...
bkochendorfer/reviewboard
refs/heads/master
reviewboard/webapi/tests/test_default_reviewer.py
7
from __future__ import unicode_literals from django.contrib.auth.models import User from django.utils import six from djblets.testing.decorators import add_fixtures from djblets.webapi.errors import INVALID_FORM_DATA from reviewboard.reviews.models import DefaultReviewer, Group from reviewboard.webapi.resources impor...
robo-hamburger/dungeon-wizard
refs/heads/master
fabfile.py
1
from fabric.api import env from fabric.operations import run, put env.hosts = ['space-wizards.net'] env.user = 'space_wizards' DEST_PATH = '/home/space_wizards/games/dungeon-wizard/' def deploy(): run('rm -rf %s' % DEST_PATH) run('mkdir -p %s' % DEST_PATH) put('dist/*', DEST_PATH)
jwoglom/ionbot
refs/heads/master
commands/steam.py
1
# Copyright (C) 2013-2015 Samuel Damashek, Peter Foley, James Forcier, Srijay Kasturi, Reed Koser, Christopher Reffett, and Fox Wilson # # 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 ve...
chris-allan/openmicroscopy
refs/heads/develop
components/xsd-fu/generateDS/generate_coverage.py
33
#!/usr/bin/env python # # Imports import sys from optparse import OptionParser import os import re # # Globals and constants EXCLUDE_BASE = [ 'MixedContainer', '_MemberSpec', ] PATTERN = "^class\s*(\w*)" RE_PATTERN = re.compile(PATTERN) # # Functions for external use def generate_coverage(outfile,...
laurent-dinh/fuel
refs/heads/master
tests/test_transformers.py
4
import operator from collections import OrderedDict import numpy from numpy.testing import assert_raises, assert_equal from six.moves import zip, cPickle from fuel import config from fuel.datasets import IterableDataset, IndexableDataset from fuel.schemes import ConstantScheme, SequentialScheme from fuel.streams impo...
dannyperry571/theapprentice
refs/heads/master
script.module.youtube.dl/lib/youtube_dl/extractor/movingimage.py
64
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( unescapeHTML, parse_duration, ) class MovingImageIE(InfoExtractor): _VALID_URL = r'https?://movingimage\.nls\.uk/film/(?P<id>\d+)' _TEST = { 'url': 'http://movingimage.nls.uk/film/3561', 'm...
ideas4u/pyspider
refs/heads/master
tests/test_result_worker.py
72
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<i@binux.me> # http://binux.me # Created on 2014-11-11 20:52:53 import os import time import unittest2 as unittest import logging.config logging.config.fileConfig("pyspider/logging.conf") import shu...
daodewang/qingcloud-sdk-python
refs/heads/master
qingcloud/iaas/connection.py
1
# ========================================================================= # Copyright 2012-present Yunify, Inc. # ------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this work except in compliance with the Licens...
mcrowson/django
refs/heads/master
tests/ordering/tests.py
301
from __future__ import unicode_literals from datetime import datetime from operator import attrgetter from django.db.models import F from django.test import TestCase from .models import Article, Author, Reference class OrderingTests(TestCase): def setUp(self): self.a1 = Article.objects.create( ...
ee08b397/HackerRankAlgorithms
refs/heads/master
Anagram.py
1
""" Sid is obsessed about reading short stories. Being a CS student, he is doing some interesting frequency analysis with the books. He has two short story books. He chooses strings having length a from the first book and strings having length b from the second one. The strings are such that the difference of length...
japeto/Vigtech-Services
refs/heads/master
env/lib/python2.7/site-packages/pip/models/__init__.py
918
from pip.models.index import Index, PyPI __all__ = ["Index", "PyPI"]
ismailsunni/geonode
refs/heads/develop
geonode/documents/forms.py
11
import json import os import re import autocomplete_light from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib.contenttypes.models import ContentType from django.conf import settings from django.forms import HiddenInput, TextInput from modeltranslation.forms import Trans...
kiddingmu/leetcode
refs/heads/master
45_pascal_triangle_II/pascal_triangle.py
1
class Solution: # @return a list of integers def getRow(self, rowIndex): if rowIndex == 0: return [1] elif rowIndex == 1: return [1,1] else: temp = [1,1] for i in xrange(2, rowIndex+1): for j in xrange(len(temp)-1): ...
trhd/meson
refs/heads/master
mesonbuild/compilers/fortran.py
2
# Copyright 2012-2017 The Meson development team # 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 agree...
GaussDing/django
refs/heads/master
tests/apps/default_config_app/__init__.py
553
default_app_config = 'apps.default_config_app.apps.CustomConfig'
bsautermeister/tensorlight
refs/heads/master
tensorlight/core.py
1
from __future__ import print_function import os import time import collections import copy from abc import ABCMeta, abstractmethod import numpy as np import tensorflow as tf from tensorflow.python.ops import control_flow_ops import tensorlight as light CHECKPOINT_FILE = "model.ckpt" MODEL_PARAMS_FILE = "model.json" ...
jianghuaw/nova
refs/heads/master
nova/tests/functional/api_sample_tests/test_tenant_networks.py
5
# Copyright 2012 Nebula, Inc. # Copyright 2014 IBM Corp. # # 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...
uni-peter-zheng/tp-libvirt
refs/heads/master
libvirt/tests/src/remote_access/remote_access.py
1
import re import os import logging import commands from virttest import remote,libvirt_vm,virsh from autotest.client.shared import error, utils from virttest.utils_sasl import SASL from virttest.utils_conn import SSHConnection, TCPConnection, \ TLSConnection, UNIXConnection from virttest.utils_net import IPv6Manag...
chainer/chainer
refs/heads/master
tests/chainer_tests/training_tests/extensions_tests/test_snapshot.py
4
import glob import itertools import os import shutil import tempfile import time import unittest import mock import pytest from chainer import testing from chainer import training from chainer.training import extensions from chainer.training.extensions._snapshot import _find_latest_snapshot from chainer.training.exte...
40223141/gear
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/external_import.py
742
import os from browser import doc import urllib.request ## this module is able to download modules that are external to ## localhost/src ## so we could download from any URL class ModuleFinder: def __init__(self, path_entry): print("external_import here..") #print(path_entry) self._module=...
mariomosca/damnvid
refs/heads/master
forks/youtubedownloader/ui/dMainFrame/dMainGaugePanel.py
12
# -*- coding: utf-8 -*- from ..dUI import * from .orig_dMainGaugePanel import DamnMainGaugePanel as orig_DamnMainGaugePanel from .orig_dMainGoPanel import DamnMainStopButton as orig_DamnMainStopButton class DamnMainGaugePanel(orig_DamnMainGaugePanel): def __init__(self, parent): orig_DamnMainGaugePanel.__init__(sel...
lordmos/blink
refs/heads/master
Source/build/scripts/list_idl_files_with_partial_interface.py
1
# 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 conditions and the ...
eviljeff/zamboni
refs/heads/master
docs/watcher.py
67
""" Watch a bunch of files and run a command if any changes are detected. Usage ----- :: python watcher.py 'echo changes' one.py two.py To automatically keep Sphinx docs up to date:: python watcher.py 'make html' $(find . -name '*.rst') Problems -------- * The file checking would be way more efficient us...
yencarnacion/jaikuengine
refs/heads/master
.google_appengine/google/appengine/ext/remote_api/remote_api_pb.py
9
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
eeshangarg/oh-mainline
refs/heads/master
vendor/packages/twisted/doc/core/howto/tutorial/listings/finger/finger_config.py
22
# Easy configuration # makeService from finger module def makeService(config): # finger on port 79 s = service.MultiService() f = FingerService(config['file']) h = internet.TCPServer(79, IFingerFactory(f)) h.setServiceParent(s) # website on port 8000 r = resource.IResource(f) r.templat...
openego/ego.powerflow
refs/heads/dev
egopowerflow/tools/tools.py
1
"""This is the docstring for the example.py module. Modules names should have short, all-lowercase names. The module name may have underscores if this improves readability. Every module should have a docstring at the very top of the file. The module's docstring may extend over multiple lines. If your docstring does...
HLFH/CouchPotatoServer
refs/heads/develop
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/tutv.py
31
from __future__ import unicode_literals import base64 from .common import InfoExtractor from ..compat import compat_parse_qs class TutvIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?tu\.tv/videos/(?P<id>[^/?]+)' _TEST = { 'url': 'http://tu.tv/videos/robots-futbolistas', 'md5': '627c7c1...
uberamd/NGECore2
refs/heads/master
scripts/object/building/corellia/filler_slum_16x32_s01.py
85615
import sys def setup(core, object): return
lmr/avocado-vt
refs/heads/master
virttest/staging/backports/collections/defaultdict.py
1
import six ''' Backport of the defaultdict module, obtained from: http://code.activestate.com/recipes/523034-emulate-collectionsdefaultdict/ ''' # pylint: disable=I0011,C0103 class defaultdict(dict): """ collections.defaultdict is a handy shortcut added in Python 2.5 which can be emulated in older ver...
Triv90/Nova
refs/heads/openstack-ci/fuel/grizzly
tools/xenserver/vdi_chain_cleanup.py
139
#!/usr/bin/env python # Copyright 2012 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 l...
tensorflow/model-analysis
refs/heads/master
tensorflow_model_analysis/evaluators/evaluator_test.py
1
# Lint as: python3 # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
zeeshanali/blaze
refs/heads/master
blaze/datadescriptor/blaze_func_descriptor.py
2
from __future__ import absolute_import, division, print_function from . import IDataDescriptor, Capabilities def blaze_func_iter(bfd, noiter_dims): args = bfd.args dim_size = 1 iters = [] for a, noiter in zip(args, noiter_dims): if noiter: iters.append(a) else: ...
DANCEcollaborative/forum-xblock
refs/heads/master
XBlock Integration Files/xdjangobb/xblock/lib/python2.7/site-packages/setuptools/command/alias.py
467
from distutils.errors import DistutilsOptionError from setuptools.command.setopt import edit_config, option_base, config_file def shquote(arg): """Quote an argument for later parsing by shlex.split()""" for c in '"', "'", "\\", "#": if c in arg: return repr(arg) if arg.split() != [arg...
udayinfy/openerp-7.0
refs/heads/master
l10n_cn_fonts/__openerp__.py
3
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2010-2011 Elico Corp. All Rights Reserved. # Author: Eric CAUDAL <contact@elico-corp.com> # # This program is free software: you ...
buqing2009/MissionPlanner
refs/heads/master
Lib/xml/dom/xmlbuilder.py
64
"""Implementation of the DOM Level 3 'LS-Load' feature.""" import copy import xml.dom from xml.dom.NodeFilter import NodeFilter __all__ = ["DOMBuilder", "DOMEntityResolver", "DOMInputSource"] class Options: """Features object that has variables set for each DOMBuilder feature. The DOMBuilde...
hydratk/hydratk-lib-network
refs/heads/master
src/hydratk/lib/network/ftp/tftp_client.py
1
# -*- coding: utf-8 -*- """TFTP client .. module:: network.ftp.tftp_client :platform: Unix :synopsis: TFTP client .. moduleauthor:: Petr Rašek <bowman@hydratk.org> """ """ Events: ------- ftp_before_connect ftp_after_connect ftp_before_download_file ftp_after_download_file ftp_before_upload_file ftp_after_uplo...
amiguez/youtube-dl
refs/heads/master
youtube_dl/extractor/prosiebensat1.py
78
# encoding: utf-8 from __future__ import unicode_literals import re from hashlib import sha1 from .common import InfoExtractor from ..compat import ( compat_urllib_parse, ) from ..utils import ( ExtractorError, determine_ext, float_or_none, int_or_none, unified_strdate, ) class ProSiebenSat1...
zzcclp/spark
refs/heads/master
python/pyspark/sql/tests/test_context.py
23
# # 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...
edx/ansible
refs/heads/stable-1.9-plus-edx
v2/ansible/parsing/utils/jsonify.py
16
# FIXME: header try: import json except ImportError: import simplejson as json def jsonify(result, format=False): ''' format JSON output (uncompressed or uncompressed) ''' if result is None: return "{}" result2 = result.copy() for key, value in result2.items(): if type(value) ...
ericlin-ICT/mysite
refs/heads/master
src/clouddesktop/util/load_data.py
1
#-*- encoding: utf-8 -*- import xlrd from pandas.core.frame import DataFrame import re from clouddesktop.core.query import AsyncQuery from clouddesktop.core.add import Add def load_data(file_path, server, port, user_email, pwd, dc): data = xlrd.open_workbook(file_path) table = data.sheet_by_name(u'新一代用户申请...
vinay87/flyer
refs/heads/master
.buildozer/venv/lib/python2.7/site-packages/pip/commands/help.py
919
from __future__ import absolute_import from pip.basecommand import Command, SUCCESS from pip.exceptions import CommandError class HelpCommand(Command): """Show help for commands""" name = 'help' usage = """ %prog <command>""" summary = 'Show help for commands.' def run(self, options, args)...
jdugge/QGIS
refs/heads/master
python/plugins/db_manager/dlg_create_index.py
62
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS Date : Oct 13, 2011 copyright : (C) 2011 by Giuseppe Sucameli email : brush.tyler@...
kartta-labs/Linker
refs/heads/master
zekun_linker/step3_generate_phrases.py
1
# Copyright 2020 The Kartta Labs 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 t...
GitHublong/hue
refs/heads/master
desktop/libs/librdbms/src/librdbms/conf.py
18
#!/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...
sexroute/commandergenius
refs/heads/sdl_android
project/jni/python/src/Lib/distutils/config.py
50
"""distutils.pypirc Provides the PyPIRCCommand class, the base class for the command classes that uses .pypirc in the distutils.command package. """ import os import sys from ConfigParser import ConfigParser from distutils.cmd import Command DEFAULT_PYPIRC = """\ [distutils] index-servers = pypi [pypi] username...
stanlyxiang/incubator-hawq
refs/heads/master
tools/bin/pythonSrc/pychecker-0.8.18/test_input/test69.py
11
'd' import import69 __pychecker__ = 'callattr' class B: 'd' def __init__(self): pass class C(B): 'd' __super_init = B.__init__ def __init__(self): self.__super_init() class D(import69.Alias): 'd' __super_init = import69.Alias.__init__ def __init__(self): self.__super_...
kzvyahin/cfme_tests
refs/heads/master
sprout/appliances/migrations/0028_auto_20160311_0918.py
17
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-03-11 09:18 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('appliances', '0027_auto_20160310_1637'), ] operations = [ migrations.AlterFi...
hujiajie/chromium-crosswalk
refs/heads/master
tools/perf/profile_creators/fast_navigation_profile_extender.py
27
# 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 time from profile_creators import profile_extender from telemetry.core import exceptions from telemetry.core import util class FastNavigationProfile...
ESS-LLP/erpnext-medical
refs/heads/develop
erpnext/stock/doctype/item_customer_detail/item_customer_detail.py
121
# 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.model.document import Document class ItemCustomerDetail(Document): pass
yury-s/v8-inspector
refs/heads/master
Source/chrome/tools/perf/benchmarks/robohornet_pro.py
2
# Copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Runs Microsoft's RoboHornet Pro benchmark.""" import os from core import perf_benchmark from telemetry import benchmark from telemetry import page as p...
kevinmel2000/brython
refs/heads/master
www/src/Lib/test/unittests/test_keywordonlyarg.py
28
#!/usr/bin/env python3 """Unit tests for the keyword only argument specified in PEP 3102.""" __author__ = "Jiwon Seo" __email__ = "seojiwon at gmail dot com" import unittest from test.support import run_unittest def posonly_sum(pos_arg1, *arg, **kwarg): return pos_arg1 + sum(arg) + sum(kwarg.values()) def keywo...
bartoszkopinski/lightblue-0.4
refs/heads/master
examples/obex_ftp_client.py
49
''' This example shows how to use the lightblue.obex.OBEXClient class to implement a basic client for the File Transfer Profile, which is a profile implemented on top of OBEX. This profile allows clients to: - send files - retrieve files - create and remove directories - change the current working direc...
wonder-sk/inasafe
refs/heads/develop
safe_extras/raven/scripts/__init__.py
34
""" raven.scripts ~~~~~~~~~~~~~ :copyright: (c) 2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """
hrh5775/LibraryManager
refs/heads/master
PythonTestClient/LibraryManagerTestClient/venv/Lib/encodings/raw_unicode_escape.py
852
""" Python 'raw-unicode-escape' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs ### Codec APIs class Codec(codecs.Codec): # Note: Binding these as C functions will result in the class not # converting them to methods. This is ...
imsplitbit/nova
refs/heads/master
nova/api/openstack/compute/contrib/flavor_disabled.py
39
# Copyright 2012 Nebula, 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...
siosio/intellij-community
refs/heads/master
python/testData/mover/outsideStatement.py
83
def foo(): a = 1 if a: a <caret>= 3 a = 4
sdjtu502/logcat-color
refs/heads/master
test/logcat_color_test.py
5
import common import json import os from StringIO import StringIO from subprocess import Popen, PIPE import sys import tempfile import unittest from common import LogcatColor, MockAdbLogcatColor this_dir = os.path.dirname(os.path.abspath(__file__)) def logcat_color_test(*args, **kwargs): def run_logcat_color_test...
petemounce/ansible
refs/heads/devel
lib/ansible/utils/module_docs_fragments/dellos10.py
303
# # (c) 2015, Peter Sprygada <psprygada@ansible.com> # # Copyright (c) 2016 Dell 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 Licens...
telf/error_state_capture_improvement
refs/heads/20151006_error_state_capture_fixes_delivery2
scripts/checkkconfigsymbols.py
371
#!/usr/bin/env python2 """Find Kconfig symbols that are referenced but not defined.""" # (c) 2014-2015 Valentin Rothberg <valentinrothberg@gmail.com> # (c) 2014 Stefan Hengelein <stefan.hengelein@fau.de> # # Licensed under the terms of the GNU GPL License version 2 import os import re import sys from subprocess imp...
Mistobaan/tensorflow
refs/heads/master
tensorflow/contrib/distributions/python/kernel_tests/wishart_test.py
43
# 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...
jamestwebber/scipy
refs/heads/master
benchmarks/benchmarks/go_benchmark_functions/go_funcs_W.py
47
# -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import from numpy import atleast_2d, arange, sum, cos, exp, pi from .go_benchmark import Benchmark class Watson(Benchmark): r""" Watson objective function. This class defines the Watson [1]_ global optimization problem. T...
supermanue/distributedController
refs/heads/master
gridController/base.py
1
''' Created on Aug 31, 2012 @author: Manuel Rodriguez Pascual, <manuel.rodriguez.pascual@gmail.com> This file is part of gridwayController. gridwayController 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 ...
geekboxzone/lollipop_external_chromium_org
refs/heads/geekbox
tools/real_world_impact/real_world_impact.py
77
#!/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. # Tool for seeing the real world impact of a patch. # # Layout Tests can tell you whether something has changed, but this can help # yo...
SujaySKumar/django
refs/heads/master
django/utils/tree.py
372
""" A class for storing a tree graph. Primarily used for filter constructs in the ORM. """ import copy class Node(object): """ A single internal node in the tree graph. A Node should be viewed as a connection (the root) with the children being either leaf nodes or other Node instances. """ # ...
IraKorshunova/folk-rnn
refs/heads/master
configurations/__init__.py
473
__author__ = 'user'
benjixx/ansible
refs/heads/devel
lib/ansible/plugins/lookup/redis_kv.py
251
# (c) 2012, Jan-Piet Mens <jpmens(at)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) any later ver...
hoangt/gem5v
refs/heads/master
src/mem/ruby/system/Cache.py
9
# Copyright (c) 2009 Advanced Micro Devices, 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...
minhlongdo/scipy
refs/heads/master
scipy/linalg/tests/test_fblas.py
108
# Test interfaces to fortran blas. # # The tests are more of interface than they are of the underlying blas. # Only very small matrices checked -- N=3 or so. # # !! Complex calculations really aren't checked that carefully. # !! Only real valued complex numbers are used in tests. from __future__ import division, print...