repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
googleapis/googleapis-gen
google/devtools/build/v1/devtools-build-v1-py/noxfile.py
1
3581
# -*- coding: utf-8 -*- # Copyright 2020 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
chylli/phantomjs
src/breakpad/src/third_party/protobuf/protobuf/python/google/protobuf/message.py
261
9669
# 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
rob356/SickRage
lib/github/tests/Authentication.py
39
3397
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
gpl-3.0
CasparLi/calibre
src/calibre/ebooks/mobi/reader/mobi6.py
11
36864
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import (absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2012, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import shutil, os, re, struct, textwrap, cStringIO from lxml imp...
gpl-3.0
cesarmarinhorj/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server_unittest.py
121
3174
# Copyright (C) 2012 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
hsiaoyi0504/scikit-learn
sklearn/svm/tests/test_bounds.py
280
2541
import nose from nose.tools import assert_equal, assert_true from sklearn.utils.testing import clean_warning_registry import warnings import numpy as np from scipy import sparse as sp from sklearn.svm.bounds import l1_min_c from sklearn.svm import LinearSVC from sklearn.linear_model.logistic import LogisticRegression...
bsd-3-clause
benthomasson/ansible
lib/ansible/module_utils/ipa.py
97
6567
# -*- coding: utf-8 -*- # 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 lice...
gpl-3.0
bop/bauhaus
lib/python2.7/site-packages/django/contrib/gis/geos/prototypes/coordseq.py
624
3112
from ctypes import c_double, c_int, c_uint, POINTER from django.contrib.gis.geos.libgeos import GEOM_PTR, CS_PTR from django.contrib.gis.geos.prototypes.errcheck import last_arg_byref, GEOSException from django.contrib.gis.geos.prototypes.threadsafe import GEOSFunc ## Error-checking routines specific to coordinate seq...
mit
liamgh/liamgreenhughes-sl4a-tf101
python-build/python-libs/gdata/src/gdata/tlslite/integration/AsyncStateMachine.py
238
7198
""" A state machine for using TLS Lite with asynchronous I/O. """ class AsyncStateMachine: """ This is an abstract class that's used to integrate TLS Lite with asyncore and Twisted. This class signals wantsReadsEvent() and wantsWriteEvent(). When the underlying socket has become readabl...
apache-2.0
tchellomello/home-assistant
tests/components/http/test_view.py
13
2094
"""Tests for Home Assistant View.""" from aiohttp.web_exceptions import ( HTTPBadRequest, HTTPInternalServerError, HTTPUnauthorized, ) import pytest import voluptuous as vol from homeassistant.components.http.view import ( HomeAssistantView, request_handler_factory, ) from homeassistant.exceptions ...
apache-2.0
rofehr/linux-wetek
Documentation/networking/cxacru-cf.py
14668
1626
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # 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 i...
gpl-2.0
mrquim/mrquimrepo
repo/plugin.video.salts/scrapers/scraper.py
4
29936
""" Stream All The Sources Addon Copyright (C) 2014 k3l3vra This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later vers...
gpl-2.0
petteyg/intellij-community
python/helpers/epydoc/markup/__init__.py
90
23129
# # epydoc package file # # A python documentation Module # Edward Loper # # $Id: __init__.py 1577 2007-03-09 23:26:21Z dvarrazzo $ # """ Markup language support for docstrings. Each submodule defines a parser for a single markup language. These parsers convert an object's docstring to a L{ParsedDocstring}, a standa...
apache-2.0
scalable-networks/gnuradio-3.7.0.1
grc/python/extract_docs.py
4
2185
""" Copyright 2008-2011 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion 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 l...
gpl-3.0
tardyp/buildbot
master/buildbot/steps/package/deb/lintian.py
5
2885
# 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of ME...
gpl-2.0
notationist17/MuseScore
thirdparty/freetype/src/tools/docmaker/sources.py
44
13003
# # sources.py # # Convert source code comments to multi-line blocks (library file). # # Copyright 2002-2015 by # David Turner. # # This file is part of the FreeType project, and may only be used, # modified, and distributed under the terms of the FreeType project # license, LICENSE.TXT. By continuing to use,...
gpl-2.0
ozFri/rhizi
rhizi/tests/util.py
1
11087
# This file is part of rhizi, a collaborative knowledge graph editor. # Copyright (C) 2014-2015 Rhizi # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of...
agpl-3.0
tvanesse/theforce
Filters.py
1
1721
# -*- coding: utf-8 -*- from CSVHandler import CSVFile, Field class Filter(object): """ An abstract object that is able to produce a filtered version of a CSVFile based on some filtering criterias. """ def __init__(self, csvin): self._input = csvin def __str__(self): raise NotImplementedError @propert...
gpl-3.0
colloquium/spacewalk
backend/server/importlib/blacklistImport.py
1
4044
# # Copyright (c) 2008--2010 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a c...
gpl-2.0
yunikkk/omim
3party/protobuf/python/google/protobuf/internal/descriptor_database_test.py
73
2924
#! /usr/bin/python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
apache-2.0
thawatchai/mrkimontour
appengine-django/lib/django/views/generic/list.py
471
7630
from __future__ import unicode_literals from django.core.exceptions import ImproperlyConfigured from django.core.paginator import InvalidPage, Paginator from django.db.models.query import QuerySet from django.http import Http404 from django.utils import six from django.utils.translation import ugettext as _ from djang...
gpl-2.0
wooyek/glosuj-w-lomiankach
src/flask_multi_view/tests.py
1
2740
# coding=utf-8 # # Copyright 2010 Brave Labs sp. z o.o. # All rights reserved. # # This source code and all resulting intermediate files are CONFIDENTIAL and # PROPRIETY TRADE SECRETS of Brave Labs sp. z o.o. # Use is subject to license terms. See NOTICE file of this project for details. import unittest im...
mit
MeddlerOnTheRoof/mean
node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py
1824
3474
# Copyright (c) 2011 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. """gypd output module This module produces gyp input as its output. Output files are given the .gypd extension to avoid overwriting the .gyp files that they are ...
mit
leductan-nguyen/RaionPi
src/octoprint/server/apps/__init__.py
1
4070
# coding=utf-8 from __future__ import absolute_import __author__ = "Gina Häußge <osd@foosel.net>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' __copyright__ = "Copyright (C) 2014 The RaionPi Project - Released under terms of the AGPLv3 License" import rsa from flask import B...
agpl-3.0
iGivefirst/cassandra-dbapi2
cql/apivalues.py
11
2017
# 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 u...
apache-2.0
themrmax/scikit-learn
examples/cluster/plot_adjusted_for_chance_measures.py
105
4300
""" ========================================================== Adjustment for chance in clustering performance evaluation ========================================================== The following plots demonstrate the impact of the number of clusters and number of samples on various clustering performance evaluation me...
bsd-3-clause
rogerthat-platform/rogerthat-backend
src/rogerthat/api/activity.py
1
2012
# -*- coding: utf-8 -*- # Copyright 2017 GIG Technology NV # # 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...
apache-2.0
embeddedarm/android_external_chromium_org
tools/oopif/iframe_server.py
172
7285
# 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. """Test server for generating nested iframes with different sites. Very simple python server for creating a bunch of iframes. The page generation is ran...
bsd-3-clause
sdague/home-assistant
tests/components/homekit_controller/test_config_flow.py
6
21662
"""Tests for homekit_controller config flow.""" from unittest import mock import aiohomekit from aiohomekit.model import Accessories, Accessory from aiohomekit.model.characteristics import CharacteristicsTypes from aiohomekit.model.services import ServicesTypes import pytest from homeassistant.components.homekit_cont...
apache-2.0
falkolab/titanium_mobile
support/common/localecompiler.py
32
5750
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Localization Compiler # import os, sys, codecs, shutil from xml.dom.minidom import parse template_dir = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename)) sys.path.append(os.path.join(template_dir,'../')) from tiapp import * ignoreFiles = ['.gitig...
apache-2.0
nutszebra/trainer
nutszebra_utility.py
1
25948
from __future__ import division, print_function, absolute_import, unicode_literals import os import re import six import sys import mmap import json from tqdm import tqdm import threading import multiprocessing import subprocess import itertools import six.moves.cPickle as pickle import collections from operator import...
mit
mancoast/CPythonPyc_test
fail/301_test_functools.py
3
12512
import functools import unittest from test import support from weakref import proxy @staticmethod def PythonPartial(func, *args, **keywords): 'Pure Python approximation of partial()' def newfunc(*fargs, **fkeywords): newkeywords = keywords.copy() newkeywords.update(fkeywords) return fun...
gpl-3.0
mpkato/interleaving
tests/test_probabilistic_interleave.py
1
2343
import interleaving as il import numpy as np from collections import defaultdict from .test_methods import TestMethods class TestProbabilisticInterleave(TestMethods): n = 5000 # Number of times of probabilistic tests def test_sanity(self): assert il.Probabilistic([[0], [0]]).interleave() == [0] ...
mit
toladata/TolaProfile
userprofile/tasks.py
1
2735
#The tasks goes here from __future__ import absolute_import, unicode_literals from celery import shared_task import requests import urlparse import json #sync with TolaWork @shared_task def sync_create_with_tolawork(data, url){ server_name = "tola.work" tola_work_url = urlparse.urljoin(url, server_name) ...
apache-2.0
stonegithubs/odoo
addons/mail/tests/test_mail_group.py
143
3939
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
woobe/h2o
py/testdir_release/c4/test_c4_four_billion_rows_fvec.py
2
4142
import unittest, time, sys, random sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_hosts, h2o_glm, h2o_browse as h2b, h2o_import as h2i, h2o_common, h2o_exec as h2e print "Assumes you ran ../build_for_clone.py in this directory" print "Using h2o-nodes.json. Also the sandbox dir" class releaseTest(h2...
apache-2.0
davehunt/kuma
vendor/packages/logilab/astng/raw_building.py
25
13572
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as publis...
mpl-2.0
GbalsaC/bitnamiP
pyfs/fs/expose/dokan/__init__.py
7
37823
""" fs.expose.dokan =============== Expose an FS object to the native filesystem via Dokan. This module provides the necessary interfaces to mount an FS object into the local filesystem using Dokan on win32:: http://dokan-dev.net/en/ For simple usage, the function 'mount' takes an FS object and a drive letter, ...
agpl-3.0
titom1986/CouchPotatoServer
libs/pyutil/iputil.py
92
9752
# from the Python Standard Library import os, re, socket, sys, subprocess # from Twisted from twisted.internet import defer, threads, reactor from twisted.internet.protocol import DatagramProtocol from twisted.python.procutils import which from twisted.python import log try: import resource def increase_rlimi...
gpl-3.0
dhermes/google-cloud-python
bigquery/google/cloud/bigquery/__init__.py
2
4670
# Copyright 2015 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
apache-2.0
MicroTrustRepos/microkernel
src/l4/pkg/python/contrib/Lib/encodings/cp1254.py
593
13758
""" Python Character Mapping Codec cp1254 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1254.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...
gpl-2.0
hanlind/nova
nova/api/openstack/compute/extension_info.py
1
14469
# Copyright 2013 IBM Corp. # # 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 t...
apache-2.0
DayGitH/Python-Challenges
DailyProgrammer/DP20120917B.py
1
2265
""" [9/17/2012] Challenge #99 [intermediate] (Unemployment map of the United States) https://www.reddit.com/r/dailyprogrammer/comments/101mi5/9172012_challenge_99_intermediate_unemployment/ [A little while ago](http://www.reddit.com/r/dailyprogrammer/comments/yj38u/8202012_challenge_89_difficult_coloring_the/) we too...
mit
aaron-goshine/electron
script/update-external-binaries.py
29
1682
#!/usr/bin/env python import errno import sys import os from lib.config import get_target_arch from lib.util import safe_mkdir, rm_rf, extract_zip, tempdir, download VERSION = 'v0.8.0' SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) FRAMEWORKS_URL = 'http://github.com/atom/atom-shell-frame...
mit
dpau/thumb
lib/werkzeug/contrib/lint.py
318
12282
# -*- coding: utf-8 -*- """ werkzeug.contrib.lint ~~~~~~~~~~~~~~~~~~~~~ .. versionadded:: 0.5 This module provides a middleware that performs sanity checks of the WSGI application. It checks that :pep:`333` is properly implemented and warns on some common HTTP errors such as non-empty respons...
apache-2.0
frappe/frappe
frappe/desk/report_dump.py
1
2788
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt import frappe import json import copy @frappe.whitelist() def get_data(doctypes, last_modified): data_map = {} for dump_report_map in frappe.get_hooks().dump_report_map: data_map.update(frappe.get_attr(dump_report...
mit
hassanibi/erpnext
erpnext/patches/v7_0/repost_bin_qty_and_item_projected_qty.py
35
1123
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from erpnext.stock.doctype.bin.bin import update_item_projected_qty def execute(): repost_bin_qty() repost_item_projected_qty() def...
gpl-3.0
dparks1134/GenomeTk
genometk/metadata_nucleotide.py
1
4848
############################################################################### # # # 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 # ...
gpl-3.0
entropy1337/infernal-twin
Modules/wpa2_hack.py
1
5100
try: import wx from wxPython.wx import * from wxPython.wx import * import wx.html except ImportError: raise: ImportError("Detected Python 3+") import wx.html from wxPython.wx import * import infernal_wireless_gui class MyHtmlFrame(wx.Frame): def __init__(self, parent, title): wx....
gpl-3.0
clouddocx/boto
boto/provider.py
102
20925
# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright 2010 Google Inc. # Copyright (c) 2010, Eucalyptus Systems, Inc. # Copyright (c) 2011, Nexenta Systems Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated document...
mit
jtyuan/racetrack
src/mem/slicc/ast/StallAndWaitStatementAST.py
34
2361
# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood # Copyright (c) 2009 The Hewlett-Packard Development Company # Copyright (c) 2010 Advanced Micro Devices, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following ...
bsd-3-clause
saketkc/statsmodels
statsmodels/stats/tests/test_corrpsd.py
31
16765
# -*- coding: utf-8 -*- """Tests for finding a positive semi-definite correlation or covariance matrix Created on Mon May 27 12:07:02 2013 Author: Josef Perktold """ import numpy as np import scipy.sparse as sparse from numpy.testing import (assert_almost_equal, assert_allclose, assert_equ...
bsd-3-clause
albertjan/pypyjs-presentation
assets/js/pypy.js-0.3.1/lib/modules/test/test_ntpath.py
8
14828
# coding: utf-8 import ntpath import os import sys from test.test_support import TestFailed from test import test_support, test_genericpath import unittest def tester0(fn, wantResult): gotResult = eval(fn) if wantResult != gotResult: raise TestFailed, "%s should return: %r but returned: %r" \ ...
unlicense
SVADemoAPP/Server
WebContent/WEB-INF/python/BluemixClientTest.py
1
4032
#!/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 # "...
apache-2.0
RobertABT/heightmap
build/scipy/scipy/stats/_discrete_distns.py
4
20332
# # Author: Travis Oliphant 2002-2011 with contributions from # SciPy Developers 2004-2011 # from __future__ import division, print_function, absolute_import from scipy import special from scipy.special import gammaln as gamln from numpy import floor, ceil, log, exp, sqrt, log1p, expm1, tanh, cosh, sinh i...
mit
zstackio/zstack-woodpecker
integrationtest/vm/mn_ha/test_all_hosts_force_stop_recover_vm_ha.py
2
4114
''' Integration Test all hosts force stop and then recover, check ha vm auto recovery. @author: SyZhao ''' import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_state as test_state import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.operations.node_operations as node_ops ...
apache-2.0
birkin/ts_reporting_project
tech_services_reports/lib/cataloging_report_view_helper.py
1
17136
# -*- coding: utf-8 -*- import datetime, json, logging, pprint from collections import defaultdict from operator import itemgetter from django.conf import settings as project_settings from django.core.urlresolvers import reverse from tech_services_reports import settings_app log = logging.getLogger("webapp") clas...
mit
tensorflow/tensorflow
tensorflow/lite/experimental/microfrontend/python/kernel_tests/audio_microfrontend_op_test.py
23
5906
# Copyright 2018 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
caithess/taskbuster
functional_tests/test_all_users.py
1
2530
# -*- coding: utf-8 -*- from datetime import date from selenium import webdriver from django.core.urlresolvers import reverse from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.utils import formats from django.utils.translation import activate class HomeNewVisitorTest(StaticLiveServer...
mit
luotao1/Paddle
python/paddle/fluid/dygraph/dygraph_to_static/ast_transformer.py
1
6469
# 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
Vegaviet-DevTeam/android_kernel_pantech_ef63-common
tools/perf/util/setup.py
4998
1330
#!/usr/bin/python2 from distutils.core import setup, Extension from os import getenv from distutils.command.build_ext import build_ext as _build_ext from distutils.command.install_lib import install_lib as _install_lib class build_ext(_build_ext): def finalize_options(self): _build_ext.finalize_optio...
gpl-2.0
Jgarcia-IAS/localizacion
openerp/addons-extra/odoo-pruebas/odoo-server/addons/hr_timesheet_sheet/__init__.py
434
1127
# -*- 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
p0cisk/Quantum-GIS
python/plugins/db_manager/dlg_import_vector.py
1
14827
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS Date : Oct 13, 2011 copyright : (C) 2011 by Giuseppe Sucameli email : brush.tyler@...
gpl-2.0
salamb/girder
plugins/geospatial/server/geospatial.py
3
21289
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware 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 ...
apache-2.0
Obus/scikit-learn
examples/decomposition/plot_image_denoising.py
84
5820
""" ========================================= Image denoising using dictionary learning ========================================= An example comparing the effect of reconstructing noisy fragments of the Lena image using firstly online :ref:`DictionaryLearning` and various transform methods. The dictionary is fitted o...
bsd-3-clause
JioEducation/edx-platform
common/lib/chem/chem/chemtools.py
250
10721
"""This module originally includes functions for grading Vsepr problems. Also, may be this module is the place for other chemistry-related grade functions. TODO: discuss it. """ import json import unittest import itertools def vsepr_parse_user_answer(user_input): """ user_input is json generated by vsepr.js...
agpl-3.0
praekelt/rapidpro
temba/channels/migrations/0015_auto_20150703_2048.py
3
3334
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations, connection class Migration(migrations.Migration): def install_channellog_trigger(apps, schema_editor): """ Installs a Postgres trigger that will increment or decrement our our success and err...
agpl-3.0
0jpq0/kbengine
kbe/res/scripts/common/Lib/idlelib/GrepDialog.py
61
5143
import os import fnmatch import re # for htest import sys from tkinter import StringVar, BooleanVar, Checkbutton # for GrepDialog from tkinter import Tk, Text, Button, SEL, END # for htest from idlelib import SearchEngine import itertools from idlelib.SearchDialogBase import SearchDialogBase # Importing OutputWindow...
lgpl-3.0
kohnle-lernmodule/KITexe201based
exe/engine/linuxconfig.py
4
3054
# =========================================================================== # eXe config # Copyright 2004-2006, University of Auckland # # 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; e...
gpl-2.0
aurofable/medhack-server
venv/lib/python2.7/site-packages/sqlalchemy/dialects/oracle/zxjdbc.py
34
7661
# oracle/zxjdbc.py # Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Support for the Oracle database via the zxjdbc JDBC connector. JDBC Driver ------...
mit
czgu/metaHack
env/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py
170
8755
from binascii import hexlify, unhexlify from hashlib import md5, sha1 from ..exceptions import SSLError SSLContext = None HAS_SNI = False create_default_context = None import errno import ssl try: # Test for SSL features from ssl import wrap_socket, CERT_NONE, PROTOCOL_SSLv23 from ssl import HAS_SNI # Ha...
apache-2.0
virneo/nupic
tests/unit/nupic/frameworks/opf/opf_metrics_test.py
7
28753
#!/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
bartosh/zipline
tests/test_benchmark.py
5
8023
# # Copyright 2015 Quantopian, 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 wr...
apache-2.0
chris-chris/tensorflow
tensorflow/contrib/distributions/python/ops/mixture.py
19
17210
# 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
bentilly/heroes
heroes/trophies/controllers.py
1
1666
"""Trophies-related controllers. """ from flask import Blueprint, render_template, redirect, request from google.appengine.ext import ndb from .models import Trophy trophy_bp = Blueprint('trophy', __name__) @trophy_bp.route('/new/') @trophy_bp.route('/new/<sport_key>/', methods=['GET', 'POST']) def new_trophy_page...
apache-2.0
gef756/statsmodels
statsmodels/sandbox/contrast_old.py
34
4686
import copy import numpy as np from numpy.linalg import pinv from statsmodels.sandbox import utils_old as utils class ContrastResults(object): """ Results from looking at a particular contrast of coefficients in a parametric model. The class does nothing, it is a container for the results from T and F...
bsd-3-clause
adityacs/ansible
lib/ansible/modules/cloud/univention/udm_dns_zone.py
21
7623
#!/usr/bin/python # -*- coding: UTF-8 -*- # Copyright (c) 2016, Adfinis SyGroup AG # Tobias Rueetschi <tobias.ruetschi@adfinis-sygroup.ch> # # 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 Fr...
gpl-3.0
transientskp/tkp
tests/test_steps/test_varmetric.py
1
1675
import unittest import logging import tkp.db.model from tkp.testutil.alchemy import gen_band, gen_dataset, gen_skyregion,\ gen_lightcurve from tkp.testutil.decorators import database_disabled import tkp.db from tkp.steps.varmetric import execute_store_varmetric logging.basicConfig(level=logging.INFO) logging....
bsd-2-clause
romansalin/django-seo2
tests/settings.py
3
2490
""" Django settings for tests project. """ from __future__ import unicode_literals import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(__file__)) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.c...
mit
mgaitan/scipy
scipy/sparse/bsr.py
66
20937
"""Compressed Block Sparse Row matrix format""" from __future__ import division, print_function, absolute_import __docformat__ = "restructuredtext en" __all__ = ['bsr_matrix', 'isspmatrix_bsr'] from warnings import warn import numpy as np from .data import _data_matrix, _minmax_mixin from .compressed import _cs_m...
bsd-3-clause
yueyueyang/inf1340_2015_asst1
test_exercise2.py
16
2575
#!/usr/bin/env python """ Module to test exercise2.py """ __author__ = 'Susan Sim' __email__ = "ses@drsusansim.org" __copyright__ = "2015 Susan Sim" __license__ = "MIT License" import pytest import mock from exercise2 import name_that_shape def test_accepted_inputs(capsys): """ Inputs that are the range 3...
mit
ntoll/yotta
yotta/lib/component.py
2
27734
# Copyright 2014 ARM Limited # # Licensed under the Apache License, Version 2.0 # See LICENSE file for details. # standard library modules, , , import json import os import logging import os.path as path from collections import OrderedDict import subprocess # access, , get components, internal import access import ac...
apache-2.0
yousafsyed/casperjs
bin/Lib/test/test_email/test_headerregistry.py
72
56910
import datetime import textwrap import unittest from email import errors from email import policy from email.message import Message from test.test_email import TestEmailBase, parameterize from email import headerregistry from email.headerregistry import Address, Group DITTO = object() class TestHeaderRegistry(TestE...
mit
mvaled/OpenUpgrade
addons/account_payment/wizard/account_payment_order.py
338
5906
# -*- 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
swinter2011/login-page-update
markdown/treeprocessors.py
17
12853
from __future__ import unicode_literals from __future__ import absolute_import from . import util from . import odict from . import inlinepatterns def build_treeprocessors(md_instance, **kwargs): """ Build the default treeprocessors for Markdown. """ treeprocessors = odict.OrderedDict() treeprocessors["in...
apache-2.0
redhat-openstack/django
django/middleware/common.py
108
7314
import hashlib import logging import re import warnings from django.conf import settings from django.core.mail import mail_managers from django.core import urlresolvers from django import http from django.utils.encoding import force_text from django.utils.http import urlquote from django.utils import six logger = lo...
bsd-3-clause
jjs0sbw/CSPLN
apps/scaffolding/mac/web2py/web2py.app/Contents/Resources/gluon/debug.py
22
5538
#!/usr/bin/env python # -*- coding: utf-8 -*- """ | This file is part of the web2py Web Framework | Developed by Massimo Di Pierro <mdipierro@cs.depaul.edu>, | limodou <limodou@gmail.com> and srackham <srackham@gmail.com>. | License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) Debugger support classes ------------...
gpl-3.0
adlius/osf.io
osf/migrations/0147_repoint_preprint_pagecounters.py
11
1854
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-12-06 15:44 from __future__ import unicode_literals from bulk_update.helper import bulk_update from django.contrib.contenttypes.models import ContentType from django.db import migrations from tqdm import tqdm def noop(*args, **kwargs): # No brakes on ...
apache-2.0
m-urban/beets
test/test_embedart.py
9
7151
# This file is part of beets. # Copyright 2015, Thomas Scholtes. # # 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,...
mit
maroux/django-extensions
django_extensions/db/fields/encrypted.py
28
6056
import sys import warnings import six from django import forms from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db import models try: from keyczar import keyczar except ImportError: raise ImportError('Using an encrypted field requires the Keyczar module. ' ...
mit
hungdt/scf_dmft
dmft.py
1
7186
#!/usr/bin/env python import h5py, time, sys, os; import re import init, solver, system_dependence as system; from numpy import *; from average_green import averageGreen; from functions import *; from share_fun import *; # # INIT: for the details of variables, see return of init.py # # read input arguments parms,...
mit
edcast-inc/edx-platform-edcast
lms/djangoapps/edxnotes/views.py
72
3809
""" Views related to EdxNotes. """ import json import logging from django.contrib.auth.decorators import login_required from django.http import HttpResponse, HttpResponseBadRequest, Http404 from django.conf import settings from django.core.urlresolvers import reverse from edxmako.shortcuts import render_to_response fro...
agpl-3.0
yavuzovski/playground
python/django/RESTTest/.venv/lib/python3.4/site-packages/django/contrib/redirects/models.py
115
1077
from django.contrib.sites.models import Site from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ @python_2_unicode_compatible class Redirect(models.Model): site = models.ForeignKey(Site, models.CASCADE, verbose_name=_('...
gpl-3.0
MeetMe/selenium
py/test/selenium/webdriver/common/rendered_webelement_tests.py
63
3233
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
javilonas/NCam
cross/android-toolchain/lib/python2.7/distutils/spawn.py
83
7790
"""distutils.spawn Provides the 'spawn()' function, a front-end to various platform- specific functions for launching another program in a sub-process. Also provides the 'find_executable()' to search the path for a given executable name. """ __revision__ = "$Id$" import sys import os from distutils.errors import Di...
gpl-3.0
Arzie/deluge
deluge/ui/gtkui/path_chooser.py
2
7192
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Bro <bro.development@gmail.com> # # This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with # the additional special exception to link portions of this program with the OpenSSL library. # See LICENSE for more details. # import logg...
gpl-3.0
ppries/tensorflow
tensorflow/python/util/example_parser_configuration.py
30
4715
# 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
pabelanger/stackalytics
tests/unit/test_record_processor.py
2
32242
# Copyright (c) 2013 Mirantis 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
TimYi/django
django/contrib/gis/maps/google/gmap.py
526
9223
from __future__ import unicode_literals from django.conf import settings from django.contrib.gis.maps.google.overlays import ( GMarker, GPolygon, GPolyline, ) from django.template.loader import render_to_string from django.utils.html import format_html from django.utils.safestring import mark_safe from django.util...
bsd-3-clause
KarlTDebiec/md_format_converter
AmberTrajOutput.py
2
2950
# -*- coding: utf-8 -*- # md_format_converter.AmberTrajOutput.py # # Copyright (C) 2012-2016 Karl T Debiec # All rights reserved. # # This software may be modified and distributed under the terms of the # BSD license. See the LICENSE file for details. """ Manages addition of Amber output information to segmen...
bsd-3-clause