repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
massimo-nocentini/PhD
refs/heads/master
src/doubly-indexed-recurrences.py
2
from utils import * from sympy import * from sympy.abc import x, n, z, t, k from sympy.core.cache import * from sympy.core.function import UndefinedFunction from sympy.printing.latex import latex from functools import reduce class AbstractGenericElement(object): def accept(self, visitor): pass class Indexe...
asifhj/Python_SOAP_OSSJ_SAP_Fusion_Kafka_Spark_HBase
refs/heads/master
Scale_Testing/Kafak_Testing/utils.py
2
import requests from pymongo import MongoClient from bson import Binary, Code import json import csv import traceback import logging from tabulate import tabulate import datetime from kafka import SimpleProducer, KafkaClient from kafka import ( KafkaClient, KeyedProducer, RoundRobinPartitioner) _...
eoneil1942/voltdb-4.7fix
refs/heads/master
tests/scripts/sql_coverage_test.py
2
#!/usr/bin/env python # This file is part of VoltDB. # Copyright (C) 2008-2014 VoltDB Inc. # # 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 limitati...
adedayo/intellij-community
refs/heads/master
python/testData/hierarchy/call/Static/Parentheses/file_1.py
80
import main def target_func(): main.nothing(None) def nothing(x): pass def foo(x=bar()): ((target_func))() def bar(): main.nothing((target_func)) def another(): ((((target_func), 1))(), 2)()
sklam/numba
refs/heads/master
numba/pycc/__init__.py
7
# -*- coding: utf-8 -*- import os import logging import subprocess import tempfile import sys # Public API from .cc import CC from .decorators import export, exportmany def get_ending(args): if args.llvm: return ".bc" elif args.olibs: return ".o" elif args.python: return find_py...
Mlieou/oj_solutions
refs/heads/master
leetcode/python/ex_312.py
3
class Solution(object): def maxCoins(self, nums): """ :type nums: List[int] :rtype: int """ nums = [1] + [i for i in nums if i > 0] + [1] n = len(nums) dp = [[0] * n for _ in range(n)] for k in range(2, n): # k: number of balloons, bottom up ...
TNosredna/CouchPotatoServer
refs/heads/master
libs/bs4/builder/__init__.py
33
from collections import defaultdict import itertools import sys from bs4.element import ( CharsetMetaAttributeValue, ContentMetaAttributeValue, whitespace_re ) __all__ = [ 'HTMLTreeBuilder', 'SAXTreeBuilder', 'TreeBuilder', 'TreeBuilderRegistry', ] # Some useful features for a Tree...
jotes/boto
refs/heads/develop
boto/sdb/db/key.py
153
# Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/ # # 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,...
praba230890/frappe
refs/heads/develop
frappe/patches/v5_0/fix_email_alert.py
61
from __future__ import unicode_literals import frappe def execute(): frappe.reload_doctype("Email Alert") for e in frappe.get_all("Email Alert"): email_alert = frappe.get_doc("Email Alert", e.name) if email_alert.event == "Date Change": if email_alert.days_in_advance < 0: email_alert.event = "Days After"...
alphafoobar/intellij-community
refs/heads/master
python/testData/inspections/PyUnresolvedReferencesInspection/NamespacePackageNameDoesntMatchFileName/foo/bar/baz.py
79
class Baz(object): pass
USGSDenverPychron/pychron
refs/heads/develop
pychron/experiment/conditional/utilities.py
1
# =============================================================================== # Copyright 2014 Jake Ross # # 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...
RNAer/Calour
refs/heads/master
calour/dsfdr.py
1
from logging import getLogger import types import numpy as np import scipy as sp import scipy.stats from statsmodels.sandbox.stats.multicomp import multipletests from scipy.special import comb logger = getLogger(__name__) # data transformation def rankdata(data): logger.debug('ranking the data') rdata = np.z...
azverkan/scons
refs/heads/master
test/subdivide.py
4
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
vijaylbais/boto
refs/heads/develop
tests/unit/beanstalk/test_exception.py
114
# Copyright (c) 2014 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # 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...
runarberg/servo
refs/heads/master
tests/wpt/update_css.py
58
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. #!/usr/bin/env python import argparse import os import sys here = os.path.split(__file__)[0] def wpt_path(*args): ...
rosmo/ansible
refs/heads/devel
lib/ansible/plugins/doc_fragments/vultr.py
23
# -*- coding: utf-8 -*- # Copyright (c) 2017 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 documentation fragment DOCUMENTATION = r''' options: api_key: description: - API k...
spektom/incubator-airflow
refs/heads/master
tests/providers/postgres/hooks/__init__.py
5130
# # 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...
quinot/ansible
refs/heads/devel
test/units/modules/network/junos/junos_module.py
73
# (c) 2017 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 dis...
Ziachu/volontulo
refs/heads/master
apps/volontulo/utils.py
5
# -*- coding: utf-8 -*- u""" .. module:: utils """ from django.contrib.admin.models import LogEntry from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.shortcuts import get_object_or_404 from django.shortcuts import redirect from django.utils.text import s...
drpeteb/scipy
refs/heads/master
scipy/signal/filter_design.py
14
"""Filter design. """ from __future__ import division, print_function, absolute_import import warnings import numpy from numpy import (atleast_1d, poly, polyval, roots, real, asarray, allclose, resize, pi, absolute, logspace, r_, sqrt, tan, log10, arctan, arcsinh, sin, exp, cosh,...
moio/spacewalk
refs/heads/master
client/debian/packages-already-in-debian/rhnlib/test/24-ssl-memleak.py
21
#!/usr/bin/python # # # USAGE: $0 SERVER CERT """ Tests a memory leak in the applet """ import sys import string from rhn import rpclib def main(): server_name = "xmlrpc.rhn.redhat.com" ca_cert = "/usr/share/rhn/RHNS-CA-CERT" try: server_name = sys.argv[1] ca_cert = sys.argv[2] except...
mancoast/CPythonPyc_test
refs/heads/master
cpython/275_test_codecencodings_hk.py
150
#!/usr/bin/env python # # test_codecencodings_hk.py # Codec encoding tests for HongKong encodings. # from test import test_support from test import test_multibytecodec_support import unittest class Test_Big5HKSCS(test_multibytecodec_support.TestBase, unittest.TestCase): encoding = 'big5hkscs' tstring = test...
INNUENDOWEB/INNUca
refs/heads/master
src/SPAdes-3.10.1-Linux/share/spades/pyyaml3/tokens.py
986
class Token(object): def __init__(self, start_mark, end_mark): self.start_mark = start_mark self.end_mark = end_mark def __repr__(self): attributes = [key for key in self.__dict__ if not key.endswith('_mark')] attributes.sort() arguments = ', '.join(['%s=...
RyFry/leagueofdowning
refs/heads/master
manage.py
1
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "app.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
Ecogenomics/GTDBNCBI
refs/heads/master
scripts_dev/metadata_add_missing_gtdb_domain.py
1
#!/usr/bin/env python ############################################################################### # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License...
linktlh/Toontown-journey
refs/heads/master
toontown/coghq/DistributedSellbotHQDoor.py
6
from direct.directnotify import DirectNotifyGlobal from toontown.coghq import DistributedCogHQDoor from toontown.toonbase import TTLocalizer import CogDisguiseGlobals class DistributedSellbotHQDoor(DistributedCogHQDoor.DistributedCogHQDoor): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedSellbotH...
jgeskens/django
refs/heads/master
tests/admin_registration/models.py
152
""" Tests for various ways of registering models with the admin site. """ from django.db import models class Person(models.Model): name = models.CharField(max_length=200) class Location(models.Model): class Meta: abstract = True class Place(Location): name = models.CharField(max_length=200)
artur-shaik/qutebrowser
refs/heads/master
qutebrowser/commands/argparser.py
3
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
AlphaCluster/NewsBlur
refs/heads/master
apps/rss_feeds/migrations/0048_has_page.py
18
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Feed.has_page' db.add_column('feeds', 'has_page', self.gf('django.db.models.fields.Boolean...
txtbits/daw-python
refs/heads/master
clases y objetos/introclases.py
1
# -*- coding: utf-8 -*- from graphics import GraphWin, Rectangle, Point, Text from time import sleep class Rectangulo_centro(object): # Definición de un rectángulo que se coloca en el centro de la pantalla def __init__(self, ventana): ancho = ventana.width/2 alto = ventana.height/2 p1 ...
cvlab-epfl/multicam-gt
refs/heads/master
gtm_hit/migrations/0004_auto_20161108_1607.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-11-08 16:07 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('gtm_hit', '0003_auto_20161108_1544'), ] operations = [ migrations.AddField(...
abhishek-ram/pyas2
refs/heads/master
pyas2/migrations/0003_auto_20150311_1141.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('pyas2', '0002_partner_compress'), ] operations = [ migrations.AddField( model_name='message', name='...
davidzchen/tensorflow
refs/heads/master
tensorflow/python/framework/tensor_spec.py
8
# Copyright 2018 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...
DataViva/dataviva-site
refs/heads/master
dataviva/apps/partners/views.py
1
# -*- coding: utf8 -*- from flask import Blueprint, render_template, g from dataviva.apps.general.views import get_locale from dataviva.apps.calls.models import Call mod = Blueprint('partners', __name__, template_folder='templates', url_prefix='/<lang_code>/partners') @mod.before_req...
BlackSmith/GreenTea
refs/heads/master
apps/report/views.py
1
#!/bin/python # -*- coding: utf-8 -*- # Author: Pavel Studenik <pstudeni@redhat.com> # Date: 3.2.2016 from django.db.models import Count from django.views.generic import TemplateView, DetailView from apps.core.models import GroupTestTemplate, Task, Test from apps.report.models import ReportList, ExternalPage from ap...
JimCircadian/ansible
refs/heads/devel
test/legacy/cleanup_ec2.py
149
''' Find and delete AWS resources matching the provided --match string. Unless --yes|-y is provided, the prompt for confirmation prior to deleting resources. Please use caution, you can easily delete you're *ENTIRE* EC2 infrastructure. ''' import boto import boto.ec2.elb import optparse import os import os.path impor...
petermat/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/config/contributionareas.py
121
# Copyright (c) 2011 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 ...
decden/hotel
refs/heads/master
extern/googletest-release-1.8.0/googletest/test/gtest_catch_exceptions_test.py
2139
#!/usr/bin/env python # # Copyright 2010 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 o...
ftobia/ham
refs/heads/master
setup.py
1
import os from setuptools import setup __here__ = os.path.abspath(os.path.dirname(__file__)) package_name = 'ham' # define __version__ # execfile doesn't exist in python 3 # see: http://stackoverflow.com/questions/6357361/alternative-to-execfile-in-python-3-2 exec(open(os.path.join(__here__, package_name, '_version....
rmfitzpatrick/ansible
refs/heads/devel
test/units/modules/network/ios/test_ios_system.py
62
# # (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...
broferek/ansible
refs/heads/devel
test/units/modules/network/radware/test_vdirect_runnable.py
18
# -*- coding: utf-8 -*- # # Copyright 2017 Radware LTD. # # 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 l...
freesmartphone/framework
refs/heads/master
framework/subsystems/oeventsd/leds_actions.py
1
# -*- coding: UTF-8 -*- """ The freesmartphone Events Module - Python Implementation (C) 2008-2009 Michael 'Mickey' Lauer <mlauer@vanille-media.de> (C) 2008 Jan 'Shoragan' Lübbe <jluebbe@lasnet.de> (C) 2008 Guillaume 'Charlie' Chereau (C) 2008 Openmoko, Inc. GPLv2 or later Package: oeventsd Module: fso_actions """ ...
kervi/kervi
refs/heads/master
kervi-core/kervi/actions/action_job.py
1
from kervi.core.utility.schedule import Job class ActionJob(Job): """ A periodic job as used by :class:`Scheduler`. :param interval: A quantity of a certain time unit :param scheduler: The :class:`Scheduler <Scheduler>` instance that this job will register itself with once it has ...
pipermerriam/eth-testrpc
refs/heads/master
testrpc/client/filters.py
4
import functools from .utils import ( is_string, is_numeric, is_array, coerce_args_to_bytes, ) from .serializers import ( serialize_log, ) def is_empty_array(value): return value == [] or value == tuple() def is_topic_array(value): if not is_array(value): return False return...
mollstam/UnrealPy
refs/heads/master
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/cffi-1.1.2/testing/cffi1/test_dlopen_unicode_literals.py
5
import py, os s = """from __future__ import unicode_literals """ with open(os.path.join(os.path.dirname(__file__), 'test_dlopen.py')) as f: s += f.read() exec(py.code.compile(s))
Belxjander/Kirito
refs/heads/master
Python-3.5.0-main/Lib/_markupbase.py
891
"""Shared support for scanning document type declarations in HTML and XHTML. This module is used as a foundation for the html.parser module. It has no documented public API and should not be used directly. """ import re _declname_match = re.compile(r'[a-zA-Z][-_.a-zA-Z0-9]*\s*').match _declstringlit_match = re.com...
nanolearningllc/edx-platform-cypress-2
refs/heads/master
common/lib/xmodule/xmodule/modulestore/tests/test_split_copy_from_template.py
157
""" Tests for split's copy_from_template method. Currently it is only used for content libraries. However for these tests, we make sure it also works when copying from course to course. """ import ddt from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.exceptions import ItemNotFoundError from xmodu...
aaschaer/globus-sdk-python
refs/heads/master
globus_sdk/authorizers/null.py
1
import logging from globus_sdk.authorizers.base import GlobusAuthorizer logger = logging.getLogger(__name__) class NullAuthorizer(GlobusAuthorizer): """ This Authorizer implements No Authentication -- as in, it ensures that there is no Authorization header. """ def set_authorization_header(self,...
dya2/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/distutils/cmd.py
55
"""distutils.cmd Provides the Command class, the base class for the command classes in the distutils.command package. """ import sys, os, re from distutils.errors import DistutilsOptionError from distutils import util, dir_util, file_util, archive_util, dep_util from distutils import log class Command: """Abstra...
flumotion-mirror/flumotion
refs/heads/master
flumotion/common/gstreamer.py
2
# -*- Mode: Python; test-case-name: flumotion.test.test_common_gstreamer -*- # vi:si:et:sw=4:sts=4:ts=4 # Flumotion - a streaming media server # Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. # Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. # # This file may be distributed and/or mo...
jcode89/PyPractice
refs/heads/master
coke.py
1
def coke(n): """ This is a simple function using a while loop to run the bottles of coke song. """ bottle = n # I wrote it this way to show how the while loop works. # So long as the statement (n > 0) is True the loop will run the code indented four spaces. # As the loop runs and n = n - 1 the number stored in n ...
kennethgillen/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/sts_session_token.py
71
#!/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...
send2vinnie/artisan
refs/heads/master
CommCENTER309Python3.py
9
#!/usr/bin/env python ##################################################################################### # COMM TEST PROGRAM FOR CENTER 309 DATA LOGGER (www.centertek.com) # This program shows how to read Temp from a CENTER 309 thermometer data logger using T1 and T2 # USAGE: edit "COMx" port in temperature() a...
indashnet/InDashNet.Open.UN2000
refs/heads/master
android/external/chromium_org/tools/checkperms/PRESUBMIT.py
145
# Copyright (c) 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. """Top-level presubmit script for checkperms. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on the presubmit A...
Nick-Hall/gramps
refs/heads/master
gramps/gen/filters/rules/family/_matchessourceconfidence.py
5
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2011 Jerome Rapinat # # 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) ...
sarvex/tensorflow
refs/heads/master
tensorflow/python/training/moving_averages.py
1
# Copyright 2015 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...
cjhak/b2share
refs/heads/master
invenio/legacy/ping/webinterface.py
13
# This file is part of Invenio. # Copyright (C) 2012, 2015 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # Inveni...
EDUlib/XBlock
refs/heads/master
xblock/runtime.py
7
""" Machinery to make the common case easy when building new runtimes """ import functools import gettext import itertools import markupsafe import re import threading import warnings from abc import ABCMeta, abstractmethod from lxml import etree from StringIO import StringIO from collections import namedtuple from ...
PhilippMundhenk/IVNS
refs/heads/master
ECUSimulation/api/core/component_factories.py
1
import os import imp from tools.singleton import Singleton from tools.ecu_logging import ECULogger as L from tools.general import General as G class AbstractComponentFactory(Singleton): ''' This factory generates components from classes that are defined in files of a specified folder ''' def ...
globocom/vault
refs/heads/master
storage/tests/test_swift_container_acl.py
1
# -*- coding: utf-8 -*- import json from unittest.mock import patch, Mock from unittest import TestCase from swiftclient import client from storage.tests import fakes from storage import views from vault.tests.fakes import fake_request class TestSwiftAcl(TestCase): """ Class to test methods related to se...
mitya57/django
refs/heads/master
tests/migrations/migrations_test_apps/conflicting_app_with_dependencies/migrations/0001_initial.py
133
from django.db import migrations, models class Migration(migrations.Migration): operations = [ migrations.CreateModel( "Author", [ ("id", models.AutoField(primary_key=True)), ("name", models.CharField(max_length=255)), ("slug", model...
ashishtanwer/mptcp_android-4.2.2_Nexus4
refs/heads/android-4.2.2_r1
tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
# failed system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
tareqalayan/ansible
refs/heads/devel
lib/ansible/modules/windows/win_domain_membership.py
52
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Red Hat, Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'core'} DOCUMENTATI...
fuziontech/sentry
refs/heads/master
src/sentry/models/eventmapping.py
23
""" sentry.models.groupmeta ~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from django.db import models from django.utils import timezone from sentry.db.models import FlexibleF...
slimta/python-slimta
refs/heads/master
slimta/util/dns.py
1
# Copyright (c) 2015 Ian C. Good # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distrib...
giuliov/ansible
refs/heads/devel
lib/ansible/plugins/callback/minimal.py
87
# (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...
MER-GROUP/intellij-community
refs/heads/master
python/helpers/pydev/pydev_ipython_console.py
42
import sys from pydev_console_utils import BaseInterpreterInterface import os os.environ['TERM'] = 'emacs' #to use proper page_more() for paging # Uncomment to force PyDev standard shell. # raise ImportError() from pydev_ipython_console_011 import get_pydev_frontend #==============================================...
ContinuumIO/chaco
refs/heads/master
chaco/plot_graphics_context.py
3
""" Defines the PlotGraphicsContext class. """ from __future__ import with_statement from enable.kiva_graphics_context import GraphicsContext class PlotGraphicsContextMixin(object): """ A Kiva graphics context, which facilitates rendering plots and plot components into an offscreen or memory buffer. It...
jeffery9/mixprint_addons
refs/heads/master
stock/wizard/stock_partial_picking.py
8
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
frewsxcv/AutobahnPython
refs/heads/master
examples/twisted/wamp1/apps/dirwatch/win32/__init__.py
27
############################################################################### ## ## Copyright 2013 Tavendo GmbH ## ## 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...
JetBrains/intellij-community
refs/heads/master
python/testData/intentions/convertVariadicParamSeveralCalls.py
11
def bar(**kwa<caret>rgs): b = kwargs.get('foo') c = kwargs.get('foo')
SurfasJones/icecream-info
refs/heads/master
icecream/lib/python2.7/site-packages/django/contrib/gis/geos/error.py
641
""" This module houses the GEOS exceptions, specifically, GEOSException and GEOSGeometryIndexError. """ class GEOSException(Exception): "The base GEOS exception, indicates a GEOS-related error." pass class GEOSIndexError(GEOSException, KeyError): """ This exception is raised when an invalid index is...
mrkm4ntr/incubator-airflow
refs/heads/master
tests/providers/amazon/aws/transfers/test_dynamodb_to_s3.py
7
# # 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...
beeftornado/sentry
refs/heads/master
tests/snuba/api/endpoints/test_project_group_index.py
1
from __future__ import absolute_import from datetime import timedelta from uuid import uuid4 import six from six.moves.urllib.parse import quote from django.conf import settings from django.utils import timezone from exam import fixture from sentry.utils.compat.mock import patch, Mock from sentry.models import ( ...
jk1/intellij-community
refs/heads/master
python/helpers/profiler/thriftpy/contrib/tracking/__init__.py
36
# -*- coding: utf-8 -*- """ Tracking support similar to twitter finagle-thrift. Note: When using tracking, every client should have a corresponding server processor. """ from __future__ import absolute_import import os.path import time from ...thrift import TClient, TApplicationException, TMessageType, \ TProc...
torkelsson/monitor-core
refs/heads/master
gmond/python_modules/db/DBUtil.py
7
""" The MIT License Copyright (c) 2008 Gilad Raphaelli <gilad@raphaelli.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, c...
hellsgod/hells-Core-N6P
refs/heads/nougat-mr1.4
scripts/tracing/draw_functrace.py
14679
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
stackforge/python-openstacksdk
refs/heads/master
openstack/tests/functional/network/v2/test_trunk.py
3
# 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 # distributed under t...
simongoffin/my_odoo_tutorial
refs/heads/master
addons/web_tests/tests/test_ui.py
164
# -*- coding: utf-8 -*- import os import openerp.tests class TestUi(openerp.tests.HttpCase): def test_01_jsfile_ui_hello(self): self.phantom_jsfile(os.path.join(os.path.dirname(__file__), 'test_ui_hello.js')) def test_02_jsfile_ui_load(self): self.phantom_jsfile(os.path.join(os.path.dirname(__...
exaile/exaile
refs/heads/master
xlgui/panels.py
1
# Copyright (C) 2014 Dustin Spicuzza # # 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, or (at your option) # any later version. # # This program is distributed in the hope that...
nirmeshk/oh-mainline
refs/heads/master
vendor/packages/distribute/setuptools/tests/test_develop.py
64
"""develop tests """ import sys import os, shutil, tempfile, unittest import tempfile import site from StringIO import StringIO from distutils.errors import DistutilsError from setuptools.command.develop import develop from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import Distribu...
valmynd/MediaFetcher
refs/heads/master
src/plugins/youtube_dl/youtube_dl/extractor/onionstudios.py
1
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( determine_ext, int_or_none, float_or_none, mimetype2ext, ) class OnionStudiosIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?onionstudios\.com/(?:video(?:s/[^/]+-|/)|embed\?.*\bid=)(?P...
robinro/ansible
refs/heads/devel
test/integration/targets/module_utils/module_utils/a/b/c/d/e/f/g/h/__init__.py
298
data = 'abcdefgh'
ryfeus/lambda-packs
refs/heads/master
Skimage_numpy/source/scipy/sparse/linalg/dsolve/__init__.py
95
""" Linear Solvers ============== The default solver is SuperLU (included in the scipy distribution), which can solve real or complex linear systems in both single and double precisions. It is automatically replaced by UMFPACK, if available. Note that UMFPACK works in double precision only, so switch it off by:: ...
uclaros/QGIS
refs/heads/master
python/plugins/processing/algs/saga/SplitRGBBands.py
30
# -*- coding: utf-8 -*- """ *************************************************************************** SplitRGBBands.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *************************...
espadrine/opera
refs/heads/master
chromium/src/third_party/webpagereplay/third_party/dns/e164.py
248
# Copyright (C) 2006, 2007, 2009 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "AS I...
kenshay/ImageScript
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/pandas/tests/test_msgpack/test_limits.py
9
#!/usr/bin/env python # coding: utf-8 from __future__ import (absolute_import, division, print_function, unicode_literals) import pandas.util.testing as tm from pandas.msgpack import packb, unpackb, Packer, Unpacker, ExtType class TestLimits(tm.TestCase): def test_integer(self): ...
thomaslam/python_koans
refs/heads/master
python2/libs/colorama/winterm.py
523
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. from . import win32 # from wincon.h class WinColor(object): BLACK = 0 BLUE = 1 GREEN = 2 CYAN = 3 RED = 4 MAGENTA = 5 YELLOW = 6 GREY = 7 # from wincon.h class WinStyle(object): NORMAL = 0...
Jgarcia-IAS/Fidelizacion_odoo
refs/heads/master
openerp/addons/mass_mailing/models/mail_thread.py
220
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
dandygithub/kodi
refs/heads/master
addons/plugin.audio.music.yandex/requests/packages/chardet/sjisprober.py
1776
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
STANAPO/mraa
refs/heads/master
tests/platform_checks.py
12
#!/usr/bin/env python # Author: Costin Constantin <costin.c.constantin@intel.com> # Copyright (c) 2015 Intel Corporation. # # 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 restrictio...
Parisson/Telemeta
refs/heads/master
telemeta/templatetags/paginator.py
2
from django import template register = template.Library() def paginator(context, adjacent_pages=2): """ To be used in conjunction with the object_list generic view. Adds pagination context variables for use in displaying first, adjacent and last page links in addition to those created by the object_...
bigzz/autotest
refs/heads/master
frontend/tko/rpc_interface.py
4
import os import pickle import datetime import itertools import operator from django.db import models as dbmodels from autotest.frontend.afe import rpc_utils, model_logic from autotest.frontend.afe import models as afe_models, readonly_connection from autotest.frontend.tko import models, tko_rpc_utils, graphing_utils f...
javaos74/neutron
refs/heads/master
neutron/tests/unit/extensions/test_extraroute.py
12
# Copyright 2013, Nachi Ueno, NTT MCL, 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 # # Unles...
postlund/home-assistant
refs/heads/dev
setup.py
1
#!/usr/bin/env python3 """Home Assistant setup script.""" from datetime import datetime as dt from setuptools import find_packages, setup import homeassistant.const as hass_const PROJECT_NAME = "Home Assistant" PROJECT_PACKAGE_NAME = "homeassistant" PROJECT_LICENSE = "Apache License 2.0" PROJECT_AUTHOR = "The Home A...
wilsonkichoi/zipline
refs/heads/master
zipline/lib/labelarray.py
3
""" An ndarray subclass for working with arrays of strings. """ from functools import partial from operator import eq, ne import re import numpy as np from numpy import ndarray import pandas as pd from toolz import compose from zipline.utils.compat import unicode from zipline.utils.preprocess import preprocess from z...
with-git/tensorflow
refs/heads/master
tensorflow/python/eager/graph_only_ops.py
69
# 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...
jxta/cc
refs/heads/master
vendor/boto/boto/tests/test_ec2connection.py
3
#!/usr/bin/env python # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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 ri...
zesus19/c5.v1
refs/heads/master
Dependency/SuperSocket/QuickStart/IronSocketServer/Command/QUIT.py
18
def execute(session, request): session.Close()
0k/OpenUpgrade
refs/heads/8.0
addons/sale_stock/sale_stock.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 GNU...