repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
fqc/django_rest_test
refs/heads/master
quickstart/migrations/__init__.py
12133432
ehudmagal/cupboardapp
refs/heads/master
__init__.py
12133432
kochbeck/icsisumm
refs/heads/master
icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk_contrib/wordnet/__init__.py
12133432
ahmetus/coding-the-matrix-docs
refs/heads/master
Code-The-Matrix/homeworks/__init__.py
12133432
mezz64/home-assistant
refs/heads/dev
homeassistant/components/edl21/__init__.py
21
"""The edl21 component."""
dago/check_mk
refs/heads/master
scripts/autodetect.py
2
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
debops/debops
refs/heads/master
debops/__init__.py
2
# -*- coding: utf-8 -*- # Copyright (C) 2014-2015 Hartmut Goebel <h.goebel@crazy-compilers.com> # Copyright (C) 2014-2015 DebOps <https://debops.org/> # SPDX-License-Identifier: GPL-3.0-or-later # This program is free software; you can redistribute # it and/or modify it under the terms of the # GNU General Public Lic...
Hybrid-Cloud/cinder
refs/heads/master
cinder/tests/unit/volume/drivers/test_lvm_driver.py
4
# 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...
jounex/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/contrib/messages/tests/test_mixins.py
113
from django.test.testcases import TestCase from django.contrib.messages.tests.urls import ContactFormViewWithMsg from django.core.urlresolvers import reverse class SuccessMessageMixinTests(TestCase): urls = 'django.contrib.messages.tests.urls' def test_set_messages_success(self): author = {'name': 'Jo...
pechatny/basic-flask-app
refs/heads/master
src/app/flask/lib/python2.7/site-packages/pip/status_codes.py
408
SUCCESS = 0 ERROR = 1 UNKNOWN_ERROR = 2 VIRTUALENV_NOT_FOUND = 3 PREVIOUS_BUILD_DIR_ERROR = 4 NO_MATCHES_FOUND = 23
marcan/deresuteme
refs/heads/master
apiclient.py
1
#!/usr/bin/python # -!- coding: utf-8 -!- # # Copyright 2016 Hector Martin <marcan@marcan.st> # # 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....
g-vidal/upm
refs/heads/master
examples/python/bh1750.py
6
#!/usr/bin/env python # Author: Jon Trulson <jtrulson@ics.com> # Copyright (c) 2016 Intel Corporation. # # 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 # witho...
upliftaero/MissionPlanner
refs/heads/master
Lib/encodings/mac_turkish.py
93
""" Python Character Mapping Codec mac_turkish generated from 'MAPPINGS/VENDORS/APPLE/TURKISH.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 deco...
etuna-SBF-kog/Stadsparken
refs/heads/master
env/lib/python2.7/site-packages/django/contrib/localflavor/ec/__init__.py
12133432
crocodoc/graphite
refs/heads/master
webapp/graphite/metrics/__init__.py
12133432
Starlon/LCDControl
refs/heads/master
jsoncpp/doxybuild.py
44
"""Script to generate doxygen documentation. """ import re import os import os.path import sys import shutil from devtools import tarball def find_program(*filenames): """find a program in folders path_lst, and sets env[var] @param filenames: a list of possible names of the program to search for @return: ...
cihangxie/cleverhans
refs/heads/master
cleverhans/devtools/tests/docscrape.py
2
"""Extract reference documentation from the NumPy source tree. """ from __future__ import print_function import inspect from nose.plugins.skip import SkipTest import re import sys import six class Reader(object): """A line-based string reader. """ def __init__(self, data): """ Param...
saisaizhang/Food
refs/heads/master
flask/lib/python2.7/site-packages/sqlalchemy/util/_collections.py
23
# util/_collections.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Collection classes and helpers.""" from __future__ import absolute_import i...
mantaraya36/xmms2-mantaraya36
refs/heads/master
waftools/pyrexc.py
5
import Task from TaskGen import extension Task.simple_task_type('pyrexc', '${PYREX} ${SRC} -o ${TGT}', color='BLUE', before='cc') @extension('.pyx') def pyrex_file(self, node): gentask = self.create_task('pyrexc') gentask.set_inputs(node) nd = node.change_ext('.c') gentask.set_outputs(nd) self.all...
xuru/pyvisdk
refs/heads/master
pyvisdk/do/vm_being_deployed_event.py
1
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def VmBeingDeployedEvent(vim, *args, **kwargs): '''This event records a virtual machine b...
mdj2/django
refs/heads/master
tests/model_package/models/publication.py
150
from django.db import models class Publication(models.Model): title = models.CharField(max_length=30) class Meta: app_label = 'model_package'
ahb0327/intellij-community
refs/heads/master
python/testData/pyi/resolve/moduleAttribute/ModuleAttribute.py
57
import m1 print(m1.foo) # <ref>
macosforge/ccs-calendarserver
refs/heads/master
twistedcaldav/directory/__init__.py
1
## # Copyright (c) 2006-2017 Apple Inc. 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 applicable l...
wolfskaempf/ga_statistics
refs/heads/master
lib/python2.7/site-packages/django/core/checks/security/__init__.py
12133432
kevintaw/django
refs/heads/master
tests/view_tests/app4/__init__.py
12133432
mvaled/OpenUpgrade
refs/heads/8.0
addons/web_analytics/__init__.py
12133432
digimarc/django
refs/heads/master
django/conf/app_template/__init__.py
12133432
alu0100207385/dsi_3Django
refs/heads/master
tests/view_tests/templatetags/debugtags.py
150
from __future__ import absolute_import from django import template from ..views import BrokenException register = template.Library() @register.simple_tag def go_boom(arg): raise BrokenException(arg)
alexey4petrov/pythonFlu
refs/heads/master
Foam/src/sampling/meshToMeshInterpolation/__init__.py
338
## pythonFlu - Python wrapping for OpenFOAM C++ API ## Copyright (C) 2010- Alexey Petrov ## Copyright (C) 2009-2010 Pebble Bed Modular Reactor (Pty) Limited (PBMR) ## ## 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 F...
cytec/SickRage
refs/heads/master
lib/sqlalchemy/orm/dynamic.py
79
# orm/dynamic.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Dynamic collection API. Dynamic collections act like Query() objects for read opera...
MayOneUS/pledgeservice
refs/heads/master
lib/mailchimp/requests/packages/chardet/langhungarianmodel.py
2762
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
FindHotel/boto3facade
refs/heads/master
tests/conftest.py
2
"""Global fixtures.""" import os import shutil import tempfile import pytest import uuid import boto3facade.config from boto3facade.ec2 import Ec2 @pytest.yield_fixture(scope="function") def randomstr(): """A random string (an UUID)""" yield str(uuid.uuid4()) @pytest.yield_fixture(scope='function') def ra...
kamilion/starcheat
refs/heads/master
starcheat/gui/ship.py
2
""" Qt ship management dialog """ import logging from gui.common import ListEdit import qt_ship from PyQt5.QtWidgets import QDialog class Ship(): def __init__(self, main_window): self.dialog = QDialog(main_window.window) self.ui = qt_ship.Ui_Dialog() self.ui.setupUi(self.dialog) ...
h4ck3rm1k3/gcc-ontology
refs/heads/master
lib/ontologies/org/vocab/open/terms.py
1
import rdflib from rdflib import Namespace from ontology import Ontology class OV(Ontology, ): def __init__(self): Ontology.__init__(self, rdflib.term.URIRef(u'http://open.vocab.org/terms/')) prefix = 'ov' ov = OV() ontology = ov
jperon/musite_old
refs/heads/master
lib/cherrypy/lib/jsontools.py
66
import cherrypy from cherrypy._cpcompat import basestring, ntou, json_encode, json_decode def json_processor(entity): """Read application/json data into request.json.""" if not entity.headers.get(ntou("Content-Length"), ntou("")): raise cherrypy.HTTPError(411) body = entity.fp.read() try: ...
kybriainfotech/iSocioCRM
refs/heads/8.0
addons/mail/res_users.py
314
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
nvoron23/hue
refs/heads/master
desktop/core/ext-py/elementtree/elementtree/__init__.py
127
# $Id: __init__.py 1821 2004-06-03 16:57:49Z fredrik $ # elementtree package # -------------------------------------------------------------------- # The ElementTree toolkit is # # Copyright (c) 1999-2004 by Fredrik Lundh # # By obtaining, using, and/or copying this software and/or its # associated documentation, you ...
liam-middlebrook/yaml-cpp
refs/heads/master
test/gmock-1.7.0/gtest/test/gtest_uninitialized_test.py
2901
#!/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...
coreynicholson/youtube-dl
refs/heads/master
devscripts/create-github-release.py
21
#!/usr/bin/env python from __future__ import unicode_literals import base64 import io import json import mimetypes import netrc import optparse import os import re import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from youtube_dl.compat import ( compat_basestring, com...
theju/confista
refs/heads/master
deploy/__init__.py
12133432
rkokkelk/CouchPotatoServer
refs/heads/master
couchpotato/core/media/movie/providers/userscript/__init__.py
12133432
eemirtekin/edx-platform
refs/heads/master
openedx/core/djangoapps/course_groups/management/commands/__init__.py
12133432
Zhaoyanzhang/-myflasky
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/lockfile/__init__.py
536
# -*- coding: utf-8 -*- """ lockfile.py - Platform-independent advisory file locks. Requires Python 2.5 unless you apply 2.4.diff Locking is done on a per-thread basis instead of a per-process basis. Usage: >>> lock = LockFile('somefile') >>> try: ... lock.acquire() ... except AlreadyLocked: ... print 'some...
mluscon/hawkey
refs/heads/master
tests/python/tests/test_repo.py
13
# # Copyright (C) 2012-2013 Red Hat, Inc. # # Licensed under the GNU Lesser General Public License Version 2.1 # # 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.1 of th...
chrisnorman7/gmp3
refs/heads/master
server/base.py
1
"""The Klein instance.""" import os.path, application, wx, config, logging from klein import Klein from twisted.python import log from twisted.web.server import Site from twisted.internet import reactor from jinja2 import Environment, loaders from json import dumps from db import Track from .forms import Sea...
tkingless/webtesting
refs/heads/master
venvs/tutorials/lib/python2.7/site-packages/pip/_vendor/requests/status_codes.py
150
# -*- coding: utf-8 -*- from .structures import LookupDict _codes = { # Informational. 100: ('continue',), 101: ('switching_protocols',), 102: ('processing',), 103: ('checkpoint',), 122: ('uri_too_long', 'request_uri_too_long'), 200: ('ok', 'okay', 'all_ok', 'all_okay', 'all_good', '\\o/'...
cowboysmall/rosalind
refs/heads/master
src/stronghold/rosalind_loca.py
1
import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), '../tools')) import fasta import table import strings def main(argv): pam250 = table.scoring(argv[0]) lines = fasta.read_ordered(argv[1]) result = strings.local_alignment(lines[0], lines[1], pam250) print result[0] pri...
rvanlaar/easy-transifex
refs/heads/master
src/transifex/transifex/resources/migrations/0001_initial.py
2
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): depends_on = ( ("projects", "0001_initial"), ("storage", "0001_initial"), ("languages", "0001_initial"), ) def forwards(sel...
openstate/yournextrepresentative
refs/heads/master
official_documents/__init__.py
12133432
goodwinnk/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/utils/feedgenerator.py
131
""" Syndication feed generation library -- used for generating RSS, etc. Sample usage: >>> from django.utils import feedgenerator >>> feed = feedgenerator.Rss201rev2Feed( ... title=u"Poynter E-Media Tidbits", ... link=u"http://www.poynter.org/column.asp?id=31", ... description=u"A group Weblog by the shar...
dyyi/moneybook
refs/heads/master
venv/Lib/site-packages/django/contrib/messages/utils.py
1333
from django.conf import settings from django.contrib.messages import constants def get_level_tags(): """ Returns the message level tags. """ level_tags = constants.DEFAULT_TAGS.copy() level_tags.update(getattr(settings, 'MESSAGE_TAGS', {})) return level_tags
martijnkoopman/thesis
refs/heads/master
1_dilate.py
1
# Dilate 3D horizontal # May 2016 - Martijn Koopman # ToDo: Clean code; pass variable dims to function GetArrValue() and SetArrValue() as arguments # User parameters radius = 2 # 2 * 10 cm on both sides + 10 cm in middle = 50cm vertical_extrusion = 1 # 19 * 10 cm = 190 cm # Input idi = se...
crazy-canux/django
refs/heads/master
tests/migrations/related_models_app/__init__.py
12133432
romeroj1/potential-batman
refs/heads/master
FabricHome/Splunk_TA_windows/bin/ta_windows/models/__init__.py
12133432
achang97/YouTunes
refs/heads/master
lib/python2.7/site-packages/boto3/resources/__init__.py
12133432
pferreir/indico
refs/heads/master
indico/modules/events/payment/models/__init__.py
12133432
ferabra/edx-platform
refs/heads/master
lms/djangoapps/instructor/management/__init__.py
12133432
wsmith323/django
refs/heads/master
django/conf/locale/ko/__init__.py
12133432
googlefonts/compreffor
refs/heads/main
src/python/compreffor/test/pyCompressor_test.py
2
# # Copyright 2015 Google Inc. 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 applicable law or...
cisco-openstack/tempest
refs/heads/proposed
tempest/lib/services/volume/v2/capabilities_client.py
3
# Copyright 2016 Red Hat, Inc. # 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...
VitalyW/python_training
refs/heads/master
data/contacts.py
1
from model.contact import Contact testdata = [Contact(firstname="firstname1", middlename="middlename1", lastname="lastname1", nickname="nickname1", address="addr1", company="company1", home="home1", homephone="homephone1", mobilephone="mobilephone1", workphone="workphone1", sec...
nikste/tensorflow
refs/heads/master
tensorflow/contrib/linear_optimizer/python/ops/sharded_mutable_dense_hashtable.py
110
# 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...
ecederstrand/django
refs/heads/master
tests/utils_tests/test_ipv6.py
332
from __future__ import unicode_literals import unittest from django.utils.ipv6 import clean_ipv6_address, is_valid_ipv6_address class TestUtilsIPv6(unittest.TestCase): def test_validates_correct_plain_address(self): self.assertTrue(is_valid_ipv6_address('fe80::223:6cff:fe8a:2e8a')) self.assertT...
chili-epfl/pyrobots
refs/heads/master
src/robots/roslogger.py
1
# coding=utf-8 import logging try: import rospy from rosgraph_msgs.msg import Log except ImportError: logging.warning("ROS not available: no ROS logging") roslevel = {'DEBUG':1, 'INFO':2, 'WARNING':4, 'ERROR':8, 'CRITICAL':16} class RXConsoleHandler(logging.Handler): def __init__(self, topic = "/roso...
cedk/odoo
refs/heads/8.0
addons/stock_account/wizard/stock_change_standard_price.py
315
# -*- 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...
tjcsl/director
refs/heads/master
web3/apps/sites/migrations/0002_auto_20161105_2342.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-11-05 23:42 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('sites', '0001_initial'), ] operations = [ migrations.RenameModel( old_n...
was4444/chromium.src
refs/heads/nw15
chrome/common/extensions/docs/server2/commit_tracker.py
44
# 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 collections import datetime from object_store_creator import ObjectStoreCreator from future import Future # The maximum number of commit IDs to ret...
cjhak/b2share
refs/heads/master
invenio/modules/uploader/manage.py
13
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014 CERN. # # Invenio 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...
mSenyor/sl4a
refs/heads/master
python/src/Lib/test/test_socketserver.py
56
""" Test suite for SocketServer.py. """ import contextlib import errno import imp import os import select import signal import socket import tempfile import threading import time import unittest import SocketServer import test.test_support from test.test_support import reap_children, verbose, TestSkipped from test.te...
takeflight/wagtail-readability
refs/heads/master
wagtailreadability/wagtail_hooks.py
1
from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include, url from django.utils.html import format_html, format_html_join from wagtail.wagtailcore import hooks from . import urls @hooks.register('register_admin_urls') def register_admin_urls(): return [ ...
iabdalkader/micropython
refs/heads/master
extmod/webrepl/webrepl_setup.py
15
import sys # import uos as os import os import machine RC = "./boot.py" CONFIG = "./webrepl_cfg.py" def input_choice(prompt, choices): while 1: resp = input(prompt) if resp in choices: return resp def getpass(prompt): return input(prompt) def input_pass(): while 1: ...
egaxegax/django-dbcartajs
refs/heads/master
django/contrib/messages/tests/session.py
63
from django.contrib.messages import constants from django.contrib.messages.tests.base import BaseTest from django.contrib.messages.storage.base import Message from django.contrib.messages.storage.session import SessionStorage from django.utils.safestring import SafeData, mark_safe def set_session_data(storage, messag...
pytest-dev/pytest
refs/heads/main
testing/example_scripts/unittest/test_parametrized_fixture_error_message.py
21
import unittest import pytest @pytest.fixture(params=[1, 2]) def two(request): return request.param @pytest.mark.usefixtures("two") class TestSomethingElse(unittest.TestCase): def test_two(self): pass
Yong-Lee/django
refs/heads/master
django/conf/locale/es_NI/__init__.py
12133432
hackaugusto/raiden
refs/heads/master
raiden/tests/integration/fixtures/__init__.py
12133432
ptemplier/ansible
refs/heads/devel
lib/ansible/plugins/action/net_vrf.py
474
# (c) 2017, Ansible 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 di...
joopert/home-assistant
refs/heads/dev
tests/components/cloud/test_prefs.py
1
"""Test Cloud preferences.""" from unittest.mock import patch from homeassistant.auth.const import GROUP_ID_ADMIN from homeassistant.components.cloud.prefs import CloudPreferences, STORAGE_KEY async def test_set_username(hass): """Test we clear config if we set different username.""" prefs = CloudPreferences...
msarahan/bokeh
refs/heads/master
sphinx/source/docs/user_guide/source_examples/charts_bar_stack.py
12
from bokeh.charts import Bar, output_file, show from bokeh.sampledata.autompg import autompg as df p = Bar(df, label='origin', values='mpg', agg='mean', stack='cyl', title="Avg MPG by ORIGIN, stacked by CYL", legend='top_right') output_file("bar.html") show(p)
ChristianFrisson/gaia
refs/heads/qt5
test/scratch/classification/classify.py
3
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2006-2013 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Gaia # # Gaia 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 Fou...
uasys/swift
refs/heads/master
utils/GYBUnicodeDataUtils.py
65
# ===--- GYBUnicodeDataUtils.py ----------------------*- coding: utf-8 -*-===// # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.t...
miragshin/pupy
refs/heads/master
pupy/modules/socks5proxy.py
19
# -*- coding: UTF8 -*- # -------------------------------------------------------------- # Copyright (c) 2015, Nicolas VERDIER (contact@n1nj4.eu) # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: # ...
kenshay/ImageScript
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/rsa/bigfile.py
82
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Un...
pathway27/servo
refs/heads/master
tests/wpt/css-tests/tools/pywebsocket/src/test/test_handshake_hybi00.py
466
#!/usr/bin/env python # # 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...
guillaumfloki/bodytracker
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py
12133432
hectord/lettuce
refs/heads/master
tests/integration/lib/Django-1.3/tests/regressiontests/inline_formsets/tests.py
51
from django.forms.models import inlineformset_factory from django.test import TestCase from regressiontests.inline_formsets.models import Poet, Poem, School, Parent, Child class DeletionTests(TestCase): def test_deletion(self): PoemFormSet = inlineformset_factory(Poet, Poem, can_delete=True) poe...
m4734/mysql_pio
refs/heads/5.7
boost_1_59_0/tools/build/test/test1.py
32
#!/usr/bin/python # Copyright 2002 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) import BoostBuild t = BoostBuild.Tester(pass_toolset=0) t.write("test.jam", """ actions unbuilt { } unbuilt all ; ECHO "H...
SoftwareKing/zstack-utility
refs/heads/master
buildsystem/test/test_build.py
3
''' @author: frank ''' import unittest from buildsystem import zstackbuild class Test(unittest.TestCase): def testName(self): build = zstackbuild.Build('test/zstack-build.cfg') build.main() if __name__ == "__main__": #import sys;sys.argv = ['', 'Test.testName'] unittest....
svagionitis/youtube-dl
refs/heads/master
youtube_dl/extractor/nowness.py
110
# encoding: utf-8 from __future__ import unicode_literals import re from .brightcove import BrightcoveIE from .common import InfoExtractor from ..utils import ExtractorError class NownessIE(InfoExtractor): _VALID_URL = r'https?://(?:(?:www|cn)\.)?nowness\.com/[^?#]*?/(?P<id>[0-9]+)/(?P<slug>[^/]+?)(?:$|[?#])' ...
flavour/eden
refs/heads/master
modules/templates/locations/IT/__init__.py
386048
maxsocl/django
refs/heads/master
tests/staticfiles_tests/test_liveserver.py
59
""" A subset of the tests in tests/servers/tests exercicing django.contrib.staticfiles.testing.StaticLiveServerTestCase instead of django.test.LiveServerTestCase. """ import os from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.core.exceptions import ImproperlyConfigured from django.t...
patmcb/odoo
refs/heads/8.0
addons/website_quote/models/__init__.py
393
import order
kevinlondon/django-rest-framework-tutorial
refs/heads/master
tutorial/tutorial/settings.py
1
""" Django settings for tutorial project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) i...
tadejs/crab
refs/heads/master
scikits/crab/utils/testing.py
11
"""Testing utilities.""" # Copyright (c) 2011 Marcel Caraciolo <marcel@muricoca.com> # License: Simplified BSD def assert_in(obj, in_=None, out_=None): """Checks that all names in `in_` as in `obj`, but no name in `out_` is.""" if in_ is not None: for name in in_: assert name in obj ...
matteraByte/5eDataParser
refs/heads/master
ConvertXmlToFetBmd.py
1
#!/usr/bin/python import sys from Converter.XmlToFetBmd import XmlToBmd as Converter numArgs = len(sys.argv) if numArgs < 3: print("Invalid number of arguments. " "Usage: python3 ConvertXmlToFetBmd.py InputFileOrDirectory OutputDirectory") else: inFileOrDirectory = sys.argv[1] outDirectory = sys...
kashif/chainer
refs/heads/master
chainer/dataset/__init__.py
7
from chainer.dataset import convert # NOQA from chainer.dataset import dataset_mixin # NOQA from chainer.dataset import download # NOQA from chainer.dataset import iterator # NOQA # import class and function from chainer.dataset.convert import concat_examples # NOQA from chainer.dataset.convert import to_device ...
cryptapus/electrum
refs/heads/master
electrum/plugins/coldcard/__init__.py
5
from electrum.i18n import _ fullname = 'Coldcard Wallet' description = 'Provides support for the Coldcard hardware wallet from Coinkite' requires = [('ckcc-protocol', 'github.com/Coldcard/ckcc-protocol')] registers_keystore = ('hardware', 'coldcard', _("Coldcard Wallet")) available_for = ['qt', 'cmdline']
gencer/sentry
refs/heads/master
src/sentry/middleware/health.py
4
from __future__ import absolute_import import itertools import six from django.http import HttpResponse class HealthCheck(object): def process_request(self, request): # Our health check can't be a done as a view, because we need # to bypass the ALLOWED_HOSTS check. We need to do this # s...
moutai/scikit-learn
refs/heads/master
examples/text/mlcomp_sparse_document_classification.py
33
""" ======================================================== Classification of text documents: using a MLComp dataset ======================================================== This is an example showing how the scikit-learn can be used to classify documents by topics using a bag-of-words approach. This example uses a s...
tdickers/mitmproxy
refs/heads/master
pathod/language/__init__.py
4
from __future__ import absolute_import import itertools import time from six.moves import range import pyparsing as pp from . import http, http2, websockets, writer, exceptions from .exceptions import RenderError, FileAccessDenied, ParseException from .base import Settings __all__ = [ "RenderError", "FileAcces...
alexlo03/ansible
refs/heads/devel
lib/ansible/modules/packaging/os/package_facts.py
31
#!/usr/bin/python # (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # most of it copied from AWX's scan_packages module from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': ...