repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
leiyangleon/FSH | refs/heads/master | scripts/write_file_type.py | 1 | # write_file_type.py
# Tracy Whelen, Microwave Remote Sensing Lab, University of Massachusetts
# November 17, 2015
# Yang Lei, Jet Propulsion Labortary, California Institute of Technology
# May 18, 2017
# This script writes the input array (the tree height map or diff_height map) to a file, with the file type ... |
SohKai/ChronoLogger | refs/heads/master | web/flask/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/_vendor/requests/packages/charade/universaldetector.py | 200 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... |
lyft/incubator-airflow | refs/heads/master | airflow/contrib/hooks/mongo_hook.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... |
benrudolph/commcare-hq | refs/heads/master | custom/ewsghana/forms.py | 2 | from django import forms
class InputStockForm(forms.Form):
product_id = forms.CharField(widget=forms.HiddenInput())
product = forms.CharField(widget=forms.HiddenInput(), required=False)
stock_on_hand = forms.IntegerField(min_value=0, required=False)
receipts = forms.IntegerField(min_value=0, initial=0... |
FHannes/intellij-community | refs/heads/master | python/testData/refactoring/extractmethod/ElseBody.before.py | 83 | def foo():
for arg in sys.argv[1:]:
try:
f = open(arg, 'r')
except IOError:
print('cannot open', arg)
else:
<selection>length = len(f.readlines()) #<---extract something from here
print("hi from else")</selection>
#anything else you... |
MichaelNedzelsky/intellij-community | refs/heads/master | python/testData/refactoring/rename/renameUpdatesImportReferences/after/baz.py | 336 | def f():
pass
|
Coburn37/js-beautify | refs/heads/master | python/cssbeautifier/__init__.py | 7 | #
# The MIT License (MIT)
# Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and contributors.
# 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 ... |
yskmt/texteditpad | refs/heads/master | texteditpad.py | 1 | """Simple textbox editing widget with Emacs-like keybindings."""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
from builtins import chr
from builtins import range
from builtins import object
import sys
import curses
import curses.ascii
# from six.moves imp... |
titienmiami/mmc.repository | refs/heads/master | plugin.video.tvalacarta/tvalacarta/channels/meristation.py | 1 | # -*- coding: iso-8859-1 -*-
#------------------------------------------------------------
# tvalacarta - XBMC Plugin
# Canal para Meristation
# http://blog.tvalacarta.info/plugin-xbmc/tvalacarta/
#------------------------------------------------------------
import urlparse,urllib2,urllib,re
import os
import sys
impor... |
joebowen/ChannelWorm | refs/heads/master | channelworm/ion_channel/urls.py | 1 | """channelworm URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class... |
ihipi/Sick-Beard | refs/heads/development | lib/hachoir_core/field/integer.py | 90 | """
Integer field classes:
- UInt8, UInt16, UInt24, UInt32, UInt64: unsigned integer of 8, 16, 32, 64 bits ;
- Int8, Int16, Int24, Int32, Int64: signed integer of 8, 16, 32, 64 bits.
"""
from lib.hachoir_core.field import Bits, FieldError
class GenericInteger(Bits):
"""
Generic integer class used to generate ... |
nikitasingh981/scikit-learn | refs/heads/master | sklearn/utils/tests/test_extmath.py | 19 | # Authors: Olivier Grisel <olivier.grisel@ensta.org>
# Mathieu Blondel <mathieu@mblondel.org>
# Denis Engemann <denis-alexander.engemann@inria.fr>
#
# License: BSD 3 clause
import numpy as np
from scipy import sparse
from scipy import linalg
from scipy import stats
from sklearn.utils.testing import ... |
fabiking/plugin.video.fadimesa | refs/heads/master | _ytplist.py | 173 | import urllib
import urllib2,json
import xbmcvfs
import requests,time
import os,xbmc,xbmcaddon,xbmcgui,re
addon = xbmcaddon.Addon('plugin.video.live.streamspro')
profile = xbmc.translatePath(addon.getAddonInfo('profile').decode('utf-8'))
cacheDir = os.path.join(profile, 'cachedir')
clean_cache=os.path.join(cacheDir,'cl... |
SublimeText-Markdown/TableEditor | refs/heads/master | table_plugin.py | 2 | # table_plugin.py - sublime plugins for pretty print text table
# Copyright (C) 2012 Free Software Foundation, Inc.
# Author: Valery Kocubinsky
# Package: SublimeTableEditor
# Homepage: https://github.com/vkocubinsky/SublimeTableEditor
# This file is part of SublimeTableEditor.
# SublimeTableEditor is free softwar... |
yencarnacion/jaikuengine | refs/heads/master | .google_appengine/lib/django-1.5/django/contrib/localflavor/py/py_department.py | 109 | # -*- coding: utf-8 -*-
# http://www.statoids.com/upy.html
from __future__ import unicode_literals
DEPARTMENT_CHOICES = (
('AG', 'Alto Paraguay'),
('AA', 'Alto Paraná'),
('AM', 'Amambay'),
('AS', 'Asunción'),
('BQ', 'Boquerón'),
('CG', 'Caaguazú'),
('CZ', 'Caazapá'),
('CY', 'Canindeyú'... |
dzsii/lic | refs/heads/master | src/LicUndoActions.py | 5 | """
Lic - Instruction Book Creation software
Copyright (C) 2010 Remi Gagne
This file (LicUndoActions.py) is part of Lic.
Lic 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... |
2013Commons/hue | refs/heads/master | desktop/core/ext-py/Django-1.4.5/tests/modeltests/m2m_through/models.py | 43 | from datetime import datetime
from django.db import models
# M2M described on one of the models
class Person(models.Model):
name = models.CharField(max_length=128)
class Meta:
ordering = ('name',)
def __unicode__(self):
return self.name
class Group(models.Model):
name = models.Char... |
paultcochrane/bokeh | refs/heads/master | examples/plotting/file/image_rgba.py | 45 | from __future__ import division
import numpy as np
from bokeh.plotting import figure, show, output_file
N = 20
img = np.empty((N,N), dtype=np.uint32)
view = img.view(dtype=np.uint8).reshape((N, N, 4))
for i in range(N):
for j in range(N):
view[i, j, 0] = int(i/N*255)
view[i, j, 1] = 158
v... |
partofthething/home-assistant | refs/heads/dev | homeassistant/components/joaoapps_join/__init__.py | 2 | """Support for Joaoapps Join services."""
import logging
from pyjoin import (
get_devices,
ring_device,
send_file,
send_notification,
send_sms,
send_url,
set_wallpaper,
)
import voluptuous as vol
from homeassistant.const import CONF_API_KEY, CONF_DEVICE_ID, CONF_NAME
import homeassistant.h... |
balloob/home-assistant | refs/heads/dev | homeassistant/components/homekit/aidmanager.py | 12 | """
Manage allocation of accessory ID's.
HomeKit needs to allocate unique numbers to each accessory. These need to
be stable between reboots and upgrades.
Using a hash function to generate them means collisions. It also means you
can't change the hash without causing breakages for HA users.
This module generates and... |
dgary50/eovsa | refs/heads/master | test_svn/udb_util.py | 1 | '''Reads and averages UDB, IDB files, hacked from
read_idb_.py. Replaces dump_tsys_ext.py. New version feb 2 2017, This
creates UDB files with the same variables as in IDB files (xsampler,
ysampler) rather than (xtyys, ytsys)'''
#jmm, 2017-02-03
#
# dg, 2017-08-30 -- Changes to allow these routines to work on IDB... |
QISKit/qiskit-sdk-py | refs/heads/master | qiskit/assembler/assemble_schedules.py | 1 | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... |
pdellaert/ansible | refs/heads/devel | lib/ansible/modules/cloud/amazon/ec2_metric_alarm.py | 11 | #!/usr/bin/python
# Copyright: 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',
'status': ['stableinterf... |
litchfield/django | refs/heads/master | tests/admin_widgets/tests.py | 1 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import gettext
import os
from datetime import datetime, timedelta
from importlib import import_module
from unittest import skipIf
from django import forms
from django.conf import settings
from django.contrib import admin
from django.contrib.admin import ... |
sofianehaddad/ot-svn | refs/heads/master | python/test/t_WhiteNoise_std.py | 2 | #! /usr/bin/env python
from openturns import *
TESTPREAMBLE()
RandomGenerator.SetSeed(0)
try:
# Tmin , time step and step number for TimeGrid
Tmin = 0.0
deltaT = 1.0
N = 11
timeGrid = RegularGrid(Tmin, deltaT, N)
# Fixing the distribution for the WhiteNoise
dist = Distribution(Uniform()... |
saadatqadri/django-oscar | refs/heads/master | src/oscar/apps/checkout/session.py | 3 | from decimal import Decimal as D
from django.contrib import messages
from django import http
from django.core.exceptions import ImproperlyConfigured
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from oscar.core import prices
from oscar.core.loading import get_mod... |
davidyezsetz/kuma | refs/heads/master | vendor/packages/pylint/test/regrtest_data/module_global.py | 6 | # pylint: disable-msg=W0603,W0601,W0604,E0602,W0104
"""was causing infinite recursion
"""
__revision__ = 1
global bar
bar.foo
|
Bysmyyr/chromium-crosswalk | refs/heads/master | third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/msgutil.py | 658 | # Copyright 2011, 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... |
jeremycline/pulp | refs/heads/master | playpen/deploy/run-integration-tests.py | 10 | #!/usr/bin/env python
import argparse
import sys
from fabric.api import get, run, settings
from utils import config_utils, setup_utils
# The nosetests command to run the integration tests
NOSETESTS_COMMAND = 'cd pulp-automation && nosetests -vs --with-xunit --nologcapture'
# Setup the CLI
description = 'Run integr... |
asadziach/tensorflow | refs/heads/pedestrian_detection_walabot_tf | tensorflow/contrib/tensor_forest/python/kernel_tests/best_splits_op_test.py | 80 | # 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... |
yoava333/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/pywebsocket/src/mod_pywebsocket/_stream_hixie75.py | 681 | # Copyright 2011, 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... |
vmax-feihu/hue | refs/heads/master | apps/security/src/security/views.py | 26 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... |
renyi533/tensorflow | refs/heads/master | tensorflow/python/ops/distributions/categorical.py | 17 | # 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... |
crookedreyes/py4e-specialization | refs/heads/master | code3/giturl.py | 1 | import urllib.request, urllib.parse, urllib.error
import ssl
import gitsecrets
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
def urlopen(url):
secrets = gitsecrets.secrets()
parms = urllib.parse.urlencode(secrets)
if url.find('?') > 0 :
url = url +... |
rhelmer/socorro-lib | refs/heads/master | socorro/unittest/external/postgresql/test_platforms.py | 11 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from nose.plugins.attrib import attr
from nose.tools import eq_
from socorro.external.postgresql.platforms import Platf... |
gvb/odoo | refs/heads/8.0 | addons/hr_payroll/__init__.py | 433 | #-*- coding:utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# d$
#
# This program is free software: you can redistribute it and/or modify
# it ... |
kangkot/arangodb | refs/heads/devel | 3rdParty/V8-4.3.61/third_party/python_26/Lib/glob.py | 173 | """Filename globbing utility."""
import sys
import os
import re
import fnmatch
__all__ = ["glob", "iglob"]
def glob(pathname):
"""Return a list of paths matching a pathname pattern.
The pattern may contain simple shell-style wildcards a la fnmatch.
"""
return list(iglob(pathname))
def iglob(pathna... |
openpeer/webrtc-gyp | refs/heads/master | test/rules/gyptest-all.py | 25 | #!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies simple rules when using an explicit build target of 'all'.
"""
import TestGyp
test = TestGyp.TestGyp()
test.run_gyp('no_acti... |
livni/old-OK | refs/heads/master | src/knesset/laws/migrations/0005_add_votes_count_to_vote_data.py | 1 |
from south.db import db
from django.db import models
from knesset.laws.models import *
class Migration:
no_dry_run = True
def forwards(self, orm):
for v in orm.Vote.objects.all():
v.votes_count = orm.VoteAction.objects.filter(vote=v).count()
v.save()
def bac... |
YuriGural/erpnext | refs/heads/master | erpnext/accounts/doctype/shipping_rule/test_shipping_rule.py | 97 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
import unittest
from erpnext.accounts.doctype.shipping_rule.shipping_rule import FromGreaterThanToError, ManyBlankToValuesError, Overlappi... |
kchodorow/tensorflow | refs/heads/master | tensorflow/contrib/learn/python/learn/learn_io/graph_io_test.py | 17 | # 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... |
yashrastogi16/python_koans | refs/heads/master | python3/koans/about_triangle_project2.py | 72 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from runner.koan import *
# You need to finish implementing triangle() in the file 'triangle.py'
from .triangle import *
class AboutTriangleProject2(Koan):
# The first assignment did not talk about how to handle errors.
# Let's handle that part now.
def test_... |
gavin-feng/odoo | refs/heads/8.0 | addons/crm/wizard/crm_phonecall_to_phonecall.py | 337 | # -*- 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... |
ChronoMonochrome/android_external_chromium_org | refs/heads/cm-11.0 | native_client_sdk/src/build_tools/sdk_tools/sdk_update_common.py | 168 | # 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.
"""Utility functions for sdk_update.py and sdk_update_main.py."""
import errno
import logging
import os
import shutil
import subprocess
import sys
impor... |
Tejal011089/digitales_erpnext | refs/heads/develop | erpnext/home/doctype/feed/feed.py | 37 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
import frappe.defaults
import frappe.permissions
from frappe.model.document import Document
class Feed(Document):
pass
def on_doctyp... |
ahmed-mahran/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/tests/urlpatterns_reverse/urls.py | 40 | from __future__ import absolute_import
from django.conf.urls import patterns, url, include
from .views import empty_view, empty_view_partial, empty_view_wrapped, absolute_kwargs_view
other_patterns = patterns('',
url(r'non_path_include/$', empty_view, name='non_path_include'),
url(r'nested_path/$', 'urlpatt... |
ncnll/CameraConfig | refs/heads/master | captureUsbImageAndUpload.py | 1 | from threading import Timer
import pygame
import pygame.camera #https://www.pygame.org/docs/ref/camera.html
import pygame.image
from pygame.locals import *
from poster.encode import multipart_encode
from poster.streaminghttp import register_openers
import time
import threading
import os
import json
import sqlite3
impor... |
ingokegel/intellij-community | refs/heads/master | python/helpers/pydev/third_party/pep8/lib2to3/lib2to3/fixes/fix_nonzero.py | 326 | """Fixer for __nonzero__ -> __bool__ methods."""
# Author: Collin Winter
# Local imports
from .. import fixer_base
from ..fixer_util import Name, syms
class FixNonzero(fixer_base.BaseFix):
BM_compatible = True
PATTERN = """
classdef< 'class' any+ ':'
suite< any*
funcdef<... |
willdavidc/piel | refs/heads/master | catkin_ws/src/piel/scripts/venv/lib/python2.7/site-packages/pip/_vendor/distlib/wheel.py | 412 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2013-2016 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
from __future__ import unicode_literals
import base64
import codecs
import datetime
import distutils.util
from email import message_from... |
Fusxfaranto/Robcxjo | refs/heads/master | plugins/raw.py | 1 | name = 'raw'
enabled = False
operator = True
def cmd(self, c, e, line, message_source, target):
self.connection.send(line[1])
|
holmes/intellij-community | refs/heads/master | python/testData/intentions/beforeTypeInDocstring3.py | 83 | def foo3(x, y, z, aa): #comment
i = xx + <caret>y + z
return i |
alanjw/GreenOpenERP-Win-X86 | refs/heads/7.0 | openerp/addons/multi_company/__init__.py | 886 | # -*- 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... |
tebeka/arrow | refs/heads/master | python/pyarrow/flight.py | 1 | # 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 | lib/ansible/parsing/quoting.py | 241 | # (c) 2014 James Cammarata, <jcammarata@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any late... |
openstack/neutron-classifier | refs/heads/master | neutron_classifier/cli/openstack_cli/classification_type.py | 1 | # Copyright (c) 2017 Intel Corporation.
#
# 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 la... |
Fireblend/chromium-crosswalk | refs/heads/master | tools/telemetry/telemetry/core/profile_types_unittest.py | 63 | # 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 unittest
from telemetry.core import profile_types
class ProfileTypesTest(unittest.TestCase):
def testGetProfileTypes(self):
types = profile_ty... |
eahneahn/free | refs/heads/master | djangoproject/gh_frespo_integration/tests/test_github_adapter.py | 1 | from django.test import TestCase
from gh_frespo_integration.utils import github_adapter
__author__ = 'tony'
def _assert_repo_contains(test, repos, name):
repo_names = []
found = False
for repo in repos:
if repo['name'] == name:
found = True
break
repo_names.append(r... |
CingHu/neutron-ustack | refs/heads/master | neutron/db/migration/alembic_migrations/versions/492a106273f8_brocade_ml2_mech_dri.py | 3 | # Copyright 2014 OpenStack Foundation
#
# 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 ... |
teslaji/homebase | refs/heads/master | venv/HomeBase/lib/python3.5/site-packages/django/db/__init__.py | 34 | from django.core import signals
from django.db.utils import (
DEFAULT_DB_ALIAS, DJANGO_VERSION_PICKLE_KEY, ConnectionHandler,
ConnectionRouter, DatabaseError, DataError, Error, IntegrityError,
InterfaceError, InternalError, NotSupportedError, OperationalError,
ProgrammingError,
)
__all__ = [
'conne... |
MartinHjelmare/home-assistant | refs/heads/dev | homeassistant/components/miflora/__init__.py | 36 | """The miflora component."""
|
vipul-sharma20/oh-mainline | refs/heads/master | vendor/packages/south/south/management/commands/graphmigrations.py | 129 | """
Outputs a graphviz dot file of the dependencies.
"""
from __future__ import print_function
from optparse import make_option
import re
import textwrap
from django.core.management.base import BaseCommand
from django.core.management.color import no_style
from south.migration import Migrations, all_migrations
clas... |
teltek/edx-platform | refs/heads/master | openedx/core/djangoapps/course_groups/cohorts.py | 2 | """
This file contains the logic for cohorts, as exposed internally to the
forums, and to the cohort admin views.
"""
import logging
import random
from courseware import courses
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
from django.core.validators import validate_e... |
woylaski/notebook | refs/heads/master | graphic/kivy-master/kivy/input/providers/mtdev.py | 15 | '''
Native support for Multitouch devices on Linux, using libmtdev.
===============================================================
The Mtdev project is a part of the Ubuntu Maverick multitouch architecture.
You can read more on http://wiki.ubuntu.com/Multitouch
To configure MTDev, it's preferable to use probesysfs p... |
trueblue2704/AskMeAnything | refs/heads/master | lib/python2.7/site-packages/itsdangerous.py | 626 | # -*- coding: utf-8 -*-
"""
itsdangerous
~~~~~~~~~~~~
A module that implements various functions to deal with untrusted
sources. Mainly useful for web applications.
:copyright: (c) 2014 by Armin Ronacher and the Django Software Foundation.
:license: BSD, see LICENSE for more details.
"""
imp... |
SlivTime/iktomi | refs/heads/master | iktomi/web/url_templates.py | 3 | # -*- coding: utf-8 -*-
import six
if six.PY2:
from urllib import quote, unquote
else:# pragma: no cover
from urllib.parse import quote, unquote
import re
import logging
from .url_converters import default_converters, ConvertError
logger = logging.getLogger(__name__)
def urlquote(value):
if isinstance(v... |
ic-hep/DIRAC | refs/heads/rel-v6r15 | Resources/Computing/BatchSystems/Host.py | 3 | #########################################################################
#
# $HeadURL$
# Host.py
# 4.11.2014
# Author: A.T.
#
#########################################################################
""" Host - class for managing jobs on a host. Host objects are invoked
with LocalComputingElement or SSHComput... |
xiaokeng/robotframework | refs/heads/master | atest/testdata/test_libraries/MyLibDir/SubModuleLib.py | 37 | def keyword_in_mylibdir_submodulelib():
pass
|
Fisiu/calendar-oswiecim | refs/heads/master | webapp/calendars/migrations/0027_organizer_url.py | 2 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('calendars', '0026_auto_20160222_1953'),
]
operations = [
migrations.AddField(
model_name='organizer',
... |
osvalr/odoo | refs/heads/8.0 | addons/project_timesheet/report/__init__.py | 441 | # -*- 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... |
FGMEMBERS/c150 | refs/heads/master | Models/Panel/Instruments/asi/asi.py | 15 | #!/usr/bin/env python
from svginstr import *
import sys
__author__ = "Melchior FRANZ < mfranz # aon : at >"
__url__ = "http://gitorious.org/svginstr/"
__version__ = "0.2"
__license__ = "GPL v2+"
__doc__ = """
"""
try:
a = Instrument("asi.svg", 512, 512, "test face; " + __version__)
a.disc(98, color = 'black')
a.... |
colinfitzpatrick/otherphone | refs/heads/master | Message.py | 1 | #
# Message.py
#
# Copyright xsynergy ltd 2010. All Rights Reserved.
#
# Setup
# Install PySerial http://pyserial.sourceforge.net
# Install Pything Messaagine https://github.com/pmarti/python-messaging
import sys
import logging
from messaging.sms import SmsSubmit
from messaging.sms import SmsDeliver
logger = logg... |
illustris-bh-wisc/illustris-bh | refs/heads/master | readsubfHDF5.py | 1 | # Python HDF5 subfind reader
# (requires util/hdf5lib.py)
#
# import readsubfHDF5
# cat = readsubfHDF5.subfind_catalog("./output/", 60)
# print cat.SubhaloPos
#
#
# Mark Vogelsberger (mvogelsb@cfa.harvard.edu)
import numpy as np
import os
import sys
import hdf5lib
####################
#SUBHALO DATABLOCKS#
#########... |
abligh/xen | refs/heads/master | tools/python/xen/xend/XendDomainInfo.py | 15 | #===========================================================================
# 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 tha... |
sileht/gnocchi | refs/heads/master | tools/duration_perf_analyse.py | 2 | #!/usr/bin/env python
#
# Copyright (c) 2014 eNovance
#
# 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... |
pombredanne/pants | refs/heads/master | tests/python/pants_test/backend/graph_info/tasks/test_list_owners.py | 15 | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from textwrap import... |
F5Networks/f5-common-python | refs/heads/development | f5/bigip/tm/security/scrubber.py | 1 | # coding=utf-8
#
# Copyright 2015-2017 F5 Networks Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... |
ZHAW-INES/rioxo-uClinux-dist | refs/heads/rtsp | user/python/python-2.4.4/Mac/Tools/macfreeze/macgen_bin.py | 4 | """macgen_bin - Generate application from shared libraries"""
import os
import sys
import string
import types
import macfs
from MACFS import *
import MacOS
from Carbon import Res
import py_resource
import cfmfile
import buildtools
def generate(input, output, module_dict=None, architecture='fat', debug=0):
# try ... |
sidnarayanan/BAdNet | refs/heads/master | train/smh/zh_sr.py | 1 | #!/usr/bin/env python
from keras.models import Model, load_model
from keras.callbacks import ModelCheckpoint
#from subtlenet.backend.keras_objects import *
#from subtlenet.backend.losses import *
from keras.layers import Dense, BatchNormalization, Input
from keras.utils import np_utils
from keras.optimizers import Ada... |
meskio/leap_pycommon | refs/heads/develop | src/leap/common/testing/https_server.py | 6 | # -*- coding: utf-8 -*-
# leap.common.testing.https_server.py
# Copyright (C) 2013 LEAP
#
# 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) a... |
jiangyy/oiutils | refs/heads/master | oi/__init__.py | 2 | """
Oiutils
"""
|
Eficent/odoomrp-wip | refs/heads/8.0 | mrp_bom_catch_product_code/models/__init__.py | 29 | # -*- encoding: utf-8 -*-
##############################################################################
#
# This program 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, either version 3 of the... |
alextricity25/parse_apache_configs | refs/heads/master | parse_apache_configs/test/test_parse_config.py | 1 | from os import listdir
from os.path import isfile, join
import unittest
from parse_apache_configs import parse_config
import pprint
class testParseConfig(unittest.TestCase):
#print "ENTERING TEST_PARSE_CONFIG" + "-"*8
def test_parse_config(self):
test_files = [ f for f in listdir("./test_conf_fil... |
rosmo/ansible | refs/heads/devel | lib/ansible/modules/monitoring/bigpanda.py | 92 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: 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',
... |
dapuck/pyleus | refs/heads/develop | examples/top_urls/top_urls/top_global.py | 9 | from __future__ import absolute_import
import logging
from operator import itemgetter
from pyleus.storm import SimpleBolt
log = logging.getLogger('top_global_bolt')
class TopGlobalBolt(SimpleBolt):
OPTIONS = ["N"]
OUTPUT_FIELDS = ["top_N"]
def initialize(self):
self.top_N = []
self.N ... |
ioannistsanaktsidis/invenio | refs/heads/prod | modules/weblinkback/lib/weblinkback_webinterface.py | 24 | # -*- coding: utf-8 -*-
## Comments and reviews for records.
## This file is part of Invenio.
## Copyright (C) 2011 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of th... |
jasonwzhy/django | refs/heads/master | tests/model_package/models/publication.py | 586 | from django.db import models
class Publication(models.Model):
title = models.CharField(max_length=30)
|
openhatch/new-mini-tasks | refs/heads/master | vendor/packages/Django/django/contrib/localflavor/jp/forms.py | 194 | """
JP-specific Form helpers
"""
from __future__ import absolute_import
from django.contrib.localflavor.jp.jp_prefectures import JP_PREFECTURES
from django.forms.fields import RegexField, Select
from django.utils.translation import ugettext_lazy as _
class JPPostalCodeField(RegexField):
"""
A form field tha... |
i3visio/usufy | refs/heads/master | usufy/bin/_classgenerator.py | 1 | # -*- coding: cp1252 -*-
#
##################################################################################
#
# This file is part of usufy.py.
#
# Usufy 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... |
sukima/TiCachedImages | refs/heads/master | plugins/ti.alloy/plugin.py | 1729 | import os, sys, subprocess, hashlib
import subprocess
def check_output(*popenargs, **kwargs):
r"""Run command with arguments and return its output as a byte string.
Backported from Python 2.7 as it's implemented as pure python on stdlib.
>>> check_output(['/usr/bin/python', '--version'])
Python 2.6.... |
ychen820/microblog | refs/heads/master | y/google-cloud-sdk/platform/google_appengine/lib/django-1.3/django/contrib/databrowse/sites.py | 329 | from django import http
from django.db import models
from django.contrib.databrowse.datastructures import EasyModel
from django.shortcuts import render_to_response
from django.utils.safestring import mark_safe
class AlreadyRegistered(Exception):
pass
class NotRegistered(Exception):
pass
class DatabrowsePlugi... |
ares/robottelo | refs/heads/master | tests/foreman/cli/test_puppetclass.py | 3 | # -*- encoding: utf-8 -*-
"""Test class for Puppet Classes CLI
:Requirement: Puppetclass
:CaseAutomation: Automated
:CaseLevel: Acceptance
:CaseComponent: CLI
:TestType: Functional
:CaseImportance: High
:Upstream: No
"""
from robottelo.cli.environment import Environment
from robottelo.cli.factory import (
m... |
robhudson/django | refs/heads/master | tests/template_tests/filter_tests/test_upper.py | 388 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.template.defaultfilters import upper
from django.test import SimpleTestCase
from django.utils.safestring import mark_safe
from ..utils import setup
class UpperTests(SimpleTestCase):
"""
The "upper" filter messes up entities (which a... |
habanero-rice/hcpp | refs/heads/master | test/performance-regression/full-apps/qmcpack/nexus/library/auxiliary.py | 1942 | |
ybellavance/python-for-android | refs/heads/master | python3-alpha/python3-src/Lib/test/test_fileio.py | 49 | # Adapted from test_file.py by Daniel Stutzbach
import sys
import os
import errno
import unittest
from array import array
from weakref import proxy
from functools import wraps
from test.support import TESTFN, check_warnings, run_unittest, make_bad_fd
from _io import FileIO as _FileIO
class AutoFileTests(unittest.Te... |
Skruf90/FriendlyTorrent | refs/heads/master | src/tornado/BitTornado/BT1/Storage.py | 15 | # Written by Bram Cohen
# see LICENSE.txt for license information
from BitTornado.piecebuffer import BufferPool
from threading import Lock
from time import time, strftime, localtime
import os
from os.path import exists, getsize, getmtime, basename
from traceback import print_exc
try:
from os import fsync
except Im... |
sudosurootdev/external_chromium_org | refs/heads/L5 | tools/telemetry/telemetry/value/failure.py | 40 | # Copyright 2014 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 sys
import traceback
from telemetry import value as value_module
class FailureValue(value_module.Value):
def __init__(self, page, exc_info, desc... |
KaranToor/MA450 | refs/heads/master | google-cloud-sdk/lib/googlecloudsdk/command_lib/deployment_manager/flags.py | 2 | # Copyright 2016 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... |
testvidya11/ejrf | refs/heads/master | questionnaire/features/questionnaire_steps.py | 1 | from time import sleep
from lettuce import step, world
from questionnaire.features.pages.questionnaires import QuestionnairePage
from questionnaire.models import Questionnaire, Section, SubSection, Question, QuestionGroup, QuestionGroupOrder, QuestionOption
@step(u'And I have a questionnaire with sections and subsect... |
goliveirab/odoo | refs/heads/8.0 | openerp/addons/test_inherits/__openerp__.py | 357 | # -*- coding: utf-8 -*-
{
'name': 'test-inherits',
'version': '0.1',
'category': 'Tests',
'description': """A module to verify the inheritance using _inherits.""",
'author': 'Camptocamp',
'website': 'http://www.camptocamp.com',
'depends': ['base'],
'data': [
'ir.model.access.csv'... |
goodwinnk/intellij-community | refs/heads/master | python/testData/copyPaste/SimpleExpressionPartCaretAtLineEnd.src.py | 37 | <selection>20</selection> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.