repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
saurabh6790/aimobilize-lib-backup
refs/heads/master
webnotes/tests/test_fmt_money.py
34
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt import webnotes from webnotes import _ from webnotes.utils import flt, cstr def fmt_money(amount, precision=None): """ Convert to string with commas for thousands, millions etc """ number_format = webnotes.con...
mdavoodi/konkourse-python
refs/heads/master
manage.py
1
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "konkourse.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
silentfuzzle/calibre
refs/heads/master
src/chardet/sbcsgroupprober.py
235
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
dalegregory/odoo
refs/heads/8.0
addons/website_event_sale/controllers/main.py
233
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
loopCM/chromium
refs/heads/trunk
tools/telemetry/telemetry/page/page_measurement_value.py
31
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import perf_tests_helper def _Mean(l): return float(sum(l)) / len(l) if len(l) > 0 else 0.0 class PageMeasurementValue(object): ...
markrawlingson/SickRage
refs/heads/master
lib/chardet/euckrprober.py
53
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
evernym/plenum
refs/heads/master
plenum/test/transactions/test_txn_general_access_utils.py
2
import pytest from plenum.common.constants import NYM, NODE from plenum.common.txn_util import get_type, set_type, get_payload_data, \ get_from, get_req_id, get_seq_no, get_txn_id, \ get_txn_time, get_version, get_digest, get_protocol_version, get_payload_digest from plenum.common.util import SortedDict @pyt...
awesome-labs/LFTimePicker
refs/heads/master
node_modules/markdown-to-json/node_modules/yaml-front-matter/node_modules/js-yaml/support/pyyaml-src/reader.py
272
# This module contains abstractions for the input stream. You don't have to # looks further, there are no pretty code. # # We define two classes here. # # Mark(source, line, column) # It's just a record and its only use is producing nice error messages. # Parser does not use it for any other purposes. # # Reader(so...
ThiefMaster/indico
refs/heads/master
indico/modules/rb/operations/admin.py
4
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from datetime import datetime, time from indico.core.db import db from indico.core.db.sqlalchemy.util.ses...
NickShaffner/rhea
refs/heads/master
rhea/utils/keep.py
2
import myhdl from myhdl import Signal, SignalType, intbv, always_comb, ConcatSignal @myhdl.block def keep_port_names(**ports): """ touch the top-level ports so they are persevered """ gens, width, catsig = [], 0, None # walk through all the ports for name, port in ports.items(): if isinstanc...
bitifirefly/edx-platform
refs/heads/master
common/djangoapps/embargo/migrations/0004_migrate_embargo_config.py
102
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): """Move the current course embargo configuration to the new models. """ for old_course in orm.EmbargoedCourse.obj...
eneldoserrata/marcos_openerp
refs/heads/master
addons/report_geraldo/lib/geraldo/site/newsite/site-geraldo/django/db/models/fields/related.py
13
from django.db import connection, transaction from django.db.models import signals, get_model from django.db.models.fields import AutoField, Field, IntegerField, PositiveIntegerField, PositiveSmallIntegerField, FieldDoesNotExist from django.db.models.related import RelatedObject from django.db.models.query import Query...
georgelegrand/first_gog
refs/heads/master
xor.py
1
def text_to_bits(text, encoding='utf-8', errors='surrogatepass'): bits = bin(int.from_bytes(text.encode(encoding, errors), 'big'))[2:] return bits.zfill(8 * ((len(bits) + 7) // 8)) def text_from_bits(bits, encoding='utf-8', errors='surrogatepass'): n = int(bits, 2) return n.to_bytes((n.bit_length() + 7...
marcosmodesto/django-testapp
refs/heads/master
django/django/contrib/gis/geometry/backend/__init__.py
388
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module geom_backend = getattr(settings, 'GEOMETRY_BACKEND', 'geos') try: module = import_module('.%s' % geom_backend, 'django.contrib.gis.geometry.backend') except ImportError, e: ...
zlatnaspirala/visualjs
refs/heads/master
project/project_instance_webgl/res/blenderProjects/TOOLS/io_three/exporter/api/material.py
58
from bpy import data, types from .. import constants, logger from .constants import MULTIPLY, WIRE, IMAGE def _material(func): """ :param func: """ def inner(name, *args, **kwargs): """ :param name: :param *args: :param **kwargs: """ material = Non...
eonpatapon/nova
refs/heads/master
nova/compute/vm_mode.py
74
# Copyright 2012 Red Hat, 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...
Vaibhav/Project-Euler
refs/heads/master
LeetCode/Medium/200-Num-of-Islands.py
2
''' Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water. Example 1: Input: 11110 11010 11000 00000 Out...
crunchymalice/python-oauth2
refs/heads/master
oauth2/__init__.py
458
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel 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 ...
kemalakyol48/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/plat-sunos5/TYPES.py
108
# Generated by h2py from /usr/include/sys/types.h # Included from sys/isa_defs.h _CHAR_ALIGNMENT = 1 _SHORT_ALIGNMENT = 2 _INT_ALIGNMENT = 4 _LONG_ALIGNMENT = 8 _LONG_LONG_ALIGNMENT = 8 _DOUBLE_ALIGNMENT = 8 _LONG_DOUBLE_ALIGNMENT = 16 _POINTER_ALIGNMENT = 8 _MAX_ALIGNMENT = 16 _ALIGNMENT_REQUIRED = 1 _CHAR_ALIGNMENT ...
wzyy2/RTTdev
refs/heads/master
bsp/simulator/rtconfig.py
1
import os # toolchains options ARCH='sim' #CROSS_TOOL='msvc' or 'gcc' or 'mingw' #'msvc' and 'mingw' are both for windows # 'gcc' is for linux CROSS_TOOL='mingw' # cross_tool provides the cross compiler # EXEC_PATH is the compiler execute path if CROSS_TOOL == 'gcc' or CROSS_TOOL == 'clang-analyze': CPU =...
michaelBenin/django-oscar
refs/heads/master
tests/integration/catalogue/product_class_tests.py
70
from django.test import TestCase from oscar.apps.catalogue import models class TestProductClassModel(TestCase): def test_slug_is_auto_created(self): books = models.ProductClass.objects.create( name="Book", ) self.assertEqual('book', books.slug) def test_has_attribute_for...
Cinntax/home-assistant
refs/heads/dev
tests/components/generic/test_camera.py
4
"""The tests for generic camera component.""" import asyncio from unittest import mock from homeassistant.setup import async_setup_component @asyncio.coroutine def test_fetching_url(aioclient_mock, hass, hass_client): """Test that it fetches the given url.""" aioclient_mock.get("http://example.com", text="h...
vincepandolfo/django
refs/heads/master
tests/utils_tests/test_tree.py
429
import copy import unittest from django.utils.tree import Node class NodeTests(unittest.TestCase): def setUp(self): self.node1_children = [('a', 1), ('b', 2)] self.node1 = Node(self.node1_children) self.node2 = Node() def test_str(self): self.assertEqual(str(self.node1), "(DE...
IEMLdev/propositions-restful-server
refs/heads/master
ieml/test/dictionary/test_dictionary.py
2
import unittest from ieml.dictionary.dictionary import Dictionary import numpy as np from ieml.dictionary.script import Script from ieml.ieml_database import IEMLDatabase, GitInterface class DictionaryTestCase(unittest.TestCase): @classmethod def setUpClass(cls) -> None: cls.d = IEMLDatabase(folder...
diorcety/intellij-community
refs/heads/master
python/testData/formatter/alignDictLiteralOnColon.py
79
{ "a": 1, "bbb": [ 2 ], "bbbbb": 3 }
SuriyaaKudoIsc/olympia
refs/heads/master
migrations/659-award-theme-points.py
113
#!/usr/bin/env python def run(): return
actionpods/django-action-hub
refs/heads/master
hub/urls/users.py
1
from django.conf.urls import url, include from hub.views import user urlpatterns = [ url(r'^$', user.index, name="index"), url(r'^(?P<user>[0-9])/$', user.detail, name="detail"), ]
mdaniel/intellij-community
refs/heads/master
python/testData/inspections/PyRelativeImportInspection/PlainDirectoryDottedImportFromDotTwoElementsWithAs/plainDirectory/script.py
10
<weak_warning descr="Relative import outside of a package">from . import foo, bar as b</weak_warning>
StephenWeber/ansible
refs/heads/devel
lib/ansible/modules/cloud/webfaction/webfaction_app.py
20
#!/usr/bin/python # # Create a Webfaction application using Ansible and the Webfaction API # # Valid application types can be found by looking here: # http://docs.webfaction.com/xmlrpc-api/apps.html#application-types # # ------------------------------------------ # # (c) Quentin Stafford-Fraser 2015, with contributions...
dulems/hue
refs/heads/master
apps/impala/src/impala/forms.py
1198
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
wenxer/empire-agent
refs/heads/master
empire_agent/core/__init__.py
1
# -*- coding: utf-8 -*- __all__ = ['produce']
mingderwang/angr
refs/heads/master
tests/test_project_resolve_simproc.py
10
import nose import angr import os test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../binaries/tests')) bina = os.path.join(test_location, "x86_64/test_project_resolve_simproc") """ We voluntarily don't use SimProcedures for 'rand' and 'sleep' because we want to step into their lib co...
hj3938/zulip
refs/heads/master
zerver/views/__init__.py
42
from __future__ import absolute_import from django.conf import settings from django.contrib.auth import authenticate, login, get_backends from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect, HttpResponseForbidden, HttpRespo...
BigDataforYou/movie_recommendation_workshop_1
refs/heads/master
big_data_4_you_demo_1/venv/lib/python2.7/site-packages/numpy/distutils/setup.py
263
#!/usr/bin/env python from __future__ import division, print_function def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('distutils', parent_package, top_path) config.add_subpackage('command') config.add_subpackage('fcompiler')...
ujenmr/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/elasticache_facts.py
27
#!/usr/bin/python # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = ''' module: ela...
experiencecoin/experiencecoin
refs/heads/master
qa/rpc-tests/replace-by-fee.py
54
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test replace by fee code # from test_framework.test_framework import BitcoinTestFramework from test_...
TangHao1987/intellij-community
refs/heads/master
python/testData/completion/exportedConstants/a.after.py
83
from Xkinter import * LEFT<caret>
Deisss/python-sockjsroom
refs/heads/master
sockjsroom/jsonParser.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Simple MongoDB parser for output pretty JSON with ObjectID support """ try: import json except ImportError: import simplejson as json import datetime Parser = None # Limit import __all__ = ["Parser"] class DefaultJsonParser(json.JSONEncoder): """ Cre...
OCForks/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/filesystem_mock.py
122
# Copyright (C) 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 list of conditions and the f...
okfde/froide-campaign
refs/heads/master
froide_campaign/migrations/0002_auto_20160123_1454.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('froide_campaign', '0001_initial'), ] operations = [ migrations.AlterModelOptions( ...
pozdnyakov/chromium-crosswalk
refs/heads/master
chrome/common/extensions/docs/server2/render_servlet.py
3
# 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. from fnmatch import fnmatch import logging import mimetypes import traceback from urlparse import urlsplit from branch_utility import BranchUtility from fil...
ecatkins/instabilly
refs/heads/master
project/project/settings.py
1
""" Django settings for project project. Generated by 'django-admin startproject' using Django 1.8.3. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build path...
vrenaville/ngo-addons-backport
refs/heads/master
addons/l10n_si/__init__.py
439
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright: (C) 2012 - Mentis d.o.o., Dravograd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affe...
cellnopt/cellnopt
refs/heads/master
test/core/test_base.py
1
from cno.core.base import CNORBase, CNOBase from cno import cnodata from easydev import TempFile # To test some of the base functions, need to use something else such as cnorbool def test_cnobase(): c = CNOBase(cnodata('PKN-ToyMMB.sif'), cnodata("MD-ToyMMB.csv")) c.pknmodel c.midas c.data c.prep...
quantopian/PenguinDome
refs/heads/master
penguindome/client.py
1
# Quantopian, Inc. licenses this file to you 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,...
FHannes/intellij-community
refs/heads/master
python/testData/codeInsight/controlflow/lambda.py
83
{(lambda i=i: i) for i in range(4)}
nikkitan/bitcoin
refs/heads/master
test/functional/feature_minchainwork.py
33
#!/usr/bin/env python3 # Copyright (c) 2017-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test logic for setting nMinimumChainWork on command line. Nodes don't consider themselves out of "init...
galarant/pixi_sandbox
refs/heads/master
backend/urls.py
1
"""backend URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
KevinMidboe/statusHandler
refs/heads/master
flask/lib/python3.4/keyword.py
162
#! /usr/bin/env python3 """Keywords (from "graminit.c") This file is automatically generated; please don't muck it up! To update the symbols in this file, 'cd' to the top directory of the python source tree after building the interpreter and run: ./python Lib/keyword.py """ __all__ = ["iskeyword", "kwlist"] k...
heeraj123/oh-mainline
refs/heads/master
vendor/packages/django-debug-toolbar/debug_toolbar/panels/templates/panel.py
20
from __future__ import absolute_import, unicode_literals try: from collections import OrderedDict except ImportError: from django.utils.datastructures import SortedDict as OrderedDict from os.path import normpath from pprint import pformat import django from django import http from django.conf import settings...
rfdougherty/dipy
refs/heads/master
dipy/viz/fvtk.py
5
''' Fvtk module implements simple visualization functions using VTK. The main idea is the following: A window can have one or more renderers. A renderer can have none, one or more actors. Examples of actors are a sphere, line, point etc. You basically add actors in a renderer and in that way you can visualize the fore...
smarkwell/asuswrt-merlin
refs/heads/master
release/src-rt-6.x.4708/linux/linux-2.6.36/tools/perf/scripts/python/sched-migration.py
185
#!/usr/bin/python # # Cpu task migration overview toy # # Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com> # # perf trace event handlers have been generated by perf trace -g python # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free ...
qedi-r/home-assistant
refs/heads/dev
homeassistant/components/lock/device_action.py
2
"""Provides device automations for Lock.""" from typing import Optional, List import voluptuous as vol from homeassistant.const import ( ATTR_ENTITY_ID, ATTR_SUPPORTED_FEATURES, CONF_DOMAIN, CONF_TYPE, CONF_DEVICE_ID, CONF_ENTITY_ID, SERVICE_LOCK, SERVICE_OPEN, SERVICE_UNLOCK, ) fro...
Affix/CouchPotatoServer
refs/heads/master
libs/xmpp/transports.py
89
## transports.py ## ## Copyright (C) 2003-2004 Alexey "Snake" Nezhdanov ## ## 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, or (at your option) ## any later versi...
dtran320/django-storages
refs/heads/master
storages/backends/s3boto.py
1
import os import mimetypes try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.conf import settings from django.core.files.base import File from django.core.files.storage import Storage from django.core.exceptions import ImproperlyConfigured, SuspiciousOperation f...
Hasky0911/Maoyan
refs/heads/master
node_modules/node-gyp/gyp/tools/pretty_sln.py
1831
#!/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. """Prints the information in a sln file in a diffable way. It first outputs each projects in alphabetical order with their dependenci...
petosegan/scikit-learn
refs/heads/master
sklearn/random_projection.py
207
# -*- coding: utf8 """Random Projection transformers Random Projections are a simple and computationally efficient way to reduce the dimensionality of the data by trading a controlled amount of accuracy (as additional variance) for faster processing times and smaller model sizes. The dimensions and distribution of Ra...
Just-D/chromium-1
refs/heads/master
tools/telemetry/third_party/gsutilz/third_party/boto/tests/unit/cloudtrail/test_layer1.py
91
#!/usr/bin/env python import json from boto.cloudtrail.layer1 import CloudTrailConnection from tests.unit import AWSMockServiceTestCase class TestDescribeTrails(AWSMockServiceTestCase): connection_class = CloudTrailConnection def default_body(self): return b''' {"trailList": ...
bbengfort/hadoop-fundamentals
refs/heads/master
wines/wines.py
5
## Spark Application for performing SGD regression on wines. import csv from numpy import array from StringIO import StringIO from pyspark import SparkConf, SparkContext from pyspark.mllib.regression import LabeledPoint, LinearRegressionWithSGD # Load and parse the data def parsePoint(line): values = csv.reader...
vstoykov/django-hvad
refs/heads/master
hvad/tests/serialization.py
7
import pickle from django.utils import translation from hvad.test_utils.testcase import HvadTestCase from hvad.test_utils.project.app.models import Normal class PicklingTest(HvadTestCase): def test_untranslated_new_object_can_be_pickled(self): normal = Normal(shared_field="Shared") serialized_repr ...
PhonologicalCorpusTools/PyAnnotationGraph
refs/heads/master
tests/test_lexical.py
3
import pytest from polyglotdb import CorpusContext def test_lexicon_enrichment(timed_config, timed_lexicon_enrich_file): with CorpusContext(timed_config) as c: c.enrich_lexicon_from_csv(timed_lexicon_enrich_file) q = c.query_graph(c.word).filter(c.word.neighborhood_density < 10) q = q.c...
krasota/helloworld
refs/heads/master
node_modules/npm/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): ...
laperry1/android_external_chromium_org
refs/heads/cm-12.1
tools/valgrind/drmemory_analyze.py
53
#!/usr/bin/env python # Copyright (c) 2011 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. # drmemory_analyze.py ''' Given a Dr. Memory output file, parses errors and uniques them.''' from collections import defaultdict ...
bclau/nova
refs/heads/master
nova/tests/virt/disk/test_api.py
11
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 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.apach...
loulich/Couchpotato
refs/heads/master
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/newstube.py
37
# encoding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ExtractorError class NewstubeIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?newstube\.ru/media/(?P<id>.+)' _TEST = { 'url': 'http://www.newstube.ru/media/telekanal-cnn-pere...
rameshvs/nipype
refs/heads/master
nipype/interfaces/slicer/filtering/denoising.py
15
# -*- coding: utf8 -*- """Autogenerated file - DO NOT EDIT If you spot a bug, please report it on the mailing list and/or change the generator.""" from nipype.interfaces.base import CommandLine, CommandLineInputSpec, SEMLikeCommandLine, TraitedSpec, File, Directory, traits, isdefined, InputMultiPath, OutputMultiPath i...
turbokongen/home-assistant
refs/heads/dev
homeassistant/components/limitlessled/__init__.py
36
"""The limitlessled component."""
kronicz/ecommerce-2
refs/heads/master
lib/python2.7/site-packages/pip/_vendor/ipaddress.py
198
# Copyright 2007 Google Inc. # Licensed to PSF under a Contributor Agreement. """A fast, lightweight IPv4/IPv6 manipulation library in Python. This library is used to create/poke/manipulate IPv4 and IPv6 addresses and networks. """ from __future__ import unicode_literals import itertools import struct __version...
Mazecreator/tensorflow
refs/heads/master
tensorflow/contrib/ffmpeg/decode_audio_op_test.py
33
# 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...
mozilla/bedrock
refs/heads/master
tests/functional/test_home.py
4
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import pytest from pages.home import HomePage @pytest.mark.skip_if_firefox(reason='Download button is displayed only ...
idncom/odoo
refs/heads/8.0
addons/account_cancel/__openerp__.py
261
# -*- 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...
autosportlabs/kivy
refs/heads/master
examples/widgets/tabbed_panel_showcase.py
17
''' TabbedPanel ============ Test of the widget TabbedPanel showing all capabilities. ''' from kivy.app import App from kivy.animation import Animation from kivy.uix.floatlayout import FloatLayout from kivy.uix.tabbedpanel import TabbedPanel, TabbedPanelHeader from kivy.factory import Factory class StandingHeader(T...
rosmo/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/ecs_service_facts.py
13
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
DepthDeluxe/ansible
refs/heads/devel
lib/ansible/parsing/splitter.py
59
# (c) 2014 James Cammarata, <jcammarata@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any late...
jdm/gemrb
refs/heads/master
gemrb/GUIScripts/demo/Start.py
5
import GemRB def OnLoad(): GemRB.LoadGame(None) # this is needed, so the game loop runs and the load happens # before other code (eg. CreatePlayer) depending on it is run GemRB.SetNextScript("SetupGame")
mkhoeini/zerorpc-python
refs/heads/master
zerorpc/patterns.py
24
# -*- coding: utf-8 -*- # Open Source Initiative OSI - The MIT License (MIT):Licensing # # The MIT License (MIT) # Copyright (c) 2012 DotCloud Inc (opensource@dotcloud.com) # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Softwa...
ryfeus/lambda-packs
refs/heads/master
pytorch/source/caffe2/python/layers/concat.py
1
## @package concat # Module caffe2.python.layers.concat from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.python import schema from caffe2.python.layers.layers import ( ModelLayer, ) from future.utils imp...
kenshinthebattosai/readthedocs.org
refs/heads/master
readthedocs/core/management/commands/archive.py
25
from glob import glob import os import logging from django.conf import settings from django.core.management.base import BaseCommand from django.template import loader as template_loader log = logging.getLogger(__name__) class Command(BaseCommand): """Custom management command to rebuild documentation for all pr...
MobinRanjbar/hue
refs/heads/master
apps/search/src/search/migrations/0001_initial.py
39
# encoding: 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 'Facet' db.create_table('search_facet', ( ('data', self.gf('django.db.models.fields.Tex...
nharraud/b2share
refs/heads/master
invenio/legacy/external_authentication/openid.py
8
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2012 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 (at your option) any later...
leighpauls/k2cro4
refs/heads/master
third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/png_unittest.py
1
# Copyright (C) 2012 Balazs Ankes (bank@inf.u-szeged.hu) University of Szeged # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this lis...
akionakamura/scikit-learn
refs/heads/master
sklearn/covariance/tests/test_graph_lasso.py
272
""" Test the graph_lasso module. """ import sys import numpy as np from scipy import linalg from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_array_less from sklearn.covariance import (graph_lasso, GraphLasso, GraphLassoCV, empirical_...
msduketown/SublimeKodi
refs/heads/master
libs-mac/PIL/ExifTags.py
71
# # The Python Imaging Library. # $Id$ # # EXIF tags # # Copyright (c) 2003 by Secret Labs AB # # See the README file for information on usage and redistribution. # ## # This module provides constants and clear-text names for various # well-known EXIF tags. ## ## # Maps EXIF tags to tag names. TAGS = { # possib...
chand3040/sree_odoo
refs/heads/master
openerp/addons/report/tests/test_reports.py
385
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
dvliman/jaikuengine
refs/heads/master
common/management/commands/clean.py
35
# Copyright 2009 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 or agreed to in writing, ...
sapetnioc/brainvisa-maker
refs/heads/master
python/bv_build/workers/__init__.py
1
class RequirementWorker(object): @staticmethod def init_check_requirements(dir_manager, verbose): pass @staticmethod def check_module_requirement(dir_manager, module, verbose, **kwargs): raise NotImplementedError() @staticmethod def resolve_requirement(dir_manager, verb...
alessiodm/cloudbrain
refs/heads/master
cloudbrain/publishers/PikaPublisher.py
7
import json import pika from cloudbrain.publishers.PublisherInterface import Publisher class PikaPublisher(Publisher): """ Publisher implementation for RabbitMQ via the Pika client """ def __init__(self, device_name, device_id, rabbitmq_address, metric_name): super(PikaPublisher, self).__init__(device_n...
nexiles/odoo
refs/heads/8.0
addons/account/installer.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...
MycChiu/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/segment_reduction_ops_test.py
15
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
guillaume-havard/pong
refs/heads/master
src/gui.py
1
#! /usr/bin/python3 __author__ = 'Guillaume Havard' import pygame def print_text(surface, text, text_pos, text_color=pygame.Color(255, 255, 255)): """ Print a text on a surface :param surface: Surface to blit the text on :param text: texte to print :param text_pos: tuple of the top left position ...
GiantSteps/essentia
refs/heads/master
src/python/essentia/translate.py
10
# Copyright (C) 2006-2013 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation (FSF), either version 3 of the ...
ychen820/microblog
refs/heads/master
y/google-cloud-sdk/platform/google_appengine/lib/django-1.5/django/db/models/sql/datastructures.py
118
""" Useful auxilliary data structures for query construction. Not useful outside the SQL domain. """ class EmptyResultSet(Exception): pass class MultiJoin(Exception): """ Used by join construction code to indicate the point at which a multi-valued join was attempted (if the caller wants to treat that ...
dessHub/bc-14-online-store-application
refs/heads/master
flask/lib/python2.7/site-packages/pip/_vendor/html5lib/_trie/__init__.py
456
from __future__ import absolute_import, division, unicode_literals from .py import Trie as PyTrie Trie = PyTrie # pylint:disable=wrong-import-position try: from .datrie import Trie as DATrie except ImportError: pass else: Trie = DATrie # pylint:enable=wrong-import-position
Thomas-Tsai/od2ckan
refs/heads/master
map2ckan.py
1
#!/bin/python # -*- coding: utf-8 -*- import organization_map class mapod2ckan(): def __init__(self): self.package={'extras':[], 'tag':[], 'resources':[], 'org':{'extras':[]}} self.license_id='1' self.license_url='http' def map_package_params(self, key, value): self.package[key] = value def map_tag_p...
ltilve/chromium
refs/heads/igalia-sidebar
tools/clang/scripts/posix-print-revision.py
55
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys # GN only supports shelling to python. Until update.py is used on all # platforms (currently only Windows), wrap update.sh. sys.exit(os...
ramitalat/odoo
refs/heads/8.0
addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tiny_socket.py
386
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
decentfox/aiohttp
refs/heads/master
tests/test_web_request_handler.py
5
import pytest from aiohttp import web from unittest import mock def test_repr(loop): app = web.Application(loop=loop) manager = app.make_handler() handler = manager() assert '<RequestHandler none:none disconnected>' == repr(handler) handler.transport = object() handler._meth = 'GET' han...
piquadrat/django
refs/heads/master
django/core/files/storage.py
21
import os from datetime import datetime from urllib.parse import urljoin from django.conf import settings from django.core.exceptions import SuspiciousFileOperation from django.core.files import File, locks from django.core.files.move import file_move_safe from django.core.signals import setting_changed from django.ut...
pescobar/easybuild-framework
refs/heads/master
test/framework/sandbox/easybuild/easyblocks/f/foofoo.py
2
## # Copyright 2009-2020 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
lach76/scancode-toolkit
refs/heads/develop
tests/commoncode/test_functional.py
6
# # Copyright (c) 2015 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...