repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
JazzeYoung/VeryDeepAutoEncoder
refs/heads/master
pylearn2/models/differentiable_sparse_coding.py
44
""" An implementation of the model described in "Differentiable Sparse Coding" by Bradley and Bagnell """ __authors__ = "Ian Goodfellow" __copyright__ = "Copyright 2010-2012, Universite de Montreal" __credits__ = ["Ian Goodfellow"] __license__ = "3-clause BSD" __maintainer__ = "LISA Lab" __email__ = "pylearn-dev@google...
xeddmc/pupy
refs/heads/master
pupy/packages/windows/amd64/psutil/_psosx.py
81
#!/usr/bin/env python # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """OSX platform implementation.""" import errno import functools import os from collections import namedtuple from . import _commo...
ahmadshahwan/cohorte-runtime
refs/heads/master
python/src/lib/python/jsonrpclib/utils.py
7
#!/usr/bin/python # -- Content-Encoding: UTF-8 -- """ Utility methods, for compatibility between Python version 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/LIC...
guettli/django
refs/heads/master
django/contrib/admin/checks.py
13
# -*- coding: utf-8 -*- from __future__ import unicode_literals from itertools import chain from django.apps import apps from django.conf import settings from django.contrib.admin.utils import ( NotRelationField, flatten, get_fields_from_path, ) from django.core import checks from django.core.exceptions import Fi...
HybridF5/tempest
refs/heads/master
tempest/common/fixed_network.py
6
# 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...
kytvi2p/Sigil
refs/heads/master
3rdparty/python/Lib/imghdr.py
88
"""Recognize image file formats based on their first few bytes.""" __all__ = ["what"] #-------------------------# # Recognize image headers # #-------------------------# def what(file, h=None): f = None try: if h is None: if isinstance(file, str): f = open(file, 'rb') ...
wwj718/ANALYSE
refs/heads/master
common/lib/xmodule/xmodule/hidden_module.py
94
from xmodule.x_module import XModule from xmodule.raw_module import RawDescriptor class HiddenModule(XModule): def get_html(self): if self.system.user_is_staff: return u"ERROR: This module is unknown--students will not see it at all" else: return u"" class HiddenDescripto...
craisins/nascarbot
refs/heads/master
plugins/wikipedia.py
6
'''Searches wikipedia and returns first sentence of article Scaevolus 2009''' import re from util import hook, http api_prefix = "http://en.wikipedia.org/w/api.php" search_url = api_prefix + "?action=opensearch&format=xml" paren_re = re.compile('\s*\(.*\)$') @hook.command('w') @hook.command def wiki(inp): ''...
MichaelNedzelsky/intellij-community
refs/heads/master
python/testData/completion/matMul.py
79
class C: def __matmul<caret>
arthru/OpenUpgrade
refs/heads/master
addons/marketing_campaign_crm_demo/__openerp__.py
119
# -*- 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...
vgrem/Office365-REST-Python-Client
refs/heads/master
office365/calendar/calendar_group.py
1
from office365.calendar.calendar_collection import CalendarCollection from office365.entity import Entity from office365.runtime.resource_path import ResourcePath class CalendarGroup(Entity): """ A group of user calendars. """ @property def calendars(self): """The calendars in the calenda...
botchat/sampleGroupChat
refs/heads/master
chatting/tests.py
24123
from django.test import TestCase # Create your tests here.
savoirfairelinux/OpenUpgrade
refs/heads/master
addons/mail/tests/test_message_read.py
44
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
SnappleCap/oh-mainline
refs/heads/master
vendor/packages/requests/requests/models.py
410
# -*- coding: utf-8 -*- """ requests.models ~~~~~~~~~~~~~~~ This module contains the primary objects that power Requests. """ import collections import datetime from io import BytesIO, UnsupportedOperation from .hooks import default_hooks from .structures import CaseInsensitiveDict from .auth import HTTPBasicAuth ...
pcu4dros/pandora-core
refs/heads/master
workspace/lib/python3.5/site-packages/werkzeug/contrib/testtools.py
4
# -*- coding: utf-8 -*- """ werkzeug.contrib.testtools ~~~~~~~~~~~~~~~~~~~~~~~~~~ This module implements extended wrappers for simplified testing. `TestResponse` A response wrapper which adds various cached attributes for simplified assertions on various content types. ...
CenterForOpenScience/osf.io
refs/heads/develop
api_tests/providers/registrations/views/test_registration_provider_moderator_list.py
5
import pytest from api.base.settings.defaults import API_BASE from osf_tests.factories import ( RegistrationProviderFactory, ) from api_tests.providers.preprints.views.test_preprint_provider_moderator_list import ProviderModeratorListTestClass @pytest.mark.django_db class TestRegistrationProviderModeratorList(Pr...
ghchinoy/tensorflow
refs/heads/master
tensorflow/contrib/rnn/python/ops/core_rnn_cell.py
19
# 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...
datalocale/drupal7
refs/heads/master
sites/all/libraries/OpenLayers/tools/BeautifulSoup.py
307
"""Beautiful Soup Elixir and Tonic "The Screen-Scraper's Friend" http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup parses a (possibly invalid) XML or HTML document into a tree representation. It provides methods and Pythonic idioms that make it easy to navigate, search, and modify the tree. A well-formed X...
sdpython/cvxpy
refs/heads/master
cvxpy/tests/test_curvature.py
11
""" Copyright 2013 Steven Diamond This file is part of CVXPY. CVXPY 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. CVXPY is distributed i...
moble/sympy
refs/heads/master
sympy/physics/tests/test_pring.py
98
from sympy.physics.pring import wavefunction, energy from sympy.core.compatibility import range from sympy import pi, integrate, sqrt, exp, simplify, I from sympy.abc import m, x, r from sympy.physics.quantum.constants import hbar def test_wavefunction(): Psi = { 0: (1/sqrt(2 * pi)), 1: (1/sqrt(2 ...
datakortet/django-cms
refs/heads/master
cms/plugins/text/widgets/tinymce_widget.py
6
from cms.utils import cms_static_url from cms.utils.conf import get_cms_setting from django.forms.widgets import flatatt from django.template.defaultfilters import escape from django.template.loader import render_to_string from django.utils import simplejson from django.utils.encoding import smart_unicode from django.u...
HuimingCheng/AutoGrading
refs/heads/master
learning/web_Haotian/venv/Lib/site-packages/click/_winconsole.py
197
# -*- coding: utf-8 -*- # This module is based on the excellent work by Adam Bartoš who # provided a lot of what went into the implementation here in # the discussion to issue1602 in the Python bug tracker. # # There are some general differences in regards to how this works # compared to the original patches as we do n...
geminateCoder/Character-Archive-Website
refs/heads/master
Lib/site-packages/sqlalchemy/engine/url.py
34
# engine/url.py # Copyright (C) 2005-2016 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 """Provides the :class:`~sqlalchemy.engine.url.URL` class which encapsulates informati...
LingxiaoJIA/gem5
refs/heads/master
src/mem/cache/BaseCache.py
4
# Copyright (c) 2012-2013 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functiona...
CourseTalk/edx-platform
refs/heads/master
common/lib/symmath/symmath/test_symmath_check.py
166
from unittest import TestCase from .symmath_check import symmath_check class SymmathCheckTest(TestCase): def test_symmath_check_integers(self): number_list = [i for i in range(-100, 100)] self._symmath_check_numbers(number_list) def test_symmath_check_floats(self): number_list = [i + ...
harrisonfeng/locust
refs/heads/master
locust/test/test_taskratio.py
32
import unittest from locust.core import Locust, TaskSet, task from locust.inspectlocust import get_task_ratio_dict class TestTaskRatio(unittest.TestCase): def test_task_ratio_command(self): class Tasks(TaskSet): @task def root_task1(self): pass @task ...
chrispitzer/toucan-sam
refs/heads/master
toucansam/core/urls.py
1
from django.conf.urls import patterns, url from core import views urlpatterns = patterns('', url(r'^/?$', views.SongListView.as_view(), name='song_list'), url(r'^songs/?$', views.SongListView.as_view(), name='song_list'), url(r'^set_list/(?P<set_list_id>\d+|new)/?$', views.SetListView.as_view(), name='set_...
public-ink/public-ink
refs/heads/master
server/appengine/lib/graphql_relay/node/plural.py
2
from collections import OrderedDict from promise import Promise from graphql.type import ( GraphQLArgument, GraphQLList, GraphQLNonNull, GraphQLField ) def plural_identifying_root_field(arg_name, input_type, output_type, resolve_single_input, description=None): input_args = OrderedDict() input...
KDra/SU2
refs/heads/master
TestCases/parallel_regression_AD.py
3
#!/usr/bin/env python ## \file parallel_regression.py # \brief Python script for automated regression testing of SU2 examples # \author A. Aranake, A. Campos, T. Economon, T. Lukaczyk, S. Padron # \version 5.0.0 "Raven" # # SU2 Lead Developers: Dr. Francisco Palacios (Francisco.D.Palacios@boeing.com). # ...
vorwerkc/pymatgen
refs/heads/master
pymatgen/util/tests/test_coord.py
5
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import random from pymatgen.core.lattice import Lattice from pymatgen.util.coord import * from pymatgen.util.testing import PymatgenTest class CoordUtilsTest(PymatgenTest): def test_get_linear_interpola...
pigshell/nhnick
refs/heads/vnc-websocket
src/qt/qtwebkit/Tools/Scripts/webkitpy/port/factory_unittest.py
118
# 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 f...
DirtyUnicorns/android_external_chromium_org
refs/heads/lollipop
tools/telemetry/telemetry/core/platform/linux_platform_backend.py
25
# 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. import logging import os import subprocess import sys from telemetry import decorators from telemetry.core.platform import linux_based_platform_backend from...
RenderBroken/Victara-CM-kernel
refs/heads/cm-12.1
scripts/gcc-wrapper.py
182
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2011-2012, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain th...
jonathonwalz/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/rds.py
24
#!/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 distributed...
sergio-incaser/odoo
refs/heads/8.0
addons/l10n_fr/wizard/fr_report_compute_resultant.py
374
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential #...
GaZ3ll3/scikit-image
refs/heads/master
skimage/feature/tests/__init__.py
672
from ..._shared.testing import setup_test, teardown_test def setup(): setup_test() def teardown(): teardown_test()
bradleyy/django-sqlserver
refs/heads/master
sqlserver/compiler.py
1
from __future__ import absolute_import, unicode_literals import django from django.db.utils import DatabaseError from django.db.transaction import TransactionManagementError from django.db.models.sql import compiler import re import six import sqlserver_ado.compiler NEEDS_AGGREGATES_FIX = django.VERSION[:2] < (1, 7) ...
zerolab/wagtail
refs/heads/main
wagtail/contrib/styleguide/tests.py
24
from django.test import TestCase from django.urls import reverse from wagtail.tests.utils import WagtailTestUtils class TestStyleGuide(TestCase, WagtailTestUtils): def setUp(self): self.login() def test_styleguide(self): response = self.client.get(reverse('wagtailstyleguide')) self....
portableant/open-context-py
refs/heads/master
opencontext_py/apps/ldata/linkannotations/recursion.py
1
import hashlib from django.db import models from django.db.models import Q from opencontext_py.libs.general import LastUpdatedOrderedDict from opencontext_py.apps.entities.uri.models import URImanagement from opencontext_py.apps.entities.entity.models import Entity from opencontext_py.apps.ldata.linkannotations.models ...
byakatat/selenium-training
refs/heads/master
test_task14.py
1
import pytest from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.wait import WebDriverWait @pytest.fixture def driver(request): wd = webdriver.Chrome() wd.maximize_window() # Login to a...
Endika/event
refs/heads/8.0
event_track_generate/wizards/wizard_generator.py
2
# -*- coding: utf-8 -*- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # © 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. from datetime import datetime, timedelta from pytz import timezone from openerp import _, api, fields, models from openerp.exceptions import ValidationError class Generator...
jimi-c/ansible
refs/heads/devel
lib/ansible/modules/cloud/vultr/vultr_startup_script_facts.py
27
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2018, Yanis Guenane <yanis+ansible@guenane.org> # 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':...
bcarroll/authmgr
refs/heads/master
python-3.6.2-Win64/Lib/site-packages/psycopg2/tests/test_types_basic.py
16
#!/usr/bin/env python # # types_basic.py - tests for basic types conversions # # Copyright (C) 2004-2010 Federico Di Gregorio <fog@debian.org> # # psycopg2 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 Foundatio...
ebar0n/django
refs/heads/master
django/templatetags/i18n.py
25
from django.conf import settings from django.template import Library, Node, TemplateSyntaxError, Variable from django.template.base import TOKEN_TEXT, TOKEN_VAR, render_value_in_context from django.template.defaulttags import token_kwargs from django.utils import translation from django.utils.safestring import SafeData...
tuhangdi/django
refs/heads/master
django/db/backends/oracle/client.py
518
import subprocess from django.db.backends.base.client import BaseDatabaseClient class DatabaseClient(BaseDatabaseClient): executable_name = 'sqlplus' def runshell(self): conn_string = self.connection._connect_string() args = [self.executable_name, "-L", conn_string] subprocess.call(a...
ulmon/hadoop1.2.1
refs/heads/master
src/contrib/hod/hodlib/ServiceProxy/serviceProxy.py
182
#Licensed to the Apache Software Foundation (ASF) under one #or more contributor license agreements. See the NOTICE file #distributed with this work for additional information #regarding copyright ownership. The ASF licenses this file #to you under the Apache License, Version 2.0 (the #"License"); you may not use thi...
mdietrichc2c/OCB
refs/heads/8.0
addons/account/wizard/account_report_common_account.py
371
# -*- 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...
cchanning/Impala
refs/heads/cdh5-trunk
thirdparty/thrift-0.9.0/lib/py/src/transport/TSSLSocket.py
28
# # 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...
mikewiebe-ansible/ansible
refs/heads/devel
test/units/modules/network/fortios/test_fortios_router_setting.py
21
# Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the...
philchristensen/modu
refs/heads/master
src/modu/itemdefs/__init__.py
1
# modu # Copyright (c) 2006-2010 Phil Christensen # http://modu.bubblehouse.org # # # See LICENSE for details """ Base package for itemdef discovery. """ import os, sys __path__ = [os.path.abspath(os.path.join(x, 'modu', 'itemdefs')) for x in sys.path] __all__ = []
UstadMobile/eXePUB
refs/heads/master
twisted/trial/test/test_runner.py
14
# -*- test-case-name: twisted.trial.test.test_runner -*- # Copyright (c) 2005 Twisted Matrix Laboratories. # See LICENSE for details. # # Author: Robert Collins <robertc@robertcollins.net> import os from zope.interface import implements from twisted.trial.itrial import IReporter from twisted.trial import unittest, r...
s40523127/2017springwcm_g4
refs/heads/gh-pages
plugin/liquid_tags/flickr.py
278
""" Flickr Tag ---------- This implements a Liquid-style flickr tag for Pelican. IMPORTANT: You have to create a API key to access the flickr api. You can do this `here <https://www.flickr.com/services/apps/create/apply>`_. Add the created key to your config under FLICKR_API_KEY. Syntax ------ {% flickr image_id [sma...
espressif/ESP8266_RTOS_SDK
refs/heads/master
tools/idf_tools.py
1
#!/usr/bin/env python # coding=utf-8 # # This script helps installing tools required to use the ESP-IDF, and updating PATH # to use the installed tools. It can also create a Python virtual environment, # and install Python requirements into it. # It does not install OS dependencies. It does install tools such as the X...
Microvellum/Fluid-Designer
refs/heads/master
win64-vc/2.78/python/lib/xmlrpc/client.py
2
# # XML-RPC CLIENT LIBRARY # $Id$ # # an XML-RPC client interface for Python. # # the marshalling and response parser code can also be used to # implement XML-RPC servers. # # Notes: # this version is designed to work with Python 2.1 or newer. # # History: # 1999-01-14 fl Created # 1999-01-15 fl Changed dateTime to u...
steveb/heat
refs/heads/master
heat/httpd/heat_api_cfn.py
3
#!/usr/bin/env python # # 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 ...
goddardl/gaffer
refs/heads/master
python/GafferUI/BusyWidget.py
2
########################################################################## # # Copyright (c) 2012, Image Engine Design 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: # # * Redistrib...
wooyek/nuntio
refs/heads/master
web/common/appenginepatch/ragendja/template.py
1
# -*- coding: utf-8 -*- """ This is a set of utilities for faster development with Django templates. render_to_response() and render_to_string() use RequestContext internally. The app_prefixed_loader is a template loader that loads directly from the app's 'templates' folder when you specify an app prefix ('app/templa...
prymitive/upaas-admin
refs/heads/master
upaas_admin/common/__init__.py
23
# -*- coding: utf-8 -*- """ :copyright: Copyright 2013-2014 by Łukasz Mierzwa :contact: l.mierzwa@gmail.com """
fillycheezstake/MissionPlanner
refs/heads/master
Lib/csv.py
55
""" csv.py - read/write/investigate CSV files """ import re from functools import reduce from _csv import Error, __version__, writer, reader, register_dialect, \ unregister_dialect, get_dialect, list_dialects, \ field_size_limit, \ QUOTE_MINIMAL, QUOTE_ALL,...
jskew/gnuradio
refs/heads/master
gr-blocks/python/blocks/qa_throttle.py
57
#!/usr/bin/env python # # Copyright 2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # ...
mwatts15/PyOpenWorm
refs/heads/master
PyOpenWorm/connection.py
1
""" .. class:: Connection connection ============= Connection between neurons """ from PyOpenWorm import Relationship class Connection(Relationship): def __init__(self, pre_cell, post_cell, number, syntype, synclass): ...
matichorvat/pydelphin
refs/heads/master
delphin/itsdb.py
1
""" The itsdb module makes it easy to work with [incr tsdb()] profiles. The ItsdbProfile class works with whole profiles, but it generally relies on the module-level functions to do its work (such as get_relations() or decode_row()). Queries over profiles can be customized through the use of filters (see filter_rows())...
apanju/GMIO_Odoo
refs/heads/8.0
addons/auth_oauth/res_config.py
292
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
sudheesh001/oh-mainline
refs/heads/master
vendor/packages/Django/django/core/mail/backends/smtp.py
130
"""SMTP email backend class.""" import smtplib import ssl import threading from django.conf import settings from django.core.mail.backends.base import BaseEmailBackend from django.core.mail.utils import DNS_NAME from django.core.mail.message import sanitize_address from django.utils.encoding import force_bytes class...
PaulAYoung/f2014_iolab
refs/heads/master
pymongoProject/venv/lib/python2.7/site-packages/pymongo/auth.py
13
# Copyright 2013-2014 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
uglyboxer/linear_neuron
refs/heads/master
net-p3/lib/python3.5/site-packages/numpy/distutils/lib2def.py
193
from __future__ import division, absolute_import, print_function import re import sys import os import subprocess __doc__ = """This module generates a DEF file from the symbols in an MSVC-compiled DLL import library. It correctly discriminates between data and functions. The data is collected from the output of the...
cooperhewitt/py-cooperhewitt-roboteyes-shannon
refs/heads/master
setup.py
1
#!/usr/bin/env python from setuptools import setup, find_packages packages = find_packages() desc = open("README.md").read(), setup( name='cooperhewitt.roboteyes.shannon', namespace_packages=['cooperhewitt', 'cooperhewitt.roboteyes'], version='0.2', description='', author='Cooper Hewitt Smithsoni...
signed/intellij-community
refs/heads/master
python/testData/inspections/PyMethodMayBeStaticInspection/staticMethod.py
83
__author__ = 'ktisha' class Foo(object): @staticmethod def foo(param): # <-method here should not be highlighted return "foo"
cloudbase/cinder
refs/heads/master
cinder/tests/unit/backup/drivers/test_backup_posix.py
6
# Copyright (c) 2015 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 require...
sfumato77/Kernel-4.8_Android-x86_BayTrail
refs/heads/master
tools/perf/scripts/python/check-perf-trace.py
1997
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
IlyaGusev/PoetryCorpus
refs/heads/master
poetry/apps/accounts/migrations/0002_auto_20170415_0020.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-04-15 00:20 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('auth', '0008_alter_user_username_max_length'), ('accounts', '0001_initial'), ] ...
jO-Osko/adventofcode2015
refs/heads/master
2015/problems/day19.py
1
DAY = 19 def part1(data): changes, start = parse_data(data.split("\n")) return len(make_next(start, changes)) def parse_data(data, reverse=False): changes = [] for line in data: if not line.strip(): break if reverse: changes.append(list(reversed(line.strip().spl...
twiest/openshift-tools
refs/heads/stg
openshift/installer/vendored/openshift-ansible-3.6.173.0.59/roles/openshift_health_checker/openshift_checks/etcd_traffic.py
7
"""Check that scans journalctl for messages caused as a symptom of increased etcd traffic.""" from openshift_checks import OpenShiftCheck class EtcdTraffic(OpenShiftCheck): """Check if host is being affected by an increase in etcd traffic.""" name = "etcd_traffic" tags = ["health", "etcd"] def is_a...
walac/build-mozharness
refs/heads/master
configs/b2g_bumper/v2.1.py
2
#!/usr/bin/env python config = { "exes": { # Get around the https warnings "hg": ['/usr/local/bin/hg', "--config", "web.cacerts=/etc/pki/tls/certs/ca-bundle.crt"], "hgtool.py": ["/usr/local/bin/hgtool.py"], "gittool.py": ["/usr/local/bin/gittool.py"], }, 'gecko_pull_url': 'ht...
zephyrplugins/zephyr
refs/heads/master
zephyr.plugin.jython/jython2.5.2rc3/Lib/test/test_old_mailbox.py
11
# This set of tests exercises the backward-compatibility class # in mailbox.py (the ones without write support). from __future__ import with_statement import mailbox import os import time import unittest from test import test_support # cleanup earlier tests try: os.unlink(test_support.TESTFN) except os.error: ...
FelixLoether/blog-project
refs/heads/master
blog/users/__init__.py
1
from blog import db, app from sqlalchemy import Column, Integer, String from passlib.apps import custom_app_context as pwd_context class User(db.Base): __tablename__ = 'users' id = Column(Integer, primary_key=True) name = Column(String, unique=True) password = Column(String) def __init__(self, n...
ilay09/keystone
refs/heads/master
keystone/common/sql/data_migration_repo/versions/003_migrate_unencrypted_credentials.py
5
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
jss-emr/openerp-7-src
refs/heads/master
openerp/tools/config.py
31
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
Graha/kubernetes
refs/heads/master
hack/jenkins/test-history/gen_html_test.py
12
#!/usr/bin/env python # Copyright 2016 The Kubernetes 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 # # Unle...
stefanw/django-cms
refs/heads/develop
cms/south_migrations/0069_static_placeholder_permissions.py
48
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import DataMigration from django.db import models try: from django.contrib.auth import get_user_model except ImportError: # django < 1.5 from django.contrib.auth.models import User else: User = ...
robjohnson189/home-assistant
refs/heads/dev
homeassistant/components/binary_sensor/modbus.py
28
""" Support for Modbus Coil sensors. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/binary_sensor.modbus/ """ import logging import voluptuous as vol import homeassistant.components.modbus as modbus from homeassistant.const import CONF_NAME from homeass...
LogicalDash/kivy
refs/heads/master
examples/widgets/camera.py
71
from kivy.app import App from kivy.lang import Builder kv = ''' BoxLayout: orientation: 'vertical' Camera: id: camera resolution: 399, 299 BoxLayout: orientation: 'horizontal' size_hint_y: None height: '48dp' Button: text: 'Start' o...
drpngx/tensorflow
refs/heads/master
tensorflow/contrib/timeseries/python/timeseries/state_management.py
67
# Copyright 2017 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...
teq10/learngit
refs/heads/master
hzlu-github.py
150
print "hello, thank you for your GIT Tutorial."
lasombra/rhiot
refs/heads/master
dockerfiles/openalpr/src/main/docker/2.2.0/src/bindings/python/test.py
18
from openalpr import Alpr from argparse import ArgumentParser parser = ArgumentParser(description='OpenALPR Python Test Program') parser.add_argument("-c", "--country", dest="country", action="store", default="us", help="License plate Country" ) parser.add_argument("--config", dest="config", action...
agrista/odoo-saas
refs/heads/master
addons/mrp/company.py
381
# -*- 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...
JohnDenker/brython
refs/heads/master
www/src/Lib/atexit.py
743
"""allow programmer to define multiple exit functions to be executedupon normal program termination. Two public functions, register and unregister, are defined. """ class __loader__(object): pass def _clear(*args,**kw): """_clear() -> None Clear the list of previously registered exit functions.""" ...
dwightgunning/django
refs/heads/master
tests/mail/tests.py
119
# -*- coding: utf-8 -*- from __future__ import unicode_literals import asyncore import mimetypes import os import shutil import smtpd import sys import tempfile import threading from email.mime.text import MIMEText from smtplib import SMTP, SMTPException from ssl import SSLError from django.core import mail from djan...
shaunstanislaus/pyexperiment
refs/heads/master
pyexperiment/__init__.py
4
"""The pyexperiment module - quick and clean experiments with Python. """ from pyexperiment.version import __version__ from pyexperiment.utils.Singleton import delegate_singleton # For convenience, set up the basic tools here # pylint: disable=invalid-name from pyexperiment.Config import Config conf = delegate_single...
salomon1184/bite-project
refs/heads/master
tools/bugs/server/appengine/models/url_bug_map/get_bugs.py
17
# Copyright 2011 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 a...
kobejean/tensorflow
refs/heads/master
tensorflow/compiler/tests/eager_test.py
11
# 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...
mbareta/edx-platform-ft
refs/heads/open-release/eucalyptus.master
common/djangoapps/django_comment_common/migrations/0002_forumsconfig.py
24
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('django_c...
stevenbrichards/boto
refs/heads/develop
tests/integration/s3/mock_storage_service.py
108
# Copyright 2010 Google Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # trib...
coderfi/ansible-modules-extras
refs/heads/devel
packaging/portage.py
12
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Yap Sok Ann # Written by Yap Sok Ann <sokann@gmail.com> # Based on apt module written by Matthew Williams <matthew@flowroute.com> # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publi...
DrDaveD/cvmfs
refs/heads/devel
cvmfs/shrinkwrap/scripts/docker_inject/docker_injector.py
2
# # This file is part of the CernVM File System. # from datetime import datetime, timezone from dxf import DXF, hash_file, hash_bytes from dxf.exceptions import DXFUnauthorizedError import json import subprocess import tarfile import tempfile from requests.exceptions import HTTPError import os import zlib def exec_ba...
so3500/volttron-kafka
refs/heads/master
Test/pub_server.py
1
import zmq import random import sys import time port = '5556' if len(sys.argv) > 1: port = sys.argv[1] int(port) context = zmq.Context() socket = context.socket(zmq.PUB) socket.bind('tcp://*:%s' % port) new_value = 0 write_topic = "fake-campus/fake-building/fake-device/PowerState" # message_data = { # '...
notrinsa/DongerBot
refs/heads/master
config.default.py
1
#!/usr/bin/env python # server.address .port .pass .channel # IRC Address Configuration server = { 'address': 'irc.redditairfrance.fr', 'port': 6697, 'pass': None, 'channel': '#reddit' } donger_nick = "donger" donger_pass = "donger" hostnames = ["redd.it"] # MySQL database = { 'name': 'donger', ...
NEricN/RobotCSimulator
refs/heads/master
Python/App/Lib/encodings/shift_jis.py
816
# # shift_jis.py: Python Unicode Codec for SHIFT_JIS # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_jp, codecs import _multibytecodec as mbc codec = _codecs_jp.getcodec('shift_jis') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(mbc.Multib...
bala4901/odoo
refs/heads/master
addons/website_forum_doc/models/documentation.py
52
# -*- coding: utf-8 -*- import openerp from openerp.osv import osv, fields class Documentation(osv.Model): _name = 'forum.documentation.toc' _description = 'Documentation ToC' _inherit = ['website.seo.metadata'] _order = "parent_left" _parent_order = "sequence, name" _parent_store = True d...
chris-wood/SCoNet
refs/heads/master
ns-3-dev/src/network/bindings/modulegen__gcc_LP64.py
14
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...