repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
bijanbrahma/SARA | refs/heads/master | Pi_navigatorClient.py | 1 | import socket
import time
import RPi.GPIO as gpio
import sys
host = 'xxx.xxx.xx.xxx' #address of the pi in the Lan, find through ifonfig
port = xxxx #random unused port, ie above 1000
s = socket.socket(socket.AF_INET, socket.SOCK_DGR... |
endlessm/chromium-browser | refs/heads/master | tools/style_variable_generator/views_generator_test.py | 1 | # Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from views_generator import ViewsStyleGenerator
import unittest
class ViewsStyleGeneratorTest(unittest.TestCase):
def setUp(self):
self.generat... |
dmitriy0611/django | refs/heads/master | scripts/manage_translations.py | 277 | #!/usr/bin/env python
#
# This python file contains utility scripts to manage Django translations.
# It has to be run inside the django git root directory.
#
# The following commands are available:
#
# * update_catalogs: check for new strings in core and contrib catalogs, and
# output how much string... |
noironetworks/python-neutronclient | refs/heads/master | neutronclient/tests/unit/bgp/test_cli20_dragentscheduler.py | 6 | # Copyright 2016 Huawei Technologies India Pvt. 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 the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... |
ShineFan/odoo | refs/heads/8.0 | addons/mrp/wizard/stock_move.py | 186 | # -*- 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... |
wojons/rethinkdb | refs/heads/next | external/v8_3.30.33.16/build/gyp/test/many-actions/gyptest-many-actions-unsorted.py | 244 | #!/usr/bin/env python
# Copyright (c) 2012 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.
"""
Make sure lots of actions in the same target don't cause exceeding command
line length.
"""
import TestGyp
test = TestGyp.TestGyp()
t... |
thdtjsdn/FreeCAD | refs/heads/master | src/Mod/MeshPart/Init.py | 55 | # FreeCAD init script of the MeshPart module
# (c) 2001 Juergen Riegel
#***************************************************************************
#* (c) Juergen Riegel (juergen.riegel@web.de) 2002 *
#* *
#* T... |
gurneyalex/OpenUpgrade | refs/heads/master | addons/mrp_operations/report/mrp_code_barcode.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... |
bitcity/django | refs/heads/master | tests/migrations/migrations_test_apps/lookuperror_a/__init__.py | 12133432 | |
delhivery/django | refs/heads/master | django/contrib/redirects/migrations/__init__.py | 12133432 | |
dsajkl/123 | refs/heads/master | lms/djangoapps/shoppingcart/tests/__init__.py | 12133432 | |
nutztherookie/wagtail | refs/heads/master | wagtail/wagtailsnippets/views/__init__.py | 12133432 | |
ericzolf/ansible | refs/heads/devel | hacking/build_library/build_ansible/__init__.py | 12133432 | |
cgstudiomap/cgstudiomap | refs/heads/develop | main/eggs/Shapely-1.5.9-py2.7.egg/shapely/algorithms/__init__.py | 12133432 | |
mpvoss/RickAndMortyWeatherTweets | refs/heads/master | env/lib/python3.5/site-packages/pip/_vendor/cachecontrol/filewrapper.py | 346 | from io import BytesIO
class CallbackFileWrapper(object):
"""
Small wrapper around a fp object which will tee everything read into a
buffer, and when that file is closed it will execute a callback with the
contents of that buffer.
All attributes are proxied to the underlying file object.
Thi... |
thomasgilgenast/gilgistatus-nonrel | refs/heads/master | django/contrib/localflavor/it/it_province.py | 406 | # -*- coding: utf-8 -*
PROVINCE_CHOICES = (
('AG', 'Agrigento'),
('AL', 'Alessandria'),
('AN', 'Ancona'),
('AO', 'Aosta'),
('AR', 'Arezzo'),
('AP', 'Ascoli Piceno'),
('AT', 'Asti'),
('AV', 'Avellino'),
('BA', 'Bari'),
('BT', 'Barletta-Andria-Trani'), # active starting from 2009
... |
0x7678/gr-gsm | refs/heads/master | python/qa_msg_to_tag.py | 2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @file
# @author (C) 2016 by Piotr Krysik <ptrkrysik@gmail.com>
# @section LICENSE
#
# Gr-gsm 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, o... |
fly19890211/edx-platform | refs/heads/master | common/test/acceptance/pages/studio/index.py | 102 | """
Studio Home page
"""
from bok_choy.page_object import PageObject
from . import BASE_URL
class DashboardPage(PageObject):
"""
Studio Home page
"""
url = BASE_URL + "/course/"
def is_browser_on_page(self):
return self.q(css='body.view-dashboard').present
@property
def course_... |
theheros/kbengine | refs/heads/master | kbe/res/scripts/common/Lib/multiprocessing/util.py | 3 | #
# Module providing various facilities to other parts of the package
#
# multiprocessing/util.py
#
# Copyright (c) 2006-2008, R Oudkerk
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:... |
sirmmo/umarells.org | refs/heads/master | cityfix/migrations/0006_auto__chg_field_pics_pic.py | 1 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'Pics.pic'
db.alter_column(u'cityfix_pics', 'pic', self... |
MakeHer/edx-platform | refs/heads/dashboard.2 | common/djangoapps/external_auth/login_and_register.py | 150 | """Intercept login and registration requests.
This module contains legacy code originally from `student.views`.
"""
import re
from django.conf import settings
from django.shortcuts import redirect
from django.core.urlresolvers import reverse
import external_auth.views
from xmodule.modulestore.django import modulesto... |
sunqb/oa_qian | refs/heads/master | flask/Lib/site-packages/flask_sqlalchemy/_compat.py | 175 | # -*- coding: utf-8 -*-
"""
flaskext.sqlalchemy._compat
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Internal Python 2.x/3.x compatibility layer.
:copyright: (c) 2013 by Daniel Neuhäuser
:license: BSD, see LICENSE for more details.
"""
import sys
PY2 = sys.version_info[0] == 2
if PY2:
def iteritems(d):
... |
studoret/miclooper | refs/heads/master | miclooper/utils/task.py | 1 | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
"""
task
############
Copyright 2016 Stephane Tudoret
This file is part of miclooper, a python micro looper application.
miclooper 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 So... |
skeenp/Roam | refs/heads/master | src/configmanager/ui/__init__.py | 25 | __author__ = 'nathan.woodrow'
|
schleichdi2/OPENNFR-6.0-CORE | refs/heads/master | opennfr-openembedded-core/scripts/pybootchartgui/pybootchartgui.py | 8 | #!/usr/bin/env python
#
# This file is part of pybootchartgui.
# pybootchartgui 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.
... |
viniciusgama/blog_gae | refs/heads/master | django/contrib/webdesign/lorem_ipsum.py | 439 | """
Utility functions for generating "lorem ipsum" Latin text.
"""
import random
COMMON_P = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo con... |
google-code/android-scripting | refs/heads/master | python/src/Lib/plat-mac/Audio_mac.py | 73 | QSIZE = 100000
error='Audio_mac.error'
from warnings import warnpy3k
warnpy3k("In 3.x, the Play_Audio_mac module is removed.", stacklevel=2)
class Play_Audio_mac:
def __init__(self, qsize=QSIZE):
self._chan = None
self._qsize = qsize
self._outrate = 22254
self._sampwidth = 1
... |
michellab/Sire | refs/heads/devel | wrapper/Mol/special_code.py | 1 | ###############################################
#
# This file contains special code to help
# with the wrapping of SireVol classes
#
#
import sys
import pickle
from pyplusplus.module_builder import call_policies
sys.path.append("../AutoGenerate")
from scanheaders import *
atomprops = pickle.load( open("atomprops.da... |
codesparkle/youtube-dl | refs/heads/master | youtube_dl/extractor/savefrom.py | 185 | # coding: utf-8
from __future__ import unicode_literals
import os.path
import re
from .common import InfoExtractor
class SaveFromIE(InfoExtractor):
IE_NAME = 'savefrom.net'
_VALID_URL = r'https?://[^.]+\.savefrom\.net/\#url=(?P<url>.*)$'
_TEST = {
'url': 'http://en.savefrom.net/#url=http://yout... |
Zhongqilong/kbengine | refs/heads/master | kbe/res/scripts/common/Lib/xml/dom/xmlbuilder.py | 873 | """Implementation of the DOM Level 3 'LS-Load' feature."""
import copy
import xml.dom
from xml.dom.NodeFilter import NodeFilter
__all__ = ["DOMBuilder", "DOMEntityResolver", "DOMInputSource"]
class Options:
"""Features object that has variables set for each DOMBuilder feature.
The DOMBuilder class uses a... |
jimklo/LearningRegistry | refs/heads/master | data-pumps/del-contents.py | 2 | # Copyright 2011 SRI International
#
# 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 appl... |
mycelial/spore | refs/heads/master | jni/pjsip/sources/tests/pjsua/scripts-sendto/252_multipart_ok_clutter.py | 57 | # $Id: 252_multipart_ok_clutter.py 3243 2010-08-01 09:48:51Z bennylp $
import inc_sip as sip
import inc_sdp as sdp
body = \
"""
This is the preamble. It is to be ignored, though it
is a handy place for composition agents to include an
explanatory note to non-MIME conformant readers.
--123:45
Content-Type: text/plain... |
shams169/pythonProject | refs/heads/master | env/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/util/request.py | 780 | from __future__ import absolute_import
from base64 import b64encode
from ..packages.six import b
ACCEPT_ENCODING = 'gzip,deflate'
def make_headers(keep_alive=None, accept_encoding=None, user_agent=None,
basic_auth=None, proxy_basic_auth=None, disable_cache=None):
"""
Shortcuts for generatin... |
dezynetechnologies/odoo | refs/heads/8.0 | addons/sale_layout/models/sale_layout.py | 180 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... |
janusnic/main-pyflakes | refs/heads/master | pyflakes/messages.py | 14 | """
Provide the class Message and its subclasses.
"""
class Message(object):
message = ''
message_args = ()
def __init__(self, filename, loc):
self.filename = filename
self.lineno = loc.lineno
self.col = getattr(loc, 'col_offset', 0)
def __str__(self):
return '%s:%s: ... |
ewdurbin/raven-python | refs/heads/master | tests/__init__.py | 63 | VERSION = 1.0
|
hgl888/chromium-crosswalk-efl | refs/heads/efl/crosswalk-10/39.0.2171.19 | third_party/cython/src/Cython/Tempita/__init__.py | 101 | # The original Tempita implements all of its templating code here.
# Moved it to _tempita.py to make the compilation portable.
from _tempita import *
|
Adnn/django | refs/heads/master | django/core/mail/backends/base.py | 577 | """Base email backend class."""
class BaseEmailBackend(object):
"""
Base class for email backend implementations.
Subclasses must at least overwrite send_messages().
open() and close() can be called indirectly by using a backend object as a
context manager:
with backend as connection:
... |
lizardsystem/lizard5-apps | refs/heads/master | lizard_wms/testsettings.py | 1 | import logging
import os
from lizard_ui.settingshelper import STATICFILES_FINDERS
logging.basicConfig(
level=logging.DEBUG,
format='%(name)s %(levelname)s %(message)s')
DEBUG = True
TEMPLATE_DEBUG = True
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = 'test.db'
SITE_ID = 1
INSTALLED_APPS = [
'lizard_wms',
... |
jgoclawski/django | refs/heads/master | django/contrib/gis/db/backends/spatialite/models.py | 510 | """
The GeometryColumns and SpatialRefSys models for the SpatiaLite backend.
"""
from django.contrib.gis.db.backends.base.models import SpatialRefSysMixin
from django.contrib.gis.db.backends.spatialite.base import DatabaseWrapper
from django.db import connection, models
from django.db.backends.signals import connectio... |
morreene/tradenews | refs/heads/master | venv/Lib/site-packages/pip/_vendor/html5lib/_inputstream.py | 328 | from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type, binary_type
from pip._vendor.six.moves import http_client, urllib
import codecs
import re
from pip._vendor import webencodings
from .constants import EOF, spaceCharacters, asciiLetters, asciiUppercase
from .con... |
VirusTotal/misp-modules | refs/heads/master | misp_modules/modules/import_mod/ocr.py | 2 | import sys
import json
import base64
from io import BytesIO
import logging
log = logging.getLogger('ocr')
log.setLevel(logging.DEBUG)
ch = logging.StreamHandler(sys.stdout)
ch.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
ch.setFormatter(formatter)
log.a... |
atodorov/anaconda | refs/heads/master | pyanaconda/modules/storage/storage_interface.py | 6 | #
# DBus interface for the storage.
#
# Copyright (C) 2018 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program is dist... |
eugene1g/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/Scripts/webkitpy/common/checkout/__init__.py | 135 | # Required for Python to search this directory for module files
from .checkout import Checkout
|
harlanhaskins/swift | refs/heads/master | utils/pass-pipeline/src/pass_pipeline_library.py | 77 |
import pass_pipeline as ppipe
import passes as p
def simplifycfg_silcombine_passlist():
return ppipe.PassList([
p.SimplifyCFG,
p.SILCombine,
p.SimplifyCFG,
])
def highlevel_loopopt_passlist():
return ppipe.PassList([
p.LowerAggregateInstrs,
p.SILCombine,
... |
habibmasuro/kivy | refs/heads/master | kivy/uix/spinner.py | 24 | '''
Spinner
=======
.. versionadded:: 1.4.0
.. image:: images/spinner.jpg
:align: right
Spinner is a widget that provides a quick way to select one value from a set.
In the default state, a spinner shows its currently selected value.
Touching the spinner displays a dropdown menu with all the other available
valu... |
bsmrstu-warriors/Moytri--The-Drone-Aider | refs/heads/master | Lib/site-packages/numpy/doc/glossary.py | 81 | """
========
Glossary
========
along an axis
Axes are defined for arrays with more than one dimension. A
2-dimensional array has two corresponding axes: the first running
vertically downwards across rows (axis 0), and the second running
horizontally across columns (axis 1).
Many operation can tak... |
zedr/django | refs/heads/master | docs/_ext/djangodocs.py | 15 | """
Sphinx plugins for Django documentation.
"""
import json
import os
import re
from docutils import nodes
from docutils.parsers.rst import directives
from sphinx import addnodes, __version__ as sphinx_ver
from sphinx.builders.html import StandaloneHTMLBuilder
from sphinx.writers.html import SmartyPantsHTMLTranslato... |
mikebryant/django-autoconfig | refs/heads/master | django_autoconfig/app_settings.py | 1 | '''Application settings for django-autoconfig.'''
from django.conf import settings
#: Extra URLs for autourlconf
AUTOCONFIG_EXTRA_URLS = getattr(settings, 'AUTOCONFIG_EXTRA_URLS', ())
#: A list/tuple of apps to exclude from the autourlconf
AUTOCONFIG_URLCONF_EXCLUDE_APPS = getattr(settings, 'AUTOCONFIG_URLCONF_EXCLU... |
potash/scikit-learn | refs/heads/master | examples/covariance/plot_robust_vs_empirical_covariance.py | 73 | r"""
=======================================
Robust vs Empirical covariance estimate
=======================================
The usual covariance maximum likelihood estimate is very sensitive to the
presence of outliers in the data set. In such a case, it would be better to
use a robust estimator of covariance to guar... |
romankagan/DDBWorkbench | refs/heads/master | python/testData/refactoring/introduceVariable/multilineString.py | 83 | for line in <selection>"""A
B
C"""</selection>:
print line |
Linutux/Gourmet | refs/heads/master | gourmet/exporters/recipe_emailer.py | 7 | #!/usr/bin/env python
import urllib, StringIO, os.path
import exporter, html_exporter, pdf_exporter
from gourmet import gglobals
from gettext import gettext as _
import gourmet.gtk_extras.dialog_extras as de
from gourmet.gdebug import debug
class StringIOfaker (StringIO.StringIO):
def __init__ (self, *args, **kwar... |
13916688528/themort | refs/heads/master | retrieval/mortgages/mc_util.py | 4 | # vim: set fileencoding=utf-8
# Utility functions
import mc_db
import main
import urllib2
import html5lib
import re
import string
import themortgagemeter_utils
import themortgagemeter_db
# Given a string, extracts the percent value as a decimal string
# Returns blank string if none could be found
# Takes string like... |
gminds/rapidnewsng | refs/heads/master | django/db/backends/postgresql_psycopg2/base.py | 103 | """
PostgreSQL database backend for Django.
Requires psycopg 2: http://initd.org/projects/psycopg2
"""
import logging
import sys
from django.db import utils
from django.db.backends import *
from django.db.backends.signals import connection_created
from django.db.backends.postgresql_psycopg2.operations import Database... |
Tehsmash/ironic | refs/heads/staging/kiloplus | ironic/tests/db/utils.py | 2 | # Copyright 2013 Hewlett-Packard Development Company, L.P.
# 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... |
toninhofpt/my-first-blog1 | refs/heads/master | myven/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/fields.py | 200 | from __future__ import absolute_import
import email.utils
import mimetypes
from .packages import six
def guess_content_type(filename, default='application/octet-stream'):
"""
Guess the "Content-Type" of a file.
:param filename:
The filename to guess the "Content-Type" of using :mod:`mimetypes`.
... |
pellaeon/bsd-cloudinit | refs/heads/master | cloudbaseinit/openstack/common/rpc/amqp.py | 5 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright 2011 - 2012, Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance w... |
gauribhoite/personfinder | refs/heads/master | rtd/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/chardistribution.py | 2754 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... |
lavvy/xbmc | refs/heads/master | lib/gtest/xcode/Scripts/versiongenerate.py | 3088 | #!/usr/bin/env python
#
# Copyright 2008, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... |
zmalltalker/pytrafikanten | refs/heads/master | setup.py | 1 | from distutils.core import setup
import trafikanten
author, email = trafikanten.__author__[:-1].split(' <')
setup(name='trafikanten',
version=trafikanten.__version__,
description="Interface for realtime data from Norwegian public transportation",
long_description=trafikanten.__doc__,
author=au... |
synasius/django | refs/heads/master | tests/unmanaged_models/tests.py | 23 | from __future__ import unicode_literals
from django.db import connection
from django.test import TestCase
from .models import A01, A02, B01, B02, C01, C02, Managed1, Unmanaged2
class SimpleTests(TestCase):
def test_simple(self):
"""
The main test here is that the all the models can be created w... |
alexthered/kienhoc-platform | refs/heads/master | common/djangoapps/student/models.py | 9 | """
Models for User Information (students, staff, etc)
Migration Notes
If you make changes to this model, be sure to create an appropriate migration
file and check it in at the same time as your model changes. To do that,
1. Go to the edx-platform dir
2. ./manage.py lms schemamigration student --auto description_of_... |
sthoma/flask-jumpstart | refs/heads/master | tests/backend_tests/__init__.py | 12133432 | |
KaranToor/MA450 | refs/heads/master | google-cloud-sdk/.install/.backup/lib/third_party/prompt_toolkit/eventloop/__init__.py | 12133432 | |
Mixser/django | refs/heads/master | django/contrib/staticfiles/templatetags/__init__.py | 12133432 | |
Daarknes/Gadakeco | refs/heads/master | src/context/__init__.py | 12133432 | |
lamby/ansible-modules-core | refs/heads/devel | system/group.py | 81 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Stephen Fromm <sfromm@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 Lice... |
ZECTBynmo/gyp-builder | refs/heads/master | gyp/pylib/gyp/MSVSNew.py | 225 | # Copyright (c) 2012 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.
"""New implementation of Visual Studio project generation for SCons."""
import os
import random
import gyp.common
# hashlib is supplied as of Python 2.5 as the ... |
aaboffill/django-allmedia | refs/heads/master | media/validators.py | 1 | # coding=utf-8
import magic
from django.core.exceptions import ValidationError
from django.template.defaultfilters import filesizeformat
from django.utils.translation import ugettext_lazy as _
class FileFieldValidator(object):
def __init__(self, mime_types, max_size):
super(FileFieldValidator, self).__in... |
frank10704/DF_GCS_W | refs/heads/master | MissionPlanner-master/packages/IronPython.StdLib.2.7.5-beta1/content/Lib/lib2to3/pgen2/grammar.py | 55 | # Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""This module defines the data structures used to represent a grammar.
These are a bit arcane because they are derived from the data
structures used by Python's 'pgen' parser generator.
There... |
loretoparisi/nupic | refs/heads/master | examples/opf/experiments/missing_record/simple_0/description.py | 32 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... |
jwren/intellij-community | refs/heads/master | python/helpers/py3only/docutils/parsers/__init__.py | 44 | # $Id: __init__.py 7646 2013-04-17 14:17:37Z milde $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
This package contains Docutils parser modules.
"""
__docformat__ = 'reStructuredText'
import sys
from docutils import Component
if sys.version_info < ... |
achanda/flocker | refs/heads/master | flocker/common/functional/test_ipc.py | 15 | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
Functional tests for IPC.
"""
from twisted.internet.threads import deferToThread
from twisted.python.filepath import FilePath
from twisted.trial.unittest import TestCase
from .. import ProcessNode
from ..test.test_ipc import make_inode_tests
from ...te... |
Amunak/AtomicBot | refs/heads/master | src/atomicbot/cli.py | 1 | """
Module that contains the command line app.
Why does this file exist, and why not put this in __main__?
You might be tempted to import things from __main__ later, but that will cause
problems: the code will get executed twice:
- When you run `python -matomicbot` python will execute
``__main__.py`` as a ... |
ecotux/objectDetection | refs/heads/master | 02preprocessing1.py | 1 |
#
# Optional: save blurred images
#
import re
import os
import cv2
def preprocess1(data):
img = cv2.GaussianBlur(data, (5,5), 0)
img = cv2.bilateralFilter(img,9,75,75)
img = cv2.fastNlMeansDenoisingColored(img,None,10,10,7,21)
return img
inputDir = 'crossData/'
outputDir = 'PREcrossData/'
for nameFile in os.... |
bianchimro/django-cms-fragments | refs/heads/master | cms_fragments/admin.py | 1 | from django.contrib import admin
from cms.admin.placeholderadmin import PlaceholderAdmin
from models import *
admin.site.register(Fragment)
class FragmentMembershipAdminInline(admin.StackedInline):
model = FragmentMembership
extra = 0
class FragmentCollectionAdmin(admin.ModelAdmin):
model = Fra... |
ogenstad/ansible | refs/heads/devel | lib/ansible/modules/cloud/softlayer/sl_vm.py | 52 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# 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
ANSIBLE_METADATA = {'metadata_version': '1.1',
... |
Azure/azure-sdk-for-python | refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_05_01/operations/_security_rules_operations.py | 1 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... |
himanisingla16/activitystreams-travis | refs/heads/master | components/lib/kafka-pipeline/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py | 1355 | # Copyright (c) 2013 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.
"""cmake output module
This module is under development and should be considered experimental.
This module produces cmake (2.8.8+) input as its output. One CMake... |
aeliot/openthread | refs/heads/master | tools/harness-automation/cases/commissioner_9_2_3.py | 16 | #!/usr/bin/env python
#
# Copyright (c) 2016, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# notic... |
srgblnch/Rijndael | refs/heads/master | gRijndael/ThirdLevel.py | 1 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# 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 distrib... |
tkurnosova/selenium | refs/heads/master | py/selenium/webdriver/chrome/webdriver.py | 30 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... |
mindprince/test-infra | refs/heads/master | metrics/bigquery.py | 7 | #!/usr/bin/env python
# Copyright 2017 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... |
pschmitt/home-assistant | refs/heads/dev | tests/components/openalpr_local/test_image_processing.py | 13 | """The tests for the openalpr local platform."""
import homeassistant.components.image_processing as ip
from homeassistant.const import ATTR_ENTITY_PICTURE
from homeassistant.core import callback
from homeassistant.setup import setup_component
from tests.async_mock import MagicMock, PropertyMock, patch
from tests.comm... |
SGCreations/Flask | refs/heads/master | Work/TriviaMVA/TriviaMVA/env/Lib/site-packages/setuptools/command/test.py | 285 | from setuptools import Command
from distutils.errors import DistutilsOptionError
import sys
from pkg_resources import *
from pkg_resources import _namespace_packages
from unittest import TestLoader, main
class ScanningLoader(TestLoader):
def loadTestsFromModule(self, module):
"""Return a suite of all test... |
alanconway/dispatch | refs/heads/master | python/qpid_dispatch_internal/router/engine.py | 3 | #
# 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... |
stevehof/CouchPotatoServer | refs/heads/master | libs/guessit/transfo/guess_bonus_features.py | 150 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# GuessIt - A library for guessing information from filenames
# Copyright (c) 2012 Nicolas Wack <wackou@gmail.com>
#
# GuessIt is free software; you can redistribute it and/or modify it under
# the terms of the Lesser GNU General Public License as published by
# the Free ... |
kaleidos/django-kaggregate | refs/heads/master | kaggregate/__init__.py | 1 | # -*- coding: utf-8 -*-
from .base import BaseAggregator, BaseModelAggregator
from .decorators import as_map_reduce, as_django_aggregator
from .backends import get_aggregate_value, flush_current_storage
from . import register
__all__ = ['BaseAggregator', 'BaseModelAggregator', 'as_map_reduce', 'register',
'as_dja... |
FWennerdahl/GoSublime | refs/heads/master | gstest.py | 12 | from gosubl import gs
from gosubl import mg9
import os
import re
import sublime
import sublime_plugin
DOMAIN = 'GsTest'
TEST_PAT = re.compile(r'^((Test|Example|Benchmark)\w*)')
class GsTestCommand(sublime_plugin.WindowCommand):
def is_enabled(self):
return gs.is_go_source_view(self.window.active_view())
def run... |
blazewicz/micropython | refs/heads/master | tests/inlineasm/asmbitops.py | 99 | @micropython.asm_thumb
def clz(r0):
clz(r0, r0)
print(clz(0xf0))
print(clz(0x8000))
@micropython.asm_thumb
def rbit(r0):
rbit(r0, r0)
print(hex(rbit(0xf0)))
print(hex(rbit(0x8000)))
|
nathanaevitas/odoo | refs/heads/master | openerp/addons/hr_contract/__init__.py | 381 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-Today OpenERP SA (<http://www.openerp.com)
#
# This program is free software: you can redistribute it and/or modify
# it under the term... |
kalaidin/luigi | refs/heads/master | test/contrib/_gcs_test.py | 1 | # -*- coding: utf-8 -*-
#
# Copyright 2015 Twitter 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 ... |
TDAbboud/micropython | refs/heads/master | tests/basics/string_join.py | 45 | print(','.join(()))
print(','.join(('a',)))
print(','.join(('a', 'b')))
print(','.join([]))
print(','.join(['a']))
print(','.join(['a', 'b']))
print(''.join(''))
print(''.join('abc'))
print(','.join('abc'))
print(','.join('abc' for i in range(5)))
print(b','.join([b'abc', b'123']))
try:
''.join(None)
except Typ... |
nlandais/ansible-modules-core | refs/heads/devel | inventory/group_by.py | 161 | # -*- mode: 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 distr... |
sklam/numba | refs/heads/master | numba/tests/test_api.py | 7 | import warnings
import numba
from numba import jit, njit
from numba.tests.support import TestCase
import unittest
class TestNumbaModule(TestCase):
"""
Test the APIs exposed by the top-level `numba` module.
"""
def check_member(self, name):
self.assertTrue(hasattr(numba, name), name)
... |
Awesomeomics/webserver | refs/heads/master | env/lib/python2.7/site-packages/jinja2/sandbox.py | 637 | # -*- coding: utf-8 -*-
"""
jinja2.sandbox
~~~~~~~~~~~~~~
Adds a sandbox layer to Jinja as it was the default behavior in the old
Jinja 1 releases. This sandbox is slightly different from Jinja 1 as the
default behavior is easier to use.
The behavior can be changed by subclassing the environm... |
p0psicles/SickRage | refs/heads/master | lib/feedparser/namespaces/_base.py | 43 | # Support for the Atom, RSS, RDF, and CDF feed formats
# Copyright 2010-2015 Kurt McKee <contactme@kurtmckee.org>
# Copyright 2002-2008 Mark Pilgrim
# All rights reserved.
#
# This file is a part of feedparser.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided... |
moai/mongrel2 | refs/heads/master | examples/zcov/zcov/GCovGroup.py | 96 | #!/usr/bin/python
from __future__ import division
from pprint import pprint
import cPickle
import os
import warnings
from zcov import GCovParser
class GCovGroup:
@staticmethod
def fromfile(path):
f = open(path)
try:
res = cPickle.load(f)
header,version = res[0],res[1... |
super1337/Super1337-CTF | refs/heads/master | superleetctf/wsgi.py | 1 | """
WSGI config for superleetctf project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
from whitenoise.django import ... |
schaffino/impyla | refs/heads/master | bin/register-impala-udfs.py | 6 | #! /usr/bin/env python
# Copyright 2014 Cloudera 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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.