repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
ModelDriven/SIMF
refs/heads/master
Scripts/MOFize.py
1
# # Python script (Macro) to be run inside of Magicdraw to MOFize a conceptual model. # - camelCase all names # - removed un-named associations (SIMF Restructons) # - add nested package URIs # - Replace term "Conceptual" with "MOF" # # Changes are logged as it modified the model in place. # # Put in a Magicdraw python ...
gauravjns/taiga-back
refs/heads/master
tests/integration/resources_permissions/test_userstories_custom_attributes_resource.py
20
# Copyright (C) 2015 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2015 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2015 David Barragán <bameda@dbarragan.com> # 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 F...
tsunami33/facebook-statistics
refs/heads/master
sample/__init__.py
1
from select_interlocutors import select_interlocutors from sqlite import fill_database, see_database from optparse import OptionParser parser = OptionParser() parser.add_option("-l", "--list-contact", type="int", dest="l", default=1, help="list l * 18 contacts", metavar="NUMBER") parser.add_option("-n", "--me...
redhat-openstack/neutron
refs/heads/f22-patches
neutron/db/migration/alembic_migrations/mlnx_init_ops.py
17
# Copyright 2014 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
mika76/Wox
refs/heads/master
PythonHome/Lib/site-packages/chardet/eucjpprober.py
2918
######################## 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...
phobson/conda-env
refs/heads/develop
conda_env/installers/__init__.py
12133432
helldorado/ansible
refs/heads/devel
lib/ansible/modules/network/eos/__init__.py
12133432
chugunovyar/factoryForBuild
refs/heads/master
env/lib/python2.7/site-packages/django/db/backends/base/__init__.py
12133432
danieljaouen/ansible
refs/heads/devel
lib/ansible/modules/network/bigswitch/__init__.py
12133432
saisaizhang/Food
refs/heads/master
flask/lib/python2.7/site-packages/pip/_vendor/cachecontrol/__init__.py
29
"""CacheControl import Interface. Make it easy to import from cachecontrol without long namespaces. """ from .wrapper import CacheControl from .adapter import CacheControlAdapter from .controller import CacheController
Dhivyap/ansible
refs/heads/devel
lib/ansible/modules/network/fortios/fortios_switch_controller_quarantine.py
13
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
thinker0/aurora
refs/heads/master
src/test/python/apache/aurora/client/cli/test_diff_formatter.py
5
# # 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 ...
AyoubZahid/odoo
refs/heads/9.0
addons/account/wizard/account_unreconcile.py
47
from openerp import models, api class AccountUnreconcile(models.TransientModel): _name = "account.unreconcile" _description = "Account Unreconcile" @api.multi def trans_unrec(self): context = dict(self._context or {}) if context.get('active_ids', False): self.env['account....
otdw/ansible-modules-core
refs/heads/devel
system/seboolean.py
152
#!/usr/bin/python # (c) 2012, Stephen Fromm <sfromm@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 optio...
ucoin-io/cutecoin
refs/heads/master
src/sakia/gui/main_window/status_bar/model.py
3
from PyQt5.QtCore import QObject from sakia.money import Referentials class StatusBarModel(QObject): """ The model of status bar component """ def __init__(self, parent, app, blockchain_processor): """ The status bar model :param parent: :param sakia.app.Application ap...
CloudServer/devstack
refs/heads/master
tools/uec/meta.py
71
# 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 # d...
richardcs/ansible
refs/heads/devel
lib/ansible/modules/storage/netapp/netapp_e_ldap.py
25
#!/usr/bin/python # (c) 2018, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
waseem18/oh-mainline
refs/heads/master
vendor/packages/Pygments/scripts/check_sources.py
117
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Checker for file headers ~~~~~~~~~~~~~~~~~~~~~~~~ Make sure each Python file has a correct file header including copyright and license information. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE fo...
yuhui-lin/web_page_classification
refs/heads/master
models/crnn.py
1
"""CNN model class""" import tensorflow as tf # import model import models.cnn ######################################### # FLAGS ######################################### FLAGS = tf.app.flags.FLAGS class CRNN(models.cnn.CNN): """convolutional neural network model. classify web page only based on target html....
yize/grunt-tps
refs/heads/master
tasks/lib/python/Lib/python2.7/test/test_dummy_thread.py
127
"""Generic thread tests. Meant to be used by dummy_thread and thread. To allow for different modules to be used, test_main() can be called with the module to use as the thread implementation as its sole argument. """ import dummy_thread as _thread import time import Queue import random import unittest from test impo...
40223139/2015cdaa5-12
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/sre_parse.py
630
# # Secret Labs' Regular Expression Engine # # convert re-style regular expression to sre pattern # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # See the sre.py file for information on usage and redistribution. # """Internal support module for sre""" # XXX: show string offset and offending ch...
home-assistant/home-assistant
refs/heads/dev
tests/components/zwave_js/test_switch.py
6
"""Test the Z-Wave JS switch platform.""" from zwave_js_server.event import Event from homeassistant.components.switch import DOMAIN, SERVICE_TURN_OFF, SERVICE_TURN_ON from homeassistant.const import STATE_OFF, STATE_ON from .common import SWITCH_ENTITY async def test_switch(hass, hank_binary_switch, integration, ...
DataDog/integrations-core
refs/heads/master
datadog_checks_dev/datadog_checks/dev/tooling/commands/dep.py
1
# (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from collections import defaultdict import click from packaging.markers import InvalidMarker, Marker from packaging.specifiers import SpecifierSet from ...fs import read_file_lines, write_file_lines from...
ehashman/oh-mainline
refs/heads/master
vendor/packages/celery/funtests/setup.py
19
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup from setuptools.command.install import install except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup from setuptools.command.install import install import os import s...
ancafarcas/superdesk-core
refs/heads/superdesk-master
tests/publish/newsml_1_2_formatter_tests.py
5
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014, 2015 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license from un...
rbharath/deepchem
refs/heads/master
deepchem/data/tests/test_data_loader.py
2
""" Tests for FeaturizedSamples class """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals __author__ = "Bharath Ramsundar" __copyright__ = "Copyright 2016, Stanford University" __license__ = "MIT" import os import unittest import tempfile import shutil imp...
tensorflow/tensorflow
refs/heads/master
tensorflow/python/tpu/tensor_tracer_flags.py
5
# 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...
Ademan/NumPy-GSoC
refs/heads/master
numpy/distutils/fcompiler/vast.py
94
import os from numpy.distutils.fcompiler.gnu import GnuFCompiler compilers = ['VastFCompiler'] class VastFCompiler(GnuFCompiler): compiler_type = 'vast' compiler_aliases = () description = 'Pacific-Sierra Research Fortran 90 Compiler' version_pattern = r'\s*Pacific-Sierra Research vf90 '\ ...
franekp/millandict
refs/heads/master
ankidict/thirdparty/urllib2.py
30
"""An extensible library for opening URLs using a variety of protocols The simplest way to use this module is to call the urlopen function, which accepts a string containing a URL or a Request object (described below). It opens the URL and returns the results as file-like object; the returned object has some extra me...
hallyn/qemu
refs/heads/ubuntu_1.7.0+dfsg-2
scripts/qapi-types.py
54
# # QAPI types generator # # Copyright IBM, Corp. 2011 # # Authors: # Anthony Liguori <aliguori@us.ibm.com> # # This work is licensed under the terms of the GNU GPLv2. # See the COPYING.LIB file in the top-level directory. from ordereddict import OrderedDict from qapi import * import sys import os import getopt impor...
thonkify/thonkify
refs/heads/master
src/lib/gcloud/storage/demo/demo.py
8
# Welcome to the gCloud Storage Demo! (hit enter) # We're going to walk through some of the basics... # Don't worry though. You don't need to do anything, just keep hitting enter... # Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use t...
kenorb/BitTorrent
refs/heads/master
BTL/asyncexecutor.py
5
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
dlacombejr/deepy
refs/heads/master
experiments/initialization_schemes/kaiming_he.py
7
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from util import run from deepy.utils import KaimingHeInitializer model_path = os.path.join(os.path.dirname(__file__), "models", "kaiming_he1.gz") if __name__ == '__main__': run(KaimingHeInitializer(), model_path)
undoware/neutron-drive
refs/heads/master
google_appengine/lib/django_1_3/django/conf/locale/zh_CN/__init__.py
12133432
potatolondon/django-nonrel-1-4
refs/heads/master
tests/modeltests/select_related/__init__.py
12133432
350dotorg/Django
refs/heads/master
tests/modeltests/field_subclassing/__init__.py
12133432
doctormo/motte
refs/heads/master
motte/tagcss/__init__.py
12133432
sam-tsai/django-old
refs/heads/master
django/conf/locale/uk/__init__.py
12133432
haiyangd/Gelatin
refs/heads/master
src/Gelatin/parser/Newline.py
2
# Copyright (C) 2010 Samuel Abels. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2, as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; wi...
RedBulli/Django_SnookerStats
refs/heads/master
SnookerStats/urls.py
1
from django.conf.urls import patterns, include, url from tastypie.api import Api from Snooker.api import StrikeResource, FrameResource, PlayerResource, MatchResource, LeagueResource, TournamentResource from django.contrib import admin from Snooker.views import index, client v1_api = Api(api_name='v1') v1_api.register(...
DarthMaulware/EquationGroupLeaks
refs/heads/master
Leak #5 - Lost In Translation/windows/Resources/Dsz/PyScripts/Lib/dsz/mca/file/cmd/diskspace/type_Result.py
1
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: type_Result.py from types import * class Result: def __init__(self): self.__dict__['available'] = 0 self.__dict__['total'] = 0 ...
maciek263/django2
refs/heads/master
myvenv/Lib/site-packages/pip/_vendor/html5lib/filters/sanitizer.py
1734
from __future__ import absolute_import, division, unicode_literals from . import _base from ..sanitizer import HTMLSanitizerMixin class Filter(_base.Filter, HTMLSanitizerMixin): def __iter__(self): for token in _base.Filter.__iter__(self): token = self.sanitize_token(token) if tok...
barryrobison/arsenalsuite
refs/heads/master
cpp/apps/bach/plugins/gen_thumbs.py
10
import initbach import bachutil from Bach import * from PyQt4.QtCore import * import os def listMissingThumbs(width): assets = BachAsset.select("exclude=false") for asset in assets: path = asset.path() cachePath = "%s/%s_%sx%s.png" % ("/drd/reference/.thumbnails", path, width,width) if...
orlenko/plei
refs/heads/master
mezzanine/core/forms.py
1
from uuid import uuid4 from django import forms from django.forms.extras.widgets import SelectDateWidget from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from mezzanine.conf import settings from mezzanine.core.models import Orderable from django.template.loader im...
zephirefaith/AI_Fall15_Assignments
refs/heads/master
A2/lib/networkx/algorithms/tests/test_boundary.py
43
#!/usr/bin/env python from nose.tools import * import networkx as nx from networkx import convert_node_labels_to_integers as cnlti class TestBoundary: def setUp(self): self.null=nx.null_graph() self.P10=cnlti(nx.path_graph(10),first_label=1) self.K10=cnlti(nx.complete_graph(10),first_label...
smartshark/serverSHARK
refs/heads/master
server/settings_template_vagrant.py
1
from .base import * # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'CHANGEME' DEBUG = True LOCALQUEUE = { 'root_path': '/tmp/servershark/', 'plugin_installation': os.path.join(BASE_DIR, 'plugin_installations'), 'plugin_output': os.path.join(BASE_DIR, 'plugin_output'), ...
hollerith/schoogle
refs/heads/master
gdata/youtube/__init__.py
297
#!/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 ...
Plurk/Solace
refs/heads/master
solace/_openid_auth.py
2
# -*- coding: utf-8 -*- """ solace._openid_auth ~~~~~~~~~~~~~~~~~~~ Implements a simple OpenID driven store. :copyright: (c) 2009 by Plurk Inc., see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import with_statement from time import time from hashlib ...
farodin91/servo
refs/heads/master
tests/wpt/css-tests/tools/wptserve/tests/functional/docroot/test_tuple_3.py
467
def main(request, response): return (202, "Giraffe"), [("Content-Type", "text/html"), ("X-Test", "PASS")], "PASS"
woobe/h2o
refs/heads/master
py/jprobe.py
1
#!/usr/bin/python import random, jenkinsapi, getpass, re, os, argparse, shutil, json, logging, sys import string from jenkinsapi.jenkins import Jenkins # only used when we wanted to see what objects were available (below) from see import see DO_LAST_GOOD = False # using the env variables to force jenkinsapi to use p...
antoinecarme/pyaf
refs/heads/master
tests/artificial/transf_RelativeDifference/trend_Lag1Trend/cycle_7/ar_12/test_artificial_1024_RelativeDifference_Lag1Trend_7_12_100.py
1
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "Lag1Trend", cycle_length = 7, transform = "RelativeDifference", sigma = 0.0, exog_count = 100, ar_order = 12);
jqk6/robomongo
refs/heads/master
src/third-party/mongodb/src/third_party/v8/src/macros.py
26
# Copyright 2006-2009 the V8 project authors. 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 co...
girving/tensorflow
refs/heads/master
tensorflow/contrib/slim/python/slim/nets/inception_v1_test.py
25
# 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...
serensoner/CouchPotatoServer
refs/heads/develop
couchpotato/core/notifications/pushbullet.py
37
from couchpotato.core.helpers.encoding import toUnicode from couchpotato.core.helpers.variable import splitString from couchpotato.core.logger import CPLog from couchpotato.core.notifications.base import Notification log = CPLog(__name__) autoload = 'Pushbullet' class Pushbullet(Notification): url = 'https://...
erikr/django
refs/heads/master
django/conf/locale/es_MX/formats.py
504
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals DATE_FORMAT = r'j \d\e F \d\e Y' TIME_FORMAT = 'H:i' DATETIME_FORMAT = r'j \d\e F \d\e Y \a \l\a\s H:i' YEAR_MONTH_FORMAT = r'F \d\e Y' MONTH_DAY_FORMAT = r'j \d\e F' SHORT_DATE_...
andreparrish/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/test/re_tests.py
879
#!/usr/bin/env python3 # -*- mode: python -*- # Re test suite and benchmark suite v1.5 # The 3 possible outcomes for each pattern [SUCCEED, FAIL, SYNTAX_ERROR] = range(3) # Benchmark suite (needs expansion) # # The benchmark suite does not test correctness, just speed. The # first element of each tuple is the regex...
lysenkoivan/nose-html-reporting
refs/heads/master
tests/test_nose_htmloutput.py
3
from __future__ import print_function from process_tests import dump_on_error from process_tests import TestProcess from process_tests import wait_for_strings TIMEOUT = 10 def test_sample(): with TestProcess( 'coverage', 'run', 'tests/nosetests.py', '--verbose', '--with-html', '--html-file=sample.html', ...
kjagoo/wger_stark
refs/heads/master
wger/core/migrations/0004_auto_20150217_1914.py
3
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('core', '0003_auto_20150217_1554'), ] operations = [ migrations.AlterField( model_name='userprofile', ...
ammarkhann/FinalSeniorCode
refs/heads/master
lib/python2.7/site-packages/django/views/generic/edit.py
45
import inspect import re import warnings from django.core.exceptions import ImproperlyConfigured from django.forms import models as model_forms from django.http import HttpResponseRedirect from django.utils import six from django.utils.deprecation import RemovedInDjango110Warning from django.utils.encoding import forc...
beeftornado/sentry
refs/heads/master
src/sentry/auth/providers/saml2/generic/apps.py
2
from __future__ import absolute_import from django.apps import AppConfig class Config(AppConfig): name = "sentry.auth.providers.saml2.generic" def ready(self): from sentry.auth import register from .provider import GenericSAML2Provider register("saml2", GenericSAML2Provider)
cvogt/ensime-sublime
refs/heads/master
rpc.py
2
from __future__ import unicode_literals import inspect, functools from functools import partial as bind import sexp from sexp import key, sym # ############################# DATA STRUCTURES ############################## class ActiveRecord(object): @classmethod def parse_list(cls, raw): if not raw: re...
wwj718/edx-platform
refs/heads/master
common/test/acceptance/tests/lms/test_lms_dashboard.py
24
# -*- coding: utf-8 -*- """ End-to-end tests for the main LMS Dashboard (aka, Student Dashboard). """ import datetime from nose.plugins.attrib import attr from ..helpers import UniqueCourseTest from ...fixtures.course import CourseFixture from ...pages.lms.auto_auth import AutoAuthPage from ...pages.lms.dashboard impo...
fingolfin/scummvm
refs/heads/master
devtools/tasmrecover/tasm/proc.py
57
# ScummVM - Graphic Adventure Engine # # ScummVM is the legal property of its developers, whose names # are too numerous to list here. Please refer to the COPYRIGHT # file distributed with this source distribution. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU ...
dhoffman34/django
refs/heads/master
django/db/migrations/executor.py
2
from __future__ import unicode_literals from django.db import migrations from django.apps.registry import apps as global_apps from .loader import MigrationLoader from .recorder import MigrationRecorder class MigrationExecutor(object): """ End-to-end migration execution - loads migrations, and runs them u...
amenonsen/ansible
refs/heads/devel
test/units/modules/network/onyx/test_onyx_lldp.py
23
# # (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...
PaddlePaddle/Paddle
refs/heads/develop
python/paddle/fluid/tests/unittests/test_dist_sparse_load_ps0.py
2
# Copyright (c) 2020 PaddlePaddle 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 app...
adityahase/frappe
refs/heads/develop
frappe/integrations/doctype/ldap_group_mapping/__init__.py
12133432
thomasgilgenast/spqr-nonrel
refs/heads/master
django/conf/locale/el/__init__.py
12133432
eonpatapon/nova
refs/heads/master
nova/tests/unit/virt/xenapi/image/__init__.py
12133432
AgustinGattone/FiveLazy
refs/heads/master
misitio/__init__.py
12133432
dwlehman/anaconda
refs/heads/master
pyanaconda/threads.py
4
# # threads.py: anaconda thread management # # Copyright (C) 2012 # Red Hat, Inc. All rights reserved. # # 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 # (...
neep305/swordfish
refs/heads/master
text_analysis/apps.py
1
from django.apps import AppConfig class TextAnalysisConfig(AppConfig): name = 'text_analysis'
zhaochao/fuel-main
refs/heads/master
utils/jenkins/report-exporter/spreadsheet.py
7
# Copyright 2015 Mirantis, 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 ...
orekyuu/intellij-community
refs/heads/master
python/testData/refactoring/rename/renameParameter_after.py
83
def method_name(qu): while (qu < 10): print(qu) qu = qu + 1 return qu
dvdhrm/systemd
refs/heads/master
test/test-network/systemd-networkd-tests.py
1
#!/usr/bin/env python3 # SPDX-License-Identifier: LGPL-2.1+ # systemd-networkd tests import os import re import shutil import signal import socket import subprocess import sys import time import unittest from shutil import copytree network_unit_file_path='/run/systemd/network' networkd_runtime_directory='/run/systemd...
xujb/odoo
refs/heads/8.0
addons/hr_attendance/wizard/hr_attendance_error.py
377
# -*- 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...
webu/django-categories
refs/heads/master
doc_src/code_examples/custom_categories6.py
13
class CategoryAdminForm(CategoryBaseAdminForm): class Meta: model = Category def clean_alternate_title(self): if self.instance is None or not self.cleaned_data['alternate_title']: return self.cleaned_data['name'] else: return self.cleaned_data['alternate_titl...
tawsifkhan/scikit-learn
refs/heads/master
doc/conf.py
210
# -*- coding: utf-8 -*- # # scikit-learn documentation build configuration file, created by # sphinx-quickstart on Fri Jan 8 09:13:42 2010. # # 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 file. ...
openstack/cinder
refs/heads/master
cinder/tests/unit/volume/drivers/test_spdk.py
2
# 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 # ...
neumerance/cloudloon2
refs/heads/master
horizon/workflows/base.py
5
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 # # ...
abaditsegay/arangodb
refs/heads/devel
3rdParty/V8-4.3.61/third_party/python_26/Lib/tabnanny.py
394
#! /usr/bin/env python """The Tab Nanny despises ambiguous indentation. She knows no mercy. tabnanny -- Detection of ambiguous indentation For the time being this module is intended to be called as a script. However it is possible to import it into an IDE and use the function check() described below. Warning: The ...
szlaozhu/twister-core
refs/heads/master
libtorrent/dht_flood.py
15
#! /usr/bin/env python import socket import sys from types import StringType, IntType, LongType, DictType, ListType, TupleType import random port = int(sys.argv[1]) # from BitTorrent 4.3.0 def encode_bencached(x,r): r.append(x.bencoded) def encode_int(x, r): r.extend(('i', str(x), 'e')) def encode_string(x...
rdhyee/osf.io
refs/heads/develop
website/addons/forward/tests/test_utils.py
15
# -*- coding: utf-8 -*- """Tests for website.addons.forward.utils.""" from nose.tools import * # PEP8 asserts from tests.base import OsfTestCase from website.addons.forward.tests.factories import ForwardSettingsFactory from website.addons.forward import utils class TestUtils(OsfTestCase): def test_serialize_...
darmaa/odoo
refs/heads/master
addons/l10n_be/wizard/l10n_be_vat_intra.py
33
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # Adapted by Noviat to # - make the 'mand_id' field optional # - support Noviat tax code scheme #...
seek-ai/esengine
refs/heads/master
esengine/utils/validation.py
2
# coding: utf-8 from esengine.exceptions import ClientError def validate_client(es): """ A valid ES client is a interface which must implements at least "index" and "search" public methods. preferably an elasticsearch.ElasticSearch() instance :param es: :return: None """ if not es: ...
overtherain/scriptfile
refs/heads/master
software/googleAppEngine/lib/django_1_3/tests/regressiontests/forms/localflavor/ie.py
89
from django.contrib.localflavor.ie.forms import IECountySelect from utils import LocalFlavorTestCase class IELocalFlavorTests(LocalFlavorTestCase): def test_IECountySelect(self): f = IECountySelect() out = u'''<select name="counties"> <option value="antrim">Antrim</option> <option value="armagh">...
fgaudin/aemanager
refs/heads/master
accounts/forms.py
1
from django.forms import ModelForm from accounts.models import Expense, Invoice, InvoiceRow, INVOICE_STATE_PAID, \ MAX_INVOICE_ID from django import forms from django.utils.translation import ugettext_lazy as _ class ExpenseForm(ModelForm): amount = forms.DecimalField(max_digits=12, decimal_places=2, label=_('...
brianv0/sqlalchemy
refs/heads/master
lib/sqlalchemy/orm/interfaces.py
51
# orm/interfaces.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ Contains various base classes used throughout the ORM. Defines some key base...
osh/gnuradio
refs/heads/master
docs/sphinx/hieroglyph/test/test_comments.py
72
import unittest from hieroglyph.hieroglyph import parse_hieroglyph_text from hieroglyph.errors import HieroglyphError class CommentTests(unittest.TestCase): def test_comment1(self): source = """Fetches rows from a Bigtable. This is a continuation of the opening paragraph. Retrieves rows ...
NCI-Cloud/horizon
refs/heads/nci/kilo
horizon/conf/__init__.py
77
# 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...
xq262144/hue
refs/heads/master
desktop/core/ext-py/tablib-0.10.0/tablib/packages/openpyxl3/shared/date_time.py
55
# file openpyxl/shared/date_time.py # Copyright (c) 2010 openpyxl # # 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, cop...
crcresearch/osf.io
refs/heads/develop
api/tokens/__init__.py
12133432
waustin/django-simple-faq
refs/heads/master
faq/__init__.py
12133432
tttthemanCorp/CardmeleonAppEngine
refs/heads/master
django/db/backends/postgresql/client.py
638
import os import sys from django.db.backends import BaseDatabaseClient class DatabaseClient(BaseDatabaseClient): executable_name = 'psql' def runshell(self): settings_dict = self.connection.settings_dict args = [self.executable_name] if settings_dict['USER']: args += ["-U"...
bsmr-erlang/otp
refs/heads/maint
lib/asn1/test/asn1_SUITE_data/Seq.py
92
Seq DEFINITIONS IMPLICIT TAGS ::= BEGIN IMPORTS Set1 FROM SeqSetLib; Seq ::= SEQUENCE { bool BOOLEAN, boolCon [20] BOOLEAN, boolPri [PRIVATE 21] BOOLEAN, boolApp [APPLICATION 22] BOOLEAN, boolExpCon [30] EXPLICIT BOOLEAN, boolExpPri [PRIVATE 31] EXPLICIT BOOLEAN, boolExpApp [APPLICATION 32] EXPLI...
FinalAngel/django-cms
refs/heads/release/3.4.x
cms/test_utils/project/pluginapp/plugins/style/cms_plugins.py
7
# -*- coding: utf-8 -*- from cms.plugin_pool import plugin_pool from cms.plugin_base import CMSPluginBase from .models import Style class StylePlugin(CMSPluginBase): model = Style name = 'Style' render_template = 'pluginapp/style/style.html' allow_children = True fieldsets = ( (None, { ...
bruderstein/PythonScript
refs/heads/master
PythonLib/full/encodings/iso8859_7.py
272
""" Python Character Mapping Codec iso8859_7 generated from 'MAPPINGS/ISO8859/8859-7.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors='...
michael-dev2rights/ansible
refs/heads/ansible-d2r
lib/ansible/modules/cloud/centurylink/clc_server_snapshot.py
56
#!/usr/bin/python # # Copyright (c) 2015 CenturyLink # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['previe...
carltongibson/django-allauth
refs/heads/master
manage.py
74
#!/usr/bin/env python import os os.environ['DJANGO_SETTINGS_MODULE'] = 'test_settings' from django.core import management if __name__ == "__main__": management.execute_from_command_line()
sumerc/yappi
refs/heads/master
tests/save_stats.py
2
import time import yappi import _yappi timings = {"a_1":4, "b_1":1} _yappi._set_test_timings(timings) def profile(func): def wrapped(*args, **kwargs): yappi.start() result = func(*args, **kwargs) yappi.stop() prof_file = "%s.%s" % (func.__name__, time.time()) #prof_file = "...