repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
vmax-feihu/hue
refs/heads/master
desktop/core/ext-py/python-oauth2/oauth2/clients/imap.py
885
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel 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 ...
ingokegel/intellij-community
refs/heads/master
python/testData/copyPaste/singleLine/IndentInIfInDef.after.py
83
def f(self): x = 1 if True: b = 2 x = 1
schlos/eden
refs/heads/master
modules/s3db/scenario.py
7
# -*- coding: utf-8 -*- """ Sahana Eden Scenario Model @copyright: 2009-2015 (c) Sahana Software Foundation @license: MIT 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 with...
dgjustice/ansible
refs/heads/devel
test/runner/lib/changes.py
39
"""Detect changes in Ansible code.""" from __future__ import absolute_import, print_function import re import os from lib.util import ( ApplicationError, SubprocessError, MissingEnvironmentVariable, CommonConfig, display, ) from lib.http import ( HttpClient, urlencode, ) from lib.git im...
flother/agate
refs/heads/master
agate/__init__.py
1
#!/usr/bin/env python import six from agate.aggregations import * from agate.data_types import * from agate.columns import Column # noqa from agate.computations import * from agate.exceptions import * from agate.mapped_sequence import MappedSequence # noqa from agate.rows import Row # noqa from agate.table import ...
arafsheikh/coala
refs/heads/master
coalib/coala.py
4
# This program is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be usefu...
sbuss/voteswap
refs/heads/master
lib/django/db/models/base.py
24
from __future__ import unicode_literals import copy import inspect import warnings from itertools import chain from django.apps import apps from django.conf import settings from django.core import checks from django.core.exceptions import ( NON_FIELD_ERRORS, FieldDoesNotExist, FieldError, MultipleObjectsReturned,...
un33k/robotframework
refs/heads/master
atest/testdata/libdoc/no_arg_init.py
38
class no_arg_init: """No inits here!""" def __init__(self): """This doc not shown because there are no arguments.""" def keyword(self, arg1, arg2): """The only lonely keyword."""
fracting/depot_tools
refs/heads/master
recipes/webrtc.py
17
# Copyright (c) 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. import sys import recipe_util # pylint: disable=F0401 # This class doesn't need an __init__ method, so we disable the warning # pylint: disable=W0232...
mozilla/nucleus
refs/heads/master
nucleus/base/templatetags/helpers.py
11
import datetime try: import urllib.parse as urlparse except ImportError: import urlparse from django_jinja import library from django.utils.http import urlencode @library.global_function def thisyear(): """The current year.""" return datetime.date.today().year @library.filter def urlparams(url_, ha...
vladikr/nova_drafts
refs/heads/master
nova/tests/virt/xenapi/image/test_vdi_through_dev.py
15
# Copyright 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
isyippee/nova
refs/heads/master
nova/scheduler/filters/aggregate_image_properties_isolation.py
49
# Copyright (c) 2013 Cloudwatt # 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...
kenshay/ImageScript
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/win32/Demos/win32console_demo.py
17
import win32console, win32con import traceback, time virtual_keys={} for k,v in win32con.__dict__.items(): if k.startswith('VK_'): virtual_keys[v]=k free_console=True try: win32console.AllocConsole() except win32console.error, exc: if exc.winerror!=5: raise ## only free console if one...
NewsNerdsAtCoJMC/ProjectTicoTeam6
refs/heads/master
service/organizations/models.py
1
from django.db import models class Organization(models.Model): name = models.CharField(max_length=255) location = models.CharField(max_length=255) image = models.ImageField(upload_to='media', blank=True, null=True) description = models.TextField(blank=True, null=True) active = models.BooleanField(d...
Carolusian/elasticsearch-workshop-pycon2015hk
refs/heads/master
stack/wsgi.py
6
""" WSGI config for stack project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "stack.settings") from django.core.wsgi ...
orbitfold/pyo
refs/heads/master
examples/utilities/02_midi_ctl_scan.py
12
#!/usr/bin/env python # encoding: utf-8 """ Scan for Midi controller numbers. Launch this script from a terminal. """ from pyo import * import time pm_list_devices() num = input("Enter your Midi interface number : ") s = Server(duplex=0) s.setMidiInputDevice(num) s.boot().start() print "Play with your Midi contro...
lukaslundgren/django-rest-framework-json-api
refs/heads/develop
example/tests/test_serializers.py
2
from django.test import TestCase from django.utils import timezone from rest_framework_json_api.utils import format_relation_name from rest_framework_json_api.serializers import ResourceIdentifierObjectSerializer from example.models import Blog, Entry, Author class TestResourceIdentifierObjectSerializer(TestCase): ...
habeascodice/redmatrix
refs/heads/master
library/blueimp_upload/server/gae-python/main.py
245
# -*- coding: utf-8 -*- # # jQuery File Upload Plugin GAE Python Example 2.2.0 # https://github.com/blueimp/jQuery-File-Upload # # Copyright 2011, Sebastian Tschan # https://blueimp.net # # Licensed under the MIT license: # http://www.opensource.org/licenses/MIT # from __future__ import with_statement from google.appe...
jendap/tensorflow
refs/heads/master
tensorflow/contrib/autograph/examples/benchmarks/cartpole_benchmark.py
16
# 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...
drnlm/sqlobject
refs/heads/master
sqlobject/tests/test_identity.py
2
from sqlobject import IntCol, SQLObject from sqlobject.tests.dbtest import getConnection, setupClass ######################################## # Identity (MS SQL) ######################################## class SOTestIdentity(SQLObject): n = IntCol() def test_identity(): # (re)create table SOTestIdentit...
NeCTAR-RC/cinder
refs/heads/nectar/icehouse
cinder/quota.py
2
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a ...
ntrrgc/snorky
refs/heads/master
doc/donotbreak.py
1
from docutils.nodes import General, Element, SkipNode from docutils.parsers.rst import Directive class nopagebreak(General, Element): pass def latex_visit_nopagebreak(self, node): import ipdb; ipdb.set_trace() self.body.append(r"\nopagebreak") raise SkipNode class NoPageBreakDirective(Directive): ...
timmeinhardt/ProxImaL
refs/heads/master
proximal/utils/metrics.py
2
from __future__ import division import abc import numpy as np from .utils import psnr class metric(object): """Represents an metric for measuring reconstruction quality """ __metaclass__ = abc.ABCMeta def __init__(self, desc, unit, decimals=None): self.desc = desc self.unit = unit ...
TheTypoMaster/chromium-crosswalk
refs/heads/master
components/policy/tools/make_policy_zip.py
159
#!/usr/bin/env python # Copyright (c) 2011 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. """Creates a zip archive with policy template files. The list of input files is extracted from a grd file with grit. This is to kee...
brinbois/Sick-Beard
refs/heads/development
lib/hachoir_metadata/riff.py
90
""" Extract metadata from RIFF file format: AVI video and WAV sound. """ from lib.hachoir_metadata.metadata import Metadata, MultipleMetadata, registerExtractor from lib.hachoir_metadata.safe import fault_tolerant, getValue from lib.hachoir_parser.container.riff import RiffFile from lib.hachoir_parser.video.fourcc imp...
nijel/weblate
refs/heads/main
weblate/checks/migrations/0004_auto_20200516_1821.py
2
# Generated by Django 3.0.5 on 2020-05-16 18:21 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("checks", "0003_auto_20191212_1441"), ] operations = [ migrations.RenameField( model_name="check", old_name="ignore", ...
lochiiconnectivity/boto
refs/heads/develop
boto/gs/user.py
98
# Copyright 2010 Google 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 limitation the rights to use, copy, modify, merge, publish, dis- # trib...
Voluntarynet/BitmessageKit
refs/heads/master
BitmessageKit/Vendor/static-python/Lib/lib2to3/pgen2/tokenize.py
115
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Python Software Foundation. # All rights reserved. """Tokenization help for Python programs. generate_tokens(readline) is a generator that breaks a stream of text into Python tokens. It accepts a readline-like method which is called repeatedly to get the next line o...
elioth010/lugama
refs/heads/master
activate/lib/python3.4/site-packages/pip/status_codes.py
1002
from __future__ import absolute_import SUCCESS = 0 ERROR = 1 UNKNOWN_ERROR = 2 VIRTUALENV_NOT_FOUND = 3 PREVIOUS_BUILD_DIR_ERROR = 4 NO_MATCHES_FOUND = 23
simon247/omim
refs/heads/master
3party/osrm/osrm-backend/third_party/libosmium/.ycm_extra_conf.py
68
#----------------------------------------------------------------------------- # # Configuration for YouCompleteMe Vim plugin # # http://valloric.github.io/YouCompleteMe/ # #----------------------------------------------------------------------------- from os.path import realpath, dirname basedir = dirname(realpath...
Alwnikrotikz/chimerascan
refs/heads/master
chimerascan/deprecated/rank_chimeras.py
6
''' Created on Feb 5, 2011 @author: mkiyer Copyright (C) 2011 Matthew Iyer 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. T...
malayaleecoder/teammates
refs/heads/master
BackupFiles/upload_data.py
24
#This script should be placed in the GAE Python SDK directory. #The path of the SDK will look like C:\Program Files (x86)\Google\google_appengine #The script is to be used in conjunction with the generated_bulkloader.yaml file #The script will upload all types of entities from the backup files to the GAE datastore. #T...
LockScreen/Backend
refs/heads/master
venv/lib/python2.7/site-packages/boto/cloudsearch2/document.py
136
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # 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 r...
markYoungH/chromium.src
refs/heads/nw12
components/domain_reliability/bake_in_configs.py
12
#!/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. """Takes the JSON files in components/domain_reliability/baked_in_configs and encodes their contents as an array of C strings that get...
mancoast/CPythonPyc_test
refs/heads/master
fail/313_test_dbm_dumb.py
4
#! /usr/bin/env python """Test script for the dumbdbm module Original by Roger E. Masse """ import io import os import unittest import dbm.dumb as dumbdbm from test import support _fname = support.TESTFN def _delete_files(): for ext in [".dir", ".dat", ".bak"]: try: os.unlink(_fname + ext)...
Azure/azure-sdk-for-python
refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2017_10_01/operations/__init__.py
4
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
TankCommander/pythonCode
refs/heads/master
startServer.py
1
''' Created on 10.07.2014 @author: markushinkelmann ''' import SocketServer from control.sockets.GameSocketHandler import GameSocketHandler '''Hauptschleife''' if __name__ == '__main__': '''für lokales Lan :-) ''' server = SocketServer.ThreadingTCPServer(("", 9999), GameSocketHandler) '''server = SocketServe...
TangHao1987/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/contrib/auth/urls.py
176
# These URLs are normally mapped to /admin/urls.py. This URLs file is # provided as a convenience to those who want to deploy these URLs elsewhere. # This file is also used to provide a reliable view deployment for test purposes. from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^login/$', 'dj...
adelina-t/neutron
refs/heads/master
neutron/tests/unit/quota/__init__.py
26
# Copyright (c) 2015 OpenStack Foundation. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
tdtrask/ansible
refs/heads/devel
test/units/module_utils/facts/system/test_lsb.py
118
# unit tests for ansible system lsb fact collectors # -*- coding: utf-8 -*- # # 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....
yujikato/DIRAC
refs/heads/integration
src/DIRAC/DataManagementSystem/Agent/RequestOperations/ReTransfer.py
2
######################################################################## # $HeadURL $ # File: ReTransfer.py # Author: Krzysztof.Ciba@NOSPAMgmail.com # Date: 2013/04/02 14:24:21 ######################################################################## """ :mod: ReTransfer ================ .. module: ReTransfer...
will-Do/virt-test
refs/heads/master
virttest/staging/backports/simplejson/scanner.py
26
"""JSON token scanner """ import re def _import_c_make_scanner(): try: from _speedups import make_scanner return make_scanner except ImportError: return None c_make_scanner = _import_c_make_scanner() __all__ = ['make_scanner'] NUMBER_RE = re.compile( r'(-?(?:0|[1-9]\d*))(\.\d+)?(...
aequitas/home-assistant
refs/heads/dev
homeassistant/components/luci/device_tracker.py
7
"""Support for OpenWRT (luci) routers.""" import logging import voluptuous as vol from homeassistant.components.device_tracker import ( DOMAIN, PLATFORM_SCHEMA, DeviceScanner) from homeassistant.const import ( CONF_HOST, CONF_PASSWORD, CONF_SSL, CONF_USERNAME) import homeassistant.helpers.config_validation as...
glaubitz/fs-uae-debian
refs/heads/master
arcade/OpenGL/raw/GLES1/APPLE/texture_max_level.py
8
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GLES1 import _types as _cs # End users want this... from OpenGL.raw.GLES1._types import * from OpenGL.raw.GLES1 import _errors from OpenGL.constant import Constant as _C import...
hugs/shotfactory
refs/heads/master
shotfactory04/gui/linux/opera.py
1
# browsershots.org - Test your web design in different browsers # Copyright (C) 2007 Johann C. Rocholl <johann@browsershots.org> # # Browsershots 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 ...
robhudson/django
refs/heads/master
django/contrib/gis/geometry/backend/geos.py
622
from django.contrib.gis.geos import ( GEOSException as GeometryException, GEOSGeometry as Geometry, ) __all__ = ['Geometry', 'GeometryException']
yemingm/httpbin
refs/heads/master
httpbin/structures.py
80
# -*- coding: utf-8 -*- """ httpbin.structures ~~~~~~~~~~~~~~~~~~~ Data structures that power httpbin. """ class CaseInsensitiveDict(dict): """Case-insensitive Dictionary for headers. For example, ``headers['content-encoding']`` will return the value of a ``'Content-Encoding'`` response header. """...
taedla01/MissionPlanner
refs/heads/master
Lib/site-packages/numpy/linalg/info.py
102
"""\ Core Linear Algebra Tools ------------------------- Linear algebra basics: - norm Vector or matrix norm - inv Inverse of a square matrix - solve Solve a linear system of equations - det Determinant of a square matrix - lstsq Solve linear least-squares problem...
zengboming/python
refs/heads/master
pop1.py
1
#pop1 import poplib import email from email.parser import Parser from email.header import decode_header from email.utils import parseaddr def print_info(msg,indent=0): if indent==0: for header in ['From','To','Subject']: value=msg.get(header,'') if value: if header=='Subject': value=decode_str(valu...
schets/scikit-learn
refs/heads/master
sklearn/neural_network/rbm.py
18
"""Restricted Boltzmann Machine """ # Authors: Yann N. Dauphin <dauphiya@iro.umontreal.ca> # Vlad Niculae # Gabriel Synnaeve # Lars Buitinck # License: BSD 3 clause import time import numpy as np import scipy.sparse as sp from ..base import BaseEstimator from ..base import TransformerMixi...
d4g33z/ruffus
refs/heads/master
ruffus/test/test_split_and_combine.py
5
#!/usr/bin/env python from __future__ import print_function """ test_split_and_combine.py test branching dependencies """ import sys import os tempdir = os.path.relpath(os.path.abspath(os.path.splitext(__file__)[0])) + "/" verbose_output = sys.stderr # add grandparent to search path for testing grand...
kevinlondon/youtube-dl
refs/heads/master
youtube_dl/extractor/videopremium.py
146
from __future__ import unicode_literals import re import random from .common import InfoExtractor class VideoPremiumIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?videopremium\.(?:tv|me)/(?P<id>\w+)(?:/.*)?' _TEST = { 'url': 'http://videopremium.tv/4w7oadjsf156', 'info_dict': { ...
devasia1000/mitmproxy
refs/heads/master
test/test_server.py
3
import socket import time from OpenSSL import SSL from netlib.exceptions import HttpReadDisconnect, HttpException from netlib.tcp import Address import netlib.tutils from netlib import tcp, http, socks from netlib.certutils import SSLCert from netlib.http import authentication, CONTENT_MISSING, http1 from netlib.tutil...
alisidd/tensorflow
refs/heads/asgd-dc
tensorflow/contrib/opt/python/training/variable_clipping_optimizer.py
133
# 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...
repotvsupertuga/tvsupertuga.repository
refs/heads/master
plugin.video.TVsupertuga/resources/lib/util/messages.py
1
# -*- coding: utf-8 -*- """ messages.py --- Copyright (C) 2017, Jen 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 l...
paour/weblate
refs/heads/master
weblate/trans/management/commands/unlock_translation.py
2
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2014 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.org/> # # 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, eithe...
ademmers/ansible
refs/heads/devel
lib/ansible/playbook/handler.py
71
# (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...
cmelange/ansible
refs/heads/devel
test/units/playbook/test_play.py
185
# (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...
sankhesh/VTK
refs/heads/master
ThirdParty/Twisted/twisted/python/test/test_hashlib.py
31
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.python.hashlib} """ from twisted.trial.unittest import TestCase from twisted.trial import util class HashObjectTests(TestCase): """ Tests for the hash object APIs presented by L{hashlib}, C{md5} and C{sha1}. ...
angelapper/edx-platform
refs/heads/master
openedx/core/djangoapps/cache_toolbox/tests/test_middleware.py
13
"""Tests for cached authentication middleware.""" from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.test import TestCase from mock import patch from openedx.core.djangolib.testing.utils import skip_unless_cms, skip_unless_lms from student.tests.factories import UserFa...
jabesq/home-assistant
refs/heads/dev
homeassistant/components/mqtt/light/schema_template.py
7
""" Support for MQTT Template lights. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/light.mqtt_template/ """ import logging import voluptuous as vol from homeassistant.core import callback from homeassistant.components import mqtt from homeassistant.co...
akhmadMizkat/odoo
refs/heads/master
addons/mail/models/ir_autovacuum.py
2
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp import models class AutoVacuum(models.AbstractModel): _inherit = 'ir.autovacuum' def power_on(self, cr, uid, *args, **kwargs): self.pool['mail.thread']._garbage_collect_attachments(cr, uid)...
gotthardp/rabbitmq-email
refs/heads/master
test/send.py
1
#!/usr/bin/env python import smtplib from email.mime.text import MIMEText me = "me@example.com" you = "you@example.com" msg = MIMEText("Hello world!") msg['From'] = me msg['To'] = you msg['Subject'] = 'Greetings' s = smtplib.SMTP('localhost', 2525) s.login("guest", "guest") s.sendmail(me, [you], msg.as_string()) s....
one-leaf/WeRoBot
refs/heads/develop
werobot/tests/test_logger.py
17
import time import logging from werobot.logger import enable_pretty_logging, _LogFormatter def get_new_logger(): return logging.getLogger(str(time.time())) def test_logger_level(): for level in ('debug', 'info', 'warning', 'error'): logger = get_new_logger() enable_pretty_logging(logger, le...
shuggiefisher/django-on-google-app-engine-base
refs/heads/master
django/contrib/admindocs/tests/__init__.py
325
from django.contrib.admindocs import views from django.db.models import fields as builtin_fields from django.utils import unittest import fields class TestFieldType(unittest.TestCase): def setUp(self): pass def test_field_name(self): self.assertRaises(AttributeError, views.get_re...
crosswalk-project/chromium-crosswalk-efl
refs/heads/efl/crosswalk-10/39.0.2171.19
tools/perf/page_sets/gmail_expand_collapse_conversation.py
33
# 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. from telemetry.page import page as page_module from telemetry.page import page_set as page_set_module class GmailExpandCollapseConversationPage( page_modu...
espadrine/opera
refs/heads/master
chromium/src/third_party/libvpx/source/libvpx/third_party/googletest/src/scripts/upload_gtest.py
1963
#!/usr/bin/env python # # Copyright 2009, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
kikokubo/Sick-Beard-TPB
refs/heads/ThePirateBay
lib/rtorrent/lib/xmlrpc/basic_auth.py
95
# # Copyright (c) 2013 Dean Gardiner, <gardiner91@gmail.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, copy, mod...
Tejal011089/osmosis_erpnext
refs/heads/develop
erpnext/config/setup.py
7
from __future__ import unicode_literals from frappe import _ from frappe.desk.moduleview import add_setup_section def get_data(): data = [ { "label": _("Settings"), "icon": "icon-wrench", "items": [ { "type": "doctype", "name": "Global Defaults", "label": _("Global Settings"), "desc...
halvertoluke/edx-platform
refs/heads/default_branch
common/lib/xmodule/xmodule/library_content_module.py
12
# -*- coding: utf-8 -*- """ LibraryContent: The XBlock used to include blocks from a library in a course. """ import json from lxml import etree from copy import copy from capa.responsetypes import registry from gettext import ngettext from lazy import lazy from .mako_module import MakoModuleDescriptor from opaque_key...
sigurdsa/angelika-api
refs/heads/master
threshold_value/migrations/0002_auto_20141030_1044.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('threshold_value', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='thresholdvalue', ...
Red-M/CloudBot
refs/heads/master
plugins/core_ctcp.py
21
import asyncio import time from cloudbot import hook import cloudbot # CTCP responses @asyncio.coroutine @hook.regex(r'^\x01VERSION\x01$') def ctcp_version(notice): notice("\x01VERSION: CloudBot {} - https://git.io/CloudBot".format(cloudbot.__version__)) @asyncio.coroutine @hook.regex(r'^\x01PING\x01$') def ct...
aisipos/django
refs/heads/master
tests/admin_utils/test_logentry.py
27
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json from datetime import datetime from django.contrib.admin.models import ADDITION, CHANGE, DELETION, LogEntry from django.contrib.admin.utils import quote from django.contrib.auth.models import User from django.contrib.contenttypes.models import...
mjg2203/edx-platform-seas
refs/heads/master
cms/envs/dev.py
1
""" This config file runs the simplest dev environment""" # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files # pylint: disable=W0401, W0614 from .common import * from logsettings import get_logger_config DEBUG = True USE_I18N = True # For display...
xibalbanus/PIA2
refs/heads/master
osiris_phylogenetics/phylogenies/phytab_raxml_using_ptree.parallel.py
1
#!/usr/bin/env python ## ## This tool runs RAxML to optimize branch lengths on a tree. (Multiple trees if multi-gene phytab provided). ## If N = # of nodes requested in job runner, then N RAxML jobs will run simultaneously. Make sure that the ## number of processors ('ppn') in the job runner matches the 'numthrea...
jjmleiro/hue
refs/heads/master
desktop/core/ext-py/simplejson/simplejson/tests/test_decode.py
123
import decimal from unittest import TestCase import simplejson as json class TestDecode(TestCase): def test_decimal(self): rval = json.loads('1.1', parse_float=decimal.Decimal) self.assert_(isinstance(rval, decimal.Decimal)) self.assertEquals(rval, decimal.Decimal('1.1')) def test_flo...
sanghi/metalab_rgbdemo
refs/heads/master
nestk/deps/libfreenect/wrappers/python/setup.py
3
#!/usr/bin/env python from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext ext_modules = [Extension("freenect", ["freenect.pyx"], libraries=['usb-1.0', 'freenect', 'freenect_sync'], runtime_library_dir...
quequino/Revolution
refs/heads/master
script.tvguidedixie/resetChannels.py
1
# # Copyright (C) 2014 Richard Dean # # 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 ...
postlund/home-assistant
refs/heads/dev
homeassistant/components/konnected/config_flow.py
1
"""Config flow for konnected.io integration.""" import asyncio import copy import logging import random import string from urllib.parse import urlparse import voluptuous as vol from homeassistant import config_entries from homeassistant.components.binary_sensor import ( DEVICE_CLASS_DOOR, DEVICE_CLASSES_SCHEM...
twiest/openshift-ansible
refs/heads/master
roles/openshift_health_checker/test/memory_availability_test.py
48
import pytest from openshift_checks.memory_availability import MemoryAvailability @pytest.mark.parametrize('group_names,is_active', [ (['oo_masters_to_config'], True), (['oo_nodes_to_config'], True), (['oo_etcd_to_config'], True), (['oo_masters_to_config', 'oo_nodes_to_config'], True), (['oo_mast...
Alexanderkorn/Automatisation
refs/heads/master
week 5/smartcard.py
1
class Smartcard(): def __init__(self, geslacht, vnaam, tvoeg, anaam, geld=0): self.geslacht = geslacht self.voornaam = vnaam self.tussengoevsel = tvoeg self.achternaam = anaam self.jaar = 2016 self.geld = geld return def check_name(self): Lengte ...
micddr/primeiro
refs/heads/master
backend/appengine/routes/admin/__init__.py
599
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals
phoebusliang/parallel-lettuce
refs/heads/master
tests/integration/lib/Django-1.3/tests/regressiontests/formwizard/urls.py
104
from django.conf.urls.defaults import * from forms import ContactWizard, Page1, Page2, Page3 urlpatterns = patterns('', url(r'^wiz/$', ContactWizard([Page1, Page2, Page3])), )
fighterCui/L4ReFiascoOC
refs/heads/master
l4/pkg/python/contrib/Tools/bgen/bgen/bgenGenerator.py
43
from bgenOutput import * from bgenType import * from bgenVariable import * Error = "bgenGenerator.Error" DEBUG=0 # Strings to specify argument transfer modes in generator calls IN = "in" OUT = "out" INOUT = IN_OUT = "in-out" class BaseFunctionGenerator: def __init__(self, name, condition=None, callname=None,...
kins912/giantcellsim
refs/heads/master
giantcellsim_fulltrialoutput.py
1
import csv def giantcellsim_fulltrialoutput(parameterlist,masterprefix,testprefix,trial_data,trials,growthIterations,max_strand_nr,maxStrandLength,numCells,numRounds,motif,elong,bias): with open(masterprefix + testprefix +'_FullTrial1Data_motif{motif}_len{maxStrandLength}_bias{bias}_elong{elong}_{trials}trials_numR...
pombredanne/algos-urv
refs/heads/master
django/contrib/admin/validation.py
9
from django.core.exceptions import ImproperlyConfigured from django.db import models from django.forms.models import (BaseModelForm, BaseModelFormSet, fields_for_model, _get_foreign_key) from django.contrib.admin.options import flatten_fieldsets, BaseModelAdmin from django.contrib.admin.options import HORIZONT...
tableau/TabPy
refs/heads/master
tabpy/models/scripts/SentimentAnalysis.py
1
from textblob import TextBlob import nltk from nltk.sentiment.vader import SentimentIntensityAnalyzer from tabpy.models.utils import setup_utils import ssl _ctx = ssl._create_unverified_context ssl._create_default_https_context = _ctx nltk.download("vader_lexicon") nltk.download("punkt") def SentimentAnalysis(_a...
a1d3s/linux-bpi
refs/heads/master
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
1891
# Core.py - Python extension for perf script, core functions # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. from collections import defaultdict def aut...
pjq/shadowsocks
refs/heads/master
shadowsocks/local.py
1015
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2012-2015 clowwindy # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
chialiang-8/cloudbase-init
refs/heads/master
cloudbaseinit/plugins/windows/winrmlistener.py
2
# Copyright 2013 Cloudbase Solutions Srl # # 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...
cbeighley/peregrine
refs/heads/master
tests/test_navigation.py
2
# Copyright (C) 2015 Swift Navigation Inc. # # This source is subject to the license found in the file 'LICENSE' which must # be be distributed together with this source. All other rights reserved. # # THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, # EITHER EXPRESSED OR IMPLIED, INCLUDING B...
ms-iot/python
refs/heads/develop
cpython/Lib/test/test_linecache.py
7
""" Tests for the linecache module """ import linecache import unittest import os.path from test import support FILENAME = linecache.__file__ NONEXISTENT_FILENAME = FILENAME + '.missing' INVALID_NAME = '!@$)(!@#_1' EMPTY = '' TESTS = 'inspect_fodder inspect_fodder2 mapping_tests' TESTS = TESTS.split() TEST_PATH = os...
suziesparkle/wagtail
refs/heads/master
wagtail/wagtailimages/models.py
3
import StringIO import os.path import PIL.Image from taggit.managers import TaggableManager from django.core.files import File from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist, ValidationError from django.db import models from django.db.models.signals import pre_delete from django.dispatch....
Simran-B/arangodb
refs/heads/docs_3.0
3rdParty/V8-4.3.61/third_party/python_26/Lib/test/reperf.py
233
import re import time def main(): s = "\13hello\14 \13world\14 " * 1000 p = re.compile(r"([\13\14])") timefunc(10, p.sub, "", s) timefunc(10, p.split, s) timefunc(10, p.findall, s) def timefunc(n, func, *args, **kw): t0 = time.clock() try: for i in range(n): result = fu...
ankitaggarwal011/electron
refs/heads/master
tools/mac/find_sdk.py
77
#!/usr/bin/env python # 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. """Prints the lowest locally available SDK version greater than or equal to a given minimum sdk version to standard output. Usage:...
MalloyPower/parsing-python
refs/heads/master
front-end/testsuite-python-lib/Python-2.6/Lib/xml/dom/NodeFilter.py
455
# This is the Python mapping for interface NodeFilter from # DOM2-Traversal-Range. It contains only constants. class NodeFilter: """ This is the DOM2 NodeFilter interface. It contains only constants. """ FILTER_ACCEPT = 1 FILTER_REJECT = 2 FILTER_SKIP = 3 SHOW_ALL = 0x...
gangadhar-kadam/verve_test_erp
refs/heads/v5.0
erpnext/hr/doctype/requisition_for_expense/requisition_for_expense.py
5
# Copyright (c) 2015, Web Notes Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class RequisitionForExpense(Document): # pass def on_submit(self): if self.ap...
40223123/finaltest2
refs/heads/master
static/Brython3.1.3-20150514-095342/Lib/imp.py
637
"""This module provides the components needed to build your own __import__ function. Undocumented functions are obsolete. In most cases it is preferred you consider using the importlib module's functionality over this module. """ # (Probably) need to stay in _imp from _imp import (lock_held, acquire_lock, release_lo...
xindus40223115/w17_test
refs/heads/master
static/Brython3.1.3-20150514-095342/Lib/ui/progressbar.py
615
from . import widget from browser import html class ProgressBar(widget.Widget): def __init__(self, id=None, label=False): self._div_shell=html.DIV(Class="ui-progressbar ui-widget ui-widget-content ui-corner-all") widget.Widget.__init__(self, self._div_shell, 'progressbar', id) self._show_label=lab...
magyarm/periphondemand-code
refs/heads/master
src/bin/core/__init__.py
1
#! /usr/bin/python # -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # Name: __init__.py # Purpose: # Author: Fabien Marteau <fabien.marteau@armadeus.com> # Created: 02/06/2008 #----------------------------------------------------------------------------- # C...