repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
sodhancha/Godown
refs/heads/master
invoices/tests.py
24123
from django.test import TestCase # Create your tests here.
jwlawson/tensorflow
refs/heads/master
tensorflow/contrib/py2tf/convert/__init__.py
3
# 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...
amenonsen/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/aws_config_recorder.py
12
#!/usr/bin/python # Copyright: (c) 2018, Aaron Smith <ajsmith10381@gmail.com> # 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', ...
linearhub/titanium_mobile
refs/heads/master
node_modules/ioslib/node_modules/node-ios-device/node_modules/node-gyp/gyp/pylib/gyp/common.py
366
# 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...
remenska/iSDM
refs/heads/master
iSDM/model.py
1
""" A module for preparing all environmental layers used for fitting a model, into a single dataframe, of a convenient format. .. moduleauthor:: Daniela Remenska <remenska@gmail.com> """ from enum import Enum from iSDM.environment import RasterEnvironmentalLayer, VectorEnvironmentalLayer import pandas as pd im...
jennolsen84/PyTables
refs/heads/develop
doc/sphinxext/apigen.py
12
"""Attempt to generate templates for module reference with Sphinx XXX - we exclude extension modules To include extension modules, first identify them as valid in the ``_uri2path`` method, then handle them in the ``_parse_module`` script. We get functions and classes by parsing the text of .py files. Alternatively w...
charlesccychen/incubator-beam
refs/heads/master
sdks/python/apache_beam/io/restriction_trackers_test.py
5
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
phihag/youtube-dl
refs/heads/master
youtube_dl/extractor/nzz.py
50
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( extract_attributes, ) class NZZIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?nzz\.ch/(?:[^/]+/)*[^/?#]+-ld\.(?P<id>\d+)' _TEST = { 'url': 'http://www.nzz.ch/zuerich/gy...
gemmaan/moviesenal
refs/heads/master
Hasil/Lib/site-packages/pip/_vendor/requests/adapters.py
356
# -*- 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 .models import Response from .packages.urllib3.poolmanager import PoolManager, proxy_from_url from .packages.urllib...
vlachoudis/sl4a
refs/heads/master
python-build/python-libs/gdata/src/gdata/tlslite/integration/SMTP_TLS.py
319
"""TLS Lite + smtplib.""" from smtplib import SMTP from gdata.tlslite.TLSConnection import TLSConnection from gdata.tlslite.integration.ClientHelper import ClientHelper class SMTP_TLS(SMTP): """This class extends L{smtplib.SMTP} with TLS support.""" def starttls(self, username=None, password...
hottwaj/django
refs/heads/master
tests/staticfiles_tests/cases.py
270
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import codecs import os import shutil import tempfile from django.conf import settings from django.core.management import call_command from django.template import Context, Template from django.test import SimpleTestCase, override_settings from django.u...
edgarli/proj8
refs/heads/master
env/lib/python3.4/site-packages/pip/commands/install.py
187
from __future__ import absolute_import import logging import operator import os import tempfile import shutil import warnings try: import wheel except ImportError: wheel = None from pip.req import RequirementSet from pip.basecommand import RequirementCommand from pip.locations import virtualenv_no_global, dis...
jdegraaf/espresso
refs/heads/master
testsuite/python/magnetostaticInteractions.py
6
# # Copyright (C) 2013,2014 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo 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...
Programmica/pygtk-tutorial
refs/heads/master
examples/assistant.py
1
#!/usr/bin/env python import gtk class Assistant(gtk.Assistant): def __init__(self): gtk.Assistant.__init__(self) self.set_title("Assistant") self.set_default_size(400, -1) self.connect("apply", self.on_apply_clicked) self.connect("close", self.on_close_clicked) sel...
MiCHiLU/python-oauth2
refs/heads/six
oauth2/__init__.py
1
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel 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 ...
manodeep/Corrfunc
refs/heads/master
Corrfunc/theory/DDrppi.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Python wrapper around the C extension for the pair counter in ``theory/DDrppi/``. This wrapper is in :py:mod:`Corrfunc.theory.DDrppi` """ from __future__ import (division, print_function, absolute_import, unicode_literals) __author__ = ('Manod...
AOSPU/external_chromium_org
refs/heads/android-5.0/py3
content/shell/tools/breakpad_integration_test.py
16
#!/usr/bin/env python # # 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. """Integration test for breakpad in content shell. This test checks that content shell and breakpad are correctly hooked up, as well...
Bitergia/allura
refs/heads/master
ForgeSVN/forgesvn/templates/__init__.py
12133432
flwh/KK_mt6589_iq451
refs/heads/master
prebuilts/python/darwin-x86/2.7.5/lib/python2.7/sqlite3/test/__init__.py
12133432
simodalla/newage
refs/heads/master
newage/tests/__init__.py
16
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import
alqfahad/odoo
refs/heads/8.0
addons/l10n_pe/__openerp__.py
260
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 Cubic ERP - Teradata SAC (<http://cubicerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the...
dssg/wikienergy
refs/heads/master
disaggregator/build/pandas/pandas/core/generic.py
1
# pylint: disable=W0231,E1101 import warnings import operator import weakref import gc import numpy as np import pandas.lib as lib import pandas as pd from pandas.core.base import PandasObject from pandas.core.index import (Index, MultiIndex, _ensure_index, InvalidIndexError) import pand...
jantman/pyobd
refs/heads/master
obd_recorder.py
9
#!/usr/bin/env python import obd_io import serial import platform import obd_sensors from datetime import datetime import time from obd_utils import scanSerial class OBD_Recorder(): def __init__(self, path, log_items): self.port = None self.sensorlist = [] localtime = time.localtime(time....
elshize/qutebrowser
refs/heads/master
qutebrowser/commands/command.py
3
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
rebost/django
refs/heads/master
django/contrib/localflavor/si/forms.py
8
""" Slovenian specific form helpers. """ from __future__ import absolute_import, unicode_literals import datetime import re from django.contrib.localflavor.si.si_postalcodes import SI_POSTALCODES_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields...
mvaled/sentry
refs/heads/master
src/bitfield/compat.py
3
from __future__ import absolute_import __all__ = ("bitand", "bitor") def bitand(a, b): return a.bitand(b) def bitor(a, b): return a.bitor(b)
DaanHoogland/cloudstack
refs/heads/patch-2
tools/marvin/marvin/settings.py
8
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
tangrams/yaml-cpp
refs/heads/master
test/gtest-1.8.0/googletest/test/gtest_env_var_test.py
343
#!/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...
MemeticParadigm/TensorFlow
refs/heads/master
tensorflow/models/rnn/seq2seq.py
2
"""Library for creating sequence-to-sequence models.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.python.platform from six.moves import xrange # pylint: disable=redefined-builtin import tensorflow as tf from tensorflow.models.rnn i...
willzhang05/postgrestesting1
refs/heads/master
postgrestesting1/lib/python3.5/site-packages/django/utils/autoreload.py
26
# Autoreloading launcher. # Borrowed from Peter Hunt and the CherryPy project (http://www.cherrypy.org). # Some taken from Ian Bicking's Paste (http://pythonpaste.org/). # # Portions copyright (c) 2004, CherryPy Team (team@cherrypy.org) # All rights reserved. # # Redistribution and use in source and binary forms, with ...
jusdng/odoo
refs/heads/8.0
doc/_extensions/html_domain.py
254
# -*- coding: utf-8 -*- """ Defines a "raw HTML" domain with a ``div[classes]`` and a number of roles rendered more or less directly to HTML. .. warning:: the purpose of this domain is *not* to document HTML or components """ from docutils import nodes, utils from docutils.parsers.rst import Directive, directiv...
GunoH/intellij-community
refs/heads/master
python/testData/completion/fStringLikeCompletionInOrdinaryStringLiterals.after.py
20
my_expr = 42 s = f'foo{my_expr}'
jopohl/urh
refs/heads/master
src/urh/util/GenericCRC.py
1
import array import copy from collections import OrderedDict from xml.etree import ElementTree as ET from urh.cythonext import util as c_util from urh.util import util class GenericCRC(object): # https://en.wikipedia.org/wiki/Polynomial_representations_of_cyclic_redundancy_checks DEFAULT_POLYNOMIALS = Ordere...
sivel/ansible-modules-extras
refs/heads/devel
packaging/language/maven_artifact.py
22
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2014, Chris Schmidt <chris.schmidt () contrastsecurity.com> # # Built using https://github.com/hamnis/useful-scripts/blob/master/python/download-maven-artifact # as a reference and starting point. # # This module is free software: you can redistribute it and/or...
snasoft/QtCreatorPluginsPack
refs/heads/master
Bin/3rdParty/vera/bin/lib/distutils/command/bdist_msi.py
164
# -*- coding: iso-8859-1 -*- # Copyright (C) 2005, 2006 Martin von Löwis # Licensed to PSF under a Contributor Agreement. # The bdist_wininst command proper # based on bdist_wininst """ Implements the bdist_msi command. """ import sys, os from sysconfig import get_python_version from distutils.core import Command from...
Emercoin/emcweb
refs/heads/master
engine/emcweb/emcweb/backups/local/__init__.py
1
from .client import backup, check_auth __name__ = 'Local PC'
jphber/django-avanzado
refs/heads/master
artists/migrations/0002_track_listen.py
3
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('artists', '0001_initial'), ] operations = [ migrations.AddField( model_name='track', name='listen', ...
dmccloskey/SBaaS_MFA
refs/heads/master
SBaaS_MFA/stage02_isotopomer_analysis_io.py
1
# System import json # SBaaS from .stage02_isotopomer_analysis_query import stage02_isotopomer_analysis_query from SBaaS_base.sbaas_template_io import sbaas_template_io # Resources from io_utilities.base_importData import base_importData from io_utilities.base_exportData import base_exportData class stage02_isotopomer...
kimimj/scrapy
refs/heads/master
scrapy/signalmanager.py
123
from __future__ import absolute_import from pydispatch import dispatcher from scrapy.utils import signal as _signal class SignalManager(object): def __init__(self, sender=dispatcher.Anonymous): self.sender = sender def connect(self, receiver, signal, **kwargs): """ Connect a receiver...
HandyCodeJob/mikeandzoey-site
refs/heads/master
src/rsvp/tests.py
24123
from django.test import TestCase # Create your tests here.
liuenyan/django-blog
refs/heads/master
blog/tests.py
24123
from django.test import TestCase # Create your tests here.
h2oai/h2o
refs/heads/master
scripts/validate_r_cmd_check_output.py
8
#!/usr/bin/python # # CRAN submissions use the R CMD CHECK --as-cran approach. # But that unfortunately does not do a good job of flagging errors in a way that can be automated. # # This tool goes combs through the output and returns 0 if it's good and nonzero if it's bad. # import sys import os import re class Che...
richardfergie/googleads-python-lib
refs/heads/master
examples/dfa/v1_20/create_flash_inpage_creative.py
4
#!/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...
KrisLee/libgdx
refs/heads/master
extensions/gdx-freetype/jni/freetype-2.5.5/src/tools/docmaker/content.py
146
# # content.py # # Parse comment blocks to build content blocks (library file). # # Copyright 2002, 2004, 2006-2009, 2012-2014 by # David Turner. # # This file is part of the FreeType project, and may only be used, # modified, and distributed under the terms of the FreeType project # license, LICENSE.TXT. By ...
florian-dacosta/OCB
refs/heads/8.0
addons/account/wizard/account_financial_report.py
345
# -*- 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...
kalaidin/luigi
refs/heads/master
dummy_test_module/not_imported.py
66
import luigi class UnimportedTask(luigi.Task): def complete(self): return False
kennjason/ursula
refs/heads/master
library/rabbitmq_policy.py
16
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, John Dewey <john@dewey.ws> # # 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, o...
alex/readthedocs.org
refs/heads/master
readthedocs/projects/urls/public.py
1
from django.conf.urls.defaults import * urlpatterns = patterns('projects.views.public', url(r'^$', 'project_index', name='projects_list' ), url(r'^tags/$', 'tag_index', name='projects_tag_list', ), url(r'^search/$', 'search', name='project_search', ...
fengshao0907/fbthrift
refs/heads/master
thrift/test/copy_files.py
16
#!/usr/local/bin/python import os import shutil import string import sys if __name__ == "__main__": dir = "." for arg in sys.argv: pair = string.split(arg, '=') if len(pair) == 2 and pair[0] == "--install_dir": dir = pair[1] if not os.path.exists(dir): os.makedirs(dir)...
cobrab11/blacksmith-2
refs/heads/master
expansions/exp_control/insc.py
3
# coding: utf-8 if DefLANG in ("RU", "UA"): AnsBase_temp = tuple([line.decode("utf-8") for line in ( "\n[Название][состояние][файл кода][языковой файл]", # 0 "в наличии", # 1 "отсутствует", # 2 "загружен", # 3 "\nКоманды: %s", # 4 "\nФункции: %s", # 5 "не загружен", # 6 "Судя по всему нет такого плаги...
Gitlab11/odoo
refs/heads/8.0
addons/website_event/__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 ...
CUCWD/edx-platform
refs/heads/master
common/djangoapps/xblock_django/migrations/0002_auto_20160204_0809.py
60
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('xblock_django', '0001_initial'), ] operations = [ migrations.AddField( model_name='xblockdisableconfig', ...
Medigate/cutiuta-server
refs/heads/master
cutiuta-server/env/lib/python3.4/site-packages/_markerlib/__init__.py
1008
try: import ast from _markerlib.markers import default_environment, compile, interpret except ImportError: if 'ast' in globals(): raise def default_environment(): return {} def compile(marker): def marker_fn(environment=None, override=None): # 'empty markers are T...
adelton/django
refs/heads/master
tests/postgres_tests/test_aggregates.py
307
from django.contrib.postgres.aggregates import ( ArrayAgg, BitAnd, BitOr, BoolAnd, BoolOr, Corr, CovarPop, RegrAvgX, RegrAvgY, RegrCount, RegrIntercept, RegrR2, RegrSlope, RegrSXX, RegrSXY, RegrSYY, StatAggregate, StringAgg, ) from django.db.models.expressions import F, Value from django.test.utils import A...
gghatano/scipy_2015_sklearn_tutorial
refs/heads/master
notebooks/figures/plot_digits_datasets.py
19
# Taken from example in scikit-learn examples # Authors: Fabian Pedregosa <fabian.pedregosa@inria.fr> # Olivier Grisel <olivier.grisel@ensta.org> # Mathieu Blondel <mathieu@mblondel.org> # Gael Varoquaux # License: BSD 3 clause (C) INRIA 2011 import numpy as np import matplotlib.pyplot as pl...
glneo/gnuradio
refs/heads/master
gr-wxgui/python/wxgui/plotter/common.py
47
# # Copyright 2009 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. # #...
skmezanul/seahub
refs/heads/master
seahub/utils/repo.py
1
# -*- coding: utf-8 -*- from seaserv import seafile_api from seahub.utils import EMPTY_SHA1 def list_dir_by_path(cmmt, path): if cmmt.root_id == EMPTY_SHA1: return [] else: return seafile_api.list_dir_by_commit_and_path(cmmt.repo_id, cmmt.id, path)
zonca/pelican-plugins
refs/heads/master
pdf/__init__.py
77
from .pdf import *
cotsog/sample-code
refs/heads/master
sample-code/examples/python/selendroid_simple.py
36
import os from time import sleep import unittest from appium import webdriver # Returns abs path relative to this file and not cwd PATH = lambda p: os.path.abspath( os.path.join(os.path.dirname(__file__), p) ) # think times can be useful e.g. when testing with an emulator THINK_TIME = 5. class SimpleSalendroidT...
asiersarasua/QGIS
refs/heads/master
python/plugins/processing/algs/grass7/ext/v_sample.py
8
# -*- coding: utf-8 -*- """ *************************************************************************** v_sample.py ----------- Date : February 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr ************************************...
katevontaine/myblog2
refs/heads/master
node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/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...
aanwin/luno
refs/heads/master
frontend-auth/models/database.py
1
from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker from sqlalchemy.ext.declarative import declarative_base engine = create_engine('postgresql://luno:badger11@127.0.0.1/luno', convert_unicode=True) db_session = scoped_session(sessionmaker(autocommit=False, ...
mm1ke/portage
refs/heads/master
pym/portage/cache/flat_hash.py
4
# Copyright 2005-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # Author(s): Brian Harring (ferringb@gentoo.org) from __future__ import unicode_literals from portage.cache import fs_template from portage.cache import cache_errors import errno import io import stat import sys...
kejbaly2/invoke
refs/heads/master
invoke/platform.py
5
""" Platform-specific code lives here. This is its own module to abstract away what would otherwise be distracting logic-flow interruptions. """ import sys WINDOWS = (sys.platform == 'win32') """ Whether or not the current platform appears to be Windows in nature. Note that Cygwin's Python is actually close enough t...
Gadal/sympy
refs/heads/master
sympy/matrices/expressions/tests/test_trace.py
83
from sympy.core import Lambda, S, symbols from sympy.concrete import Sum from sympy.functions import adjoint, conjugate, transpose from sympy.matrices import eye, Matrix, ShapeError, ImmutableMatrix from sympy.matrices.expressions import ( Adjoint, Identity, FunctionMatrix, MatrixExpr, MatrixSymbol, Trace, Zero...
davidl1/hortonworks-extension
refs/heads/master
src/contrib/hod/hodlib/HodRing/hodRing.py
118
#Licensed to the Apache Software Foundation (ASF) under one #or more contributor license agreements. See the NOTICE file #distributed with this work for additional information #regarding copyright ownership. The ASF licenses this file #to you under the Apache License, Version 2.0 (the #"License"); you may not use thi...
IBM/differential-privacy-library
refs/heads/main
tests/mechanisms/test_LaplaceFolded.py
1
import numpy as np from unittest import TestCase from diffprivlib.mechanisms import LaplaceFolded from diffprivlib.utils import global_seed class TestLaplaceFolded(TestCase): def setup_method(self, method): if method.__name__ .endswith("prob"): global_seed(314159) self.mech = Laplace...
mjwtom/swift
refs/heads/master
swift/common/utils.py
2
# Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
towerjoo/DjangoNotes
refs/heads/master
Django-1.5.1/django/core/mail/backends/smtp.py
130
"""SMTP email backend class.""" import smtplib import ssl import threading from django.conf import settings from django.core.mail.backends.base import BaseEmailBackend from django.core.mail.utils import DNS_NAME from django.core.mail.message import sanitize_address from django.utils.encoding import force_bytes class...
anilveeramalli/cloudify-azure-plugin
refs/heads/master
blueprints/clustered-dns/dns/dns_add_reverse_record.py
1
import subprocess, os, sys from reverseZone_naming import reverseZone_name from netaddr import * curlybrace1="{" curlybrace2="}" zone_files_path="/etc/bind/zones" def add_reverse_record(): ip_address_to_be_added= sys.argv[1] host_name_to_be_added= sys.argv[2] record_valid=1 ip_valid=0 os.chdir("/root") network_a...
eggimasv/SNIP
refs/heads/master
Python_Files/SNIP_costs.py
1
# ====================================================================================== # Copyright 2014 Swiss Federal Institute of Aquatic Science and Technology # # This file is part of SNIP (Sustainable Network Infrastructure Planning) # SNIP is used for determining the optimal degree of centralization for waste #...
SimVascular/VTK
refs/heads/master
ThirdParty/Twisted/twisted/web/_auth/wrapper.py
47
# -*- test-case-name: twisted.web.test.test_httpauth -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ A guard implementation which supports HTTP header-based authentication schemes. If no I{Authorization} header is supplied, an anonymous login will be attempted by using a L{Anonymous} c...
coursemdetw/2015cdb
refs/heads/master
static/Brython3.1.0-20150301-090019/Lib/browser/websocket.py
618
from browser import window import javascript WebSocket = javascript.JSConstructor(window.WebSocket)
TridevGuha/django
refs/heads/master
django/core/management/commands/check.py
316
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.apps import apps from django.core import checks from django.core.checks.registry import registry from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): help = "Checks the entire Django project for p...
razvanphp/arangodb
refs/heads/devel
3rdParty/V8-3.31.74.1/tools/testrunner/__init__.py
651
# Copyright 2012 the V8 project authors. 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 conditi...
ayesandarmoe/microblog_flask_tutorial
refs/heads/master
flask/lib/python2.7/site-packages/werkzeug/contrib/sessions.py
256
# -*- coding: utf-8 -*- r""" werkzeug.contrib.sessions ~~~~~~~~~~~~~~~~~~~~~~~~~ This module contains some helper classes that help one to add session support to a python WSGI application. For full client-side session storage see :mod:`~werkzeug.contrib.securecookie` which implements a secure,...
CraigHarris/gpdb
refs/heads/master
gpMgmt/bin/gppylib/operations/test/regress/test_package/test_regress_simple_negative.py
54
#!/usr/bin/env python import os import tarfile from gppylib.commands.base import ExecutionError from gppylib.operations.test.regress.test_package import GppkgTestCase, unittest, GppkgSpec, RPMSpec, ARCH, OS, GPDB_VERSION class SimpleNegativeTestCase(GppkgTestCase): # @unittest.expectedFailure def test00_wron...
hifly/OpenUpgrade
refs/heads/8.0
addons/lunch/__openerp__.py
267
# -*- 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 the G...
gvpeek/django_football
refs/heads/master
django_football/leagues/tests.py
24123
from django.test import TestCase # Create your tests here.
mapbox/pixelmatch-cpp
refs/heads/master
deps/gyp/pylib/gyp/MSVSToolFile.py
2736
# 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. """Visual Studio project reader/writer.""" import gyp.common import gyp.easy_xml as easy_xml class Writer(object): """Visual Studio XML tool file writer.""" ...
myerssr/volatility
refs/heads/master
volatility/plugins/mac/route.py
44
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility 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 o...
plowman/python-mcparseface
refs/heads/master
models/syntaxnet/tensorflow/google/protobuf/python/google/protobuf/internal/text_format_test.py
15
#! /usr/bin/env python # # 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 the following conditions ...
sestrella/ansible
refs/heads/devel
lib/ansible/modules/cloud/vmware/vmware_drs_rule_info.py
21
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com> # 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 = { 'metadat...
brijeshkesariya/odoo
refs/heads/8.0
addons/sale_layout/models/sale_layout.py
180
# -*- 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 ...
flyapen/UgFlu
refs/heads/master
flumotion/component/producers/soundcard/wizard_gtk.py
1
# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # # Flumotion - a streaming media server # Copyright (C) 2004,2005,2006,2007,2008 Fluendo, S.L. (www.fluendo.com). # All rights reserved. # This file may be distributed and/or modified under the terms of # the GNU General Public License version 2 as published by # the ...
ic-labs/icekit-events
refs/heads/develop
icekit_events/page_types/eventlistingfordate/models.py
2
from icekit_events.models import AbstractEventListingForDatePage class EventListingPage(AbstractEventListingForDatePage): class Meta: verbose_name = "Event listing for date"
primercuervo/cognitive_radio_ml
refs/heads/master
python/cnn_k_1_2.py
1
#!/usr/bin/env python # pylint: disable=C0103 """ Training various Deep Learning Algorithms using Keras with Tensorboard backend This module takes paths to the location of images to be used for Image classification. As of now it is used for cognitive radio spectrum awareness based on the DySpan2017 Challenge spectrum ...
GiraldTec/2015-igraphic
refs/heads/master
mrdoob-three.js-f73593b/utils/exporters/blender/addons/io_three/exporter/io.py
201
import os import shutil from .. import constants, logger from . import _json def copy_registered_textures(dest, registration): """Copy the registered textures to the destination (root) path :param dest: destination directory :param registration: registered textures :type dest: str :type registrat...
idlesign/django-sitetree
refs/heads/master
sitetree/tests/testapp/admin.py
1
from sitetree.admin import TreeItemAdmin, TreeAdmin, override_tree_admin, override_item_admin class CustomTreeAdmin(TreeAdmin): pass class CustomTreeItemAdmin(TreeItemAdmin): pass override_tree_admin(CustomTreeAdmin) override_item_admin(CustomTreeItemAdmin)
jettify/aioodbc
refs/heads/master
setup.py
2
import os import re import sys from setuptools import setup, find_packages install_requires = ['pyodbc'] PY_VER = sys.version_info if not PY_VER >= (3, 5): raise RuntimeError("aioodbc doesn't support Python earlier than 3.5") def read(f): return open(os.path.join(os.path.dirname(__file__), f)).read().stri...
babble/babble
refs/heads/master
include/jython/Lib/pstats.py
94
"""Class for printing reports on profiled python code.""" # Class for printing reports on profiled python code. rev 1.0 4/1/94 # # Based on prior profile module by Sjoerd Mullender... # which was hacked somewhat by: Guido van Rossum # # see profile.doc and profile.py for more info. # Copyright 1994, by InfoSeek Co...
zhenv5/tweepy
refs/heads/master
tweepy/cursor.py
66
# Tweepy # Copyright 2009-2010 Joshua Roesslein # See LICENSE for details. from __future__ import print_function from tweepy.error import TweepError from tweepy.parsers import ModelParser, RawParser class Cursor(object): """Pagination helper class""" def __init__(self, method, *args, **kargs): if h...
2ndy/RaspIM
refs/heads/master
usr/lib/python2.7/dummy_thread.py
326
"""Drop-in replacement for the thread module. Meant to be used as a brain-dead substitute so that threaded code does not need to be rewritten for when the thread module is not present. Suggested usage is:: try: import thread except ImportError: import dummy_thread as thread """ # Exports onl...
Workday/OpenFrame
refs/heads/master
tools/telemetry/telemetry/value/__init__.py
23
# 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. """ The Value hierarchy provides a way of representing the values measurements produce such that they can be merged across runs, grouped by page, and output t...
themrmax/scikit-learn
refs/heads/master
sklearn/cluster/mean_shift_.py
5
"""Mean shift clustering algorithm. Mean shift clustering aims to discover *blobs* in a smooth density of samples. It is a centroid based algorithm, which works by updating candidates for centroids to be the mean of the points within a given region. These candidates are then filtered in a post-processing stage to elim...
Ms2ger/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/wptserve/tests/functional/test_cookies.py
109
import unittest import wptserve from .base import TestUsingServer class TestResponseSetCookie(TestUsingServer): def test_name_value(self): @wptserve.handlers.handler def handler(request, response): response.set_cookie("name", "value") return "Test" route = ("GET", ...
saurabhbajaj207/CarpeDiem
refs/heads/master
venv/Lib/site-packages/pip/commands/wheel.py
341
# -*- coding: utf-8 -*- from __future__ import absolute_import import logging import os import warnings from pip.basecommand import RequirementCommand from pip.exceptions import CommandError, PreviousBuildDirError from pip.req import RequirementSet from pip.utils import import_or_raise from pip.utils.build import Bui...
concentricsky/django-allauth
refs/heads/master
allauth/socialaccount/providers/linkedin/provider.py
68
from allauth.socialaccount import providers from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth.provider import OAuthProvider from allauth.socialaccount import app_settings class LinkedInAccount(ProviderAccount): def get_profile_url(self): return se...
wimnat/ansible
refs/heads/devel
test/lib/ansible_test/_data/sanity/pylint/plugins/deprecated.py
5
# (c) 2018, Matt Martz <matt@sivel.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) __metaclass__ = type import datetime import re from distutils.version import LooseVersion imp...
girving/tensorflow
refs/heads/master
tensorflow/contrib/summary/summary_ops_graph_test.py
15
# 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...