repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
darkleons/odoo
refs/heads/master
addons/product/report/__init__.py
452
# -*- 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...
shinglyu/ns3-h264-svc
refs/heads/master
src/visualizer/visualizer/higcontainer.py
189
import gtk import gobject try: from gazpacho.widgets.base.base import SimpleContainerAdaptor except ImportError: pass #root_library = 'hig' class HIGContainer(gtk.Bin): __gtype_name__ = 'HIGContainer' __gproperties__ = { 'title': (str, 'Group Title', 'the group title', '', g...
todaychi/hue
refs/heads/master
desktop/core/ext-py/requests-2.10.0/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...
microcom/odoo
refs/heads/9.0
addons/website_gengo/__init__.py
1023
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import controllers import models
popazerty/test
refs/heads/master
lib/python/Tools/RedirectOutput.py
48
import sys from enigma import ePythonOutput class EnigmaOutput: def write(self, data): if isinstance(data, unicode): data = data.encode("UTF-8") ePythonOutput(data) def flush(): pass sys.stdout = sys.stderr = EnigmaOutput()
kormat/kazoo
refs/heads/master
kazoo/recipe/partitioner.py
9
"""Zookeeper Partitioner Implementation :Maintainer: None :Status: Unknown :class:`SetPartitioner` implements a partitioning scheme using Zookeeper for dividing up resources amongst members of a party. This is useful when there is a set of resources that should only be accessed by a single process at a time that mul...
ojengwa/django-1
refs/heads/master
tests/m2m_and_m2o/models.py
128
""" Many-to-many and many-to-one relationships to the same table Make sure to set ``related_name`` if you use relationships to the same table. """ from __future__ import unicode_literals from django.db import models from django.utils import six from django.utils.encoding import python_2_unicode_compatible class Use...
stelligent/ansible-modules-core
refs/heads/devel
files/fetch.py
94
# this is a virtual module that is entirely implemented server side # 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 op...
iRGBit/Dato-Core
refs/heads/master
src/unity/python/doc/scripts/doxypy-0.4.2.py
15
#!/usr/bin/env python __applicationName__ = "doxypy" __blurb__ = """ doxypy is an input filter for Doxygen. It preprocesses python files so that docstrings of classes and functions are reformatted into Doxygen-conform documentation blocks. """ __doc__ = __blurb__ + \ """ In order to make Doxygen preprocess files thro...
KISSMonX/micropython
refs/heads/master
tests/bytecode/mp-tests/class2.py
22
class A: x = 1 y = x + z A()
zabeelbashir/py-gsmmodem
refs/heads/master
test/test_serial_comms.py
1
#!/usr/bin/env python """ Test suite for gsmmodem.serial_comms """ from __future__ import print_function import sys, time, unittest, logging from copy import copy from . import compat # For Python 2.6 compatibility import gsmmodem.serial_comms from gsmmodem.exceptions import TimeoutException class MockSerialPacka...
rallylee/gem5
refs/heads/master
src/mem/slicc/symbols/__init__.py
82
# Copyright (c) 2009 The Hewlett-Packard Development Company # 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...
icomms/wqmanager
refs/heads/master
apps/ui/admin.py
1
from ui.models import LogEntry from django.contrib import admin class LogEntryAdmin(admin.ModelAdmin): list_display = ('user', 'timestamp', 'event_type', 'processing_time_ms') search_fields = ('user', 'event_type') list_filter = ['user', 'event_type'] readonly_fields = ('user', 'timestamp', 'event_type...
lorenmanu/TFG-GESTION-OFERTAS-DEMANDAS
refs/heads/master
app/db_converter.py
1
#!/usr/bin/env python """ Fixes a MySQL dump made with the right format so it can be directly imported to a new PostgreSQL database. Dump using: mysqldump --compatible=postgresql --default-character-set=utf8 -r databasename.mysql -u root databasename """ import re import sys import os import time import subprocess ...
steveb/tablib
refs/heads/develop
tablib/packages/odf/meta.py
98
# -*- coding: utf-8 -*- # Copyright (C) 2006-2007 Søren Roug, European Environment Agency # # 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 # version 2.1 of the License, or (at you...
diogo149/treeano
refs/heads/master
examples/resnet/cifar10_cnn.py
2
from __future__ import division, absolute_import from __future__ import print_function, unicode_literals import itertools import numpy as np import theano import theano.tensor as T import treeano import treeano.nodes as tn import canopy import canopy.sandbox.datasets from treeano.sandbox.nodes import batch_normalizat...
dfalt974/SickRage
refs/heads/master
lib/libtrakt/exceptions.py
55
class traktException(Exception): pass class traktAuthException(traktException): pass class traktServerBusy(traktException): pass
mcopik/Elemental
refs/heads/master
python/lapack_like/util.py
3
# # Copyright (c) 2009-2015, Jack Poulson # All rights reserved. # # This file is part of Elemental and is under the BSD 2-Clause License, # which can be found in the LICENSE file in the root directory, or at # http://opensource.org/licenses/BSD-2-Clause # from ..core import * import ctypes # Median # ====== li...
jelugbo/hebs_repo
refs/heads/master
common/test/acceptance/pages/common/logout.py
162
""" Logout Page. """ from bok_choy.page_object import PageObject from . import BASE_URL class LogoutPage(PageObject): """ Logout page to logout current logged in user. """ url = BASE_URL + "/logout" def is_browser_on_page(self): return self.q(css='.cta-login').present
0jpq0/kbengine
refs/heads/master
kbe/src/lib/python/Lib/logging/__init__.py
63
# Copyright 2001-2014 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
mdsafwan/Deal-My-Stuff
refs/heads/master
login/migrations/0007_auto_20151115_1408.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('login', '0006_auto_20151115_1149'), ] operations = [ migrations.AlterModelOptions( name='user_login', ...
CorverDevelopment/Pandora
refs/heads/master
src/pandora/monitor.py
1
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from os import path from watchdog.events import PatternMatchingEventHandler from watchdog.observers import Observer from watchdog.observers.polling import PollingObserver import inspect import datetime as dt import itertools impor...
lukeroge/Ralybot
refs/heads/python3.4
plugins/steam_store.py
34
import re import requests from bs4 import BeautifulSoup from cloudbot import hook from cloudbot.util import web, formatting # CONSTANTS steam_re = re.compile(r'.*://store.steampowered.com/app/([0-9]+)?.*', re.I) API_URL = "http://store.steampowered.com/api/appdetails/" STORE_URL = "http://store.steampowered.com/ap...
supersven/intellij-community
refs/heads/master
python/testData/copyPaste/IndentIncrease.src.py
83
<selection>def foo(): pass</selection>
yongshengwang/builthue
refs/heads/master
desktop/core/ext-py/pytz-2014.2/pytz/lazy.py
514
from threading import RLock try: from UserDict import DictMixin except ImportError: from collections import Mapping as DictMixin # With lazy loading, we might end up with multiple threads triggering # it at the same time. We need a lock. _fill_lock = RLock() class LazyDict(DictMixin): """Dictionary popu...
anbangr/trusted-nova
refs/heads/master
nova/virt/xenapi/vm_utils.py
4
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010 Citrix Systems, Inc. # Copyright 2011 Piston Cloud Computing, 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 #...
hurricup/intellij-community
refs/heads/master
python/testData/completion/className/stringLiteralAfterDot/mypackage/__init__.py
166
class Shazam: pass
ibab/tensorflow
refs/heads/master
tensorflow/contrib/ctc/__init__.py
14
# 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 a...
janeen666/mi-instrument
refs/heads/master
mi/dataset/driver/cg_stc_eng/stc/cg_stc_eng_stc_common_driver.py
7
#!/usr/local/bin/python2.7 # # # OOIPLACEHOLDER # # Copyright 2014 Raytheon Co. # # from mi.core.log import get_logger from mi.dataset.parser.cg_stc_eng_stc import CgStcEngStcParser from mi.dataset.dataset_driver import DataSetDriver class CgStcEngDriver: def __init__(self, source_file_path, particle_data_handl...
usc-isi/essex-baremetal-support
refs/heads/master
nova/notifier/list_notifier.py
5
# Copyright 2011 OpenStack LLC. # 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...
hehongliang/tensorflow
refs/heads/master
tensorflow/python/debug/wrappers/grpc_wrapper.py
29
# 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...
kvar/ansible
refs/heads/seas_master_2.9.5
test/integration/targets/module_utils/module_utils/qux1/quux.py
298
data = 'qux1'
AALEKH/server
refs/heads/10.2-redis-plugin
storage/tokudb/mysql-test/tokudb/t/fast_update_blobs.py
73
#!/usr/bin/env python import sys import random import string def main(): print "# generated by tokudb_fast_update_blobs.py" print "source include/have_tokudb.inc;" print "source include/have_innodb.inc;" print "set default_storage_engine='tokudb';" print "disable_warnings;" print "drop table i...
Fireblend/chromium-crosswalk
refs/heads/master
third_party/cython/src/Cython/Compiler/FusedNode.py
90
import copy from Cython.Compiler import (ExprNodes, PyrexTypes, MemoryView, ParseTreeTransforms, StringEncoding, Errors) from Cython.Compiler.ExprNodes import CloneNode, ProxyNode, TupleNode from Cython.Compiler.Nodes import (FuncDefNode, CFuncDefNode, StatList...
jpetto/olympia
refs/heads/master
src/olympia/users/tests/test_models.py
1
# -*- coding: utf-8 -*- import datetime import hashlib from base64 import encodestring from urlparse import urlparse from django import forms from django.conf import settings from django.contrib.auth.hashers import (is_password_usable, check_password, make_password, identify_ha...
jrversteegh/softsailor
refs/heads/master
deps/numpy-1.6.1/numpy/doc/byteswapping.py
95
''' ============================= Byteswapping and byte order ============================= Introduction to byte ordering and ndarrays ========================================== The ``ndarray`` is an object that provide a python array interface to data in memory. It often happens that the memory that you want to v...
gasbasd/tgapp-stroller2
refs/heads/master
sample-ecommerce/sample_ecommerce/__init__.py
1
# -*- coding: utf-8 -*- """The sample-ecommerce package"""
gsi-upm/SmartSim
refs/heads/master
smartbody/data/behaviorsets/BehaviorSetCommon.py
1
def createRetargetInstance(srcSkelName, tgtSkelName): endJoints = StringVec(); endJoints.append('l_ankle') endJoints.append('l_forefoot') endJoints.append('l_toe') endJoints.append('l_wrist') endJoints.append('r_ankle') endJoints.append('r_forefoot') endJoints.append('r_toe') endJoints.append('r_w...
imco/nmx
refs/heads/nmx
src/csvutils.py
2
def escapeQuotes(string): return string.replace('"','""');
curiousguy13/shogun
refs/heads/develop
applications/easysvm/esvm/mldata_arff.py
29
#!/usr/bin/env python """Classes to encapsulate the idea of a dataset in machine learning, including file access. This file contains the ARFF class for people who have arff installed. """ ############################################################################################# # ...
mountaindust/Parasitoids
refs/heads/master
Bayes_Plot.py
1
#! /usr/bin/env python3 ''' This module is for plotting the posterior distributions from Bayes_Run.py Author: Christopher Strickland Email: wcstrick@live.unc.edu ''' import sys, os import warnings from collections import OrderedDict import numpy as np import pymc as pm import matplotlib.pyplot as plt import matplotl...
ntuecon/server
refs/heads/master
pyenv/Lib/site-packages/libpasteurize/fixes/fix_memoryview.py
71
u""" Fixer for memoryview(s) -> buffer(s). Explicit because some memoryview methods are invalid on buffer objects. """ from lib2to3 import fixer_base from lib2to3.fixer_util import Name class FixMemoryview(fixer_base.BaseFix): explicit = True # User must specify that they want this. PATTERN = u""" ...
barachka/odoo
refs/heads/master
addons/account/ir_sequence.py
336
# -*- 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...
mushorg/conpot
refs/heads/master
conpot/protocols/snmp/snmp_server.py
1
# Copyright (C) 2013 Lukas Rist <glaslos@gmail.com> # # 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 2 # of the License, or (at your option) any later version. # # This program ...
simone201/neak-gs3-jb
refs/heads/master
scripts/tracing/draw_functrace.py
14679
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
j127/python_koans
refs/heads/master
python2/runner/runner_tests/test_helper.py
244
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest from runner import helper class TestHelper(unittest.TestCase): def test_that_get_class_name_works_with_a_string_instance(self): self.assertEqual("str", helper.cls_name(str())) def test_that_get_class_name_works_with_a_4(self): se...
grnet/synnefo
refs/heads/develop
snf-admin-app/synnefo_admin/admin/resources/ip_logs/filters.py
1
# Copyright (C) 2010-2014 GRNET S.A. # # 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 distributed i...
OptimusGitEtna/RestSymf
refs/heads/master
Python-3.4.2/Tools/scripts/lfcr.py
116
#! /usr/bin/env python3 "Replace LF with CRLF in argument files. Print names of changed files." import sys, re, os def main(): for filename in sys.argv[1:]: if os.path.isdir(filename): print(filename, "Directory!") continue with open(filename, "rb") as f: data...
gaocegege/kubernetes
refs/heads/master
examples/cluster-dns/images/backend/server.py
504
#!/usr/bin/env python # Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
DANCEcollaborative/forum-xblock
refs/heads/master
XBlock Integration Files/xdjangobb/xblock/lib/python2.7/site-packages/django/core/files/utils.py
901
class FileProxyMixin(object): """ A mixin class used to forward file methods to an underlaying file object. The internal file object has to be called "file":: class FileProxy(FileProxyMixin): def __init__(self, file): self.file = file """ encoding = property(la...
vikas1885/test1
refs/heads/master
common/djangoapps/student/migrations/0044_linkedin_add_company_identifier.py
102
# -*- 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 field 'LinkedInAddToProfileConfiguration.company_identifier' db.add_column('student_linkedinaddtopr...
iulian787/spack
refs/heads/develop
var/spack/repos/builtin.mock/packages/requires-virtual/package.py
2
# 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) class RequiresVirtual(Package): """Package that requires a virtual dependency and is registered as an external. ...
lamby/buildinfo.debian.net
refs/heads/master
bidb/api/utils.py
1
import re import hashlib from debian import deb822 from dateutil.parser import parse from django.db import transaction, IntegrityError from django.core.files.base import ContentFile from django.core.files.storage import default_storage from bidb.keys.models import Key from bidb.packages.models import Source, Archite...
noironetworks/group-based-policy
refs/heads/master
gbpservice/contrib/nfp/configurator/agents/nfp_service.py
1
# 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 # d...
mogoweb/webkit_for_android5.1
refs/heads/master
webkit/Source/WebKit/chromium/scripts/generate_devtools_grd.py
26
#!/usr/bin/env python # # Copyright (C) 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...
ar7z1/ansible
refs/heads/devel
lib/ansible/utils/module_docs_fragments/onyx.py
58
# # 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 distributed in the hope tha...
nicolasdespres/ninja
refs/heads/master
misc/ci.py
10
#!/usr/bin/env python3 import os ignores = [ '.git/', 'misc/afl-fuzz-tokens/', 'ninja_deps', 'src/depfile_parser.cc', 'src/lexer.cc', ] error_count = 0 def error(path, msg): global error_count error_count += 1 print('\x1b[1;31m{}\x1b[0;31m{}\x1b[0m'.format(path, msg)) for root, directory, filenames in os.w...
nhomar/odoo
refs/heads/8.0
addons/account_followup/account_followup.py
20
# -*- 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...
lowiki-org/localwiki-backend-server
refs/heads/master
localwiki/main/models.py
31
from __future__ import absolute_import from .celery import app as celery_app
fengbaicanhe/intellij-community
refs/heads/master
python/testData/selectWord/literal/after2.py
83
x = r"<selection>hello world again</selection>"
shingonoide/odoo
refs/heads/deverp_8.0
addons/base_vat/__openerp__.py
262
# -*- 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...
paulsoh/moxie
refs/heads/master
moxie/social/apps/tornado_app/utils.py
76
import warnings from functools import wraps from social.utils import setting_name from social.strategies.utils import get_strategy from social.backends.utils import get_backend DEFAULTS = { 'STORAGE': 'social.apps.tornado_app.models.TornadoStorage', 'STRATEGY': 'social.strategies.tornado_strategy.TornadoStr...
ichpuchtli/Geometry-Genocide
refs/heads/master
game.py
1
#| Author: Sam Macpherson __doc__ = 'This module contains a series of classes which contribute to the \ overall game play' from math import sin, cos, pi, acos, asin, radians, ceil from random import uniform, choice from library import System,Global,Sprite,Vector, Text, Time, Draw class Logo(Sprite): """...
andela-bojengwa/talk
refs/heads/master
venv/lib/python2.7/site-packages/rest_framework/utils/model_meta.py
5
""" Helper function for returning the field information that is associated with a model class. This includes returning all the forward and reverse relationships and their associated metadata. Usage: `get_field_info(model)` returns a `FieldInfo` instance. """ from collections import namedtuple from django.core.exceptio...
UIKit0/marsyas
refs/heads/master
scripts/large-evaluators/local-echonest.py
5
#!/usr/bin/env python import sys import os.path import os import time import pipes import json import mar_collection def echonest_upload(full_filename): print "trying: ", full_filename cmd = "echonest-analyzer %s" % pipes.quote(full_filename) os.system(cmd) time.sleep(0.5) json_data = open( fu...
titimoby/connected
refs/heads/master
jsserver/node_modules/ponte/node_modules/mosca/node_modules/leveldown/node_modules/prebuild/node_modules/node-gyp/gyp/pylib/gyp/common_test.py
2542
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for the common.py file.""" import gyp.common import unittest import sys class TestTopologicallySorted(unittest.TestCase): ...
JohnGriffiths/dipy
refs/heads/master
scratch/very_scratch/simulation_comparison_dsi_gqi.py
22
import numpy as np import dipy as dp import dipy.io.pickles as pkl import scipy as sp fname='/home/ian/Data/SimData/results_SNR030_1fibre' #fname='/home/eg01/Data_Backup/Data/Marta/DSI/SimData/results_SNR030_isotropic' ''' file has one row for every voxel, every voxel is repeating 1000 times with the same noise le...
Kazade/NeHe-Website
refs/heads/master
google_appengine/lib/django-1.4/django/contrib/sitemaps/tests/urls/http.py
109
from datetime import datetime from django.conf.urls import patterns, url from django.contrib.sitemaps import Sitemap, GenericSitemap, FlatPageSitemap, views from django.contrib.auth.models import User from django.views.decorators.cache import cache_page class SimpleSitemap(Sitemap): changefreq = "never" priori...
PeterDaveHello/eden
refs/heads/master
modules/s3db/skeleton.py
15
# -*- coding: utf-8 -*- """ This is just a commented template to copy/paste from when implementing new models. Be sure you replace this docstring by something more appropriate, e.g. a short module description and a license statement. The module prefix is the same as the filename (without the ".py"), in...
zeroc-ice/ice-demos
refs/heads/3.7
python/Ice/optional/server.py
1
#!/usr/bin/env python # # Copyright (c) ZeroC, Inc. All rights reserved. # import signal import sys import Ice Ice.loadSlice("Contact.ice") import Demo class ContactDBI(Demo.ContactDB): def __init__(self): self._contacts = {} def addContact(self, name, type, number, dialGroup, current=None): ...
amplify-education/rover
refs/heads/master
rover/fetch.py
2
#!/usr/bin/env python # # Copyright (c) 2009 Wireless Generation, Inc. # # 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 limitation the rights to use,...
tboyce021/home-assistant
refs/heads/dev
homeassistant/components/evohome/water_heater.py
16
"""Support for WaterHeater devices of (EMEA/EU) Honeywell TCC systems.""" import logging from typing import List from homeassistant.components.water_heater import ( SUPPORT_AWAY_MODE, SUPPORT_OPERATION_MODE, WaterHeaterEntity, ) from homeassistant.const import PRECISION_TENTHS, PRECISION_WHOLE, STATE_OFF, ...
arahuja/scikit-learn
refs/heads/master
sklearn/ensemble/tests/test_gradient_boosting_loss_functions.py
221
""" Testing for the gradient boosting loss functions and initial estimators. """ import numpy as np from numpy.testing import assert_array_equal from numpy.testing import assert_almost_equal from numpy.testing import assert_equal from nose.tools import assert_raises from sklearn.utils import check_random_state from ...
pleaseproject/python-for-android
refs/heads/master
python-build/python-libs/xmpppy/doc/examples/bot.py
87
#!/usr/bin/python # -*- coding: koi8-r -*- # $Id: bot.py,v 1.2 2006/10/06 12:30:42 normanr Exp $ import sys import xmpp commands={} i18n={'ru':{},'en':{}} ########################### user handlers start ################################## i18n['en']['HELP']="This is example jabber bot.\nAvailable commands: %s" def help...
mxOBS/deb-pkg_trusty_chromium-browser
refs/heads/master
tools/perf/metrics/speedindex.py
9
# 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 collections from metrics import Metric from telemetry.image_processing import image_util from telemetry.image_processing import rgba_color from telem...
gregomni/swift
refs/heads/master
utils/pygments/swift.py
33
#!/usr/bin/env python import re from pygments.lexer import ( RegexLexer, bygroups, default, include, ) from pygments.token import ( Comment, Generic, Keyword, Name, Number, Operator, Punctuation, String, Text, Whitespace, ) __all__ = ['SwiftLexer', 'SILLexer', ...
JetBrains/intellij-community
refs/heads/master
python/testData/completion/superInitKwParams.py
83
class B: def __init__(self, auno=True): pass class C(B): def __init__(self, **kwargs): pass c = C(au<caret>)
ethan-nelson/osm-tasking-manager2
refs/heads/master
osmtm/models.py
1
from sqlalchemy import ( Table, Column, Float, Integer, BigInteger, Unicode, ForeignKey, ForeignKeyConstraint, PrimaryKeyConstraint, Boolean, DateTime, CheckConstraint, Index, event, and_ ) from sqlalchemy.sql.expression import ( func, select, ) from...
conda/conda-ui
refs/heads/master
setup.py
2
from __future__ import print_function import sys import subprocess from os.path import join from setuptools import setup, find_packages def build(): retcode = subprocess.call( ["coffee", "--no-header", "-c", join("conda_ui", "static", "conda_ui")], shell=(sys.platform == 'win32')) if retcode...
saknis/upelis
refs/heads/master
wiki - Copy.py
1
#!/usr/bin/env python # # Copyright 2008 Google 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...
s-hertel/ansible
refs/heads/devel
test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/vars/custom_vars.py
58
# Copyright 2019 RedHat, 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 # (at your option) any later version. # # Ansible i...
StellarCN/py-stellar-base
refs/heads/master
stellar_sdk/xdr/string32.py
1
# This is an automatically generated file. # DO NOT EDIT or your changes may be overwritten import base64 from xdrlib import Packer, Unpacker from .base import * __all__ = ["String32"] class String32: """ XDR Source Code ---------------------------------------------------------------- typedef string...
sohovet/sohovet
refs/heads/master
sohovet_product_price/__init__.py
1
# -*- encoding: utf-8 -*- ############################################################################## # # # OpenERP, Open Source Management Solution. # # ...
firebitsbr/pwn_plug_sources
refs/heads/master
src/metagoofil/hachoir_core/language.py
95
from hachoir_core.iso639 import ISO639_2 class Language: def __init__(self, code): code = str(code) if code not in ISO639_2: raise ValueError("Invalid language code: %r" % code) self.code = code def __cmp__(self, other): if other.__class__ != Language: r...
Austin503/pyglet
refs/heads/master
experimental/input/dinput.py
28
#!/usr/bin/python # $Id:$ import ctypes import pyglet from pyglet import com from pyglet.window.win32 import _kernel32 lib = ctypes.oledll.dinput8 LPVOID = ctypes.c_void_p WORD = ctypes.c_uint16 DWORD = ctypes.c_uint32 LPDWORD = ctypes.POINTER(DWORD) BOOL = ctypes.c_int WCHAR = ctypes.c_wchar UINT ...
bramalingam/openmicroscopy
refs/heads/develop
components/tools/OmeroPy/src/omero/plugins/admin.py
2
#!/usr/bin/env python # -*- coding: utf-8 -*- """ :author: Josh Moore, josh at glencoesoftware.com OMERO Grid admin controller This is a python wrapper around icegridregistry/icegridnode for master and various other tools needed for administration. Copyright 2008 Glencoe Software, Inc. All Rights Reserved. Us...
armStrapTools/linux-sunxi-ap6210
refs/heads/sunxi-3.4
scripts/tracing/draw_functrace.py
14679
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
BartKeulen/drl
refs/heads/develop
drl/algorithms/naf/__init__.py
1
from .naf import NAF from .network import NAFNetwork
tundish/rson
refs/heads/master
rson/tests/test_unquoted.py
3
from unittest import TestCase import os import sys from rson.tests.read_samples import data as samples from rson.py23 import unicode # Really basic test to start with -- add more later def expected(s): if s == 'true': return True if s == 'false': return False if s == 'null': return None try: r...
cxxgtxy/tensorflow
refs/heads/master
tensorflow/contrib/framework/python/ops/arg_scope.py
58
# 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...
tiagocoutinho/bliss
refs/heads/master
bliss/controllers/motors/icepap/__init__.py
1
# -*- coding: utf-8 -*- # # This file is part of the bliss project # # Copyright (c) 2017 Beamline Control Unit, ESRF # Distributed under the GNU LGPLv3. See LICENSE for more info. import re import time import gevent import functools from bliss.common.greenlet_utils import protect_from_kill from bliss.controllers.moto...
fmoralesc/vim-pad
refs/heads/devel
pythonx/pad/modelines.py
3
html_style = ("<!-- ", " -->") vim_style = ('" ', '') hash_style = ("# ", '') comment_style_map = { "markdown": html_style, "pandoc": html_style, "textile": html_style, "vo_base": html_style, "quicktask": hash_style } def format_modeline(filetype): try: sty...
agoravoting/agora-election
refs/heads/master
agora_election/crypto.py
1
# -*- coding: utf-8 -*- # # Copyright (c) Django Software Foundation and individual contributors. # Copyright (c) Eduardo Robles Elvira <edulix AT agoravoting DOT com> # # All rights reserved. # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following...
tempredirect/zxing
refs/heads/master
cpp/scons/scons-local-2.0.0.final.0/SCons/Tool/packaging/ipk.py
34
"""SCons.Tool.Packaging.ipk """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation # # 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 r...
Big-B702/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/lib2to3/tests/data/infinite_recursion.py
341
# This file is used to verify that 2to3 falls back to a slower, iterative pattern matching # scheme in the event that the faster recursive system fails due to infinite recursion. from ctypes import * STRING = c_char_p OSUnknownByteOrder = 0 UIT_PROMPT = 1 P_PGID = 2 P_PID = 1 UIT_ERROR = 5 UIT_INFO = 4 UIT_NONE = 0 P...
kevinlondon/sentry
refs/heads/master
src/sentry/tsdb/dummy.py
24
""" sentry.tsdb.dummy ~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from sentry.tsdb.base import BaseTSDB class DummyTSDB(BaseTSDB): """ A no-op time-series storage. ""...
goddardl/gaffer
refs/heads/master
python/GafferUI/NumericPlugValueWidget.py
2
########################################################################## # # Copyright (c) 2011-2012, John Haddon. All rights reserved. # Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted prov...
jimyx17/jimh
refs/heads/master
lib/mutagen/asf.py
2
# Copyright 2006-2007 Lukas Lalinsky # Copyright 2005-2006 Joe Wreschnig # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # $Id: asf.py 4224 2007-12-03 09:01:49Z luks $ """Read and...
OSSESAC/odoopubarquiluz
refs/heads/7.0
addons/l10n_in_hr_payroll/__openerp__.py
51
# -*- encoding: 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 G...
OuterDeepSpace/OuterDeepSpace
refs/heads/master
libs/server/ige/IssueMngr.py
1
# # Copyright 2001 - 2006 Ludek Smid [http://www.ospace.net/] # # This file is part of IGE - Outer Space. # # IGE - Outer Space 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 Lice...