repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
joaduo/mepinta | refs/heads/master | core/python_core/mepinta/pipeline/lo/pipeline_evaluator/__init__.py | 12133432 | |
mc-coal/mc-coal | refs/heads/master | lib/cloudstorage/rest_api.py | 45 | # Copyright 2012 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 ag... |
mwcz/pelican-plugins | refs/heads/master | thumbnailer/__init__.py | 81 | from .thumbnailer import * |
gauravbose/digital-menu | refs/heads/master | digimenu2/django/http/multipartparser.py | 105 | """
Multi-part parsing for file uploads.
Exposes one class, ``MultiPartParser``, which feeds chunks of uploaded data to
file upload handlers for processing.
"""
from __future__ import unicode_literals
import base64
import binascii
import cgi
import sys
from django.conf import settings
from django.core.exceptions imp... |
LecomteEmerick/Essentia-build | refs/heads/master | test/src/unittest/temporal/test_loudness.py | 10 | #!/usr/bin/env python
# Copyright (C) 2006-2013 Music Technology Group - Universitat Pompeu Fabra
#
# This file is part of Essentia
#
# Essentia is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation (FSF), e... |
SebasSBM/django | refs/heads/master | django/conf/project_template/project_name/urls.py | 244 | """{{ project_name }} URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/{{ docs_version }}/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.ho... |
Carmezim/tensorflow | refs/heads/master | tensorflow/tensorboard/backend/event_processing/event_file_loader.py | 68 | # 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... |
tedder/ansible | refs/heads/devel | lib/ansible/module_utils/aws/urls.py | 33 | # Copyright: (c) 2018, Aaron Haaf <aabonh@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
import datetime
import hashlib
import hmac
import operator
from ansible.module_utils.urls import open_url
from ansible.module_utils.ec2 import boto3_conn, get_aws_connectio... |
R4stl1n/allianceauth | refs/heads/master | allianceauth/services/modules/teamspeak3/signals.py | 5 | import logging
from django.db import transaction
from django.db.models.signals import m2m_changed
from django.db.models.signals import post_delete
from django.db.models.signals import post_save
from django.dispatch import receiver
from allianceauth.authentication.signals import state_changed
from .tasks import Teamspe... |
ItsAdventureTime/fail2ban | refs/heads/master | config/action.d/badips.py | 5 | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-
# vi: set ft=python sts=4 ts=4 sw=4 noet :
# This file is part of Fail2Ban.
#
# Fail2Ban 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;... |
radicalbit/ambari | refs/heads/trunk | ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/OOZIE/package/scripts/oozie_service.py | 4 | #!/usr/bin/env python
"""
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");... |
jamesblunt/gunicorn | refs/heads/master | examples/frameworks/flaskapp.py | 41 | # Run with:
#
# $ gunicorn flaskapp:app
#
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
|
kmolab/kmolab.github.io | refs/heads/master | data/Brython-3.3.4/Lib/test/test_strftime.py | 85 | """
Unittest for time.strftime
"""
import calendar
import sys
import re
from test import support
import time
import unittest
# helper functions
def fixasctime(s):
if s[8] == ' ':
s = s[:8] + '0' + s[9:]
return s
def escapestr(text, ampm):
"""
Escape text to deal with possible locale values t... |
felipebetancur/scipy | refs/heads/master | scipy/interpolate/interpolate_wrapper.py | 78 | """ helper_funcs.py.
scavenged from enthought,interpolate
"""
from __future__ import division, print_function, absolute_import
import numpy as np
from . import _interpolate # C extension. Does all the real work.
def atleast_1d_and_contiguous(ary, dtype=np.float64):
return np.atleast_1d(np.ascontiguousarray... |
b4n/geany | refs/heads/master | tests/ctags/bug1856363.py | 98 | #!/usr/bin/python
def main():
# A broken ctags will see a function "initely_not_a_function" here.
definitely_not_a_function = 0
return
if __name__ == 'main':
main()
|
v0devil/JMeter-Control-Center | refs/heads/master | controller/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
schlueter/ansible | refs/heads/devel | lib/ansible/modules/network/avi/avi_cloudproperties.py | 41 | #!/usr/bin/python
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
# Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses... |
memtoko/django | refs/heads/master | tests/utils_tests/test_archive.py | 372 | import os
import shutil
import tempfile
import unittest
from django.utils._os import upath
from django.utils.archive import Archive, extract
TEST_DIR = os.path.join(os.path.dirname(upath(__file__)), 'archives')
class ArchiveTester(object):
archive = None
def setUp(self):
"""
Create temporar... |
arjclark/cylc | refs/heads/master | lib/jinja2/meta.py | 222 | # -*- coding: utf-8 -*-
"""
jinja2.meta
~~~~~~~~~~~
This module implements various functions that exposes information about
templates that might be interesting for various kinds of applications.
:copyright: (c) 2017 by the Jinja Team, see AUTHORS for more details.
:license: BSD, see LICENSE fo... |
blag/django-world-languages | refs/heads/master | world_languages/utils.py | 1 | from urllib.request import urlretrieve
from tqdm import tqdm
def urlopen_with_progress(url):
def my_hook(t):
"""
Wraps tqdm instance. Don't forget to close() or __exit__() the tqdm instance
once you're done (easiest using a context manager, eg: `with` syntax)
Example
----... |
sleshepic/G920T_OI1_kernel | refs/heads/master | tools/perf/tests/attr.py | 3174 | #! /usr/bin/python
import os
import sys
import glob
import optparse
import tempfile
import logging
import shutil
import ConfigParser
class Fail(Exception):
def __init__(self, test, msg):
self.msg = msg
self.test = test
def getMsg(self):
return '\'%s\' - %s' % (self.test.path, self.msg)... |
TNT-Samuel/Coding-Projects | refs/heads/master | DNS Server/Source/Lib/unittest/runner.py | 12 | """Running tests"""
import sys
import time
import warnings
from . import result
from .signals import registerResult
__unittest = True
class _WritelnDecorator(object):
"""Used to decorate file-like objects with a handy 'writeln' method"""
def __init__(self,stream):
self.stream = stream
def __ge... |
SivagnanamCiena/robotframework | refs/heads/master | src/robot/running/runner.py | 17 | # Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... |
vperron/sentry | refs/heads/master | src/sentry/search/models.py | 36 | """
sentry.search.models
~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
|
jimi-c/ansible | refs/heads/devel | lib/ansible/plugins/lookup/first_found.py | 11 | # (c) 2013, seth vidal <skvidal@fedoraproject.org> red hat, inc
# (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 = """
lookup: first_found
... |
jayoshih/kolibri | refs/heads/master | kolibri/auth/test/test_users.py | 9 | from __future__ import absolute_import, print_function, unicode_literals
# from django.db.utils import IntegrityError
from django.test import TestCase
from ..models import DeviceOwner, Facility, FacilityUser
class UserSanityTestCase(TestCase):
"""
Sanity checks basic functionality of user models.
"""
... |
timj/scons | refs/heads/master | src/engine/SCons/Defaults.py | 1 | """SCons.Defaults
Builders and other things for the local site. Here's where we'll
duplicate the functionality of autoconf until we move it into the
installation procedure or use something like qmconf.
The code that reads the registry to find MSVC components was borrowed
from distutils.msvccompiler.
"""
#
# __COPY... |
s20121035/rk3288_android5.1_repo | refs/heads/master | external/chromium_org/ppapi/native_client/tools/browser_tester/browser_tester.py | 69 | #!/usr/bin/python
# Copyright (c) 2012 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 glob
import optparse
import os.path
import socket
import sys
import thread
import time
import urllib
# Allow the import of thir... |
shubhamgupta123/erpnext | refs/heads/master | erpnext/hr/doctype/leave_encashment/test_leave_encashment.py | 10 | # -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
from frappe.utils import today, add_months
from erpnext.hr.doctype.employee.test_employee import make_employee
from erpnext.hr.doctype.sal... |
felixbuenemann/sentry | refs/heads/master | src/sentry/api/endpoints/project_tagkey_values.py | 6 | from __future__ import absolute_import
from sentry.api.base import DocSection
from sentry.api.bases.project import ProjectEndpoint
from sentry.api.exceptions import ResourceDoesNotExist
from sentry.api.serializers import serialize
from sentry.models import TagKey, TagKeyStatus, TagValue
from sentry.utils.db import is_... |
Cressidai/robotframework-selenium2library | refs/heads/master | demo/package.py | 64 | #!/usr/bin/env python
import os, sys
from time import localtime
from zipfile import ZipFile, ZIP_DEFLATED
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
execfile(os.path.join(THIS_DIR, '..', 'src', 'Selenium2Library', 'version.py'))
FILES = {
'': ['rundemo.py'],
'login_tests': ['valid_login.txt', 'inv... |
cmcerove/pyvxl | refs/heads/develop | pyvxl/tests/conftest.py | 1 | #!/usr/bin/env python
"""Configuration file for tests in this folder.
pytest API reference: https://docs.pytest.org/en/latest/reference.html
hooks: https://docs.pytest.org/en/latest/reference.html#hooks
"""
import logging
from os import path, remove
from time import sleep
from glob import glob
de... |
Lochlan/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/comments.py | 148 | # Copyright (c) 2009 Google Inc. All rights reserved.
# Copyright (c) 2009 Apple 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... |
baylee/django | refs/heads/master | django/contrib/gis/db/backends/postgis/features.py | 345 | from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures
from django.db.backends.postgresql.features import \
DatabaseFeatures as Psycopg2DatabaseFeatures
class DatabaseFeatures(BaseSpatialFeatures, Psycopg2DatabaseFeatures):
supports_3d_storage = True
supports_3d_functions = True
... |
sveetch/cmsplugin-feedparser | refs/heads/master | cmsplugin_feedparser/south_migrations/0001_initial.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):
# Adding model 'FeedparserPluginModel'
db.create_table(u'cmsplugin_feedpa... |
ethantang95/DIGITS | refs/heads/master | digits/dataset/tasks/analyze_db.py | 6 | # Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved.
from __future__ import absolute_import
import os.path
import re
import sys
import digits
from digits.task import Task
from digits.utils import subclass, override
# NOTE: Increment this every time the pickled object
PICKLE_VERSION = 1
@subclass
cl... |
cuong-nguyenduy/django-learning | refs/heads/master | blog_project/mysite/blog/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
rajadhva/servo | refs/heads/master | tests/wpt/css-tests/tools/html5lib/html5lib/tests/test_serializer.py | 451 | from __future__ import absolute_import, division, unicode_literals
import json
import unittest
from .support import get_data_files
try:
unittest.TestCase.assertEqual
except AttributeError:
unittest.TestCase.assertEqual = unittest.TestCase.assertEquals
import html5lib
from html5lib import constants
from html... |
duanhjlt/gyp | refs/heads/master | test/gyp-defines/gyptest-regyp.py | 268 | #!/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.
"""
Verifies that when the same value is repeated for a gyp define, duplicates are
stripped from the regeneration rule.
"""
import os
impor... |
Alwnikrotikz/stoqs | refs/heads/master | loaders/BEDS/loadBEDS_2013.py | 5 | #!/usr/bin/env python
__author__ = 'Mike McCann'
__copyright__ = '2013'
__license__ = 'GPL v3'
__contact__ = 'mccann at mbari.org'
__doc__ = '''
Master loader for all BEDS deployments.
The default is to load data with a stride of 1 into a database named stoqs_beds2013.
Execute with "./loadBEDS_2013.py 10 sto... |
future-architect/eclipse-uroborosql-formatter | refs/heads/master | jp.co.future.eclipse.usqlfmt/resources/python/uroborosqlfmt/filters.py | 1 | # coding:utf-8
'''
@author: ota
'''
import math
import re
import sys
from sqlparse import sql, tokens as T, utils
from sqlparse.filters import StripWhitespaceFilter, ReindentFilter
from uroborosqlfmt import tokenutils as tu, grouping
from uroborosqlfmt.exceptions import SqlFormatterException
from uroborosqlfmt.sql impo... |
vv1133/home_web | refs/heads/master | tests/m2m_through/models.py | 115 | from datetime import datetime
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
# M2M described on one of the models
@python_2_unicode_compatible
class Person(models.Model):
name = models.CharField(max_length=128)
class Meta:
ordering = ('name',)
def __s... |
Bysmyyr/chromium-crosswalk | refs/heads/master | chrome/test/chromedriver/test/webserver.py | 17 | # 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 BaseHTTPServer
import os
import threading
class Responder(object):
"""Sends a HTTP response. Used with TestWebServer."""
def __init__(self, han... |
erikr/django | refs/heads/master | tests/syndication_tests/models.py | 281 | from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Entry(models.Model):
title = models.CharField(max_length=200)
updated = models.DateTimeField()
published = models.DateTimeField()
class Meta:
ordering = ('updated',)
... |
duanhjlt/gyp | refs/heads/master | test/standalone-static-library/gyptest-standalone-static-library.py | 186 | #!/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.
"""
Verifies build of a static_library with the standalone_static_library flag set.
"""
import os
import subprocess
import sys
import TestG... |
vertigo235/Sick-Beard-XEM | refs/heads/master | lib/requests/packages/chardet/cp949prober.py | 2800 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org 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 Reserved.
#
# Con... |
westinedu/similarinterest | refs/heads/master | settings.py | 1 | # Initialize App Engine and import the default settings (DB backend, etc.).
# If you want to use a different backend you have to remove all occurences
# of "djangoappengine" from this file.
try:
from djangoappengine.settings_base import *
has_djangoappengine = True
except ImportError:
has_djangoappengine = ... |
murphyke/avocado | refs/heads/master | avocado/south_migrations/0018_auto__del_field_datafield_data_modified__add_field_datafield_data_vers.py | 3 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'DataField.data_modified'
db.delete_column('avocado_datafield', 'data_modified')
#... |
bwrsandman/OpenUpgrade | refs/heads/8.0 | addons/claim_from_delivery/__openerp__.py | 261 | ##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public L... |
avichalp/django-push-notifications | refs/heads/master | push_notifications/settings.py | 24 | from django.conf import settings
PUSH_NOTIFICATIONS_SETTINGS = getattr(settings, "PUSH_NOTIFICATIONS_SETTINGS", {})
# GCM
PUSH_NOTIFICATIONS_SETTINGS.setdefault("GCM_POST_URL", "https://android.googleapis.com/gcm/send")
PUSH_NOTIFICATIONS_SETTINGS.setdefault("GCM_MAX_RECIPIENTS", 1000)
# APNS
PUSH_NOTIFICATIONS_SE... |
Glottotopia/aagd | refs/heads/master | moin/local/moin/build/lib.linux-x86_64-2.6/MoinMoin/script/maint/cleanpage.py | 2 | # -*- coding: iso-8859-1 -*-
"""
MoinMoin - display unused or trash page directories in data/pages
@copyright: 2005-2006 MoinMoin:ThomasWaldmann
@license: GNU GPL, see COPYING for details.
"""
import os
from MoinMoin.script import MoinScript
class PluginScript(MoinScript):
"""\
Purpose:
========
... |
kingvuplus/nn-gui | refs/heads/master | lib/python/Components/Renderer/Picon.py | 1 | ##
## Picon renderer by Gruffy .. some speedups by Ghost
##
from Components.config import config
from Renderer import Renderer
from enigma import ePixmap, eEnv, iServiceInformation, iPlayableService, iPlayableServicePtr
from Tools.Directories import fileExists, SCOPE_SKIN_IMAGE, SCOPE_CURRENT_SKIN, resolveFilename
cla... |
bliti/django-nonrel-1.5 | refs/heads/nonrel-1.5 | django/utils/ipv6.py | 113 | # This code was mostly based on ipaddr-py
# Copyright 2007 Google Inc. http://code.google.com/p/ipaddr-py/
# Licensed under the Apache License, Version 2.0 (the "License").
from django.core.exceptions import ValidationError
from django.utils.six.moves import xrange
def clean_ipv6_address(ip_str, unpack_ipv4=False,
... |
boberfly/gaffer | refs/heads/master | python/GafferUI/ViewUI.py | 7 | ##########################################################################
#
# Copyright (c) 2015, 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... |
emonty/deb-vhd-util | refs/heads/master | tools/python/xen/xm/migrate.py | 43 | #============================================================================
# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
# This library is distributed in the hope th... |
lamkeewei/battleships | refs/heads/master | server/controllers/view_helper.py | 8 | ### Add the Jinja2 templating language ###
# Jinja2 is included in app engine SDK so doesn't need to be included here
import jinja2
# configure the Jinja2 templating library to read templates under server/views
JINJA_ENV = jinja2.Environment(
# path is relative to top level project
loader=jinja2.FileSystemLo... |
goodwillcoding/RIDE | refs/heads/master | rtest/__init__.py | 12133432 | |
atul-bhouraskar/django | refs/heads/master | tests/gis_tests/relatedapp/__init__.py | 12133432 | |
mbaijal/incubator-mxnet | refs/heads/master | example/ssd/__init__.py | 12133432 | |
tessercat/ddj | refs/heads/master | controllers/about.py | 1 | def index():
""" Return a dict for the about view. """
def about_page():
import os
from gluon.contrib.markdown import markdown2
md_dir = '/opt/ddj/book/markdown'
page = {}
with open(os.path.join(md_dir, 'about.md')) as fd:
page['about'] = markdown2.markdown... |
guibson91/curso-ionic2 | refs/heads/master | node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py | 2736 | # 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.
"""Visual Studio project reader/writer."""
import gyp.common
import gyp.easy_xml as easy_xml
#-------------------------------------------------------------------... |
bbc/ebu-tt-live-toolkit | refs/heads/master | ebu_tt_live/twisted/base.py | 2 |
from zope.interface import Interface
class IBroadcaster(Interface):
def broadcast(self, channel, msg):
"""
Broadcast message to all connected clients.
:param channel:
:param msg:
:return:
"""
raise NotImplementedError()
def register(self, client):
... |
GbalsaC/bitnamiP | refs/heads/master | venv/lib/python2.7/site-packages/django_ses/tests/utils.py | 7 | import sys
def unload_django_ses():
del sys.modules['django_ses.settings']
del sys.modules['django_ses']
|
vicnet/weboob | refs/heads/master | modules/vicseccard/browser.py | 2 | # -*- coding: utf-8 -*-
# Copyright(C) 2015 Oleg Plakhotniuk
#
# This file is part of a weboob module.
#
# This weboob module 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 3 of th... |
Darkmoth/python-django-4 | refs/heads/master | Thing/env/Lib/site-packages/django/contrib/gis/gdal/feature.py | 439 | from django.contrib.gis.gdal.base import GDALBase
from django.contrib.gis.gdal.error import GDALException, OGRIndexError
from django.contrib.gis.gdal.field import Field
from django.contrib.gis.gdal.geometries import OGRGeometry, OGRGeomType
from django.contrib.gis.gdal.prototypes import ds as capi, geom as geom_api
fro... |
rmanoni/mi-instrument | refs/heads/master | mi/instrument/mclane/driver.py | 1 | """
@package mi.instrument.mclane.driver
@file marine-integrations/mi/instrument/mclane/driver.py
@author Dan Mergens
@brief Driver base class for McLane instruments
Release notes:
initial version
"""
import datetime
__author__ = 'Dan Mergens'
__license__ = 'Apache 2.0'
import re
import time
from mi.core.log import... |
eshijia/SUR | refs/heads/SURmagnum | magnum/common/pythonk8sclient/client/models/V1beta3_EndpointSubset.py | 15 | #!/usr/bin/env python
"""
Copyright 2015 Reverb Technologies, 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 require... |
imsparsh/python-for-android | refs/heads/master | python3-alpha/python3-src/Lib/ctypes/test/test_functions.py | 45 | """
Here is probably the place to write the docs, since the test-cases
show how the type behave.
Later...
"""
from ctypes import *
import sys, unittest
try:
WINFUNCTYPE
except NameError:
# fake to enable this test on Linux
WINFUNCTYPE = CFUNCTYPE
import _ctypes_test
dll = CDLL(_ctypes_test.__file__)
if ... |
Gitlab11/odoo | refs/heads/8.0 | addons/l10n_et/__init__.py | 438 | #-*- coding:utf-8 -*-
##############################################################################
#
# Copyright (C) 2012 Michael Telahun Makonnen <mmakonnen@gmail.com>.
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero G... |
kevinmel2000/sl4a | refs/heads/master | python/src/Tools/scripts/reindent-rst.py | 50 | #!/usr/bin/env python
# Make a reST file compliant to our pre-commit hook.
# Currently just remove trailing whitespace.
from __future__ import with_statement
import sys, re, shutil
ws_re = re.compile(r'\s+(\r?\n)$')
def main(argv=sys.argv):
rv = 0
for filename in argv[1:]:
try:
with open... |
AccelAI/accel.ai | refs/heads/master | flask-aws/lib/python2.7/site-packages/sqlalchemy/orm/deprecated_interfaces.py | 33 | # orm/deprecated_interfaces.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from .. import event, util
from .interfaces import EXT_CONTINUE
@util... |
talishte/ctigre | refs/heads/master | env/lib/python2.7/site-packages/django/template/loaders/app_directories.py | 105 | """
Wrapper for loading templates from "templates" directories in INSTALLED_APPS
packages.
"""
import os
import sys
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.template.base import TemplateDoesNotExist
from django.template.loader import BaseLoader
from django.u... |
fusionpig/ansible | refs/heads/devel | lib/ansible/utils/module_docs_fragments/openstack.py | 97 | # Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
#
# 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... |
ThomasYeoLab/CBIG | refs/heads/master | stable_projects/fMRI_dynamics/Kong2021_pMFM/part2_pMFM_control_analysis/Constant_I/scripts/CBIG_pMFM_step1_training_conI.py | 1 | # /usr/bin/env python
'''
Written by Kong Xiaolu and CBIG under MIT license:
https://github.com/ThomasYeoLab/CBIG/blob/master/LICENSE.md
'''
import os
import numpy as np
import time
import torch
import CBIG_pMFM_basic_functions as fc
import warnings
def get_init(myelin_data, gradient_data, highest_order, init_para):... |
cancan101/tensorflow | refs/heads/master | tensorflow/contrib/labeled_tensor/python/ops/ops_test.py | 32 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
ybellavance/python-for-android | refs/heads/master | python-modules/twisted/twisted/application/app.py | 49 | # -*- test-case-name: twisted.test.test_application,twisted.test.test_twistd -*-
# Copyright (c) 2001-2010 Twisted Matrix Laboratories.
# See LICENSE for details.
import sys, os, pdb, getpass, traceback, signal, warnings
from twisted.python import runtime, log, usage, failure, util, logfile
from twisted.python.versio... |
carlos-jenkins/ops-topology-lib-vtysh | refs/heads/master | lib/topology_lib_vtysh/exceptions.py | 1 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2015-2016 Hewlett Packard Enterprise Development LP
#
# 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
... |
ecbftw/nanown | refs/heads/master | test/services/multipacket-echo.py | 1 | #!/usr/bin/env python3
#
# Copyright (C) 2015 Blindspot Security LLC
# by Timothy D. Morgan
# twits: @ecbftw
import sys
import time
import socketserver
import http.server
class EchoHandler(http.server.BaseHTTPRequestHandler):
"""
"""
def do_GET(self):
#resolution = time.clock_getres(time.CLOCK_M... |
codecollision/DropboxToFlickr | refs/heads/master | django/core/management/commands/sqlreset.py | 313 | from optparse import make_option
from django.core.management.base import AppCommand
from django.core.management.sql import sql_reset
from django.db import connections, DEFAULT_DB_ALIAS
class Command(AppCommand):
help = "Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app name(s)."
option_... |
nirmeshk/oh-mainline | refs/heads/master | vendor/packages/django-debug-toolbar/tests/panels/test_logging.py | 26 | from __future__ import absolute_import, unicode_literals
import logging
from debug_toolbar.panels.logging import (
collector, MESSAGE_IF_STRING_REPRESENTATION_INVALID)
from ..base import BaseTestCase
class LoggingPanelTestCase(BaseTestCase):
def setUp(self):
super(LoggingPanelTestCase, self).setUp... |
tmeits/pybrain | refs/heads/master | pybrain/structure/connections/permutation.py | 25 | # -*- coding: utf-8 -_*-
__author__ = 'Justin Bayer, bayer.justin@googlemail.com'
__version__ = '$Id$'
from scipy import array
from pybrain.structure.connections.connection import Connection
from pybrain.utilities import permute
class PermutationConnection(Connection):
"""Connection that permutes the input by... |
KaranToor/MA450 | refs/heads/master | google-cloud-sdk/platform/bq/third_party/google/apputils/file_util.py | 25 | #!/usr/bin/env python
# Copyright 2007 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... |
peterfpeterson/mantid | refs/heads/master | qt/python/mantidqt/widgets/test/test_fitpropertybrowserplotinteraction.py | 3 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
impo... |
vrovachev/kaspersky-framework | refs/heads/master | test_kasp/network/test_network.py | 1 | import pytest
class TestNetwork:
@pytest.mark.network
def test_network(self):
print("network test")
|
SteveMcGrath/Concord | refs/heads/master | site/app/views/cfp.py | 1 | from flask import render_template, flash, redirect, session, url_for, abort, g
from flask.ext.login import login_user, logout_user, current_user, login_required
from app import app, db, login_manager, forms
from app.models import User, Ticket
from sqlalchemy import desc
from datetime import datetime
@app.route('/cfp'... |
rlugojr/django | refs/heads/master | django/contrib/gis/gdal/raster/band.py | 24 | from ctypes import byref, c_double, c_int, c_void_p
from django.contrib.gis.gdal.base import GDALBase
from django.contrib.gis.gdal.error import GDALException
from django.contrib.gis.gdal.prototypes import raster as capi
from django.contrib.gis.shortcuts import numpy
from django.utils.encoding import force_text
from .... |
Innovahn/cybex | refs/heads/master | addons/account/wizard/account_journal_select.py | 385 | # -*- 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... |
Alexander-M-Waldman/local_currency_site | refs/heads/master | lib/python2.7/site-packages/django/__init__.py | 3 | from django.utils.version import get_version
VERSION = (1, 9, 6, 'final', 0)
__version__ = get_version(VERSION)
def setup():
"""
Configure the settings (this happens as a side effect of accessing the
first setting), configure logging and populate the app registry.
"""
from django.apps import app... |
HofiOne/xbmc | refs/heads/master | lib/gtest/test/gtest_env_var_test.py | 343 | #!/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... |
meteozond/django-rq | refs/heads/master | django_rq/urls.py | 1 | from django.conf.urls import patterns, url
urlpatterns = patterns('django_rq.views',
url(r'^$', 'stats', name='rq_home'),
url(r'^(?P<queue_connection>[^/]+)/(?P<queue_name>[^/]+)/$', 'jobs', name='rq_jobs'),
url(r'^(?P<queue_connection>[^/]+)/(?P<queue_name>[^/]+)/(?P<job_id>[-\w]+)/$', 'job_detail',
... |
Vifon/ranger | refs/heads/master | ranger/ext/vcs/svn.py | 3 | # This file is part of ranger, the console file manager.
# License: GNU GPL version 3, see the file "AUTHORS" for details.
"""Subversion module"""
from __future__ import (absolute_import, division, print_function)
from datetime import datetime
import os
from xml.etree import ElementTree as etree
from .vcs import Vc... |
berecik/seastone | refs/heads/master | utils/forms.py | 236 | from django import forms
# place form definition here |
prune998/ansible | refs/heads/devel | lib/ansible/modules/network/nxos/nxos_vrf_af.py | 21 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... |
xin3liang/platform_external_chromium_org | refs/heads/master | third_party/libxml/src/gentest.py | 298 | #!/usr/bin/python -u
#
# generate a tester program for the API
#
import sys
import os
import string
try:
import libxml2
except:
print "libxml2 python bindings not available, skipping testapi.c generation"
sys.exit(0)
if len(sys.argv) > 1:
srcPref = sys.argv[1] + '/'
else:
srcPref = ''
#
# Modules ... |
sammcveety/incubator-beam | refs/heads/master | sdks/python/apache_beam/transforms/core.py | 5 | #
# 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... |
ankit01ojha/coala-bears | refs/heads/master | bears/hypertext/HTMLHintBear.py | 5 | import json
from coalib.bearlib.abstractions.Linter import linter
from dependency_management.requirements.NpmRequirement import NpmRequirement
@linter(executable='htmlhint',
output_format='regex',
output_regex=r'(?P<filename>.+):(?P<line>\d+):(?P<column>\d+):\s*'
r'(?P<message>.... |
wlamond/scikit-learn | refs/heads/master | sklearn/cross_decomposition/tests/test_pls.py | 42 | import numpy as np
from sklearn.utils.testing import (assert_equal, assert_array_almost_equal,
assert_array_equal, assert_true,
assert_raise_message)
from sklearn.datasets import load_linnerud
from sklearn.cross_decomposition import pls_, CCA
def t... |
glennyonemitsu/MarkupHiveSDK | refs/heads/master | requests/packages/charade/sjisprober.py | 167 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org 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 Reserved.
... |
rainslytherin/ansible | refs/heads/master | lib/ansible/inventory/group.py | 1 | # -*- coding: utf-8 -*-
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, ... |
igemsoftware/SYSU-Software2013 | refs/heads/master | project/Python27/Lib/site-packages/pythonwin/pywin/framework/editor/color/coloreditor.py | 17 | # Color Editor originally by Neil Hodgson, but restructured by mh to integrate
# even tighter into Pythonwin.
import win32ui
import win32con
import win32api
import sys
import pywin.scintilla.keycodes
from pywin.scintilla import bindings
from pywin.framework.editor import GetEditorOption, SetEditorOption, GetEditorFon... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.