repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
vvv1559/intellij-community | refs/heads/master | python/testData/intentions/PyConvertCollectionLiteralIntentionTest/convertOneElementIncompleteListToTuple_after.py | 37 | (42,) |
alanjw/GreenOpenERP-Win-X86 | refs/heads/7.0 | python/Lib/site-packages/Werkzeug-0.8.3-py2.7.egg/werkzeug/testsuite/contrib/sessions.py | 76 | # -*- coding: utf-8 -*-
"""
werkzeug.testsuite.sessions
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Added tests for the sessions.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import unittest
import shutil
from werkzeug.testsuite import WerkzeugTestCase
from werkzeug.c... |
gregomni/swift | refs/heads/master | utils/build_swift/build_swift/presets.py | 18 | # This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.txt for license information
# See https://swift.org/CONTRIBUTORS.txt for the list o... |
jjmleiro/hue | refs/heads/master | desktop/core/src/desktop/management/commands/create_desktop_app.py | 35 |
# adapted from django-extensions (http://code.google.com/p/django-command-extensions/)
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to y... |
inonit/wagtail | refs/heads/master | wagtail/wagtailcore/management/commands/move_pages.py | 5 | from django.core.management.base import BaseCommand
from wagtail.wagtailcore.models import Page
class Command(BaseCommand):
args = "<from id> <to id>"
def handle(self, _from_id, _to_id, **options):
# Convert args to integers
from_id = int(_from_id)
to_id = int(_to_id)
# Get ... |
nzlosh/st2 | refs/heads/master | st2auth/setup.py | 3 | # -*- coding: utf-8 -*-
# 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... |
surhudm/hscTools | refs/heads/master | bick/bin/showVisit.py | 2 | #!/usr/bin/env python
# Original filename: showVisit.py
#
# Author: Steve Bickerton
# Email:
# Date: Thu 2013-12-12 15:01:41
#
# Summary:
#
import sys
import os
import re
import math
import argparse
import datetime
import lsst.daf.persistence as dafPersist
import hsc.pipe.base.butler as hscButler... |
metabrainz/musicbrainz-logs | refs/heads/master | musicbrainz-logs/ml_server.py | 1 | #!/usr/bin/env python
from mblogs import app
app.SOLR_SERVER = "localhost"
app.SOLR_PORT = 8983
if __name__ == '__main__':
app.run(host="0.0.0.0", port=5000, debug=True)
|
rch/flask-extdirect-example | refs/heads/master | example.py | 1 | from flask import Flask, redirect, url_for, session, request
from flask.ext.sencha import direct
from example_utils import RedisSessionInterface
app = Flask(__name__)
app.config['SESSION_COOKIE_NAME'] = 'example'
app.session_interface = RedisSessionInterface()
app.register_blueprint(direct.blueprint, url_prefix='/dire... |
joelddiaz/openshift-tools | refs/heads/prod | openshift/installer/vendored/openshift-ansible-3.4.40/roles/lib_openshift/src/lib/project.py | 82 | # pylint: skip-file
# flake8: noqa
# pylint: disable=too-many-instance-attributes
class ProjectConfig(OpenShiftCLIConfig):
''' project config object '''
def __init__(self, rname, namespace, kubeconfig, project_options):
super(ProjectConfig, self).__init__(rname, None, kubeconfig, project_options)
cl... |
petermalcolm/osf.io | refs/heads/develop | website/addons/googledrive/settings/defaults.py | 45 |
# Drive credentials
CLIENT_ID = 'chaneme'
CLIENT_SECRET = 'changeme'
REFRESH_TIME = 5 * 60 # 5 minutes
# Check https://developers.google.com/drive/scopes for all available scopes
OAUTH_SCOPE = [
'https://www.googleapis.com/auth/userinfo.profile',
'https://www.googleapis.com/auth/drive',
]
OAUTH_BASE_URL = '... |
otfried/cs101 | refs/heads/master | code/robots/maze1.py | 1 | # This program lets the robot go around his world counterclockwise,
# stopping when he comes back to his starting point.
from cs1robots import *
load_world("../worlds/maze1.wld")
hubo = Robot(beepers = 10)
hubo.set_trace("blue")
def turn_right():
for i in range(3):
hubo.turn_left()
def mark_starting_point_a... |
eugena/django | refs/heads/master | tests/template_tests/syntax_tests/test_cycle.py | 199 | from django.template import TemplateSyntaxError
from django.test import SimpleTestCase, ignore_warnings
from django.utils.deprecation import RemovedInDjango110Warning
from ..utils import setup
class CycleTagTests(SimpleTestCase):
libraries = {'future': 'django.templatetags.future'}
@setup({'cycle01': '{% cy... |
matthaywardwebdesign/rethinkdb | refs/heads/next | external/v8_3.30.33.16/build/gyp/pylib/gyp/generator/gypsh.py | 2779 | # Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""gypsh output module
gypsh is a GYP shell. It's not really a generator per se. All it does is
fire up an interactive Python session with a few local variables... |
barthisrael/OmniDB | refs/heads/master | OmniDB/OmniDB_app/include/paramiko/buffered_pipe.py | 2 | # Copyright (C) 2006-2007 Robey Pointer <robeypointer@gmail.com>
#
# 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 (a... |
Gimpneek/exclusive-raid-gym-tracker | refs/heads/master | app/migrations/0014_auto_20171218_0008.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-12-18 00:08
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0013_auto_20171218_0006'),
]
operations = [
migrations.RemoveField(
... |
donSchoe/p2pool-cache | refs/heads/master | wstools/tests/test_wstools.py | 308 | #!/usr/bin/env python
############################################################################
# Joshua R. Boverhof, David W. Robertson, LBNL
# See LBNLCopyright for copyright notice!
###########################################################################
import unittest, tarfile, os, ConfigParser
import test... |
acenario/Payable | refs/heads/master | lib/python2.7/site-packages/django/utils/tree.py | 88 | """
A class for storing a tree graph. Primarily used for filter constructs in the
ORM.
"""
import copy
class Node(object):
"""
A single internal node in the tree graph. A Node should be viewed as a
connection (the root) with the children being either leaf nodes or other
Node instances.
"""
# ... |
jeremiahyan/odoo | refs/heads/master | odoo/addons/test_lint/tests/test_pylint.py | 1 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
try:
import pylint
except ImportError:
pylint = None
import subprocess
from distutils.version import LooseVersion
import os
from os.path import join
import sys
from odoo.tests.common import Transa... |
esatterly/splunk-cassandra | refs/heads/master | bin/extern.py | 1 | #!/usr/bin/env python
#
# Copyright 2011 Splunk, 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 ... |
vkosuri/pyang | refs/heads/master | pyang/plugins/depend.py | 1 | """Makefile dependency rule output plugin
"""
import optparse
import sys
import os.path
from pyang import plugin
from pyang import error
def pyang_plugin_init():
plugin.register_plugin(DependPlugin())
class DependPlugin(plugin.PyangPlugin):
def add_opts(self, optparser):
optlist = [
opt... |
duqiao/django | refs/heads/master | tests/migrations/test_migrations_squashed_complex/1_auto.py | 1155 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
operations = [
migrations.RunPython(migrations.RunPython.noop)
]
|
dahlstrom-g/intellij-community | refs/heads/master | python/testData/inspections/PyRedeclarationInspection/typeDeclarationPrecedesRedeclaredDefinition.py | 12 | x = 1
x: int
<warning descr="Redeclared 'x' defined above without usage">x</warning> = 2 |
lepistone/purchase-workflow | refs/heads/8.0 | purchase_requisition_multicurrency/model/__init__.py | 27 | # -*- coding: utf-8 -*-
from . import purchase_requisition
from . import purchase_order
|
jcora-nyt/fpa_app | refs/heads/master | lib/werkzeug/serving.py | 309 | # -*- coding: utf-8 -*-
"""
werkzeug.serving
~~~~~~~~~~~~~~~~
There are many ways to serve a WSGI application. While you're developing
it you usually don't want a full blown webserver like Apache but a simple
standalone one. From Python 2.5 onwards there is the `wsgiref`_ server in
the standa... |
gauribhoite/personfinder | refs/heads/master | env/site-packages/pygments/lexers/dylan.py | 72 | # -*- coding: utf-8 -*-
"""
pygments.lexers.dylan
~~~~~~~~~~~~~~~~~~~~~
Lexers for the Dylan language.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import Lexer, RegexLexer, bygroups, do_insertions, d... |
soldag/home-assistant | refs/heads/dev | tests/components/nws/test_config_flow.py | 5 | """Test the National Weather Service (NWS) config flow."""
import aiohttp
from homeassistant import config_entries, setup
from homeassistant.components.nws.const import DOMAIN
from tests.async_mock import patch
async def test_form(hass, mock_simple_nws_config):
"""Test we get the form."""
hass.config.latitu... |
amarandon/opencore | refs/heads/master | opencore/scripts/site_announce.py | 4 | # Copyright (C) 2008-2009 Open Society Institute
# Thomas Moroz: tmoroz.org
# 2010-2011 Large Blue
# Fergus Doyle: fergus.doyle@largeblue.com
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License Version ... |
hobson/pug-dj | refs/heads/master | pug/dj/crawlnmine/fabfile/django_fabric_aws.py | 1 | '''
--------------------------------------------------------------------------------------
django_fabric_aws.py
--------------------------------------------------------------------------------------
A set of fabric commands to manage a Django deployment on AWS
author : Ashok Fernandez (github.com/ashokfernandez/)
cre... |
armikhael/software-center | refs/heads/master | test/disabled_test_gnomekeyring.py | 4 | #!/usr/bin/python
from gi.repository import GObject
import gnomekeyring as gk
import unittest
class testGnomeKeyringUsage(unittest.TestCase):
APP = "gk-test"
KEYRING_NAME = "gk-test-keyring"
def setUp(self):
GObject.set_application_name(self.APP)
def test_keyring_available(self):
av... |
trueblue2704/AskMeAnything | refs/heads/master | lib/python2.7/site-packages/flask/ctx.py | 776 | # -*- coding: utf-8 -*-
"""
flask.ctx
~~~~~~~~~
Implements the objects required to keep the context.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from __future__ import with_statement
import sys
from functools import update_wrapper
from werkzeug.excep... |
btskinner/grm | refs/heads/master | grm/gr.py | 1 | # gr.py
# -*- coding: utf-8 -*-
from .utils import *
from .api import *
from .loc import *
import json
import os
class GR:
'''
Class for GitRoom initialization/reading functions
'''
def __init__(self, rgo = None, lgo = None):
self.rgo = rgo
self.lgo = lgo
def __str__(self):
... |
indictranstech/phrerp | refs/heads/develop | erpnext/stock/report/stock_projected_qty/stock_projected_qty.py | 24 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
def execute(filters=None):
columns = get_columns()
data = frappe.db.sql("""select
item.name, item.item_n... |
JasonKessler/scattertext | refs/heads/master | scattertext/test/test_indexStoreFromDict.py | 1 | from unittest import TestCase
from scattertext.indexstore.IndexStoreFromDict import IndexStoreFromDict
class TestIndexStoreFromDict(TestCase):
def test_index_store_from_dict(self):
vocab = {'baloney': 0,
'by': 1,
'first': 2,
'has': 3,
'it': 4,
'meyer': 5,
... |
myselfHimanshu/Udacity-DataML | refs/heads/master | Intro-To-Data-Science/Lesson3/PS3_6.py | 2 | import numpy as np
import scipy
import matplotlib.pyplot as plt
def plot_residuals(turnstile_weather, predictions):
'''
Using the same methods that we used to plot a histogram of entries
per hour for our data, why don't you make a histogram of the residuals
(that is, the difference between the original... |
kennedyshead/home-assistant | refs/heads/dev | tests/components/smappee/test_init.py | 8 | """Tests for the Smappee component init module."""
from unittest.mock import patch
from homeassistant.components.smappee.const import DOMAIN
from homeassistant.config_entries import SOURCE_ZEROCONF
from tests.common import MockConfigEntry
async def test_unload_config_entry(hass):
"""Test unload config entry flo... |
JackKelly/neuralnilm_prototype | refs/heads/master | scripts/e544.py | 2 | from __future__ import print_function, division
import matplotlib
import logging
from sys import stdout
matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab!
from neuralnilm import (Net, RealApplianceSource)
from neuralnilm.source import (standardise, discretize, fdiff, power_and_fdiff,
... |
salguarnieri/intellij-community | refs/heads/master | python/testData/inspections/PyTypeCheckerInspection/UnionReturnTypes.py | 79 | def test(c):
def f1(c):
if c < 0:
return []
elif c > 0:
return 'foo'
else:
return None
def f2(x):
"""
:type x: str
"""
pass
def f3(x):
"""
:type x: int
"""
x1 = f1(c)
f2(x1) # Weaker ... |
40223202/test | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/pydoc.py | 637 | #!/usr/bin/env python3
"""Generate Python documentation in HTML or text for interactive use.
In the Python interpreter, do "from pydoc import help" to provide
help. Calling help(thing) on a Python object documents the object.
Or, at the shell command line outside of Python:
Run "pydoc <name>" to show documentation ... |
YannThorimbert/ThorPy-1.4.1 | refs/heads/master | thorpy/painting/painters/inserterframe.py | 6 | from pygame import Surface, Rect, SRCALPHA
from thorpy.painting.painters.classicframe import ClassicFrame
from thorpy.miscgui import style
# get_fusion()
# get_surface()
# draw()
# personnals...
class InserterFrame(ClassicFrame):
def __init__(self, size=None, color=None, pressed=False, space=8, dark=None,
... |
mj10777/QGIS | refs/heads/master | tests/src/python/test_qgsshortcutsmanager.py | 2 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsActionManager.
.. 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.
"""
... |
konradxyz/cloudify-manager | refs/heads/master | plugins/windows-plugin-installer/windows_plugin_installer/tests/resources/mock-plugin/mock_for_test/module.py | 13 | # **************************************************************************
# * Copyright (c) 2013 GigaSpaces Technologies Ltd. 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 t... |
russel/pychapel | refs/heads/master | docs/source/examples/test_arbitrary_chapel_use.py | 2 | from pych.extern import Chapel
import os.path
currentloc = os.path.dirname(os.path.realpath(__file__))
@Chapel(module_dirs=[os.path.join(currentloc + '/sfiles/chapel/')], sfile="user.chpl")
def useArbitrary():
return None
if __name__ == "__main__":
useArbitrary()
import testcase
# contains the general test... |
EmmanuelJohnson/ssquiz | refs/heads/master | flask/lib/python2.7/site-packages/sqlalchemy/dialects/mysql/oursql.py | 59 | # mysql/oursql.py
# Copyright (C) 2005-2015 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
"""
.. dialect:: mysql+oursql
:name: OurSQL
:dbapi: oursql
:connectstri... |
blademainer/intellij-community | refs/heads/master | python/testData/inspections/importFromModuleStar/source.py | 83 | from target import *
<error descr="Unresolved reference 'xyzzy'">x<caret>yzzy</error>
shazam()
|
goliveirab/odoo | refs/heads/8.0 | addons/stock/wizard/stock_transfer_details.py | 169 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-TODAY OpenERP S.A. <http://www.odoo.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of t... |
dominicelse/scipy | refs/heads/master | benchmarks/benchmarks/go_benchmark_functions/go_funcs_Z.py | 47 | # -*- coding: utf-8 -*-
from __future__ import division, print_function, absolute_import
from numpy import abs, sum, sign, arange
from .go_benchmark import Benchmark
class Zacharov(Benchmark):
r"""
Zacharov objective function.
This class defines the Zacharov [1]_ global optimization problem. This
i... |
Maccimo/intellij-community | refs/heads/master | python/testData/mover/multiLineSelectionDifferentIndentLevelsMoveToEmptyLine_afterDown.py | 8 | pass
<caret><selection>n = 0
while n:
print("spam")</selection>
pass |
MarcJoan/django | refs/heads/master | tests/timezones/urls.py | 406 | from django.conf.urls import url
from . import admin as tz_admin # NOQA: register tz_admin
urlpatterns = [
url(r'^admin/', tz_admin.site.urls),
]
|
samuelcolvin/codeshow | refs/heads/master | codeshow.py | 1 | from flask import Flask
from flask import render_template
from pygments import highlight
import pygments.lexers as pyg_lexers
from pygments.formatters import HtmlFormatter
import requests, re
from flask import request
from urlparse import urlparse
from flask import redirect, url_for
import pygments.styles as pyg_styles... |
gencer/sentry | refs/heads/master | src/sentry/analytics/events/organization_created.py | 4 | from __future__ import absolute_import, print_function
from sentry import analytics
class OrganizationCreatedEvent(analytics.Event):
type = 'organization.created'
attributes = (
analytics.Attribute('id'), analytics.Attribute('name'), analytics.Attribute('slug'),
analytics.Attribute('actor_id... |
axilleas/ansible | refs/heads/devel | lib/ansible/plugins/lookup/indexed_items.py | 127 | # (c) 2012, 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) any lat... |
OakDevel/Teacup_Firmware | refs/heads/master | configtool/heaterspage.py | 2 |
import wx
from configtool.page import Page
from configtool.data import pinNames, BSIZESMALL
from configtool.heaterlist import HeaterList
from configtool.addheaterdlg import AddHeaterDlg
class HeatersPage(wx.Panel, Page):
def __init__(self, parent, nb, idPg, font):
wx.Panel.__init__(self, nb, wx.ID_ANY)
Pag... |
frugalware/melkotesting | refs/heads/master | t/fpmjunk.py | 13 | #!/usr/bin/env python
try:
import pacman
except ImportError:
import alpm
pacman = alpm
import os, tempfile, shutil, sys, re
remove = False
if len(sys.argv) > 1:
if sys.argv[1] == "--help":
print "no longer necessary %s fpms" % sys.argv[2]
sys.exit(0)
elif sys.argv[1] == "--remove":
remove = True
arch = s... |
Jgarcia-IAS/SAT | refs/heads/master | openerp/addons-extra/odoo-pruebas/odoo-server/addons-extra/l10n_pe_vat/base_vat.py | 3 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 2011 Cubic ERP - Teradata SAC. (http://cubicerp.com).
#
# WARNING: This program as such is intended to be used by professional
# programmers who take t... |
morelab/appcomposer | refs/heads/master | alembic/versions/452902fab185_added_auth_related_f.py | 3 | """Added auth-related fields to User
Revision ID: 452902fab185
Revises: 501404b36cef
Create Date: 2013-09-24 12:42:04.461000
"""
# revision identifiers, used by Alembic.
revision = '452902fab185'
down_revision = '501404b36cef'
from alembic import op
import sqlalchemy as sa
def upgrade():
### ... |
dkagedal/stgit | refs/heads/safe | stgit/commands/branch.py | 3 | __copyright__ = """
Copyright (C) 2005, Chuck Lever <cel@netapp.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WIT... |
firebase/firebase-android-sdk | refs/heads/master | ci/fireci/tests/copyright_test.py | 1 | # Copyright 2018 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
xuru/pyvisdk | refs/heads/master | pyvisdk/do/apply_storage_recommendation_result.py | 1 |
import logging
from pyvisdk.exceptions import InvalidArgumentError
########################################
# Automatically generated, do not edit.
########################################
log = logging.getLogger(__name__)
def ApplyStorageRecommendationResult(vim, *args, **kwargs):
'''Both RecommendDatastores a... |
retomerz/intellij-community | refs/heads/master | python/testData/inspections/ChainedComparison1_after.py | 83 | if e < a <= b < c <= d:
print "q" |
rvhub/onos | refs/heads/master | tools/test/topos/obeliskHostCheck.py | 32 | #!/usr/bin/python
import sys
import os
import json
# TODO: if none given, use OCI
try:
onosIp = sys.argv[1]
print "Reading hosts view from ONOS node " + onosIp + ":"
except Exception as e:
print "Error reading ONOS IP arguement"
print e
# Grab the json objects from ONOS
output = os.popen("onos " + ono... |
esi-mineset/spark | refs/heads/master | examples/src/main/python/mllib/summary_statistics_example.py | 128 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... |
mdkennedy3/Scarab_DCT_Control | refs/heads/master | catkin_ws/devel/lib/python2.7/dist-packages/hfn/msg/_MoveActionFeedback.py | 1 | """autogenerated by genpy from hfn/MoveActionFeedback.msg. Do not edit."""
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
import hfn.msg
import geometry_msgs.msg
import genpy
import actionlib_msgs.msg
import std_msgs.msg
class MoveActionFeedback(genpy.Message):
_md5su... |
pedohorse/hpaste | refs/heads/master | python2.7libs/hpaste/QWebAuthDialog.py | 1 | raise NotImplementedError()
# TODO: Ran into temporary deadend: This requires exposing client_secret for github authentication... so no point using it now
# TODO: need to implement something like device flow, but it is in beta currently
# TODO: or enter personal access token manually
import re
try:
from PySide2.Qt... |
SUSE/kiwi | refs/heads/master | doc/source/conf.py | 1 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# KIWI NG documentation build configuration file
#
import sys
from os.path import abspath, dirname, join, normpath
import shlex
import sphinx_rtd_theme
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path he... |
sbnoemi/notorhot | refs/heads/master | notorhot_example/app/settings.py | 1 | """
Django settings for notorhot_example 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... |
mikewesner-wf/glasshouse | refs/heads/master | glasshouse.indigoPlugin/Contents/Server Plugin/flask/testsuite/test_apps/moduleapp/apps/admin/__init__.py | 629 | from flask import Module, render_template
admin = Module(__name__, url_prefix='/admin')
@admin.route('/')
def index():
return render_template('admin/index.html')
@admin.route('/index2')
def index2():
return render_template('./admin/index.html')
|
molobrakos/home-assistant | refs/heads/master | tests/components/homekit/test_type_sensors.py | 15 | """Test different accessory types: Sensors."""
from homeassistant.components.homekit.const import (
PROP_CELSIUS, THRESHOLD_CO, THRESHOLD_CO2)
from homeassistant.components.homekit.type_sensors import (
AirQualitySensor, BinarySensor, CarbonMonoxideSensor, CarbonDioxideSensor,
HumiditySensor, LightSensor, T... |
LearnEra/LearnEraPlaftform | refs/heads/master | lms/djangoapps/notification_prefs/tests.py | 11 | import json
from django.contrib.auth.models import AnonymousUser
from django.core.exceptions import PermissionDenied
from django.http import Http404
from django.test import TestCase
from django.test.client import Client, RequestFactory
from django.test.utils import override_settings
from mock import Mock, patch
from ... |
pombreda/django-hotclub | refs/heads/master | fixtures/generate/zwitschern.py | 2 | import random
from pinax.zwitschern.models import tweet
from django.contrib.auth.models import User
from django.contrib.webdesign.lorem_ipsum import words
from django.template.defaultfilters import capfirst
from timezones.forms import TIMEZONE_CHOICES
OEMBED_CONTENT = [
'http://www.youtube.com/watch?v=_RyodnisVvU&... |
DeviaVir/qtwebkit | refs/heads/phantomjs | Tools/Scripts/webkitpy/port/gtk.py | 113 | # Copyright (C) 2010 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 ... |
isotoma/django-cms | refs/heads/master | cms/admin/forms.py | 2 | # -*- coding: utf-8 -*-
from django import forms
from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
from django.contrib.sites.models import Site
from django.core.exceptions import ValidationError, ObjectDoesNotExist
from django.db.models.fields import BooleanFie... |
JetBrains/intellij-community | refs/heads/master | python/testData/postfix/main/severalStatements.py | 35 | print("I want to be inside main").main<caret>
print("I want to be inside main too") |
mbareta/edx-platform-ft | refs/heads/open-release/eucalyptus.master | common/test/acceptance/pages/studio/overview.py | 9 | """
Course Outline page in Studio.
"""
import datetime
from bok_choy.page_object import PageObject
from bok_choy.promise import EmptyPromise
from selenium.webdriver import ActionChains
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.keys import Keys
from ..common.utils import click_cs... |
mafintosh/phantomjs | refs/heads/master | src/breakpad/src/tools/gyp/test/sibling/gyptest-all.py | 151 | #!/usr/bin/env python
# Copyright (c) 2009 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
"""
import TestGyp
test = TestGyp.TestGyp()
test.run_gyp('build/all.gyp', chdir='src')
test.build('build/all.gyp', test.ALL, chdir='... |
thaumos/ansible | refs/heads/devel | lib/ansible/plugins/inventory/virtualbox.py | 10 | # Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
name: virtualbox
plugin_type: inventory
short_description: virtualbo... |
i8run/BigDL-1 | refs/heads/master | pyspark/test/bigdl/keras/test_keras_api.py | 6 | #
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... |
komsas/OpenUpgrade | refs/heads/master | addons/pad/py_etherpad/__init__.py | 505 | """Module to talk to EtherpadLite API."""
import json
import urllib
import urllib2
class EtherpadLiteClient:
"""Client to talk to EtherpadLite API."""
API_VERSION = 1 # TODO probably 1.1 sometime soon
CODE_OK = 0
CODE_INVALID_PARAMETERS = 1
CODE_INTERNAL_ERROR = 2
CODE_INVALID_FUNCTION = 3
... |
ordinarybill/react-native | refs/heads/master | JSCLegacyProfiler/trace_data.py | 375 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import re
import unittest
"""
# _-----=> irqs-off
# / _----=> need-resched
# | / _---... |
mdsafwan/Deal-My-Stuff | refs/heads/master | Lib/site-packages/django/conf/locale/zh_Hans/formats.py | 634 | # -*- 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 = 'Y年n月j日' # 2016年9月5... |
painterjd/python-marconiclient | refs/heads/master | marconiclient/auth.py | 1 |
from exceptions import ClientException
from keystoneclient.v2_0 import client as ksclient
from keystoneclient import exceptions
def authenticate(auth_url, user, key, **kwargs):
"""Authenticates against the endpoint to use. The correct
endpoint to use is looked up in the service catalog. The
caller can o... |
bthirion/scikit-learn | refs/heads/master | sklearn/ensemble/gradient_boosting.py | 2 | """Gradient Boosted Regression Trees
This module contains methods for fitting gradient boosted regression trees for
both classification and regression.
The module structure is the following:
- The ``BaseGradientBoosting`` base class implements a common ``fit`` method
for all the estimators in the module. Regressio... |
eharney/cinder | refs/heads/master | cinder/volume/drivers/ibm/ibm_storage/ds8k_helper.py | 1 | # Copyright (c) 2016 IBM Corporation
# 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 req... |
askhl/ase | refs/heads/master | ase/gui/graphs.py | 6 | from math import sqrt
import gtk
from gettext import gettext as _
from ase.gui.widgets import pack, help
graph_help_text = _("""\
Help for plot ...
Symbols:
<c>e</c>:\t\t\t\ttotal energy
<c>epot</c>:\t\t\tpotential energy
<c>ekin</c>:\t\t\tkinetic energy
<c>fmax</c>:\t\t\tmaximum force
<c>fave</c>:\t\t\taverage forc... |
javachengwc/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/django/contrib/admindocs/tests/test_fields.py | 111 | from __future__ import absolute_import, unicode_literals
from django.contrib.admindocs import views
from django.db import models
from django.db.models import fields
from django.utils import unittest
from django.utils.translation import ugettext as _
class CustomField(models.Field):
description = "A custom field ... |
esacosta/u-mooc | refs/heads/master | tests/functional/model_student_work.py | 7 | # Copyright 2013 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 ... |
alekseik1/python_mipt_study | refs/heads/master | 1sem/contest_5/C.py | 2 | a = input().split()
s = ""
if a[1] == "a.m.":
a = a[0].split(':')
if int(a[0]) < 10:
s += "0" + a[0]
else:
s += a[0]
s += ":"
if len(a[1]) > 1:
s += a[1]
else:
s += "0" + a[1]
elif a[1] == "p.m.":
a = a[0].split(':')
if int(a[0]) == 12:
s += a[0] +... |
bhaskar24/ns-3_RARED | refs/heads/master | src/visualizer/visualizer/core.py | 88 | # -*- Mode: python; coding: utf-8 -*-
from __future__ import division
#from __future__ import with_statement
LAYOUT_ALGORITHM = 'neato' # ['neato'|'dot'|'twopi'|'circo'|'fdp'|'nop']
REPRESENT_CHANNELS_AS_NODES = 1
DEFAULT_NODE_SIZE = 3.0 # default node size in meters
DEFAULT_TRANSMISSIONS_MEMORY = 5 # default number o... |
gauribhoite/personfinder | refs/heads/master | env/google_appengine/lib/django-1.3/django/contrib/staticfiles/management/commands/findstatic.py | 244 | import os
from optparse import make_option
from django.core.management.base import LabelCommand
from django.utils.encoding import smart_str, smart_unicode
from django.contrib.staticfiles import finders
class Command(LabelCommand):
help = "Finds the absolute paths for the given static file(s)."
args = "[file .... |
lightcn/odoo | refs/heads/8.0 | addons/purchase/wizard/purchase_line_invoice.py | 177 | # -*- 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... |
daniboy/feedmuncher | refs/heads/master | app/migrations/0005_munchedfeed_cache_mime_type.py | 1 | # -*- coding: utf-8 -*-
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('app', '0004_auto_20150406_1204'),
]
operations = [
migrations.AddField(
model_name='munchedfeed',
name='cache_mime_type',
field=m... |
AlexCaranha/Wox | refs/heads/master | PythonHome/Lib/site-packages/chardet/compat.py | 2942 | ######################## BEGIN LICENSE BLOCK ########################
# Contributor(s):
# Ian Cordasco - port to Python
#
# 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
# versio... |
lneuhaus/pyrpl | refs/heads/master | setup.py | 1 | # note to the developer
# do not forget to make source distribution with
# python setup.py sdist
# much of the code here is from
# https://jeffknupp.com/blog/2013/08/16/open-sourcing-a-python-project-the-right-way/
#! /usr/bin/env python
from __future__ import print_function
from setuptools import setup, find_package... |
praekelt/django-atlas | refs/heads/develop | atlas/forms.py | 1 | from django import forms
from django.contrib.gis.geos import fromstr
from atlas.models import Country, Region, City
from atlas.fields import LonLatWidget, CoordinateFormField
from atlas.utils import get_city
class SelectLocationForm(forms.Form):
location = CoordinateFormField(
required = True,
hel... |
seecr/meresco-rdf | refs/heads/master | meresco/rdf/graph/rdfparser.py | 1 | ## begin license ##
#
# Meresco RDF contains components to handle RDF data.
#
# Copyright (C) 2014-2016 Seecr (Seek You Too B.V.) http://seecr.nl
# Copyright (C) 2014 Stichting Bibliotheek.nl (BNL) http://www.bibliotheek.nl
# Copyright (C) 2015 Drents Archief http://www.drentsarchief.nl
# Copyright (C) 2015 Koninklijke... |
bartoldeman/easybuild-framework | refs/heads/master | easybuild/tools/toolchain/options.py | 1 | # #
# Copyright 2012-2018 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (... |
khhhh/RIOT | refs/heads/master | dist/tools/pyterm/testbeds/testbeds.py | 100 | #!/usr/bin/python2
# -*- coding: utf-8 -*-
# Copyright (C) 2014 Philipp Rosenkranz <philipp.rosenkranz@fu-berlin.de>
#
# 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... |
andrew-szymanski/gae_django | refs/heads/master | django/contrib/sitemaps/__init__.py | 291 | from django.contrib.sites.models import Site, get_current_site
from django.core import urlresolvers, paginator
from django.core.exceptions import ImproperlyConfigured
import urllib
PING_URL = "http://www.google.com/webmasters/tools/ping"
class SitemapNotFound(Exception):
pass
def ping_google(sitemap_url=None, pi... |
tobycoder/webshop | refs/heads/master | bits/forms.py | 1 | from django import forms
from .models import ContactModel, bp_products, bp_users
MATEN = (('s', 'S - 15cm-16cm'),('m', 'M - 16.5cm-18cm'), ('l', 'L - 18cm-20cm'), ('xl', 'XL - 20cm-22cm'))
class ContactForm(forms.ModelForm):
class Meta:
model = ContactModel
fields = ('voornaam', 'email', 'onderwe... |
guillaume-philippon/aquilon | refs/heads/master | sbin/aqd.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 Contributor
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Licen... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.