repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
graphite/TeX4Web-INVENIO
modules/webjournal/lib/elements/bfe_webjournal_article_body.py
10
11114
#!/usr/bin/env python # -*- coding: utf-8 -*- ## This file is part of Invenio. ## Copyright (C) 2009, 2010, 2011 CERN. ## ## Invenio 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 ##...
gpl-2.0
tvpavan/twemproxy
tests/test_redis/test_mget_mset.py
4
6097
#!/usr/bin/env python #coding: utf-8 from common import * def test_mget_mset(kv=default_kv): r = getconn() def insert_by_pipeline(): pipe = r.pipeline(transaction=False) for k, v in kv.items(): pipe.set(k, v) pipe.execute() def insert_by_mset(): ret = r.mset(*...
apache-2.0
pekingduck/googletest
scripts/fuse_gtest_files.py
2577
8813
#!/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...
bsd-3-clause
MarcoVogt/basil
basil/TL/Serial.py
1
2662
# # ------------------------------------------------------------ # Copyright (c) All rights reserved # SiLab, Institute of Physics, University of Bonn # ------------------------------------------------------------ # import logging import serial from basil.TL.TransferLayer import TransferLayer class Serial(TransferL...
bsd-3-clause
RaumZeit/griffith
lib/plugins/imp/PersonalVideoDatabase.py
4
8307
# -*- coding: utf-8 -*- __revision__ = '$Id$' # Copyright (c) 2009 # 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
amenonsen/ansible
lib/ansible/modules/system/xfs_quota.py
37
12876
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Emmanouil Kampitakis <info@kampitakis.de> # Copyright: (c) 2018, William Leemans <willie@elaba.net> # 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_fun...
gpl-3.0
pkill-nine/qutebrowser
tests/unit/utils/test_jinja.py
2
4889
# Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # # This file is part of qutebrowser. # # qutebrowser 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 S...
gpl-3.0
Applied-GeoSolutions/geokit
variables/serializers.py
1
2888
from rest_framework import serializers from rest_framework.validators import UniqueValidator from variables.models import Variable, RasterRequest from variables.data import rpc_con from layers.models import Layer, LayerFile import django_rq import os from django.db import connection from django.conf import settings ...
gpl-2.0
ademmers/ansible
test/integration/targets/dict_transformations/library/convert_snake_case.py
29
1432
#!/usr/bin/python # -*- coding: utf-8 -*- # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' --- module: convert_snake_case short_description: test converting data to s...
gpl-3.0
alazaro/tennis_tournament
django/contrib/gis/tests/relatedapp/models.py
121
1715
from django.contrib.gis.db import models from django.contrib.localflavor.us.models import USStateField class Location(models.Model): point = models.PointField() objects = models.GeoManager() def __unicode__(self): return self.point.wkt class City(models.Model): name = models.CharField(max_length=50) ...
gpl-3.0
imaculate/scikit-learn
examples/mixture/plot_gmm_covariances.py
11
4723
""" =============== GMM covariances =============== Demonstration of several covariances types for Gaussian mixture models. See :ref:`gmm` for more information on the estimator. Although GMM are often used for clustering, we can compare the obtained clusters with the actual classes from the dataset. We initialize th...
bsd-3-clause
kingvuplus/PKT-gui2
lib/python/Components/FanControl.py
9
3985
import os from Components.config import config, ConfigSubList, ConfigSubsection, ConfigSlider from Tools.BoundFunction import boundFunction import NavigationInstance from enigma import iRecordableService from boxbranding import getBoxType class FanControl: # ATM there's only support for one fan def __init__(self):...
gpl-2.0
jreback/pandas
pandas/tests/groupby/test_groupby_subclass.py
2
2669
from datetime import datetime import numpy as np import pytest from pandas import DataFrame, Series import pandas._testing as tm @pytest.mark.parametrize( "obj", [ tm.SubclassedDataFrame({"A": np.arange(0, 10)}), tm.SubclassedSeries(np.arange(0, 10), name="A"), ], ) @pytest.mark.filterwa...
bsd-3-clause
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.6.0/Lib/test/test_syntax.py
2
19012
"""This module tests SyntaxErrors. Here's an example of the sort of thing that is tested. >>> def f(x): ... global x Traceback (most recent call last): SyntaxError: name 'x' is parameter and global The tests are all raise SyntaxErrors. They were created by checking each C call that raises SyntaxError. There ar...
mit
mihailignatenko/erp
addons/l10n_ro/res_partner.py
309
2255
# -*- encoding: utf-8 -*- ############################################################################## # # @author - Fekete Mihai <feketemihai@gmail.com> # Copyright (C) 2011 TOTAL PC SYSTEMS (http://www.www.erpsystems.ro). # Copyright (C) 2009 (<http://www.filsystem.ro>) # # This program is free softwa...
agpl-3.0
uchuugaka/anaconda
anaconda_lib/autopep/autopep8_lib/lib2to3/pgen2/conv.py
68
9642
# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Convert graminit.[ch] spit out by pgen to Python code. Pgen is the Python parser generator. It is useful to quickly create a parser from a grammar file in Python's grammar notation. But I don't wa...
gpl-3.0
jfantom/incubator-airflow
airflow/contrib/operators/gcs_to_gcs.py
7
3230
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
rossant/phy
phy/cluster/views/feature.py
2
14780
# -*- coding: utf-8 -*- """Feature view.""" # ----------------------------------------------------------------------------- # Imports # ----------------------------------------------------------------------------- import logging import re import numpy as np from six import u from phy.utils import Bunch from phy.u...
bsd-3-clause
twz915/django
tests/gis_tests/test_geoforms.py
10
16706
import json import re from django.contrib.gis import forms from django.contrib.gis.geos import GEOSGeometry from django.forms import ValidationError from django.test import SimpleTestCase, override_settings, skipUnlessDBFeature from django.test.utils import patch_logger from django.utils.html import escape @skipUnle...
bsd-3-clause
stevehof/CouchPotatoServer
couchpotato/core/settings.py
3
8380
from __future__ import with_statement import traceback import ConfigParser from hashlib import md5 from CodernityDB.hash_index import HashIndex from couchpotato.api import addApiView from couchpotato.core.event import addEvent, fireEvent from couchpotato.core.helpers.encoding import toUnicode from couchpotato.core.hel...
gpl-3.0
rtfd/readthedocs.org
readthedocs/rtd_tests/tests/test_integrations.py
1
6914
import django_dynamic_fixture as fixture from django.test import TestCase from rest_framework.test import APIClient from readthedocs.integrations.models import ( GitHubWebhook, HttpExchange, Integration, ) from readthedocs.projects.models import Project class HttpExchangeTests(TestCase): """ Tes...
mit
lmregus/Portfolio
python/design_patterns/env/lib/python3.7/site-packages/IPython/paths.py
4
4398
"""Find files and directories which IPython uses. """ import os.path import shutil import tempfile from warnings import warn import IPython from IPython.utils.importstring import import_item from IPython.utils.path import ( get_home_dir, get_xdg_dir, get_xdg_cache_dir, compress_user, _writable_dir, ensure_dir_...
mit
flightgong/scikit-learn
sklearn/utils/graph.py
50
6169
""" Graph utilities and algorithms Graphs are represented with their adjacency matrices, preferably using sparse matrices. """ # Authors: Aric Hagberg <hagberg@lanl.gov> # Gael Varoquaux <gael.varoquaux@normalesup.org> # Jake Vanderplas <vanderplas@astro.washington.edu> # License: BSD 3 clause impo...
bsd-3-clause
jabesq/home-assistant
tests/testing_config/custom_components/test/image_processing.py
15
1431
"""Provide a mock image processing.""" from homeassistant.components.image_processing import ImageProcessingEntity async def async_setup_platform(hass, config, async_add_entities_callback, discovery_info=None): """Set up the test image_processing platform.""" async_add_entities...
apache-2.0
dbertha/odoo
addons/mail/mail_group_menu.py
334
2631
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
AccelAI/accel.ai
flask-aws/lib/python2.7/site-packages/jinja2/testsuite/inheritance.py
414
8248
# -*- coding: utf-8 -*- """ jinja2.testsuite.inheritance ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the template inheritance feature. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import unittest from jinja2.testsuite import JinjaTestCase from jinja2 import Env...
mit
Alzon/senlin
senlin/drivers/openstack/ceilometer_v2.py
2
1773
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed unde...
apache-2.0
Buggaarde/youtube-dl
youtube_dl/extractor/varzesh3.py
120
1696
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class Varzesh3IE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?video\.varzesh3\.com/(?:[^/]+/)+(?P<id>[^/]+)/?' _TEST = { 'url': 'http://video.varzesh3.com/germany/bundesliga/5-%D9%88%D8%A7%DA%A9%D9%86%D8%B4...
unlicense
stshine/servo
tests/wpt/css-tests/css-text-3_dev/xhtml1/reference/support/generate-segment-break-transformation-rules-tests.py
324
4862
#!/usr/bin/env python # - * - coding: UTF-8 - * - """ This script generates tests segment-break-transformation-rules-001 ~ 049 which cover all possible combinations of characters at two sides of segment breaks. More specifically, there are seven types of characters involve in these rules: 1. East Asian Full-width (F)...
mpl-2.0
rakeshmi/cinder
cinder/tests/unit/volume/drivers/netapp/dataontap/test_nfs_cmode.py
1
2440
# Copyright (c) 2014 Andrew Kerr. All rights reserved. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
apache-2.0
pothosware/gnuradio
gr-pager/python/pager/qa_pager.py
57
1084
#!/usr/bin/env python # # Copyright 2004,2006,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # # 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 ...
gpl-3.0
overtherain/scriptfile
software/googleAppEngine/lib/django_1_2/django/forms/util.py
311
1983
from django.utils.html import conditional_escape from django.utils.encoding import StrAndUnicode, force_unicode from django.utils.safestring import mark_safe # Import ValidationError so that it can be imported from this # module to maintain backwards compatibility. from django.core.exceptions import ValidationError d...
mit
alheinecke/tensorflow-xsmm
tensorflow/contrib/tensor_forest/python/tensor_forest.py
46
40039
# 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
git001/openshift-ansible
utils/src/ooinstall/variants.py
3
2650
# TODO: Temporarily disabled due to importing old code into openshift-ansible # repo. We will work on these over time. # pylint: disable=bad-continuation,missing-docstring,no-self-use,invalid-name,too-few-public-methods """ Defines the supported variants and versions the installer supports, and metadata required to ru...
apache-2.0
jaliste/sanaviron.gtk-3
sanaviron/objects/__init__.py
2
6486
#!/usr/bin/python # -*- coding: utf-8 -*- __all__ = ['NONE', 'NORTHWEST', 'NORTH', 'NORTHEAST', 'WEST', 'EAST', 'SOUTHWEST', 'SOUTH', 'SOUTHEAST', 'ANONIMOUS', 'MANUAL', 'AUTOMATIC', 'COLOR', 'GRADIENT', 'PATTERN', 'LINEAR', 'RADIAL', 'HORIZONTAL', 'VERTICAL', 'BOTH', 'CENTIMETERS', 'MILLIMETERS'...
apache-2.0
micmn/shogun
src/.scrub_docstrings.py
35
1162
#!/usr/bin/env python import sys import os # has to be ordered tuple REPLACEMENTS=[ [' float64_t', ' float'], [' float32_t', ' float'], [' float128_t', ' float'], [' double', ' float'], [' int32_t', ' int'], [' uint32_t', ' int'], [' int64_t', ' int'], [' uint64_t', ' int'], [' uint8_t', ' int'], [' int16_...
gpl-3.0
blxd/livestreamer
examples/gst-player.py
22
3897
#!/usr/bin/env python from __future__ import print_function import sys import gi from gi.repository import GObject as gobject, Gst as gst from livestreamer import Livestreamer, StreamError, PluginError, NoPluginError def exit(msg): print(msg, file=sys.stderr) sys.exit() class LivestreamerPlayer(object):...
bsd-2-clause
xbmc/atv2
xbmc/lib/libPython/Python/Tools/pynche/Switchboard.py
101
4817
"""Switchboard class. This class is used to coordinate updates among all Viewers. Every Viewer must conform to the following interface: - it must include a method called update_yourself() which takes three arguments; the red, green, and blue values of the selected color. - When a Viewer selects a colo...
gpl-2.0
liorvh/golismero
thirdparty_libs/django/templatetags/tz.py
114
5523
from datetime import datetime, tzinfo try: import pytz except ImportError: pytz = None from django.template import Node from django.template import TemplateSyntaxError, Library from django.utils import six from django.utils import timezone register = Library() # HACK: datetime is an old-style class, create...
gpl-2.0
todaychi/hue
desktop/core/ext-py/Django-1.6.10/tests/requests/tests.py
47
31824
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import time import warnings from datetime import datetime, timedelta from io import BytesIO from django.db import connection, connections, DEFAULT_DB_ALIAS from django.core import signals from django.core.exceptions import SuspiciousOperation from djan...
apache-2.0
vladikr/nova_drafts
nova/tests/virt/vmwareapi/stubs.py
9
4327
# Copyright (c) 2011 Citrix Systems, Inc. # Copyright 2011 OpenStack Foundation # # 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
DaveA50/lbry
lbrynet/dht/encoding.py
1
5616
#!/usr/bin/env python # # This library is free software, distributed under the terms of # the GNU Lesser General Public License Version 3, or any later version. # See the COPYING file included in this archive # # The docstrings in this module contain epytext markup; API documentation # may be created by processing this...
mit
KelSolaar/sIBL_GUI
sibl_gui/resources/patches/002_migrate_4-x-x_to_4-0-2.py
1
1547
#!/usr/bin/env python # -*- coding: utf-8 -*- """ **002_migrate_4-x-x_to_4-0-2.py** **Platform:** Windows, Linux, Mac Os X. **Description:** Migrates sIBL_GUI from 4.x.x to 4.0.2. **Others:** """ from __future__ import unicode_literals import os import foundations.common import foundations.core import f...
gpl-3.0
huaweiswitch/neutron
neutron/plugins/cisco/cfg_agent/service_helpers/routing_svc_helper.py
7
27896
# Copyright 2014 Cisco Systems, 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 requir...
apache-2.0
AlexCaranha/Wox
PythonHome/Lib/site-packages/chardet/langcyrillicmodel.py
2762
17725
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
mit
4Quant/tensorflow
tensorflow/python/framework/tensor_util.py
4
20042
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
ytjiang/django
django/db/transaction.py
98
12277
from django.db import ( DEFAULT_DB_ALIAS, DatabaseError, Error, ProgrammingError, connections, ) from django.utils.decorators import ContextDecorator class TransactionManagementError(ProgrammingError): """ This exception is thrown when transaction management is used improperly. """ pass def get_...
bsd-3-clause
desecho/movies
src/moviesapp/tests/test_list.py
1
2330
from django.urls import reverse from moviesapp.models import List, Movie from .base import BaseTestLoginCase class AddMoviesTestCase(BaseTestLoginCase): """ Test Add Movies. Dumpdata commands: manage dumpdata moviesapp.Movie --indent 2 > moviesapp/fixtures/movies.json manage dumpdata moviesapp....
mit
GuillaumeGomez/servo
components/style/counter_style/update_predefined.py
47
1042
#!/usr/bin/env python # 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.path import re import urllib def main(filename): names = [ re.search('...
mpl-2.0
betoesquivel/fil2014
filenv/lib/python2.7/site-packages/django/contrib/gis/maps/google/__init__.py
603
2648
""" This module houses the GoogleMap object, used for generating the needed javascript to embed Google Maps in a Web page. Google(R) is a registered trademark of Google, Inc. of Mountain View, California. Example: * In the view: return render_to_response('template.html', {'google' : GoogleMap(key="...
mit
devsar/ae-people
libs/djangoflash/storage/session.py
3
1251
# -*- coding: utf-8 -*- """This module provides a session-based flash storage backend. Since this backend relies on the user's session, you need to include the :class:`SessionMiddleware` class to the ``MIDDLEWARE_CLASSES`` section of your project's ``settings.py`` file:: MIDDLEWARE_CLASSES = ( 'django.co...
apache-2.0
pombreda/mic
mic/3rdparty/pykickstart/base.py
14
19768
# # Chris Lumens <clumens@redhat.com> # # Copyright 2006, 2007, 2008 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hope that it # ...
gpl-2.0
alhashash/odoo
addons/edi/models/edi.py
7
31864
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011-2014 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
agpl-3.0
ludmilamarian/invenio
invenio/modules/knowledge/upgrades/knowledge_2015_07_14_innodb.py
2
1529
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015 CERN. # # Invenio 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...
gpl-2.0
JshWright/home-assistant
homeassistant/components/sensor/nest.py
17
5502
""" Support for Nest Thermostat Sensors. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.nest/ """ from itertools import chain import logging from homeassistant.components.nest import DATA_NEST from homeassistant.helpers.entity import Entity from ...
apache-2.0
jjconti/nikola
setup.py
2
5518
#!/usr/bin/env python # Don't use __future__ in this script, it breaks buildout # from __future__ import print_function import os import subprocess import sys import shutil from setuptools import setup, find_packages from setuptools.command.install import install from setuptools.command.test import test as TestCommand...
mit
SickGear/SickGear
lib/rtorrent/torrent.py
2
23063
# Copyright (c) 2013 Chris Lucas, <chris@chrisjlucas.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 the rights to use, copy, modify, ...
gpl-3.0
shakamunyi/tensorflow
tensorflow/contrib/metrics/python/ops/metric_ops.py
2
130487
# 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
SatoshiNXSimudrone/sl4a-damon-clone
python/src/Lib/test/test_anydbm.py
99
2215
#! /usr/bin/env python """Test script for the anydbm module based on testdumbdbm.py """ import os import unittest import anydbm import glob from test import test_support _fname = test_support.TESTFN def _delete_files(): # we don't know the precise name the underlying database uses # so we use glob to loca...
apache-2.0
dancingdan/tensorflow
tensorflow/python/ops/manip_ops.py
2
1323
# 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
flacjacket/sympy
sympy/physics/quantum/piab.py
2
1703
"""1D quantum particle in a box.""" from sympy import Symbol, pi, sqrt, sin, Interval, S from sympy.physics.quantum.operator import HermitianOperator from sympy.physics.quantum.state import Ket, Bra from sympy.physics.quantum.constants import hbar from sympy.functions.special.tensor_functions import KroneckerDelta fr...
bsd-3-clause
rdhyee/PyTables
tables/path.py
3
6899
# -*- coding: utf-8 -*- ######################################################################## # # License: BSD # Created: January 15, 2007 # Author: Ivan Vilata i Balaguer - ivan at selidor dot net # # $Id$ # ######################################################################## """Functionality related with no...
bsd-3-clause
epssy/hue
desktop/core/ext-py/thrift-0.9.1/src/TMultiplexedProcessor.py
146
2236
# # 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
jdugge/QGIS
tests/src/python/test_provider_wfs.py
1
229592
# -*- coding: utf-8 -*- """QGIS Unit tests for the WFS provider. .. 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
mozilla/olympia
src/olympia/users/admin.py
2
17361
import functools from django import http from django.contrib import admin, messages from django.contrib.admin.utils import unquote from django.db.models import Count, Q from django.db.utils import IntegrityError from django.http import ( Http404, HttpResponseForbidden, HttpResponseNotAllowed, HttpRespo...
bsd-3-clause
mekkablue/Glyphs-Scripts
Components/New Tab with Orphaned Components.py
1
1372
#MenuTitle: New Tab with Orphaned Components # -*- coding: utf-8 -*- from __future__ import division, print_function, unicode_literals __doc__=""" Opens a new tab in the current font window containing all glyphs (of the current master) that have components that point to non-existent glyphs, i.e., no base glyphs. """ t...
apache-2.0
michalliu/OpenWrt-Firefly-Libraries
staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python2.7/string.py
18
20517
"""A collection of string operations (most are no longer used). Warning: most of the code you see here isn't normally used nowadays. Beginning with Python 1.6, many of these functions are implemented as methods on the standard string object. They used to be implemented by a built-in module called strop, but strop is n...
gpl-2.0
Javierma/OctoPrint-TFG
tests/filemanager/test_filemanager.py
6
20631
# 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 OctoPrint Project - Released under terms of the AGPLv3 License" import io import unittest i...
agpl-3.0
jotes/moto
tests/test_ec2/test_instances.py
4
30267
from __future__ import unicode_literals # Ensure 'assert_raises' context manager support for Python 2.6 import tests.backport_assert_raises from nose.tools import assert_raises import base64 import datetime import boto from boto.ec2.instance import Reservation, InstanceAttribute from boto.exception import EC2Response...
apache-2.0
datenbetrieb/odoo
addons/crm_helpdesk/crm_helpdesk.py
182
7480
# -*- 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
rogerhu/django
tests/custom_pk/models.py
38
1260
# -*- coding: utf-8 -*- """ 14. Using a custom primary key By default, Django adds an ``"id"`` field to each model. But you can override this behavior by explicitly adding ``primary_key=True`` to a field. """ from __future__ import unicode_literals from django.db import models from .fields import MyAutoField from d...
bsd-3-clause
bopo/django-allauth
allauth/socialaccount/providers/xing/views.py
65
1258
import json from allauth.socialaccount.providers.oauth.client import OAuth from allauth.socialaccount.providers.oauth.views import (OAuthAdapter, OAuthLoginView, OAuthCallbackView) from .provider import X...
mit
NorThanapon/dict-definition
definition/preprocess/tokenize.py
1
1224
import argparse from nltk.tokenize import StanfordTokenizer aparser = argparse.ArgumentParser( description="Run CoreNLP tokenizer on a TSV definition file") aparser.add_argument( 'input_filepath', type=str, help='input file path') aparser.add_argument( 'output_filepath', type=str, help='output file path')...
gpl-3.0
tmtowtdi/MontyLacuna
lib/lacuna/buildings/callable/archaeology.py
1
4990
import lacuna.bc import lacuna.building import lacuna.glyph import lacuna.resource import lacuna.ship class archaeology(lacuna.building.MyBuilding): """ Archaeology Ministry The archaeology ministry will contain an attribute 'work' if and only if it is currently searching ore for a glyph. That attribu...
mit
maxamillion/ansible-modules-extras
cloud/ovirt/ovirt_auth.py
18
8238
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or #...
gpl-3.0
savoirfairelinux/OpenUpgrade
addons/l10n_in/__init__.py
702
1046
# -*- 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
talexop/talexop_kernel_i9505_4.3
tools/perf/python/twatch.py
7370
1334
#! /usr/bin/python # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface # Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com> # # This application is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License...
gpl-2.0
badpass/ansible-modules-core
files/xattr.py
134
6197
#!/usr/bin/python # 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...
gpl-3.0
JonathanBennett/marathon-metric-forwarder
node_modules/node-gyp/gyp/pylib/gyp/__init__.py
1524
22178
#!/usr/bin/env python # Copyright (c) 2012 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. import copy import gyp.input import optparse import os.path import re import shlex import sys import traceback from gyp.common import GypErr...
mit
HerlanAssis/Django-AulaOsvandoSantana
lib/python2.7/site-packages/django/core/management/commands/dumpdata.py
82
8474
import warnings from collections import OrderedDict from django.apps import apps from django.core import serializers from django.core.management.base import BaseCommand, CommandError from django.db import DEFAULT_DB_ALIAS, router from django.utils.deprecation import RemovedInDjango19Warning class Command(BaseCommand...
mit
dbrgn/pygments-mirror
pygments/__init__.py
269
2974
# -*- coding: utf-8 -*- """ Pygments ~~~~~~~~ Pygments is a syntax highlighting package written in Python. It is a generic syntax highlighter for general use in all kinds of software such as forum systems, wikis or other applications that need to prettify source code. Highlights are: * a ...
bsd-2-clause
40223225/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/urllib/parse.py
735
35170
"""Parse (absolute and relative) URLs. urlparse module is based upon the following RFC specifications. RFC 3986 (STD66): "Uniform Resource Identifiers" by T. Berners-Lee, R. Fielding and L. Masinter, January 2005. RFC 2732 : "Format for Literal IPv6 Addresses in URL's by R.Hinden, B.Carpenter and L.Masinter, Decemb...
gpl-3.0
h4ck3rm1k3/orca-sonar
src/orca/scripts/apps/Instantbird/script_utilities.py
6
4120
# Orca # # Copyright 2010 Joanmarie Diggs. # # 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 option) any later version. # # This library i...
lgpl-2.1
mickele77/FreeCAD
src/Mod/Fem/_CommandMechanicalShowResult.py
1
3262
#*************************************************************************** #* * #* Copyright (c) 2013-2015 - Juergen Riegel <FreeCAD@juergen-riegel.net> * #* * #* This pr...
lgpl-2.1
TLemur/freq-bot
src/plugins/info/static.py
1
2895
#!/usr/bin/env python # -*- coding: utf8 -*- #~####################################################################### #~ Copyright (c) 2008 Burdakov Daniel <kreved@kreved.org> # #~ # #~ This file is part of FreQ-bot. ...
gpl-3.0
endlessm/chromium-browser
tools/swarming_client/tools/swarming_load_test_client.py
1
9331
#!/usr/bin/env python # Copyright 2013 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. """Triggers a ton of fake jobs to test its handling under high load. Generates an histogram with the latencies to process t...
bsd-3-clause
fkorotkov/pants
contrib/errorprone/tests/python/pants_test/contrib/errorprone/tasks/test_errorprone_integration.py
6
4588
# coding=utf-8 # Copyright 2017 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants_test.pant...
apache-2.0
rahuldhote/odoo
openerp/tools/config.py
178
36937
#openerp.loggers.handlers. -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>). # # This program...
agpl-3.0
one2pret/winsys
winsys/tests/test_security.py
1
15237
from __future__ import with_statement import os, sys import contextlib import tempfile import unittest as unittest0 try: unittest0.skipUnless unittest0.skip except AttributeError: import unittest2 as unittest else: unittest = unittest0 del unittest0 import uuid import winerror import win32api ...
mit
scripteed/mtasa-blue
vendor/google-breakpad/src/tools/gyp/pylib/gyp/generator/msvs.py
37
125839
# Copyright (c) 2012 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. import collections import copy import ntpath import os import posixpath import re import subprocess import sys import gyp.common import gyp.easy_xml as easy_xml i...
gpl-3.0
matsumoto-r/synciga
src/third_party/protobuf/descriptor_pb2.py
193
48695
# Generated by the protocol buffer compiler. DO NOT EDIT! from google.protobuf import descriptor from google.protobuf import message from google.protobuf import reflection # @@protoc_insertion_point(imports) DESCRIPTOR = descriptor.FileDescriptor( name='google/protobuf/descriptor.proto', package='google.protobu...
bsd-3-clause
younseunghyun/smart-memorizer
smartmemorizer/user/models.py
1
2180
# -*- coding: utf-8 -*- """User models.""" import datetime as dt from flask_login import UserMixin from smartmemorizer.database import Column, Model, SurrogatePK, db, reference_col, relationship from smartmemorizer.extensions import bcrypt class Role(SurrogatePK, Model): """A role for a user.""" __tablenam...
bsd-3-clause
WafaaT/spark-tk
regression-tests/sparktkregtests/testcases/scoretests/arimax_test.py
12
5754
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel Corporation  # # 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 require...
apache-2.0
mydongistiny/android_external_skia
platform_tools/android/tests/makefile_writer_tests.py
67
7198
#!/usr/bin/python # Copyright 2014 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Test makefile_writer.py """ import argparse import os import shutil import sys import tempfile import test_variables import unittest import utils sys.path.append...
bsd-3-clause
schambers/civmarket
civmarket/lib/python2.7/site-packages/django/conf/locale/hr/formats.py
118
2068
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. E Y.' TIME_FORMAT = 'H:i:s' DA...
apache-2.0
GlenDC/hjson-c
doc/ext/refcounting.py
17
1715
""" refcounting ~~~~~~~~~~~ Reference count annotations for C API functions. Has the same result as the sphinx.ext.refcounting extension but works for all functions regardless of the signature, and the reference counting information is written inline with the documentation instead of a sepa...
mit
MERegistro/meregistro
django/templatetags/cache.py
309
2406
from django.template import Library, Node, TemplateSyntaxError, Variable, VariableDoesNotExist from django.template import resolve_variable from django.core.cache import cache from django.utils.encoding import force_unicode from django.utils.http import urlquote from django.utils.hashcompat import md5_constructor regi...
bsd-3-clause
Tim---/scapy-tetra
scapy_tetra/mac.py
1
3545
#!/usr/bin/env python # MAC PDUs without the type fields (see mac_types.py) from scapy.packet import Packet, bind_layers from scapy.fields import BitField, ConditionalField from .gsmtap import GSMTAP from .mac_type import MAC_UL, MAC_DL, MAC_SCH_HU # Tables 338/339 class ACCESS_ASSIGN(Packet): name = 'ACCESS-AS...
gpl-2.0
public-ink/public-ink
server/appengine/lib/numpy/linalg/tests/test_linalg.py
12
59948
""" Test functions for linalg module """ from __future__ import division, absolute_import, print_function import os import sys import itertools import traceback import warnings import numpy as np from numpy import array, single, double, csingle, cdouble, dot, identity from numpy import multiply, atleast_2d, inf, asa...
gpl-3.0
FireWRT/OpenWrt-Firefly-Libraries
staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python2.7/macpath.py
17
6255
"""Pathname and path-related operations for the Macintosh.""" import os import warnings from stat import * import genericpath from genericpath import * __all__ = ["normcase","isabs","join","splitdrive","split","splitext", "basename","dirname","commonprefix","getsize","getmtime", "getatime","getc...
gpl-2.0