repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
kenshay/ImageScript
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/pylint/test/functional/unrecognized_inline_option.py
6
# +1: [unrecognized-inline-option] # pylint:bouboule=1 """Check unknown option"""
702nADOS/sumo
refs/heads/master
tools/contributed/sumopy/coremodules/simulation/results.py
1
import os import sys import string import types from xml.sax import saxutils, parse, handler # , make_parser from collections import OrderedDict import numpy as np from coremodules.modules_common import * import agilepy.lib_base.classman as cm import agilepy.lib_base.arrayman as am import agilepy.lib_base.xmlman a...
abhisg/scikit-learn
refs/heads/master
examples/linear_model/plot_ols_3d.py
350
#!/usr/bin/python # -*- coding: utf-8 -*- """ ========================================================= Sparsity Example: Fitting only features 1 and 2 ========================================================= Features 1 and 2 of the diabetes-dataset are fitted and plotted below. It illustrates that although feature...
cortedeltimo/SickRage
refs/heads/master
lib/sqlalchemy/pool.py
75
# sqlalchemy/pool.py # Copyright (C) 2005-2014 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 """Connection pooling for DB-API connections. Provides a number of connection poo...
aidan-/ansible-modules-extras
refs/heads/devel
cloud/amazon/redshift.py
8
#!/usr/bin/python # Copyright 2014 Jens Carl, Hothead Games 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. # # ...
miptliot/edx-platform
refs/heads/ginkgo_openedu_docker
common/djangoapps/terrain/stubs/tests/test_youtube_stub.py
172
""" Unit test for stub YouTube implementation. """ import unittest import requests from ..youtube import StubYouTubeService class StubYouTubeServiceTest(unittest.TestCase): def setUp(self): super(StubYouTubeServiceTest, self).setUp() self.server = StubYouTubeService() self.url = "http://...
ben-hopps/nupic
refs/heads/master
scripts/run_swarm.py
38
#! /usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions...
joshbohde/scikit-learn
refs/heads/master
sklearn/externals/joblib/test/test_func_inspect.py
2
""" Test the func_inspect module. """ # Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org> # Copyright (c) 2009 Gael Varoquaux # License: BSD Style, 3 clauses. import nose import tempfile import functools from ..func_inspect import filter_args, get_func_name, get_func_code from ..memory import Memory ...
fhaoquan/kbengine
refs/heads/master
kbe/src/lib/python/Lib/encodings/cp1252.py
272
""" Python Character Mapping Codec cp1252 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1252.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,in...
maria/PyGithub
refs/heads/master
github/tests/PaginatedList.py
25
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
skosukhin/spack
refs/heads/esiwace
var/spack/repos/builtin/packages/perl-data-optlist/package.py
1
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
9929105/KEEP
refs/heads/utah-demo
keep_backend/vocab/__init__.py
12133432
rbramwell/pulp
refs/heads/master
server/test/unit/server/db/migrations/__init__.py
12133432
yvaucher/account-financial-tools
refs/heads/master
__unported__/account_cancel_invoice_check_voucher/__init__.py
2
# -*- coding: utf-8 -*- ############################################################################## # # Author Vincent Renaville. Copyright 2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publis...
Darthkpo/xtt
refs/heads/master
openpyxl/utils/tests/test_datetime.py
1
from __future__ import absolute_import # Copyright (c) 2010-2015 openpyxl # Python stdlib imports from datetime import datetime, date, timedelta, time import pytest def test_datetime_to_W3CDTF(): from ..datetime import datetime_to_W3CDTF assert datetime_to_W3CDTF(datetime(2013, 7, 15, 6, 52, 33)) == "2013-0...
vimagick/youtube-dl
refs/heads/master
youtube_dl/downloader/hls.py
26
from __future__ import unicode_literals import os import re import subprocess from .common import FileDownloader from .fragment import FragmentFD from ..compat import compat_urlparse from ..postprocessor.ffmpeg import FFmpegPostProcessor from ..utils import ( encodeArgument, encodeFilename, ) class HlsFD(F...
chiefspace/udemy-rest-api
refs/heads/master
udemy_rest_api_section4/env/lib/python3.4/site-packages/werkzeug/routing.py
87
# -*- coding: utf-8 -*- """ werkzeug.routing ~~~~~~~~~~~~~~~~ When it comes to combining multiple controller or view functions (however you want to call them) you need a dispatcher. A simple way would be applying regular expression tests on the ``PATH_INFO`` and calling registered callback fun...
westinedu/newertrends
refs/heads/master
zinnia/views/archives.py
2
"""Views for Zinnia archives""" import datetime from django.views.generic.dates import BaseArchiveIndexView from django.views.generic.dates import BaseYearArchiveView from django.views.generic.dates import BaseMonthArchiveView from django.views.generic.dates import BaseWeekArchiveView from django.views.generic.dates i...
Daniel-CA/odoo
refs/heads/8.0
addons/base_action_rule/tests/base_action_rule_test.py
395
from openerp import SUPERUSER_ID from openerp.tests import common from .. import test_models class base_action_rule_test(common.TransactionCase): def setUp(self): """*****setUp*****""" super(base_action_rule_test, self).setUp() cr, uid = self.cr, self.uid self.demo = self.registry(...
ptisserand/portage
refs/heads/master
pym/portage/output.py
2
# Copyright 1998-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from __future__ import division __docformat__ = "epytext" import errno import io import formatter import re import subprocess import sys import portage portage.proxy.lazyimport.lazyimport(globals(), 'portage....
boonedox/AutobahnPython
refs/heads/master
examples/wamp/dbus/server.py
27
############################################################################### ## ## Copyright 2012 Tavendo 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...
Star2Billing/cdr-stats
refs/heads/develop
cdr_stats/voip_billing/models.py
1
# # CDR-Stats License # http://www.cdr-stats.org # # 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/. # # Copyright (C) 2011-2015 Star2Billing S.L. # # The Initial Develope...
dou800/php-buildpack-legacy
refs/heads/master
builds/runtimes/python-2.7.6/lib/python2.7/test/test_int_literal.py
139
"""Test correct treatment of hex/oct constants. This is complex because of changes due to PEP 237. """ import unittest from test import test_support class TestHexOctBin(unittest.TestCase): def test_hex_baseline(self): # A few upper/lowercase tests self.assertEqual(0x0, 0X0) self.assertE...
Desarrollo-CeSPI/meran
refs/heads/0.10.7
dev-plugins/node/lib/node/wafadmin/Tools/unittestw.py
4
#!/usr/bin/env python # Meran - MERAN UNLP is a ILS (Integrated Library System) wich provides Catalog, # Circulation and User's Management. It's written in Perl, and uses Apache2 # Web-Server, MySQL database and Sphinx 2 indexing. # Copyright (C) 2009-2013 Grupo de desarrollo de Meran CeSPI-UNLP # # This file is part ...
jeasoft/odoo
refs/heads/marcos-8.0
addons/account_anglo_saxon/stock.py
208
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
nicko96/Chrome-Infra
refs/heads/master
appengine/findit/handlers/test/failure_log_test.py
1
# Copyright 2015 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. import os import re from google.appengine.ext import testbed import webapp2 import webtest from testing_utils import testing from handlers import failure_...
adamtiger/tensorflow
refs/heads/master
tensorflow/contrib/distributions/python/kernel_tests/bijectors/chain_test.py
70
# 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...
simzacks/jjb
refs/heads/master
jenkins_jobs/modules/metadata.py
25
# Copyright 2012 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
SravanthiSinha/edx-platform
refs/heads/master
openedx/core/lib/logsettings.py
127
"""Get log settings.""" import os import platform import sys from logging.handlers import SysLogHandler LOG_LEVELS = ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'] def get_logger_config(log_dir, logging_env="no_env", tracking_filename="tracking.log", ...
foobarbazblarg/stayclean
refs/heads/master
stayclean-2015-september/display.py
1
#!/usr/bin/python import participantCollection import re import datetime import pyperclip currentMonthIndex = datetime.date.today().month #TODO: need to figure out how to get total days in current month... currentMonthTotalDays = 30 currentMonthPenultimateDayIndex = currentMonthTotalDays - 1 currentMonthName = {1:'Jan...
vicky2135/lucious
refs/heads/master
oscar/lib/python2.7/site-packages/sqlparse/keywords.py
10
# -*- coding: utf-8 -*- # # Copyright (C) 2016 Andi Albrecht, albrecht.andi@gmail.com # # This module is part of python-sqlparse and is released under # the BSD License: https://opensource.org/licenses/BSD-3-Clause import re from sqlparse import tokens def is_keyword(value): val = value.upper() return (KEYW...
hbutau/zimlearner
refs/heads/master
.ropeproject/config.py
84
# The default ``config.py`` def set_prefs(prefs): """This function is called before opening the project""" # Specify which files and folders to ignore in the project. # Changes to ignored resources are not added to the history and # VCSs. Also they are not returned in `Project.get_files()`. # No...
andreadelrio/bedrock
refs/heads/master
bedrock/grants/models.py
12133432
mgit-at/ansible
refs/heads/devel
lib/ansible/plugins/action/group_by.py
122
# Copyright 2012, Jeroen Hoekx <jeroen@hoekx.be> # # 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 ve...
mtiny/pyroute2
refs/heads/master
tests/general/test_netns.py
5
import os import time import fcntl import subprocess from pyroute2 import IPDB from pyroute2 import IPRoute from pyroute2 import NetNS from pyroute2 import NSPopen from pyroute2.common import uifname from pyroute2.netns.process.proxy import NSPopen as NSPopenDirect from pyroute2 import netns as netnsmod from uuid impor...
anthgur/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/manifest/__init__.py
109
from . import item from . import manifest from . import sourcefile from . import update
zdary/intellij-community
refs/heads/master
python/testData/wrap/WrapInArgumentList.py
83
def foo(abracadabra1, abracadabra2, abracadabra3, abracadabra4, abracadabra5<caret>
1nc1n3rat0r/scapy
refs/heads/master
scapy/layers/lltd.py
7
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more informations # Copyright (C) Philippe Biondi <phil@secdev.org> # This program is published under a GPLv2 license """LLTD Protocol https://msdn.microsoft.com/en-us/library/cc233983.aspx """ import struct from array import array from sc...
rcarrillocruz/ansible
refs/heads/devel
lib/ansible/modules/network/aos/aos_template.py
36
#!/usr/bin/python # # (c) 2017 Apstra Inc, <community@apstra.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 opt...
mongodb/mongo-python-driver
refs/heads/master
test/unified_format.py
2
# Copyright 2020-present MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
Grirrane/odoo
refs/heads/master
addons/payment/tests/common.py
392
# -*- coding: utf-8 -*- from openerp.tests import common class PaymentAcquirerCommon(common.TransactionCase): def setUp(self): super(PaymentAcquirerCommon, self).setUp() self.payment_acquirer = self.registry('payment.acquirer') self.payment_transaction = self.registry('payment.transactio...
davidyezsetz/kuma
refs/heads/master
vendor/packages/ipython/IPython/ConfigLoader.py
7
# -*- coding: utf-8 -*- """Configuration loader """ #***************************************************************************** # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu> # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part ...
ahmedshafeeq/otp
refs/heads/maint
lib/asn1/test/asn1_SUITE_data/XSetOf.py
97
XSetOf DEFINITIONS ::= BEGIN -- F.2.11.4 --Use a set-of type to model a collection of variables whose types are -- the same and whose order is insignificant. -- EXAMPLE Keywords ::= SET OF VisibleString -- in arbitrary order someASN1Keywords Keywords ::= {"INTEGER", "BOOLEAN", "REAL"} END
zhhf/charging
refs/heads/master
charging/plugins/vmware/plugins/__init__.py
12133432
robintema/django-otp
refs/heads/master
django_otp/plugins/otp_email/__init__.py
12133432
abendig/django-mailchimp
refs/heads/master
mailchimp/migrations/__init__.py
12133432
kobejean/tensorflow
refs/heads/master
tensorflow/examples/tutorials/input_fn/__init__.py
12133432
keedio/hue
refs/heads/master
desktop/core/ext-py/django-nose-1.3/django_nose/management/__init__.py
12133432
romain-dartigues/ansible
refs/heads/devel
test/integration/targets/module_utils/module_utils/spam6/__init__.py
12133432
nuagenetworks/nuage-openstack-neutron
refs/heads/master
nuage_neutron/db/migration/alembic_migrations/versions/liberty_release.py
2
# 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...
Sendoushi/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/wptserve/wptserve/__init__.py
329
from server import WebTestHttpd, WebTestServer, Router from request import Request from response import Response
LearnEra/LearnEraPlaftform
refs/heads/master
cms/djangoapps/contentstore/management/commands/course_id_clash.py
18
""" Script for finding all courses whose org/name pairs == other courses when ignoring case """ from django.core.management.base import BaseCommand from xmodule.modulestore.django import modulestore from xmodule.modulestore import ModuleStoreEnum # # To run from command line: ./manage.py cms --settings dev course_id_...
svn2github/gyp
refs/heads/master
pylib/gyp/common.py
9
# 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. from __future__ import with_statement import collections import errno import filecmp import os.path import re import tempfile import sys # A minimal memoizing d...
GuillaumeBadi/Python-App-Engine
refs/heads/master
lib/requests/auth.py
41
# -*- coding: utf-8 -*- """ requests.auth ~~~~~~~~~~~~~ This module contains the authentication handlers for Requests. """ import os import re import time import hashlib import threading from base64 import b64encode from .compat import urlparse, str from .cookies import extract_cookies_to_jar from .utils import pa...
abhattad4/Digi-Menu
refs/heads/master
digimenu2/build/lib.linux-x86_64-2.7/django/contrib/gis/db/backends/postgis/models.py
396
""" The GeometryColumns and SpatialRefSys models for the PostGIS backend. """ from django.contrib.gis.db.backends.base.models import SpatialRefSysMixin from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class PostGISGeometryColumns(models.Model): ...
Nick-OpusVL/odoo
refs/heads/8.0
addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py
340
# -*- 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...
huanpc/IoT-1
refs/heads/master
gui/controller/.venv/lib/python3.5/site-packages/pip/_vendor/progress/counter.py
510
# -*- coding: utf-8 -*- # Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS P...
marqh/iris
refs/heads/master
lib/iris/tests/unit/analysis/scipy_interpolate/test__RegularGridInterpolator.py
16
# (C) British Crown Copyright 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 later ve...
thingsboard/thingsboard-gateway
refs/heads/master
thingsboard_gateway/tb_utility/tb_gateway_remote_configurator.py
1
# Copyright 2021. ThingsBoard # # 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 ...
coolhacks/docker-hacks
refs/heads/master
examples/traductor/traductor/translators/base.py
2
class BaseTranslator(object): def translate(self, value): """ :param value: :return: """ raise NotImplementedError("translate method must be implemented.")
antb/TPT----My-old-mod
refs/heads/master
src/python/stdlib/test/test_dictcomps.py
39
doctests = """ >>> k = "old value" >>> { k: None for k in range(10) } {0: None, 1: None, 2: None, 3: None, 4: None, 5: None, 6: None, 7: None, 8: None, 9: None} >>> k 'old value' >>> { k: k+10 for k in range(10) } {0: 10, 1: 11, 2: 12, 3: 13, 4: 14, 5: 15, 6: 16, 7: 17, 8: 18, 9: 19} ...
yannickcr/Sick-Beard
refs/heads/development
bs4/tests/test_lxml.py
97
"""Tests to ensure that the lxml tree builder generates good trees.""" import re import warnings try: from bs4.builder import LXMLTreeBuilder, LXMLTreeBuilderForXML LXML_PRESENT = True except ImportError, e: LXML_PRESENT = False from bs4 import ( BeautifulSoup, BeautifulStoneSoup, ) from bs4....
adw0rd/lettuce-py3
refs/heads/master
tests/unit/test_language.py
7
# -*- coding: utf-8 -*- # <Lettuce - Behaviour Driven Development for python> # Copyright (C) <2010-2012> Gabriel Falcão <gabriel@nacaolivre.org> # # 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 Foundatio...
mancoast/mpir
refs/heads/master
build.vc15/mpir-tune/tune/tune_prebuild.py
37
 from os.path import exists print('Performing tune prebuild ...') basic = [ 'dc_bdiv_qr.c', 'dc_bdiv_qr_n.c', 'dc_bdiv_q.c', 'dc_divappr_q.c', 'dc_div_qr.c', 'dc_div_qr_n.c', 'divrem_2.c', 'divrem_euclidean_r_1.c', 'divrem_hensel_qr_1.c', 'gcd.c', 'gcdext.c', 'get_str.c', 'hgcd.c', 'hgcd_appr.c', 'hgcd_red...
tmr232/Gooey
refs/heads/master
gooey/_tmp/mockapp.py
9
''' Created on Dec 21, 2013 @author: Chris ''' import sys import hashlib from time import time as _time, time from time import sleep as _sleep # from argparse import ArgumentParser # import argparse import argparse as ap from argparse import ArgumentParser as AP from gooey import Gooey from gooey impor...
MakeHer/edx-platform
refs/heads/dashboard.2
openedx/core/djangoapps/content/course_overviews/migrations/0002_add_course_catalog_fields.py
81
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('course_overviews', '0001_initial'), ] operations = [ migrations.AddField( model_name='courseoverview', ...
mikebsg01/Programming-Contests
refs/heads/master
CODEFORCES/Codeforces Round #552 (Div. 3)/Template.py
45
from sys import stdin def readLine(): return stdin.readline().strip() def readInt(): return int(readLine()) def readInts(): return list(map(int, readLine().split())) T, N = 0, 0 def main(): N = readInt() print(N) if __name__ == '__main__': main()
nkalodimas/invenio
refs/heads/master
modules/websubmit/lib/functions/Print_Success_Approval_Request.py
39
## This file is part of Invenio. ## Copyright (C) 2008, 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 your option) any later versio...
ncliam/serverpos
refs/heads/master
openerp/addons/website_event_track/__init__.py
1577
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
ufukdogan92/is-teklif-sistemi
refs/heads/master
ilan/migrations/0006_auto_20170522_1704.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-22 17:04 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ilan', '0005_auto_20170522_1527'), ] operations = [ migrations.AddField( ...
zhuwenping/python-for-android
refs/heads/master
python-modules/twisted/twisted/mail/test/test_imap.py
49
# -*- test-case-name: twisted.mail.test.test_imap -*- # Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ Test case for twisted.mail.imap4 """ try: from cStringIO import StringIO except ImportError: from StringIO import StringIO import os import types import codecs from zo...
kevin-coder/tensorflow-fork
refs/heads/master
tensorflow/contrib/rate/rate_test.py
23
# 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...
lemaiyan/yowsup
refs/heads/master
yowsup/layers/axolotl/protocolentities/test_iq_keys_set.py
68
from yowsup.layers.protocol_iq.protocolentities.test_iq import IqProtocolEntityTest from yowsup.layers.axolotl.protocolentities import SetKeysIqProtocolEntity from yowsup.structs import ProtocolTreeNode class SetKeysIqProtocolEntityTest(IqProtocolEntityTest): def setUp(self): super(SetKeysIqProtocolEntityTe...
jordotech/sherri_satchmo
refs/heads/master
satchmo/apps/satchmo_store/accounts/views.py
6
from django.conf import settings from django.contrib.auth import login, REDIRECT_FIELD_NAME from django.contrib.sites.models import Site, RequestSite from django.core import urlresolvers from django.http import HttpResponseRedirect, QueryDict from django.shortcuts import render_to_response from django.template import R...
jhseu/tensorflow
refs/heads/master
tensorflow/compiler/tests/lrn_ops_test.py
24
# 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...
norayr/unisubs
refs/heads/staging
apps/videos/migrations/0015_auto__add_field_action_comment.py
5
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): depends_on = ( ("comments", "0001_initial"), ) def forwards(self, orm): # Adding field 'Action.comment' ...
robertkowalski/node-gyp
refs/heads/master
gyp/tools/graphviz.py
2679
#!/usr/bin/env python # Copyright (c) 2011 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Using the JSON dumped by the dump-dependency-json generator, generate input suitable for graphviz to render a dependency graph of targets...
allotria/intellij-community
refs/heads/master
python/testData/refactoring/makeFunctionTopLevel/methodInsertionPositionUsageInAnotherFile/after/other.py
31
def already_existing1(): pass def already_existing2(): pass from main import C def method(): pass method() def already_existing3(): pass
suncycheng/intellij-community
refs/heads/master
python/testData/resolve/multiFile/relativeSimple/sys.py
83
token = "local"
mdakin/engine
refs/heads/master
build/android/pylib/local/local_test_server_spawner.py
58
# Copyright 2014 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 pylib import chrome_test_server_spawner from pylib import forwarder from pylib.base import test_server class LocalTestServerSpawner(test_server.TestSe...
hpcloud-mon/tempest
refs/heads/master
tempest/api/identity/__init__.py
44
# 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...
thedrow/django
refs/heads/master
django/db/backends/postgresql_psycopg2/operations.py
207
from __future__ import unicode_literals from psycopg2.extras import Inet from django.conf import settings from django.db.backends.base.operations import BaseDatabaseOperations class DatabaseOperations(BaseDatabaseOperations): def unification_cast_sql(self, output_field): internal_type = output_field.get...
capveg/bigcode
refs/heads/master
tools/infra.py
7
#!/usr/bin/env python ################################################################ # # Copyright 2013, Big Switch Networks, Inc. # # Licensed under the Eclipse Public License, Version 1.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the Licens...
kenwang76/readthedocs.org
refs/heads/master
readthedocs/vcs_support/backends/hg.py
34
from readthedocs.projects.exceptions import ProjectImportError from readthedocs.vcs_support.base import BaseVCS, VCSVersion class Backend(BaseVCS): supports_tags = True supports_branches = True fallback_branch = 'default' def update(self): super(Backend, self).update() retcode = self....
2014c2g3/0623exam
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/browser/websocket_1.py
618
from browser import window import javascript WebSocket = javascript.JSConstructor(window.WebSocket)
gangadharkadam/sher
refs/heads/develop
erpnext/accounts/doctype/journal_voucher/journal_voucher.py
5
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import cint, cstr, flt, fmt_money, formatdate, getdate from frappe import msgprint, _, scrub from erpnext.setup.util...
eBay/cronus-agent
refs/heads/master
agent/agent/lib/agent_thread/download_thread.py
1
#pylint: disable=W0703,W0511,W0402,R0911,R0915,R0912,W0331,W0612,R0904,W0105 ''' Copyright 2014 eBay Software 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/li...
8l/beri
refs/heads/master
cheritest/trunk/tests/cp0/test_tltiu_eq.py
2
#- # Copyright (c) 2011 Robert N. M. Watson # All rights reserved. # # This software was developed by SRI International and the University of # Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 # ("CTSRD"), as part of the DARPA CRASH research programme. # # @BERI_LICENSE_HEADER_START@ # # License...
superbeckgit/dstauffman
refs/heads/master
latex.py
1
# -*- coding: utf-8 -*- r""" Support functions used to create LaTeX documentation. Notes ----- #. Written by David C. Stauffer in Jan 2015, moved to separate file in Jan 2017. """ #%% Imports import doctest import unittest #%% Functions - make_preamble def make_preamble(caption, label, cols, size=r'\small', *, use_m...
gVallverdu/pymatgen
refs/heads/master
pymatgen/electronic_structure/tests/test_boltztrap2.py
3
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import unittest import os import warnings from pymatgen.io.vasp import Vasprun from pymatgen.electronic_structure.core import Spin, OrbitalType import numpy as np from monty.serialization import loadfn try:...
Spiderlover/Toontown
refs/heads/master
toontown/ai/DistributedPolarPlaceEffectMgrAI.py
3
from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI from direct.distributed.ClockDelta import * from direct.fsm.FSM import FSM import time class DistributedPolarPlaceEffectMgrAI(DistributedObjectAI, FSM): notify = DirectNotifyGlobal.directNotify...
marma/rdflib
refs/heads/master
rdflib/plugins/parsers/pyRdfa/termorcurie.py
22
# -*- coding: utf-8 -*- """ Management of vocabularies, terms, and their mapping to URI-s. The main class of this module (L{TermOrCurie}) is, conceptually, part of the overall state of processing at a node (L{state.ExecutionContext}) but putting it into a separate module makes it easider to maintain. @summary: Managem...
solashirai/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/library_root_xblock.py
42
""" 'library' XBlock (LibraryRoot) """ import logging from xmodule.studio_editable import StudioEditableModule from xblock.fields import Scope, String, List, Boolean from xblock.fragment import Fragment from xblock.core import XBlock log = logging.getLogger(__name__) # Make '_' a no-op so we can scrape strings. Usi...
curbyourlitter/curbyourlitter-alley
refs/heads/master
curbyourlitter_alley/canrequests/management/commands/cleancanrequests.py
1
from datetime import timedelta from django.core.management.base import BaseCommand from django.utils.timezone import now from ...models import CanRequest class Command(BaseCommand): help = 'Clean can requests that are incompete' def handle(self, *args, **options): can_requests = CanRequest.objects....
yland/mailman3
refs/heads/develop
src/mailman/handlers/subject_prefix.py
8
# Copyright (C) 2014-2015 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # # GNU Mailman 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 you...
YUNZHONGTAN/MY_Python_script
refs/heads/master
soft_ware/pymongo-3.2/pymongo/monitoring.py
18
# Copyright 2015 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you # may not use this file except in compliance with the License. You # may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
ntoll/code-dojo
refs/heads/master
adventure/week3/team2/adventure.py
1
#!/usr/bin/python from cmd import Cmd DIRECTIONS = 'N', 'E', 'S', 'W' NORTH, EAST, SOUTH, WEST = DIRECTIONS class Player(object): def __init__(self, location, name='Player'): assert isinstance(location, Location) self.location = location self.name = name self.inventory = {} class...
havard024/prego
refs/heads/master
venv/lib/python2.7/site-packages/django/conf/locale/zh_CN/__init__.py
12133432
fidodaj/project3
refs/heads/master
server/lib/flask/exthook.py
783
# -*- coding: utf-8 -*- """ flask.exthook ~~~~~~~~~~~~~ Redirect imports for extensions. This module basically makes it possible for us to transition from flaskext.foo to flask_foo without having to force all extensions to upgrade at the same time. When a user does ``from flask.ext.foo import...
Eforcers/inbox-cleaner
refs/heads/master
src/lib/gdata/tlslite/FileObject.py
359
"""Class returned by TLSConnection.makefile().""" class FileObject: """This class provides a file object interface to a L{tlslite.TLSConnection.TLSConnection}. Call makefile() on a TLSConnection to create a FileObject instance. This class was copied, with minor modifications, from the _fileobject...