repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
mgaitan/scipy
scipy/_lib/_version.py
65
4792
"""Utility to compare (Numpy) version strings. The NumpyVersion class allows properly comparing numpy version strings. The LooseVersion and StrictVersion classes that distutils provides don't work; they don't recognize anything like alpha/beta/rc/dev versions. """ import re from scipy._lib.six import string_types ...
bsd-3-clause
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/site-packages/scipy/special/tests/test_sph_harm.py
43
1182
from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import assert_allclose import scipy.special as sc def test_first_harmonics(): # Test against explicit representations of the first four # spherical harmonics which use `theta` as the azimuthal angle, # ...
gpl-3.0
petercable/mi-dataset
mi/dataset/parser/dosta_abcdjm_mmp_cds.py
8
1886
#!/usr/bin/env python """ @package mi.dataset.parser.dosta_abcdjm_mmp_cds @file marine-integrations/mi/dataset/parser/dosta_abcdjm_mmp_cds.py @author Mark Worden @brief Particle for the DostaAbcdjmMmpCds dataset driver Release notes: initial release """ from mi.core.log import get_logger from mi.core.common import ...
bsd-2-clause
sid88in/incubator-airflow
airflow/ti_deps/deps/dagrun_exists_dep.py
20
2287
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
apache-2.0
yohanko88/gem5-DC
util/pbs/pbs.py
90
6097
# Copyright (c) 2005 The Regents of The University of Michigan # 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 ...
bsd-3-clause
frreiss/tensorflow-fred
tensorflow/python/kernel_tests/dynamic_partition_op_test.py
5
15596
# 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
rackerlabs/quark
quark/db/migration/alembic/versions/552b213c2b8c_default_policy_without_policy.py
6
2989
"""Ensure default IP policy exists for subnets without IP policies Revision ID: 552b213c2b8c Revises: 45a07fac3d38 Create Date: 2014-07-25 15:07:07.418971 """ # revision identifiers, used by Alembic. revision = '552b213c2b8c' down_revision = '45a07fac3d38' import logging from quark.plugin_modules import ip_policie...
apache-2.0
shukiz/VAR-SOM-AM33-Kernel-3-15
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
4653
3596
# EventClass.py # # This is a library defining some events types classes, which could # be used by other scripts to analyzing the perf samples. # # Currently there are just a few classes defined for examples, # PerfEvent is the base class for all perf event sample, PebsEvent # is a HW base Intel x86 PEBS event, and use...
gpl-2.0
jnewland/home-assistant
homeassistant/components/pilight/switch.py
7
6543
"""Support for switching devices via Pilight to on and off.""" import logging import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.components import pilight from homeassistant.components.switch import (SwitchDevice, PLATFORM_SCHEMA) from homeassistant.const import (CONF_NAM...
apache-2.0
yannickcr/Sick-Beard
sickbeard/providers/t411.py
14
9106
# -*- coding: latin-1 -*- # Author: Guillaume Serre <guillaume.serre@gmail.com> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 Softwar...
gpl-3.0
johnmgregoire/NanoCalorimetry
plot_pprvsTsubtract20110818.py
1
3566
import numpy, h5py, os from PnSC_main import * from PnSC_h5io import * from PnSC_math import * p='C:/Users/JohnnyG/Documents/PythonCode/Vlassak/NanoCalorimetry/20110816_Zr-Hf-B.h5' h5f=h5py.File(p, mode='r') ehl=[\ ('quadlinheating2_0817', 'cell9_25mAlinquad2_first_1_of_1', 'Zr-B, 1st'),\ ('quadlinheating2_0817', 'ce...
bsd-3-clause
mitya57/django
django/utils/translation/__init__.py
7
7498
""" Internationalization support. """ import re import warnings from contextlib import ContextDecorator from django.utils.deprecation import RemovedInDjango21Warning from django.utils.functional import lazy __all__ = [ 'activate', 'deactivate', 'override', 'deactivate_all', 'get_language', 'get_language_from_...
bsd-3-clause
llvm-mirror/lldb
utils/lui/lldbutil.py
13
33522
##===-- lldbutil.py ------------------------------------------*- Python -*-===## ## # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception ## ##===------------------------------...
apache-2.0
felipemontefuscolo/bitme
tactic/bitmex_dummy_tactic.py
1
1028
from common.quote import Quote from tactic import TacticInterface, ExchangeInterface, Symbol, OrderCommon, Fill import pandas as pd class BitmexDummyTactic(TacticInterface): """ This class is associated to orders issued by Bitmex """ def finalize(self) -> None: pass def handle_quote(self...
mpl-2.0
RayMick/SFrame
oss_src/unity/python/sframe/connect/main.py
8
7392
""" This module contains the main logic for start, query, stop graphlab server client connection. """ ''' Copyright (C) 2015 Dato, Inc. All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. ''' from ..cython.cy_unity import UnityGloba...
bsd-3-clause
ckirby/django
django/contrib/messages/storage/cookie.py
471
6545
import json from django.conf import settings from django.contrib.messages.storage.base import BaseStorage, Message from django.http import SimpleCookie from django.utils import six from django.utils.crypto import constant_time_compare, salted_hmac from django.utils.safestring import SafeData, mark_safe class Message...
bsd-3-clause
rmed/wat-bridge
wat_bridge/signals.py
1
3542
# -*- coding: utf-8 -*- # # wat-bridge # https://github.com/rmed/wat-bridge # # The MIT License (MIT) # # Copyright (c) 2016 Rafael Medina García <rafamedgar@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software")...
mit
matmutant/sl4a
python/src/Lib/symtable.py
53
7911
"""Interface to the compiler's internal symbol tables""" import _symtable from _symtable import (USE, DEF_GLOBAL, DEF_LOCAL, DEF_PARAM, DEF_IMPORT, DEF_BOUND, OPT_IMPORT_STAR, OPT_EXEC, OPT_BARE_EXEC, SCOPE_OFF, SCOPE_MASK, FREE, GLOBAL_IMPLICIT, GLOBAL_EXPLICIT) import warnings import weakref __all__ = ["...
apache-2.0
romain-dartigues/ansible
test/units/modules/cloud/google/test_gcp_url_map.py
158
6086
import unittest from ansible.modules.cloud.google.gcp_url_map import _build_path_matchers, _build_url_map_dict class TestGCPUrlMap(unittest.TestCase): """Unit tests for gcp_url_map module.""" params_dict = { 'url_map_name': 'foo_url_map_name', 'description': 'foo_url_map description', ...
gpl-3.0
allen-fdes/python_demo
venv/Lib/encodings/unicode_internal.py
827
1196
""" Python 'unicode-internal' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs ### Codec APIs class Codec(codecs.Codec): # Note: Binding these as C functions will result in the class not # converting them to methods. This is in...
mit
chillipeper/will
will/mixins/naturaltime.py
3
1255
import datetime import re import time from natural.date import day import parsedatetime.parsedatetime as pdt class NaturalTimeMixin(object): def strip_leading_zeros(self, date_str): date_str = date_str.replace(":0", "__&&") date_str = re.sub(r"0*(\d+)", r"\g<1>", date_str) date_str = dat...
mit
mewtaylor/django
tests/template_tests/filter_tests/test_time.py
326
1812
from datetime import time from django.template.defaultfilters import time as time_filter from django.test import SimpleTestCase from django.utils import timezone from ..utils import setup from .timezone_utils import TimezoneTestCase class TimeTests(TimezoneTestCase): """ #20693: Timezone support for the tim...
bsd-3-clause
gladgod/zhiliao
zhiliao/galleries/tests.py
1
2128
from __future__ import unicode_literals from future.builtins import str from future.utils import native import os from shutil import rmtree from uuid import uuid4 from zhiliao.conf import settings from zhiliao.core.templatetags.mezzanine_tags import thumbnail from zhiliao.galleries.models import Gallery, GALLERIES_UP...
bsd-3-clause
mjkivi/flex
themes/d8_bootstrap/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
896
91092
# Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Notes: # # This is all roughly based on the Makefile system used by the Linux # kernel, but is a non-recursive make -- we put the entire dependency # graph in fr...
gpl-2.0
alex/sqlalchemy
test/engine/test_ddlevents.py
3
22128
from sqlalchemy.testing import assert_raises, assert_raises_message from sqlalchemy.schema import DDL, CheckConstraint, AddConstraint, \ DropConstraint from sqlalchemy import create_engine from sqlalchemy import MetaData, Integer, String, event, exc, text from sqlalchemy.testing.schema import Table from sqlalchemy...
mit
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/OpenGL/raw/GLES1/APPLE/framebuffer_multisample.py
8
1296
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GLES1 import _types as _cs # End users want this... from OpenGL.raw.GLES1._types import * from OpenGL.raw.GLES1 import _errors from OpenGL.constant import Constant as _C import...
gpl-3.0
mboeru/maraschino
lib/sqlalchemy/interfaces.py
22
10834
# sqlalchemy/interfaces.py # Copyright (C) 2007-2011 the SQLAlchemy authors and contributors <see AUTHORS file> # Copyright (C) 2007 Jason Kirtland jek@discorporate.us # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Interfaces and abs...
mit
cevaris/pants
src/python/pants/util/objects.py
10
1821
# 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) from collections imp...
apache-2.0
40223134/w16b_test
static/Brython3.1.3-20150514-095342/Lib/_testcapi.py
742
4231
CHAR_MAX = 127 CHAR_MIN = -128 DBL_MAX = 1.7976931348623157e+308 DBL_MIN = 2.2250738585072014e-308 FLT_MAX = 3.4028234663852886e+38 FLT_MIN = 1.1754943508222875e-38 INT_MAX = 2147483647 INT_MIN = -2147483648 LLONG_MAX = 9223372036854775807 LLONG_MIN = -9223372036854775808 LONG_MAX = 2147483647 LONG_MIN = -2...
agpl-3.0
ammaradil/fibonacci
Lib/site-packages/pip/_vendor/ipaddress.py
206
72089
# 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 __version__ = '1.0.7' import struct # ...
mit
Caylo/easybuild-framework
easybuild/toolchains/linalg/libsci.py
1
3408
## # Copyright 2014-2016 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...
gpl-2.0
RedstonerServer/redstoner-utils
imout.py
2
1138
from helpers import * from adminchat import * imout_toggle_list = [] @hook.command("imout") def on_imout_command(sender, command, label, args): if not is_player(sender): msg(sender, "&cThis command can't be run from the console") return True if sender.hasPermission("utils.imout"): name...
mit
abg1979/git
contrib/hooks/multimail/git_multimail.py
186
110172
#! /usr/bin/env python2 # Copyright (c) 2015 Matthieu Moy and others # Copyright (c) 2012-2014 Michael Haggerty and others # Derived from contrib/hooks/post-receive-email, which is # Copyright (c) 2007 Andy Parkins # and also includes contributions by other authors. # # This file is part of git-multimail. # # git-mult...
gpl-2.0
victordion/YouCompleteMe
python/ycm/client/omni_completion_request.py
48
1204
#!/usr/bin/env python # # Copyright (C) 2013 Google Inc. # # This file is part of YouCompleteMe. # # YouCompleteMe 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 you...
gpl-3.0
nolanliou/tensorflow
tensorflow/contrib/framework/python/ops/script_ops.py
22
5526
# 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
Sweetgrassbuffalo/ReactionSweeGrass-v2
.meteor/local/dev_bundle/python/Lib/test/test_binop.py
10
10741
"""Tests for binary operators on subtypes of built-in types.""" import unittest from test import test_support def gcd(a, b): """Greatest common divisor using Euclid's algorithm.""" while a: a, b = b%a, a return b def isint(x): """Test whether an object is an instance of int or long.""" re...
gpl-3.0
peastman/msmbuilder
msmbuilder/tests/test_kernel_approximation.py
9
1158
from __future__ import absolute_import import numpy as np from numpy.testing import assert_array_almost_equal from sklearn.kernel_approximation import Nystroem as NystroemR from msmbuilder.decomposition.kernel_approximation import Nystroem, LandmarkNystroem def test_nystroem_vs_sklearn(): np.random.seed(42) ...
lgpl-2.1
jbeder/yaml-cpp.old-api
test/gmock-1.7.0/test/gmock_leak_test.py
779
4384
#!/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...
mit
dsparrow27/vortex
src/ds/vortex/nodes/comparison/equalTo.py
1
1290
from ds.vortex.core import baseNode from ds.vortex.core import plug as plugs class EqualToNode(baseNode.BaseNode): def __init__(self, name): """ :param name: str, the name of the node """ baseNode.BaseNode.__init__(self, name) def initialize(self): baseNode.BaseNode.in...
mit
PhilLidar-DAD/geonode
geonode/maps/admin.py
30
1784
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2012 OpenPlans # # 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 versio...
gpl-3.0
mclaughlin6464/pylearn2
pylearn2/scripts/papers/jia_huang_wkshp_11/fit_final_model.py
44
3913
from __future__ import print_function import numpy as np from optparse import OptionParser from pylearn2.models.independent_multiclass_logistic import IndependentMulticlassLogistic from galatea.s3c.feature_loading import get_features from pylearn2.utils import serial from pylearn2.datasets.cifar10 import CIFAR10 from ...
bsd-3-clause
kapari/django-oscar
tests/functional/dashboard/user_tests.py
35
3451
from django.core.urlresolvers import reverse from django.core import mail from django.utils.translation import ugettext_lazy as _ from webtest import AppError from oscar.core.compat import get_user_model from oscar.test.factories import UserFactory from oscar.test.testcases import WebTestCase User = get_user_model() ...
bsd-3-clause
teltek/edx-platform
common/test/acceptance/tests/studio/test_studio_settings_details.py
5
8450
""" Acceptance tests for Studio's Settings Details pages """ from datetime import datetime, timedelta from common.test.acceptance.fixtures.config import ConfigModelFixture from common.test.acceptance.fixtures.course import CourseFixture from common.test.acceptance.pages.studio.overview import CourseOutlinePage from co...
agpl-3.0
Noltari/lede
scripts/dl_cleanup.py
223
6094
#!/usr/bin/env python3 """ # OpenWrt download directory cleanup utility. # Delete all but the very last version of the program tarballs. # # Copyright (C) 2010-2015 Michael Buesch <m@bues.ch> # Copyright (C) 2013-2015 OpenWrt.org """ from __future__ import print_function import sys import os import re import getopt ...
gpl-2.0
pschmitt/home-assistant
homeassistant/components/coronavirus/config_flow.py
7
1406
"""Config flow for Coronavirus integration.""" import logging import voluptuous as vol from homeassistant import config_entries from . import get_coordinator from .const import DOMAIN, OPTION_WORLDWIDE # pylint:disable=unused-import _LOGGER = logging.getLogger(__name__) class ConfigFlow(config_entries.ConfigFlow...
apache-2.0
ojengwa/oh-mainline
vendor/packages/twisted/twisted/test/testutils.py
110
1525
from cStringIO import StringIO from twisted.internet.protocol import FileWrapper class IOPump: """Utility to pump data between clients and servers for protocol testing. Perhaps this is a utility worthy of being in protocol.py? """ def __init__(self, client, server, clientIO, serverIO): self.cl...
agpl-3.0
wbrefvem/heroku-buildpack-python
vendor/pip-pop/pip/_vendor/html5lib/serializer/htmlserializer.py
436
12855
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type try: from functools import reduce except ImportError: pass from ..constants import voidElements, booleanAttributes, spaceCharacters from ..constants import rcdataElements, entities, xmlEntities from .. imp...
mit
jarshwah/django
tests/migrate_signals/tests.py
22
5400
from django.apps import apps from django.core import management from django.db import migrations from django.db.models import signals from django.test import TransactionTestCase, override_settings from django.utils import six APP_CONFIG = apps.get_app_config('migrate_signals') SIGNAL_ARGS = ['app_config', 'verbosity',...
bsd-3-clause
ge0rgi/cinder
cinder/tests/unit/volume/drivers/violin/test_v7000_fcp.py
7
20755
# Copyright 2015 Violin Memory, 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 requi...
apache-2.0
CyanogenMod/android_kernel_zte_msm8994
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py
4653
3596
# EventClass.py # # This is a library defining some events types classes, which could # be used by other scripts to analyzing the perf samples. # # Currently there are just a few classes defined for examples, # PerfEvent is the base class for all perf event sample, PebsEvent # is a HW base Intel x86 PEBS event, and use...
gpl-2.0
omarkhan/ansible-modules-core
cloud/openstack/os_floating_ip.py
103
6540
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # Author: Davide Guerri <davide.guerri@hp.com> # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 ...
gpl-3.0
bigdatauniversity/edx-platform
common/lib/xmodule/xmodule/x_module.py
10
70810
import logging import os import sys import time import yaml from contracts import contract, new_contract from functools import partial from lxml import etree from collections import namedtuple from pkg_resources import ( resource_exists, resource_listdir, resource_string, resource_isdir, ) from webob i...
agpl-3.0
dkulikovsky/graphite-ch-web
webapp/graphite/events/views.py
1
2767
import datetime import time from django.http import HttpResponse from django.shortcuts import render_to_response, get_object_or_404 from django.utils.timezone import localtime, now from graphite.util import json from graphite.events import models from graphite.render.attime import parseATTime from django.core.urlresol...
apache-2.0
nitzmahone/ansible
lib/ansible/plugins/lookup/together.py
100
2152
# (c) 2013, Bradley Young <young.bradley@gmail.com> # (c) 2012-17 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 DOCUMENTATION = """ lookup: together author: Br...
gpl-3.0
hcorg/thrift
test/py/TSimpleJSONProtocolTest.py
43
3951
#!/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 this file # to you under the Apache License, Version 2.0 (the # "L...
apache-2.0
m-lab/mlab-metrics-api
metrics_computation_system/weekly_refresh.py
2
1997
# Copyright 2013 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...
apache-2.0
xiangel/hue
desktop/core/ext-py/Django-1.6.10/django/contrib/gis/db/backends/postgis/creation.py
117
4498
from django.conf import settings from django.db.backends.postgresql_psycopg2.creation import DatabaseCreation from django.utils.functional import cached_property class PostGISCreation(DatabaseCreation): geom_index_type = 'GIST' geom_index_ops = 'GIST_GEOMETRY_OPS' geom_index_ops_nd = 'GIST_GEOMETRY_OPS_ND...
apache-2.0
ANR-kamoulox/Telemeta
telemeta/south_migrations/0022_auto__chg_field_mediaitem_file.py
2
48378
# -*- 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): # Changing field 'MediaItem.file' db.alter_column('media_items', 'filename', self.gf('telemeta.models.core....
agpl-3.0
MSM8226-Samsung/android_kernel_samsung_ms01lte
tools/perf/scripts/python/sctop.py
11180
1924
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
jat255/hyperspy
hyperspy/tests/misc/test_utils.py
1
2016
# -*- coding: utf-8 -*- # Copyright 2007-2020 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
gpl-3.0
odejesush/tensorflow
tensorflow/contrib/graph_editor/edit.py
158
8583
# 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
WillisXChen/django-oscar
oscar/lib/python2.7/site-packages/sphinx/websupport/storage/sqlalchemy_db.py
11
7477
# -*- coding: utf-8 -*- """ sphinx.websupport.storage.sqlalchemy_db ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SQLAlchemy table and mapper definitions used by the :class:`sphinx.websupport.storage.sqlalchemystorage.SQLAlchemyStorage`. :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. ...
bsd-3-clause
hifly/OpenUpgrade
addons/l10n_ma/l10n_ma.py
336
1952
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
mmind/linux-es600
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
11088
3246
# Core.py - Python extension for perf script, core functions # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. from collections import defaultdict def aut...
gpl-2.0
nmayorov/scikit-learn
examples/applications/plot_outlier_detection_housing.py
243
5577
""" ==================================== Outlier detection on a real data set ==================================== This example illustrates the need for robust covariance estimation on a real data set. It is useful both for outlier detection and for a better understanding of the data structure. We selected two sets o...
bsd-3-clause
jlcarmic/producthunt_simulator
venv/lib/python2.7/site-packages/numpy/core/tests/test_multiarray_assignment.py
59
1982
from __future__ import division, absolute_import, print_function import numpy as np from numpy.testing import run_module_suite ndims = 2 size = 10 shape = tuple([size] * ndims) def _indices_for_nelems(nelems): """Returns slices of length nelems, from start onwards, in direction sign.""" if nelems == 0: ...
mit
blowmage/gcloud-python
gcloud/storage/demo/__init__.py
1
1054
# Copyright 2014 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...
apache-2.0
HeinleinSupport/check_mk
python-chardet/lib/python/chardet/latin1prober.py
290
5370
######################## 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...
gpl-2.0
gaolichuang/py-essential
essential/report/generators/conf.py
2
1404
# Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
apache-2.0
vaiski/checksum
src/checksum/checksum.py
1
4815
# -*- coding: utf-8 -*- ''' Checksum ======== Provides an extendable checksum calculation and validation library for different checksum algorithms. ''' class ChecksumStrategy(object): ''' An interface class for checksum algorithm classes. ''' def checksum(self, body): ''' Calculates a check...
mit
ycaihua/kbengine
kbe/res/scripts/common/Lib/test/test_import.py
60
40179
# We import importlib *ASAP* in order to test #15386 import importlib import importlib.util from importlib._bootstrap import _get_sourcefile import builtins import marshal import os import platform import py_compile import random import stat import sys import unittest import unittest.mock as mock import textwrap import...
lgpl-3.0
donspaulding/adspygoogle
examples/adspygoogle/dfp/v201206/make_test_network.py
2
2023
#!/usr/bin/python # # Copyright 2012 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
RadonX-ROM/external_skia
tools/svn.py
84
7044
''' Copyright 2011 Google Inc. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. ''' import fnmatch import os import re import subprocess import threading PROPERTY_MIMETYPE = 'svn:mime-type' # Status types for GetFilesWithStatus() STATUS_ADDED = 0x01 S...
bsd-3-clause
Nebucatnetzer/tamagotchi
pygame/lib/python3.4/site-packages/pip/_vendor/lockfile/mkdirlockfile.py
536
3096
from __future__ import absolute_import, division import time import os import sys import errno from . import (LockBase, LockFailed, NotLocked, NotMyLock, LockTimeout, AlreadyLocked) class MkdirLockFile(LockBase): """Lock file by creating a directory.""" def __init__(self, path, threaded=True,...
gpl-2.0
marc-sensenich/ansible
test/units/modules/network/netscaler/test_netscaler_service.py
68
14309
# Copyright (c) 2017 Citrix Systems # # 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. # # ...
gpl-3.0
jovencoda/evoca-v2
evoca_v2/core/migrations/0022_auto_20170820_0036.py
1
1202
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-08-20 00:36 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): dependencies = [ ('core', '0021_channel_image'), ] operatio...
gpl-3.0
palerdot/calibre
src/calibre/gui2/dialogs/plugin_updater.py
3
37726
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2011, Grant Drake <grant.drake@gmail.com>' __docformat__ = 'restructuredtext en' import re, da...
gpl-3.0
skosukhin/spack
var/spack/repos/builtin/packages/r-alsace/package.py
1
2082
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
KaranToor/MA450
google-cloud-sdk/platform/gsutil/third_party/boto/tests/integration/gs/test_resumable_uploads.py
25
25809
# Copyright 2010 Google 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, copy, modify, merge, publish, dis- # trib...
apache-2.0
111t8e/h2o-2
py/testdir_multi_jvm/test_parse_with_cancel.py
8
3409
import unittest, time, sys, random sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_import as h2i, h2o_jobs DELETE_KEYS = True class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_for_errors() @classmethod def setUpClass(cls): h2o.init(3, java_heap_GB=4) ...
apache-2.0
moutai/scikit-learn
examples/neural_networks/plot_mlp_training_curves.py
56
3596
""" ======================================================== Compare Stochastic learning strategies for MLPClassifier ======================================================== This example visualizes some training loss curves for different stochastic learning strategies, including SGD and Adam. Because of time-constrai...
bsd-3-clause
doksu/TA-centralops
bin/splunklib/client.py
3
143072
# Copyright 2011-2015 Splunk, 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 wri...
mit
ptcrypto/p2pool-adaptive
p2pool/util/variable.py
270
2541
import itertools import weakref from twisted.internet import defer, reactor from twisted.python import failure, log class Event(object): def __init__(self): self.observers = {} self.id_generator = itertools.count() self._once = None self.times = 0 def run_and_watch(self, f...
gpl-3.0
lancms/lancms2
fabfile.py
1
5721
from fabric.api import * from fabric.colors import green, red from fabric.contrib import files import datetime import os def _environment (): env.release = datetime.datetime.now().strftime ("%Y-%m-%d-%H%M%S") env.project_name = 'lancms2' # FIXME: hardcoded path: env.path_home = '/opt/lancms2/' env.path_root = o...
gpl-2.0
leafclick/intellij-community
plugins/hg4idea/testData/bin/mercurial/archival.py
94
10394
# archival.py - revision archival for mercurial # # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from i18n import _ from node import hex import match as matchmod import cmdut...
apache-2.0
TalShafir/ansible
lib/ansible/modules/cloud/amazon/ec2_vpc_igw_facts.py
44
4662
#!/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'], ...
gpl-3.0
vlachoudis/sl4a
python/src/Lib/lib2to3/pgen2/grammar.py
52
4947
# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """This module defines the data structures used to represent a grammar. These are a bit arcane because they are derived from the data structures used by Python's 'pgen' parser generator. There's also ...
apache-2.0
pypa/warehouse
warehouse/config.py
1
19675
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
apache-2.0
Stanford-Online/edx-platform
openedx/core/djangoapps/verified_track_content/tests/test_models.py
16
13466
""" Tests for Verified Track Cohorting models """ # pylint: disable=attribute-defined-outside-init # pylint: disable=no-member import ddt import mock from mock import patch from django.test import TestCase from opaque_keys.edx.keys import CourseKey from openedx.core.djangoapps.course_groups.cohorts import ( DEFAU...
agpl-3.0
awkspace/ansible
lib/ansible/modules/network/ios/ios_ntp.py
24
8785
#!/usr/bin/python # Copyright: 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': 'network'} DOCUMENTATION = ''' --- module: ios_ntp e...
gpl-3.0
garywu/pypedream
pypedream/plot/_filt.py
1
2685
import numpy has_matplotlib = True try: from matplotlib import pyplot, figure except ImportError: has_matplotlib = False from dagpype._core import filters def _make_relay_call(fn, name): def new_fn(*args, **kwargs): @filters def _dagpype_internal_fn_act(target): try: ...
bsd-3-clause
indictranstech/fbd_frappe
frappe/templates/pages/website_theme.py
38
1670
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import re import frappe from frappe.website.utils import get_shade from frappe.website.doctype.website_theme.website_theme import get_active_theme no_sitemap = 1 base_template_pa...
mit
nliolios24/textrank
share/doc/networkx-1.9.1/examples/graph/unix_email.py
62
2683
#!/usr/bin/env python """ Create a directed graph, allowing multiple edges and self loops, from a unix mailbox. The nodes are email addresses with links that point from the sender to the recievers. The edge data is a Python email.Message object which contains all of the email message data. This example shows the po...
mit
hkupty/python-mode
pymode/libs/pylama/lint/pylama_pylint/pylint/checkers/imports.py
17
15940
# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # 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, o...
lgpl-3.0
morissette/devopsdays-hackathon-2016
venv/lib/python2.7/site-packages/docutils/parsers/rst/languages/cs.py
128
4857
# $Id: cs.py 7119 2011-09-02 13:00:23Z milde $ # Author: Marek Blaha <mb@dat.cz> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be # translated for each lan...
gpl-3.0
orekyuu/intellij-community
plugins/hg4idea/testData/bin/hgext/convert/__init__.py
92
15637
# convert.py Foreign SCM converter # # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. '''import revisions from foreign VCS repositories into Mercurial''' import convcmd import c...
apache-2.0
dnevels/heekscnc
pycnc/wxPocketDlg.py
25
13424
import wx import HeeksCNC from Pocket import Pocket from wxHDialog import HDialog from wxPictureWindow import PictureWindow from wxNiceTextCtrl import LengthCtrl from wxNiceTextCtrl import DoubleCtrl from wxNiceTextCtrl import GeomCtrl from consts import * ID_SKETCHES = 100 ID_STEP_OVER = 101 ID_MATERIAL_ALLOWANCE = 1...
bsd-3-clause
EmuxEvans/Wox
PythonHome/Lib/site-packages/requests/packages/urllib3/packages/ordered_dict.py
1093
8936
# Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy. # Passes Python2.7's test suite and incorporates all the latest updates. # Copyright 2009 Raymond Hettinger, released under the MIT License. # http://code.activestate.com/recipes/576693/ try: from thread import get_ident as _get_ide...
mit
realsaiko/odoo
addons/l10n_fr_hr_payroll/report/__init__.py
424
1091
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # d$ # # This program is free software: you can redistribute it and/or modify # it...
agpl-3.0
ericleasemorgan/EEBO-TCP-Workset-Browser
bin/make-index.py
1
2042
#!/usr/bin/env python # make-index.py - read EEBO TEI files and output word frequencies as well as a "book" # Eric Lease Morgan <emorgan@nd.edu> # June 8, 2015 - first investigations; bases on HathiTrust work # configure STOPWORDS = './etc/stopwords-en.txt' # require import operator import re import sys import lib...
gpl-2.0