repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
stinos/micropython | refs/heads/master | tests/basics/equal_class.py | 115 | # test equality for classes/instances to other types
class A:
pass
class B:
pass
class C(A):
pass
print(A == None)
print(None == A)
print(A == A)
print(A() == A)
print(A() == A())
print(A == B)
print(A() == B)
print(A() == B())
print(A == C)
print(A() == C)
print(A() == C())
|
richpolis/siveinpy | refs/heads/master | env/lib/python2.7/site-packages/django/conf/locale/nb/formats.py | 118 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. F Y'
TIME_FORMAT = 'H:i'
DATET... |
EnviroCentre/jython-upgrade | refs/heads/develop | jython/lib/test/test_pickle.py | 85 | import pickle
from cStringIO import StringIO
from test import test_support
from test.pickletester import (AbstractPickleTests,
AbstractPickleModuleTests,
AbstractPersistentPicklerTests,
AbstractPicklerUnpicklerObjectTests,
... |
frainfreeze/studying | refs/heads/master | home/python/microblog/venv/lib/python3.5/site-packages/wheel/bdist_wheel.py | 4 | """
Create a wheel (.whl) distribution.
A wheel is a built archive format.
"""
import os
import shutil
import sys
import re
from email.generator import Generator
from distutils.core import Command
from distutils.sysconfig import get_python_version
from distutils import log as logger
from glob import iglob
from shutil... |
tplavcic/percona-xtradb-cluster | refs/heads/5.6 | mysql-test/suite/tokudb/t/change_column_multiple_columns.py | 39 | import sys
import itertools
cols = [ 'a', 'b', 'c', 'd', 'e' ]
old_types = [ 'VARCHAR(1)', 'VARBINARY(1)', 'INT', 'CHAR(1)', 'BINARY(1)' ]
new_types = [ 'VARCHAR(2)', 'VARBINARY(2)', 'BIGINT', 'CHAR(2)', 'BINARY(2)' ]
def main():
print "source include/have_tokudb.inc;"
print "# this test generated by change_m... |
ieguinoa/tools-iuc | refs/heads/master | tools/circos/stack-histogram.py | 15 | #!/usr/bin/env python
import logging
import sys
import pyBigWig
logging.basicConfig(level=logging.INFO)
log = logging.getLogger()
if __name__ == "__main__":
files = sys.argv[1:]
bws = [pyBigWig.open(x) for x in files]
# obtain some chroms. Hope all sets are identical!
k = bws[0].chroms().keys()
... |
flipjack/django | refs/heads/master | oscar/core/customisation.py | 23 | from __future__ import absolute_import
import os
from os.path import join, exists
import shutil
import logging
import textwrap
import oscar
def create_local_app_folder(local_app_path):
if exists(local_app_path):
raise ValueError(
"There is already a '%s' folder! Aborting!" % local_app_path)
... |
apache/incubator-airflow | refs/heads/master | tests/providers/salesforce/sensors/__init__.py | 4185 | # 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... |
styx0x6/gremlins | refs/heads/master | lib/thirdparty/paramiko/agent.py | 8 | # Copyright (C) 2003-2007 John Rochester <john@jrochester.org>
#
# This file is part of paramiko.
#
# Paramiko 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.1 of the License, or (at ... |
Owersun/xbmc | refs/heads/Krypton | lib/libUPnP/Platinum/Build/Tools/Scripts/GenDocumentation.py | 263 | #! /usr/bin/python
#############################################################
# This tool is used to generate the Platinum documentation #
#############################################################
import os
import sys
import subprocess
import shutil
import zipfile
import tarfile
#############################... |
kater169/libcloud | refs/heads/trunk | libcloud/test/common/test_cloudstack.py | 45 | # 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 ... |
tgrochow/avango | refs/heads/master | examples/touch_example/main.py | 2 | #!/usr/bin/python
import math
import avango
import avango.script
from avango.script import field_has_changed
import avango.gua
import modules.voronoi_helpers
import scene
from modules.dynamic_splitscreen import *
from modules.gesture_detectors import *
from modules.animation import *
from examples_common.GuaVE import ... |
vadimtk/chrome4sdp | refs/heads/master | tools/perf/page_sets/page_cycler/dom.py | 13 | # 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 import story
class DomPage(page_module.Page):
def __init__(self, url, page_set):
super(... |
rafaelgarrafiel/flask-angularjs | refs/heads/master | project/__init__.py | 1 | #################
#### imports ####
#################
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
import os
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from flask.ext.security import Security, SQLAlchemyUserDatastore, \
UserMixin, RoleMixin, login_required
# fr... |
TheTypoMaster/chromium-crosswalk | refs/heads/master | android_webview/tools/apk_merger.py | 21 | #!/usr/bin/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.
""" Merges a 64-bit and a 32-bit APK into a single APK
"""
import os
import sys
import shutil
import zipfile
import filecmp
import tempfi... |
jscn/django | refs/heads/master | tests/serializers/models/base.py | 112 | """
Serialization
``django.core.serializers`` provides interfaces to converting Django
``QuerySet`` objects to and from "flat" data (i.e. strings).
"""
from __future__ import unicode_literals
from decimal import Decimal
from django.db import models
from django.utils import six
from django.utils.encoding import pytho... |
wuhengzhi/chromium-crosswalk | refs/heads/master | third_party/WebKit/Source/build/scripts/make_private_script_source.py | 59 | # 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.
"""Convert PrivateScript's sources to C++ constant strings.
FIXME: We don't want to add more build scripts. Rewrite this script in grit. crbug.com/388121
Us... |
gdyuldin/huawei_u8850_kernel_ics | refs/heads/master | tools/perf/scripts/python/check-perf-trace.py | 948 | # perf trace event handlers, generated by perf trace -g python
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# This script tests basic functionality such as flag and symbol
# strings, common_xxx() calls back into perf, begin, end, unhandled
# events, etc. Ba... |
tylerwhall/CECS-525-QEMU | refs/heads/master | scripts/ordereddict.py | 1047 | # Copyright (c) 2009 Raymond Hettinger
#
# 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,... |
912/M-new | refs/heads/master | virtualenvironment/experimental/lib/python2.7/site-packages/pip/cmdoptions.py | 361 | """
shared options and groups
The principle here is to define options once, but *not* instantiate them globally.
One reason being that options with action='append' can carry state between parses.
pip parse's general options twice internally, and shouldn't pass on state.
To be consistent, all options will follow this d... |
megaumi/django | refs/heads/master | tests/builtin_server/tests.py | 368 | from __future__ import unicode_literals
import sys
import traceback
from io import BytesIO
from unittest import TestCase
from wsgiref import simple_server
# If data is too large, socket will choke, so write chunks no larger than 32MB
# at a time. The rationale behind the 32MB can be found on Django's Trac:
# https://... |
dongjoon-hyun/tensorflow | refs/heads/master | tensorflow/python/ops/linalg/linear_operator_low_rank_update.py | 4 | # 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... |
cgar/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/html5lib/html5lib/tests/test_parser2.py | 451 | from __future__ import absolute_import, division, unicode_literals
import io
from . import support # flake8: noqa
from html5lib import html5parser
from html5lib.constants import namespaces
from html5lib import treebuilders
import unittest
# tests that aren't autogenerated from text files
class MoreParserTests(un... |
marcuskelly/recover | refs/heads/master | Lib/site-packages/sqlalchemy/testing/replay_fixture.py | 156 | from . import fixtures
from . import profiling
from .. import util
import types
from collections import deque
import contextlib
from . import config
from sqlalchemy import MetaData
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
class ReplayFixtureTest(fixtures.TestBase):
@contextlib.cont... |
amyvmiwei/kbengine | refs/heads/master | kbe/src/lib/python/Lib/test/test_fractions.py | 84 | """Tests for Lib/fractions.py."""
from decimal import Decimal
from test.support import run_unittest, requires_IEEE_754
import math
import numbers
import operator
import fractions
import sys
import unittest
from copy import copy, deepcopy
from pickle import dumps, loads
F = fractions.Fraction
gcd = fractions.gcd
class... |
francisl/vcms | refs/heads/master | modules/vcms/www/managers/page.py | 1 | # -*- coding: UTF-8 -*-
# Application: Vimba - CMS
# Module: www
# Copyright (c) 2010 Vimba inc. All rights reserved.
# Created by Francois Lebel on 30-05-2010.
from django.db import models
from vcms.www.fields import StatusField
from django.conf import settings
from django.http import Http404
from site_language.mode... |
yeasy/lazyctrl | refs/heads/master | lcm/openvswitch-lc/tests/MockXenAPI.py | 6 | # Copyright (c) 2011, 2012 Nicira, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... |
andhit-r/odoo-saas-tools | refs/heads/8.0 | oauth_provider/controllers/__init__.py | 7372 | import main
|
itplanes/firefly-proxy | refs/heads/master | lib/ipc.py | 5 | import sys
import threading
from multiprocessing import Queue, Pipe, Process
if sys.platform == 'win32':
from multiprocessing.reduction import reduce_pipe_connection as reduce_connection
from multiprocessing.reduction import rebuild_pipe_connection as rebuild_connection
else:
from multiprocessing.reduction... |
agry/NGECore2 | refs/heads/master | scripts/static_spawns/corellia/bela_vistal.py | 2 |
import sys
from resources.datatables import Options
from resources.datatables import StateStatus
def addPlanetSpawns(core, planet):
stcSvc = core.staticService
objSvc = core.objectService
#junkdealer
stcSvc.spawnObject('junkdealer', 'corellia', long(0), float(6840), float(315), float(-5630), float(0.707), fl... |
akretion/odoo | refs/heads/12-patch-paging-100-in-o2m | addons/l10n_nl/migrations/9.0.2.0/post-migrate_tags_on_taxes.py | 832 | # -*- coding: utf-8 -*-
import odoo
def migrate(cr, version):
registry = odoo.registry(cr.dbname)
from odoo.addons.account.models.chart_template import migrate_tags_on_taxes
migrate_tags_on_taxes(cr, registry)
|
benthomasson/django-tastypie-swagger | refs/heads/master | tastypie_swagger/__init__.py | 6 | VERSION = (0, 1, 1)
|
Jgarcia-IAS/localizacion | refs/heads/master | openerp/addons-extra/odoo-pruebas/odoo-server/openerp/addons/base/ir/ir_logging.py | 326 | ##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2014 OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Publi... |
ojengwa/oh-mainline | refs/heads/master | vendor/packages/gdata/tests/gdata_tests/youtube/__init__.py | 12133432 | |
saurabh6790/medsyn-app | refs/heads/master | patches/may_2013/__init__.py | 12133432 | |
denisenkom/django | refs/heads/master | tests/staticfiles_tests/apps/__init__.py | 12133432 | |
emidln/django_roa | refs/heads/master | env/lib/python2.7/site-packages/django/conf/locale/km/__init__.py | 12133432 | |
GarySparrow/mFlaskWeb | refs/heads/master | venv/Lib/site-packages/sqlalchemy/testing/plugin/__init__.py | 12133432 | |
epiphany27/NewsBlur | refs/heads/master | apps/social/tests.py | 6666 | """
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 a... |
philrykoff/vertx-web | refs/heads/master | src/test/sockjs-protocol/venv/lib/python2.7/site-packages/unittest2/test/test_skipping.py | 17 | from unittest2.test.support import LoggingResult
import unittest2
import unittest2 as unittest
class Test_TestSkipping(unittest2.TestCase):
def test_skipping(self):
class Foo(unittest2.TestCase):
def test_skip_me(self):
self.skipTest("skip")
events = []
result... |
MajorBiscuit/gr-tutorial | refs/heads/master | gr-tutorial/examples/mpsk_stage6.py | 1 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
##################################################
# GNU Radio Python Flow Graph
# Title: Mpsk Stage6
# Generated: Tue Jun 20 15:21:39 2017
##################################################
if __name__ == '__main__':
import ctypes
import sys
if sys.platform.s... |
gnieboer/tensorflow | refs/heads/master | tensorflow/tools/docs/generate_lib.py | 13 | # Copyright 2015 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... |
frappe/erpnext | refs/heads/develop | erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.py | 2 | # 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 _
from erpnext.controllers.trends import get_columns,get_data
def execute(filters=None):
if not filters: filters ={}
... |
navyjeff/crowdsource-platform | refs/heads/develop2 | crowdsourcing/migrations/0015_auto_20150709_0149.py | 16 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('crowdsourcing', '0014_auto_20150709_0139'),
]
operations = [
migrations.RenameField(
model_name='conversation',
... |
jiangxb1987/spark | refs/heads/master | python/pyspark/version.py | 4 | #!/usr/bin/env python3
#
# 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 "L... |
john-soklaski/CoilSnake | refs/heads/master | coilsnake/model/eb/map_music.py | 5 | from coilsnake.model.common.table import TableEntry, LittleEndianIntegerTableEntry, RowTableEntry
from coilsnake.model.eb.table import EbEventFlagTableEntry
MapMusicSubTableEntry = RowTableEntry.from_schema(
name="Map Music Sub Table Entry",
schema=[EbEventFlagTableEntry,
type("Music", (LittleEndi... |
Yukarumya/Yukarum-Redfoxes | refs/heads/master | testing/mozbase/moztest/moztest/output/__init__.py | 12133432 | |
ovnicraft/edx-platform | refs/heads/master | lms/djangoapps/student_account/test/__init__.py | 12133432 | |
Kazade/NeHe-Website | refs/heads/master | google_appengine/lib/django-1.2/django/conf/locale/ko/__init__.py | 12133432 | |
pymedusa/SickRage | refs/heads/master | ext/cachecontrol/caches/file_cache.py | 36 | import hashlib
import os
from textwrap import dedent
from ..cache import BaseCache
from ..controller import CacheController
try:
FileNotFoundError
except NameError:
# py2.X
FileNotFoundError = (IOError, OSError)
def _secure_open_write(filename, fmode):
# We only want to write to this file, so open i... |
jobiols/management-system | refs/heads/8.0 | mgmtsystem_review_audittrail/__openerp__.py | 5 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under... |
jernsthausen/datesplitter | refs/heads/master | lib/python2.7/_abcoll.py | 4 | /usr/lib/python2.7/_abcoll.py |
kcpawan/django | refs/heads/master | tests/utils_tests/test_regex_helper.py | 448 | from __future__ import unicode_literals
import unittest
from django.utils import regex_helper
class NormalizeTests(unittest.TestCase):
def test_empty(self):
pattern = r""
expected = [('', [])]
result = regex_helper.normalize(pattern)
self.assertEqual(result, expected)
def te... |
caronc/newsreap | refs/heads/master | newsreap/hooks/__init__.py | 12133432 | |
raccoongang/edx-platform | refs/heads/ginkgo-rg | cms/lib/xblock/__init__.py | 12133432 | |
jnerin/ansible | refs/heads/devel | test/units/parsing/__init__.py | 12133432 | |
a-parhom/edx-platform | refs/heads/master | openedx/core/djangoapps/video_pipeline/management/__init__.py | 12133432 | |
elba7r/system | refs/heads/master | erpnext/accounts/doctype/payment_entry/test_payment_entry.py | 15 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
from frappe.utils import flt, nowdate
from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order
from erpnext.accou... |
indykish/servo | refs/heads/master | tests/wpt/css-tests/tools/pywebsocket/src/mod_pywebsocket/headerparserhandler.py | 638 | # Copyright 2011, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... |
ctxis/django-newsletter | refs/heads/master | newsletter/tests/utils.py | 3 | import logging
logger = logging.getLogger(__name__)
from django.core import mail
from django.test import TestCase
from django.contrib.sites.models import Site
from django.template import loader, TemplateDoesNotExist
from django_webtest import WebTest
from ..utils import get_user_model
User = get_user_model()
c... |
ForAP/Advanc3d-Pr0graming | refs/heads/master | A5-Tree/A5-Updated/homescreen.py | 1 | # File name: homescreen.py
import kivy
kivy.require('1.7.0')
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.screenmanager import ScreenManager, Screen
import sys
import turingmachine
#This is the first screen that comes up.
class HomeScreen(Screen):
def endProgram(self):
sys.exit()
def newTM(s... |
nburn42/tensorflow | refs/heads/master | tensorflow/python/lib/core/bfloat16_test.py | 11 | # Copyright 2015 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... |
friedrich420/S4-AEL-GPE-LOLLIPOP | refs/heads/master | scripts/gcc-wrapper.py | 234 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2011-2012, The Linux Foundation. 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 th... |
hurricup/intellij-community | refs/heads/master | python/testData/intentions/PyAnnotateTypesIntentionTest/caretOnInvocation_after.py | 39 | def foo(x: object, y: object) -> object:
pass
foo(1, 1) |
shmilee/gdpy3 | refs/heads/master | src/visplters/base.py | 1 | # -*- coding: utf-8 -*-
# Copyright (c) 2020 shmilee
'''
Contains visplters base class.
'''
import numpy
from ..glogger import getGLogger
from ..utils import simple_parse_doc
__all__ = ['BaseVisplter']
vlog = getGLogger('V')
def _copydoc_func(docs):
name, doc = docs[0]
assert name == 'BaseVisplter'
r... |
40423219/2016fallcadp_hw | refs/heads/gh-pages | publishconf.py | 251 | #!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
# This file is only used if you use `make publish` or
# explicitly specify it as your config file.
import os
import sys
sys.path.append(os.curdir)
from pelicanconf import *
# 因為 publishconf.py 在 pelicanconf.py 之後, 因此若兩處有相同變數的設定, ... |
3L3N4/LaZagne | refs/heads/master | Windows/src/LaZagne/softwares/windows/dot_net.py | 11 | import struct
from ctypes import *
from ctypes.wintypes import DWORD
import win32cred
from config.constant import *
from config.write_output import print_output, print_debug
from config.header import Header
from config.moduleInfo import ModuleInfo
memcpy = cdll.msvcrt.memcpy
LocalFree = windll.kernel32.Local... |
charbeljc/hr | refs/heads/8.0 | __unported__/hr_payroll_register_report/__init__.py | 22 | # -*- coding:utf-8 -*-
#
#
# Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>.
# All Rights Reserved.
#
# 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, eit... |
StackStorm/st2 | refs/heads/master | pylint_plugins/db_models.py | 3 | # Copyright 2020 The StackStorm Authors.
# Copyright 2019 Extreme Networks, 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 ... |
m-kiuchi/ouimeaux | refs/heads/develop | ouimeaux/signals.py | 3 | from ouimeaux.pysignals import Signal, receiver
# Work around a bug in pysignals when in the interactive interpreter
import sys
_main = sys.modules.get('__main__')
if _main:
_main.__file__ = "__main__.py"
# Fires when a device responds to a broadcast
discovered = Signal(providing_args=["address", "headers"])
#... |
kmad1729/website | refs/heads/master | django/conf/locale/eu/__init__.py | 12133432 | |
MichaelKohler/bedrock | refs/heads/master | tests/pages/firefox/features/__init__.py | 12133432 | |
Juniper/ceilometer | refs/heads/master | ceilometer/tests/__init__.py | 12133432 | |
payamsm/django-allauth | refs/heads/master | allauth/socialaccount/providers/douban/__init__.py | 12133432 | |
pigeonflight/strider-plone | refs/heads/master | docker/appengine/lib/django-1.2/django/conf/locale/is/__init__.py | 12133432 | |
modulix/gwss | refs/heads/master | bin/daemons/__init__.py | 12133432 | |
gauravbose/digital-menu | refs/heads/master | digimenu2/tests/get_earliest_or_latest/__init__.py | 12133432 | |
Sazzadmasud/Keystone_hash_token | refs/heads/master | keystone/common/sql/migrate_repo/versions/004_undo_token_id_hash.py | 4 | # Copyright (c) 2012 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/LICENSE-2.0
#
# Unless required by applicable law or ... |
JshWright/home-assistant | refs/heads/dev | homeassistant/components/light/decora.py | 3 | """
Support for Decora dimmers.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/light.decora/
"""
import logging
import voluptuous as vol
from homeassistant.const import CONF_API_KEY, CONF_DEVICES, CONF_NAME
from homeassistant.components.light import (
... |
yangdw/repo.python | refs/heads/master | src/repo/extension-lib/webpy/scripts/web/test.py | 118 | """test utilities
(part of web.py)
"""
import unittest
import sys, os
import web
TestCase = unittest.TestCase
TestSuite = unittest.TestSuite
def load_modules(names):
return [__import__(name, None, None, "x") for name in names]
def module_suite(module, classnames=None):
"""Makes a suite from a module."""
... |
cneill/barbican | refs/heads/master | barbican/common/validators.py | 1 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed u... |
ahmfrz/Let-s-Catalog | refs/heads/master | Lets_Catalog/infrastructure/decorators.py | 1 | from functools import wraps
from flask import redirect, url_for, session, request, flash
def user_loggedin(function):
'''Decorator to check if user is logged in'''
@wraps(function)
def decorated_function(*args, **kwargs):
if 'username' in session:
return function(*args, **kwargs)
... |
ocwc/ocwc-data | refs/heads/master | search/data/management/commands/vln_female_speakers.py | 1 | # -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand
from optparse import make_option
from pprint import pprint
import json
from data.models import Course, Provider, Source
class Command(BaseCommand):
help = """
Imports VLN database dump
$ bin/django vln_female_speakers --l... |
aleks-sngn/django-shop-categories | refs/heads/master | shop_categories/models/defaults/category/base.py | 1 | from django.db import models
from django.utils.encoding import force_unicode
from mptt.models import MPTTModel
from mptt.fields import TreeForeignKey
class ProductCategoryBase(MPTTModel):
parent = TreeForeignKey('self',
blank=True,
null=True,
... |
JeyZeta/Dangerous | refs/heads/master | Dangerous/Golismero/thirdparty_libs/django/bin/django-admin.py | 1623 | #!/usr/bin/env python
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
|
Weil0ng/gem5 | refs/heads/master | tests/configs/realview-simple-atomic-checkpoint.py | 37 | # Copyright (c) 2015 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 ... |
rohitwaghchaure/alec_frappe5_erpnext | refs/heads/develop | erpnext/stock/doctype/manage_variants_item/manage_variants_item.py | 18 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe 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 ManageVariantsItem(Document):
pass
|
arlolra/stem | refs/heads/master | stem/response/protocolinfo.py | 5 | # Copyright 2012-2013, Damian Johnson
# See LICENSE for licensing information
import stem.response
import stem.socket
import stem.version
from stem.connection import AuthMethod
from stem.util import log
class ProtocolInfoResponse(stem.response.ControlMessage):
"""
Version one PROTOCOLINFO query response.
The... |
spasovski/zamboni | refs/heads/master | mkt/monolith/management/commands/create_monolith_user.py | 7 | from optparse import make_option
from django.conf import settings
from django.core.management.base import BaseCommand
from mkt.site.management.commands.add_test_users import create_user
class Command(BaseCommand):
help = """Create an user with access to the monolith API"""
option_list = BaseCommand.option_... |
ARMmbed/yotta_osx_installer | refs/heads/master | workspace/lib/python2.7/site-packages/pip/_vendor/colorama/ansitowin32.py | 442 | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
import re
import sys
import os
from .ansi import AnsiFore, AnsiBack, AnsiStyle, Style
from .winterm import WinTerm, WinColor, WinStyle
from .win32 import windll
winterm = None
if windll is not None:
winterm = WinTerm()
def is_a_tty(stre... |
eblossom/gnuradio | refs/heads/master | gr-analog/python/analog/qa_fastnoise.py | 57 | #!/usr/bin/env python
#
# Copyright 2007,2010,2012 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 your ... |
pelikanchik/edx-platform | refs/heads/master | lms/djangoapps/shoppingcart/processors/tests/test_CyberSource.py | 35 | """
Tests for the CyberSource processor handler
"""
from collections import OrderedDict
from django.test import TestCase
from django.test.utils import override_settings
from django.conf import settings
from student.tests.factories import UserFactory
from shoppingcart.models import Order, OrderItem
from shoppingcart.pro... |
maestrano/odoo | refs/heads/master | addons/membership/membership.py | 128 | # -*- 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... |
o3project/ryu-oe | refs/heads/master | ryu/services/protocols/bgp/signals/__init__.py | 38 | __author__ = 'yak'
from ryu.services.protocols.bgp.signals.base import SignalBus
__all__ = [SignalBus]
|
garrettcap/Bulletproof-Backup | refs/heads/master | wx/tools/Editra/src/ed_theme.py | 2 | ###############################################################################
# Name: ed_theme.py #
# Purpose: Icon theme management for Editra #
# Author: Cody Precord <cprecord@editra.org> #
... |
uclaros/QGIS | refs/heads/master | tests/src/python/test_qgseditwidgets.py | 23 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for edit widgets.
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
"""
__au... |
Ingenico-ePayments/connect-sdk-python2 | refs/heads/master | tests/unit/test_request_header.py | 2 | import unittest
from ingenico.connect.sdk.request_header import RequestHeader, get_header, get_header_value
class RequestHeaderTest(unittest.TestCase):
def test_get_header_value_none(self):
"""Tests get_header_value using None as headers"""
self.assertIsNone(get_header_value(None, "Content-Lengt... |
mcking49/apache-flask | refs/heads/master | Python/Lib/site-packages/pylint/test/functional/cellvar_escaping_loop.py | 12 | # pylint: disable=print-statement
"""Tests for loopvar-in-closure."""
from __future__ import print_function
def good_case():
"""No problems here."""
lst = []
for i in range(10):
lst.append(i)
def good_case2():
"""No problems here."""
return [i for i in range(10)]
def good_case3():
"... |
xuzhao1211/OnlineExam | refs/heads/master | misago/faker/management/commands/createfakethreads.py | 8 | import random
import time
from faker import Factory
from django.contrib.auth import get_user_model
from django.core.management.base import BaseCommand
from django.db.transaction import atomic
from django.template.defaultfilters import linebreaks_filter
from django.utils import timezone
from misago.core.management.pr... |
tombstone/models | refs/heads/master | research/cvt_text/model/task_module.py | 5 | # Copyright 2018 The TensorFlow Authors All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.