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
daspots/dasapp
lib/oauthlib/oauth2/rfc6749/endpoints/revocation.py
9
5796
# -*- coding: utf-8 -*- """ oauthlib.oauth2.rfc6749.endpoint.revocation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ An implementation of the OAuth 2 `Token Revocation`_ spec (draft 11). .. _`Token Revocation`: http://tools.ietf.org/html/draft-ietf-oauth-revocation-11 """ from __future__ import absolute_import, unicod...
mit
maheshp/novatest
nova/tests/api/openstack/compute/contrib/test_security_groups.py
1
62489
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation # Copyright 2012 Justin Santa Barbara # # 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 # # h...
apache-2.0
cuilishen/cuilishenMissionPlanner
Lib/fnmatch.py
324
3239
"""Filename matching with shell patterns. fnmatch(FILENAME, PATTERN) matches according to the local convention. fnmatchcase(FILENAME, PATTERN) always takes case in account. The functions operate by translating the pattern into a regular expression. They cache the compiled regular expressions for speed. The function...
gpl-3.0
mockjs/mockjs.github.com
0.2.0-alpha1/bower_components/js-beautify/python/cssbeautifier/__init__.py
3
14029
from __future__ import print_function import sys import re from cssbeautifier.__version__ import __version__ # # The MIT License (MIT) # Copyright (c) 2013 Einar Lielmanis and contributors. # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation ...
mit
relateiq/avro
lang/py/test/av_bench.py
22
2175
#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "L...
apache-2.0
hbrunn/OpenUpgrade
addons/crm_profiling/__init__.py
438
1089
# -*- 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
fpy171/django
tests/null_fk_ordering/tests.py
381
2012
from __future__ import unicode_literals from django.test import TestCase from .models import Article, Author, Comment, Forum, Post, SystemInfo class NullFkOrderingTests(TestCase): def test_ordering_across_null_fk(self): """ Regression test for #7512 ordering across nullable Foreign Key...
bsd-3-clause
bombilee/pywinauto
pywinauto/clipboard.py
15
4134
# GUI Application automation and testing library # Copyright (C) 2006 Mark Mc Mahon # # 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 you...
lgpl-2.1
supertoast/kernel-2.6.38.6-U8815-Gingerbread
tools/perf/scripts/python/futex-contention.py
11261
1486
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
gpl-2.0
mcking49/apache-flask
Python/Lib/site-packages/pip/req/req_set.py
79
32764
from __future__ import absolute_import from collections import defaultdict from itertools import chain import logging import os from pip._vendor import pkg_resources from pip._vendor import requests from pip.compat import expanduser from pip.download import (is_file_url, is_dir_url, is_vcs_url, url_to_path, ...
mit
tomachalek/kontext
lib/templating/__init__.py
1
4282
# Copyright (c) 2015 Charles University in Prague, Faculty of Arts, # Institute of the Czech National Corpus # Copyright (c) 2015 Tomas Machalek <tomas.machalek@gmail.com> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License #...
gpl-2.0
cbandera/click
click/_textwrap.py
282
1198
import textwrap from contextlib import contextmanager class TextWrapper(textwrap.TextWrapper): def _handle_long_word(self, reversed_chunks, cur_line, cur_len, width): space_left = max(width - cur_len, 1) if self.break_long_words: last = reversed_chunks[-1] cut = last[:spa...
bsd-3-clause
rishabh1b/808XMidtermProject
vendor/googletest/googletest/test/gtest_filter_unittest.py
364
21325
#!/usr/bin/env python # # Copyright 2005 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...
mit
nvoron23/hue
desktop/core/ext-py/kazoo-2.0/kazoo/protocol/connection.py
5
24674
"""Zookeeper Protocol Connection Handler""" import logging import os import random import select import socket import sys import time from binascii import hexlify from contextlib import contextmanager from kazoo.exceptions import ( AuthFailedError, ConnectionDropped, EXCEPTIONS, SessionExpiredError, ...
apache-2.0
dionysiac-endeavors/bacch
bacch/translators/latex.py
2
11172
import re import roman from docutils import nodes from docutils.nodes import NodeVisitor from sphinx.writers.latex import LaTeXTranslator from ..log import BacchLogger # Title Formatter class TitleFormat(BacchLogger): def __init__(self): self.init_logger() def fetch_formats(self): text = [] ...
bsd-3-clause
mlavin/django
tests/model_meta/tests.py
50
12216
from django.apps import apps from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.core.exceptions import FieldDoesNotExist from django.db.models.fields import CharField, Field, related from django.db.models.options import EMPTY_RELATION_TREE, IMMUTABLE_WARNING from djan...
bsd-3-clause
juhnowski/FishingRod
production/pygsl-0.9.5/examples/chebyshev.py
1
1245
#!/usr/bin/env python # Author : Pierre Schnizer """ The geometric function is described using a chebyshev series with 6 terms. It will print the results to stdout. I have to find the paper describing this application. """ from pygsl import chebyshev from pygsl import _numobj as numx def run(): # The geometric ...
mit
havt/odoo
addons/analytic_user_function/__init__.py
441
1086
# -*- 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
orlenko/plei
mezzanine/accounts/forms.py
1
8900
from django.contrib.auth import authenticate from django.db.models import Q from django import forms from django.utils.translation import ugettext_lazy as _ from mezzanine.accounts import get_profile_model, get_profile_user_fieldname from mezzanine.conf import settings from mezzanine.core.forms import Html5Mixin from...
bsd-2-clause
illicitonion/givabit
lib/sdks/google_appengine_1.7.1/google_appengine/lib/django_1_2/django/contrib/gis/gdal/prototypes/ds.py
311
4244
""" This module houses the ctypes function prototypes for OGR DataSource related data structures. OGR_Dr_*, OGR_DS_*, OGR_L_*, OGR_F_*, OGR_Fld_* routines are relevant here. """ from ctypes import c_char_p, c_double, c_int, c_long, c_void_p, POINTER from django.contrib.gis.gdal.envelope import OGREnvelope from djan...
apache-2.0
lekston/ardupilot
Tools/autotest/param_metadata/wikiemit.py
10
3035
#!/usr/bin/env python import re from emit import Emit from param import known_param_fields, known_units # Emit docs in a form acceptable to the APM wiki site class WikiEmit(Emit): def __init__(self): Emit.__init__(self) wiki_fname = 'Parameters.wiki' self.f = open(wiki_fname, mode='w') ...
gpl-3.0
it-znu-dev/timetable
vendor/bower-asset/bootstrap/test-infra/s3_cache.py
2166
5734
#!/usr/bin/env python2.7 # pylint: disable=C0301 from __future__ import absolute_import, unicode_literals, print_function, division from sys import argv from os import environ, stat, chdir, remove as _delete_file from os.path import dirname, basename, abspath, realpath, expandvars from hashlib import sha256 from subpr...
bsd-3-clause
saydulk/django
django/conf/locale/zh_Hant/formats.py
1008
1810
# -*- 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 = 'Y年n月j日' # 2016年9月5...
bsd-3-clause
blebo/lightblue-0.4
build/lib/lightblue/_bluetoothsockets.py
36
36645
# Copyright (c) 2009 Bea Lam. All rights reserved. # # This file is part of LightBlue. # # LightBlue 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 l...
gpl-3.0
traveloka/ansible
lib/ansible/modules/notification/telegram.py
32
2804
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Artem Feofanov <artem.feofanov@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...
gpl-3.0
rorasa/KeeTerm
Crypto/Random/_UserFriendlyRNG.py
111
7629
# -*- coding: utf-8 -*- # # Random/_UserFriendlyRNG.py : A user-friendly random number generator # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that ...
mit
2014cdag5/2014cdag5
wsgi/static/Brython2.1.0-20140419-113919/Lib/socket.py
730
14913
# Wrapper module for _socket, providing some additional facilities # implemented in Python. """\ This module provides socket operations and some related functions. On Unix, it supports IP (Internet Protocol) and Unix domain sockets. On other systems, it only supports IP. Functions specific for a socket are available a...
gpl-2.0
tkajtoch/python-social-auth
social/tests/models.py
49
5480
import base64 from social.storage.base import UserMixin, NonceMixin, AssociationMixin, \ CodeMixin, BaseStorage class BaseModel(object): @classmethod def next_id(cls): cls.NEXT_ID += 1 return cls.NEXT_ID - 1 @classmethod def get(cls, key): return cls.cache.get(key) @...
bsd-3-clause
B3AU/waveTree
sklearn/feature_extraction/hashing.py
29
5648
# Author: Lars Buitinck <L.J.Buitinck@uva.nl> # License: BSD 3 clause import numbers import numpy as np import scipy.sparse as sp from . import _hashing from ..base import BaseEstimator, TransformerMixin def _iteritems(d): """Like d.iteritems, but accepts any collections.Mapping.""" return d.iteritems() if...
bsd-3-clause
maxkoryukov/headphones
lib/requests/packages/urllib3/connectionpool.py
62
31251
import errno import logging import sys import warnings from socket import error as SocketError, timeout as SocketTimeout import socket try: # Python 3 from queue import LifoQueue, Empty, Full except ImportError: from Queue import LifoQueue, Empty, Full import Queue as _ # Platform-specific: Windows fr...
gpl-3.0
Omegaphora/external_chromium_org
tools/telemetry/telemetry/core/backends/chrome/inspector_runtime_unittest.py
29
2900
# Copyright 2013 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. from telemetry.core import exceptions from telemetry.core import util from telemetry.unittest import tab_test_case class InspectorRuntimeTest(tab_test_case...
bsd-3-clause
ionutcipriananescu/python
burness/0007/Program_lines_stat.py
38
2401
#-*- coding: utf-8 -*- ''' 123123 123 ''' # 统计包括c/c++,python程序代码行、注释行 # 建字典,保存对应的程序语言和后缀、单行注释符、多行注释符 import pdb # 扩展其他程序可以在这里加入 lan_postfix={'python':'.py','c':'.c'} lan_comment={'python':'#','c':'//'} # 解决多行注释 如python中的''' multi_comment_start={'python':'\'\'\'','c':'/*'} multi_comment_end={'python':'\'\'\'','c':'*/'...
mit
jicruz/heroku-bot
lib/nacl/bindings/crypto_scalarmult.py
17
1579
# Copyright 2013 Donald Stufft and individual contributors # # 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...
gpl-3.0
Shoshin23/FTT
main.py
1
1604
from flask import Flask, render_template,request,redirect from utils import * #import shit from the utils file. import json import os app = Flask(__name__, static_folder='templates') @app.route('/',methods=['GET','POST']) #index. def index(): return render_template('index.html') @app.route('/result',methods=['...
mit
sander76/home-assistant
tests/components/openalpr_local/test_image_processing.py
8
5022
"""The tests for the openalpr local platform.""" from unittest.mock import MagicMock, PropertyMock, patch import homeassistant.components.image_processing as ip from homeassistant.const import ATTR_ENTITY_PICTURE from homeassistant.core import callback from homeassistant.setup import setup_component from tests.common...
apache-2.0
yunfeilu/scikit-learn
sklearn/gaussian_process/tests/test_gaussian_process.py
267
6813
""" Testing for Gaussian Process module (sklearn.gaussian_process) """ # Author: Vincent Dubourg <vincent.dubourg@gmail.com> # Licence: BSD 3 clause from nose.tools import raises from nose.tools import assert_true import numpy as np from sklearn.gaussian_process import GaussianProcess from sklearn.gaussian_process ...
bsd-3-clause
edevil/django
tests/test_client/views.py
25
10675
from xml.dom.minidom import parseString from django.contrib.auth.decorators import login_required, permission_required from django.core import mail from django.forms import fields from django.forms.forms import Form, ValidationError from django.forms.formsets import formset_factory, BaseFormSet from django.http import...
bsd-3-clause
grupoprog3/proyecto_final
Entrega Final/flask/Lib/encodings/cp1006.py
272
13568
""" Python Character Mapping Codec cp1006 generated from 'MAPPINGS/VENDORS/MISC/CP1006.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
hanlind/nova
nova/objects/build_request.py
1
19584
# 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 # d...
apache-2.0
drawks/ansible
lib/ansible/modules/network/cloudengine/ce_sflow.py
32
51332
#!/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 distribut...
gpl-3.0
xlk521/cloudguantou
django/core/management/sql.py
229
8259
import os import re from django.conf import settings from django.core.management.base import CommandError from django.db import models from django.db.models import get_models def sql_create(app, style, connection): "Returns a list of the CREATE TABLE SQL statements for the given app." if connection.settings_...
bsd-3-clause
jordanemedlock/psychtruths
temboo/Library/Disqus/Posts/VoteOnPost.py
4
3957
# -*- coding: utf-8 -*- ############################################################################### # # VoteOnPost # Register a vote on a post. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in...
apache-2.0
delicb/SublimeConfig
gutter_manager.py
1
3075
from collections import defaultdict from heapq import heappush, heappop import sublime import sublime_plugin FLAGS = sublime.DRAW_EMPTY | sublime.DRAW_NO_FILL | sublime.DRAW_NO_OUTLINE ICONS = defaultdict(list) class GutterManagerMixin(object): icons = defaultdict(list) def __init__(self, *args, **kwargs): ...
mit
benoitsteiner/tensorflow
tensorflow/contrib/tensor_forest/python/kernel_tests/sample_inputs_op_test.py
56
6058
# 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
Arakmar/Sick-Beard
sickbeard/metadata/helpers.py
45
3806
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of t...
gpl-3.0
vcoin-project/vcoincore
contrib/testgen/gen_base58_test_vectors.py
1000
4343
#!/usr/bin/env python ''' Generate valid and invalid base58 address and private key test vectors. Usage: gen_base58_test_vectors.py valid 50 > ../../src/test/data/base58_keys_valid.json gen_base58_test_vectors.py invalid 50 > ../../src/test/data/base58_keys_invalid.json ''' # 2012 Wladimir J. van der Laan # R...
mit
dozeo/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...
bsd-3-clause
pavanky/arrayfire-python
arrayfire/arith.py
1
24132
####################################################### # Copyright (c) 2015, ArrayFire # All rights reserved. # # This file is distributed under 3-clause BSD license. # The complete license agreement can be obtained at: # http://arrayfire.com/licenses/BSD-3-Clause ######################################################...
bsd-3-clause
kelvin13/shifty-octocat
pygments/lexers/go.py
47
3701
# -*- coding: utf-8 -*- """ pygments.lexers.go ~~~~~~~~~~~~~~~~~~ Lexers for the Google Go language. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, bygroups, words from pygments.token...
gpl-3.0
daoluan/decode-Django
Django-1.5.1/django/contrib/gis/geos/factory.py
293
1033
from django.contrib.gis import memoryview from django.contrib.gis.geos.geometry import GEOSGeometry, wkt_regex, hex_regex from django.utils import six def fromfile(file_h): """ Given a string file name, returns a GEOSGeometry. The file may contain WKB, WKT, or HEX. """ # If given a file name, get...
gpl-2.0
tanglei528/horizon
openstack_dashboard/dashboards/admin/users/urls.py
9
1250
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
apache-2.0
Hellogark/TuaregWeb
TuaregServer/tuareg/node_modules/node-gyp/gyp/tools/pretty_vcproj.py
2637
9586
#!/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. """Make the format of a vcproj really pretty. This script normalize and sort an xml. It also fetches all the properties inside linked...
mit
moazzemi/HAMEX
cpu/gem5/tests/configs/o3-timing-mp.py
56
2396
# Copyright (c) 2013 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
mit
amir-qayyum-khan/edx-platform
cms/lib/xblock/authoring_mixin.py
163
1500
""" Mixin class that provides authoring capabilities for XBlocks. """ import logging from django.conf import settings from xblock.core import XBlock from xblock.fields import XBlockMixin from xblock.fragment import Fragment log = logging.getLogger(__name__) VISIBILITY_VIEW = 'visibility_view' @XBlock.needs("i18n...
agpl-3.0
upsuper/servo
tests/wpt/mozilla/tests/webgl/conformance-2.0.0/deqp/build.py
51
11811
#!/usr/bin/env python # # Copyright (c) 2015 The Khronos Group Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and/or associated documentation files (the # "Materials"), to deal in the Materials without restriction, including # without limitation the rights to u...
mpl-2.0
unseenlaser/python-for-android
python3-alpha/python3-src/Lib/test/test_mmap.py
49
24911
from test.support import (TESTFN, run_unittest, import_module, unlink, requires, _2G, _4G) import unittest import os import re import itertools import socket import sys # Skip test if we can't import mmap. mmap = import_module('mmap') PAGESIZE = mmap.PAGESIZE class MmapTests(unittest.TestCa...
apache-2.0
inveniosoftware/invenio-stats
invenio_stats/queries.py
1
12944
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2017-2019 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Query processing classes.""" from datetime import datetime import dateutil.parse...
mit
trueblue2704/AskMeAnything
lib/python2.7/site-packages/jinja2/ext.py
603
25078
# -*- coding: utf-8 -*- """ jinja2.ext ~~~~~~~~~~ Jinja extensions allow to add custom tags similar to the way django custom tags work. By default two example extensions exist: an i18n and a cache extension. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ from jinja2 import nod...
mit
medialab/gazouilloire
gazouilloire/url_resolve.py
1
6454
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import re from urllib3 import Timeout from datetime import datetime from elasticsearch import helpers from minet import multithreaded_resolve from minet.exceptions import RedirectError from gazouilloire.database.elasticmanager import ElasticManager from ural.get...
gpl-3.0
rbian/avocado-vt
virttest/libvirt_xml/nwfilter_protocols/sctp_ipv6.py
26
6320
""" sctp-ipv6 protocl support class(es) http://libvirt.org/formatnwfilter.html#nwfelemsRulesProtoTCP-ipv6 """ from virttest.libvirt_xml import accessors, xcepts from virttest.libvirt_xml.nwfilter_protocols import base class Sctp_ipv6(base.TypedDeviceBase): """ Create new Sctp_ipv6 xml instances Proper...
gpl-2.0
Lektorium-LLC/edx-platform
lms/djangoapps/course_api/blocks/tests/test_api.py
7
6856
""" Tests for Blocks api.py """ from itertools import product import ddt from django.test.client import RequestFactory from openedx.core.djangoapps.content.block_structure.api import clear_course_from_cache from openedx.core.djangoapps.content.block_structure.config import STORAGE_BACKING_FOR_CACHE, waffle from stud...
agpl-3.0
andresmauro17/mediapp
src/apps/consultorio/migrations/0051_auto_20180612_0859.py
1
1622
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2018-06-12 08:59 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('consultorio', '0050_auto_20180611_1659'), ] operat...
mit
rikirenz/inspire-next
inspirehep/modules/disambiguation/records.py
2
5078
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2014-2017 CERN. # # INSPIRE is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any ...
gpl-3.0
Weasyl/weasyl
weasyl/controllers/interaction.py
1
6443
from pyramid.httpexceptions import HTTPSeeOther from pyramid.response import Response from weasyl.controllers.decorators import login_required, token_checked from weasyl.error import WeasylError from weasyl import ( define, favorite, followuser, frienduser, ignoreuser, note, profile) # User interactivity functio...
apache-2.0
Yarichi/Proyecto-DASI
Malmo/Python_Examples/reward_for_items_test.py
1
9109
# ------------------------------------------------------------------------------------------------ # Copyright (c) 2016 Microsoft Corporation # # 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 Softw...
gpl-2.0
RenderBroken/OPO-CM-kernel
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
1935
# Util.py - Python extension for perf script, miscellaneous utility code # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. import errno, os FUTEX_WAIT = 0...
gpl-2.0
Empire-of-Code-Puzzles/checkio-empire-calls-home
_old/verification/tests.py
3
8608
""" TESTS is a dict with all you tests. Keys for this will be categories' names. Each test is dict with "input" -- input data for user function "answer" -- your right answer "explanation" -- not necessary key, it's using for additional info in animation. """ TESTS = { "Basics": [ { ...
gpl-2.0
eayunstack/ceilometer
ceilometer/storage/hbase/migration.py
13
4402
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under...
apache-2.0
MartynShaw/audacity
lib-src/lv2/suil/waflib/Tools/tex.py
177
8492
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,re from waflib import Utils,Task,Errors,Logs from waflib.TaskGen import feature,before_method re_bibunit=re.compile(r'\\(?P<type>putbib)\[(?P<file>[^\[\]]*)\]',re.M)...
gpl-2.0
denys-duchier/django
tests/model_fields/test_decimalfield.py
49
2895
from decimal import Decimal from django.core import validators from django.core.exceptions import ValidationError from django.db import models from django.test import TestCase from .models import BigD, Foo class DecimalFieldTests(TestCase): def test_to_python(self): f = models.DecimalField(max_digits=4...
bsd-3-clause
CoDEmanX/ArangoDB
3rdParty/V8-4.3.61/third_party/python_26/Lib/idlelib/ParenMatch.py
58
6611
"""ParenMatch -- An IDLE extension for parenthesis matching. When you hit a right paren, the cursor should move briefly to the left paren. Paren here is used generically; the matching applies to parentheses, square brackets, and curly braces. """ from HyperParser import HyperParser from configHandler import idleConf...
apache-2.0
sorenh/cc
vendor/boto/boto/ec2/connection.py
3
61826
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # 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, modi...
apache-2.0
benjaminrigaud/django-taggit
tests/tests.py
8
25197
from __future__ import absolute_import, unicode_literals from unittest import TestCase as UnitTestCase import django from django.contrib.contenttypes.models import ContentType from django.core import serializers from django.core.exceptions import ImproperlyConfigured, ValidationError from django.db import connection ...
bsd-3-clause
rtrigoso/tastycakes
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-3.3/pygments/styles/murphy.py
364
2751
# -*- coding: utf-8 -*- """ pygments.styles.murphy ~~~~~~~~~~~~~~~~~~~~~~ Murphy's style from CodeRay. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Keyword, Name, Comment,...
mit
raju249/oppia
extensions/gadgets/base.py
9
3985
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
apache-2.0
mitsuhiko/django
django/contrib/gis/geos/prototypes/io.py
312
8473
import threading from ctypes import byref, c_char_p, c_int, c_char, c_size_t, Structure, POINTER from django.contrib.gis.geos.base import GEOSBase from django.contrib.gis.geos.libgeos import GEOM_PTR from django.contrib.gis.geos.prototypes.errcheck import check_geom, check_string, check_sized_string from django.contrib...
bsd-3-clause
unseenlaser/python-for-android
python3-alpha/python3-src/PC/VS8.0/build_ssl.py
48
10103
# Script for building the _ssl and _hashlib modules for Windows. # Uses Perl to setup the OpenSSL environment correctly # and build OpenSSL, then invokes a simple nmake session # for the actual _ssl.pyd and _hashlib.pyd DLLs. # THEORETICALLY, you can: # * Unpack the latest SSL release one level above your main Python ...
apache-2.0
xfournet/intellij-community
python/helpers/py2only/docutils/utils/math/latex2mathml.py
104
17213
#!/usr/bin/env python # -*- coding: utf-8 -*- # :Id: $Id: latex2mathml.py 7668 2013-06-04 12:46:30Z milde $ # :Copyright: © 2010 Günter Milde. # Based on rst2mathml.py from the latex_math sandbox project # © 2005 Jens Jørgen Mortensen # :License: Released under the terms of the `2-Clause BSD li...
apache-2.0
mojeto/django-guardian
guardian/managers.py
19
5167
from __future__ import unicode_literals from django.db import models from django.contrib.contenttypes.models import ContentType from guardian.exceptions import ObjectNotPersisted from guardian.models import Permission import warnings # TODO: consolidate UserObjectPermissionManager and GroupObjectPermissionManager c...
bsd-2-clause
utkbansal/kuma
vendor/packages/pygments/lexers/css.py
72
24150
# -*- coding: utf-8 -*- """ pygments.lexers.css ~~~~~~~~~~~~~~~~~~~ Lexers for CSS and related stylesheet formats. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import copy from pygments.lexer import ExtendedRegexLexer, R...
mpl-2.0
xecle/git-repo
git_command.py
14
5787
# # Copyright (C) 2008 The Android Open Source Project # # 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 la...
apache-2.0
vmahuli/tempest
tempest/api/compute/v3/servers/test_servers.py
4
4932
# Copyright 2012 OpenStack Foundation # 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 requ...
apache-2.0
gabrielfarah/OpenHub
worker/security/basic_security/tests.py
1
1462
''' Created on 18/10/2013 @author: Gabrie ''' import unittest import main as m class Test(unittest.TestCase): def test_SQL_Injection(self): """Found string sql param in python in file.""" assert m.find_sql_injection("asdfasdf.execute( query % params) asdf") == 1 assert m.find_sql_inject...
gpl-3.0
patriciolobos/desa8
openerp/addons/sale_service/__init__.py
354
1060
# -*- 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
rogerwang/chromium
third_party/tlslite/tlslite/__init__.py
409
1129
""" TLS Lite is a free python library that implements SSL v3, TLS v1, and TLS v1.1. TLS Lite supports non-traditional authentication methods such as SRP, shared keys, and cryptoIDs, in addition to X.509 certificates. TLS Lite is pure python, however it can access OpenSSL, cryptlib, pycrypto, and GMPY for faster crypt...
bsd-3-clause
hakancelik96/coogger
core/threaded_comment/migrations/0001_initial.py
1
2632
# Generated by Django 2.0.12 on 2019-08-04 04:21 import django.db.models.deletion from django.conf import settings from django.db import migrations, models import core.cooggerapp.models.common class Migration(migrations.Migration): initial = True dependencies = [ ("contenttypes", "0002_remove_cont...
mit
tsabi/Odoo-tsabi-fixes
addons/stock/res_config.py
61
8107
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
memtoko/django
django/conf/locale/tr/formats.py
504
1141
# -*- 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 = 'd F Y' TIME_FORMAT = 'H:i' DATETI...
bsd-3-clause
jujojujoju/android
user_manual/conf.py
2
9666
# -*- coding: utf-8 -*- # # ownCloud Documentation documentation build configuration file, created by # sphinx-quickstart on Mon Oct 22 23:16:40 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerate...
gpl-2.0
maelnor/nova
nova/tests/pci/test_whitelist.py
3
2625
# Copyright (c) 2012 OpenStack Foundation # 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 ...
apache-2.0
Gravecorp/Gap
Gap/Lib/tarfile.py
40
88997
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- #------------------------------------------------------------------- # tarfile.py #------------------------------------------------------------------- # Copyright (C) 2002 Lars Gustäbel <lars@gustaebel.de> # All rights reserved. # # Permission is hereby granted, fre...
mpl-2.0
bollu/vispy
examples/demo/scene/flow_lines.py
7
6690
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2015, Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # -------------------------------------------------------------------------...
bsd-3-clause
davidharvey1986/pyRRG
unittests/bugFixPyRRG/lib/python3.7/site-packages/pip/_vendor/requests/adapters.py
54
21548
# -*- coding: utf-8 -*- """ requests.adapters ~~~~~~~~~~~~~~~~~ This module contains the transport adapters that Requests uses to define and maintain connections. """ import os.path import socket from pip._vendor.urllib3.poolmanager import PoolManager, proxy_from_url from pip._vendor.urllib3.response import HTTPRes...
mit
ajdawson/iris
lib/iris/tests/test_coordsystem.py
4
11726
# (C) British Crown Copyright 2010 - 2015, Met Office # # This file is part of Iris. # # Iris 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 3 of the License, or # (at your option) any l...
gpl-3.0
facebookexperimental/eden
eden/hg-server/edenscm/mercurial/streamclone.py
1
17562
# Portions Copyright (c) Facebook, Inc. and its affiliates. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2. # streamclone.py - producing and consuming streaming repository data # # Copyright 2015 Gregory Szorc <gregory.szorc@gmail.com> # # This softwa...
gpl-2.0
Bulochkin/tensorflow_pack
tensorflow/contrib/slim/python/slim/nets/vgg_test.py
112
17429
# 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
jdilallo/jdilallo-test
examples/dfa/v1_20/download_tags.py
1
2797
#!/usr/bin/python # # Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
rprata/boost
libs/python/test/test_pointer_adoption.py
46
1708
# Copyright David Abrahams 2004. Distributed under the Boost # Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) """ >>> from test_pointer_adoption_ext import * >>> num_a_instances() 0 >>> a = create('dynamically allocated') >>> num_a_instances() ...
gpl-2.0
citrix-openstack-build/neutron
neutron/plugins/mlnx/agent/eswitch_neutron_agent.py
3
17650
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 Mellanox Technologies, Ltd # # 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
kustodian/ansible
test/units/modules/network/fortios/test_fortios_waf_profile.py
21
8510
# 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 License, or # (at your option) any later version. # # This program is distributed in the...
gpl-3.0