repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
Immortalin/python-for-android
refs/heads/master
python-build/python-libs/xmpppy/doc/examples/bot.py
87
#!/usr/bin/python # -*- coding: koi8-r -*- # $Id: bot.py,v 1.2 2006/10/06 12:30:42 normanr Exp $ import sys import xmpp commands={} i18n={'ru':{},'en':{}} ########################### user handlers start ################################## i18n['en']['HELP']="This is example jabber bot.\nAvailable commands: %s" def help...
bkabrda/devassistant
refs/heads/master
devassistant/gui/path_window.py
6
# -*- coding: utf-8 -*- """ Created on Wed Apr 3 13:16:47 2013 @author: Petr Hracek """ import os from gi.repository import Gtk from devassistant.config_manager import config_manager from devassistant import utils class PathWindow(object): """ Class shows option dialogs and checks settings for each ass...
mglukhikh/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/contrib/admindocs/utils.py
314
"Misc. utility functions/classes for admin documentation generator." import re from email.Parser import HeaderParser from email.Errors import HeaderParseError from django.utils.safestring import mark_safe from django.core.urlresolvers import reverse from django.utils.encoding import smart_str try: import docutils....
tafia/servo
refs/heads/master
tests/wpt/harness/wptrunner/executors/executorservo.py
20
# 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/. import base64 import hashlib import json import os import subprocess import tempfile import threading import urlparse im...
glennq/scikit-learn
refs/heads/master
sklearn/model_selection/__init__.py
30
from ._split import BaseCrossValidator from ._split import KFold from ._split import GroupKFold from ._split import StratifiedKFold from ._split import TimeSeriesSplit from ._split import LeaveOneGroupOut from ._split import LeaveOneOut from ._split import LeavePGroupsOut from ._split import LeavePOut from ._split impo...
barryloper/dorthy
refs/heads/master
dorthy/dp.py
2
import inspect import logging import weakref from collections import MutableMapping logger = logging.getLogger(__name__) class Singleton(object): """ A decorated to implement the singleton pattern. This implementation is not thread safe. Based on: http://stackoverflow.com/questions/42558/python-an...
EDUlib/edx-platform
refs/heads/master
import_shims/lms/util/password_policy_validators.py
4
"""Deprecated import support. Auto-generated by import_shims/generate_shims.sh.""" # pylint: disable=redefined-builtin,wrong-import-position,wildcard-import,useless-suppression,line-too-long from import_shims.warn import warn_deprecated_import warn_deprecated_import('util.password_policy_validators', 'common.djangoap...
phenoxim/nova
refs/heads/master
nova/cmd/dhcpbridge.py
5
# 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 compliance with the License. You may obtain # a ...
seppi91/CouchPotatoServer
refs/heads/develop
libs/tornado/testing.py
66
#!/usr/bin/env python """Support classes for automated testing. * `AsyncTestCase` and `AsyncHTTPTestCase`: Subclasses of unittest.TestCase with additional support for testing asynchronous (`.IOLoop` based) code. * `ExpectLog` and `LogTrapTestCase`: Make test logs less spammy. * `main()`: A simple test runner (wra...
aevum/moonstone
refs/heads/master
src/moonstone/gui/qt/widget/importwindow_ui.py
2
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/home/igor/Desenvolvimento/neppo/moonstone/src/resources/ui/qt/importwindow.ui' # # Created: Fri Sep 20 14:20:28 2013 # by: pyside-uic 0.2.14 running on PySide 1.1.2 # # WARNING! All changes made in this file will be lost! from PySide ...
CompassionCH/compassion-modules
refs/heads/10.0
mobile_app_connector/forms/registration_form.py
3
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2019 Compassion CH (http://www.compassion.ch) # @author: Sylvain Laydernier <sly.laydernier@yahoo.fr> # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manife...
pwong-mapr/private-hue
refs/heads/HUE-1096-abe
desktop/core/ext-py/Django-1.4.5/django/utils/regex_helper.py
86
""" Functions for reversing a regular expression (used in reverse URL resolving). Used internally by Django and not intended for external use. This is not, and is not intended to be, a complete reg-exp decompiler. It should be good enough for a large class of URLS, however. """ # Mapping of an escape character to a r...
vvv1559/intellij-community
refs/heads/master
python/testData/refactoring/extractsuperclass/multifile/target.append.py
83
# existing module A = 1 class Suppa: def foo(self): print "bar"
soldag/home-assistant
refs/heads/dev
tests/components/media_player/common.py
21
"""Collection of helper methods. All containing methods are legacy helpers that should not be used by new components. Instead call the service directly. """ from homeassistant.components.media_player.const import ( ATTR_INPUT_SOURCE, ATTR_MEDIA_CONTENT_ID, ATTR_MEDIA_CONTENT_TYPE, ATTR_MEDIA_ENQUEUE, ...
quasiyoke/router-bot
refs/heads/master
router_bot/human_setup_wizard.py
1
# router-bot # Copyright (C) 2017 quasiyoke # # You should have received a copy of the GNU Affero General Public License v3 # along with this program. If not, see <http://www.gnu.org/licenses/>. import asyncio import logging import re import sys import telepot from .error import MissingPartnerError, UserError from .h...
aguai/TMDLang
refs/heads/master
src/tmd.py
2
#!/usr/local/bin/python3 from pathlib import Path import TMDScanner as Scan import re import sys ''' necessary variables ''' ReservedInstrument = set({'CHORD', 'GROOVE'}) InstrumentSet = set() PartSet = set() Key = 'C' # default key is C Tempo = 120.0 # default tempo 120 SongName = '' # defult no...
matt-kwong/grpc
refs/heads/master
examples/python/helloworld/helloworld_pb2_grpc.py
85
import grpc from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities import helloworld_pb2 as helloworld__pb2 class GreeterStub(object): """The greeting service definition. """ def __init__(self, channel): """Constructor. Args: channel...
fizzoo/miniprojekt
refs/heads/master
albumartfeh/albumart.py
1
#!/usr/bin/env python3 # Copyright (c) 2015, doggone # 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 PROVIDED "AS IS" AND THE AUTHOR D...
jwren/intellij-community
refs/heads/master
python/testData/quickFixes/PyTypeHintsQuickFixTest/parenthesesAndCustomTarget.py
18
from typing import Generic, TypeVar T = TypeVar("T") class A(Generic[T]): def __init__(self, v): pass v2 = None # type: <warning descr="Generics should be specified through square brackets">A<caret>(int)</warning>
ClovisIRex/Snake-django
refs/heads/master
env/lib/python3.6/site-packages/django/contrib/gis/gdal/raster/band.py
108
from ctypes import byref, c_double, c_int, c_void_p from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import GDALException from django.contrib.gis.gdal.prototypes import raster as capi from django.contrib.gis.shortcuts import numpy from django.utils import six from django.utils.encod...
savioabuga/phoenix-template
refs/heads/master
phoenix/apps/utils/test_utils.py
1
from model_mommy import mommy def login_user(test_case, user, password): test_case.client.logout() test_case.client.login(username=user.username, password=password) def create_logged_in_user(test_case, username='mary', password='marypassword'): user = mommy.make('auth.User') user.username = username...
stahlnow/paulhaller
refs/heads/master
website/apps/website/views.py
1
from endless_pagination.views import AjaxListView from django.views.generic import ListView, DetailView from django.utils import timezone from .models import Post, Poem, Letter class PostListView(AjaxListView): model = Post queryset = Post.objects.all() context_object_name = "posts" def get_context_...
lihui7115/ChromiumGStreamerBackend
refs/heads/master
third_party/cython/src/setupegg.py
97
#!/usr/bin/env python """Wrapper to run setup.py using setuptools.""" import setuptools execfile('setup.py')
nishad-jobsglobal/odoo-marriot
refs/heads/master
addons/mrp_repair/wizard/cancel_repair.py
384
# -*- 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...
xujb/odoo
refs/heads/8.0
addons/website_hr_recruitment/models/__init__.py
390
import hr_job
santels/raspberry-dsp
refs/heads/master
src/voice_processor-google.py
1
#!/usr/bin/env python3 import speech_recognition as sr recognizer = sr.Recognizer(); with sr.Microphone() as mic: print("Go say something! I'm listening..."); audio = recognizer.listen(mic); try: print("You said: '" + recognizer.recognize_google(audio)); except sr.UnknownValueError: print("Sorry. I can't underst...
paninetworks/neutron
refs/heads/master
neutron/tests/unit/agent/metadata/test_namespace_proxy.py
21
# 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/licenses/LICENSE-2.0 # # Unless required by a...
keedio/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/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...
askeing/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/wptserve/wptserve/stash.py
13
import base64 import json import os import uuid import threading from multiprocessing.managers import AcquirerProxy, BaseManager, DictProxy class ServerDictManager(BaseManager): shared_data = {} def _get_shared(): return ServerDictManager.shared_data ServerDictManager.register("get_dict", ...
amyshi188/osf.io
refs/heads/develop
manage.py
9
#!/usr/bin/env python import sys if __name__ == '__main__': from django.core.management import execute_from_command_line # allow the osf app/model initialization to be skipped so we can run django # commands like collectstatic w/o requiring a database to be running if '--no-init-app' in sys.argv: ...
andrewyoung1991/supriya
refs/heads/master
supriya/tools/servertools/test/test_Node__handle_response.py
1
# -*- encoding: utf-8 -*- import pytest import pytest from abjad.tools import systemtools from supriya import synthdefs from supriya.tools import osctools from supriya.tools import servertools @pytest.fixture(scope='function') def server(request): def server_teardown(): server.quit() server = serverto...
nikolas/edx-platform
refs/heads/master
common/djangoapps/third_party_auth/tests/specs/base.py
27
"""Base integration test for provider implementations.""" import unittest import json import mock from django import test from django.contrib import auth from django.contrib.auth import models as auth_models from django.contrib.messages.storage import fallback from django.contrib.sessions.backends import cache from ...
jaloren/robotframework
refs/heads/master
utest/reporting/test_jsbuildingcontext.py
9
import random import unittest from robot.output.loggerhelper import LEVELS from robot.reporting.jsmodelbuilders import JsBuildingContext from robot.utils.asserts import assert_equal class TestStringContext(unittest.TestCase): def test_add_empty_string(self): self._verify([''], [0], []) def test_add...
JShadowMan/package
refs/heads/master
python/python-packages/PIL_/verification_code.py
2
#!/usr/bin/env python3 from PIL import Image, ImageFilter, ImageDraw, ImageFont import random, platform def randomChar(): return chr(random.randint(65, 90)) def randomColor(): return (random.randint(64, 255), random.randint(64, 255), random.randint(64, 255)) def randomFontClolor(): return (r...
StepanBakshayev/funrun
refs/heads/master
src/funrun/match/views.py
2
from datetime import datetime from dateutil.relativedelta import relativedelta from django import forms from django.shortcuts import render, get_object_or_404, redirect from django.conf import settings from django.core.paginator import InvalidPage, EmptyPage, Paginator from django.utils import timezone from .models i...
prakritish/ansible
refs/heads/devel
lib/ansible/modules/cloud/digital_ocean/digital_ocean_sshkey.py
32
#!/usr/bin/python # -*- coding: utf-8 -*- # 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. #...
Titulacion-Sistemas/PracticasDjango
refs/heads/master
ServiciosWeb/Sentencias/__init__.py
6
__author__ = 'Jhonsson'
areitz/pants
refs/heads/master
src/python/pants/base/build_file_aliases.py
8
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import functools fro...
denfromufa/PTVS
refs/heads/master
Python/Product/PythonTools/Templates/Projects/StarterFlaskProject/views.py
18
""" Routes and views for the flask application. """ from datetime import datetime from flask import render_template from $safeprojectname$ import app @app.route('/') @app.route('/home') def home(): """Renders the home page.""" return render_template( 'index.html', title='Home Pag...
fabioticconi/scikit-learn
refs/heads/master
examples/cluster/plot_kmeans_silhouette_analysis.py
83
""" =============================================================================== Selecting the number of clusters with silhouette analysis on KMeans clustering =============================================================================== Silhouette analysis can be used to study the separation distance between the...
ndp-systemes/odoo-addons
refs/heads/8.0
base_res_config_improved/__init__.py
1
# -*- coding: utf8 -*- # # Copyright (C) 2018 NDP Systèmes (<http://www.ndp-systemes.fr>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License,...
vikasraunak/mptcp-1
refs/heads/development
src/flow-monitor/bindings/modulegen__gcc_LP64.py
6
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
Endika/django
refs/heads/master
tests/migrations/test_migrations_squashed_erroneous/6_auto.py
770
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [("migrations", "5_auto")] operations = [ migrations.RunPython(migrations.RunPython.noop) ]
farooqsheikhpk/Aspose.BarCode-for-Cloud
refs/heads/master
SDKs/Aspose.BarCode-Cloud-SDK-for-Python/asposebarcodecloud/models/Barcode.py
5
#!/usr/bin/env python class Barcode(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.""" def __init__(self): """ Attributes: swaggerTypes (dict): The key is attribute name and the value is attribute type. ...
ilexius/odoo
refs/heads/master
openerp/report/render/rml2pdf/__init__.py
49
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from trml2pdf import parseString, parseNode
galtys/odoo
refs/heads/8.0
addons/l10n_ma/l10n_ma.py
336
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
bit-jmm/ttarm
refs/heads/master
demo/demo_at_tsinghua.py
1
# encoding: utf-8 import sys sys.path.append('/home/zjd/jmm/JPPCF/') import os import numpy as np import util from JPPCF import * import logging argvs = sys.argv # We fix the num of latent feature k = 100 lambd = 0.5 if len(argvs) == 3: k = int(float(argvs[1])) lambd = float(argvs[2]) ...
benjaminrigaud/django
refs/heads/master
tests/proxy_model_inheritance/tests.py
24
from __future__ import absolute_import, unicode_literals import os from django.core.management import call_command from django.test import TestCase, TransactionTestCase from django.test.utils import extend_sys_path from django.utils._os import upath from .models import (ConcreteModel, ConcreteModelSubclass, Conc...
DazWorrall/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/ec2_vol_facts.py
29
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
markYoungH/chromium.src
refs/heads/nw12
third_party/cython/src/Cython/Tests/__init__.py
1472
# empty file
dcosentino/edx-platform
refs/heads/master
common/test/acceptance/pages/studio/__init__.py
232
import os # Get the URL of the instance under test BASE_URL = os.environ.get('test_url', 'http://localhost:8031')
nicolargo/intellij-community
refs/heads/master
python/helpers/pydev/pydevd_attach_to_process/winappdbg/win32/dbghelp.py
88
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2009-2014, Mario Vilas # 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...
noorul/os-project-config
refs/heads/master
jenkins/scripts/check_app_catalog_yaml.py
5
#!/usr/bin/env python # # 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...
rodorad/spark-tk
refs/heads/master
python/sparktk/models/classification/__init__.py
137
# vim: set encoding=utf-8 # Copyright (c) 2016 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/licenses/LICENSE-2.0 # # Unless require...
imruahmed/microblog
refs/heads/master
flask/lib/python2.7/site-packages/sqlalchemy/testing/exclusions.py
3
# testing/exclusions.py # Copyright (C) 2005-2015 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 import operator from ..util import decorator from . import config from .. imp...
adobe/chromium
refs/heads/master
native_client_sdk/src/build_tools/tests/update_manifest_test.py
7
#!/usr/bin/env python # Copyright (c) 2012 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. """Unit tests for update_manifest.py.""" __author__ = 'mball@google.com (Matt Ball)' import errno import os import SimpleHTTPServ...
nnethercote/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/lint/tests/test_lint.py
12
from __future__ import unicode_literals import os import sys import mock import six from ...localpaths import repo_root from .. import lint as lint_mod from ..lint import filter_whitelist_errors, parse_whitelist, lint, create_parser _dummy_repo = os.path.join(os.path.dirname(__file__), "dummy") def _mock_lint(name...
Nick-Hall/gramps
refs/heads/master
gramps/gen/plug/report/_paper.py
9
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2010 Jakim Friant # # 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; eithe...
NelisVerhoef/scikit-learn
refs/heads/master
doc/tutorial/text_analytics/solutions/exercise_02_sentiment.py
254
"""Build a sentiment analysis / polarity model Sentiment analysis can be casted as a binary text classification problem, that is fitting a linear classifier on features extracted from the text of the user messages so as to guess wether the opinion of the author is positive or negative. In this examples we will use a ...
sadmansk/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/pywebsocket/mod_pywebsocket/msgutil.py
23
# Copyright 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...
birocorneliu/youtube-dl
refs/heads/master
youtube_dl/extractor/ynet.py
105
# coding: utf-8 from __future__ import unicode_literals import re import json from .common import InfoExtractor from ..compat import compat_urllib_parse_unquote_plus class YnetIE(InfoExtractor): _VALID_URL = r'http://(?:.+?\.)?ynet\.co\.il/(?:.+?/)?0,7340,(?P<id>L(?:-[0-9]+)+),00\.html' _TESTS = [ {...
aperigault/ansible
refs/heads/devel
test/units/modules/cloud/docker/test_docker_container.py
23
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import unittest from ansible.modules.cloud.docker.docker_container import TaskParameters class TestTaskParameters(unittest.TestCase): """Unit tests for TaskParameters.""" def test_parse_exposed_ports_tcp_udp(self): ...
SunghanKim/numpy
refs/heads/master
benchmarks/benchmarks/bench_io.py
29
from __future__ import absolute_import, division, print_function from .common import Benchmark, squares import numpy as np class Copy(Benchmark): params = ["int8", "int16", "float32", "float64", "complex64", "complex128"] param_names = ['type'] def setup(self, typename): dtype = n...
2014c2g2/2015cda
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/unittest/result.py
727
"""Test result object""" import io import sys import traceback from . import util from functools import wraps __unittest = True def failfast(method): @wraps(method) def inner(self, *args, **kw): if getattr(self, 'failfast', False): self.stop() return method(self, *args, **kw) ...
BlackLight/Snort_AIPreproc
refs/heads/master
corr_modules/example_module.py
1
#!/usr/bin/python # Example correlation index in Python # It simply does nothing (both the correlation index # and the correlation weight are zero), use it as # track for writing your own correlation modules # Go to pymodule and run # $ python setup.py build # $ [sudo] python setup.py install # in order to build and ...
iemejia/beam
refs/heads/master
sdks/python/apache_beam/io/kafka.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...
tapomayukh/projects_in_python
refs/heads/master
sandbox_tapo/src/skin_related/Misc/freq_analysis.py
1
from scipy import signal import math, numpy as np from matplotlib import pyplot import roslib; roslib.load_manifest('sandbox_tapo_darpa_m3') import rospy import hrl_lib.matplotlib_util as mpu import hrl_lib.util as ut if __name__ == '__main__': ### Frequency Analysis for Experimental Data ta_fs = ut.load_p...
sumnerevans/wireless-debugging
refs/heads/master
server/parsing_lib/__init__.py
1
from parsing_lib.log_parser import LogParser
infilect/ml-course1
refs/heads/master
deep-learning-tensorflow/week3/assignments/style_transfer/vgg_model_sols.py
2
""" Load VGGNet weights needed for the implementation of the paper For more details, please read the assignment handout: http://web.stanford.edu/class/cs20si/assignments/a2.pdf """ import numpy as np import tensorflow as tf import scipy.io def _weights(vgg_layers, layer, expected_layer_name): """ Return the weig...
sdaftuar/bitcoin
refs/heads/master
qa/rpc-tests/httpbasics.py
106
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test rpc http basics # from test_framework.test_framework import BitcoinTestFramework from test_fram...
Reagankm/KnockKnock
refs/heads/master
venv/lib/python3.4/site-packages/numpy/distutils/setup.py
263
#!/usr/bin/env python from __future__ import division, print_function def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('distutils', parent_package, top_path) config.add_subpackage('command') config.add_subpackage('fcompiler')...
MechCoder/sympy
refs/heads/master
sympy/physics/quantum/tests/test_qubit.py
83
import random from sympy import Integer, Matrix, Rational, sqrt, symbols from sympy.core.compatibility import range from sympy.physics.quantum.qubit import (measure_all, measure_partial, matrix_to_qubit, matrix_to_density, qubit_to_matri...
mr-niels-christensen/environment-scotland-dot-rural
refs/heads/master
src/main/rdflib/plugins/parsers/pyMicrodata/microdata.py
7
# -*- coding: utf-8 -*- """ The core of the Microdata->RDF conversion, a more or less verbatim implementation of the U{W3C IG Note<http://www.w3.org/TR/microdata-rdf/>}. Because the implementation was also used to check the note itself, it tries to be fairly close to the text. @organization: U{World Wide Web Consort...
tjma12/pycbc
refs/heads/master
test/test_skymax.py
3
import copy import unittest import random import os from numpy import complex128, real, sqrt, sin, cos, angle, ceil, log from numpy import zeros, argmax, array from pycbc import DYN_RANGE_FAC from pycbc.waveform import get_td_waveform, get_fd_waveform, td_approximants, fd_approximants from pycbc.pnutils import nearest_...
v-iam/azure-sdk-for-python
refs/heads/master
azure-mgmt-network/azure/mgmt/network/v2016_09_01/models/express_route_circuit_paged.py
11
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
kevinlondon/youtube-dl
refs/heads/master
youtube_dl/extractor/cbs.py
93
from __future__ import unicode_literals from .common import InfoExtractor class CBSIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?(?:cbs\.com/shows/[^/]+/(?:video|artist)|colbertlateshow\.com/(?:video|podcasts))/[^/]+/(?P<id>[^/]+)' _TESTS = [{ 'url': 'http://www.cbs.com/shows/garth-brooks/vid...
spiegela/elasticsearch
refs/heads/master
docs/src/test/cluster/config/scripts/my_script.py
46
doc["num"].value * factor
sadleader/odoo
refs/heads/master
addons/anonymization/anonymization.py
95
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
Panos512/inspire-next
refs/heads/master
inspirehep/modules/search/walkers/tree_printer.py
5
# -*- coding: utf-8 -*- # # This file is part of Invenio-Query-Parser. # Copyright (C) 2014 CERN. # # Invenio-Query-Parser 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 ...
tungvx/deploy
refs/heads/master
.google_appengine/google/appengine/ext/webapp/xmpp_handlers.py
15
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
Eric89GXL/scipy
refs/heads/master
scipy/signal/tests/test_signaltools.py
2
# -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import import sys from decimal import Decimal from itertools import product import warnings import pytest from pytest import raises as assert_raises from numpy.testing import ( assert_equal, assert_almost_equal, assert_array_eq...
xbmcmegapack/plugin.video.megapack.dev
refs/heads/master
resources/lib/menus/home_languages_limburgan.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- """ This file is part of XBMC Mega Pack Addon. Copyright (C) 2014 Wolverine (xbmcmegapack@gmail.com) 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 Softwar...
benssson/flatbuffers
refs/heads/master
tests/MyGame/Example/Color.py
23
# automatically generated by the FlatBuffers compiler, do not modify # namespace: Example class Color(object): Red = 1 Green = 2 Blue = 8
qwertzuhr/2015_Data_Analyst_Project_3
refs/heads/master
Lesson_5_Analyzing_Data/14-Using_push/push.py
4
#!/usr/bin/env python """ $push is similar to $addToSet. The difference is that rather than accumulating only unique values it aggregates all values into an array. Using an aggregation query, count the number of tweets for each user. In the same $group stage, use $push to accumulate all the tweet texts for each user...
erikr/django
refs/heads/master
django/conf/urls/__init__.py
133
import warnings from importlib import import_module from django.core.exceptions import ImproperlyConfigured from django.urls import ( LocaleRegexURLResolver, RegexURLPattern, RegexURLResolver, ) from django.utils import six from django.utils.deprecation import RemovedInDjango20Warning __all__ = ['handler400', 'ha...
cyyber/QRL
refs/heads/master
src/qrl/services/PublicAPIService.py
1
# coding=utf-8 # Distributed under the MIT software license, see the accompanying # file LICENSE or http://www.opensource.org/licenses/mit-license.php. import traceback import os from statistics import variance, mean from pyqrllib.pyqrllib import hstr2bin, QRLHelper, QRLDescriptor from qrl.core import config from qrl...
gerryhd/diabot-assistant
refs/heads/master
lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/universaldetector.py
1775
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
krisys/django
refs/heads/master
tests/check_framework/models.py
396
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models class SimpleModel(models.Model): field = models.IntegerField() manager = models.manager.Manager()
ibm-cds-labs/simple-data-pipe-connector-flightstats
refs/heads/master
pixiedust_flightpredict/pixiedust_flightpredict/__init__.py
1
# ------------------------------------------------------------------------------- # Copyright IBM Corp. 2016 # # 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/licens...
AydinSakar/node-gyp
refs/heads/master
gyp/pylib/gyp/generator/gypd.py
912
# 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. """gypd output module This module produces gyp input as its output. Output files are given the .gypd extension to avoid overwriting the .gyp files that they are ...
ceccode/restify-auth
refs/heads/master
node_modules/restify/node_modules/bunyan/tools/cutarelease.py
171
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2009-2012 Trent Mick """cutarelease -- Cut a release of your project. A script that will help cut a release for a git-based project that follows a few conventions. It'll update your changelog (CHANGES.md), add a git tag, push those changes, update your ver...
alexdevmotion/scrapy-elastic-web-crawling
refs/heads/master
scrapy_redis/pipelines.py
19
from scrapy.utils.serialize import ScrapyJSONEncoder from twisted.internet.threads import deferToThread from . import connection class RedisPipeline(object): """Pushes serialized item into a redis list/queue""" def __init__(self, server): self.server = server self.encoder = ScrapyJSONEncoder...
codeworldprodigy/lab2
refs/heads/master
lib/werkzeug/contrib/fixers.py
464
# -*- coding: utf-8 -*- """ werkzeug.contrib.fixers ~~~~~~~~~~~~~~~~~~~~~~~ .. versionadded:: 0.5 This module includes various helpers that fix bugs in web servers. They may be necessary for some versions of a buggy web server but not others. We try to stay updated with the status of the bug...
eeshangarg/oh-mainline
refs/heads/master
vendor/packages/twisted/twisted/spread/ui/tkutil.py
60
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """Utilities for building L{PB<twisted.spread.pb>} clients with L{Tkinter}. """ from Tkinter import * from tkSimpleDialog import _QueryString from tkFileDialog import _Dialog from twisted.spread import pb from twisted.internet import reactor from...
Shiroy/servo
refs/heads/master
tests/wpt/harness/wptrunner/executors/base.py
21
# 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/. import hashlib import json import os import traceback import urlparse from abc import ABCMeta, abstractmethod from ..te...
codenote/chromium-test
refs/heads/master
build/android/pylib/pexpect.py
70
# Copyright (c) 2012 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 __future__ import absolute_import import os import sys _CHROME_SRC = os.path.join( os.path.abspath(os.path.dirname(__file__)), '..', '..', '..'...
todaychi/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/comment_tests/tests/__init__.py
56
from __future__ import absolute_import from django.contrib.auth.models import User from django.contrib.comments.forms import CommentForm from django.contrib.comments.models import Comment from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.test import Tes...
pombredanne/pulp
refs/heads/master
server/pulp/server/db/model/consumer.py
6
# -*- coding: utf-8 -*- # # Copyright © 2012 Red Hat, Inc. # # This software is licensed to you under the GNU General Public # License as published by the Free Software Foundation; either version # 2 of the License (GPLv2) or (at your option) any later version. # There is NO WARRANTY for this software, express or impli...
mcanthony/antlr4
refs/heads/master
runtime/Python3/src/antlr4/LL1Analyzer.py
17
# # [The "BSD license"] # Copyright (c) 2012 Terence Parr # Copyright (c) 2012 Sam Harwell # Copyright (c) 2014 Eric Vergnaud # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redis...
aleaxit/pysolper
refs/heads/master
permit/lib/dist/tipfy/appengine/__init__.py
9
import os # App Engine flags. SERVER_SOFTWARE = os.environ.get('SERVER_SOFTWARE', '') #: The application ID as defined in *app.yaml*. APPLICATION_ID = os.environ.get('APPLICATION_ID') #: The deployed version ID. Always '1' when using the dev server. CURRENT_VERSION_ID = os.environ.get('CURRENT_VERSION_ID', '1') #: Tru...