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
guschmue/tensorflow
tensorflow/contrib/timeseries/python/timeseries/saved_model_utils.py
27
8059
# 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
jclc/discus-inferno
flaskenv/lib/python2.7/site-packages/gunicorn/pidfile.py
7
2273
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. from __future__ import with_statement import errno import os import tempfile class Pidfile(object): """\ Manage a PID file. If a specific name is provided it and '"%s.oldpid" % ...
mit
ogenstad/ansible
contrib/inventory/nagios_ndo.py
43
3807
#!/usr/bin/env python # (c) 2014, Jonathan Lestrelin <jonathan.lestrelin@gmail.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 Licens...
gpl-3.0
espadrine/opera
chromium/src/third_party/chromite/scripts/check_gdata_token_unittest.py
4
18523
#!/usr/bin/python # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for cros_portage_upgrade.py.""" import filecmp import mox import os import shutil import gdata.service from gdata.p...
bsd-3-clause
shubhdev/edx-platform
pavelib/servers.py
30
6182
""" Run and manage servers for local development. """ from __future__ import print_function import sys import argparse from paver.easy import * from .utils.cmd import django_cmd from .utils.process import run_process, run_multi_processes DEFAULT_PORT = {"lms": 8000, "studio": 8001} DEFAULT_SETTINGS = 'devstack' def...
agpl-3.0
rembo10/headphones
lib/pygazelle/inbox.py
26
3948
class MailboxMessage(object): def __init__(self, api, message): self.id = message['convId'] self.conv = Conversation(api, self.id) self.subject = message['subject'] self.unread = message['unread'] self.sticky = message['sticky'] self.fwd_id = message['forwardedId'] ...
gpl-3.0
tyagiarpit/servo
tests/wpt/harness/wptrunner/update/sync.py
116
6508
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import os import shutil import sys import uuid from .. import testloader from base import Step, StepRunner from tree i...
mpl-2.0
bartsidee/bartsidee-boxee
sources/tv/system/linux/lxml/cssselect.py
35
28750
"""CSS Selectors based on XPath. This module supports selecting XML/HTML tags based on CSS selectors. See the `CSSSelector` class for details. """ import re from lxml import etree __all__ = ['SelectorSyntaxError', 'ExpressionError', 'CSSSelector'] try: _basestring = basestring except NameError: _...
gpl-3.0
jar398/tryphy
tests/test_sl_eol_get_links.py
1
2532
# 10. sl/eol/get_links # Parameter: list of species # Result: # input_species - repeats input (issue: flush this) # message, status_code as usual # meta_data - not very useful # species - list of blobs about species # eol_id # matched_name - contains authority # searched_name - presumably wha...
bsd-2-clause
rspavel/spack
var/spack/repos/builtin/packages/r-fitdistrplus/package.py
5
1434
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RFitdistrplus(RPackage): """Extends the fitdistr() function (of the MASS package) with sev...
lgpl-2.1
VitalPet/c2c-rd-addons
sale_order_webkit_chricar/sale.py
4
6140
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2011 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2011 ChriCar Beteiligungs- und Beratungs- GmbH (<http://www.camptocamp.com>). # # This p...
agpl-3.0
Huluzai/DoonSketch
inkscape-0.48.5/share/extensions/export_gimp_palette.py
3
1454
#!/usr/bin/env python ''' Author: Jos Hirth, kaioa.com License: GNU General Public License - http://www.gnu.org/licenses/gpl.html Warranty: see above ''' DOCNAME='sodipodi:docname' import sys, simplestyle try: from xml.dom.minidom import parse except: sys.exit(_('The export_gpl.py module requires PyXML. Ple...
gpl-2.0
weechat/weechat.org
weechat/about/views.py
1
5180
# # Copyright (C) 2003-2021 Sébastien Helleu <flashcode@flashtux.org> # # This file is part of WeeChat.org. # # WeeChat.org 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 #...
gpl-3.0
museomix/2013_Quebec_thermoscope
raspberry/pygame-1.9.1release/test/run_tests__tests/exclude/magic_tag_test.py
10
1141
__tags__ = ['magic'] if __name__ == '__main__': import sys import os pkg_dir = (os.path.split( os.path.split( os.path.split( os.path.abspath(__file__))[0])[0])[0]) parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_...
mit
mvaled/OpenUpgrade
addons/project_issue/project_issue.py
217
29319
#-*- 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
bop/rango
lib/python2.7/site-packages/django/contrib/gis/tests/geo3d/tests.py
100
11815
from __future__ import absolute_import, unicode_literals import os import re from django.contrib.gis.db.models import Union, Extent3D from django.contrib.gis.geos import GEOSGeometry, LineString, Point, Polygon from django.contrib.gis.utils import LayerMapping, LayerMapError from django.test import TestCase from djan...
gpl-2.0
Zentyal/samba
python/samba/tests/registry.py
49
1772
# Unix SMB/CIFS implementation. # Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007 # # 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) a...
gpl-3.0
Kyria/LazyBlacksmith
lbcmd/sde_import.py
1
4863
# -*- encoding: utf-8 -*- import bz2 import os import sqlite3 import requests from flask_script import Command, Option from lazyblacksmith.models import db from lbcmd.importer import Importer class SdeImport(Command): """ Manage SDE Data in lazyblacksmith. If all flags are specified, "clear" action is ...
bsd-3-clause
abaditsegay/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/encodings/iso8859_10.py
593
13845
""" Python Character Mapping Codec iso8859_10 generated from 'MAPPINGS/ISO8859/8859-10.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
stewartpark/django
django/db/backends/oracle/creation.py
160
17256
import sys import time from django.conf import settings from django.db.backends.base.creation import BaseDatabaseCreation from django.db.utils import DatabaseError from django.utils.functional import cached_property from django.utils.six.moves import input TEST_DATABASE_PREFIX = 'test_' PASSWORD = 'Im_a_lumberjack' ...
bsd-3-clause
jrper/fluidity
tests/mms_sediment/mms_sediment_tools.py
4
17309
from math import sin, cos, tanh, pi, e, sqrt def u(X): return 0.150*sin(0.750*X[1]) + cos(0.900*X[0]) + 0.150*cos(0.750*X[1]) + 0.500 def v(X): return 0.9*X[1]*sin(0.9*X[0]) def p(X): return sin(X[0]*X[1]/pi) + sin(X[0]) + cos(X[1]) - 1.00 def s1(X): return 0.0700*sin(1.30*X[0]*X[1]/pi) - 0.0100*sin...
lgpl-2.1
RichardLitt/wyrd-django-dev
tests/regressiontests/urlpatterns_reverse/views.py
51
1244
from django.http import HttpResponse from django.views.generic import RedirectView from django.core.urlresolvers import reverse_lazy from django.contrib.auth.decorators import user_passes_test def empty_view(request, *args, **kwargs): return HttpResponse('') def kwargs_view(request, arg1=1, arg2=2): return H...
bsd-3-clause
easmetz/inasafe
safe/impact_functions/inundation/tsunami_raster_road/test/test_tsunami_raster_road.py
2
6057
# coding=utf-8 """ InaSAFE Disaster risk assessment tool developed by AusAid and World Bank - **Test for Tsunami Raster Building Impact Function.** Contact : ole.moller.nielsen@gmail.com .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Li...
gpl-3.0
mgadi/naemonbox
sources/psdash/pyzmq-13.1.0/zmq/sugar/tracker.py
4
4012
"""Tracker for zero-copy messages with 0MQ.""" #----------------------------------------------------------------------------- # Copyright (C) 2013 Brian Granger, Min Ragan-Kelley # # This file is part of pyzmq # # Distributed under the terms of the New BSD License. The full license is in # the file COPYING.BSD, d...
gpl-2.0
ozburo/youtube-dl
youtube_dl/extractor/franceculture.py
4
2866
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( determine_ext, extract_attributes, int_or_none, ) class FranceCultureIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?franceculture\.fr/emissions/(?:[^/]+/)*(?P<id>[^/?#&]+)' _TESTS...
unlicense
AlekhyaMallina-Vedams/openstack-manuals
doc/contributor-guide/setup.py
608
1045
#!/usr/bin/env python # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # 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 # # Unle...
apache-2.0
anomitra/articleScraper
PyQt-gpl-5.4.1/examples/painting/transformations.py
3
8603
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2013 Riverbank Computing Limited. ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENS...
gpl-2.0
facelessuser/Pywin32
lib/x32/win32/lib/win32netcon.py
9
20394
# Generated by h2py from lmaccess.h # Included from lmcons.h CNLEN = 15 LM20_CNLEN = 15 DNLEN = CNLEN LM20_DNLEN = LM20_CNLEN UNCLEN = (CNLEN+2) LM20_UNCLEN = (LM20_CNLEN+2) NNLEN = 80 LM20_NNLEN = 12 RMLEN = (UNCLEN+1+NNLEN) LM20_RMLEN = (LM20_UNCLEN+1+LM20_NNLEN) SNLEN = 80 LM20_SNLEN = 15 STXTLEN = 2...
bsd-3-clause
CospanDesign/sdio-device
cocotb/test_dut.py
2
1502
# Simple tests for an adder module import os import sys import cocotb import logging from cocotb.result import TestFailure from nysa.host.sim.sim_host import NysaSim from cocotb.clock import Clock import time from array import array as Array from dut_driver import wb_sdio_deviceDriver SIM_CONFIG = "sim_config.json" ...
mit
ValvePython/steam
steam/protobufs/steammessages_friendmessages_pb2.py
1
60309
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: steammessages_friendmessages.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descrip...
mit
OpenUpgrade-dev/OpenUpgrade
addons/account_check_writing/account.py
379
2032
# -*- 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
mne-tools/mne-tools.github.io
0.15/_downloads/plot_custom_inverse_solver.py
1
6931
# -*- coding: utf-8 -*- """ ================================================ Source localization with a custom inverse solver ================================================ The objective of this example is to show how to plug a custom inverse solver in MNE in order to facilate empirical comparison with the methods M...
bsd-3-clause
jordiblasco/easybuild-easyblocks
easybuild/easyblocks/t/trinity.py
10
11628
## # Copyright 2009-2015 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://vscentrum.be/nl/en), # the Hercules foundation (htt...
gpl-2.0
ntoll/yotta
yotta/test/components.py
4
2617
#! /usr/bin/env python2.7 # Copyright 2014 ARM Limited # # Licensed under the Apache License, Version 2.0 # See LICENSE file for details. import unittest import os import shutil import errno import logging import tempfile from collections import OrderedDict from yotta.lib import access from yotta.lib import componen...
apache-2.0
nullx002/pychess
testing/frc_castling.py
20
1497
from __future__ import print_function import unittest from pychess.Utils.const import * from pychess.Utils.lutils.leval import LBoard from pychess.Utils.lutils.lmove import FLAG from pychess.Utils.lutils.lmovegen import genCastles, newMove # TODO: add more test data data = ( ("r3k2r/8/8/8/8/8/8/R3K2R w AH - 0 1", [(...
gpl-3.0
kvar/ansible
lib/ansible/modules/files/unarchive.py
3
36099
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # Copyright: (c) 2013, Dylan Martin <dmartin@seattlecentral.edu> # Copyright: (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com> # Copyright: (c) 2016, Dag Wieers <dag@wieers.com> # Copyright: (c) 2017, Ansible Pr...
gpl-3.0
Qalthos/ansible
lib/ansible/modules/network/fortios/fortios_endpoint_control_forticlient_registration_sync.py
24
8122
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, 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 3 of the Lic...
gpl-3.0
sounak98/coala-bears
tests/java/CheckstyleBearTest.py
2
3245
import os import pathlib from tempfile import NamedTemporaryFile from queue import Queue from bears.java import CheckstyleBear from tests.BearTestHelper import generate_skip_decorator from tests.LocalBearTestHelper import LocalBearTestHelper from coalib.settings.Section import Section from coalib.settings.Setting impo...
agpl-3.0
jlemanbeto/Server
dependencies64/freetype/src/tools/docmaker/tohtml.py
78
18715
# ToHTML (c) 2002, 2003, 2005, 2006, 2007, 2008 # David Turner <david@freetype.org> from sources import * from content import * from formatter import * import time # The following defines the HTML header used by all generated pages. html_header_1 = """\ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional/...
gpl-3.0
jay-tyler/ansible
lib/ansible/plugins/lookup/file.py
103
2060
# (c) 2012, Daniel Hokka Zakrisson <daniel@hozac.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 lat...
gpl-3.0
Blizzard/s2protocol
s2protocol/versions/protocol75689.py
4
31404
# Copyright (c) 2015-2017 Blizzard Entertainment # # 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, ...
mit
kerr-huang/Testerman
core/snmp/pysnmp/smi/mibs/SNMP-NOTIFICATION-MIB.py
2
15986
# PySNMP SMI module. Autogenerated from smidump -f python SNMP-NOTIFICATION-MIB # by libsmi2pysnmp-0.0.9-alpha at Thu Mar 26 20:58:12 2009, # Python version (2, 4, 4, 'final', 0) # Imported just in case new ASN.1 types would be created from pyasn1.type import constraint, namedval # Imports ( Integer, ObjectIdentifie...
gpl-2.0
PADAS/django-raster
raster/formulas.py
1
9578
import numpy from pyparsing import CaselessLiteral, Combine, Forward, Literal, Optional, Word, ZeroOrMore, alphas, nums from django.contrib.gis.gdal import GDALRaster from .const import ALGEBRA_PIXEL_TYPE_GDAL, ALGEBRA_PIXEL_TYPE_NUMPY class FormulaParser(object): """ Deconstruct mathematical algebra expres...
bsd-3-clause
yqm/sl4a
python/src/Lib/test/test_binop.py
87
10683
"""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...
apache-2.0
UdK-VPT/Open_eQuarter
mole3x/extensions/eval3/oeq_SQTP_Window.py
2
1393
# -*- coding: utf-8 -*- import os,math from qgis.core import NULL from mole3 import oeq_global from mole3.project import config from mole3.extensions import OeQExtension from mole3.stat_corr import contemporary_base_uvalue_by_building_age_lookup def calculation(self=None, parameters={},feature = None): from scipy...
gpl-2.0
rismalrv/edx-platform
common/djangoapps/student/migrations/0040_auto__del_field_usersignupsource_user_id__add_field_usersignupsource_u.py
114
12942
# -*- 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): # Deleting field 'UserSignupSource.user_id' db.delete_column('student_usersignupsource', 'user_id_id') ...
agpl-3.0
ishanic/scikit-learn
sklearn/preprocessing/data.py
113
56747
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Mathieu Blondel <mathieu@mblondel.org> # Olivier Grisel <olivier.grisel@ensta.org> # Andreas Mueller <amueller@ais.uni-bonn.de> # Eric Martin <eric@ericmart.in> # License: BSD 3 clause from itertools import chain, combina...
bsd-3-clause
bspink/django
django/contrib/redirects/middleware.py
383
1810
from __future__ import unicode_literals from django import http from django.apps import apps from django.conf import settings from django.contrib.redirects.models import Redirect from django.contrib.sites.shortcuts import get_current_site from django.core.exceptions import ImproperlyConfigured class RedirectFallback...
bsd-3-clause
ycaihua/kbengine
kbe/src/lib/python/Modules/_ctypes/libffi/generate-darwin-source-and-headers.py
87
6613
#!/usr/bin/env python import subprocess import os import errno import collections import glob import argparse class Platform(object): pass class simulator_platform(Platform): directory = 'darwin_ios' sdk = 'iphonesimulator' arch = 'i386' triple = 'i386-apple-darwin11' version_min = '-miphoneos...
lgpl-3.0
WillianPaiva/ycmd
cpp/ycm/tests/gmock/gtest/test/gtest_shuffle_test.py
3023
12549
#!/usr/bin/env python # # Copyright 2009 Google Inc. All Rights Reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of...
gpl-3.0
paulmadore/Eric-IDE
6-6.0.9/eric/Preferences/ConfigurationPages/CooperationPage.py
2
4178
# -*- coding: utf-8 -*- # Copyright (c) 2010 - 2015 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing the Cooperation configuration page. """ from __future__ import unicode_literals from PyQt5.QtCore import pyqtSlot, QRegExp from PyQt5.QtGui import QRegExpValidator, QValidator from .Configurati...
gpl-3.0
roopali8/tempest
tempest/api/identity/admin/v3/test_projects.py
1
7635
# Copyright 2013 OpenStack, LLC # 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
nyalldawson/QGIS
tests/src/python/test_qgsdatabaseschemamodel.py
32
10288
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsDatabaseSchemaModel .. note:: 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....
gpl-2.0
mueller-lab/PyFRAP
pyfrp/modules/pyfrp_optimization_module.py
2
6867
#===================================================================================================================================== #Copyright #===================================================================================================================================== #Copyright (C) 2014 Alexander Blaessle...
gpl-3.0
danielnyga/pracmln
python3/pracmln/mln/learning/softeval.py
2
1371
# -*- coding: utf-8 -*- # # Markov Logic Networks # # (C) 2006-2010 by Dominik Jain (jain@cs.tum.edu) # # 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 # witho...
bsd-2-clause
Netflix/sketchy
setup-nflx.py
1
1460
# Copyright 2014 Netflix, 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...
apache-2.0
stannynuytkens/youtube-dl
youtube_dl/extractor/dvtv.py
8
6807
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( determine_ext, ExtractorError, int_or_none, js_to_json, mimetype2ext, unescapeHTML, ) class DVTVIE(InfoExtractor): IE_NAME = 'dvtv' IE_DESC = 'http://video.aktual...
unlicense
ecino/compassion-modules
mobile_app_connector/models/res_users.py
3
1638
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2018 Compassion CH (http://www.compassion.ch) # @author: Quentin Gigon <gigon.quentin@gmail.com> # # The licence is in the file __manifest__.py # ############################################...
agpl-3.0
aptivate/invite-registration
registration/views.py
1
3680
from django.conf import settings from django.contrib import messages from django.contrib.auth.views import password_change from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.views.generic import FormView, RedirectView fro...
gpl-3.0
xrmx/django
django/contrib/gis/db/backends/spatialite/operations.py
257
11441
""" SQL functions reference lists: http://www.gaia-gis.it/spatialite-2.4.0/spatialite-sql-2.4.html http://www.gaia-gis.it/spatialite-3.0.0-BETA/spatialite-sql-3.0.0.html http://www.gaia-gis.it/gaia-sins/spatialite-sql-4.2.1.html """ import re import sys from django.contrib.gis.db.backends.base.operations import \ ...
bsd-3-clause
0x535431/textaapp
lib/requests/utils.py
618
21334
# -*- coding: utf-8 -*- """ requests.utils ~~~~~~~~~~~~~~ This module provides utility functions that are used within Requests that are also useful for external consumption. """ import cgi import codecs import collections import io import os import platform import re import sys import socket import struct import wa...
bsd-3-clause
Qalthos/ansible
test/units/modules/network/onyx/test_onyx_magp.py
52
4649
# # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type from units.compat.mock import patch from ansible.modules.network.onyx impor...
gpl-3.0
SlimRoms/kernel_sony_msm8974pro
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
wanglongqi/sympy
sympy/physics/mechanics/body.py
45
5982
from sympy import Symbol from sympy.physics.mechanics import (RigidBody, Particle, ReferenceFrame, inertia) from sympy.physics.vector import Point, Vector __all__ = ['Body'] class Body(RigidBody, Particle): """ Body is a common representation of RigidBody or a Particle. ...
bsd-3-clause
sanguinariojoe/FreeCAD
src/Mod/TechDraw/TDTest/DVAnnoSymImageTest.py
27
1959
#!/usr/bin/env python # -*- coding: utf-8 -*- # annotation & symbol test script for TechDraw module # creates a page, 1 annotation and import 1 symbol from __future__ import print_function import FreeCAD import Part import Measure import TechDraw import os def DVAnnoSymImageTest(): path = os.path.dirname(os.path...
lgpl-2.1
coffenbacher/askbot-devel
askbot/management/commands/askbot_import_jive.py
11
15324
from askbot import models from askbot.conf import settings as askbot_settings from askbot.utils.console import ProgressBar from askbot.utils.slug import slugify from askbot.utils.jive import JiveConverter from askbot.utils.jive import internal_link_re from askbot.utils.file_utils import make_file_name from bs4 import B...
gpl-3.0
sharma1nitish/phantomjs
src/breakpad/src/tools/gyp/test/builddir/gyptest-all.py
147
2358
#!/usr/bin/env python # Copyright (c) 2009 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. """ Verify the settings that cause a set of programs to be created in a specific build directory, and that no intermediate built files get c...
bsd-3-clause
selste/micropython
tests/extmod/vfs_userfs.py
5
1608
# test VFS functionality with a user-defined filesystem # also tests parts of uio.IOBase implementation import sys try: import uio uio.IOBase import uos uos.mount except (ImportError, AttributeError): print("SKIP") raise SystemExit class UserFile(uio.IOBase): def __init__(self, data): ...
mit
softlayer/softlayer-python
SoftLayer/CLI/vlan/list.py
2
1798
"""List VLANs.""" # :license: MIT, see LICENSE for more details. import click import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import formatting from SoftLayer.CLI.vlan.detail import get_gateway_firewall from SoftLayer import utils COLUMNS = ['id', 'number', 'name', ...
mit
beernarrd/gramps
gramps/plugins/export/exportftree.py
1
6827
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2003-2006, 2008 Donald N. Allingham # Copyright (C) 2008 Brian G. Matherly # Copyright (C) 2010 Jakim Friant # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
gpl-2.0
atodorov/lorax
src/composer/cli/cmdline.py
5
2346
# # Copyright (C) 2018 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 i...
gpl-2.0
rschnapka/odoo
addons/mail/tests/test_message_read.py
57
14622
# -*- 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
Denisolt/Tensorflow_Chat_Bot
local/lib/python2.7/site-packages/pip/_vendor/progress/__init__.py
916
3023
# Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE A...
gpl-3.0
Ayub-Khan/edx-platform
lms/djangoapps/lti_provider/signature_validator.py
129
8935
""" Subclass of oauthlib's RequestValidator that checks an OAuth signature. """ from oauthlib.oauth1 import SignatureOnlyEndpoint from oauthlib.oauth1 import RequestValidator class SignatureValidator(RequestValidator): """ Helper class that verifies the OAuth signature on a request. The pattern required...
agpl-3.0
iCarto/siga
extScripting/scripts/jython/console/jintrospect.py
1
5168
"""Extend introspect.py for Java based Jython classes.""" from introspect import * import string __author__ = "Don Coleman <dcoleman@chariotsolutions.com>" __cvsid__ = "$Id$" def getAutoCompleteList(command='', locals=None, includeMagic=1, includeSingle=1, includeDouble=1): """Return lis...
gpl-3.0
edunham/toys
utilities/packingblocks.py
1
2505
#! /usr/bin/env python # From IRC: # # "I was thinking about a toy idea for my kid to teach multiplication through # area representation. 2x3 is a two-inch-by-three-inch slab of something with # lines on it, etc. I'd need 45 pieces (since AxB = BxA, you can drop almost # half) but if I wanted to put it away in almos...
mit
fishscene/streamlink
src/streamlink/plugins/disney_de.py
3
1069
"""Plugin for Disney (Channel) Germany Supports: - http://video.disney.de/sehen/* - http://disneychannel.de/sehen/* - http://disneychannel.de/livestream """ import re from streamlink.plugin import Plugin from streamlink.plugin.api import http from streamlink.plugin.api.utils import parse_json from stream...
bsd-2-clause
dsajkl/123
common/djangoapps/student/management/tests/test_transfer_students.py
2
2501
""" Tests the transfer student management command """ from django.conf import settings from opaque_keys.edx import locator import unittest import ddt from student.management.commands import transfer_students from student.models import CourseEnrollment from student.tests.factories import UserFactory from xmodule.modules...
agpl-3.0
edx/lettuce
tests/integration/lib/Django-1.3/tests/modeltests/m2m_intermediary/tests.py
92
1251
from datetime import datetime from django.test import TestCase from models import Reporter, Article, Writer class M2MIntermediaryTests(TestCase): def test_intermeiary(self): r1 = Reporter.objects.create(first_name="John", last_name="Smith") r2 = Reporter.objects.create(first_name="Jane", last_na...
gpl-3.0
ddico/sale-workflow
sale_order_merge/models/sale_order_merge.py
9
8093
# coding: utf-8 # Copyright 2016 Opener B.V. - Stefan Rijnhart # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp import api, fields, models from openerp.exceptions import Warning as UserError from openerp.tools.translate import _ class SaleOrderMerge(models.TransientModel): _name = 'sal...
agpl-3.0
dangillet/cocos
cocos/layer/scrolling.py
2
16208
# ---------------------------------------------------------------------------- # cocos2d # Copyright (c) 2008-2012 Daniel Moisset, Ricardo Quesada, Rayentray Tappa, # Lucio Torre # Copyright (c) 2009-2015 Richard Jones, Claudio Canepa # All rights reserved. # # Redistribution and use in source and binary forms, with o...
bsd-3-clause
benspaulding/django
django/utils/encoding.py
6
7319
from __future__ import unicode_literals import urllib import locale import datetime import codecs from decimal import Decimal from django.utils.functional import Promise class DjangoUnicodeDecodeError(UnicodeDecodeError): def __init__(self, obj, *args): self.obj = obj UnicodeDecodeError.__init__(...
bsd-3-clause
GoogleChromeLabs/chromeos_smart_card_connector
third_party/googletest/src/googlemock/scripts/generator/cpp/keywords.py
19
1952
#!/usr/bin/env python # # Copyright 2007 Neal Norwitz # Portions Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
apache-2.0
OsirisSPS/osiris-sps
client/share/plugins/AF9A4C281070FDB0F34CF417CDB168AB38C8A388/lib/uu.py
251
6555
#! /usr/bin/env python # Copyright 1994 by Lance Ellinghouse # Cathedral City, California Republic, United States of America. # All Rights Reserved # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provide...
gpl-3.0
TangXT/GreatCatMOOC
common/lib/calc/calc/tests/test_calc.py
55
20805
""" Unit tests for calc.py """ import unittest import numpy import calc from pyparsing import ParseException # numpy's default behavior when it evaluates a function outside its domain # is to raise a warning (not an exception) which is then printed to STDOUT. # To prevent this from polluting the output of the tests, ...
agpl-3.0
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/oauth2_provider/views/application.py
3
2342
from django.core.urlresolvers import reverse_lazy from django.forms.models import modelform_factory from django.views.generic import CreateView, DetailView, DeleteView, ListView, UpdateView from braces.views import LoginRequiredMixin from ..models import get_application_model class ApplicationOwnerIsUserMixin(Login...
agpl-3.0
brainelectronics/towerdefense
_build/lib/pyglet/media/drivers/pulse/__init__.py
7
18560
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import sys import lib_pulseaudio as pa from pyglet.media import AbstractAudioDriver, AbstractAudioPlayer, \ AbstractListener, MediaException, MediaEvent import pyglet _debug = pyglet.options['debug_media'] def check(result...
bsd-3-clause
wlawski/libmots
tests/monkeyrunner-tests/t0037-shared-elem-avoid-long-press-landscape.py
1
1970
# # The MIT License (MIT) # # Copyright (c) 2014 Wiktor Lawski <wiktor.lawski@gmail.com> # # 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 th...
mit
makerbot/ReplicatorG
skein_engines/skeinforge-50/fabmetheus_utilities/geometry/manipulation_meta/_copy.py
12
2877
""" Boolean geometry copy. """ from __future__ import absolute_import #Init has to be imported first because it has code to workaround the python bug where relative imports don't work if the module is imported as a main module. import __init__ from fabmetheus_utilities.geometry.creation import lineation from fabmeth...
gpl-2.0
kevinge314gh/tornado
tornado/netutil.py
91
20028
#!/usr/bin/env python # # Copyright 2011 Facebook # # 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
RuiNascimento/krepo
script.module.lambdascrapers/lib/lambdascrapers/sources_notworking/lambdascrapers(11_9)/projectfree.py
3
3718
# -*- coding: utf-8 -*- ''' Yoda Add-on 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 version. This program ...
gpl-2.0
bjolivot/ansible
lib/ansible/modules/commands/script.py
44
2918
# This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that ...
gpl-3.0
Maplecroft/Magellan
magellan/deps_utils.py
1
36288
import os import operator from pkg_resources import parse_version from pkg_resources import resource_filename as pkg_res_resource_filename from pprint import pformat import requests import json import logging # from terminaltables import AsciiTable as OutputTableType from terminaltables import SingleTable as OutputTab...
mit
conates/my_site
frontend/templatetags/set_var.py
1
1670
from django import template register = template.Library() from backend.models import * slider_principal = WpPosts.objects.all().filter( post_status="publish", post_type="post", wptermrelationships__term_taxonomy__term__name="Slider Principal", ) slider_principal.filter(wppostmeta__meta_key__in=["data-icon","da...
apache-2.0
cheif/django-rest-framework
rest_framework/authtoken/models.py
81
1364
import binascii import os from django.conf import settings from django.db import models from django.utils.encoding import python_2_unicode_compatible # Prior to Django 1.5, the AUTH_USER_MODEL setting does not exist. # Note that we don't perform this code in the compat module due to # bug report #1297 # See: https://...
bsd-2-clause
jsoref/xbmc
lib/gtest/test/gtest_env_var_test.py
2408
3487
#!/usr/bin/env python # # Copyright 2008, 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...
gpl-2.0
wbc2010/django1.2.5
tests/regressiontests/queries/tests.py
38
67172
import datetime import pickle import sys import unittest from django.conf import settings from django.core.exceptions import FieldError from django.db import DatabaseError, connection, connections, DEFAULT_DB_ALIAS from django.db.models import Count from django.db.models.query import Q, ITER_CHUNK_SIZE, EmptyQuerySet ...
bsd-3-clause
ryanraaum/african-mtdna
popdata_sources/coelho2009/process.py
1
2502
from oldowan.mtconvert import seq2sites, sites2seq, str2sites from string import translate import pandas as pd import sys sys.path.append('../../scripts') from utils import * ## load metadata metadata = pd.read_csv('metadata.csv', index_col=0) regionparts = metadata.ix[0,'SeqRange'].split(';') region1 = range2region...
cc0-1.0
maximeolivier/pyCAF
pycaf/architecture/devices/server_features/file.py
1
2897
#| This file is part of pyCAF. | #| | #| pyCAF is free so...
gpl-3.0
dklempner/grpc
src/python/grpcio_tests/tests/unit/framework/foundation/stream_testing.py
23
2911
# Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
bsd-3-clause