repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
stianrh/askbot-nordic
refs/heads/master
askbot/utils/url_utils.py
1
import os import urlparse from django.core.urlresolvers import reverse from django.conf import settings try: from django.conf.urls import url except ImportError: from django.conf.urls.defaults import url def service_url(*args, **kwargs): """adds the service prefix to the url""" pattern = args[0] if...
ehashman/oh-mainline
refs/heads/master
vendor/packages/Django/django/contrib/auth/views.py
78
try: from urllib.parse import urlparse, urlunparse except ImportError: # Python 2 from urlparse import urlparse, urlunparse from django.conf import settings from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect, QueryDict from django.template.response import TemplateResp...
supernovaf117/kaggle-click
refs/heads/master
pylearn2/script/clickdata.py
1
""" .. todo:: WRITEME """ import functools from pylearn2.datasets.dataset import Dataset from pylearn2.utils import wraps import logging import numpy import warnings import cPickle # data are in pytables try: import tables except ImportError: warnings.warn("data are in pytables") try: import scipy.spa...
miguelpalacio/python-for-android
refs/heads/master
python3-alpha/python-libs/gdata/acl/data.py
98
#!/usr/bin/python # # Copyright (C) 2009 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 ...
georgesk/webvtt-editor
refs/heads/master
video/apps.py
4
from django.apps import AppConfig class VideoConfig(AppConfig): name = 'video'
cranes-bill/cedit
refs/heads/master
plugins/snippets/snippets/Exporter.py
3
import os import tempfile import sys import shutil from snippets.Library import * import xml.etree.ElementTree as et from Helper import * class Exporter: def __init__(self, filename, snippets): self.filename = filename self.set_snippets(snippets) def set_snippets(self,...
Elchi3/kuma
refs/heads/master
kuma/payments/apps.py
2
from django.apps import AppConfig class PaymentsConfig(AppConfig): name = "kuma.payments"
ASCrookes/django
refs/heads/master
tests/utils_tests/test_crypto.py
447
from __future__ import unicode_literals import binascii import hashlib import unittest from django.utils.crypto import constant_time_compare, pbkdf2 class TestUtilsCryptoMisc(unittest.TestCase): def test_constant_time_compare(self): # It's hard to test for constant time, just test the result. s...
gauravbose/digital-menu
refs/heads/master
django/conf/project_template/manage.py
1070
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
smartdata-x/robots
refs/heads/master
pylib/Twisted/twisted/internet/_sslverify.py
23
# -*- test-case-name: twisted.test.test_sslverify -*- # Copyright (c) 2005 Divmod, Inc. # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from __future__ import division, absolute_import import itertools import warnings from hashlib import md5 from OpenSSL import SSL, crypto, version try: ...
Rakankou/transmute
refs/heads/master
transmute/Parsing/Parsable.py
1
## # @file transmute/Parsing/Parsable.py # @brief Contains base classes representing parsable elements # from abc import ABCMeta, abstractmethod ## # @brief All of the items exported by this module __all__ = ["Parsable"] ## # @name Parsable # @brief The Interface to which all Parsables must conform. # class Parsable(...
jeremiah-c-leary/vhdl-style-guide
refs/heads/master
vsg/rules/if_statement/rule_010.py
1
from vsg.rules import remove_excessive_blank_lines_above_line_starting_with_token from vsg import token lTokens = [] lTokens.append(token.if_statement.else_keyword) lOverrides = [] lOverrides.append(token.case_statement.semicolon) class rule_010(remove_excessive_blank_lines_above_line_starting_with_token): ''...
advancedtelematic/rvi_core
refs/heads/master
python/jsonrpclib/SimpleJSONRPCServer.py
8
import jsonrpclib from jsonrpclib import Fault from jsonrpclib.jsonrpc import USE_UNIX_SOCKETS import SimpleXMLRPCServer import SocketServer import socket import logging import os import types import traceback import sys try: import fcntl except ImportError: # For Windows fcntl = None def get_version(reque...
ambikeshwar1991/gnuradio-3.7.4
refs/heads/master
gr-blocks/python/blocks/qa_keep_m_in_n.py
57
#!/usr/bin/env python # # Copyright 2008,2010,2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at ...
vnsofthe/odoo-dev
refs/heads/master
addons/school/wizard/assign_roll_no.py
2
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2011-2012 Serpent Consulting Services (<http://www.serpentcs.com>) # # This program is f...
UWNetworksLab/metasync
refs/heads/master
metasync/tailer/__init__.py
1
import re import time class Tailer(object): """\ Implements tailing and heading functionality like GNU tail and head commands. """ line_terminators = ('\r\n', '\n', '\r') def __init__(self, file, read_size=1024, end=False): self.read_size = read_size self.file = file se...
freewilll/abridger
refs/heads/master
test/unit/test_abridge_db_for_sqlite.py
1
from sqlite3 import OperationalError from tempfile import NamedTemporaryFile import os import pytest import subprocess from abridger.abridge_db import main from abridger.database.sqlite import SqliteDatabase from test.abridge_db_test_utils import TestAbridgeDbBase class TestAbridgeDbForSqlite(TestAbridgeDbBase): ...
StefanRijnhart/odoo
refs/heads/master
addons/stock/stock.py
1
# -*- 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...
dagwieers/ansible
refs/heads/devel
lib/ansible/modules/network/junos/junos_lldp_interface.py
29
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, 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', ...
fariias/icanfinance
refs/heads/master
backend/test/base.py
3
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import testloader testloader.path_setup() from config.template_middleware import TemplateResponse import json import unittest from google.appengine.ext import testbed from google.appengine.api import files import webapp2 from webapp2_extra...
gxx/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/tests/regressiontests/templates/custom.py
39
from unittest import TestCase from django import template class CustomTests(TestCase): def test_filter(self): t = template.Template("{% load custom %}{{ string|trim:5 }}") self.assertEqual( t.render(template.Context({"string": "abcdefghijklmnopqrstuvwxyz"})), u"abcde" ...
huangzonghao/YouCompleteMe
refs/heads/master
python/ycm/client/event_notification.py
42
#!/usr/bin/env python # # Copyright (C) 2013 Google Inc. # # This file is part of YouCompleteMe. # # YouCompleteMe 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 you...
ahmedaljazzar/edx-platform
refs/heads/master
lms/djangoapps/teams/plugins.py
24
""" Definition of the course team feature. """ from django.utils.translation import ugettext_noop from courseware.tabs import EnrolledTab from . import is_feature_enabled class TeamsTab(EnrolledTab): """ The representation of the course teams view type. """ type = "teams" title = ugettext_noop(...
dasdachs/flask-blog
refs/heads/master
backend/app/robots/__init__.py
1
""" We added a separated Blueprint for created robots.txt, humans.txt and sitemap.xml into It is recommended that Flask does not serve static filed in production. You would normally leave that to Ngnix or Apache, but for certain deployments, e.g. Heroku, you do not have that access. Therefore we registered a separate B...
DerThorsten/seglib
refs/heads/master
seglibpython/seglib/histogram/__init__.py
1
from _histogram import * import numpy import vigra from scipy.ndimage.filters import gaussian_filter1d as GaussianFilter1d """ def gaussianSmoothing1d(histograms,sigma): nHist = histograms.shape[0] nBins = histograms.shape[1] kernel=vigra.filters.Kernel1D() kernel.initDiscreteGaussian(sigma) smoothedHist...
avanov/django
refs/heads/master
tests/unmanaged_models/models.py
98
""" Models can have a ``managed`` attribute, which specifies whether the SQL code is generated for the table on various manage.py operations. """ from django.db import models from django.utils.encoding import python_2_unicode_compatible # All of these models are created in the database by Django. @python_2_unicod...
Tejal011089/osmosis_erpnext
refs/heads/develop
erpnext/accounts/report/gross_profit/gross_profit.py
1
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _, scrub from frappe.utils import flt def execute(filters=None): if not filters: filters = {} gross_profit_data = Gr...
payjp/payjp-python
refs/heads/master
payjp/test/helper.py
1
import datetime import json import os import random import re import string import unittest from mock import patch, Mock from six import string_types import payjp NOW = datetime.datetime.now() DUMMY_CARD = { 'number': '4242424242424242', 'exp_month': NOW.month, 'exp_year': NOW.year + 4 } DUMMY_CHARGE ...
tashaband/RYU295
refs/heads/master
ryu/tests/unit/sample/test_sample2.py
14
# vim: tabstop=4 shiftwidth=4 softtabstop=4 import unittest from nose.tools import ok_, eq_ #from ryu.app.simple_switch import SimpleSwitch class TestSample2(unittest.TestCase): def testS2Func1(self): ok_(True) def testS2Func2(self): ok_(True)
dvro/ml
refs/heads/master
examples/artificial_all.py
1
# coding: utf-8 import numpy as np from runner import Runner from mlcin.prototypes.rsp1 import ReductionBySpacePartitioning1 from mlcin.utils.keel import load_dataset from mlcin.utils.graphics import plot_and_save from mlcin.prototypes.rsp2 import ReductionBySpacePartitioning2 from mlcin.prototypes.rsp3 import Reducti...
zzicewind/nova
refs/heads/master
nova/tests/functional/v3/test_extended_volumes.py
3
# Copyright 2012 Nebula, Inc. # Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
jasonkuster/beam
refs/heads/master
sdks/python/apache_beam/version.py
3
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
g-k/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/manifest/manifest.py
144
import json import os from collections import defaultdict from item import item_types, ManualTest, WebdriverSpecTest, Stub, RefTest, TestharnessTest from log import get_logger from sourcefile import SourceFile CURRENT_VERSION = 2 class ManifestError(Exception): pass class ManifestVersionMismatch(ManifestErro...
vxsx/django-cms
refs/heads/develop
cms/migrations/0005_auto_20140924_1039.py
57
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.db.models import F from treebeard.numconv import NumConv STEPLEN = 4 ALPHABET = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' class MP_AddHandler(object): def __init__(self): self.stmts = [] NUM = N...
StrikeForceZero/PJSip-CSharp
refs/heads/master
tests/pjsua/scripts-media-playrec/100_resample_lf_11_16.py
59
# $Id: 100_resample_lf_11_16.py 2052 2008-06-25 18:18:32Z nanang $ # from inc_cfg import * # simple test test_param = TestParam( "Resample (large filter) 11 KHZ to 16 KHZ", [ InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 16000 --play-file wavs/input.11.wav --rec-file wavs/tmp.16.wav") ] )
foss-transportationmodeling/rettina-server
refs/heads/master
flask/local/lib/python2.7/encodings/iso8859_8.py
593
""" Python Character Mapping Codec iso8859_8 generated from 'MAPPINGS/ISO8859/8859-8.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='...
codepython/Diamond
refs/heads/master
src/collectors/mongodb/test/testmongodb.py
26
#!/usr/bin/python # coding=utf-8 ################################################################################ from test import CollectorTestCase from test import get_collector_config from test import unittest from test import run_only from mock import MagicMock from mock import patch from mock import call from di...
fhe-odoo/odoo
refs/heads/8.0
addons/analytic/report/analytic_inverted_balance.py
23
# -*- 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...
dhrone/pydKeg
refs/heads/master
testnotes.py
2
import graphics as g import fonts fp = fonts.size5x8.latin1.fontpkg buf = { } g.message(buf,"12:35 pm",0,0, fp) g.show(buf,0,0,10,100) buf1 = { } buf2 = { } buf3 = { } g.message(buf1,"P\nL\nA\nY",0,0,fp) g.message(buf2,"This\nis\nthe\nmessage",0,0,fp) import graphics as g import fonts import numpy as np import time f...
tszym/ansible
refs/heads/devel
test/units/contrib/inventory/test_vmware_inventory.py
97
import json import os import pickle import unittest import sys from nose.plugins.skip import SkipTest try: from pyVmomi import vim, vmodl except ImportError: raise SkipTest("test_vmware_inventory.py requires the python module 'pyVmomi'") try: from vmware_inventory import VMWareInventory except ImportErro...
doheekim/chuizonetest
refs/heads/master
lib/werkzeug/testsuite/local.py
146
# -*- coding: utf-8 -*- """ werkzeug.testsuite.local ~~~~~~~~~~~~~~~~~~~~~~~~ Local and local proxy tests. :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import time import unittest from threading import Thread from werkzeug.testsuite import WerkzeugTestC...
largelymfs/w2vtools
refs/heads/master
build/scipy/scipy/weave/catalog.py
97
""" Track relationships between compiled extension functions & code fragments catalog keeps track of which compiled(or even standard) functions are related to which code fragments. It also stores these relationships to disk so they are remembered between Python sessions. When a = 1 compi...
meeb/txhttprelay
refs/heads/master
setup.py
1
''' Copyright 2013 Joe Harris 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...
bsmrstu-warriors/Moytri---The-Drone-Aider
refs/heads/master
Lib/site-packages/scipy/stats/tests/test_fit.py
53
# NOTE: contains only one test, _est_cont_fit, that is renamed so that # nose doesn't run it # I put this here for the record and for the case when someone wants to # verify the quality of fit # with current parameters: relatively small sample size, default starting values # Ran 84 tests in 401.797s # ...
vrum/pym2
refs/heads/master
4.x/pymodeleditor/uvanimeditor.py
4
# -*- coding: utf-8 -*- from PyQt4 import QtCore, QtGui from animeditor import AnimEditor import m2 class UVAnimEditor(QtGui.QDialog): def __init__(self): QtGui.QDialog.__init__(self) self.setupUi(self) def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(514, 300) self.buttonBox ...
grimoirelab/GrimoireELK
refs/heads/master
grimoire_elk/enriched/gerrit.py
1
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2019 Bitergia # # 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 ...
louistin/fullstack
refs/heads/master
Python/error_exceptions/raise_20161019.py
1
#!/usr/bin/python # _*_ coding: utf-8 _*_ # 不想处理raise抛出的异常就重新再抛出 try: raise NameError('Hi There') except NameError: print 'An exception flew by!' raise
liorvh/golismero
refs/heads/master
thirdparty_libs/django/core/cache/backends/filebased.py
112
"File-based cache backend" import hashlib import os import shutil import time try: from django.utils.six.moves import cPickle as pickle except ImportError: import pickle from django.core.cache.backends.base import BaseCache from django.utils.encoding import force_bytes class FileBasedCache(BaseCache): de...
bm424/churchmanager
refs/heads/master
forms.py
1
from django import forms from .models import Church class ChurchForm(forms.ModelForm): class Meta: model = Church fields = '__all__' widgets = { 'classification': forms.RadioSelect, }
CapOM/ChromiumGStreamerBackend
refs/heads/master
mandoline/tools/android/install_mandoline.py
15
#!/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. import argparse import logging import os import sys sys.path.insert(0, os.path.join(os.path.abspath(os.path.dirname(__file__)), ...
c0defreak/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/email/mime/nonmultipart.py
335
# Copyright (C) 2002-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Base class for MIME type messages that are not multipart.""" __all__ = ['MIMENonMultipart'] from email import errors from email.mime.base import MIMEBase class MIMENonMultipart(MIMEBase): """Base cl...
mayk93/python_koans
refs/heads/master
python2/koans/about_generators.py
77
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Written in place of AboutBlocks in the Ruby Koans # # Note: Both blocks and generators use a yield keyword, but they behave # a lot differently # from runner.koan import * class AboutGenerators(Koan): def test_generating_values_on_the_fly(self): result ...
vineodd/PIMSim
refs/heads/master
GEM5Simulation/gem5/ext/pybind11/tests/test_virtual_functions.py
8
import pytest from pybind11_tests import virtual_functions as m from pybind11_tests import ConstructorStats def test_override(capture, msg): class ExtendedExampleVirt(m.ExampleVirt): def __init__(self, state): super(ExtendedExampleVirt, self).__init__(state + 1) self.data = "Hello...
robinro/ansible
refs/heads/devel
test/units/modules/network/eos/eos_module.py
6
# (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 dis...
kobiluria/openbudgets
refs/heads/develop
openbudgets/apps/sources/migrations/0001_initial.py
7
# -*- coding: 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 model 'ReferenceSource' db.create_table(u'sources_referencesource', ( (u'id', self.gf('...
mdworks2016/work_development
refs/heads/master
Python/20_Third_Certification/venv/lib/python3.7/site-packages/setuptools/_vendor/packaging/markers.py
22
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import operator import os import platform import sys from setuptools.exte...
hynekcer/django
refs/heads/master
django/conf/locale/de_CH/formats.py
504
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date from __future__ import unicode_literals DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i' DATE...
devendermishrajio/nova_test_latest
refs/heads/master
nova/virt/libvirt/driver.py
4
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # Copyright (c) 2011 Piston Cloud Computing, Inc # Copyright (c) 2012 University Of Minho # (c) Copyright 2013 Hewlett-Pa...
zhouzhenghui/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/test/test_sys_settrace.py
55
# Testing the line trace facility. from test import support import unittest import sys import difflib import gc # A very basic example. If this fails, we're in deep trouble. def basic(): return 1 basic.events = [(0, 'call'), (1, 'line'), (1, 'return')] # Many of the tests below ...
achals/servo
refs/heads/master
components/script/dom/bindings/codegen/parser/tests/test_prototype_ident.py
142
def WebIDLTest(parser, harness): threw = False try: parser.parse(""" interface TestIface { static attribute boolean prototype; }; """) results = parser.finish() except: threw = True harness.ok(threw, "The identifier of a static attri...
kiwicopple/MyMDb
refs/heads/master
venv/build/sphinx/tests/root/autodoc_fodder.py
23
class MarkupError(object): """ .. note:: This is a docstring with a small markup error which should have correct location information. """
EchO-KID/google-breakpad
refs/heads/master
src/testing/test/gmock_output_test.py
986
#!/usr/bin/env python # # Copyright 2008, 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...
allotria/intellij-community
refs/heads/master
python/testData/codeInsight/controlflow/break.py
83
while foo: if condition: break print "Hello"
mdeletto/STAT-GPS
refs/heads/master
Annotation_Pipeline.py
2
#!/usr/bin/python import optparse, sys, os, re from statgps_pipeline_variables import * #------------------------------------------------------------------------------------------- #----------------------------Command line parser and arguments------------------------------ #-------------------------------------------...
brazenanimation/open-gto
refs/heads/master
python/gtoContainer/gtoContainer.py
4
# # Copyright (C) 2004 Tweak Films # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # This library is distribu...
bebby520/essay_devel
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/sbcharsetprober.py
2926
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
derekhiggins/packstack
refs/heads/master
tests/installer/test_drones.py
22
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013, Red Hat, 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/LI...
w1ll1am23/home-assistant
refs/heads/dev
tests/components/atag/test_climate.py
5
"""Tests for the Atag climate platform.""" from unittest.mock import PropertyMock, patch from homeassistant.components.atag.climate import CLIMATE, DOMAIN, PRESET_MAP from homeassistant.components.climate import ( ATTR_HVAC_ACTION, ATTR_HVAC_MODE, ATTR_PRESET_MODE, HVAC_MODE_HEAT, SERVICE_SET_HVAC_...
yoer/hue
refs/heads/master
desktop/core/ext-py/pyopenssl/OpenSSL/test/util.py
84
# Copyright (C) Jean-Paul Calderone # Copyright (C) Twisted Matrix Laboratories. # See LICENSE for details. """ Helpers for the OpenSSL test suite, largely copied from U{Twisted<http://twistedmatrix.com/>}. """ import shutil import os, os.path from tempfile import mktemp from unittest import TestCase import sys from...
mahabuber/erpnext
refs/heads/develop
erpnext/accounts/doctype/payment_gateway/payment_gateway.py
37
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class PaymentGateway(Document): pass
resmo/ansible
refs/heads/devel
lib/ansible/modules/cloud/google/gcp_resourcemanager_project.py
7
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
Lekanich/intellij-community
refs/heads/master
python/testData/blockEvaluator/some_package/module_in_package.py
80
__author__ = 'Ilya.Kazakevich' VARIABLE_IN_PACKAGE_MODULE = "foo"
yida-lxw/solr-5.3.1
refs/heads/master
eclipse-build/main/org/apache/lucene/analysis/charfilter/htmlentity.py
7
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
xiaohaidao007/pandoraBox-SDK-mt7620
refs/heads/master
staging_dir/host/lib/scons-2.5.0/SCons/dblite.py
6
# dblite.py module contributed by Ralf W. Grosse-Kunstleve. # Extended for Unicode by Steven Knight. import SCons.compat import os # compat layer imports "cPickle" for us if it's available. import pickle import shutil import time keep_all_files = 00000 ignore_corrupt_dbfiles = 0 def corruption_warning(filename): ...
yencarnacion/jaikuengine
refs/heads/master
.google_appengine/lib/django-1.4/tests/regressiontests/servers/models.py
623
from django.db import models class Person(models.Model): name = models.CharField(max_length=256)
openstack/octavia
refs/heads/master
octavia/compute/drivers/noop_driver/__init__.py
191
# 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...
aranjan7/contrail-controller-aranjan
refs/heads/master
src/opserver/log.py
3
#!/usr/bin/python # # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # # # log # # Query log messages from analytics # import sys import argparse import json import datetime from opserver.opserver_util import OpServerUtils from sandesh_common.vns.ttypes import Module from sandesh_common.vns.constants...
jfdsmabalot/kernel_hammerhead
refs/heads/master
tools/perf/scripts/python/net_dropmonitor.py
1258
# Monitor the system for dropped packets and proudce a report of drop locations and counts import os import sys sys.path.append(os.environ['PERF_EXEC_PATH'] + \ '/scripts/python/Perf-Trace-Util/lib/Perf/Trace') from perf_trace_context import * from Core import * from Util import * drop_log = {} kallsyms = [] def...
rgom/Pydev
refs/heads/development
plugins/org.python.pydev.refactoring/tests/python/adapter/module/testModuleClassAlias.py
8
import bla as bla_alias from bla.bar import hullu as foo from bla import bar as myfoofile from bla.sub.foo import foohullu as foohullu_alias class bar(foo): hullu = "hullu" class nested: mybar = "123" class foobar(myfoofile.hullu): pass ##c <config> <resolveNames> <strin...
zhuhangyu/jumpserver
refs/heads/master
juser/views.py
12
# coding: utf-8 # Author: Guanghongwei # Email: ibuler@qq.com import random from Crypto.PublicKey import RSA import crypt from django.shortcuts import render_to_response from django.db.models import Q from django.template import RequestContext from jumpserver.api import * def gen_rand_pwd(num): """生成随机密码""" ...
theirc/ServiceInfo
refs/heads/develop
service_info_cms/management/commands/change_cms_site.py
1
from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django.contrib.sites.models import Site from service_info_cms.utils import change_cms_site class Command(BaseCommand): """ Similar: cms/management/commands/subcommands/copy_site.py """ help = 'Move the C...
thruflo/pyramid_basemodel
refs/heads/master
src/pyramid_basemodel/interfaces.py
2
# -*- coding: utf-8 -*- """Marker interfaces for models and containers.""" __all__ = [ 'IDeclarativeBase', 'IModel', 'IModelContainer', ] from zope.interface import Attribute from zope.interface import Interface class IDeclarativeBase(Interface): """Implemented by the declarative base and all classe...
chen0510566/MissionPlanner
refs/heads/master
Lib/site-packages/numpy/distutils/command/build.py
99
import os import sys from distutils.command.build import build as old_build from distutils.util import get_platform from numpy.distutils.command.config_compiler import show_fortran_compilers class build(old_build): sub_commands = [('config_cc', lambda *args: True), ('config_fc', lambda...
xHeliotrope/injustice_dropper
refs/heads/master
setup.py
1
setup( name='injustice', version='0.1.0', install_requires=[], packages=['injustice'], package_dir={'injustice': 'src/injustice'} )
trigrass2/rt-thread
refs/heads/master
bsp/lpc2478/rtconfig.py
35
import os # toolchains options ARCH='arm' CPU='lpc24xx' CROSS_TOOL='keil' if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin' elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = 'C:/Keil' e...
vladmm/intellij-community
refs/heads/master
plugins/hg4idea/testData/bin/mercurial/patch.py
90
# patch.py - patch file parsing routines # # Copyright 2006 Brendan Cully <brendan@kublai.com> # Copyright 2007 Chris Mason <chris.mason@oracle.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. import cStringIO, email.Parser, o...
facebookexperimental/eden
refs/heads/master
eden/scm/tests/test-restack-old-stack-t.py
2
# Copyright (c) Facebook, Inc. and its affiliates. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2. from __future__ import absolute_import from testutil.dott import feature, sh, testtmp # noqa: F401 # Using modern setup sh % "enable remotenames am...
meyt/mehrcal
refs/heads/master
mehrcal/khayyam/compat.py
2
# -*- coding: utf-8 -*- __author__ = 'vahid' import sys if sys.version_info.major == 3: def get_unicode(s): return str(s) elif sys.version_info.major == 2: def get_unicode(s): return unicode(s) else: raise Exception('invalid interpreter: %s' % sys.version_info)
personalunion/glimpse_client-1
refs/heads/develop
3rdparty/breakpad/src/third_party/protobuf/protobuf/gtest/scripts/fuse_gtest_files.py
314
#!/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...
rickerc/nova_audit
refs/heads/cis-havana-staging
nova/console/vmrc_manager.py
12
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 Citrix Systems, Inc. # Copyright 2011 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 # # ...
wolverineav/horizon
refs/heads/master
openstack_dashboard/dashboards/project/volumes/cgroups/workflows.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 # d...
GitHublong/hue
refs/heads/master
desktop/core/ext-py/lxml/src/lxml/html/tests/test_autolink.py
48
import unittest, sys from lxml.tests.common_imports import make_doctest def test_suite(): suite = unittest.TestSuite() if sys.version_info >= (2,4): suite.addTests([make_doctest('test_autolink.txt')]) return suite if __name__ == '__main__': unittest.main()
dhruve/spark
refs/heads/master
examples/src/main/python/ml/tf_idf_example.py
123
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
tbabej/freeipa
refs/heads/master
ipatests/data.py
9
# Authors: # Jason Gerard DeRose <jderose@redhat.com> # # Copyright (C) 2008 Red Hat # see file 'COPYING' for use and warranty information # # 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, ei...
mdanielwork/intellij-community
refs/heads/master
python/testData/intentions/PyAnnotateVariableTypeIntentionTest/typeCommentLocalSimpleAssignmentTargetWithExistingComment_after.py
19
def func(): var = 'foo' # type: [str] # comment var
The-Compiler/qutebrowser
refs/heads/master
qutebrowser/keyinput/eventfilter.py
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
windedge/odoo
refs/heads/8.0
openerp/addons/base/module/wizard/base_update_translations.py
447
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
hculpan/wallst-python
refs/heads/master
new_game.py
1
__author__ = 'usucuha' import sys, \ os, \ game, \ company, \ json def jdefault(o): return o.__dict__ def writeToJson(game_obj, game_name, file_name): with open('./' + game_name + '/' + file_name + '.json', 'w') as outfile: obj = json.dumps(game_obj, default=jdefault) ...
silviacanessa/oq-hazardlib
refs/heads/master
openquake/hazardlib/gsim/boore_atkinson_2011.py
4
# The Hazard Library # Copyright (C) 2014, GEM Foundation # # 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. # # T...
jounex/hue
refs/heads/master
desktop/core/ext-py/PyYAML-3.09/lib/yaml/__init__.py
112
from error import * from tokens import * from events import * from nodes import * from loader import * from dumper import * __version__ = '3.09' try: from cyaml import * __with_libyaml__ = True except ImportError: __with_libyaml__ = False def scan(stream, Loader=Loader): """ Scan a YAML stream...