repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
agimofcarmen/xen-api
refs/heads/master
ocaml/idl/binding_sanity_checks/hannesscript.py
25
#!/usr/bin/env python SERVER="http://server" USERNAME="root" PASSWORD="password" import XenAPI from pprint import pprint, pformat #given a list of dictionaries, print selected keys in order from each one, nicely formatted with a title def dictionary_list_partial_print(title, dictionary_list, keys ): bar='-' * le...
fitermay/intellij-community
refs/heads/master
python/testData/completion/relativeImport/pkg/name.after.py
83
from . import xyzzy
ohgodscience/Python
refs/heads/master
Exercises/WordCount.py
3
def WordCount(str): temp = str.split() return len(temp) print WordCount(raw_input())
tzaffi/git-in-practice-repo
refs/heads/master
book/lib/python2.7/site-packages/setuptools/command/bdist_rpm.py
111
import distutils.command.bdist_rpm as orig class bdist_rpm(orig.bdist_rpm): """ Override the default bdist_rpm behavior to do the following: 1. Run egg_info to ensure the name and version are properly calculated. 2. Always run 'install' using --single-version-externally-managed to disable eggs ...
chongkong/rocat
refs/heads/master
rocat/message.py
1
import enum class MsgType(enum.Enum): TELL = 1 ASK = 2 RPC = 3 ERROR = 4 INTERNAL = 5 INTERNAL_ERROR = 6 TERMINAL = 7 class Envelope(object): __slots__ = ['msg', 'type', 'sender'] def __init__(self, msg, *, type, sender): self.msg = msg self.type = type s...
kmspriyatham/symath
refs/heads/master
scipy/scipy/linalg/decomp_qr.py
4
"""QR decomposition functions.""" from __future__ import division, print_function, absolute_import import numpy # Local imports from .blas import get_blas_funcs from .lapack import get_lapack_funcs from .misc import _datacopied # XXX: what is qr_old, should it be kept? __all__ = ['qr', 'qr_multiply', 'rq', 'qr_old']...
AccelAI/accel.ai
refs/heads/master
flask-aws/lib/python2.7/site-packages/ebcli/labs/cloudwatchsetup.py
4
# Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
hgh123/ShadowsocksFork
refs/heads/master
shadowsocks/__init__.py
1084
#!/usr/bin/python # # Copyright 2012-2015 clowwindy # # 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...
mehulsbhatt/unbound
refs/heads/master
libunbound/python/doc/conf.py
26
# -*- coding: utf-8 -*- # # Unbound documentation build configuration file # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleable (module imports are okay, they're removed automatically)....
abhattad4/Digi-Menu
refs/heads/master
digimenu2/django/contrib/gis/maps/google/__init__.py
158
""" This module houses the GoogleMap object, used for generating the needed javascript to embed Google Maps in a Web page. Google(R) is a registered trademark of Google, Inc. of Mountain View, California. Example: * In the view: return render_to_response('template.html', {'google' : GoogleMap(key="...
sb1992/NETL-Automatic-Topic-Labelling-
refs/heads/master
get_indices.py
1
""" Author: Shraey Bhatia Date: October 2016 File: get_indices.py This file takes in the output of pruned_documents.py and word2vec_phrases.py and give back the respective indices from doc2vec model and word2vec model respectively. You can also download these output files from URLs in rea...
s4uliu5/grpc-common
refs/heads/master
python/route_guide/route_guide_pb2.py
18
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: route_guide.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _r...
icyflame/batman
refs/heads/master
scripts/unlink.py
4
#!/usr/bin/python # -*- coding: utf-8 -*- """ This bot unlinks a page on every page that links to it. This script understands this command-line argument: -namespace:n Number of namespace to process. The parameter can be used multiple times. It works in combination with all other ...
ntuecon/server
refs/heads/master
pyenv/Lib/site-packages/twisted/test/test_amp.py
13
# Copyright (c) 2005 Divmod, Inc. # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.protocols.amp}. """ from __future__ import absolute_import, division import datetime import decimal from zope.interface import implementer from zope.interface.verify import verifyClass, ...
datenbetrieb/odoo
refs/heads/8.0
addons/product_email_template/models/product.py
379
# -*- coding: utf-8 -*- from openerp.osv import fields, osv class product_template(osv.Model): """ Product Template inheritance to add an optional email.template to a product.template. When validating an invoice, an email will be send to the customer based on this template. The customer will receive an e...
alexfalcucc/anaconda
refs/heads/master
anaconda_lib/jedi/evaluate/analysis.py
33
""" Module for statical analysis. """ from jedi import debug from jedi.parser import tree from jedi.evaluate.compiled import CompiledObject CODES = { 'attribute-error': (1, AttributeError, 'Potential AttributeError.'), 'name-error': (2, NameError, 'Potential NameError.'), 'import-error': (3, ImportError, ...
joelddiaz/openshift-tools
refs/heads/prod
openshift/installer/vendored/openshift-ansible-3.9.14-1/roles/openshift_health_checker/test/ovs_version_test.py
22
import pytest from openshift_checks.ovs_version import OvsVersion from openshift_checks import OpenShiftCheckException def test_invalid_openshift_release_format(): def execute_module(*_): return {} task_vars = dict( openshift=dict(common=dict()), openshift_image_tag='v0', ope...
NORDUnet/opennsa
refs/heads/master
opennsa/protocols/nsi2/requesterclient.py
1
""" Web Service protocol for OpenNSA. This is the client used by the requester, meaning that is speaks the provider protocol. Author: Henrik Thostrup Jensen <htj@nordu.net> Copyright: NORDUnet (2011) """ from zope.interface import implementer from twisted.python import log, failure from twisted.web.error import Err...
maellak/DIYiotServer
refs/heads/master
tools/build-tools/ino/ino/ino/commands/listmodels.py
19
# -*- coding: utf-8; -*- from ino.commands.base import Command class ListModels(Command): """ Print list of supported Arduino board models. These could be used as a value for --board-model or -m command line switch for build and upload subcommands. Symbolic model names as well as their descript...
feer56/Kitsune1
refs/heads/master
kitsune/questions/forms.py
1
import json from datetime import date, timedelta from django import forms from tower import ugettext_lazy as _lazy, ugettext as _ from kitsune.questions.marketplace import submit_ticket from kitsune.questions.models import Answer from kitsune.sumo.form_fields import StrippedCharField # labels and help text SITE_AFF...
eonpatapon/rally
refs/heads/master
rally/plugins/openstack/scenarios/tempest/tempest.py
16
# Copyright 2014: Mirantis 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 b...
Leonnash21/flask_heroku
refs/heads/master
Tools/i18n/pygettext.py
7
#! /usr/bin/env python3 # -*- coding: iso-8859-1 -*- # Originally written by Barry Warsaw <barry@python.org> # # Minimally patched to make it even more xgettext compatible # by Peter Funk <pf@artcom-gmbh.de> # # 2002-11-22 Jürgen Hermann <jh@web.de> # Added checks that _() only contains string literals, and # command l...
tvomf/appinventor-mapps
refs/heads/master
appinventor/lib/blockly/src/i18n/create_messages.py
65
#!/usr/bin/python # Generate .js files defining Blockly core and language messages. # # Copyright 2013 Google Inc. # https://blockly.googlecode.com/ # # 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 Lice...
Ambrosys/protobuf
refs/heads/protobuf-2.5.0
gtest/test/gtest_catch_exceptions_test.py
403
#!/usr/bin/env python # # Copyright 2010 Google Inc. All Rights Reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list o...
MediciPrime/lcdb_website
refs/heads/master
manage.py
1
#!/usr/bin/env python import os from app import create_app, db from app.models import Bed, Colocalization, Identity, User, Role from flask.ext.script import Manager, Shell from flask.ext.migrate import Migrate, MigrateCommand app = create_app(os.getenv('FLASK_CONFIG') or 'default') manager = Manager(app) migrate = Mig...
dayutianfei/impala-Q
refs/heads/master
tests/beeswax/__init__.py
186
# This file is needed to make the files in this directory a python module
huntxu/python-neutronclient
refs/heads/master
neutronclient/common/extension.py
3
# Copyright 2015 Rackspace Hosting 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 req...
djbaldey/django
refs/heads/master
tests/many_to_one/tests.py
73
import datetime from copy import deepcopy from django.core.exceptions import FieldError, MultipleObjectsReturned from django.db import models, transaction from django.test import TestCase from django.utils import six from django.utils.translation import ugettext_lazy from .models import ( Article, Category, Child...
ilmanzo/scratch_extensions
refs/heads/master
venv/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/jpcntx.py
1776
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
ryfeus/lambda-packs
refs/heads/master
LightGBM_sklearn_scipy_numpy/source/scipy/signal/filter_design.py
7
"""Filter design. """ from __future__ import division, print_function, absolute_import import math import operator import warnings import numpy import numpy as np from numpy import (atleast_1d, poly, polyval, roots, real, asarray, resize, pi, absolute, logspace, r_, sqrt, tan, log10, ...
AlphaSmartDog/DeepLearningNotes
refs/heads/master
Note-6 A3CNet/Note-6.4 HS300指数增强/train.py
1
import multiprocessing import threading import tensorflow as tf from agent.main import Access, Framework # NUMS_CPU = multiprocessing.cpu_count() NUMS_CPU = 1 inputs_shape = [381, 240, 58] action_size = 3 max_episodes = 1 GD = {} class Worker(Framework): def __init__(self, name, access, inputs_shape, action_s...
sysbot/contrail-controller
refs/heads/master
src/opserver/test/utils/generator_fixture.py
1
#!/usr/bin/env python # # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # # # generator_fixture.py # # Python generator test fixtures # from gevent import monkey monkey.patch_all() import fixtures import socket import uuid import random from util import retry from pysandesh.sandesh_base import * fro...
thurt/arangodb
refs/heads/devel
3rdParty/V8-4.3.61/third_party/python_26/Lib/distutils/archive_util.py
52
"""distutils.archive_util Utility functions for creating archive files (tarballs, zip files, that sort of thing).""" # This module should be kept compatible with Python 2.1. __revision__ = "$Id: archive_util.py 62904 2008-05-08 22:09:54Z benjamin.peterson $" import os from distutils.errors import DistutilsExecError...
ChawalitK/odoo
refs/heads/master
addons/hr_payroll/hr_payroll.py
11
#-*- coding:utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import time from datetime import date from datetime import datetime from datetime import timedelta from dateutil import relativedelta from openerp import api, tools from openerp.osv import fields, osv from openerp.tools.t...
eterevsky/benchmarks
refs/heads/master
program_py.py
1
import subprocess import program class ProgramPython(program.Program): def __init__(self, source, task, compiler): super(ProgramPython, self).__init__() self._source = source self._task = task self._compiler = compiler if compiler == 'pypy2': self._interpreter = 'pypy' elif compiler ==...
zdary/intellij-community
refs/heads/master
python/helpers/pydev/_pydev_runfiles/pydev_runfiles_coverage.py
49
import os.path import sys from _pydevd_bundle.pydevd_constants import Null #======================================================================================================================= # get_coverage_files #====================================================================================================...
tangyiyong/odoo
refs/heads/8.0
addons/account/wizard/account_report_general_ledger.py
267
# -*- 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...
CospanDesign/nysa-sdio-device
refs/heads/master
cocotb/test_dut.py
2
# Simple tests for an adder module import os import sys import cocotb import logging from cocotb.result import TestFailure from nysa.host.sim.sim_host import NysaSim from cocotb.clock import Clock import time from array import array as Array from dut_driver import wb_sdio_deviceDriver SIM_CONFIG = "sim_config.json" ...
sdlBasic/sdlbrt
refs/heads/master
win32/mingw/opt/lib/python2.7/code.py
256
"""Utilities needed to emulate Python's interactive interpreter. """ # Inspired by similar code by Jeff Epler and Fredrik Lundh. import sys import traceback from codeop import CommandCompiler, compile_command __all__ = ["InteractiveInterpreter", "InteractiveConsole", "interact", "compile_command"] def ...
tudorvio/nova
refs/heads/master
nova/openstack/common/report/views/xml/__init__.py
82
# Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
dheerajathrey/ACA
refs/heads/master
project1.py
1
shoot turnleft forward turnright forward turnright shoot forward turnright forward
henrysher/aws-cloudinit
refs/heads/v0.7.2
cloudinit/mergers/__init__.py
7
# vi: ts=4 expandtab # # Copyright (C) 2012 Yahoo! Inc. # # Author: Joshua Harlow <harlowja@yahoo-inc.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3, as # published by the Free Software Foundation. # # This...
Lubricy/sinobu-chan
refs/heads/master
robot/main.py
1
from brain import robot import utils.io as io r = robot() def main(): while(1): a=raw_input("> ") if a=="shell": shell() else: print r.think(a); def shell(): io.warning("shell mode") while(1): a=raw_input("# ") if a=="q": return ...
AddonScriptorDE/plugin.video.dailymotion_com
refs/heads/master
default.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- import socket import urllib import urllib2 import xbmcplugin import xbmcaddon import xbmcgui import sys import os import re import json import base64 import datetime import unicodedata import SimpleDownloader familyFilter = "1" socket.setdefaulttimeout(60) pluginhandle = int(s...
spaceone/httoop
refs/heads/master
tests/tc2231/test_tc2231.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals import pytest import datetime import sys from httoop import Headers from httoop.exceptions import InvalidHeader @pytest.fixture def content_disposition(): def _parse(header): h = Headers() h.parse(header) return h.elements('Content-Disposition')[0...
deepinsight/Deformable-ConvNets
refs/heads/master
deeplab/core/module.py
1
# -------------------------------------------------------- # Deformable Convolutional Networks # Copyright (c) 2016 by Contributors # Copyright (c) 2017 Microsoft # Licensed under The Apache-2.0 License [see LICENSE for details] # Modified by Zheng Zhang # -------------------------------------------------------- """A ...
windyuuy/opera
refs/heads/master
chromium/src/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/_base.py
652
# Copyright 2012, 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...
Duikmeester/google-api-dotnet-client
refs/heads/master
ClientGenerator/src/googleapis/codegen/unicode_test.py
14
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- # Copyright 2010 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/LICEN...
guewen/odoo
refs/heads/master
addons/mail/report/__init__.py
438
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
awkspace/ansible
refs/heads/devel
lib/ansible/modules/clustering/k8s/k8s_service.py
54
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2018, KubeVirt Team <@kubevirt> # 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',...
adfernandes/mbed
refs/heads/master
UNITTESTS/mbed_unittest.py
5
#!/usr/bin/env python """ Copyright (c) 2018-2021, Arm Limited SPDX-License-Identifier: Apache-2.0 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 U...
google-research/torchsde
refs/heads/master
torchsde/_core/adaptive_stepping.py
1
# Copyright 2020 Google LLC # # 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, ...
mkraemer67/pylearn2
refs/heads/master
pylearn2/optimization/test_linesearch.py
44
from __future__ import print_function import time import warnings import theano import theano.tensor as TT import numpy from theano.compat.six.moves import xrange from .linesearch import scalar_armijo_search from .linesearch import scalar_search_wolfe2 def line_search_armijo(ftemp, derphi0, old_fval, args=(), c1=1e...
simplyguru-dot/ansible-modules-extras
refs/heads/devel
network/snmp_facts.py
77
#!/usr/bin/python # This file is part of Networklore's snmp library for Ansible # # The module 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 ...
openstack/tempest
refs/heads/master
tempest/api/identity/admin/v3/test_endpoints.py
1
# Copyright 2013 OpenStack Foundation # 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 requ...
mindnervestech/mnrp
refs/heads/master
openerp/report/printscreen/ps_form.py
381
# -*- coding: utf-8 -*- ############################################################################## # # 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...
atsuyim/MITMf
refs/heads/master
plugins/plugin.py
20
# Copyright (c) 2014-2016 Marcello Salvati # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distrib...
Sodki/ansible
refs/heads/devel
lib/ansible/modules/network/junos/junos_user.py
5
#!/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...
shahar-stratoscale/nova
refs/heads/master
nova/cells/opts.py
40
# Copyright (c) 2012 Rackspace Hosting # # 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...
vfrc2/Flexget
refs/heads/develop
flexget/plugins/urlrewrite_serienjunkies.py
3
from __future__ import unicode_literals, division, absolute_import import re import logging from flexget import plugin from flexget.event import event from flexget.plugins.plugin_urlrewriting import UrlRewritingError from flexget.utils import requests from flexget.utils.soup import get_soup log = logging.getLogger('s...
partofthething/home-assistant
refs/heads/dev
homeassistant/components/unifi/__init__.py
5
"""Integration to UniFi controllers and its various features.""" from homeassistant.const import EVENT_HOMEASSISTANT_STOP from homeassistant.core import callback from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC from .const import ( ATTR_MANUFACTURER, CONF_CONTROLLER, DOMAIN as UNIFI...
jayoshih/kolibri
refs/heads/master
kolibri/content/migrations/0004_auto_20161222_1953.py
2
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-12-22 19:53 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('content', '0003_contentnode_stemmed_metaphone'), ] operations = [ migrations...
titom1986/CouchPotatoServer
refs/heads/develop
libs/guessit/transfo/guess_idnumber.py
102
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2013 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
A2109devs/lenovo_a2109a_kernel
refs/heads/lenovo2
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...
keithhendry/treadmill
refs/heads/master
tests/sysinfo_test.py
3
"""Unit test for sysinfo. """ import os import sys import unittest from collections import namedtuple import mock import treadmill import treadmill.appenv from treadmill import sysinfo class SysinfoTest(unittest.TestCase): """treadmill.sysinfo test.""" def test_proc_info(self): """Proc info test."...
davidcusatis/horizon
refs/heads/master
openstack_dashboard/dashboards/admin/volumes/views.py
65
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
harisibrahimkv/django
refs/heads/master
django/contrib/gis/forms/widgets.py
2
import logging from django.conf import settings from django.contrib.gis import gdal from django.contrib.gis.geos import GEOSException, GEOSGeometry from django.forms.widgets import Widget from django.utils import translation logger = logging.getLogger('django.contrib.gis') class BaseGeometryWidget(Widget): """ ...
chjw8016/GreenOdoo7-haibao
refs/heads/master
openerp/addons/account/res_currency.py
56
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2010 OpenERP s.a. (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # p...
hradec/cortex
refs/heads/testing
python/IECore/MessageHandlerOverwriting.py
12
########################################################################## # # Copyright (c) 2010-2013, 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: # # * Redis...
Bjay1435/capstone
refs/heads/master
rootfs/usr/lib/python3.4/encodings/cp1140.py
272
""" Python Character Mapping Codec cp1140 generated from 'python-mappings/CP1140.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors='stri...
knehez/edx-platform
refs/heads/memooc
common/lib/xmodule/xmodule/open_ended_grading_classes/__init__.py
248
__author__ = 'vik'
ronas/PythonGNF
refs/heads/master
Danilo/ExRev01.py
1
Nome = input("Digite seu nome.") Idade = input("Digite sua idade.") Idade = int (Idade) Sexo = input("Digite seu sexo.") print(Nome) print(Idade) print(Sexo)
gladsonvm/haystackdemo
refs/heads/master
lib/python2.7/site-packages/django/conf/locale/tr/formats.py
329
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'd F Y' TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = 'd F Y H:i:s' YEAR_MONTH_F...
davidharrigan/django
refs/heads/master
django/contrib/staticfiles/management/commands/findstatic.py
463
from __future__ import unicode_literals import os from django.contrib.staticfiles import finders from django.core.management.base import LabelCommand from django.utils.encoding import force_text class Command(LabelCommand): help = "Finds the absolute paths for the given static file(s)." label = 'static file...
StephenSwat/eve_lunar_mining_organiser
refs/heads/master
elmo/manage.py
1
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "elmo.settings.local") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that t...
chushao/Gradesource-Uploader
refs/heads/master
requests/compat.py
13
# -*- coding: utf-8 -*- """ pythoncompat """ from .packages import charade as chardet import sys # ------- # Pythons # ------- # Syntax sugar. _ver = sys.version_info #: Python 2.x? is_py2 = (_ver[0] == 2) #: Python 3.x? is_py3 = (_ver[0] == 3) #: Python 3.0.x is_py30 = (is_py3 and _ver[1] == 0) #: Python 3.1....
tomming233/dsc_with_python
refs/heads/master
chapter8/rbtree.py
1
import sys from chapter7.bin_search_tree import BST from chapter5.bin_tree import BinNode __author__ = 'Tom Ming' class RedBlack(BST): def insert(self, e): hot, x = self.search(e) if x: return x # 创建红节点 以hot位父 黑高度位-1 x = BinNode(e, hot, None, None, -1) self._s...
Southpaw-TACTIC/TACTIC
refs/heads/4.7
3rd_party/python3/site-packages/cherrypy-18.1.2/cherrypy/lib/caching.py
3
""" CherryPy implements a simple caching system as a pluggable Tool. This tool tries to be an (in-process) HTTP/1.1-compliant cache. It's not quite there yet, but it's probably good enough for most sites. In general, GET responses are cached (along with selecting headers) and, if another request arrives for the same r...
FUSED-Wind/fusedwind
refs/heads/develop
src/fusedwind/plant_cost/fused_bos_costs.py
2
# KLD: _cost model for FUSED_Wind - most basic structure from openmdao.lib.datatypes.api import Float, Int, Array, VarTree from openmdao.main.api import Component, Assembly, VariableTree from fusedwind.plant_cost.fused_tcc import BaseTurbineCostModel from fusedwind.interface import base, implement_base #############...
meego-tablet-ux/meego-app-browser
refs/heads/master
tools/code_coverage/croc_test.py
3
#!/usr/bin/python2.4 # # Copyright 2009, 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...
manazhao/tf_recsys
refs/heads/r1.0
tensorflow/contrib/training/python/training/python_input.py
53
# 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...
fjorba/invenio
refs/heads/master
modules/websubmit/lib/websubmit_file_stamper.py
23
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2008, 2009, 2010, 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 the ## License, or ...
ayoubserti/winpty
refs/heads/master
build-gyp/test/msvs/external_builder/external_builder.py
260
# Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys with open('external_builder.out', 'w') as f: f.write(' '.join(sys.argv))
DreamerKing/LightweightHtmlWidgets
refs/heads/master
LightweightHtmlWidgets/bin/Debug/Ipy.Lib/abc.py
488
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Abstract Base Classes (ABCs) according to PEP 3119.""" import types from _weakrefset import WeakSet # Instance of old-style class class _C: pass _InstanceType = type(_C()) def abstractmethod(funcobj): """A d...
defionscode/ansible
refs/heads/devel
lib/ansible/modules/cloud/vmware/vmware_guest_custom_attribute_defs.py
20
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, 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', ...
benzkji/django-cms
refs/heads/develop
cms/test_utils/project/placeholderapp/models.py
2
from django.db import models from django.urls import reverse from django.utils.encoding import python_2_unicode_compatible from cms.models.fields import PlaceholderField from cms.utils import get_language_from_request from cms.utils.urlutils import admin_reverse def dynamic_placeholder_1(instance): return instan...
yetone/py-amqp
refs/heads/master
funtests/run_all.py
22
#!/usr/bin/env python """Run all the unittest modules for amqp""" # Copyright (C) 2007-2008 Barry Pederson <bp@barryp.org> # # This library 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 # versi...
exocad/exotrac
refs/heads/master
trac/web/modpython_frontend.py
5
# -*- coding: utf-8 -*- # # Copyright (C) 2004-2009 Edgewall Software # Copyright (C) 2004-2007 Christopher Lenz <cmlenz@gmx.de> # Copyright (C) 2005 Matthew Good <trac@matt-good.net> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this ...
jdburton/gimp-osx
refs/heads/master
src/gimp-2.6.12/plug-ins/pygimp/plug-ins/pyconsole.py
1
# # pyconsole.py # # Copyright (C) 2004-2006 by Yevgen Muntyan <muntyan@math.tamu.edu> # Portions of code by Geoffrey French. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public version 2.1 as # published by the Free Software Foundat...
JakeLowey/HackRPI2
refs/heads/master
django/template/loaders/app_directories.py
88
""" 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...
javier3407/Plugin.Video.Ja3244.tv
refs/heads/master
resources/tools/epg_verahora.py
4
# -*- coding: utf-8 -*- #------------------------------------------------------------ # epg_verahora.py parser para Arena+ # Version 0.1 (15.12.2014) #------------------------------------------------------------ # License: GPL (http://www.gnu.org/licenses/gpl-3.0.html) # Gracias a la librería plugintools de Jesús (www....
telminov/django-shuffler
refs/heads/master
shuffler/tests.py
1
# coding: utf-8 import unittest from django.test import TestCase import fields class FieldTestCase(unittest.TestCase): def test_get_data_not_implemented(self): field = fields.Field() self.assertRaises( NotImplementedError, field.get_data, 'test_name' ...
stefanv/scipy3
refs/heads/master
scipy/optimize/tests/test_cobyla.py
2
import math from numpy.testing import * from scipy.optimize import cobyla as co class TestCobyla(TestCase): def test_simple(self): function = lambda x: x[0]**2 + abs(x[1])**3 con1 = lambda x: x[0]**2 + x[1]**2 - 25 con2 = lambda x: -con1(x) x = co.fmin_cobyla(function, [4.95,0.6...
dendisuhubdy/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/barrier_ops_test.py
77
# 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...
mozvip/Sick-Beard
refs/heads/development
lib/hachoir_core/stream/output.py
90
from cStringIO import StringIO from lib.hachoir_core.endian import BIG_ENDIAN from lib.hachoir_core.bits import long2raw from lib.hachoir_core.stream import StreamError from errno import EBADF MAX_READ_NBYTES = 2 ** 16 class OutputStreamError(StreamError): pass class OutputStream(object): def __init__(self, ...
OmarIthawi/edx-platform
refs/heads/master
lms/djangoapps/shoppingcart/migrations/0018_auto__add_donation.py
120
# -*- 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): # Adding model 'Donation' db.create_table('shoppingcart_donation', ( ('orderitem_ptr', self.gf('...
timhuanggithub/MyPOX
refs/heads/master
pox/lib/graph/minigraph.py
46
# Copyright 2012 James McCauley # # 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 writi...
louisLouL/pair_trading
refs/heads/master
capstone_env/lib/python3.6/site-packages/pandas/tests/frame/test_rank.py
9
# -*- coding: utf-8 -*- from datetime import timedelta, datetime from distutils.version import LooseVersion from numpy import nan import numpy as np from pandas import Series, DataFrame from pandas.compat import product from pandas.util.testing import assert_frame_equal import pandas.util.testing as tm from pandas.te...
lumig242/Hue-Integration-with-CDAP
refs/heads/pull3
desktop/core/ext-py/Django-1.6.10/tests/forms_tests/tests/test_input_formats.py
63
from datetime import time, date, datetime from django import forms from django.test.utils import override_settings from django.utils.translation import activate, deactivate from django.test import SimpleTestCase @override_settings(TIME_INPUT_FORMATS=["%I:%M:%S %p", "%I:%M %p"], USE_L10N=True) class LocalizedTimeTest...
dipapaspyros/bdo_platform
refs/heads/master
aggregator/connectors/motu/util/stop_watch.py
2
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Python motu client # # Motu, a high efficient, robust and Standard compliant Web Server for Geographic # Data Dissemination. # # http://cls-motu.sourceforge.net/ # # (C) Copyright 2009-2010, by CLS (Collecte Localisation Satellites) - # http://www.cls.fr - and Co...