repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
kutenai/django
refs/heads/master
tests/nested_foreign_keys/tests.py
174
from __future__ import unicode_literals from django.test import TestCase from .models import ( Event, Movie, Package, PackageNullFK, Person, Screening, ScreeningNullFK, ) # These are tests for #16715. The basic scheme is always the same: 3 models with # 2 relations. The first relation may be null, while the sec...
aheadley/python-nepugia
refs/heads/master
nepugia/scripts/dump_items.py
2
#!/bin/env python # -*- coding: utf-8 -*- # The MIT License (MIT) # # Copyright (c) 2015 Alex Headley <aheadley@waysaboutstuff.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without ...
maxsocl/django
refs/heads/master
tests/i18n/exclude/__init__.py
428
# This package is used to test the --exclude option of # the makemessages and compilemessages management commands. # The locale directory for this app is generated automatically # by the test cases. from django.utils.translation import ugettext as _ # Translators: This comment should be extracted dummy1 = _("This is ...
newrocknj/horizon
refs/heads/master
openstack_dashboard/dashboards/admin/images/urls.py
46
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
culturagovbr/e-pracas
refs/heads/master
gestor/migrations/0001_initial.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2018-04-03 16:00 from __future__ import unicode_literals import core.models import datetime from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import uuid class Migration(migra...
trhoden/ceph-deploy
refs/heads/master
ceph_deploy/util/arg_validators.py
19
import socket import argparse import re class RegexMatch(object): """ Performs regular expression match on value. If the regular expression pattern matches it will it will return an error message that will work with argparse. """ def __init__(self, pattern, statement=None): self.strin...
vicky2135/lucious
refs/heads/master
oscar/lib/python2.7/site-packages/pygments/lexers/rebol.py
25
# -*- coding: utf-8 -*- """ pygments.lexers.rebol ~~~~~~~~~~~~~~~~~~~~~ Lexers for the REBOL and related languages. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, bygroups from pygmen...
ahb0327/intellij-community
refs/heads/master
python/testData/resolve/multiFile/fromImportSubModuleDunderAll/pkg1/__init__.py
148
__all__ = ['m1']
houzhenggang/hiwifi-openwrt-HC5661-HC5761
refs/heads/master
staging_dir/host/lib64/scons-2.1.0/SCons/Tool/hpcc.py
21
"""SCons.Tool.hpcc Tool-specific initialization for HP aCC and cc. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons ...
gltn/stdm
refs/heads/master
stdm/settings/projectionSelector.py
1
''' Name : ProjectionSelector Description : Load generic projections selector dialog for user to select the srs id Date : 17/Oct/13 copyright : (C) 2013 by Solomon Njoroge email : njoroge.solomon@yahoo.com /****************************************...
google/matched_markets
refs/heads/master
matched_markets/tests/test_tbr.py
1
# Copyright 2020 Google LLC. # # 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 # # Unless required by applicable law or agreed to in writing,...
unioslo/cerebrum
refs/heads/master
Cerebrum/modules/event_publisher/scim.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2016-2017 University of Oslo, Norway # # This file is part of Cerebrum. # # Cerebrum 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...
ahotam/micropython
refs/heads/master
py/makeversionhdr.py
17
""" Generate header file with macros defining MicroPython version info. This script works with Python 2.6, 2.7, 3.3 and 3.4. """ from __future__ import print_function import sys import os import datetime import subprocess def get_version_info_from_git(): # Python 2.6 doesn't have check_output, so check for that...
SimonSapin/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/third_party/pytest/bench/bench.py
35
import sys if __name__ == "__main__": import cProfile import pytest # NOQA import pstats script = sys.argv[1:] if len(sys.argv) > 1 else "empty.py" stats = cProfile.run("pytest.cmdline.main(%r)" % script, "prof") p = pstats.Stats("prof") p.strip_dirs() p.sort_stats("cumulative") p...
Zhongqilong/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/distutils/config.py
91
"""distutils.pypirc Provides the PyPIRCCommand class, the base class for the command classes that uses .pypirc in the distutils.command package. """ import os from configparser import ConfigParser from distutils.cmd import Command DEFAULT_PYPIRC = """\ [distutils] index-servers = pypi [pypi] username:%s passwor...
vonnenaut/realmofreckoning
refs/heads/master
character.py
2
""" Character is a class which stores information pertaining to the player. It's imported by Realm.py and it deals with player attributes, inventory and coordinates. """ class Character(object): """ Represents the player with methods for inventory management, searching areas, generating narrative, moving and dying....
nimasmi/wagtail
refs/heads/master
wagtail/admin/api/filters.py
10
from rest_framework.filters import BaseFilterBackend from wagtail.api.v2.utils import BadRequestError, parse_boolean from wagtail.core import hooks from wagtail.core.models import UserPagePermissionsProxy class HasChildrenFilter(BaseFilterBackend): """ Filters the queryset by checking if the pages have child...
flodolo/bedrock
refs/heads/master
bedrock/firefox/templatetags/helpers.py
2
from django.conf import settings import jinja2 from django.template.loader import render_to_string from django_jinja import library from bedrock.firefox.firefox_details import firefox_desktop, firefox_android, firefox_ios from bedrock.base.urlresolvers import reverse from lib.l10n_utils import get_locale def deskto...
NervanaSystems/coach
refs/heads/master
rl_coach/tests/exploration_policies/test_greedy.py
1
import os import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) import pytest from rl_coach.spaces import DiscreteActionSpace, BoxActionSpace from rl_coach.exploration_policies.greedy import Greedy import numpy as np @pytest.mark.unit_test def test_get_action(): # discrete cont...
pk-sam/crosswalk-test-suite
refs/heads/master
tools/xml/xmlverifier.py
3
#!/usr/bin/python #encoding:utf-8 # Copyright (c) 2014 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of condi...
dims/cinder
refs/heads/master
cinder/tests/unit/keymgr/mock_key_mgr.py
6
# Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory # 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/...
nitzmahone/ansible
refs/heads/devel
lib/ansible/modules/cloud/openstack/os_stack.py
7
#!/usr/bin/python # coding: utf-8 -*- # (c) 2016, Mathieu Bultel <mbultel@redhat.com> # (c) 2016, Steve Baker <sbaker@redhat.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE...
andim27/magiccamp
refs/heads/master
build/lib/django/template/loaders/eggs.py
65
# Wrapper for loading templates from eggs via pkg_resources.resource_string. try: from pkg_resources import resource_string except ImportError: resource_string = None from django.template import TemplateDoesNotExist from django.template.loader import BaseLoader from django.conf import settings class Loader(B...
mehdidc/scikit-learn
refs/heads/master
sklearn/neighbors/classification.py
18
"""Nearest Neighbor Classification""" # Authors: Jake Vanderplas <vanderplas@astro.washington.edu> # Fabian Pedregosa <fabian.pedregosa@inria.fr> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Sparseness support by Lars Buitinck <L.J.Buitinck@uva.nl> # Multi-output support by ...
sobomax/libelperiodic
refs/heads/master
setup.py
1
#!/usr/bin/env python try: from setuptools import setup except ImportError: from distutils.core import setup from distutils.core import Extension import os elp_srcs = ['src/periodic.c', 'src/prdic_math.c', \ 'src/prdic_fd.c', \ 'src/prdic_pfd.c', \ 'src/prdic_main_fd.c', 'src/prdic_main_pfd.c', \ 'src/prd...
Kryz/sentry
refs/heads/master
src/sentry/migrations/0112_auto__chg_field_option_value__chg_field_useroption_value__chg_field_pr.py
36
# -*- 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): pass def backwards(self, orm): pass models = { 'sentry.accessgroup': { 'Meta':...
superberny70/pelisalacarta
refs/heads/develop
python/main-classic/platformcode/xbmc_info_window.py
4
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # pelisalacarta 4 # Copyright 2015 tvalacarta@gmail.com # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ # # Distributed under the terms of GNU General Public License v3 (GPLv3) # http://www.gnu.org/licenses/gpl-3.0.html # --...
dart-lang/sdk
refs/heads/master
samples-dev/swarm/gen_manifest.py
2
# Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. #!/usr/bin/env python3 # """ Usage: gen_manifest.py DIRECTORY EXTENSIONS CACHE-FILE HTML-FILES... Outputs...
40223112/w16test
refs/heads/master
static/Brython3.1.3-20150514-095342/Lib/ui/slider.py
603
from . import widget from browser import doc,html class Slider(widget.Widget): def __init__(self, id=None, label=False): self._div_shell=html.DIV(Class="ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all") widget.Widget.__init__(self, self._div_shell, 'slider', id) self._h...
jendap/tensorflow
refs/heads/master
tensorflow/python/ops/ragged/ragged_gather_nd_op_test.py
10
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
project-zerus/fbthrift
refs/heads/master
thrift/lib/py/transport/TTwisted.py
16
# # 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...
aguijarro/DataSciencePython
refs/heads/master
DataWrangling/extracting_data_xml.py
1
#!/usr/bin/env python # Your task here is to extract data from xml on authors of an article # and add it to a list, one item for an author. # See the provided data structure for the expected format. # The tags for first name, surname and email should map directly # to the dictionary keys import xml.etree.ElementTree as...
grepme/CMPUT410Lab01
refs/heads/master
virt_env/virt1/lib/python2.7/site-packages/WebTest-2.0.17-py2.7.egg/webtest/app.py
4
# (c) 2005 Ian Bicking and contributors; written for Paste # (http://pythonpaste.org) # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license.php """ Routines for testing WSGI applications. Most interesting is TestApp """ from __future__ import unicode_literals import os import re import js...
hongchaodeng/contrib
refs/heads/master
hack/verify-flags-underscore.py
34
#!/usr/bin/env python # Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
michael-borisov/django-social-auth
refs/heads/master
social_auth/backends/contrib/belgiumeid.py
14
from social.backends.belgiumeid import BelgiumEIDOpenId as EIDBackend
mtasende/BLAS_for_Parallella
refs/heads/master
blis-master/windows/build/gen-check-rev-file.py
6
#! /usr/bin/env python # # BLIS # An object-based framework for developing high-performance BLAS-like # libraries. # # Copyright (C) 2014, The University of Texas at Austin # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditio...
mollstam/UnrealPy
refs/heads/master
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Scrapy-1.0.1/scrapy/core/__init__.py
216
""" Scrapy core library classes and functions. """
gjhiggins/sprox
refs/heads/master
sprox/dummyentity.py
3
class DummyEntity:pass
rmed/blahrgbot
refs/heads/master
blahrgbot/helper.py
1
# -*- coding: utf-8 -*- # # blahrgbot # https://github.com/rmed/blahrgbot # # The MIT License (MIT) # # Copyright (c) 2016 Rafael Medina García <rafamedgar@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), ...
lsaffre/lino
refs/heads/master
lino/modlib/notify/consumers2.py
2
import json from asgiref.sync import async_to_sync from channels.generic.websocket import WebsocketConsumer class LinoConsumer(WebsocketConsumer): def connect(self): self.accept() if self.scope.get('user', False): username = self.scope["user"].username async_to_sync(self.c...
david30907d/feedback_django
refs/heads/master
example/spirit/comment/flag/__init__.py
12
# -*- coding: utf-8 -*- from __future__ import unicode_literals default_app_config = 'spirit.comment.flag.apps.SpiritCommentFlagConfig'
IshankGulati/scikit-learn
refs/heads/master
sklearn/utils/tests/test_metaestimators.py
86
from sklearn.utils.testing import assert_true, assert_false from sklearn.utils.metaestimators import if_delegate_has_method class Prefix(object): def func(self): pass class MockMetaEstimator(object): """This is a mock meta estimator""" a_prefix = Prefix() @if_delegate_has_method(delegate="a...
KokareIITP/django
refs/heads/master
django/core/management/commands/inspectdb.py
108
from __future__ import unicode_literals import keyword import re from collections import OrderedDict from django.core.management.base import BaseCommand, CommandError from django.db import DEFAULT_DB_ALIAS, connections class Command(BaseCommand): help = "Introspects the database tables in the given database and...
katstalk/android_external_chromium_org
refs/heads/kk44
tools/cr/cr/base/client.py
23
# Copyright 2013 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. """Client configuration management. This module holds the code for detecting and configuring the current client and it's output directories. It is responsib...
bxlab/HiFive_Paper
refs/heads/master
Scripts/MB/Matrix_Balancing.py
1
import sys import numpy def BNEWT(A, tol=1e-6, x0=None, delta=0.1, Delta=3, fl=False): # Initialize values res = [] n = A.shape[0] e = numpy.ones((n, 1), dtype=numpy.float64) if x0 is None: x0=numpy.copy(e) g = 0.9 eta = etamax = 0.1 stop_tol = tol * 0.5 x = numpy.copy(x0) ...
thenetcircle/dino
refs/heads/master
dino/rest/resources/history.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 under the Li...
wizmer/NeuroM
refs/heads/master
examples/histogram.py
2
#!/usr/bin/env python # Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project # All rights reserved. # # This file is part of NeuroM <https://github.com/BlueBrain/NeuroM> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the fol...
kmoocdev2/edx-platform
refs/heads/real_2019
common/lib/xmodule/xmodule/tests/test_course_module.py
11
"""Tests the course modules and their functions""" import ddt import unittest from datetime import datetime, timedelta from dateutil import parser import itertools from fs.memoryfs import MemoryFS from mock import Mock, patch from pytz import utc from xblock.runtime import KvsFieldData, DictKeyValueStore import xmodu...
Sorsly/subtle
refs/heads/master
google-cloud-sdk/lib/third_party/chardet/constants.py
237
######################## 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...
kfox1111/horizon
refs/heads/master
horizon/tables/__init__.py
48
# Copyright 2012 Nebula, 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 agree...
rghe/ansible
refs/heads/devel
lib/ansible/modules/network/vyos/vyos_vlan.py
26
#!/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', ...
jabesq/home-assistant
refs/heads/dev
tests/components/person/__init__.py
39
"""The tests for the person component."""
lanceculnane/electricity-conservation
refs/heads/master
code/15regRF_mean.py
1
import numpy as np import pandas as pd import datetime from sklearn.ensemble import RandomForestRegressor from sklearn.metrics import mean_squared_error from sklearn.cross_validation import train_test_split from sklearn.preprocessing import Imputer full_pre = pd.read_csv("new.csv") # full.fillna(0, inplace=True) # C...
msimacek/fedmsg_meta_fedora_infrastructure
refs/heads/develop
fedmsg_meta_fedora_infrastructure/tests/nuancier.py
5
# This file is part of fedmsg. # Copyright (C) 2012 Red Hat, Inc. # # fedmsg 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 your option) any later version. #...
BTCDDev/bitcoin
refs/heads/master
qa/rpc-tests/walletbackup.py
85
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Exercise the wallet backup code. Ported from walletbackup.sh. Test case is: 4 nodes. 1 2 and 3 send...
bestwpw/crosswalk
refs/heads/master
build/android/merge_java_srcs.py
37
#!/usr/bin/env python # Copyright (c) 2014 Intel Corporation. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import optparse import os import re import sys import shutil def DoCopy(path, target_path): if os.path.isfile(path): package ...
charles-cooper/raiden
refs/heads/master
raiden/tests/smart_contracts/netting_channel/test_updatetransfer.py
1
# -*- coding: utf-8 -*- import pytest from ethereum.tester import TransactionFailed from coincurve import PrivateKey from raiden.messages import DirectTransfer from raiden.utils import privatekey_to_address from raiden.tests.utils.transfer import make_direct_transfer_from_channel def test_transfer_update_event(teste...
rjw57/foldbeam
refs/heads/master
webui/index.py
1
import logging logging.basicConfig(level=logging.INFO) from pyjamas.ui.Button import Button as ButtonBase from pyjamas.ui.HorizontalPanel import HorizontalPanel from pyjamas.ui.FlowPanel import FlowPanel from pyjamas.ui.RootPanel import RootPanel from pyjamas.ui.SimplePanel import SimplePanel from pyjamas.ui.HTML impo...
lukleh/TwistedBot
refs/heads/master
libs/twisted/persisted/__init__.py
42
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Twisted Persisted: utilities for managing persistence. """
nickchen-mitac/fork
refs/heads/master
src/ava/user/models.py
1
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from datetime import datetime from ava.util import time_uuid from ava import APP_NAME class Notice(object): """ Represent user notices. """ INFO = 20 WARNING = 30 ERROR = 40 NOTIFY ...
nagyistoce/odoo-dev-odoo
refs/heads/8.0
addons/website_hr_recruitment/models/__init__.py
390
import hr_job
jell0720/cubes
refs/heads/master
cubes/ext.py
5
# -*- coding: utf-8 -*- from .common import decamelize, to_identifier, coalesce_options from .errors import ArgumentError, InternalError from collections import defaultdict, OrderedDict from pkg_resources import iter_entry_points from textwrap import dedent __all__ = [ "EXTENSION_TYPES", "ExtensionFinder", ] ...
schatt/zulip
refs/heads/master
zerver/lib/notifications.py
116
from confirmation.models import Confirmation from django.conf import settings from django.core.mail import EmailMultiAlternatives from django.template import loader from zerver.decorator import statsd_increment, uses_mandrill from zerver.models import Recipient, ScheduledJob, UserMessage, \ Stream, get_display_reci...
tannishk/airmozilla
refs/heads/master
airmozilla/manage/tests/views/test_events.py
2
import re import cgi import datetime import json import urllib import os import shutil from cStringIO import StringIO from nose.tools import eq_, ok_ import mock import pyquery from django.conf import settings from django.contrib.auth.models import User, Group, Permission from django.core import mail from django.util...
function2/public
refs/heads/master
math/sha256.py
1
#!/usr/bin/env python3 # Simple (SLOW) program to calculate the SHA-256. # Copyright 2015, Michael Seyfert <michael@codesand.org> # http://codesand.org # License GPL v2 import sys, struct K = [ 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12...
sposs/DIRAC
refs/heads/integration
Core/DISET/private/Transports/SSL/__init__.py
38
# $HeadURL$ __RCSID__ = "$Id$"
saurabh6790/aimobilize-lib-backup
refs/heads/master
webnotes/widgets/calendar.py
34
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import webnotes from webnotes import _ import json @webnotes.whitelist() def update_event(args, field_map): args = webnotes._dict(json.loads(args)) field_map = webnotes._di...
francois-travais/wedding-rest
refs/heads/master
setup.py
1
# -*- coding: utf8 -*- from setuptools import setup setup( # Application name: name="wedding_rest", # Version number (initial): version="1.0.0", # Application author details: author="Francois Travais", author_email="francois.travais@gmail.com", # Packages packages=["wedding_rest"...
Teamxrtc/webrtc-streaming-node
refs/heads/master
third_party/depot_tools/external_bin/gsutil/gsutil_4.15/gsutil/third_party/pyasn1/pyasn1/__init__.py
193
import sys # http://www.python.org/dev/peps/pep-0396/ __version__ = '0.1.7' if sys.version_info[:2] < (2, 4): raise RuntimeError('PyASN1 requires Python 2.4 or later')
gabrielfalcao/lettuce
refs/heads/master
tests/integration/lib/Django-1.3/tests/modeltests/fixtures_model_package/__init__.py
45382
edisonlz/fruit
refs/heads/master
web_project/base/site-packages/south/db/mysql.py
20
# MySQL-specific implementations for south # Original author: Andrew Godwin # Patches by: F. Gabriel Gosselin <gabrielNOSPAM@evidens.ca> from south.db import generic from south.db.generic import DryRunError, INVALID from south.logger import get_logger def delete_column_constraints(func): """ Decorates column...
40223117cda/2015_cd0505
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/marshal.py
1265
from json import *
Instanssi/Instanssi.org
refs/heads/master
Instanssi/store/methods/paytrail.py
1
# -*- coding: utf-8 -*- from Instanssi.common.misc import get_url from django.conf import settings from django.urls import reverse from django.http import HttpResponseRedirect, HttpResponse, Http404 from django.shortcuts import render, get_object_or_404 from Instanssi.store.models import StoreTransaction from Instanss...
apixandru/intellij-community
refs/heads/master
python/testData/refactoring/introduceField/uniqueName.py
83
class Foo: def __init__(self): self.s = "" self.str = "" def bar(self): print "<caret>"
LiveZenLK/CeygateERP
refs/heads/master
addons/account/models/__init__.py
67
# -*- coding: utf-8 -*- import partner import account import account_payment import account_invoice import account_bank_statement import account_move import chart_template import account_analytic_line import account_journal_dashboard import product import company import res_config import web_planner
svn2github/vbox
refs/heads/master
src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/Ecc/FileProfile.py
11
## @file # fragments of source file # # Copyright (c) 2007, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be foun...
cyberplant/scrapy
refs/heads/master
tests/test_utils_reqser.py
103
# -*- coding: utf-8 -*- import unittest from scrapy.http import Request from scrapy.spiders import Spider from scrapy.utils.reqser import request_to_dict, request_from_dict class RequestSerializationTest(unittest.TestCase): def setUp(self): self.spider = TestSpider() def test_basic(self): r...
hsaputra/tensorflow
refs/heads/master
tensorflow/python/training/saver_test.py
6
# 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...
limodou/uliweb
refs/heads/master
uliweb/utils/coloredlog.py
2
#coding=utf-8 import sys import logging import re try: import colorama colorama.init() except: colorama = None _r_color_delimeter = re.compile(r'\{\{.*?\}\}') #Available formatting constants are: #Fore: BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE, RESET. #Back: BLACK, RED, GREEN, YELLOW, BLUE...
chrsmithdemos/selenium
refs/heads/master
py/selenium/webdriver/common/by.py
44
# Copyright 2008-2009 WebDriver committers # Copyright 2008-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 requ...
FreddieShoreditch/image_folder_organiser
refs/heads/master
venv/lib/python2.7/site-packages/PIL/Jpeg2KImagePlugin.py
19
# # The Python Imaging Library # $Id$ # # JPEG2000 file handling # # History: # 2014-03-12 ajh Created # # Copyright (c) 2014 Coriolis Systems Limited # Copyright (c) 2014 Alastair Houghton # # See the README file for information on usage and redistribution. # from PIL import Image, ImageFile import struct import os i...
guillaume-philippon/aquilon
refs/heads/master
tests/broker/test_reconfigure.py
1
#!/usr/bin/env python # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2012,2013,2014,2015,2016 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with...
listingmirror/boto
refs/heads/develop
boto/sqs/attributes.py
223
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modi...
charbeljc/OCB
refs/heads/8.0
openerp/report/printscreen/ps_form.py
381
# -*- 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...
tumbl3w33d/ansible
refs/heads/devel
lib/ansible/modules/network/avi/avi_httppolicyset.py
28
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses...
mensler/ansible
refs/heads/devel
lib/ansible/modules/network/nxos/nxos_gir.py
56
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
ajohnson23/depot_tools
refs/heads/master
third_party/logilab/common/testlib.py
64
# -*- coding: utf-8 -*- # copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser Genera...
maddox/home-assistant
refs/heads/dev
tests/util/test_dt.py
28
""" tests.test_util ~~~~~~~~~~~~~~~~~ Tests Home Assistant date util methods. """ # pylint: disable=too-many-public-methods import unittest from datetime import datetime, timedelta import homeassistant.util.dt as dt_util TEST_TIME_ZONE = 'America/Los_Angeles' class TestDateUtil(unittest.TestCase): """ Tests ut...
sbesson/PyGithub
refs/heads/master
tests/BranchProtection.py
3
############################ Copyrights and license ############################ # # # Copyright 2018 Steve Kowalik <steven@wedontsleep.org> # # ...
myRisk/dynamicDNA
refs/heads/master
setuptools-15.2/setuptools/command/upload_docs.py
390
# -*- coding: utf-8 -*- """upload_docs Implements a Distutils 'upload_docs' subcommand (upload documentation to PyPI's pythonhosted.org). """ from base64 import standard_b64encode from distutils import log from distutils.errors import DistutilsOptionError from distutils.command.upload import upload import os import s...
Open-Plus/opgui
refs/heads/master
lib/python/Components/Converter/EventName.py
8
from enigma import eEPGCache from Components.Converter.Converter import Converter from Components.Element import cached from Components.Converter.genre import getGenreStringSub class EventName(Converter, object): NAME = 0 SHORT_DESCRIPTION = 1 EXTENDED_DESCRIPTION = 2 FULL_DESCRIPTION = 3 ID = 4 NAME_NOW = 5 N...
tom111/tatt
refs/heads/master
tatt/scriptwriter.py
1
""" Filling script templates """ import random import os import portage import sys from .gentooPackage import gentooPackage as gP from .usecombis import findUseFlagCombis from .tinderbox import stablerdeps from .tool import unique from portage.dep import dep_getkey #### USE-COMBIS ######## def scriptTemplate(job, c...
WeblateOrg/weblate
refs/heads/main
weblate/lang/management/commands/list_languages.py
2
# # Copyright © 2012 - 2021 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.org/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lice...
follow99/django
refs/heads/master
django/contrib/gis/db/models/query.py
39
import warnings from django.contrib.gis.db.models.fields import ( GeometryField, LineStringField, PointField, get_srid_info, ) from django.contrib.gis.db.models.lookups import GISLookup from django.contrib.gis.db.models.sql import ( AreaField, DistanceField, GeomField, GMLField, ) from django.contrib.gis.geome...
PaulWay/spacewalk
refs/heads/master
client/solaris/smartpm/smart/backends/deb/base.py
1
# # Copyright (c) 2004 Conectiva, Inc. # # Written by Gustavo Niemeyer <niemeyer@conectiva.com> # # This file is part of Smart Package Manager. # # Smart Package Manager 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 Fou...
fuselock/odoo
refs/heads/8.0
openerp/conf/__init__.py
442
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
ataylor32/django
refs/heads/master
tests/reverse_lookup/tests.py
326
from __future__ import unicode_literals from django.core.exceptions import FieldError from django.test import TestCase from .models import Choice, Poll, User class ReverseLookupTests(TestCase): def setUp(self): john = User.objects.create(name="John Doe") jim = User.objects.create(name="Jim Bo")...
sarlalian/ansible
refs/heads/devel
lib/ansible/template/__init__.py
2
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
TimeTravel-0/hatching
refs/heads/master
vectorize.py
1
#!/usr/bin/env python # # this is ugly, experimental, slow, unoptimized code. # its purpose is to verify my (propably) stupid idea # of an "image to hatching pen plotter drawing". # # for now the script finds edges and fills areas in between # with colors # edge detection works as expected, but drawn edges # (black lin...
rackerlabs/pelican-events
refs/heads/master
pelican_events/contents.py
1
from pelican.contents import Page class Event(Page): """ An Event is meeting, conference, or other occurrence which can be displayed and indexed on a static site generation. It is intended to be used with the JSON generator and custom templates. """ base_properties = ('starts','ends','title','e...