repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
sathnaga/virt-test
refs/heads/next
virttest/build_helper.py
1
import logging, os, shutil, tarfile from autotest.client.shared import git, error from autotest.client import utils, os_dep import data_dir class GitRepoParamHelper(git.GitRepoHelper): ''' Helps to deal with git repos specified in cartersian config files This class attempts to make it simple to manage a ...
nonNoise/akilib
refs/heads/master
pypi/akilib/edison/AKI_GPIO_SG12864ASLB.py
3
import mraa import time from struct import * class AKI_GPIO_SG12864ASLB: def __init__(self,RS,RW,E,D0,D1,D2,D3,D4,D5,D6,D7,CS1,CS2,Reset): self.HI = 1 self.LOW = 0 self.RS = mraa.Gpio(RS) self.RW = mraa.Gpio(RW) self.E = mraa.Gpio(E) self.DB0 = mraa.Gpio(D0) self.DB1 = mraa.Gpio(D1) self.DB2 = m...
postlund/home-assistant
refs/heads/dev
tests/components/automatic/test_device_tracker.py
2
"""Test the automatic device tracker platform.""" from datetime import datetime import logging import aioautomatic from asynctest import MagicMock, patch from homeassistant.components.automatic.device_tracker import async_setup_scanner from homeassistant.setup import async_setup_component _LOGGER = logging.getLogger...
mavit/ansible
refs/heads/devel
test/units/modules/net_tools/__init__.py
12133432
Yarichi/Proyecto-DASI
refs/heads/master
ICAROMalmo/src/icaro/aplicaciones/recursos/recursoMalmo/imp/OrderServer.py
1
''' Authors declaration: for the DASI subject in the UCM by Sergio Moreno de Pradas Adrian Garcia Garcia David Diaz Morgado David Gomez Luis Garcia ''' # coding=utf-8 import string...
Cinntax/home-assistant
refs/heads/dev
homeassistant/components/entur_public_transport/sensor.py
3
"""Real-time information about public transport departures in Norway.""" from datetime import datetime, timedelta import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( ATTR_ATTRIBUTION, CONF_LATITUDE, CONF_LONGITUDE, CONF_...
vjmac15/Lyilis
refs/heads/master
lib/youtube_dl/extractor/appletrailers (VJ Washington's conflicted copy 2017-08-29).py
23
from __future__ import unicode_literals import re import json from .common import InfoExtractor from ..compat import compat_urlparse from ..utils import ( int_or_none, parse_duration, unified_strdate, ) class AppleTrailersIE(InfoExtractor): IE_NAME = 'appletrailers' _VALID_URL = r'https?://(?:ww...
jeffrey4l/nova
refs/heads/master
nova/tests/functional/wsgi/test_secgroup.py
36
# Copyright 2015 Hewlett-Packard Development Company, L.P. # # 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 ...
tvtsoft/odoo8
refs/heads/master
addons/crm_claim/__openerp__.py
2
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Claims Management', 'version': '1.0', 'category': 'Customer Relationship Management', 'description': """ Manage Customer Claims. ======================= This application allows you to track y...
tonyli71/designate
refs/heads/master
designate/api/v1/extensions/__init__.py
12133432
karthik-suresh/horizon
refs/heads/master
openstack_dashboard/contrib/sahara/content/data_processing/data_sources/__init__.py
12133432
0ion9/blueprint
refs/heads/master
blueprint/__init__.py
2
# -*- coding: utf-8 -*- """blueprint -- magical blueprints for procedural generation of content. Based roughly on http://www.squidi.net/mapmaker/musings/m100402.php """ import blueprint.base as base import blueprint.fields as fields import blueprint.taggables as mods import blueprint.factories as factories import blue...
mailund/gwf
refs/heads/master
tests/plugins/__init__.py
12133432
thinkopensolutions/geraldo
refs/heads/master
site/newsite/django_1_0/tests/regressiontests/backends/__init__.py
12133432
mkurnikov/remote_job_aggregator
refs/heads/master
remote_job_aggregator/users/tests/__init__.py
12133432
brownharryb/erpnext
refs/heads/develop
erpnext/accounts/doctype/tax_withholding_category/__init__.py
12133432
calston/snoxy
refs/heads/master
snoxy/wsgi.py
1
import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "snoxy.settings") from django.core.wsgi import get_wsgi_application application = get_wsgi_application()
jasonbot/django
refs/heads/master
tests/one_to_one/__init__.py
12133432
vaygr/ansible
refs/heads/devel
lib/ansible/module_utils/network/f5/__init__.py
12133432
wsmith323/django
refs/heads/master
django/contrib/sitemaps/management/__init__.py
12133432
dmranck/ticketutil
refs/heads/master
tests/test_jira.py
1
import logging from collections import namedtuple from unittest import main, TestCase from unittest.mock import patch, Mock import requests from ticketutil.ticket import TicketException import ticketutil.jira as jira logging.disable(logging.CRITICAL) URL = 'jira.com' PROJECT = 'PROJECT' TICKET_ID = 'PROJECT-007' SUM...
tuxfux-hlp-notes/python-batches
refs/heads/master
archieves/batch-64/09-modules/myenv/lib/python2.7/site-packages/django/core/cache/backends/memcached.py
82
"Memcached cache backend" import pickle import time from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache from django.utils import six from django.utils.deprecation import ( RemovedInDjango19Warning, RenameMethodsBase, ) from django.utils.encoding import force_str from django.utils.functional imp...
ArtsiomCh/tensorflow
refs/heads/master
tensorflow/python/keras/_impl/keras/wrappers/scikit_learn_test.py
34
# 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...
rsdevgun16e/energi
refs/heads/energi_v0
qa/rpc-tests/pruning.py
41
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test pruning code # ******** # WARNING: # This test uses 4GB of disk space. # This test takes 30 mins...
alex8866/cinder
refs/heads/f22-patches
cinder/openstack/common/lockutils.py
7
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 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.apac...
FrankBian/kuma
refs/heads/master
vendor/packages/sqlalchemy/lib/sqlalchemy/dialects/postgresql/pypostgresql.py
18
"""Support for the PostgreSQL database via py-postgresql. Connecting ---------- URLs are of the form ``postgresql+pypostgresql://user@password@host:port/dbname[?key=value&key=value...]``. """ from sqlalchemy.engine import default import decimal from sqlalchemy import util from sqlalchemy import types as sqltypes fr...
bonitadecker77/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/distutils/tests/test_cygwinccompiler.py
147
"""Tests for distutils.cygwinccompiler.""" import unittest import sys import os from io import BytesIO import subprocess from test.support import run_unittest from distutils import cygwinccompiler from distutils.cygwinccompiler import (CygwinCCompiler, check_config_h, CONFIG_H_OK...
joongh/robotframework
refs/heads/master
src/robot/utils/frange.py
10
# Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework 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 ...
mancoast/CPythonPyc_test
refs/heads/master
fail/323_test_generators.py
1
tutorial_tests = """ Let's try a simple generator: >>> def f(): ... yield 1 ... yield 2 >>> for i in f(): ... print(i) 1 2 >>> g = f() >>> next(g) 1 >>> next(g) 2 "Falling off the end" stops the generator: >>> next(g) Traceback (most recent call last...
GNOME/gtranslator
refs/heads/master
plugins/charmap/charmap/panel.py
3
# -*- coding: utf-8 -*- # # Copyright (C) 2006 Steve Frécinaux <steve@istique.net> # 2010 Ignacio Casal Quinteiro <icq@gnome.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, ...
indrajitr/ansible
refs/heads/devel
lib/ansible/modules/get_url.py
7
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012, Jan-Piet Mens <jpmens () gmail.com> # 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 DOCUMENTATION = r''' --- module: get...
redhat-openstack/glance
refs/heads/f22-patches
glance/cmd/registry.py
1
#!/usr/bin/env python # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file ...
SnappleCap/oh-mainline
refs/heads/master
vendor/packages/kombu/examples/simple_task_queue/tasks.py
29
def hello_task(who="world"): print("Hello %s" % (who, ))
simonwydooghe/ansible
refs/heads/devel
lib/ansible/modules/remote_management/oneview/oneview_network_set_info.py
21
#!/usr/bin/python # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP # 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', ...
nthiep/global-ssh-server
refs/heads/master
lib/python2.7/site-packages/django/contrib/sitemaps/tests/http.py
93
from __future__ import unicode_literals import os from datetime import date from django.conf import settings from django.contrib.sitemaps import Sitemap, GenericSitemap from django.contrib.sites.models import Site from django.core.exceptions import ImproperlyConfigured from django.test.utils import override_settings ...
rsmz/dtrange
refs/heads/master
test/test_utils.py
386048
PearsonIOKI/compose-forum
refs/heads/master
askbot/migrations/0077_transplant_summary_1.py
17
# 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 'Answer.summary' db.add_column(u'answer', 'summary', self.gf('django.db.models.fields.CharF...
akosyakov/intellij-community
refs/heads/master
python/helpers/pydev/stubs/_django_manager_body.py
102
# This is a dummy for code-completion purposes. def __unicode__(self): """ Return "app_label.model_label.manager_name". """ def _copy_to_model(self, model): """ Makes a copy of the manager and assigns it to 'model', which should be a child of the existing model (used when inheriting a manager...
StealthMicro/OctoPi-Makerbot
refs/heads/master
env/Lib/site-packages/flask/testsuite/test_apps/flaskext/oldext_package/submodule.py
1258
def test_function(): return 42
MalloyPower/parsing-python
refs/heads/master
front-end/testsuite-python-lib/Python-3.1/Lib/encodings/big5hkscs.py
816
# # big5hkscs.py: Python Unicode Codec for BIG5HKSCS # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_hk, codecs import _multibytecodec as mbc codec = _codecs_hk.getcodec('big5hkscs') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(mbc.Multib...
STIXProject/python-stix
refs/heads/master
stix/incident/contributors.py
1
# Copyright (c) 2017, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. # external from cybox.common import Contributor # internal import stix import stix.utils import stix.bindings.incident as incident_binding from mixbox import fields, entities class Contributors(stix.EntityList): ...
Teino1978-Corp/Teino1978-Corp-light_.gitignore
refs/heads/master
light_financials_migrations_0018_descuentotipo.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('master', '0007_cadena'), ('financials', '0017_descuentosucursal'), ] operations = [ migrations.CreateModel( ...
hbtech-ai/ARPS
refs/heads/master
tmsvm/tools/result_analysis.py
6
#!/usr/bin/python #_*_ coding: utf-8 _*_ #author: 张知临 zhzhl202@163.com #Filename: result_analysis.py '''从得到的结果中分析数据 统计分类的正确率Rate = correct/all 各个子类的F值、召回率、准确率 Macro,Micro ''' from optparse import OptionParser import types def read_result(result_save_path,indexes,dtype=float): '''从文件中读取结果,给定文件中要读取的...
handroissuazo/tensorflow
refs/heads/master
tensorflow/contrib/slim/python/slim/evaluation_test.py
27
# 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...
IRI-Research/django
refs/heads/master
django/forms/utils.py
7
from __future__ import unicode_literals import json import sys import warnings from django.conf import settings from django.utils.html import format_html, format_html_join from django.utils.encoding import force_text, python_2_unicode_compatible from django.utils import timezone from django.utils.translation import u...
sebrandon1/nova
refs/heads/master
nova/tests/unit/api/openstack/compute/test_limits.py
3
# Copyright 2011 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...
iproduct/course-social-robotics
refs/heads/master
11-dnn-keras/venv/Lib/site-packages/pandas/tests/scalar/interval/test_interval.py
3
import numpy as np import pytest from pandas import Interval, Period, Timedelta, Timestamp import pandas._testing as tm import pandas.core.common as com @pytest.fixture def interval(): return Interval(0, 1) class TestInterval: def test_properties(self, interval): assert interval.closed == "right" ...
jmcarp/django
refs/heads/master
tests/forms_tests/tests/test_widgets.py
115
# -*- coding: utf-8 -*- from __future__ import unicode_literals import copy import datetime from django.contrib.admin.tests import AdminSeleniumWebDriverTestCase from django.core.files.uploadedfile import SimpleUploadedFile from django.core.urlresolvers import reverse from django.forms import ( BooleanField, Char...
chudaol/edx-platform
refs/heads/master
lms/djangoapps/django_comment_client/tests/mock_cs_server/mock_cs_server.py
127
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler import json from logging import getLogger logger = getLogger(__name__) class MockCommentServiceRequestHandler(BaseHTTPRequestHandler): ''' A handler for Comment Service POST requests. ''' protocol = "HTTP/1.0" def do_POST(self): ...
gxyang/hstore
refs/heads/master
third_party/python/boto/services/servicedef.py
103
# 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 rights to use, copy, modi...
by46/coffee
refs/heads/master
app/main/meta/coffee.py
1
from flask_restful import fields from flask_restful_swagger import swagger @swagger.model class CoffeeModel(object): """ """ resource_fields = { "name": fields.String, "on_sale_date": fields.DateTime, "imported": fields.Boolean, "imported2": fields.Boolean ...
armersong/letsencrypt
refs/heads/master
acme/acme/crypto_util.py
27
"""Crypto utilities.""" import contextlib import logging import socket import sys from six.moves import range # pylint: disable=import-error,redefined-builtin import OpenSSL from acme import errors logger = logging.getLogger(__name__) # DVSNI certificate serving and probing is not affected by SSL # vulnerabiliti...
youdonghai/intellij-community
refs/heads/master
python/testData/completion/dunderNext.after.py
79
class C: def __next__(self):
crazy-cat/incubator-mxnet
refs/heads/master
example/speech_recognition/main.py
44
# 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 u...
jMyles/hendrix
refs/heads/master
hendrix/facilities/response.py
3
import threading from twisted.internet import reactor from twisted.logger import Logger from twisted.web.wsgi import _WSGIResponse from hendrix.utils import responseInColor class HendrixWSGIResponse(_WSGIResponse): log = Logger() def __init__(self, *args, **kwargs): self.crosstown_tasks = [] ...
advaitgodbole/my-nemo
refs/heads/master
generators.py
1
# Copyright (C) 2011, 2012, 2013, 2014 Ben Elliston # Copyright (C) 2014 The University of New South Wales # # This file 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 # (a...
thisispuneet/potato-blog
refs/heads/master
django/contrib/localflavor/pl/pl_administrativeunits.py
433
# -*- coding: utf-8 -*- """ Polish administrative units as in http://pl.wikipedia.org/wiki/Podzia%C5%82_administracyjny_Polski """ ADMINISTRATIVE_UNIT_CHOICES = ( ('wroclaw', u'Wrocław'), ('jeleniagora', u'Jelenia Góra'), ('legnica', u'Legnica'), ('boleslawiecki', u'bolesławiecki'), ('dzierzoniows...
powerjg/gem5-ci-test
refs/heads/master
src/mem/AddrMapper.py
69
# Copyright (c) 2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
rjschof/gem5
refs/heads/master
configs/example/arm/devices.py
3
# Copyright (c) 2016 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
WeftWiki/phetools
refs/heads/master
ocr/queue_build_djvu_from_ocr_rate.py
1
# -*- coding: utf-8 -*- # # @file queue_ocr.py # # @remark Copyright 2014 Philippe Elie # @remark Read the file COPYING # # @author Philippe Elie import sys import os sys.path.append(os.path.expanduser('~/phe/jobs')) import sge_jobs def add_request(lang, filenames): job_req = { 'jobname' : 'build_djvu', ...
wallnerryan/quantum_migrate
refs/heads/master
quantum/tests/unit/linuxbridge/test_linuxbridge_plugin.py
5
# Copyright (c) 2012 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
octohedron/TouristFriend
refs/heads/master
touristfriend/external/__init__.py
12133432
takeshineshiro/glance
refs/heads/master
glance/contrib/plugins/image_artifact/v2/__init__.py
12133432
persandstrom/home-assistant
refs/heads/master
homeassistant/components/media_player/mpd.py
1
""" Support to interact with a Music Player Daemon. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.mpd/ """ from datetime import timedelta import logging import os import voluptuous as vol from homeassistant.components.media_player import ...
Hybrid-Rom/external_skia
refs/heads/5.1
gyp_skia.py
176
# Copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # This file is (possibly, depending on python version) imported by # gyp_chromium when GYP_PARALLEL=1 and it creates sub-processes # through the multiprocess...
whitehorse-io/encarnia
refs/heads/master
pyenv/lib/python2.7/site-packages/twisted/conch/ssh/filetransfer.py
1
# -*- test-case-name: twisted.conch.test.test_filetransfer -*- # # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from __future__ import division, absolute_import import errno import struct from zope.interface import implementer from twisted.conch.interfaces import ISFTPServer, ISFTPFile from...
WhireCrow/openwrt-mt7620
refs/heads/master
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/root-ralink/usr/lib/python2.7/email/charset.py
180
# Copyright (C) 2001-2006 Python Software Foundation # Author: Ben Gertzfield, Barry Warsaw # Contact: email-sig@python.org __all__ = [ 'Charset', 'add_alias', 'add_charset', 'add_codec', ] import codecs import email.base64mime import email.quoprimime from email import errors from email.encoders ...
paramite/packstack
refs/heads/master
packstack/installer/utils/decorators.py
23
# -*- coding: utf-8 -*- import time def retry(count=1, delay=0, retry_on=Exception): """ Decorator which tries to run specified fuction if the previous run ended by given exception. Retry count and delays can be also specified. """ if count < 0 or delay < 0: raise ValueError('Count an...
tmuelle2/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/systemhost_mock.py
129
# 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, ...
foursquare/pants
refs/heads/master
src/python/pants/util/filtering.py
2
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import operator _identity = lambda x: x def _extract_modifier(modified_param): if m...
e-gob/plataforma-kioscos-autoatencion
refs/heads/master
scripts/ansible-play/.venv/lib/python2.7/site-packages/ansible/parsing/yaml/loader.py
191
# (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...
TE-ToshiakiTanaka/stve
refs/heads/master
project/grace/script/expedition.py
1
import os import sys import time from grace.utility import * from grace.utility import LOG as L from grace.script import testcase_normal class TestCase(testcase_normal.TestCase): def __init__(self, *args, **kwargs): super(TestCase, self).__init__(*args, **kwargs) @classmethod def setUpClass(cls):...
wangcy6/storm_app
refs/heads/master
frame/c++/grpc-master/src/python/grpcio_testing/grpc_testing/_channel/_channel_rpc.py
10
# Copyright 2017 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
adelton/django
refs/heads/master
tests/model_permalink/tests.py
381
from django.test import SimpleTestCase, override_settings from .models import Guitarist @override_settings(ROOT_URLCONF='model_permalink.urls') class PermalinkTests(SimpleTestCase): def test_permalink(self): g = Guitarist(name='Adrien Moignard', slug='adrienmoignard') self.assertEqual(g.url(), '...
h3biomed/ansible
refs/heads/h3
lib/ansible/modules/network/cloudengine/ce_ip_interface.py
37
#!/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 distribut...
Novasoft-India/OperERP-AM-Motors
refs/heads/master
openerp/addons/crm/crm_segmentation.py
56
# -*- 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...
LathamZ/ECCorrect
refs/heads/master
eccorrect/main.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- import chardet import sys import os sys.path.insert(0, '..') from eccorrect import shell, data def main(): cmds = shell.getShellCommands() # Check settings shell.checkSettings() # get filepath filepath = cmds['filepath'] content = data.Data(fil...
liyun074/gooDay
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/__init__.py
1524
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import copy import gyp.input import optparse import os.path import re import shlex import sys import traceback from gyp.common import GypErr...
fitermay/intellij-community
refs/heads/master
python/testData/refactoring/move/conditionalImportFromPackage/before/src/pkg1/mod2.py
12133432
dianchen96/gym
refs/heads/master
envs/algorithmic/tests/__init__.py
12133432
jasongwq/MySite
refs/heads/master
mysite/learn/migrations/__init__.py
12133432
Anonymouslemming/ansible
refs/heads/devel
lib/ansible/modules/network/asa/__init__.py
12133432
ahmed-mahran/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/initial_sql_regress/__init__.py
12133432
youssef-emad/shogun
refs/heads/develop
examples/undocumented/python_static/tools/__init__.py
12133432
junhe/chopper
refs/heads/master
src/mkloopdev.py
1
# Chopper is a diagnostic tool that explores file systems for unexpected # behaviors. For more details, see paper Reducing File System Tail # Latencies With Chopper (http://research.cs.wisc.edu/adsl/Publications/). # # Please send bug reports and questions to jhe@cs.wisc.edu. # # Written by Jun He at University of Wis...
kenshay/ImageScript
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/zmq/backend/cffi/utils.py
10
# coding: utf-8 """miscellaneous zmq_utils wrapping""" # Copyright (C) PyZMQ Developers # Distributed under the terms of the Modified BSD License. from errno import EINTR from ._cffi import ffi, C from zmq.error import ZMQError, InterruptedSystemCall, _check_rc, _check_version from zmq.utils.strtypes import unicode...
lovasb/django-ajaxtables
refs/heads/master
example_project/table/views.py
2
import json from django.http import HttpResponse from django.shortcuts import render_to_response from django.template.context import RequestContext from table.models import State from django.core.paginator import Paginator, EmptyPage from table.forms import FilterForm from ajaxtables.utils import render_table_parts, re...
fpy171/django
refs/heads/master
tests/view_tests/tests/test_defaults.py
286
from __future__ import unicode_literals import datetime from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.test import TestCase from django.test.utils import override_settings from ..models import Article, Author, UrlArticle @override_settings(ROOT_URLCONF='view_te...
Applied-GeoSolutions/gips
refs/heads/dev
gips/test/sys/expected/std_fetch.py
1
import collections from . import sentinel1_fetch from .. import util mark_spec = { 'sentinel1': util.slow } expectations = collections.OrderedDict([ ('merra', [('merra/tiles/h01v01/2015135/MERRA2_400.tavg1_2d_flx_Nx.20150515.nc4', 'hash', 'sha256', '63ede97fb6bbca62b0c2266866196d52e1a2bb887900c9dcd...
marshall/titanium
refs/heads/master
build/titanium_developer.py
1
# quick script to automate build/run of titanium developer import os, sys, platform, shutil, distutils.dir_util as dir_util import titanium_version cwd = os.path.dirname(os.path.abspath(__file__)) os_map = { 'Windows': 'win32', 'Darwin': 'osx', 'Linux': 'linux' } os_name = os_map[platform.system()] developer_path = os...
photoninger/ansible
refs/heads/devel
lib/ansible/utils/module_docs_fragments/avi.py
16
# # Created on December 12, 2016 # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Avi Version: 16.3.4 # # # 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...
MalloyPower/parsing-python
refs/heads/master
front-end/testsuite-python-lib/Python-2.7/Lib/email/mime/text.py
467
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Class representing text/* type MIME documents.""" __all__ = ['MIMEText'] from email.encoders import encode_7or8bit from email.mime.nonmultipart import MIMENonMultipart class MIMEText(MIMENonMultipart): ...
igemsoftware/SYSU-Software2013
refs/heads/master
project/Python27/Lib/idlelib/AutoCompleteWindow.py
81
""" An auto-completion window for IDLE, used by the AutoComplete extension """ from Tkinter import * from idlelib.MultiCall import MC_SHIFT from idlelib.AutoComplete import COMPLETE_FILES, COMPLETE_ATTRIBUTES HIDE_VIRTUAL_EVENT_NAME = "<<autocompletewindow-hide>>" HIDE_SEQUENCES = ("<FocusOut>", "<ButtonPress>") KEYPR...
dhalleine/tensorflow
refs/heads/master
tensorflow/contrib/distributions/python/ops/mvn.py
1
# 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...
korealerts1/sentry
refs/heads/master
src/sentry/migrations/0065_create_default_project_key.py
36
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): from sentry.models import ProjectKey for project in orm['sentry.Project'].objects.all(): if orm['sen...
kaplun/ops
refs/heads/prod
modules/bibedit/lib/ticket_templates/sample_ticket.py
6
""" Returns template subject and content for: a sample ticket """ def get_template_data(record): queue = "Test" subject = "Test ticket" content = "This is a test ticket." return (queue, subject, content)
mattcongy/itshop
refs/heads/master
docker-images/taigav2/taiga-back/taiga/projects/userstories/utils.py
2
# -*- coding: utf-8 -*- # Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # Copyright (C) 2014-2016 Anler Hernández ...
yanatan16/kubernetes
refs/heads/master
examples/cluster-dns/images/backend/server.py
468
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 # # Unle...
thresholdsoftware/asylum-v2.0
refs/heads/master
openerp/addons/mrp_operations/report/mrp_code_barcode.py
53
# -*- 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...
TangXT/edx-platform
refs/heads/master
common/djangoapps/terrain/stubs/video_source.py
39
""" Serve HTML5 video sources for acceptance tests """ from SimpleHTTPServer import SimpleHTTPRequestHandler from .http import StubHttpService from contextlib import contextmanager import os from logging import getLogger LOGGER = getLogger(__name__) class VideoSourceRequestHandler(SimpleHTTPRequestHandler): """ ...