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
JTarball/docker-django-polymer
docker/app/app/backend/apps/_archive/content/migrations/0005_auto__add_field_issue_reported__add_field_commentcard_reported__add_fi.py
8
22120
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Issue.reported' db.add_column(u'content_issue', 'reported', self.gf('d...
gpl-2.0
rasata/ansible
lib/ansible/plugins/filter/mathstuff.py
81
4025
# (c) 2014, Brian Coca <bcoca@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 later version....
gpl-3.0
kinverarity1/las-reader
lasio/convert_version.py
2
1144
import argparse import os import sys import lasio def convert_version(): args = get_convert_version_parser().parse_args(sys.argv[1:]) assert os.path.isfile(args.input) las = lasio.read(args.input, ignore_header_errors=args.ignore_header_errors) if os.path.isfile(args.output) and not args.overwrite...
mit
AnishShah/tensorflow
tensorflow/python/layers/utils_test.py
38
3953
# 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
takis/django
tests/field_deconstruction/tests.py
189
18358
from __future__ import unicode_literals from django.apps import apps from django.db import models from django.test import SimpleTestCase, override_settings from django.test.utils import isolate_lru_cache from django.utils import six class FieldDeconstructionTests(SimpleTestCase): """ Tests the deconstruct() ...
bsd-3-clause
ClusterLabs/crmsh
crmsh/ordereddict.py
2
4567
# Copyright (c) 2009 Raymond Hettinger # # 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,...
gpl-2.0
nyuszika7h/youtube-dl
youtube_dl/extractor/crunchyroll.py
10
28745
# coding: utf-8 from __future__ import unicode_literals import re import json import zlib from hashlib import sha1 from math import pow, sqrt, floor from .common import InfoExtractor from .vrv import VRVIE from ..compat import ( compat_b64decode, compat_etree_Element, compat_etree_fromstring, compat_s...
unlicense
cgstudiomap/cgstudiomap
main/eggs/python_stdnum-1.2-py2.7.egg/stdnum/ean.py
4
2451
# ean.py - functions for handling EANs # # Copyright (C) 2011, 2012, 2013 Arthur de Jong # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your...
agpl-3.0
hgl888/chromium-crosswalk-efl
tools/deep_memory_profiler/PRESUBMIT.py
116
1425
# 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. """Top-level presubmit script for deep_memory_profiler. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on the p...
bsd-3-clause
40023154/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/external_import.py
742
2985
import os from browser import doc import urllib.request ## this module is able to download modules that are external to ## localhost/src ## so we could download from any URL class ModuleFinder: def __init__(self, path_entry): print("external_import here..") #print(path_entry) self._module=...
gpl-2.0
mgraffg/simplegp
examples/simplify.py
1
2421
from SimpleGP import GP import numpy as np seed = 0 # if len(sys.argv) == 1 else int(sys.argv[1]) x = np.linspace(0, 1, 100) pol = np.array([0.2, -0.3, 0.2]) X = np.vstack((x**2, x, np.ones(x.shape[0]))) y = (X.T * pol).sum(axis=1) gp = GP(popsize=10, generations=100000, verbose=True, verbose...
apache-2.0
ity/pants
contrib/python/src/python/pants/contrib/python/checks/tasks/checkstyle/file_excluder.py
15
1436
# coding=utf-8 # Copyright 2015 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 os import re ...
apache-2.0
danielhultqvist/mario
lib/gmock-1.6.0/gtest/test/gtest_help_test.py
2968
5856
#!/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
nhicher/ansible
lib/ansible/module_utils/redhat.py
141
10351
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
foodszhang/kbengine
kbe/res/scripts/common/Lib/test/test_csv.py
80
42401
# Copyright (C) 2001,2002 Python Software Foundation # csv package unit tests import io import sys import os import unittest from io import StringIO from tempfile import TemporaryFile import csv import gc from test import support class Test_Csv(unittest.TestCase): """ Test the underlying C csv parser in ways ...
lgpl-3.0
tswast/google-cloud-python
bigtable/tests/unit/gapic/v2/test_bigtable_client_v2.py
2
11731
# -*- coding: utf-8 -*- # # Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
apache-2.0
sunlianqiang/kbengine
kbe/res/scripts/common/Lib/encodings/cp1253.py
272
13094
""" Python Character Mapping Codec cp1253 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1253.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,in...
lgpl-3.0
emprovements/binwalk
src/binwalk/modules/hexdiff.py
18
6926
import os import sys import string import binwalk.core.common as common from binwalk.core.compat import * from binwalk.core.module import Module, Option, Kwarg class HexDiff(Module): COLORS = { 'red' : '31', 'green' : '32', 'blue' : '34', } SEPERATORS = ['\\', '/'] DEFAULT...
mit
HiSPARC/station-software
user/python/Lib/hotshot/log.py
175
6239
import _hotshot import os.path import parser import symbol from _hotshot import \ WHAT_ENTER, \ WHAT_EXIT, \ WHAT_LINENO, \ WHAT_DEFINE_FILE, \ WHAT_DEFINE_FUNC, \ WHAT_ADD_INFO __all__ = ["LogReader", "ENTER", "EXIT", "LINE"] ENTER = WHAT_ENTER EXIT = WHAT_EXIT LINE = WHAT_LINENO ...
gpl-3.0
qtproject/pyside-pyside
tests/QtWidgets/qpen_test.py
1
2519
############################################################################# ## ## Copyright (C) 2016 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the test suite of PySide2. ## ## $QT_BEGIN_LICENSE:GPL-EXCEPT$ ## Commercial License Usage ## Licensees holding valid commercial ...
lgpl-2.1
karcio/checkSumValidatorGUI
checkSumVal/src/checkSumGui.py
1
2950
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'checkSumGui.ui' # # Created: Thu Jan 8 02:22:42 2015 # by: PyQt5 UI code generator 5.4 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object): def setupUi(self, Form)...
gpl-3.0
wang1352083/pythontool
python-2.7.12-lib/unittest/test/test_functiontestcase.py
37
5547
import unittest from unittest.test.support import LoggingResult class Test_FunctionTestCase(unittest.TestCase): # "Return the number of tests represented by the this test object. For # TestCase instances, this will always be 1" def test_countTestCases(self): test = unittest.FunctionTestCase(lamb...
mit
andreparrish/python-for-android
python3-alpha/python3-src/Lib/distutils/tests/test_bdist_rpm.py
47
4029
"""Tests for distutils.command.bdist_rpm.""" import unittest import sys import os import tempfile import shutil from test.support import run_unittest from distutils.core import Distribution from distutils.command.bdist_rpm import bdist_rpm from distutils.tests import support from distutils.spawn import find_executabl...
apache-2.0
csvtools/csvtools
src/tests/test_pointsizes.py
1
1209
# Allow direct execution import os import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import unittest from lib.pointsizes import Pointsizes class SheetTestCase(unittest.TestCase): def setUp(self): pass def test(self): self.assertEquals(Pointsizes.min()...
gpl-3.0
mkobos/tree_crawler
concurrent_tree_crawler/multithreaded_crawler.py
1
5649
import os import logging import time import datetime from concurrent_tree_crawler.common.file_helper import lenient_makedir from concurrent_tree_crawler.common.logger import Logger from concurrent_tree_crawler.common.activity_schedule import AlwaysActiveSchedule from concurrent_tree_crawler.crawlers_manager import Cra...
mit
CamelBackNotation/CarnotKE
jyhton/lib-python/2.7/encodings/iso8859_6.py
593
11089
""" Python Character Mapping Codec iso8859_6 generated from 'MAPPINGS/ISO8859/8859-6.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors='...
apache-2.0
DucQuang1/youtube-dl
test/test_all_urls.py
102
6849
#!/usr/bin/env python from __future__ import unicode_literals # Allow direct execution import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from test.helper import gettestcases from youtube_dl.extractor import ( FacebookIE, gen_extractors, ...
unlicense
elli0ttB/problems
sorting/quicksort.py
1
1524
#!/usr/bin/env python def quicksort(arr, partition): if (partition == "hoare"): quicksort_hoare(arr, 0, len(arr) -1) elif (partition == "lomuto"): quicksort_lomuto(arr, 0, len(arr) -1) else: raise ValueError() def quicksort_hoare(arr, lo, hi): # lo and hi follow standard method...
mit
lastgeniusleft2004/docker
vendor/src/github.com/hashicorp/go-msgpack/codec/msgpack_test.py
1232
3478
#!/usr/bin/env python # This will create golden files in a directory passed to it. # A Test calls this internally to create the golden files # So it can process them (so we don't have to checkin the files). import msgpack, msgpackrpc, sys, os, threading def get_test_data_list(): # get list with all primitive typ...
apache-2.0
jt6562/XX-Net
python27/1.0/lib/darwin/gevent/threadpool.py
26
11176
# Copyright (c) 2012 Denis Bilenko. See LICENSE for details. from __future__ import with_statement, absolute_import import sys import os from gevent.hub import get_hub, getcurrent, sleep, integer_types from gevent.event import AsyncResult from gevent.greenlet import Greenlet from gevent.pool import IMap, IMapUnordered ...
bsd-2-clause
Turgon37/OpenVPN_UAM
OpenVPNUAM/pki/pki_filetree.py
1
6143
# -*- coding: utf8 -*- # This file is a part of OpenVPN-UAM # # Copyright (c) 2015 Thomas PAJON, Pierre GINDRAUD # # 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, includ...
gpl-3.0
RNAcentral/rnacentral-import-pipeline
rnacentral_pipeline/databases/pirbase/fetch.py
1
1316
# -*- coding: utf-8 -*- """ Copyright [2009-2020] EMBL-European Bioinformatics Institute 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
ATIX-AG/ansible
lib/ansible/modules/network/vyos/vyos_vlan.py
22
9218
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # 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', ...
gpl-3.0
xombiemp/CouchPotatoServer
libs/guessit/transfo/guess_bonus_features.py
150
2155
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2012 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
gpl-3.0
zhenv5/scikit-learn
examples/classification/plot_lda.py
70
2413
""" ==================================================================== Normal and Shrinkage Linear Discriminant Analysis for classification ==================================================================== Shows how shrinkage improves classification. """ from __future__ import division import numpy as np import...
bsd-3-clause
40223249-1/-w16b_test
static/Brython3.1.1-20150328-091302/Lib/xml/dom/xmlbuilder.py
873
12377
"""Implementation of the DOM Level 3 'LS-Load' feature.""" import copy import xml.dom from xml.dom.NodeFilter import NodeFilter __all__ = ["DOMBuilder", "DOMEntityResolver", "DOMInputSource"] class Options: """Features object that has variables set for each DOMBuilder feature. The DOMBuilder class uses a...
agpl-3.0
endolith/scipy
scipy/linalg/tests/test_special_matrices.py
12
26711
import pytest import numpy as np from numpy import arange, add, array, eye, copy, sqrt from numpy.testing import (assert_equal, assert_array_equal, assert_array_almost_equal, assert_allclose) from pytest import raises as assert_raises from scipy.fft import fft from scipy.special import comb...
bsd-3-clause
dcroc16/skunk_works
google_appengine/lib/django-1.3/tests/regressiontests/serializers_regress/models.py
49
7687
""" A test spanning all the capabilities of all the serializers. This class sets up a model for each model field type (except for image types, because of the PIL dependency). """ from django.db import models from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType fro...
mit
ogrisel/numpy
numpy/oldnumeric/precision.py
13
4323
""" Lifted from Precision.py. This is for compatibility only. The character strings are still for "new" NumPy which is the only Incompatibility with Numeric """ from __future__ import division, absolute_import, print_function __all__ = ['Character', 'Complex', 'Float', 'PrecisionError', 'PyObject', 'Int...
bsd-3-clause
Perferom/android_external_chromium_org
third_party/protobuf/python/google/protobuf/internal/cpp_message.py
223
23539
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
bsd-3-clause
veger/ansible
lib/ansible/plugins/action/sros_config.py
27
4241
# # Copyright 2016 Peter Sprygada <psprygada@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...
gpl-3.0
taedori81/saleor
saleor/dashboard/product/views.py
7
10930
from __future__ import unicode_literals from django.contrib import messages from django.shortcuts import get_object_or_404, redirect from django.template.response import TemplateResponse from django.utils.http import is_safe_url from django.utils.translation import ugettext_lazy as _ from django.views.decorators.http ...
bsd-3-clause
anas-taji/purchase-workflow
__unported__/purchase_multi_picking/__openerp__.py
13
1765
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2012-2013 Agile Business Group sagl # (<http://www.agilebg.com>) # Copyright (C) 2012 Domsense srl (<http://www.domsense.com>) # # This program is free software: you can redistribute it a...
agpl-3.0
jcpowermac/ansible
lib/ansible/modules/packaging/os/dnf.py
23
17836
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2015 Cristian van Ee <cristian at cvee.org> # Copyright 2015 Igor Gnatenko <i.gnatenko.brain@gmail.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 ...
gpl-3.0
germanovm/vdsm
client/vdsClientGluster.py
2
54610
# Copyright 2012 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the ...
gpl-2.0
rahuldan/sympy
sympy/strategies/branch/tests/test_core.py
40
2366
from sympy.strategies.branch.core import (exhaust, debug, multiplex, condition, notempty, chain, onaction, sfilter, yieldify, do_one, identity) from sympy.core.compatibility import get_function_name, range def posdec(x): if x > 0: yield x-1 else: yield x def branch5(x): if ...
bsd-3-clause
shrimpboyho/git.js
emscript/python/2.7.5.1_32bit/Lib/unittest/test/test_setups.py
152
16460
import sys from cStringIO import StringIO import unittest def resultFactory(*_): return unittest.TestResult() class TestSetups(unittest.TestCase): def getRunner(self): return unittest.TextTestRunner(resultclass=resultFactory, stream=StringIO()) def ru...
gpl-2.0
jnewland/home-assistant
homeassistant/components/clicksend/notify.py
7
3014
"""Clicksend platform for notify component.""" import json import logging from aiohttp.hdrs import CONTENT_TYPE import requests import voluptuous as vol from homeassistant.const import ( CONF_API_KEY, CONF_RECIPIENT, CONF_SENDER, CONF_USERNAME, CONTENT_TYPE_JSON) import homeassistant.helpers.config_validation...
apache-2.0
acutesoftware/worldbuild
scripts/minecraft/go_minecraft.py
1
2260
# go_minecraft.py import sys import time import aikif.toolbox.interface_windows_tools as mod_tool players = ['DynamiteBuilder', 'craftandstore'] #server = '1.9' #server = '1.10' server = '1.11.2' seed = 0 if server == '1.11.2': seed = -7560993781265470572 locations = [ {'name':'home', ...
gpl-2.0
egoid/baytree
lib/python2.7/site-packages/debug_toolbar/panels/sql/utils.py
11
1987
from __future__ import absolute_import, unicode_literals import re import sqlparse from django.utils.html import escape from sqlparse import tokens as T class BoldKeywordFilter: """sqlparse filter to bold SQL keywords""" def process(self, stream): """Process the token stream""" for token_typ...
mit
georgemarshall/django
tests/custom_managers/models.py
57
6822
""" Giving models a custom manager You can use a custom ``Manager`` in a particular model by extending the base ``Manager`` class and instantiating your custom ``Manager`` in your model. There are two reasons you might want to customize a ``Manager``: to add extra ``Manager`` methods, and/or to modify the initial ``Q...
bsd-3-clause
keenondrums/sovrin-node
sovrin_client/agent/walleted.py
1
42903
import asyncio import collections import inspect import json import time from datetime import datetime from typing import Dict, List, Union from base58 import b58decode from common.serializers.serialization import serialize_msg_for_signing from stp_core.common.log import getlogger from plenum.common.signer_did import...
apache-2.0
czgu/metaHack
env/lib/python2.7/site-packages/django/contrib/gis/gdal/tests/test_envelope.py
94
3660
import unittest from unittest import skipUnless from django.contrib.gis.gdal import HAS_GDAL if HAS_GDAL: from django.contrib.gis.gdal import Envelope, OGRException class TestPoint(object): def __init__(self, x, y): self.x = x self.y = y @skipUnless(HAS_GDAL, "GDAL is required") class Enve...
apache-2.0
blaggacao/odoo
addons/website_forum/__openerp__.py
62
1843
# -*- 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 ...
agpl-3.0
SnappleCap/oh-mainline
vendor/packages/python-openid/examples/djopenid/server/views.py
63
9294
""" This module implements an example server for the OpenID library. Some functionality has been omitted intentionally; this code is intended to be instructive on the use of this library. This server does not perform actual user authentication and serves up only one OpenID URL, with the exception of IDP-generated id...
agpl-3.0
HiSPARC/station-software
user/python/Lib/site-packages/pip/_internal/wheel.py
7
32007
""" Support for installing and building the "wheel" binary package format. """ from __future__ import absolute_import import collections import compileall import csv import hashlib import logging import os.path import re import shutil import stat import sys import warnings from base64 import urlsafe_b64encode from ema...
gpl-3.0
HousekeepLtd/django
tests/null_fk/models.py
282
1422
""" Regression tests for proper working of ForeignKey(null=True). """ from django.db import models from django.utils.encoding import python_2_unicode_compatible class SystemDetails(models.Model): details = models.TextField() class SystemInfo(models.Model): system_details = models.ForeignKey(SystemDetails, ...
bsd-3-clause
bjwbell/servo
tests/wpt/css-tests/tools/html5lib/html5lib/tests/test_sanitizer.py
430
4645
from __future__ import absolute_import, division, unicode_literals try: import json except ImportError: import simplejson as json from html5lib import html5parser, sanitizer, constants, treebuilders def toxmlFactory(): tree = treebuilders.getTreeBuilder("etree") def toxml(element): # encode...
mpl-2.0
JamesMura/sentry
src/sentry/lang/native/systemsymbols.py
2
1561
from __future__ import absolute_import import logging from requests.exceptions import RequestException from sentry import options from sentry.http import Session from sentry.lang.native.utils import sdk_info_to_sdk_id MAX_ATTEMPTS = 3 logger = logging.getLogger(__name__) def lookup_system_symbols(symbols, sdk_...
bsd-3-clause
shrimpboyho/git.js
emscript/python/2.7.5.1_32bit/Lib/hotshot/__init__.py
215
2670
"""High-perfomance logging profiler, mostly written in C.""" import _hotshot from _hotshot import ProfilerError from warnings import warnpy3k as _warnpy3k _warnpy3k("The 'hotshot' module is not supported in 3.x, " "use the 'profile' module instead.", stacklevel=2) class Profile: def __init__(self, logf...
gpl-2.0
derks/cement
cement/core/arg.py
1
3461
""" Cement core argument module. """ from ..core import backend, exc, interface, handler Log = backend.minimal_logger(__name__) def argument_validator(klass, obj): """Validates a handler implementation against the IArgument interface.""" members = [ '_setup', 'parse', 'parsed_args', ...
bsd-3-clause
eayunstack/neutron
neutron/services/qos/drivers/sriov/driver.py
2
2128
# Copyright (c) 2016 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...
apache-2.0
JCardenasRdz/Machine-Learning-4-MRI
Imaging_of_pH/2-Isovue/Code/Python/BrukerMRI.py
4
13156
# pylint: disable-msg=C0103 """This should at some point be a library with functions to import and reconstruct Bruker MRI data. 2014, Joerg Doepfert """ import numpy as np # *********************************************************** # class definition # ***********************************************************...
mit
meredith-digops/ansible
lib/ansible/modules/storage/netapp/netapp_e_storagepool.py
63
39794
#!/usr/bin/python # (c) 2016, NetApp, 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....
gpl-3.0
infobloxopen/infoblox-netmri
infoblox_netmri/api/broker/v3_2_0/auth_user_broker.py
6
93491
from ..broker import Broker class AuthUserBroker(Broker): controller = "auth_users" def index(self, **kwargs): """Lists the available auth users. Any of the inputs listed may be be used to narrow the list; other inputs will be ignored. Of the various ways to query lists, using this method is most eff...
apache-2.0
mmazanec22/too-windy
env/lib/python3.5/site-packages/paramiko/__init__.py
44
3922
# Copyright (C) 2003-2011 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (a...
gpl-3.0
tmpkus/photivo
scons-local-2.2.0/SCons/Conftest.py
29
27705
"""SCons.Conftest Autoconf-like configuration support; low level implementation of tests. """ # # Copyright (c) 2003 Stichting NLnet Labs # Copyright (c) 2001, 2002, 2003 Steven Knight # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation file...
gpl-3.0
manageyp/xhtml2pdf
ez_setup.py
92
9669
#!python """Bootstrap setuptools installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from ez_setup import use_setuptools use_setuptools() If you want to require a specific version of setuptools...
apache-2.0
eduNEXT/edx-platform
openedx/core/djangoapps/content/learning_sequences/api/processors/enrollment_track_partition_groups.py
3
3159
# lint-amnesty, pylint: disable=missing-module-docstring import logging from xmodule.partitions.enrollment_track_partition_generator import ( create_enrollment_track_partition_with_course_id ) from xmodule.partitions.partitions import ( ENROLLMENT_TRACK_PARTITION_ID, ) from xmodule.partitions.partitions_servic...
agpl-3.0
Trust-Code/PySPED
pysped/nfe/__init__.py
6
1904
# -*- coding: utf-8 -*- # # PySPED - Python libraries to deal with Brazil's SPED Project # # Copyright (C) 2010-2012 # Copyright (C) Aristides Caldeira <aristides.caldeira at tauga.com.br> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Library General Public Lic...
lgpl-2.1
synnick/roboronya
roboronya/plugins/cholify.py
1
1871
import random from roboronya.plugins.plugin import Plugin class Cholificator(Plugin): description = 'Roboronya will use her *Automated Cholification Algorithm* (Patent Pending) to translate your text to a more sophisticated language.' name = 'cholify' @Plugin.requires_args def run(roboronya, conv, cm...
mit
f0rki/cb-multios
original-challenges/Mixology/support/mixcodegen/markupsafe/_constants.py
1535
4795
# -*- coding: utf-8 -*- """ markupsafe._constants ~~~~~~~~~~~~~~~~~~~~~ Highlevel implementation of the Markup string. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ HTML_ENTITIES = { 'AElig': 198, 'Aacute': 193, 'Acirc': 194, 'Agrave': 1...
mit
clovett/MissionPlanner
Lib/distutils/command/check.py
50
5375
"""distutils.command.check Implements the Distutils 'check' command. """ __revision__ = "$Id$" from distutils.core import Command from distutils.errors import DistutilsSetupError try: # docutils is installed from docutils.utils import Reporter from docutils.parsers.rst import Parser from...
gpl-3.0
geeag/kafka
tests/kafkatest/tests/core/reassign_partitions_test.py
4
5559
# 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 "License"); you may not use ...
apache-2.0
ryfeus/lambda-packs
Keras_tensorflow/source/tensorflow/contrib/slim/nets.py
191
1609
# 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 ...
mit
aldian/tensorflow
tensorflow/contrib/nearest_neighbor/python/kernel_tests/hyperplane_lsh_probes_test.py
51
1939
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
alvarolopez/nova
nova/objects/block_device.py
6
12238
# 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 ag...
apache-2.0
fedya/ajenti
plugins/pkgman/pm_ports.py
17
4595
import os import subprocess from ajenti.com import * from ajenti import utils from ajenti import apis class PortsPackageManager(Plugin): implements(apis.pkgman.IPackageManager) platform = ['freebsd'] _pending = {} def refresh(self, st): p = utils.shell('pkg_version|grep \'<\'').split('\n') ...
lgpl-3.0
TabitaPL/Pasjans
Angel-3.2/Code/Tools/swigwin-2.0.6/Tools/pyname_patch.py
7
5043
#!/usr/bin/env python """ From SWIG 1.3.37 we deprecated all SWIG symbols that start with Py, since they are inappropriate and discouraged in Python documentation (from http://www.python.org/doc/2.5.2/api/includes.html): "All user visible names defined by Python.h (except those defined by the included standard headers...
mit
numerodix/memcache.rs
pyemc/test_stress.py
2
1302
import time from pyemc.abstractions.test_api import TestCase class TestStress(TestCase): def run_bench(self, func, loops, desc): # untimed warmup warmup_loops = loops / 3 for _ in xrange(loops): func() # timed execution start_time = time.time() for _ i...
mit
PaddlePaddle/Paddle
python/paddle/fluid/tests/unittests/test_dist_sparse_tensor_load_ftrl.py
2
1686
# Copyright (c) 2020 PaddlePaddle 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 app...
apache-2.0
Kiiv/Sick-Beard
sickbeard/clients/requests/packages/charade/escprober.py
206
3273
######################## 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. ...
gpl-3.0
nubark/odoo
addons/payment_paypal/controllers/main.py
7
5396
# -*- coding: utf-8 -*- import json import logging import pprint import urllib import urllib2 import werkzeug from openerp import http, SUPERUSER_ID from openerp.addons.payment.models.payment_acquirer import ValidationError from openerp.http import request _logger = logging.getLogger(__name__) class PaypalControll...
gpl-3.0
openhardnudd/QMarkdowner
Cheetah/Servlet.py
16
1261
#!/usr/bin/env python ''' Provides an abstract Servlet baseclass for Cheetah's Template class ''' import sys import os.path class Servlet(object): """ This class is an abstract baseclass for Cheetah.Template.Template. """ transaction = None application = None request = None session = ...
mit
msegado/edx-platform
openedx/core/djangoapps/user_api/serializers.py
55
2730
""" Django REST Framework serializers for the User API application """ from django.contrib.auth.models import User from rest_framework import serializers from student.models import UserProfile from .models import UserPreference class UserSerializer(serializers.HyperlinkedModelSerializer): """ Serializer that...
agpl-3.0
alexmogavero/home-assistant
homeassistant/components/light/rpi_gpio_pwm.py
7
6513
""" Support for LED lights that can be controlled using PWM. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/light.pwm/ """ import logging import voluptuous as vol from homeassistant.const import CONF_NAME, CONF_TYPE from homeassistant.components.light ...
apache-2.0
chrrrles/ansible-modules-extras
cloud/centurylink/clc_publicip.py
60
12269
#!/usr/bin/python # # Copyright (c) 2015 CenturyLink # # 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 la...
gpl-3.0
iw3hxn/server
openerp/pychart/afm/Symbol.py
15
1508
# -*- coding: utf-8 -*- # AFM font Symbol (path: /usr/share/fonts/afms/adobe/psyr.afm). # Derived from Ghostscript distribution. # Go to www.cs.wisc.edu/~ghost to get the Ghostcript source code. import dir dir.afm["Symbol"] = (500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500...
agpl-3.0
dkmatt0/banking-alpha-angularjs
backend/json-bank.py
1
1645
#!/usr/bin/env python3 import simplejsondb as sjdb import json # user { id, nickname, name, password, address, } # # session { id, fk_user, last_login, last_activity, } # # payee { id, name, desc, } # # category { id, name, desc, parent_id, } # # mode { id, name, } # # bank { id, name, bic_code, s...
agpl-3.0
pinkavaj/gnuradio
gr-fec/python/fec/polar/channel_construction_bec.py
22
8068
#!/usr/bin/env python # # Copyright 2015 Free Software Foundation, Inc. # # GNU Radio 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, or (at your option) # any later version. # # GNU Radio is...
gpl-3.0
sbrunner/QGIS
python/plugins/processing/algs/qgis/UniqueValues.py
5
6800
# -*- coding: utf-8 -*- """ *************************************************************************** UniqueValues.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com **************************...
gpl-2.0
Gitlab11/odoo
addons/account_payment/__init__.py
436
1279
# -*- 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
nysan/yocto-autobuilder
lib/python2.6/site-packages/buildbot_slave-0.8.4-py2.6.egg/buildslave/monkeypatches/bug4881.py
16
6811
# coding=utf-8 # This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRAN...
gpl-2.0
imtapps/django-imt-fork
tests/modeltests/fixtures/tests.py
41
29331
from __future__ import absolute_import from django.contrib.sites.models import Site from django.core import management from django.db import connection, IntegrityError from django.test import TestCase, TransactionTestCase, skipUnlessDBFeature from django.utils import six from .models import Article, Book, Spy, Tag, V...
bsd-3-clause
chaoallsome/pip
pip/_vendor/html5lib/trie/py.py
1323
1775
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type from bisect import bisect_left from ._base import Trie as ABCTrie class Trie(ABCTrie): def __init__(self, data): if not all(isinstance(x, text_type) for x in data.keys()): raise TypeError...
mit
alexmerser/overholt
overholt/core.py
9
4483
# -*- coding: utf-8 -*- """ overholt.core ~~~~~~~~~~~~~ core module """ from flask_mail import Mail from flask_sqlalchemy import SQLAlchemy from flask_security import Security #: Flask-SQLAlchemy extension instance db = SQLAlchemy() #: Flask-Mail extension instance mail = Mail() #: Flask-Security exten...
mit
BeetMan/shadowsocks-android
gfwlist/gen.py
304
1535
#!/usr/bin/python # -*- encoding: utf8 -*- import itertools import math import sys import IPy def main(): china_list_set = IPy.IPSet() for line in sys.stdin: line_params = line.split("|") if len(line_params) < 5 or line_params[2] != "ipv4" or line_params[1] != "CN": continue ...
gpl-3.0
OkBuilds/buck
third-party/py/unittest2/unittest2/test/test_discovery.py
111
13372
import os import re import sys import unittest2 class TestDiscovery(unittest2.TestCase): # Heavily mocked tests so I can avoid hitting the filesystem def test_get_name_from_path(self): loader = unittest2.TestLoader() loader._top_level_dir = '/foo' name = loader._get_name_from_path('...
apache-2.0
timlinux/QGIS
python/plugins/processing/algs/gdal/ClipRasterByMask.py
18
12039
# -*- coding: utf-8 -*- """ *************************************************************************** ClipRasterByMask.py --------------------- Date : September 2013 Copyright : (C) 2013 by Alexander Bruy Email : alexander bruy at gmail dot com **********...
gpl-2.0
h4ck3rm1k3/gcc_py_introspector
gcc/tree/attic/query_function_example.py
1
42931
import prefix import types import json #import pprint from graphviz import Digraph from SPARQLWrapper import SPARQLWrapper, XML, N3, JSONLD, JSON, POST, GET, SELECT, CONSTRUCT, ASK, DESCRIBE from SPARQLWrapper.Wrapper import _SPARQL_DEFAULT, _SPARQL_XML, _SPARQL_JSON, _SPARQL_POSSIBLE, _RDF_XML, _RDF_N3, _RDF_JSONLD,...
gpl-2.0