repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
jcoady9/python-for-android
python-modules/twisted/twisted/spread/publish.py
61
4465
# -*- test-case-name: twisted.test.test_pb -*- # Copyright (c) 2001-2008 Twisted Matrix Laboratories. # See LICENSE for details. """ Persistently cached objects for PB. Maintainer: Glyph Lefkowitz Future Plans: None known. """ import time from twisted.internet import defer from twisted.spread import banana, jelly,...
apache-2.0
karandpr/Doppler3ICS
scripts/tracing/draw_functrace.py
14676
3560
#!/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 ...
gpl-2.0
Intel-Corporation/tensorflow
tensorflow/contrib/learn/python/learn/estimators/composable_model_test.py
56
6358
# 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...
apache-2.0
brandond/ansible
test/units/modules/network/nxos/test_nxos_pim.py
44
2195
# (c) 2016 Red Hat 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 is dis...
gpl-3.0
Gitlab11/odoo
addons/bus/bus.py
325
7324
# -*- coding: utf-8 -*- import datetime import json import logging import select import threading import time import random import simplejson import openerp from openerp.osv import osv, fields from openerp.http import request from openerp.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT _logger = logging.getLogger(__...
agpl-3.0
freakboy3742/django
tests/db_functions/comparison/test_coalesce.py
71
2643
from django.db.models import TextField from django.db.models.functions import Coalesce, Lower from django.test import TestCase from django.utils import timezone from ..models import Article, Author lorem_ipsum = """ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut l...
bsd-3-clause
menardorama/ReadyNAS-Add-ons
headphones-1.0.0/files/etc/apps/headphones/lib/unidecode/x0d0.py
253
4706
data = ( 'kweon', # 0x00 'kweonj', # 0x01 'kweonh', # 0x02 'kweod', # 0x03 'kweol', # 0x04 'kweolg', # 0x05 'kweolm', # 0x06 'kweolb', # 0x07 'kweols', # 0x08 'kweolt', # 0x09 'kweolp', # 0x0a 'kweolh', # 0x0b 'kweom', # 0x0c 'kweob', # 0x0d 'kweobs', # 0x0e 'kweos', # 0x...
gpl-2.0
jmread/molearn
runDemo.py
1
1406
#!/usr/bin/python import sys from time import * from numpy import * from molearn.core import metrics from sklearn import linear_model from molearn.classifiers.BR import BR from molearn.classifiers.CC import CC set_printoptions(precision=3, suppress=True) basename = "molearn/data/" dname="Music.csv" L = 6 filename=bas...
gpl-2.0
alxgu/ansible
lib/ansible/modules/cloud/amazon/ec2_vpc_net_facts.py
27
11396
#!/usr/bin/python # # This is a 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 Ansible library is distributed in the hope that i...
gpl-3.0
voodka/ghostbakup
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/pygments/styles/murphy.py
364
2751
# -*- coding: utf-8 -*- """ pygments.styles.murphy ~~~~~~~~~~~~~~~~~~~~~~ Murphy's style from CodeRay. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Keyword, Name, Comment,...
mit
pplatek/odoo
openerp/addons/test_new_api/models.py
74
7032
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-2014 OpenERP (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
agpl-3.0
chongtianfeiyu/kbengine
kbe/res/scripts/common/Lib/concurrent/futures/process.py
93
17574
# Copyright 2009 Brian Quinlan. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Implements ProcessPoolExecutor. The follow diagram and text describe the data-flow through the system: |======================= In-process =====================|== Out-of-process ==| +----------+ +----------...
lgpl-3.0
orb-framework/orb
tests/functional/mysql/test_my_statements.py
2
5444
def test_my_statement_add_column(User, my_sql): st = my_sql.statement('ADD COLUMN') assert st is not None statement, data = st(User.schema().column('username')) assert statement == 'ADD COLUMN `username` varchar(255) UNIQUE' def test_my_statement_create_table(User, my_sql): st = my_sql.statement('...
mit
sebasbaumh/three.js
utils/converters/fbx/convert_to_threejs.py
16
77099
# @author zfedoran / http://github.com/zfedoran import os import sys import math import operator import re import json import types import shutil # ##################################################### # Globals # ##################################################### option_triangulate = True option_textures = True o...
mit
instantchow/home-assistant
homeassistant/components/sensor/steam_online.py
12
2181
""" Sensor for Steam account status. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.steam_online/ """ from homeassistant.helpers.entity import Entity from homeassistant.const import CONF_API_KEY ICON = 'mdi:steam' REQUIREMENTS = ['steamodd==4.21...
mit
wujinjun/TFbook
chapter5/models-master/slim/nets/inception_v2_test.py
26
10873
# 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 applicable ...
gpl-3.0
maxfierke/android_kernel_samsung_aries
tools/perf/scripts/python/sched-migration.py
11215
11670
#!/usr/bin/python # # Cpu task migration overview toy # # Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com> # # perf script event handlers have been generated by perf script -g python # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Fre...
gpl-2.0
tareqalam/plone.formbuilder
src/plone/formbuilder/services/add.py
1
2845
# -*- coding: utf-8 -*- from plone.restapi.deserializer import json_body from plone.restapi.exceptions import DeserializationError from plone.restapi.interfaces import IDeserializeFromJson from plone.restapi.interfaces import ISerializeToJson from plone.restapi.services import Service from plone.restapi.services.conten...
gpl-3.0
HiroIshikawa/21playground
microblog/flask/lib/python3.5/site-packages/werkzeug/contrib/limiter.py
365
1334
# -*- coding: utf-8 -*- """ werkzeug.contrib.limiter ~~~~~~~~~~~~~~~~~~~~~~~~ A middleware that limits incoming data. This works around problems with Trac_ or Django_ because those directly stream into the memory. .. _Trac: http://trac.edgewall.org/ .. _Django: http://www.djangoproject.com/ ...
mit
L3K0V/lifebelt
server/api/members/migrations/0002_auto_20151009_2237.py
1
2005
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('courses', '0002_course'), ('membe...
mit
mlperf/training_results_v0.7
Google/benchmarks/bert/implementations/bert-cloud-TF2.0-gpu-v100-8/tf2_common/benchmark/bert_benchmark_utils.py
2
4276
# Copyright 2019 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...
apache-2.0
ojake/django
tests/prefetch_related/test_uuid.py
291
4347
from __future__ import unicode_literals from django.test import TestCase from .models import Flea, House, Person, Pet, Room class UUIDPrefetchRelated(TestCase): def test_prefetch_related_from_uuid_model(self): Pet.objects.create(name='Fifi').people.add( Person.objects.create(name='Ellen'), ...
bsd-3-clause
mozilla/verbatim
vendor/lib/python/django/utils/ipv6.py
99
7871
# This code was mostly based on ipaddr-py # Copyright 2007 Google Inc. http://code.google.com/p/ipaddr-py/ # Licensed under the Apache License, Version 2.0 (the "License"). from django.core.exceptions import ValidationError def clean_ipv6_address(ip_str, unpack_ipv4=False, error_message="This is not a valid IP...
gpl-2.0
BioroboticsLab/diktya
tests/test_func_api_helpers.py
1
3885
# Copyright 2015 Leon Sixt # # 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, sof...
apache-2.0
landism/pants
src/python/pants/util/desktop.py
8
1485
# coding=utf-8 # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import subprocess f...
apache-2.0
ScottWales/rose
lib/python/rose/config_editor/variable.py
1
25435
# -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # (C) British Crown Copyright 2012-5 Met Office. # # This file is part of Rose, a framework for meteorological suites. # # Rose is free software: you can redistribute it and/or modify # it under the terms of the GNU G...
gpl-3.0
CiscoSystems/tempest
tempest/scenario/test_security_groups_basic_ops.py
3
20917
# Copyright 2013 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...
apache-2.0
cctaylor/googleads-python-lib
examples/dfp/v201502/creative_set_service/get_all_creative_sets.py
3
2070
#!/usr/bin/python # # Copyright 2015 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 b...
apache-2.0
Shiroy/servo
tests/wpt/web-platform-tests/tools/pytest/_pytest/assertion/util.py
175
11730
"""Utilities for assertion debugging""" import pprint import _pytest._code import py try: from collections import Sequence except ImportError: Sequence = list BuiltinAssertionError = py.builtin.builtins.AssertionError u = py.builtin._totext # The _reprcompare attribute on the util module is used by the new a...
mpl-2.0
etingof/pyasn1-modules
tests/test_rfc5958.py
2
2860
# # This file is part of pyasn1-modules software. # # Created by Russ Housley # Copyright (c) 2019, Vigil Security, LLC # License: http://snmplabs.com/pyasn1/license.html # import sys import unittest from pyasn1.codec.der.decoder import decode as der_decoder from pyasn1.codec.der.encoder import encode as der_encoder f...
bsd-2-clause
goldcoin/gldcoin
BuildDeps/deps/boost/tools/quickbook/test/python/output-deps.py
6
4511
#!/usr/bin/env python import sys, os, subprocess, tempfile, re def main(args, directory): if len(args) != 1: print "Usage: output-deps.py quickbook-command" exit(1) quickbook_command = args[0] failures = 0 failures += run_quickbook(quickbook_command, 'svg_missing.qbk', dep...
mit
sudosurootdev/external_chromium_org
tools/telemetry/telemetry/core/browser_credentials_unittest.py
47
2272
# Copyright 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. import os import tempfile import unittest from telemetry.core import browser_credentials SIMPLE_CREDENTIALS_STRING = """ { "google": { "username": "e...
bsd-3-clause
ArianaGashi/Techstitution
venv/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/base.py
329
13942
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type from ..constants import scopingElements, tableInsertModeElements, namespaces # The scope markers are inserted when entering object elements, # marquees, table cells, and table captions, and are used to prevent for...
cc0-1.0
joeythesaint/yocto-autobuilder
lib/python2.7/site-packages/autobuilder/buildsteps/BuildToolchainImages.py
3
1532
''' Created on Jan 6, 2013 __author__ = "Elizabeth 'pidge' Flanagan" __copyright__ = "Copyright 2012-2013, Intel Corp." __credits__ = ["Elizabeth Flanagan"] __license__ = "GPL" __version__ = "2.0" __maintainer__ = "Elizabeth Flanagan" __email__ = "elizabeth.flanagan@intel.com" ''' from buildbot.steps.shell import Sh...
gpl-2.0
andersonresende/django
django/contrib/gis/gdal/srs.py
11
12004
""" The Spatial Reference class, represensents OGR Spatial Reference objects. Example: >>> from django.contrib.gis.gdal import SpatialReference >>> srs = SpatialReference('WGS84') >>> print(srs) GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHOR...
bsd-3-clause
stefanseefeld/qmtest
qm/test/classes/previous_testrun.py
2
1816
######################################################################## # # File: previous_testrun.py # Author: Stefan Seefeld # Date: 2006-11-16 # # Contents: # QMTest PreviousTestRun extension class. # # Copyright (c) 2006 by CodeSourcery, Inc. All rights reserved. # # For license terms see the file COPYING....
gpl-2.0
mark-me/Pi-Jukebox
venv/Lib/site-packages/pygame/freetype.py
1
1814
"""Enhanced Pygame module for loading and rendering computer fonts""" import sys from pygame._freetype import ( Font, STYLE_NORMAL, STYLE_OBLIQUE, STYLE_STRONG, STYLE_UNDERLINE, STYLE_WIDE, STYLE_DEFAULT, init, quit, get_init, was_init, get_cache_size, get_default_font, get_default_resolution, get_er...
agpl-3.0
krageon/closure-linter
closure_linter/common/tokenizer.py
127
5827
#!/usr/bin/env python # # Copyright 2007 The Closure Linter 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 #...
apache-2.0
wangpanjun/doit
tests/test_filewatch.py
5
3473
import os import time import threading import pytest from doit.filewatch import FileModifyWatcher, get_platform_system def testUnsuportedPlatform(monkeypatch): monkeypatch.setattr(FileModifyWatcher, 'supported_platforms', ()) pytest.raises(Exception, FileModifyWatcher, []) platform = get_platform_system()...
mit
fjbatresv/odoo
addons/google_account/__openerp__.py
312
1457
# -*- 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...
agpl-3.0
bonitadecker77/python-for-android
python3-alpha/python3-src/Lib/xml/dom/domreg.py
51
3463
"""Registration facilities for DOM. This module should not be used directly. Instead, the functions getDOMImplementation and registerDOMImplementation should be imported from xml.dom.""" from xml.dom.minicompat import * # isinstance, StringTypes # This is a list of well-known implementations. Well-known names # sho...
apache-2.0
pshen/ansible
contrib/vault/vault-keyring.py
119
3430
#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2014, Matt Martz <matt@sivel.net> # (c) 2016, Justin Mayer <https://justinmayer.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 Fre...
gpl-3.0
bdrung/audacity
lib-src/lv2/serd/waflib/Runner.py
330
4483
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import random,atexit try: from queue import Queue except ImportError: from Queue import Queue from waflib import Utils,Task,Errors,Logs GAP=10 class TaskConsumer(Utils.threa...
gpl-2.0
HydrelioxGitHub/home-assistant
homeassistant/components/neato/switch.py
2
3290
"""Support for Neato Connected Vacuums switches.""" import logging from datetime import timedelta import requests from homeassistant.const import STATE_OFF, STATE_ON from homeassistant.helpers.entity import ToggleEntity from homeassistant.components.neato import NEATO_ROBOTS, NEATO_LOGIN _LOGGER = logging.getLogger(__...
apache-2.0
wweiradio/zulip
zerver/lib/statistics.py
115
4695
# -*- coding: utf-8 -*- from __future__ import absolute_import from zerver.models import UserProfile, UserActivity, UserActivityInterval, Message from django.utils.timezone import utc from datetime import timedelta from itertools import chain def median(data): data = sorted(data) size = len(data) if si...
apache-2.0
nakul02/systemml
bin/utils.py
15
3455
#!/usr/bin/env python # ------------------------------------------------------------- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses t...
apache-2.0
EthanHeilman/bitcoin
test/functional/rpc_generate.py
36
1188
#!/usr/bin/env python3 # Copyright (c) 2020 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 generate RPC.""" from test_framework.test_framework import BitcoinTestFramework from test_framework.ut...
mit
agileblaze/OpenStackTwoFactorAuthentication
openstack_dashboard/dashboards/admin/metering/tests.py
24
7560
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
apache-2.0
heimdali/ITK
Modules/ThirdParty/GDCM/src/gdcm/Wrapping/Python/TestWrap.py
17
2817
#!/usr/bin/env python ############################################################################ # # Program: GDCM (Grassroots DICOM). A DICOM library # Module: $URL$ # # Copyright (c) 2006-2010 Mathieu Malaterre # All rights reserved. # See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for detail...
apache-2.0
Distrotech/antlr4
runtime/Python3/src/antlr4/tree/RuleTagToken.py
17
3322
# # [The "BSD license"] # Copyright (c) 2013 Terence Parr # Copyright (c) 2013 Sam Harwell # Copyright (c) 2014 Eric Vergnaud # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributio...
bsd-3-clause
afrolov1/nova
nova/api/manager.py
119
1216
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
apache-2.0
adambrenecki/django
django/contrib/formtools/tests/wizard/namedwizardtests/tests.py
127
15125
from __future__ import unicode_literals from django.core.urlresolvers import reverse from django.http import QueryDict from django.test import TestCase from django.contrib.auth.models import User from django.contrib.auth.tests.utils import skipIfCustomUser from django.contrib.formtools.wizard.views import (NamedUrlS...
bsd-3-clause
jgresula/jagpdf
code/tools/external/python/pygccxml/declarations/pattern_parser.py
1
4743
# Copyright 2004 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. (See # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) """implementation details""" import types class parser_t( object ): """implementation details""" def __init__( self ...
mit
pacificIT/freevo2
src/plugins/shutdown.py
1
4745
# -*- coding: iso-8859-1 -*- # ----------------------------------------------------------------------------- # shutdown.py - shutdown plugin # ----------------------------------------------------------------------------- # $Id$ # # This plugin creates the shutdown main menu item # # First edition: Dirk Meyer <dischi@...
gpl-2.0
mikaelboman/home-assistant
homeassistant/components/lock/mqtt.py
8
4282
""" Support for MQTT locks. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/lock.mqtt/ """ import logging import voluptuous as vol import homeassistant.components.mqtt as mqtt from homeassistant.components.lock import LockDevice from homeassistant.const...
mit
huguesmayolle/famille
famille/migrations/0032_auto__add_field_prestataire_restrictions.py
1
22005
# -*- coding: utf-8 -*- from south.utils import datetime_utils as 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 'Prestataire.restrictions' db.add_column(u'famille_prestat...
apache-2.0
ychen820/microblog
y/google-cloud-sdk/lib/googlecloudsdk/compute/subcommands/images/deprecate.py
4
7668
# Copyright 2014 Google Inc. All Rights Reserved. """Command for deprecating images.""" import datetime from googlecloudapis.compute.v1 import compute_v1_messages from googlecloudsdk.calliope import arg_parsers from googlecloudsdk.calliope import exceptions as calliope_exceptions from googlecloudsdk.compute.lib import...
bsd-3-clause
jonathan-beard/edx-platform
lms/djangoapps/ccx/models.py
46
3629
""" Models for the custom course feature """ from datetime import datetime import logging from django.contrib.auth.models import User from django.db import models from django.utils.timezone import UTC from lazy import lazy from xmodule_django.models import CourseKeyField, LocationKeyField # pylint: disable=import-er...
agpl-3.0
Tesla-Redux-Devices/android_kernel_samsung_trlte
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
1927
# 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 system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
gpl-2.0
tschneidereit/servo
python/toml/toml.py
29
15580
import datetime, decimal, re try: _range = xrange except NameError: unicode = str _range = range basestring = str unichr = chr def load(f): """Returns a dictionary containing the named file parsed as toml.""" if isinstance(f, basestring): with open(f) as ffile: return l...
mpl-2.0
SauloAislan/ironic
ironic/drivers/modules/oneview/deploy_utils.py
1
16020
# Copyright 2016 Hewlett Packard Enterprise Development LP. # Copyright 2016 Universidade Federal de Campina Grande # 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 Licens...
apache-2.0
mscuthbert/abjad
abjad/tools/abjadbooktools/CodeBlockSpecifier.py
1
2586
# -*- encoding: utf-8 -*- from abjad.tools import abctools class CodeBlockSpecifier(abctools.AbjadValueObject): r'''A code block specifier. ''' ### CLASS VARIABLES ### __documentation_section__ = 'Internals' __slots__ = ( '_allow_exceptions', '_hide', '_strip_prompt', ...
gpl-3.0
gcodetogit/depot_tools
third_party/boto/manage/server.py
63
21995
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010 Chris Moyer http://coredumped.org/ # # 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, incl...
bsd-3-clause
faarwa/EngSocP5
zxing/cpp/scons/scons-local-2.0.0.final.0/SCons/Scanner/Fortran.py
34
14360
"""SCons.Scanner.Fortran This module implements the dependency scanner for Fortran code. """ # # 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 documentati...
gpl-3.0
jdemon519/cfme_tests
cfme/tests/optimize/test_bottlenecks.py
2
4652
# -*- coding: utf-8 -*- import fauxfactory import pytest from datetime import timedelta from cfme.optimize.bottlenecks import Bottlenecks from utils import conf from utils.appliance.implementations.ui import navigate_to from utils.ssh import SSHClient from utils.version import current_version @pytest.fixture(scope="...
gpl-2.0
Strubbl/dinorss
site_check.py
1
2974
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Wannabe RSS """ import chardet import codecs import difflib import os import time import urllib.error import urllib.request from htmldiff.diff import textDiff import config from functions import is_content_different from functions import save_file from functions imp...
gpl-3.0
LeoHeo/fastube
fastube/fastube/settings/partials/auth.py
1
1885
# -*- coding: utf-8 -*- import os # Password validation # https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, { 'NAME': 'django.contrib.auth.passw...
mit
adrpar/incubator-airflow
airflow/operators/jdbc_operator.py
46
2402
# -*- coding: utf-8 -*- # # 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 ...
apache-2.0
fengsp/tornado
docs/conf.py
8
2959
# Ensure we get the local copy of tornado instead of what's on the standard path import os import sys import time sys.path.insert(0, os.path.abspath("..")) import tornado master_doc = "index" project = "Tornado" copyright = "2009-%s, The Tornado Authors" % time.strftime("%Y") version = release = tornado.version ext...
apache-2.0
gtko/CouchPotatoServer
libs/requests/packages/chardet/charsetgroupprober.py
2929
3791
######################## 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 ...
gpl-3.0
wltrimbl/kmerspectrumanalyzer
ksatools/filter-annotated.py
1
1960
#!/usr/bin/env python import sys import os import re from argparse import ArgumentParser from Bio import SeqIO def gccontent(sq): '''function returns gc content of sequence''' l = len(sq) gc_count = 0 for ch in sq: if ch in ['G', 'C', 'g', 'c']: gc_count += 1 try: r = ...
bsd-2-clause
roxypop/prueba
ejemplo.py
1
1108
_author_ = 'Rosy' def sumados(): print 10 * 20 def divicion(a, b): result = a / b print result def cast(): lista=[1,2,3, "hola"{"key1":"Rosa","key2":"Armando"}(1,2,3)] tupla=(1,2,3) diccionario={"key1":"Rosa","key2":"Armando"} for i in lista: print i """for k,v in diccionario.i...
gpl-2.0
Chilledheart/chromium
tools/telemetry/telemetry/internal/actions/drag.py
29
4397
# Copyright 2015 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. """A Telemetry page_action that performs the "drag" action on pages. Action parameters are: - selector: If no selector is defined then the action attempts t...
bsd-3-clause
mega-force/xbmc
lib/gtest/test/gtest_shuffle_test.py
184
12608
#!/usr/bin/env python # # 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 list of...
gpl-2.0
aurelijusb/arangodb
3rdParty/V8-4.3.61/testing/gtest/scripts/upload_gtest.py
1963
2851
#!/usr/bin/env python # # 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 list...
apache-2.0
ric2b/Vivaldi-browser
chromium/net/data/parse_certificate_unittest/regenerate_pem_from_ascii.py
11
3123
#!/usr/bin/python # Copyright (c) 2016 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. """ Given a path to a XXX.pem file, re-generates a CERTIFICATE. The .pem file is expected to contain comments that resemble: #-----BE...
bsd-3-clause
damdam-s/OCB
addons/account/project/project.py
273
2423
# -*- 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...
agpl-3.0
NL66278/OCB
addons/base_action_rule/__init__.py
438
1098
# -*- 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...
agpl-3.0
cfe-lab/MiCall
micall/utils/scan_run_folders.py
1
4902
import os from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter from collections import Counter, defaultdict from csv import DictWriter from pathlib import Path from tempfile import NamedTemporaryFile from zipfile import ZipFile, ZIP_DEFLATED import seaborn as sns import matplotlib.pyplot as plt import pa...
agpl-3.0
asser/django
tests/multiple_database/tests.py
11
94112
from __future__ import unicode_literals import datetime import pickle from operator import attrgetter from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.core import management from django.db import DEFAULT_DB_ALIAS, connections, router, transaction from ...
bsd-3-clause
riptano/cassandra-dtest
tools/files.py
5
1263
import fileinput import os import re import sys import tempfile from dtest import debug # Depending on dtest is not good long-term. def replace_in_file(filepath, search_replacements): """ In-place file search and replace. filepath - The path of the file to edit search_replacements - a list of tuple...
apache-2.0
Architektor/PySnip
venv/lib/python2.7/site-packages/twisted/test/test_ssl.py
3
23583
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for twisted SSL support. """ from __future__ import division, absolute_import from twisted.python.filepath import FilePath from twisted.trial import unittest from twisted.internet import protocol, reactor, interfaces, defer from twisted...
gpl-3.0
metaml/nupic
src/nupic/datafiles/extra/firstOrder/raw/makeDataset.py
34
3485
#! /usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions...
agpl-3.0
ActionAdam/osmc
package/mediacenter-skin-osmc/files/usr/share/kodi/addons/script.module.unidecode/lib/unidecode/x058.py
252
4678
data = ( 'Ku ', # 0x00 'Ke ', # 0x01 'Tang ', # 0x02 'Kun ', # 0x03 'Ni ', # 0x04 'Jian ', # 0x05 'Dui ', # 0x06 'Jin ', # 0x07 'Gang ', # 0x08 'Yu ', # 0x09 'E ', # 0x0a 'Peng ', # 0x0b 'Gu ', # 0x0c 'Tu ', # 0x0d 'Leng ', # 0x0e '[?] ', # 0x0f 'Ya ', # 0x10 'Qian ', ...
gpl-2.0
Stane1983/u-boot
doc/conf.py
2
18179
# -*- coding: utf-8 -*- # # The U-Boot documentation build configuration file, created by # sphinx-quickstart on Fri Feb 12 13:51:46 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # ...
gpl-2.0
teochenglim/ansible-modules-extras
cloud/amazon/ec2_remote_facts.py
15
6388
#!/usr/bin/python # # This is a 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 Ansible library is distributed in the hope that i...
gpl-3.0
yanchen036/tensorflow
tensorflow/python/ops/losses/util_test.py
113
1898
# 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...
apache-2.0
JshWright/home-assistant
homeassistant/components/lock/__init__.py
2
5325
""" Component to interface with various locks that can be controlled remotely. For more details about this component, please refer to the documentation at https://home-assistant.io/components/lock/ """ import asyncio from datetime import timedelta import functools as ft import logging import os import voluptuous as v...
apache-2.0
wickman/aurproxy
tellapart/aurproxy/share/calculator.py
5
2394
# Copyright 2015 TellApart, 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 writi...
apache-2.0
stargaser/herschel-archive
hsadownload/boundingbox.py
1
3816
# coding: utf-8 # ## Four corners of Herschel images # This function from http://stackoverflow.com/questions/13542855/python-help-to-implement-an-algorithm-to-find-the-minimum-area-rectangle-for-gi # # and working code (error in the original) at http://gis.stackexchange.com/questions/22895/how-to-find-the-minimum-ar...
bsd-3-clause
elit3ge/SickRage
lib/github/StatsParticipation.py
74
2654
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> # # ...
gpl-3.0
alvarolopez/nova
nova/tests/unit/api/ec2/test_cloud.py
8
147928
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License");...
apache-2.0
jbk0th/Py4E-Captsone
pagerank/bs4/testing.py
4
27272
"""Helper classes for tests.""" import pickle import copy import functools import unittest from unittest import TestCase from bs4 import BeautifulSoup from bs4.element import ( CharsetMetaAttributeValue, Comment, ContentMetaAttributeValue, Doctype, SoupStrainer, ) from bs4.builder import HTMLParse...
mit
gjhiggins/fuguecoin
contrib/linearize/linearize-hashes.py
1
4123
#!/usr/bin/env python3 # # linearize-hashes.py: List blocks in a linear, no-fork version of the chain. # # Copyright (c) 2013-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. # import unittest impor...
mit
konstruktoid/ansible-upstream
lib/ansible/plugins/netconf/junos.py
6
5602
# # (c) 2017 Red Hat 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 is d...
gpl-3.0
jakobworldpeace/scikit-learn
sklearn/svm/bounds.py
36
2712
"""Determination of parameter bounds""" # Author: Paolo Losi # License: BSD 3 clause from warnings import warn import numpy as np from ..preprocessing import LabelBinarizer from ..utils.validation import check_consistent_length, check_array from ..utils.extmath import safe_sparse_dot def l1_min_c(X, y, loss='squar...
bsd-3-clause
anryko/ansible
lib/ansible/modules/cloud/vmware/_vmware_dns_config.py
11
3905
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Joseph Callen <jcallen () csc.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version'...
gpl-3.0
tuxfux-hlp-notes/python-batches
archieves/batch-57/modules/sheets/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.py
333
15224
# -*- coding: utf-8 -*- # # Copyright (C) 2013-2015 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # from io import BytesIO import logging import os import re import struct import sys from .compat import sysconfig, detect_encoding, ZipFi...
gpl-3.0
Endika/odoo
addons/account/product.py
374
2897
# -*- 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...
agpl-3.0
openstack/python-congressclient
congressclient/tests/fakes.py
1
2183
# Copyright 2013 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 agreed to...
apache-2.0