repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
jswope00/griffinx
refs/heads/master
common/lib/calc/calc/tests/test_preview.py
257
# -*- coding: utf-8 -*- """ Unit tests for preview.py """ import unittest from calc import preview import pyparsing class LatexRenderedTest(unittest.TestCase): """ Test the initializing code for LatexRendered. Specifically that it stores the correct data and handles parens well. """ def test_sim...
codeforamerica/skillcamp
refs/heads/master
ENV/lib/python2.7/site-packages/setuptools/command/upload_docs.py
332
# -*- coding: utf-8 -*- """upload_docs Implements a Distutils 'upload_docs' subcommand (upload documentation to PyPI's pythonhosted.org). """ import os import socket import zipfile import tempfile import sys import shutil from base64 import standard_b64encode from pkg_resources import iter_entry_points from distuti...
ehashman/oh-mainline
refs/heads/master
vendor/packages/Django/django/dispatch/__init__.py
571
"""Multi-consumer multi-producer dispatching mechanism Originally based on pydispatch (BSD) http://pypi.python.org/pypi/PyDispatcher/2.0.1 See license.txt for original license. Heavily modified for Django's purposes. """ from django.dispatch.dispatcher import Signal, receiver
yongtang/tensorflow
refs/heads/master
tensorflow/python/estimator/gc.py
40
# 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...
maxwelllincoln/edcs-datascraper
refs/heads/master
src/statistics.py
1
import csv from .base_fetch_n_parse import BaseFetchNParse class Statistics(BaseFetchNParse): URL = "http://db.edcs.eu/epigr/hinweise/liste.html" def _parse(self, soup): parsed = {"index": {}, "list": []} table_rows = soup.find_all('tr') skip_row_one = table_rows[1:] for t...
Zhongqilong/mykbengineer
refs/heads/master
kbe/src/lib/python/Lib/test/test_string.py
75
import unittest, string from test import support class ModuleTest(unittest.TestCase): def test_attrs(self): string.whitespace string.ascii_lowercase string.ascii_uppercase string.ascii_letters string.digits string.hexdigits string.octdigits string.p...
mottosso/mindbender-setup
refs/heads/master
bin/windows/python36/Lib/collections/__init__.py
19
'''This module implements specialized container datatypes providing alternatives to Python's general purpose built-in containers, dict, list, set, and tuple. * namedtuple factory function for creating tuple subclasses with named fields * deque list-like container with fast appends and pops on either end * Cha...
farodin91/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/pytest/testing/test_tmpdir.py
173
import sys import py import pytest from _pytest.tmpdir import tmpdir def test_funcarg(testdir): testdir.makepyfile(""" def pytest_generate_tests(metafunc): metafunc.addcall(id='a') metafunc.addcall(id='b') def test_func(tmpdir): pass """) from _pytes...
da1z/intellij-community
refs/heads/master
python/testData/intentions/PyConvertFormatOperatorToMethodIntentionTest/simple_after.py
33
print("|\077{:>20}FOO! {: 5.3F}%\n|{:<15} {:<10d}-torn-off, {:+#05d}".format("right-->", 12, "<--left", -10, 20))
funtoo/portage-funtoo
refs/heads/2013-06-07
pym/portage/tests/resolver/test_depth.py
16
# Copyright 2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from portage.tests import TestCase from portage.tests.resolver.ResolverPlayground import (ResolverPlayground, ResolverPlaygroundTestCase) class ResolverDepthTestCase(TestCase): def testResolverDepth(self): ebui...
iradul/phantomjs-clone
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/watchlist/watchlist_mock.py
130
# Copyright (C) 2011 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...
Nzaga/home-assistant
refs/heads/master
homeassistant/components/notify/demo.py
28
""" homeassistant.components.notify.demo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Demo notification service. """ from homeassistant.components.notify import ATTR_TITLE, BaseNotificationService EVENT_NOTIFY = "notify" def get_service(hass, config): """ Get the demo notification service. """ return DemoNotifica...
DJMelonz/basic-blog
refs/heads/master
django/views/decorators/vary.py
307
try: from functools import wraps except ImportError: from django.utils.functional import wraps # Python 2.4 fallback. from django.utils.cache import patch_vary_headers from django.utils.decorators import available_attrs def vary_on_headers(*headers): """ A view decorator that adds the specified heade...
Oliver2213/NVDAYoutube-dl
refs/heads/master
addon/globalPlugins/nvdaYoutubeDL/lib/xml/dom/pulldom.py
322
import xml.sax import xml.sax.handler import types try: _StringTypes = [types.StringType, types.UnicodeType] except AttributeError: _StringTypes = [types.StringType] START_ELEMENT = "START_ELEMENT" END_ELEMENT = "END_ELEMENT" COMMENT = "COMMENT" START_DOCUMENT = "START_DOCUMENT" END_DOCUMENT = "END_DOCUMENT" ...
ministryofjustice/cla_public
refs/heads/master
cla_public/middleware.py
1
import logging logging.basicConfig() log = logging.getLogger(__name__)
Flimm/linkchecker
refs/heads/master
linkcheck/winutil.py
9
# -*- coding: iso-8859-1 -*- # Copyright (C) 2010-2014 Bastian Kleineidam # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later versi...
density215/d215-miniblog
refs/heads/master
django/contrib/comments/templatetags/comments.py
309
from django import template from django.template.loader import render_to_string from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.contrib import comments from django.utils.encoding import smart_unicode register = template.Library() class BaseCommentNode(template.N...
ValvePython/steam
refs/heads/master
steam/protobufs/content_manifest_pb2.py
1
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: content_manifest.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from goo...
d9w/6858-android-intents
refs/heads/master
analyzer/androguard/core/analysis/sign.py
7
# This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard 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 th...
LordDamionDevil/Lony
refs/heads/master
lib/youtube_dl/update.py
66
from __future__ import unicode_literals import io import json import traceback import hashlib import os import subprocess import sys from zipimport import zipimporter from .utils import encode_compat_str from .version import __version__ def rsa_verify(message, signature, key): from hashlib import sha256 as...
abhiii5459/sympy
refs/heads/master
sympy/polys/agca/homomorphisms.py
63
""" Computations with homomorphisms of modules and rings. This module implements classes for representing homomorphisms of rings and their modules. Instead of instantiating the classes directly, you should use the function ``homomorphism(from, to, matrix)`` to create homomorphism objects. """ from __future__ import p...
sublime1809/django
refs/heads/master
django/contrib/gis/db/models/sql/query.py
7
from django.db import connections from django.db.models.query import sql from django.contrib.gis.db.models.constants import ALL_TERMS from django.contrib.gis.db.models.fields import GeometryField from django.contrib.gis.db.models.lookups import GISLookup from django.contrib.gis.db.models.sql import aggregates as gis_a...
bmazin/ARCONS-pipeline
refs/heads/master
examples/sexigesimalDemo.py
1
# A simple demonstration of how to use ephem to deal with segesimal strings import ephem import math raSexigesimal = "15:30:00" decSexigesimal = "-10:01:00" ra = ephem.hours(raSexigesimal) dec = ephem.degrees(decSexigesimal) # oddly enough, "degrees" is in radians print "ra=",ra print "dec=",dec print "ra in deci...
optima-ict/odoo
refs/heads/9.0
addons/mass_mailing/models/mail_thread.py
37
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import re from openerp.addons.mail.models.mail_message import decode from openerp.addons.mail.models.mail_thread import decode_header from openerp.osv import osv _logger = logging.getLogger(__name__) c...
sadmansk/servo
refs/heads/master
tests/wpt/web-platform-tests/xhr/resources/upload.py
26
def main(request, response): content = [] for key, values in sorted(item for item in request.POST.items() if not hasattr(item[1][0], "filename")): content.append("%s=%s," % (key, values[0])) content.append("\n") for key, values in sorted(item for item in request.POST.items() if hasattr(item[1]...
hoburg/gpkit
refs/heads/master
docs/source/examples/sub_multi_values.py
1
"Example substitution; adapted from t_sub.py/t_NomialSubs/test_Vector" from gpkit import Variable, VectorVariable x = Variable("x") y = Variable("y") z = VectorVariable(2, "z") p = x*y*z assert all(p.sub({x: 1, "y": 2}) == 2*z) assert all(p.sub({x: 1, y: 2, "z": [1, 2]}) == z.sub({z: [2, 4]}))
iansprice/wagtail
refs/heads/master
wagtail/wagtailredirects/permissions.py
9
from __future__ import absolute_import, unicode_literals from wagtail.wagtailcore.permission_policies import ModelPermissionPolicy from wagtail.wagtailredirects.models import Redirect permission_policy = ModelPermissionPolicy(Redirect)
boshnivolo/TIY-Assignments
refs/heads/master
node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py
294
# Copyright (c) 2014 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. """ This script is intended for use as a GYP_GENERATOR. It takes as input (by way of the generator flag config_path) the path of a json file that dictates the file...
uber/pyro
refs/heads/dev
examples/vae/utils/custom_mlp.py
1
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 from inspect import isclass import torch import torch.nn as nn from pyro.distributions.util import broadcast_shape class Exp(nn.Module): """ a custom module for exponentiation of tensors """ def __init__(self): ...
cherusk/ansible
refs/heads/devel
lib/ansible/plugins/terminal/vyos.py
41
# # (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
ostrovok-team/suds
refs/heads/master
suds/transport/options.py
201
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser 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 hope that it will ...
mbauskar/internal-hr
refs/heads/develop
erpnext/accounts/doctype/pos_setting/pos_setting.py
42
# 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 import msgprint, _ from frappe.utils import cint from frappe.model.document import Document class POSSetting(Document): ...
ChinaQuants/PTVS
refs/heads/master
Python/Tests/TestData/VirtualEnv/env/Lib/encodings/shift_jisx0213.py
61
# # shift_jisx0213.py: Python Unicode Codec for SHIFT_JISX0213 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_jp, codecs import _multibytecodec as mbc codec = _codecs_jp.getcodec('shift_jisx0213') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class...
cernops/rally
refs/heads/master
tests/hacking/checks.py
9
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
hermantai/sorno-py-scripts
refs/heads/master
scripts/sorno_java_deps_graph.py
1
#!/usr/bin/env python """Prints the class dependency graph given a bunch of java source files. This script depends on the library sorno-py-scripts. You can find out the installation detail in https://github.com/hermantai/sorno-py-scripts. Copyright 2016 Heung Ming Tai Licensed under the Apache License, Vers...
OsirisSPS/osiris-sps
refs/heads/master
client/share/plugins/AF9A4C281070FDB0F34CF417CDB168AB38C8A388/lib/plat-mac/Carbon/Icons.py
81
# Generated from 'Icons.h' def FOUR_CHAR_CODE(x): return x from Carbon.Files import * kGenericDocumentIconResource = -4000 kGenericStationeryIconResource = -3985 kGenericEditionFileIconResource = -3989 kGenericApplicationIconResource = -3996 kGenericDeskAccessoryIconResource = -3991 kGenericFolderIconResource = -3999 ...
timgraham/django-registration
refs/heads/master
registration/backends/default/urls.py
5
""" URLconf for registration and activation, using django-registration's default backend. If the default behavior of these views is acceptable to you, simply use a line like this in your root URLconf to set up the default URLs for registration:: (r'^accounts/', include('registration.backends.default.urls')), Thi...
YanTangZhai/tf
refs/heads/master
tensorflow/python/client/events_writer_test.py
25
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
cpcloud/odo
refs/heads/master
odo/backends/tests/test_bokeh.py
7
from __future__ import absolute_import, division, print_function import pytest bokeh = pytest.importorskip('bokeh') from odo.backends.bokeh import convert, pd, ColumnDataSource import pandas.util.testing as tm df = pd.DataFrame([[100, 'Alice'], [200, 'Bob'], [300, 'Charlie']], ...
nimadini/Teammate
refs/heads/master
init.py
1
__author__ = 'stanley' import jinja2 import os INDEX_NAME = 'user_basic' JINJA_ENVIRONMENT = jinja2.Environment( loader=jinja2.FileSystemLoader(os.path.dirname(__file__)), extensions=['jinja2.ext.autoescape'], autoescape=True)
wongkwunkit/jinja2
refs/heads/master
jinja2/exceptions.py
977
# -*- coding: utf-8 -*- """ jinja2.exceptions ~~~~~~~~~~~~~~~~~ Jinja exceptions. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from jinja2._compat import imap, text_type, PY2, implements_to_string class TemplateError(Exception): """Baseclass for al...
asedunov/intellij-community
refs/heads/master
python/helpers/pydev/_pydev_imps/_pydev_inspect.py
92
"""Get useful information from live Python objects. This module encapsulates the interface provided by the internal special attributes (func_*, co_*, im_*, tb_*, etc.) in a friendlier fashion. It also provides some help for examining source code and class layout. Here are some of the useful functions provided by this...
cxz1418/yolo_resnet
refs/heads/master
yolo/net _resnet/yolo_net.py
3
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np import re from yolo.net.net import Net class YoloNet(Net): def __init__(self, common_params, net_params, test=False): """ common params: a ...
wdv4758h/ZipPy
refs/heads/master
edu.uci.python.benchmark/src/benchmarks/sympy/sympy/core/evaluate.py
2
from contextlib import contextmanager global_evaluate = [True] @contextmanager def evaluate(x): """ Control automatic evaluation This context managers controls whether or not all SymPy functions evaluate by default. Note that much of SymPy expects evaluated expressions. This functionality is ...
moorebrett0/node-jira-client
refs/heads/master
Sites/BusinesstasticBlitz/html/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py
1534
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import collections import os import gyp import gyp.common import gyp.msvs_emulation import json import sys generator_supports_multiple_toolsets = True generator_...
soldag/home-assistant
refs/heads/dev
homeassistant/components/rfxtrx/switch.py
11
"""Support for RFXtrx switches.""" import logging import RFXtrx as rfxtrxmod from homeassistant.components.switch import SwitchEntity from homeassistant.const import CONF_DEVICES, STATE_ON from homeassistant.core import callback from . import ( CONF_DATA_BITS, CONF_SIGNAL_REPETITIONS, DEFAULT_SIGNAL_REPE...
tttthemanCorp/CardmeleonAppEngine
refs/heads/master
django/conf/locale/sr_Latn/formats.py
655
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y.' TIME_FORMAT = 'H:i' DATETIME_FORMAT = 'j. F Y. H:i' YEAR_MONTH_F...
lmorchard/django
refs/heads/master
tests/sitemaps_tests/base.py
380
from django.apps import apps from django.contrib.sites.models import Site from django.core.cache import cache from django.test import TestCase, modify_settings, override_settings from .models import I18nTestModel, TestModel @modify_settings(INSTALLED_APPS={'append': 'django.contrib.sitemaps'}) @override_settings(ROO...
smartfile/django-1.4
refs/heads/master
django/db/backends/oracle/creation.py
29
import sys import time from django.db.backends.creation import BaseDatabaseCreation TEST_DATABASE_PREFIX = 'test_' PASSWORD = 'Im_a_lumberjack' class DatabaseCreation(BaseDatabaseCreation): # This dictionary maps Field objects to their associated Oracle column # types, as strings. Column-type strings can cont...
Ahmad31/Web_Flask_Cassandra
refs/heads/master
flask/lib/python2.7/site-packages/whoosh/automata/lev.py
52
from __future__ import print_function from whoosh.compat import unichr, xrange from whoosh.automata.fsa import ANY, EPSILON, NFA, unull def levenshtein_automaton(term, k, prefix=0): nfa = NFA((0, 0)) if prefix: for i in xrange(prefix): c = term[i] nfa.add_transition((i, 0), c,...
tylerlaberge/PyPattyrn
refs/heads/master
pypattyrn/behavioral/visitor.py
1
from abc import ABCMeta, abstractmethod class Visitor(metaclass=ABCMeta): """ Abstract Visitor class as part of the Visitor Design Pattern. - External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#visitor-pattern} - External Visitor Design Pattern documentation: U{https://en.wikipe...
TangHao1987/intellij-community
refs/heads/master
python/lib/Lib/encodings/utf_7.py
116
""" Python 'utf-7' Codec Written by Brian Quinlan (brian@sweetapp.com). """ import codecs ### Codec APIs class Codec(codecs.Codec): # Note: Binding these as C functions will result in the class not # converting them to methods. This is intended. encode = codecs.utf_7_encode decode = codecs.utf_7_dec...
kool79/intellij-community
refs/heads/master
python/testData/inspections/PyUnresolvedReferencesInspection/builtinDerivedClassAttribute.py
83
class C(dict): def foo(self): pass def bar(self): self.foo() #pass
zhenzhai/edx-platform
refs/heads/master
common/djangoapps/static_replace/__init__.py
8
import logging import re from django.contrib.staticfiles.storage import staticfiles_storage from django.contrib.staticfiles import finders from django.conf import settings from static_replace.models import AssetBaseUrlConfig, AssetExcludedExtensionsConfig from xmodule.modulestore.django import modulestore from xmodul...
wileeam/airflow
refs/heads/master
airflow/operators/hive_to_mysql.py
4
# # 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...
cyberphox/MissionPlanner
refs/heads/master
Lib/site-packages/numpy/distutils/command/install_data.py
112
import sys have_setuptools = ('setuptools' in sys.modules) from distutils.command.install_data import install_data as old_install_data #data installer with improved intelligence over distutils #data files are copied into the project directory instead #of willy-nilly class install_data (old_install_data): def run...
tumi8/sKnock
refs/heads/master
server/benchmarks/ap_firewall.py
1
import logging import os import time from definitions.Constants import * from server.modules.Configuration import config, initialize from server.modules.Firewall.Firewall import Firewall LOG = logging.getLogger(__name__) def benchmark(ipv4 = True, ipv6 = False, tcp = True, udp = False, csvOutput = '/tmp'): init...
CarGroup3/opendlv.scaledcars
refs/heads/master
thirdparty/cxxtest/python/python3/cxxtest/cxxtestgen.py
48
#------------------------------------------------------------------------- # CxxTest: A lightweight C++ unit testing library. # Copyright (c) 2008 Sandia Corporation. # This software is distributed under the LGPL License v3 # For more information, see the COPYING file in the top CxxTest directory. # Under the terms of ...
upliftaero/MissionPlanner
refs/heads/master
Lib/site-packages/numpy/random/setup.py
54
from os.path import join from numpy.distutils.system_info import get_info def testcode_wincrypt(): return """\ /* check to see if _WIN32 is defined */ int main(int argc, char *argv[]) { #ifdef _WIN32 return 0; #else return 1; #endif } """ def configuration(parent_package='',top_path=None): from nu...
ssorgatem/qiime
refs/heads/master
qiime/pycogent_backports/__init__.py
15
#!/usr/bin/env python __author__ = "The QIIME Development Team" __copyright__ = "Copyright 2011, The QIIME Project" __credits__ = ["Rob Knight", "Greg Caporaso", "Jeremy Widmann", "Kyle Bittinger", "Justin Kuczynski", "William Walters", ...
yamahata/neutron
refs/heads/master
neutron/agent/metadata/agent.py
5
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2012 New Dream Network, LLC (DreamHost) # # 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...
kohout/djangocms-getaweb-calendar
refs/heads/master
setup.py
1
import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='djangocms-getaweb-calendar', version='0.1', packages=['dj...
chjw8016/GreenOdoo7-haibao
refs/heads/master
openerp/addons/base/res/wizard/__init__.py
63
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2011 OpenERP S.A (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
pgmillon/ansible
refs/heads/devel
test/units/modules/storage/netapp/test_na_ontap_quotas.py
38
''' unit tests ONTAP Ansible module: na_ontap_quotas ''' from __future__ import print_function import json import pytest from units.compat import unittest from units.compat.mock import patch from ansible.module_utils import basic from ansible.module_utils._text import to_bytes import ansible.module_utils.netapp as ne...
hofschroeer/shinysdr
refs/heads/master
shinysdr/test/broken_deps/imports.py
1
# pylint: disable=import-error, no-name-in-module, unused-import import shinysdr.test.nonexistent_module_in_dep
varunarya10/python-ironicclient
refs/heads/master
ironicclient/common/http.py
2
# -*- coding: utf-8 -*- # # Copyright 2012 OpenStack LLC. # 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....
gylian/sickrage
refs/heads/master
lib/rtorrent/lib/xmlrpc/basic_auth.py
95
# # Copyright (c) 2013 Dean Gardiner, <gardiner91@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, mod...
aam-at/tensorflow
refs/heads/master
tensorflow/python/distribute/cluster_resolver/slurm_cluster_resolver_test.py
14
# Copyright 2020 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 applicable ...
GunoH/intellij-community
refs/heads/master
python/testData/intentions/PyConvertTypeCommentToVariableAnnotationIntentionTest/assignmentWithComplexUnpacking.py
31
[y, (x, (z))] = undefined() # ty<caret>pe: Optional[Union[None, Any]], (Callable[..., int], Any)
glaunay/pyproteinsExt
refs/heads/master
src/pyproteinsExt/structure/__init__.py
1
from .coordinates import Parser from .ccmap_wrapper import ccmap
PythonProgramming/Kivy-Basics-Tutorials
refs/heads/master
KivyVideo6.py
1
from kivy.app import App #kivy.require("1.8.0") from kivy.uix.floatlayout import FloatLayout class SimpleKivy4(App): def build(self): return FloatLayout() if __name__ == "__main__": SimpleKivy4().run()
ellonweb/merlin
refs/heads/master
Hooks/intel/search.py
2
# This file is part of Merlin. # Merlin is the Copyright (C)2008,2009,2010 of Robin K. Hansen, Elliot Rosemarine, Andreas Jacobsen. # Individual portions may be copyright by individual contributors, and # are included in this collective work with permission of the copyright # owners. # This program is free software; ...
boberfly/gaffer
refs/heads/master
python/GafferUI/GLWidget.py
2
########################################################################## # # Copyright (c) 2011, John Haddon. All rights reserved. # Copyright (c) 2011-2015, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided ...
2013Commons/hue
refs/heads/master
desktop/core/ext-py/Django-1.4.5/tests/regressiontests/m2m_through_regress/__init__.py
45382
btabibian/scikit-learn
refs/heads/master
sklearn/linear_model/sag.py
30
"""Solvers for Ridge and LogisticRegression using SAG algorithm""" # Authors: Tom Dupre la Tour <tom.dupre-la-tour@m4x.org> # # License: BSD 3 clause import warnings import numpy as np from .base import make_dataset from .sag_fast import sag from ..exceptions import ConvergenceWarning from ..utils import check_arra...
lem9/weblate
refs/heads/master
weblate/accounts/migrations/0016_add-api-keys.py
3
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-03-22 10:23 from __future__ import unicode_literals from django.db import migrations from django.utils.crypto import get_random_string def add_api_keys(apps, schema_editor): Token = apps.get_model('authtoken', 'Token') User = apps.get_model('auth', ...
freedomhui/cinder
refs/heads/localstorage
cinder/tests/test_test.py
8
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
alvarolopez/nova
refs/heads/master
nova/api/openstack/compute/schemas/v3/flavors_extraspecs.py
109
# Copyright 2014 NEC Corporation. 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 ...
Ballz0fSteel/Umeko
refs/heads/master
lib/youtube_dl/extractor/viu.py
25
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_kwargs, compat_str, ) from ..utils import ( ExtractorError, int_or_none, ) class ViuBaseIE(InfoExtractor): def _real_initialize(self): viu_auth_res = self._re...
Edzvu/Edzvu.github.io
refs/heads/master
APNSWrapper-0.6.1/APNSWrapper/notifications.py
1
# Copyright 2009 Max Klymyshyn, Sonettic # 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 writ...
sebcreme/SmartAlarmClock
refs/heads/master
src/actions/DisplayEvent.py
6
from bottle import Bottle, route, run, template, static_file, get, jinja2_template as template, post, request, response, redirect import json import requests import runtime import actions """ DisplayEvent """ defaultInputParams = {} defaultOutputParams = {} sim_parameters = dict() # Register actions def registerAct...
megemini/DataCastle2017
refs/heads/master
src/func/kerasnode.py
1
# -*- coding: utf-8 -*- """ **keras node** module ------------------- """ __all__ = ['get_sequential', 'add_dense', 'add_conv2D', 'add_dropout', 'add_maxPooling2D', 'add_flatten', 'set_compile', 'model_fit'] def get_sequential(): return Sequential() def add_dense(Keras_model, units, activation, input_dim): Keras...
halvertoluke/edx-platform
refs/heads/default_branch
openedx/core/djangoapps/profile_images/tests/helpers.py
117
""" Helper methods for use in profile image tests. """ from contextlib import contextmanager import os from tempfile import NamedTemporaryFile from django.core.files.uploadedfile import UploadedFile from PIL import Image @contextmanager def make_image_file(dimensions=(320, 240), extension=".jpeg", force_size=None): ...
thanhpete/selenium
refs/heads/master
py/selenium/webdriver/opera/webdriver.py
71
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
JunhwanPark/TizenRT
refs/heads/artik
external/iotivity/iotivity_1.2-rel/build_common/iotivityconfig/compiler/configuration.py
64
# ------------------------------------------------------------------------ # Copyright 2015 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/li...
hezuoguang/ZGVL
refs/heads/master
WLServer/site-packages/django/conf/__init__.py
106
""" Settings and configuration for Django. Values will be read from the module specified by the DJANGO_SETTINGS_MODULE environment variable, and then from django.conf.global_settings; see the global settings file for a list of all possible variables. """ import logging import os import sys import time # Needed fo...
kalahbrown/HueBigSQL
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/contrib/auth/handlers/modwsgi.py
119
from django.contrib import auth from django import db from django.utils.encoding import force_bytes def check_password(environ, username, password): """ Authenticates against Django's auth database mod_wsgi docs specify None, True, False as return value depending on whether the user exists and authen...
dana-i2cat/felix
refs/heads/master
vt_manager/src/python/vt_manager/controller/users/forms.py
5
from django import forms from django.contrib.auth.models import User class UserForm(forms.ModelForm): ''' A form for editing Users ''' class Meta: model = User exclude = ('username', 'password', 'last_login', 'date_joined', 'groups', 'user_permissions', 'is_staff', 'i...
TimBuckley/effective_django
refs/heads/master
tests/model_regress/tests.py
13
from __future__ import unicode_literals import datetime from operator import attrgetter import sys import unittest from django.core.exceptions import ValidationError from django.test import TestCase, skipUnlessDBFeature from django.utils import six from django.utils.timezone import get_fixed_timezone from django.db i...
alphafoobar/intellij-community
refs/heads/master
python/testData/refactoring/move/baseClass/before/src/a.py
83
class B(object): def __init__(self): pass class C(B): def __init__(self): super(C, self).__init__()
saurabh6790/med_lib_test
refs/heads/master
webnotes/db.py
21
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # Database Module # -------------------- from __future__ import unicode_literals import MySQLdb import warnings import webnotes from webnotes import conf import datetime class Database: """ Open a database co...
veltri/DLV2
refs/heads/master
tests/parser/duplicates.4.test.py
1
input = """ b :- not a, not x. a :- not b, not y. x :- not b. y :- not a. """ output = """ b :- not a, not x. a :- not b, not y. x :- not b. y :- not a. """
syci/reporting-engine
refs/heads/8.0
__unported__/base_report_assembler/assembled_report.py
13
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Vaucher # Copyright 2013 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 # pub...
ddrmanxbxfr/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/pywebsocket/src/test/test_endtoend.py
449
#!/usr/bin/env python # # Copyright 2012, 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...
GennadiyZakharov/relativepotency
refs/heads/master
src/rpgui/rpcentralwidget.py
1
''' Created on Oct 30, 2014 @author: gzakharov ''' from PyQt4 import QtCore, QtGui from rpcore.experiment import Experiment from rpcore.actions import createAction from rpgui.plotwidget import PlotWidget class RpCentralWidget(QtGui.QWidget): ''' classdocs ''' def __init__(self, parent=...
Bismarrck/tensorflow
refs/heads/master
tensorflow/python/keras/applications/imagenet_utils.py
12
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
kvar/ansible
refs/heads/seas_master_2.9.5
test/units/modules/storage/netapp/test_na_ontap_volume.py
21
# (c) 2018, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ''' unit test template for ONTAP Ansible module ''' from __future__ import print_function import json import pytest from units.compat import unittest from units.compat.mock import patch, Mock from ans...
siddharths067/HuHubaProject
refs/heads/master
lib/requests_toolbelt/multipart/encoder.py
17
# -*- coding: utf-8 -*- """ requests_toolbelt.multipart.encoder =================================== This holds all of the implementation details of the MultipartEncoder """ import contextlib import io import os from uuid import uuid4 from .._compat import fields class MultipartEncoder(object): """ The `...
geopython/QGIS
refs/heads/master
tests/code_layout/test_qgsdoccoverage.py
12
# -*- coding: utf-8 -*- """QGIS Unit tests for API documentation coverage. .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later ver...
Iftekhar-ifti/androguard
refs/heads/master
androguard/core/bytecodes/dvm.py
35
# This file is part of Androguard. # # Copyright (C) 2012/2013, Anthony Desnos <desnos at t0t0.fr> # 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.a...