repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
Cojacfar/Maker
refs/heads/master
comm/lib/python2.7/site-packages/django/contrib/gis/admin/widgets.py
111
import logging from django.forms.widgets import Textarea from django.template import loader, Context from django.utils import six from django.utils import translation from django.contrib.gis.gdal import OGRException from django.contrib.gis.geos import GEOSGeometry, GEOSException # Creating a template context that co...
krsjoseph/youtube-dl
refs/heads/master
youtube_dl/extractor/ntvru.py
124
# encoding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( clean_html, xpath_text, int_or_none, ) class NTVRuIE(InfoExtractor): IE_NAME = 'ntv.ru' _VALID_URL = r'http://(?:www\.)?ntv\.ru/(?P<id>.+)' _TESTS = [ { 'url'...
stephane-martin/salt-debian-packaging
refs/heads/master
salt-2016.3.2/salt/netapi/rest_tornado/saltnado.py
2
# encoding: utf-8 from __future__ import absolute_import, print_function ''' A non-blocking REST API for Salt ================================ .. py:currentmodule:: salt.netapi.rest_tornado.saltnado :depends: - tornado Python module :configuration: All authentication is done through Salt's :ref:`external auth ...
goodwinnk/intellij-community
refs/heads/master
python/testData/typesFromAttributes/cyclicInheritance/module.py
79
from main import B class A(B): pass
kirananto/RAZORMOTOG3
refs/heads/cm-12.1
tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
# failed system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
Bolton-and-Menk-GIS/photos-to-map
refs/heads/master
PhotosToMap/photomapper/gpsimage/PIL/PngImagePlugin.py
40
# # The Python Imaging Library. # $Id$ # # PNG support code # # See "PNG (Portable Network Graphics) Specification, version 1.0; # W3C Recommendation", 1996-10-01, Thomas Boutell (ed.). # # history: # 1996-05-06 fl Created (couldn't resist it) # 1996-12-14 fl Upgraded, added read and verify support (0.2) # 1996-12-...
Bismarrck/tensorflow
refs/heads/master
tensorflow/contrib/tpu/python/tpu/tpu_feed.py
6
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
spblightadv/rethinkdb
refs/heads/next
test/scenarios/static_cluster.py
15
#!/usr/bin/env python # Copyright 2010-2014 RethinkDB, all rights reserved. from __future__ import print_function import sys, os, time startTime = time.time() sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'common'))) import driver, scenario_common, utils, vcoptparse, worklo...
nysan/yocto-autobuilder
refs/heads/master
lib/python2.6/site-packages/Twisted-11.0.0-py2.6-linux-x86_64.egg/twisted/mail/mail.py
28
# -*- test-case-name: twisted.mail.test.test_mail -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """Mail support for twisted python. """ # Twisted imports from twisted.internet import defer from twisted.application import service, internet from twisted.python import util from twisted.pyt...
SerCeMan/intellij-community
refs/heads/master
python/testData/refactoring/extractsuperclass/moveFields.before.py
80
class FromClass(object): CLASS_FIELD = 42 def __init__(self): self.instance_field = 100500
domasx2/django-angular-docker-seed
refs/heads/master
backend/apps/sampleapp/admin.py
2
from django.contrib import admin from .models import Upload # Register your models here. @admin.register(Upload) class UploadAdmin(admin.ModelAdmin): pass
Valencia-arch-project/valencia-arch1
refs/heads/master
lib/DLLSocket/server_controller.py
19
import subprocess import socket import urlparse UDP_IP="127.0.0.1" UDP_PORT=8019 sock = socket.socket( socket.AF_INET, # Internet socket.SOCK_DGRAM ) # UDP sock.bind( (UDP_IP,UDP_PORT) ) last_ticker_state = None def handle_message(data, addr): global last_ticker_state params = urlpars...
uni2u/neutron
refs/heads/master
neutron/plugins/cisco/n1kv/n1kv_client.py
7
# Copyright 2013 Cisco Systems, 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 o...
Dekker1/moore
refs/heads/development
src/involvement/migrations/0008_auto_20170502_1728.py
2
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-05-02 15:28 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('involvement', '0007_auto_20170427_1347'), ] operations = [ migrations.Alter...
tarbell-project/tarbell
refs/heads/master
tests/test_barebones.py
2
# -*- coding: utf-8 -*- """ Tests for the barebones example project """ import filecmp import os from tarbell.app import EXCLUDES, TarbellSite TESTS_DIR = os.path.dirname(__file__) PATH = os.path.realpath(os.path.join(TESTS_DIR, 'examples/barebones')) BUILT = os.path.join(PATH, '_site') PROJECT_NAME = "barebones" d...
snnn/tensorflow
refs/heads/master
tensorflow/contrib/timeseries/python/timeseries/head.py
25
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
OpenUpgrade-dev/OpenUpgrade
refs/heads/8.0
addons/website_livechat/models/website.py
380
from openerp.osv import osv, fields class website(osv.osv): _inherit = "website" _columns = { 'channel_id': fields.many2one('im_livechat.channel', string="Channel"), } class website_config_settings(osv.osv_memory): _inherit = 'website.config.settings' _columns = { 'channel_id': f...
Jorge-Rodriguez/ansible
refs/heads/devel
lib/ansible/modules/cloud/vmware/vmware_datastore_maintenancemode.py
50
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Ansible Project # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com> # 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__ = ty...
MarcJoan/django
refs/heads/master
tests/template_tests/filter_tests/test_force_escape.py
352
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.template.defaultfilters import force_escape from django.test import SimpleTestCase from django.utils.safestring import SafeData from ..utils import setup class ForceEscapeTests(SimpleTestCase): """ Force_escape is applied immediatel...
vikitripathi/MB-MessApp-API
refs/heads/master
messApp/env/lib/python2.7/site-packages/setuptools/command/easy_install.py
109
#!/usr/bin/env python """ Easy Install ------------ A tool for doing automatic download/extract/build of distutils-based Python packages. For detailed documentation, see the accompanying EasyInstall.txt file, or visit the `EasyInstall home page`__. __ https://pythonhosted.org/setuptools/easy_install.html """ impo...
tumbl3w33d/ansible
refs/heads/devel
lib/ansible/modules/network/f5/bigip_pool.py
21
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # 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', ...
uaf/uaf
refs/heads/master
examples/pyuaf/client/how_to_read_a_node_on_an_unknown_server.py
3
# examples/pyuaf/client/how_to_read_a_node_on_an_unknown_server.py # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # !!! Start the demo server ($SDK/bin/uaservercpp) of Unified Automation before running this script !!!! # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!...
ivke/ArdTemp8
refs/heads/master
ArduinoControl.py
1
import serial from Calibration import * class ArduinoControler(object): "Class interacting with arduino, sending, getting data throu serial port." def __init__(self,NSensor,DataLength): " Initalize Arduino relevant data, number of sensors, data Length that is send via USB. Actual is dataLength +2 byte...
zooba/PTVS
refs/heads/master
Python/Product/Miniconda/Miniconda3-x64/Lib/webbrowser.py
6
#! /usr/bin/env python3 """Interfaces for launching and remotely controlling Web browsers.""" # Maintained by Georg Brandl. import os import shlex import shutil import sys import subprocess import threading __all__ = ["Error", "open", "open_new", "open_new_tab", "get", "register"] class Error(Exception): pass _...
farhan0581/scrapy
refs/heads/master
scrapy/commands/version.py
60
from __future__ import print_function import sys import platform import twisted import OpenSSL import scrapy from scrapy.commands import ScrapyCommand class Command(ScrapyCommand): def syntax(self): return "[-v]" def short_desc(self): return "Print Scrapy version" def add_options(self...
audihsu-qci/ONL
refs/heads/master
components/all/platform-config/x86-64-quanta-ly6-rangeley-r0/src/python/onlpc.py
5
#!/usr/bin/python ############################################################ # <bsn.cl fy=2013 v=none> # # Copyright 2013, 2014 BigSwitch Networks, Inc. # Copyright 2015 Quanta Computer Inc. # # # # </bsn.cl> ############################################################ # # Platform driver for the Quanta...
prefetchnta/questlab
refs/heads/master
bin/x64bin/python/37/Lib/datetime.py
1
"""Concrete date/time and related types. See http://www.iana.org/time-zones/repository/tz-link.html for time zone and DST data sources. """ import time as _time import math as _math import sys def _cmp(x, y): return 0 if x == y else 1 if x > y else -1 MINYEAR = 1 MAXYEAR = 9999 _MAXORDINAL = 3652...
MalloyPower/parsing-python
refs/heads/master
front-end/testsuite-python-lib/Python-2.2/Lib/plat-irix5/SV.py
14
NTSC_XMAX = 640 NTSC_YMAX = 480 PAL_XMAX = 768 PAL_YMAX = 576 BLANKING_BUFFER_SIZE = 2 MAX_SOURCES = 2 # mode parameter for Bind calls IN_OFF = 0 # No Video IN_OVER = 1 # Video over graphics IN_UNDER = 2 # Video under graphics IN_REPLACE = 3 # Video replaces entire win # mode parameters for LoadMap calls...
bgxavier/neutron
refs/heads/master
neutron/openstack/common/uuidutils.py
166
# Copyright (c) 2012 Intel Corporation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
J861449197/edx-platform
refs/heads/master
openedx/core/djangoapps/user_api/tests/test_middleware.py
152
"""Tests for user API middleware""" from mock import Mock, patch from unittest import TestCase from django.http import HttpResponse from django.test.client import RequestFactory from student.tests.factories import UserFactory, AnonymousUserFactory from ..tests.factories import UserCourseTagFactory from ..middleware ...
haad/ansible
refs/heads/devel
lib/ansible/modules/messaging/rabbitmq_queue.py
39
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Manuel Sousa <manuel.sousa@gmail.com> # 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'...
tualatrix/django-profile
refs/heads/master
userprofile/templatetags/avatars.original.py
14
# coding=UTF-8 from django.template import Library, Node, Template, TemplateSyntaxError, \ Variable from django.template.defaultfilters import slugify from django.utils.translation import ugettext as u_ from django.contrib.auth.models import User from django.conf import settings from userpr...
shanot/imp
refs/heads/develop
modules/misc/.imp_info.py
2
{ "name": "IMP.misc" }
Passtechsoft/TPEAlpGen
refs/heads/master
blender/scons/scons-local/SCons/Variables/BoolVariable.py
3
"""engine.SCons.Variables.BoolVariable This file defines the option type for SCons implementing true/false values. Usage example: opts = Variables() opts.Add(BoolVariable('embedded', 'build for an embedded system', 0)) ... if env['embedded'] == 1: ... """ # # Copyright (c) 2001 - 2014 The SCons Foundati...
sudasana/armcom
refs/heads/master
steamworks/interfaces/userstats.py
1
from ctypes import * from enum import Enum import steamworks.util as util from steamworks.enums import * from steamworks.structs import * from steamworks.exceptions import * class SteamUserStats(object): _LeaderboardFindResult_t = CFUNCTYPE(None, FindLeaderboardResult_t) _LeaderboardFindResult = None ...
GiovanniConserva/TestDeploy
refs/heads/master
venv/Lib/encodings/gb18030.py
816
# # gb18030.py: Python Unicode Codec for GB18030 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_cn, codecs import _multibytecodec as mbc codec = _codecs_cn.getcodec('gb18030') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(mbc.MultibyteInc...
sassoftware/anaconda
refs/heads/master
pyanaconda/ui/gui/hubs/__init__.py
2
# Base classes for Hubs. # # Copyright (C) 2011-2012 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 distribut...
iulian787/spack
refs/heads/develop
var/spack/repos/builtin/packages/perl-devel-cycle/package.py
5
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PerlDevelCycle(PerlPackage): """Find memory cycles in objects""" homepage = "http://s...
tjanez/ansible
refs/heads/devel
lib/ansible/modules/monitoring/zabbix_host.py
25
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013-2014, Epic Games, Inc. # # 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 # (...
maistrovas/Internet-Store
refs/heads/master
docs/__init__.py
887
# Included so that Django's startproject comment runs against the docs directory
atizo/pygobject
refs/heads/pygobject-2-15-1-atizo
tests/test_thread.py
1
import os import unittest from common import gobject, testhelper main = gobject.MainLoop() class TestThread(unittest.TestCase): def from_thread_cb(self, test, enum): assert test == self.obj assert int(enum) == 0 assert type(enum) != int def idle_cb(self): self.obj = testhelper...
saketkc/bioconda-recipes
refs/heads/master
recipes/jasmine/jasmine.py
22
#!/usr/bin/env python # Following example with added wrapper script: https://github.com/bioconda/bioconda-recipes/blob/master/recipes/peptide-shaker/peptide-shaker.py # Wrapper script for Java Conda packages that ensures that the java runtime # is invoked with the right options. Adapted from the bash script (http://st...
cynicaldevil/servo
refs/heads/master
tests/wpt/web-platform-tests/XMLHttpRequest/resources/accept-language.py
250
def main(request, response): return [("Content-Type", "text/plain"), request.headers.get("Accept-Language", "NO")]
vhf/confusable_homoglyphs
refs/heads/master
confusable_homoglyphs/__init__.py
2
# -*- coding: utf-8 -*- from __future__ import print_function from ._version import get_versions __author__ = 'Victor Felder' __email__ = 'victorfelder@gmail.com' __version__ = get_versions()['version'] del get_versions
hrjn/scikit-learn
refs/heads/master
examples/svm/plot_svm_nonlinear.py
62
""" ============== Non-linear SVM ============== Perform binary classification using non-linear SVC with RBF kernel. The target to predict is a XOR of the inputs. The color map illustrates the decision function learned by the SVC. """ print(__doc__) import numpy as np import matplotlib.pyplot as plt from sklearn imp...
fighterCui/L4ReFiascoOC
refs/heads/master
l4/pkg/python/contrib/Lib/encodings/punycode.py
586
# -*- coding: iso-8859-1 -*- """ Codec for the Punicode encoding, as specified in RFC 3492 Written by Martin v. Löwis. """ import codecs ##################### Encoding ##################################### def segregate(str): """3.1 Basic code point segregation""" base = [] extended = {} for c in st...
geekboxzone/lollipop_external_chromium_org
refs/heads/geekbox
third_party/markdown/extensions/toc.py
109
# markdown is released under the BSD license # Copyright 2007, 2008 The Python Markdown Project (v. 1.7 and later) # Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b) # Copyright 2004 Manfred Stienstra (the original version) # # All rights reserved. # # Redistribution and use in source and binary forms, with or...
nadeemat/namebench
refs/heads/master
nb_third_party/jinja2/sandbox.py
284
# -*- 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...
GiovanniConserva/TestDeploy
refs/heads/master
venv/Lib/encodings/hex_codec.py
58
""" Python 'hex_codec' Codec - 2-digit hex content transfer encoding Unlike most of the other codecs which target Unicode, this codec will return Python string objects for both encode and decode. Written by Marc-Andre Lemburg (mal@lemburg.com). """ import codecs, binascii ### Codec APIs def hex_encode(...
ENjOyAbLE1991/scrapy
refs/heads/master
scrapy/spiders/crawl.py
78
""" This modules implements the CrawlSpider which is the recommended spider to use for scraping typical web sites that requires crawling pages. See documentation in docs/topics/spiders.rst """ import copy import six from scrapy.http import Request, HtmlResponse from scrapy.utils.spider import iterate_spider_output f...
simodalla/mezzanine_nowait
refs/heads/master
setup.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import nowait try: from setuptools import setup except ImportError: from distutils.core import setup version = nowait.__version__ if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') print("You probably want to al...
mustafat/odoo-1
refs/heads/8.0
addons/note/tests/test_note.py
427
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
hellhovnd/django
refs/heads/master
tests/generic_inline_admin/urls.py
150
from __future__ import absolute_import from django.conf.urls import patterns, include from . import admin urlpatterns = patterns('', (r'^generic_inline_admin/admin/', include(admin.site.urls)), )
litchfield/django
refs/heads/master
django/contrib/messages/storage/fallback.py
704
from django.contrib.messages.storage.base import BaseStorage from django.contrib.messages.storage.cookie import CookieStorage from django.contrib.messages.storage.session import SessionStorage class FallbackStorage(BaseStorage): """ Tries to store all messages in the first backend, storing any unstored me...
CubicERP/geraldo
refs/heads/master
site/newsite/django_1_0/django/middleware/common.py
11
import md5 import re from django.conf import settings from django import http from django.core.mail import mail_managers from django.utils.http import urlquote from django.core import urlresolvers class CommonMiddleware(object): """ "Common" middleware for taking care of some basic operations: - Forb...
mjfarmer/scada_py
refs/heads/master
env/lib/python2.7/site-packages/twisted/internet/iocpreactor/const.py
84
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Windows constants for IOCP """ # this stuff should really be gotten from Windows headers via pyrex, but it # probably is not going to change ERROR_PORT_UNREACHABLE = 1234 ERROR_NETWORK_UNREACHABLE = 1231 ERROR_CONNECTION_REFUSED = 1225 ERR...
cloudwatt/contrail-controller
refs/heads/master
src/config/svc-monitor/svc_monitor/scheduler/__init__.py
118
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. #
reingart/gui2py_googlecode
refs/heads/master
gui/doc/ext/autosummary/generate.py
14
# -*- coding: utf-8 -*- """ sphinx.ext.autosummary.generate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Usable as a library or script to generate automatic RST source files for items referred to in autosummary:: directives. Each generated RST file contains a single auto*:: directive which extracts the doc...
murrown/cyder
refs/heads/master
vendor-local/src/django-extensions/build/lib/django_extensions/management/commands/print_settings.py
16
""" print_settings ============== Django command similar to 'diffsettings' but shows all active Django settings. """ from django.core.management.base import NoArgsCommand from django.conf import settings from optparse import make_option class Command(NoArgsCommand): """print_settings command""" help = "Pri...
PolicyStat/GitZen
refs/heads/master
gitzen/enhancement_tracking/views.py
2
from datetime import datetime, timedelta from time import mktime from itertools import chain from requests.exceptions import RequestException from requests_oauth2 import OAuth2 from django.conf import settings from django.contrib.auth import authenticate, login, logout from django.contrib.auth.decorators import login...
slohse/ansible
refs/heads/devel
lib/ansible/modules/cloud/openstack/os_group.py
34
#!/usr/bin/python # Copyright (c) 2016 IBM # 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': ['preview'], ...
gfcapalbo/website
refs/heads/8.0
website_sale_survey/models/sale.py
5
# -*- coding: utf-8 -*- # Copyright 2016 Jamotion GmbH # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # Created by angel.moya on 01.09.2016. # from openerp import models, api, fields class SaleOrder(models.Model): _inherit = 'sale.order' survey_id = fields.Many2one( comodel_name='...
stephane-/project_logical_framework
refs/heads/master
project_logical_framework.py
1
from openerp.osv import fields, osv import openerp.addons.decimal_precision as dp from lxml import etree as ET class project_logical_framework_project(osv.Model): _inherit = 'project.project' _columns = { 'logical_framework': fields.one2many( 'project_logical_framework.logical_framework',...
papouso/odoo
refs/heads/8.0
addons/purchase_requisition/__openerp__.py
260
############################################################################## # # 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 Affero General Public L...
pli3/enigma2-git
refs/heads/master
lib/python/Screens/SoftwareUpdate.py
3
from Screens.ChoiceBox import ChoiceBox from Screens.MessageBox import MessageBox from Screens.Screen import Screen from Screens.Standby import TryQuitMainloop from Components.ActionMap import ActionMap, NumberActionMap from Components.Ipkg import IpkgComponent from Components.Sources.StaticText import StaticText from...
IONISx/XBlock
refs/heads/master
xblock/__init__.py
2
""" XBlock Courseware Components """
kalefranz/auxlib
refs/heads/develop
setup.py
1
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import os from setuptools import setup, find_packages import sys # When executing the setup.py, we need to be able to import ourselves, this # means that we need to add the src directory to the sys.path. here = os.path.abspath(os....
shujaatak/UAV_MissionPlanner
refs/heads/master
Lib/unittest/result.py
223
"""Test result object""" import os import sys import traceback from StringIO import StringIO from . import util from functools import wraps __unittest = True def failfast(method): @wraps(method) def inner(self, *args, **kw): if getattr(self, 'failfast', False): self.stop() retur...
edx/edx-platform
refs/heads/master
openedx/core/djangoapps/external_user_ids/migrations/0002_mb_coaching_20200210_1754.py
4
# Generated by Django 1.11.28 on 2020-02-10 17:54 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('external_user_ids', '0001_initial'), ] coaching_name = 'mb_coaching' def create_mb_coaching_type(apps, schema_editor): """ Add a Micr...
Fokko/incubator-airflow
refs/heads/master
airflow/contrib/hooks/aws_datasync_hook.py
2
# -*- coding: utf-8 -*- # # 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 #...
juanpflores94/Hodor
refs/heads/master
static/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py
886
# 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. import copy import ntpath import os import posixpath import re import subprocess import sys import gyp.common import gyp.easy_xml as easy_xml import gyp.generator...
tndatacommons/tndata_backend
refs/heads/master
tndata_backend/goals/migrations/0127_auto_20160310_2145.py
2
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import jsonfield.fields class Migration(migrations.Migration): dependencies = [ ('goals', '0126_convert_core_actions_to_showing'), ] operations = [ migrations.AlterModelOptions( ...
neuroneuro15/ratcave
refs/heads/master
examples/shadow_demo.py
1
import pyglet import ratcave as rc import itertools as it import numpy as np try: from contextlib import ExitStack except ImportError: from contextlib2 import ExitStack # Create Window window = pyglet.window.Window(resizable=True, vsync=False) # Create Mesh obj_filename = rc.resources.obj_primitives obj_reade...
thatotherguy/cryptsftp
refs/heads/master
lib/paramiko/sftp_si.py
27
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (a...
johnkit/vtk-dev
refs/heads/master
IO/EnSight/Testing/Python/EnSightBlow2ASCII.py
20
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # create a rendering window and renderer ren1 = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren1) renWin.StereoCapableWindowOn() iren = vtk.vtkRenderWindowInte...
jucimarjr/IPC_2017-1
refs/heads/master
lista04/lista04_lista02_questao20.py
1
#----------------------------------------------------------------------------------------------------------------------- # Introdução a Programação de Computadores - IPC # Universidade do Estado do Amazonas - UEA # # Adham Lucas da Silva Oliveira 1715310059 # Alexandre Marques Uchôa 1715310028 # A...
charbeljc/account-invoicing
refs/heads/8.0
account_invoice_partner/model/__init__.py
46
from . import account_invoice
taaviteska/django
refs/heads/master
tests/view_tests/tests/test_defaults.py
60
import datetime from django.contrib.sites.models import Site from django.http import Http404 from django.template import TemplateDoesNotExist from django.test import RequestFactory, TestCase from django.test.utils import override_settings from django.views.defaults import ( bad_request, page_not_found, permission_...
elena/django
refs/heads/master
tests/ordering/models.py
22
""" Specifying ordering Specify default ordering for a model using the ``ordering`` attribute, which should be a list or tuple of field names. This tells Django how to order ``QuerySet`` results. If a field name in ``ordering`` starts with a hyphen, that field will be ordered in descending order. Otherwise, it'll be ...
GiladE/birde
refs/heads/master
venv/lib/python2.7/site-packages/django/contrib/auth/tests/test_views.py
35
# -*- coding: utf-8 -*- from __future__ import unicode_literals from importlib import import_module import itertools import os import re from django.apps import apps from django.conf import global_settings, settings from django.contrib.sites.requests import RequestSite from django.contrib.admin.models import LogEntry...
mrknow/filmkodi
refs/heads/master
plugin.video.fanfilm/resources/lib/resolvers/cloudyvideos.py
2
# -*- coding: utf-8 -*- ''' FanFilm Add-on Copyright (C) 2015 lambda 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 ...
DemocracyClub/yournextrepresentative
refs/heads/master
ynr/apps/twitterbot/tests/test_twitter_update_usernames_command.py
1
from django.core.management import call_command from django.test import TestCase, override_settings from mock import Mock, patch from candidates.tests.auth import TestUserMixin from candidates.tests.output import capture_output, split_output from people.tests.factories import PersonFactory from twitterbot.helpers impo...
ScreamingUdder/mantid
refs/heads/master
qt/widgets/sliceviewer/doc/sliceviewer_wiki_screenshots.py
3
""" Generate screenshots for the wiki docs """ # Basic parameters filename = "TOPAZ_3131_event.nxs" ws = "TOPAZ" LoadEventNexus(Filename=filename,OutputWorkspace=ws+"_nxs") ConvertToDiffractionMDWorkspace(InputWorkspace=ws+"_nxs",OutputWorkspace=ws, LorentzCorrection='1', SplitInto='2',SplitThreshold='150') FindPeaksM...
ahmed-mahran/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/contrib/gis/gdal/error.py
466
""" This module houses the OGR & SRS Exception objects, and the check_err() routine which checks the status code returned by OGR methods. """ #### OGR & SRS Exceptions #### class GDALException(Exception): pass class OGRException(Exception): pass class SRSException(Exception): pass class OGRIndexError(OGRException, K...
InfinitiveOS-Devices/android_kernel_sony_msm8930
refs/heads/io-1.0
tools/perf/scripts/python/sctop.py
11180
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
esplinr/foodcheck
refs/heads/master
wsgi/foodcheck_proj/south/tests/deps_b/migrations/0002_b.py
348
from south.db import db from django.db import models class Migration: depends_on = [('deps_a', '0002_a')] def forwards(self): pass def backwards(self): pass
AngelkPetkov/titanium_mobile
refs/heads/master
support/module/mobileweb/mobileweb.py
36
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Mobile Web Module Project Create Script # import os,sys,shutil template_dir = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename)) module_dir = os.path.dirname(template_dir) sys.path.append(module_dir) import module def rmdir(path): if os.path.exists...
ryano144/intellij-community
refs/heads/master
python/testData/inspections/PyUnboundLocalVariableInspection/DefaultArgument.py
83
def f(): z = 2 def g(z=z): #pass return z return g
ge0rgi/cinder
refs/heads/stable/ocata
doc/ext/cinder_autodoc.py
4
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the ...
alex/gunicorn
refs/heads/master
examples/frameworks/pylonstest/pylonstest/controllers/error.py
29
import cgi from paste.urlparser import PkgResourcesParser from pylons import request from pylons.controllers.util import forward from pylons.middleware import error_document_template from webhelpers.html.builder import literal from pylonstest.lib.base import BaseController class ErrorController(BaseController): ...
AnimeshSinha1309/Website-Edunet
refs/heads/master
WebsiteEdunet/env/Lib/site-packages/django/contrib/messages/storage/fallback.py
704
from django.contrib.messages.storage.base import BaseStorage from django.contrib.messages.storage.cookie import CookieStorage from django.contrib.messages.storage.session import SessionStorage class FallbackStorage(BaseStorage): """ Tries to store all messages in the first backend, storing any unstored me...
pjdelport/django-crispy-forms
refs/heads/dev
crispy_forms/helper.py
1
from django.core.urlresolvers import reverse, NoReverseMatch from django.utils.safestring import mark_safe from layout import Layout, LayoutSlice from utils import render_field class FormHelpersException(Exception): """ This is raised when building a form via helpers throws an error. We want to catch for...
sloria/osf.io
refs/heads/develop
website/closed_challenges/views.py
25
# -*- coding: utf-8 -*- def erpc_landing_page(**kwargs): return {}
ajaali/django
refs/heads/master
tests/custom_methods/models.py
343
""" Giving models custom methods Any method you add to a model will be available to instances. """ import datetime from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Article(models.Model): headline = models.CharField(max_length=100) ...
xiandiancloud/edx-platform-Y
refs/heads/master
common/lib/xmodule/xmodule/timeinfo.py
63
import logging from xmodule.fields import Timedelta log = logging.getLogger(__name__) class TimeInfo(object): """ This is a simple object that calculates and stores datetime information for an XModule based on the due date and the grace period string So far it parses out three different pieces of time...
bucricket/projectMASlst
refs/heads/master
processlst/processlst.py
1
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Sun Feb 12 11:51:03 2017 @author: mschull """ import os import glob import subprocess import sys import pyrttov import argparse import pycurl import keyring import getpass import ftplib from .processData import Landsat,RTTOV from .utils import folders,unta...
wildfireone/ghost
refs/heads/master
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/pygments/styles/__init__.py
364
# -*- coding: utf-8 -*- """ pygments.styles ~~~~~~~~~~~~~~~ Contains built-in styles. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.plugin import find_plugin_styles from pygments.util import ClassNotFound #: Maps sty...
vauxoo-dev/e-commerce
refs/heads/8.0
website_sale_product_brand/__openerp__.py
7
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012-Today Serpent Consulting Services Pvt. Ltd. # (<http://www.serpentcs.com>) # # This program is free softwa...
iut-ibk/DynaMind-UrbanSim
refs/heads/master
3rdparty/opus/src/urbansim_parcel/household/tests/__init__.py
538
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE
FluidityProject/multifluids
refs/heads/master
tests/channel-flow-dg/channel_viscous.py
2
import os from fluidity_tools import stat_parser from sympy import * from numpy import array,max,abs meshtemplate=''' Point(1) = {0, 0, 0, <dx>}; Extrude {0, 1, 0} { Point{1};Layers{<layers>}; } Point(3) = {1, 0, 0, <dx>}; Extrude {0, 1, 0} { Point{3};Layers{<layers>}; } Line(3)={1,3}; Line(4)={2,4}; Line Loop(5) ...