repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
YeelerG/scrapy
refs/heads/master
scrapy/linkextractors/htmlparser.py
90
""" HTMLParser-based link extractor """ import warnings from six.moves.html_parser import HTMLParser from six.moves.urllib.parse import urljoin from w3lib.url import safe_url_string from scrapy.link import Link from scrapy.utils.python import unique as unique_list from scrapy.exceptions import ScrapyDeprecationWarni...
watspidererik/testenv
refs/heads/master
flask/lib/python2.7/site-packages/werkzeug/testsuite/security.py
145
# -*- coding: utf-8 -*- """ werkzeug.testsuite.security ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the security helpers. :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import unittest from werkzeug.testsuite import WerkzeugTestCase from werkzeug.securit...
razzius/sqlalchemy-migrate
refs/heads/master
migrate/changeset/__init__.py
13
""" This module extends SQLAlchemy and provides additional DDL [#]_ support. .. [#] SQL Data Definition Language """ import re import warnings import sqlalchemy from sqlalchemy import __version__ as _sa_version warnings.simplefilter('always', DeprecationWarning) _sa_version = tuple(int(re.match("\d+", x).g...
ericholscher/pip-1
refs/heads/develop
pip/index.py
2
"""Routines related to PyPI, indexes""" import sys import os import re import gzip import mimetypes try: import threading except ImportError: import dummy_threading as threading import posixpath import pkg_resources import random import socket import string import zlib from pip.log import logger from pip.util ...
omtinez/micropython
refs/heads/master
tests/io/stringio1.py
47
import _io as io a = io.StringIO() print('io.StringIO' in repr(a)) print(a.getvalue()) print(a.read()) a = io.StringIO("foobar") print(a.getvalue()) print(a.read()) print(a.read()) a = io.StringIO() a.write("foo") print(a.getvalue()) a = io.StringIO("foo") a.write("12") print(a.getvalue()) a = io.StringIO("foo") a...
drawks/ansible
refs/heads/devel
lib/ansible/modules/packaging/language/cpanm.py
44
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Franck Cuny <franck@lumberjaph.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_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
klunwebale/odoo
refs/heads/8.0
addons/crm/ir_http.py
306
# -*- coding: utf-8 -*- from openerp.http import request from openerp.osv import orm class ir_http(orm.AbstractModel): _inherit = 'ir.http' def get_utm_domain_cookies(self): return request.httprequest.host def _dispatch(self): response = super(ir_http, self)._dispatch() for var, ...
maaku/bitcoin
refs/heads/master
contrib/devtools/copyright_header.py
13
#!/usr/bin/env python3 # Copyright (c) 2016-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import re import fnmatch import sys import subprocess import datetime import os ########################...
siosio/intellij-community
refs/heads/master
python/testData/refactoring/rename/renameGlobal.py
83
foo = [] def f1(): global foo foo = [1, 2, 3] def f2(x): global foo foo = foo + [x] if 1 in foo: return f<caret>oo def f3(x): return foo + [x] def f4(x): global foo return foo + [x] def f5(foo): return foo
Bismarrck/tensorflow
refs/heads/master
tensorflow/contrib/framework/python/framework/graph_util_test.py
41
# 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...
pranavtendolkr/horizon
refs/heads/master
openstack_dashboard/dashboards/admin/hypervisors/views.py
48
# Copyright 2013 B1 Systems GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
xuegang/gpdb
refs/heads/master
src/test/tinc/tinctest/test/data_provider/discover_invalid_imports.py
21
import unittest2 as unittest from tinctest.lib import blah import tinctest class SampleDiscoverTestCase(tinctest.TINCTestCase): def test_1(self): print "Test1" def test_2(self): print "test"
shubhdev/edxOnBaadal
refs/heads/master
common/djangoapps/xmodule_django/models.py
89
""" Useful django models for implementing XBlock infrastructure in django. """ import warnings from django.db import models from django.core.exceptions import ValidationError from opaque_keys.edx.keys import CourseKey, UsageKey, BlockTypeKey from south.modelsinspector import add_introspection_rules class NoneToEmp...
dougsweetser/ipq
refs/heads/master
q_notebooks/Rotations_of_Events_in_Space-time.py
1
# coding: utf-8 # # Simple Rotations # Author: Doug <sweetser@alum.mit.edu> # A deep leason from special relativity is that all measurements start as events in space-time. A measurment such as the length of a rod would appear to only involve space. Yet one needs a signal from both ends that gets received by the obs...
adamcaudill/yawast
refs/heads/master
yawast/scanner/plugins/http/servers/apache_tomcat.py
1
# Copyright (c) 2013 - 2020 Adam Caudill and Contributors. # This file is part of YAWAST which is released under the MIT license. # See the LICENSE file or go to https://yawast.org/license/ for full license details. import base64 import re import secrets from typing import List, cast, Union, Optional from urllib.pa...
jctanner/ansible
refs/heads/devel
test/units/module_utils/common/text/converters/test_to_str.py
27
# -*- coding: utf-8 -*- # (c) 2016 Toshio Kuratomi <tkuratomi@ansible.com> # Copyright (c) 2017 Ansible Project # 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 import itertools import py...
fhgwright/fs-uae
refs/heads/master
contrib/sinc-integral.py
10
#!/usr/bin/python import math import sys from scipy import array, exp from scipy.signal import firwin from scipy.fftpack import fft, ifft def fir_minphase(table, pad_size=8): table = list(table) # table should be a real-valued table of FIR coefficients convolution_size = len(table) table += [0] * (con...
carsongee/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/tests/test_utils_django.py
46
"""Tests for methods defined in util/django.py""" from xmodule.util.django import get_current_request, get_current_request_hostname from nose.tools import assert_is_none from unittest import TestCase class UtilDjangoTests(TestCase): """ Tests for methods exposed in util/django """ def test_get_current_...
rpmcpp/Audacity
refs/heads/master
lib-src/lv2/sord/waflib/Tools/compiler_cxx.py
343
#! /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,sys,imp,types from waflib.Tools import ccroot from waflib import Utils,Configure from waflib.Logs import debug cxx_compiler={'win32':['msvc','g++'],'cygwin':['g++'],...
ryfeus/lambda-packs
refs/heads/master
Opencv_pil/source/google/protobuf/internal/reflection_test.py
11
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that t...
spaceninja/mltshp
refs/heads/master
models/sharedfile.py
1
import re from os import path import hashlib from datetime import datetime, timedelta from tornado import escape from tornado.options import options from lib.flyingcow import Model, Property from lib.flyingcow.cache import ModelQueryCache from lib.flyingcow.db import IntegrityError from lib.utilities import base36enc...
david672orford/pykarta
refs/heads/master
pykarta/maps/layers/tilesets_osm_vec.py
1
# encoding=utf-8 # pykarta/maps/layers/tilesets_osm_vec.py # Vector tile sets and renderers for them # Copyright 2013--2018, Trinity College # Last modified: 30 May 2018 # http://colorbrewer2.org/ is helpful for picking color palates for maps. from __future__ import print_function import os import glob import cairo i...
NL66278/odoo
refs/heads/8.0
addons/lunch/__init__.py
440
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2012 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
Dfelker/ansible
refs/heads/devel
lib/ansible/plugins/connections/winrm.py
12
# (c) 2014, Chris Church <chris@ninemoreminutes.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...
farstarinc/django-forum
refs/heads/master
forum/admin.py
1
from django.contrib import admin from forum.models import Forum, Thread, Post, Subscription class ForumAdmin(admin.ModelAdmin): list_display = ('title', '_parents_repr') list_filter = ('groups',) ordering = ['ordering', 'parent', 'title'] prepopulated_fields = {"slug": ("title",)} class SubscriptionAd...
ojake/django
refs/heads/master
tests/template_tests/filter_tests/test_floatformat.py
345
# -*- coding: utf-8 -*- from __future__ import unicode_literals from decimal import Decimal, localcontext from unittest import expectedFailure from django.template.defaultfilters import floatformat from django.test import SimpleTestCase from django.utils import six from django.utils.safestring import mark_safe from ...
apixandru/intellij-community
refs/heads/master
plugins/hg4idea/testData/bin/mercurial/parser.py
93
# parser.py - simple top-down operator precedence parser for mercurial # # Copyright 2010 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. # see http://effbot.org/zone/simple-top-down-parsing.htm and ...
beilunyang/someCrawlers
refs/heads/master
getchu/crawler/crawler/spiders/hentai_spider.py
1
rxa# -*- coding: utf-8 -*- from scrapy.http.request import Request from scrapy.selector import Selector from crawler.items import HentaiItemii from scrapy import Spider class HentaiSpider(Spider): name = 'hentai' allowed_domains = ['www.getchu.com'] start_urls = ['http://www.getchu.com/anime/adult_list.html?page=%d...
litui/openparliament
refs/heads/master
parliament/core/maint.py
2
from django import http from django.shortcuts import render from django.conf import settings import datetime, re def memcached_status(request): try: import memcache except ImportError: raise http.Http404 if not (request.user.is_authenticated() and request.user.is_staff): ...
willprice/arduino-sphere-project
refs/heads/master
scripts/example_direction_finder/temboo/Library/Google/Gmailv2/Messages/__init__.py
1
from temboo.Library.Google.Gmailv2.Messages.DeleteMessage import DeleteMessage, DeleteMessageInputSet, DeleteMessageResultSet, DeleteMessageChoreographyExecution from temboo.Library.Google.Gmailv2.Messages.GetMessage import GetMessage, GetMessageInputSet, GetMessageResultSet, GetMessageChoreographyExecution from temboo...
SebastianMerz/calalert
refs/heads/master
Server/venv/lib/python2.7/site-packages/sqlalchemy/ext/horizontal_shard.py
18
# ext/horizontal_shard.py # Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Horizontal sharding support. Defines a rudimental 'horizontal sharding' sy...
vvv1559/intellij-community
refs/heads/master
python/helpers/py2only/docutils/languages/pl.py
149
# $Id$ # Author: Robert Wojciechowicz <rw@smsnet.pl> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be # translated for each language: one in docutils/langu...
caiopo/tia-bot
refs/heads/master
src/handler.py
1
import telegram import config import os import random import time import responses random.seed() # Botfather: /setcommands # help - sobre titiabot # tia - envia uma foto linda # fotos - mostra o número de fotos disponíveis AUTO_MSG_TIME = [9, 14, 18] # Hour def init(): global auto_msg_targets auto_msg_targets = ...
jemekite/youtube-dl
refs/heads/master
youtube_dl/extractor/newstube.py
113
# encoding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ExtractorError class NewstubeIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?newstube\.ru/media/(?P<id>.+)' _TEST = { 'url': 'http://www.newstube.ru/media/telekanal-cnn-pere...
daviddenton/balderdash
refs/heads/master
tests/__init__.py
1
from . import grafanaTest from . import kibanaTest
jomo/youtube-dl
refs/heads/master
youtube_dl/extractor/__init__.py
2
from __future__ import unicode_literals from .abc import ABCIE from .abc7news import Abc7NewsIE from .academicearth import AcademicEarthCourseIE from .addanime import AddAnimeIE from .adobetv import AdobeTVIE from .adultswim import AdultSwimIE from .aftenposten import AftenpostenIE from .aftonbladet import Aftonbladet...
nhomar/odoo-mirror
refs/heads/8.0
addons/mail/mail_group.py
247
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
aznrice/toolchain_cloog-current
refs/heads/linaro-0.18.1
isl/isl.py
26
import gdb import re # GDB Pretty Printers for most isl objects class IslObjectPrinter: """Print an isl object""" def __init__ (self, val, type): self.val = val self.type = type def to_string (self): # Cast val to a void pointer to stop gdb using this pretty ...
Tokyo-Buffalo/tokyosouth
refs/heads/master
env/lib/python3.6/site-packages/twisted/words/test/test_xmlstream.py
13
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.words.xish.xmlstream}. """ from __future__ import absolute_import, division from twisted.internet import protocol from twisted.python import failure from twisted.trial import unittest from twisted.words.xish import domish...
goyalankit/po-compiler
refs/heads/master
object_files/networkx-1.8.1/build/lib.linux-i686-2.7/networkx/algorithms/shortest_paths/__init__.py
101
from networkx.algorithms.shortest_paths.generic import * from networkx.algorithms.shortest_paths.unweighted import * from networkx.algorithms.shortest_paths.weighted import * from networkx.algorithms.shortest_paths.astar import * from networkx.algorithms.shortest_paths.dense import *
jphnoel/udata
refs/heads/dev
udata/core/followers/api.py
2
# -*- coding: utf-8 -*- from __future__ import unicode_literals from datetime import datetime from flask import current_app, request from flask_security import current_user from udata import tracking from udata.api import api, API, fields from udata.models import Follow from udata.core.user.api_fields import user_re...
HybridF5/jacket
refs/heads/master
jacket/tests/compute/unit/api/openstack/compute/legacy_v2/test_auth.py
1
# Copyright 2010 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...
ckuethe/gnuradio
refs/heads/master
gr-fcd/python/fcd/__init__.py
57
# # Copyright 2011 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 option) # any later version. # #...
romankagan/DDBWorkbench
refs/heads/master
python/testData/selectWord/list/after2.py
83
x = [1, 2, 3<selection>, 4</selection>]
c2g14/cda_0628
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/unittest/case.py
743
"""Test case implementation""" import sys import functools import difflib import pprint import re import warnings import collections from . import result from .util import (strclass, safe_repr, _count_diff_all_purpose, _count_diff_hashable) __unittest = True DIFF_OMITTED = ('\nDiff is %s charact...
hatwar/focal-erpnext
refs/heads/develop
erpnext/stock/doctype/price_list/test_price_list.py
41
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe # test_ignore = ["Item"] test_records = frappe.get_test_records('Price List')
chirilo/ana-ka-todo-app
refs/heads/master
node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/gyp/pylib/gyp/generator/cmake.py
531
# Copyright (c) 2013 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. """cmake output module This module is under development and should be considered experimental. This module produces cmake (2.8.8+) input as its output. One CMake...
natural/django-objectcounters
refs/heads/master
objectcounters/templatetags/__init__.py
927
#!/usr/bin/env python # -*- coding: utf-8 -*-
MaTIC-mg/Odoo-addons
refs/heads/master
matic_l10n_mg_res_state/__init__.py
1
# -*- coding: utf-8 -*- import res_country_state
Dhivyap/ansible
refs/heads/devel
test/units/modules/network/fortimanager/test_fmgr_device_config.py
38
# Copyright 2018 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...
gangadhar-kadam/laganerp
refs/heads/master
erpnext/manufacturing/doctype/production_plan_sales_order/__init__.py
37694
from __future__ import unicode_literals
saurabh6790/medsyn-lib
refs/heads/master
core/doctype/site_manager/site_manager.py
6
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # For license information, please see license.txt from __future__ import unicode_literals import webnotes from install_erpnext import exec_in_shell from webnotes.model.doc import addchild from webnotes.model.bean im...
JonathanStein/odoo
refs/heads/8.0
addons/payment_buckaroo/__init__.py
373
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
acsone/server-tools
refs/heads/8.0
setup/base_optional_quick_create/odoo_addons/__init__.py
13048
__import__('pkg_resources').declare_namespace(__name__)
jiangzhuo/kbengine
refs/heads/master
kbe/src/lib/python/Lib/unittest/mock.py
79
# mock.py # Test tools for mocking and patching. # Maintained by Michael Foord # Backport for other versions of Python available from # http://pypi.python.org/pypi/mock __all__ = ( 'Mock', 'MagicMock', 'patch', 'sentinel', 'DEFAULT', 'ANY', 'call', 'create_autospec', 'FILTER_DIR', ...
hainn8x/gnuradio
refs/heads/master
gr-digital/python/digital/qa_ofdm_cyclic_prefixer.py
47
#!/usr/bin/env python # # Copyright 2007,2010,2011,2013,2014 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, ...
shenson/cobbler
refs/heads/master
cobbler/tftpgen.py
1
""" Generate files provided by TFTP server based on Cobbler object tree. This is the code behind 'cobbler sync'. Copyright 2006-2009, Red Hat, Inc and Others Michael DeHaan <michael.dehaan AT gmail> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licen...
mitodl/micromasters
refs/heads/master
cms/views.py
1
""" cms views """ from django.contrib.auth.views import redirect_to_login from django.urls import reverse def cms_signin_redirect_to_site_signin(request): """Redirect wagtail admin signin to site signin page""" return redirect_to_login(reverse('wagtailadmin_home'), login_url="/") def cms_password_reset_redi...
wcmckee/pyatakl
refs/heads/master
pyatakl/markdown.py
1
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <markdowncell> # gm # <codecell> #! /usr/bin/python import dominate # 'pip install dominate' must be run once before this from dominate.tags import * import re # Only needed because dominate doesn't let us set tab indentation import tempfile import webbrowser d...
awkspace/ansible
refs/heads/devel
lib/ansible/modules/crypto/acme/acme_inspect.py
5
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2018 Felix Fontein (@felixfontein) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
MOA-2011/enigma2
refs/heads/master
lib/python/Components/Converter/genre.py
60
# # Genre types taken from DVB standards documentation # # some broadcaster do define other types so this list # may grow or be replaced.. # maintype = [ _("Reserved"), _("Movie/Drama"), _("News Current Affairs"), _("Show Games show"), _("Sports"), _("Children/Youth"), _("Music/Ballet/Dance"), _("Arts/Cul...
underyx/ansible
refs/heads/devel
test/units/TestModuleUtilsDatabase.py
14
import collections import mock import os from nose import tools from ansible.module_utils.database import ( pg_quote_identifier, SQLParseError, ) # Note: Using nose's generator test cases here so we can't inherit from # unittest.TestCase class TestQuotePgIdentifier(object): # These are all valid string...
bpramod/azure-linux-extensions
refs/heads/master
VMBackup/main/patch/__init__.py
2
#!/usr/bin/python # # Copyright 2015 Microsoft 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 required by applicable...
jameshicks/pydigree
refs/heads/master
tests/test_frequencies.py
1
from itertools import chain from nose import with_setup from nose.tools import raises from pydigree import Population, Individual from pydigree.genotypes import Alleles from pydigree.common import grouper def setup_80freq(): pop = Population() for i in range(600): ind = pop.founder_individual() ...
jmvasquez/redashtest
refs/heads/master
migrations/0010_create_alerts.py
20
from redash.models import db, Alert, AlertSubscription if __name__ == '__main__': with db.database.transaction(): Alert.create_table() AlertSubscription.create_table() db.close_db(None)
sysadmin75/ansible
refs/heads/devel
lib/ansible/plugins/lookup/pipe.py
150
# (c) 2012, Daniel Hokka Zakrisson <daniel@hozac.com> # (c) 2017 Ansible Project # 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 = """ lookup: pipe author: Daniel H...
GDGLima/contentbox
refs/heads/master
third_party/autoload/__init__.py
132
def autodiscover(module_name): """ Automatically loads modules specified by module_name for each app in installed apps. """ from django.conf import settings from django.utils.importlib import import_module from django.utils.module_loading import module_has_submodule for app in settings....
renyi533/tensorflow
refs/heads/master
tensorflow/python/util/lock_util.py
44
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
kakunbsc/enigma2.4
refs/heads/master
lib/python/Screens/InputBox.py
7
from enigma import eRCInput, getPrevAsciiCode from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Components.ActionMap import NumberActionMap from Components.Label import Label from Components.Input import Input from Tools.BoundFunction import boundFunction from time import time class Inpu...
scieloorg/citedby
refs/heads/beta
proc/tools/pbenchmarck.py
2
#! coding: utf-8 # # Benchmarck between SciELO CitedBy RESTFull API and Tirgramas Bireme. # # More about SciELO CitedBy RESTFull API docs: http://docs.scielo.org/projects/citedby/en/latest/ # # More about Trigramas Bireme: http://trigramas.bireme.br/ # import time import logging import requests logging.basicConfig(l...
SPKian/Testing2
refs/heads/master
erpnext/hr/doctype/employee/__init__.py
37694
from __future__ import unicode_literals
pwnall/ansible-modules-core
refs/heads/devel
cloud/amazon/iam.py
22
#!/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...
Nico60/external_chromium
refs/heads/kitkat
net/tools/testserver/asn1der.py
67
#!/usr/bin/python2.5 # Copyright (c) 2011 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. """Helper module for ASN.1/DER encoding.""" import binascii import struct # Tags as defined by ASN.1. INTEGER = 2 BIT_STRING = 3 N...
ericburger/wallflower-atto
refs/heads/master
wallflower_atto_db.py
2
##################################################################################### # # Copyright (c) 2016 Eric Burger, Wallflower.cc # # GNU Affero General Public License Version 3 (AGPLv3) # # Should you enter into a separate license agreement after having received a copy of # this software, then the terms of s...
simone/django-gb
refs/heads/master
tests/wsgi/wsgi.py
736
# This is just to test finding, it doesn't have to be a real WSGI callable application = object()
caisq/tensorflow
refs/heads/master
tensorflow/contrib/keras/api/keras/applications/resnet50/__init__.py
37
# 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...
tareqalayan/ansible
refs/heads/devel
hacking/report.py
46
#!/usr/bin/env python # PYTHON_ARGCOMPLETE_OK """A tool to aggregate data about Ansible source and testing into a sqlite DB for reporting.""" from __future__ import (absolute_import, print_function) import argparse import os import requests import sqlite3 import sys DATABASE_PATH = os.path.expanduser('~/.ansible/rep...
Rbeaty88/ginga
refs/heads/master
ginga/RGBImage.py
1
# # RGBImage.py -- Abstraction of an generic data image. # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # from ginga.util import io_rgb from ginga.misc import Bunch fro...
guymakam/Kodi-Israel
refs/heads/master
plugin.video.playlistLoader/resources/lib/chardet/sbcsgroupprober.py
2935
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
withtone/depot_tools
refs/heads/master
third_party/logilab/common/tasksqueue.py
93
# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as publ...
AdrianGaudebert/socorro
refs/heads/master
e2e-tests/pages/crash_stats_nightly_builds_page.py
4
#!/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/. from selenium.webdriver.common.by import By from pages.base_page import CrashStatsBasePage cla...
Qalthos/ansible
refs/heads/devel
lib/ansible/plugins/doc_fragments/dellos9.py
132
# -*- coding: utf-8 -*- # Copyright: (c) 2015, Peter Sprygada <psprygada@ansible.com> # Copyright: (c) 2016, Dell Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard files documentation fragment DOCUMENTATION = r''' op...
android-ia/platform_external_chromium_org
refs/heads/master
build/android/pylib/perf/__init__.py
962
# 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.
hkawasaki/kawasaki-aio8-1
refs/heads/gacco2/master
common/djangoapps/student/views.py
4
""" Student Views """ import datetime import logging import re import uuid import time from collections import defaultdict from pytz import UTC from django.conf import settings from django.contrib.auth import logout, authenticate, login from django.contrib.auth.models import User, AnonymousUser from django.contrib.aut...
fredwilliam/PMO
refs/heads/master
apps/graphing/app.py
36
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import rapidsms # This class has to be here for rapid to not get mad class App(rapidsms.app.App): def handle(self, message): pass
Alex-Ian-Hamilton/solarbextrapolation
refs/heads/master
docs/auto_examples/plot_potential_extrapolation_performance_tests.py
3
# -*- coding: utf-8 -*- """ ===================================== Extrapolator Perfomance Testing ===================================== In this example you will be running the potential field extrapolator both with numba enabled and disabled over a number of datasets and tabulating the results into an astropy table. ...
cbitstech/Purple-Robot-Django
refs/heads/master
migrations/0007_auto__del_field_purplerobottest_last_reading_id.py
1
# -*- coding: utf-8 -*- from south.utils import datetime_utils as 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 'PurpleRobotTest.last_reading_id' db.delete_column(u'pur...
chokribr/PIST
refs/heads/master
modules/bibcatalog/lib/bibcatalog_system.py
17
# -*- 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 ## License, or (at yo...
alexandreleroux/mayavi
refs/heads/master
mayavi/sources/ui/__init__.py
20
# Author: Judah De Paula # Copyright (c) 2005-2008, Enthought, Inc. # License: BSD Style.
serbanalex2202/Teme-Inteligenta-Artificiala
refs/heads/master
Tema1/src/World.py
1
from tkinter import * from Generator import * from Functii_aux import * from tkinter import * import time ''' TODO gigel nu are mereu next_move (map[i][j] cica e wall cand nu e..) mai putini gardieni sa genereza grafice din ce ? euristica portal -> reward la portal ? pdf prezentare ''' args = parse_arguments(...
orgito/ansible
refs/heads/devel
lib/ansible/modules/network/nxos/nxos_command.py
39
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
Li-poly/stock-multi-hack
refs/heads/master
tools/perf/scripts/python/futex-contention.py
11261
# 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...
ofrobots/grpc
refs/heads/master
src/python/grpcio/grpc/framework/base/_context.py
39
# 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...
AOSPU/external_chromium_org_tools_gyp
refs/heads/android-5.0/py3
test/msvs/uldi2010/gyptest-all.py
348
#!/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. """ Verifies that uldi can be disabled on a per-project-reference basis in vs2010. """ import TestGyp test = TestGyp.TestGyp(formats=['msv...
weidongxu84/info-gatherer
refs/heads/master
django/core/management/validation.py
79
import sys from django.core.management.color import color_style from django.utils.itercompat import is_iterable class ModelErrorCollection: def __init__(self, outfile=sys.stdout): self.errors = [] self.outfile = outfile self.style = color_style() def add(self, context, error): ...
Axilent/ace-client
refs/heads/master
ace/plugins/__init__.py
1
""" Plugins system. """ from ace import config from ace.utils import get_module import pkgutil # ================================ # = Delegates to active plugins. = # ================================ def seed_parser(parser): """ Seeds the parser. """ for plugin_name in config.get_installed_plugins():...
pyconjp/pyconjp-website
refs/heads/develop
pycon/finaid/migrations/0008_auto__add_field_financialaidreviewdata_paired_with__add_field_financia.py
2
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'FinancialAidReviewData.paired_with' db.add_column(u'finaid_financialaidreviewdata', 'paired_...
WhySoGeeky/DroidPot
refs/heads/master
venv/lib/python2.7/site-packages/django/core/mail/backends/console.py
696
""" Email backend that writes messages to console instead of sending them. """ import sys import threading from django.core.mail.backends.base import BaseEmailBackend from django.utils import six class EmailBackend(BaseEmailBackend): def __init__(self, *args, **kwargs): self.stream = kwargs.pop('stream',...
quarckster/cfme_tests
refs/heads/master
cfme/tests/infrastructure/test_pxe.py
8
import pytest from cfme.infrastructure import pxe from cfme.utils.update import update from cfme.utils.testgen import generate, pxe_servers pytest_generate_tests = generate(gen_func=pxe_servers) @pytest.fixture(scope='function') def has_no_pxe_servers(): pxe.remove_all_pxe_servers() @pytest.mark.tier(2) @pyt...
nemesisdesign/django
refs/heads/master
django/db/backends/base/introspection.py
11
from collections import namedtuple # Structure returned by DatabaseIntrospection.get_table_list() TableInfo = namedtuple('TableInfo', ['name', 'type']) # Structure returned by the DB-API cursor.description interface (PEP 249) FieldInfo = namedtuple('FieldInfo', 'name type_code display_size internal_size precision sca...