repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
AlohaWorld/TR
refs/heads/master
TRT/tools/sortByTime.py
2
#!/env/python # -*- encoding: utf-8 -*- """ @version: 0.1 @author: wenzhiquan @contact: wenzhiquanr@163.com @site: http://github.wenzhiquan.com @software: PyCharm @file: sortByTime.py @time: 15/12/7 14:28 """ from config import config def sortByTime(): print 'sorting meta data by time......' filename = confi...
huitseeker/libnd4j
refs/heads/master
tests/lib/googletest-release-1.8.0/googletest/test/gtest_color_test.py
3259
#!/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...
orekyuu/intellij-community
refs/heads/master
python/testData/regexp/reSubNotRegexp.py
82
import re r = re.compile(r'[123]') r.sub('?', '1234')
ltiao/scikit-learn
refs/heads/master
sklearn/feature_selection/tests/test_chi2.py
56
""" Tests for chi2, currently the only feature selection function designed specifically to work with sparse matrices. """ import numpy as np from scipy.sparse import coo_matrix, csr_matrix import scipy.stats from sklearn.feature_selection import SelectKBest, chi2 from sklearn.feature_selection.univariate_selection im...
rsyvarth/simple-blog
refs/heads/master
lib/wtforms/ext/csrf/form.py
119
from __future__ import unicode_literals from wtforms.form import Form from wtforms.validators import ValidationError from .fields import CSRFTokenField class SecureForm(Form): """ Form that enables CSRF processing via subclassing hooks. """ csrf_token = CSRFTokenField() def __init__(self, formd...
timj/scons
refs/heads/master
src/engine/SCons/Node/FS.py
1
"""scons.Node.FS File system nodes. These Nodes represent the canonical external objects that people think of when they think of building software: files and directories. This holds a "default_fs" variable that should be initialized with an FS that can be used by scripts or modules looking for the canonical default....
andreparrish/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/test/test_pep352.py
93
import unittest import builtins import warnings from test.support import run_unittest import os from platform import system as platform_system class ExceptionClassTests(unittest.TestCase): """Tests for anything relating to exception objects themselves (e.g., inheritance hierarchy)""" def test_builtins_n...
leiferikb/bitpop
refs/heads/master
src/build/android/provision_devices.py
1
#!/usr/bin/env python # # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Provisions Android devices with settings required for bots. Usage: ./provision_devices.py [-d <device serial number>] """ ...
radish-bdd/radish
refs/heads/master
tests/unit/test_loader.py
1
""" radish ~~~~~~ The root from red to green. BDD tooling for Python. :copyright: (c) 2019 by Timo Furrer <tuxtimo@gmail.com> :license: MIT, see LICENSE for more details. """ import pytest from radish.loader import load_modules, load_module from radish.errors import RadishError def test_loader_should_raise_if_loc...
nfeske/codezero
refs/heads/master
tools/pyelf/readelf.py
7
#!/usr/bin/env python from aistruct import AIStruct import elf, sys from optparse import OptionParser from os import path class AfterBurner(AIStruct): def __init__(self, *args, **kwargs): AIStruct.__init__(self, AIStruct.SIZE32) self.setup( ('UINT32', 'addr') ) def __str__(self): return...
jessiejea/rockstar
refs/heads/master
examples/elixir_rockstar.py
5
from RockStar import RockStar elixir_code = 'IO.puts "Hello world"' rock_it_bro = RockStar(days=400, file_name='helloWorld.exs', code=elixir_code) rock_it_bro.make_me_a_rockstar()
jkokorian/ODMAnalysis
refs/heads/master
odmanalysis/odmstudio/odmstudio_framework.py
1
import PyQt4.QtGui as qt import PyQt4.QtCore as q class WidgetFactory(object): __dict = {} @classmethod def registerWidget(cls,widgetClass,anyClass): cls.__dict[anyClass] = widgetClass @classmethod def getWidgetClassFor(cls,anyClass): if cls.__dict.has_key(anyClass): ...
CameronLonsdale/sec-tools
refs/heads/master
python2/lib/python2.7/site-packages/click/_termui_impl.py
136
""" click._termui_impl ~~~~~~~~~~~~~~~~~~ This module contains implementations for the termui module. To keep the import time of Click down, some infrequently used functionality is placed in this module and only imported as needed. :copyright: (c) 2014 by Armin Ronacher. :license: BSD, se...
intgr/django-cms
refs/heads/develop
cms/management/commands/subcommands/delete_orphaned_plugins.py
9
from django.core.management.base import NoArgsCommand from cms.management.commands.subcommands.list import plugin_report from cms.utils.compat.input import raw_input class DeleteOrphanedPluginsCommand(NoArgsCommand): help = "Delete plugins from the CMSPlugins table that should have instances but don't, and ones f...
spierepf/mpf
refs/heads/master
tests/__init__.py
1
__all__ = [ 'MpfTestCase', 'test_BallDevice', 'test_BallDeviceHoldCoil', 'test_BallDeviceManualEject', 'test_BallLock', 'test_BallDeviceSwitchConfirmation' ] from version import __version__
triceratops1/cinelerra
refs/heads/master
cinelerra-4.6/cinelerra-4.6.mod/thirdparty/OpenCV-2.3.1/samples/python/inpaint.py
2
#!/usr/bin/python import urllib2 import sys import cv2.cv as cv class Sketcher: def __init__(self, windowname, dests): self.prev_pt = None self.windowname = windowname self.dests = dests cv.SetMouseCallback(self.windowname, self.on_mouse) def on_mouse(self, event, x, y, flags, ...
popcorn9499/chatBot
refs/heads/master
modules/chatbot.py
1
from utils import config from utils import Object import asyncio import time import datetime from utils import logger from utils import fileIO from modules import messageFilter from utils import messageFormatter import os class chatbot: def __init__(self): self.l = logger.logs("Chatbot") ...
huobaowangxi/scikit-learn
refs/heads/master
examples/neural_networks/plot_rbm_logistic_classification.py
258
""" ============================================================== Restricted Boltzmann Machine features for digit classification ============================================================== For greyscale image data where pixel values can be interpreted as degrees of blackness on a white background, like handwritten...
CYBAI/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/third_party/html5lib/html5lib/tests/tree_construction.py
17
from __future__ import absolute_import, division, unicode_literals import itertools import re import warnings from difflib import unified_diff import pytest from .support import TestData, convert, convertExpected, treeTypes from html5lib import html5parser, constants, treewalkers from html5lib.filters.lint import Fi...
Senseg/Py4A
refs/heads/master
python3-alpha/python3-src/Lib/http/cookies.py
47
#!/usr/bin/env python3 # #### # Copyright 2000 by Timothy O'Malley <timo@alum.mit.edu> # # All Rights Reserved # # Permission to use, copy, modify, and distribute this software # and its documentation for any purpose and without fee is hereby # granted, provided that the above copyright notice appear in...
thiagopena/PySIGNFe
refs/heads/master
pysignfe/nfe/manual_401/inutnfe_200.py
1
# -*- coding: utf-8 -*- from pysignfe.xml_sped import * from pysignfe.nfe.manual_401 import ESQUEMA_ATUAL from pysignfe.nfe.manual_300 import inutnfe_107 import os DIRNAME = os.path.dirname(__file__) class InfInutEnviado(inutnfe_107.InfInutEnviado): def __init__(self): super(InfInutEnviado, self).__init_...
Edraak/edraak-platform
refs/heads/master
common/lib/conftest.py
8
"""Code run by pylint before running any tests.""" # Patch the xml libs before anything else. from safe_lxml import defuse_xml_libs defuse_xml_libs() import pytest @pytest.fixture(autouse=True) def no_webpack_loader(monkeypatch): monkeypatch.setattr( "webpack_loader.templatetags.webpack_loader.render_bu...
bluevoda/BloggyBlog
refs/heads/master
lib/python3.4/site-packages/django/core/cache/utils.py
585
from __future__ import unicode_literals import hashlib from django.utils.encoding import force_bytes from django.utils.http import urlquote TEMPLATE_FRAGMENT_KEY_TEMPLATE = 'template.cache.%s.%s' def make_template_fragment_key(fragment_name, vary_on=None): if vary_on is None: vary_on = () key = ':'...
thinkopensolutions/l10n-brazil
refs/heads/10.0
sped_stock/models/inherited_sped_documento_volume.py
2
# -*- coding: utf-8 -*- # # Copyright 2017 Taŭga Tecnologia # Aristides Caldeira <aristides.caldeira@tauga.com.br> # License AGPL-3 or later (http://www.gnu.org/licenses/agpl) # from __future__ import division, print_function, unicode_literals from odoo import fields, models class SpedDocumentoVolume(models.Mode...
Leila20/django
refs/heads/master
django/conf/locale/ro/formats.py
619
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # 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' DATETI...
Barmaley-exe/scikit-learn
refs/heads/master
sklearn/linear_model/ridge.py
4
""" Ridge regression """ # Author: Mathieu Blondel <mathieu@mblondel.org> # Reuben Fletcher-Costin <reuben.fletchercostin@gmail.com> # Fabian Pedregosa <fabian@fseoane.net> # Michael Eickenberg <michael.eickenberg@nsup.org> # License: BSD 3 clause from abc import ABCMeta, abstractmethod impor...
bboalimoe/ndn-cache-policy
refs/heads/master
docs/sphinx-contrib/phpdomain/doc/conf.py
5
# -*- coding: utf-8 -*- # # sphinxcontrib-rubydomain-acceptancetest documentation build configuration file, created by # sphinx-quickstart on Sun Apr 25 13:27:18 2010. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in th...
mhharsh/stackalytics
refs/heads/master
stackalytics/tests/unit/test_mps.py
9
# Copyright (c) 2013 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
fiji-flo/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/wptserve/tests/functional/__init__.py
12133432
falgore88/grafana-metrics
refs/heads/master
__init__.py
12133432
jaspreetw/tempest
refs/heads/master
tempest/thirdparty/__init__.py
12133432
devs1991/test_edx_docmode
refs/heads/master
venv/lib/python2.7/site-packages/social/apps/flask_app/default/__init__.py
12133432
cobalys/django
refs/heads/master
tests/regressiontests/modeladmin/__init__.py
12133432
emorozov/django-basic-apps
refs/heads/master
basic/relationships/templatetags/relationships.py
11
from django import template from django.db import models Relationship = models.get_model('relationships', 'relationship') register = template.Library() # Expose RelationshipManager functionality as template filters. @register.filter def blockers(user): """Returns list of people blocking user.""" try: ...
devs1991/test_edx_docmode
refs/heads/master
venv/lib/python2.7/site-packages/contracts/backported.py
2
import sys from inspect import ArgSpec if sys.version_info[0] == 3: # pragma: no cover from inspect import getfullargspec else: # pragma: no cover from collections import namedtuple FullArgSpec = namedtuple('FullArgSpec', 'args varargs varkw defaults' ' kwonlyargs kwonlydefa...
bdoner/SickRage
refs/heads/master
lib/github/Plan.py
74
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
ama-jharrison/agdc
refs/heads/master
agdc/api-examples/source/test/python/datacube/__init__.py
8
# !/usr/bin/python __author__ = "Simon Oldfield" #__copyright__ = "Copyright 2007, The Cogent Project" #__credits__ = ["Rob Knight", "Peter Maxwell", "Gavin Huttley", "Matthew Wakefield"] #__license__ = "GPL" #__version__ = "1.0.1" __maintainer__ = "Simon Oldfield" __email__ = "Simon Oldfield <simon@oldfield.id.au>" ...
alienity/three.js
refs/heads/master
utils/exporters/blender/addons/io_three/exporter/material.py
124
from .. import constants, logger from . import base_classes, utilities, api class Material(base_classes.BaseNode): """Class that wraps material nodes""" def __init__(self, node, parent): logger.debug("Material().__init__(%s)", node) base_classes.BaseNode.__init__(self, node, parent, ...
wnt-zhp/hufce
refs/heads/master
django/conf/locale/lv/formats.py
316
# -*- 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 = r'Y. \g\a\d\a j. F' TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = r'Y. \g\a\d\a ...
gchp/django
refs/heads/master
django/contrib/gis/maps/google/zoom.py
527
from __future__ import unicode_literals from math import atan, exp, log, pi, sin from django.contrib.gis.geos import GEOSGeometry, LinearRing, Point, Polygon from django.contrib.gis.maps.google.gmap import GoogleMapException from django.utils.six.moves import range # Constants used for degree to radian conversion, a...
mifix/dotfiles
refs/heads/master
ranger/colorschemes/__init__.py
12133432
lociii/jukebox
refs/heads/master
jukebox/jukebox_core/__init__.py
12133432
drpngx/tensorflow
refs/heads/master
tensorflow/contrib/kfac/python/kernel_tests/utils_test.py
16
# 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...
pluckljn/paimei
refs/heads/master
pida/basic_block.py
7
# # PIDA Basic Block # Copyright (C) 2006 Pedram Amini <pedram.amini@gmail.com> # # $Id: basic_block.py 194 2007-04-05 15:31:53Z cameron $ # # 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; ...
vk-brain/sketal
refs/heads/master
bot.py
2
import asyncio, aiohttp, json, time, logging from asyncio import Future, Task from aiohttp import web from os import getenv from handler.handler_controller import MessageHandler from utils import parse_msg_flags from utils import VkController from utils import Message, LongpollEvent, ChatChangeEvent, CallbackEvent f...
etkirsch/legends-of-erukar
refs/heads/master
erukar/content/enemies/dragon/YellowDragonoid.py
1
from ..templates.Dragonoid import Dragonoid class YellowDragonoid(Dragonoid): BaseDamageMitigations = { 'piercing': (0.05, 0), 'slashing': (0.10, 0), 'bludgeoning': (0.15, 0), 'electric': (0.4, 0) } def __init__(self, random=True): super().__init__("Yellow Dragonoid...
leafclick/intellij-community
refs/heads/master
python/testData/inspections/PyArgumentListInspection/multiResolveWhenOneResultDoesNotHaveUnmappedArguments.py
30
class C1: def foo(self, x): return self class C2: def foo(self, x, y): return self def f(): """ :rtype: C1 | C2 """ pass f().foo(1, 2)
inkenbrandt/ArcPy
refs/heads/master
PourousPuff.py
1
# -*- coding: utf-8 -*- # --------------------------------------------------------------------------- # PourousPuff.py # Created on: 2015-10-05 16:55:42.00000 # (generated by ArcGIS/ModelBuilder) # Usage: PourousPuff <Thick30m> <Poros3> # Description: # --------------------------------------------------------------...
Tokyo-Buffalo/tokyosouth
refs/heads/master
env/lib/python3.6/site-packages/twisted/python/constants.py
15
# -*- test-case-name: twisted.python.test.test_constants -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Symbolic constant support, including collections and constants with text, numeric, and bit flag values. """ from __future__ import division, absolute_import # Import and re-export ...
ol-loginov/intellij-community
refs/heads/master
python/testData/refactoring/move/packageImport/after/src/lib1/__init__.py
12133432
ojengwa/Bookie
refs/heads/develop
bookie/tests/test_auth/__init__.py
12133432
zhuwenping/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/importlib/test/abc.py
86
import abc import unittest class FinderTests(unittest.TestCase, metaclass=abc.ABCMeta): """Basic tests for a finder to pass.""" @abc.abstractmethod def test_module(self): # Test importing a top-level module. pass @abc.abstractmethod def test_package(self): # Test importi...
dutwfk/pytest
refs/heads/master
leetcode/py/62.py
12133432
kowito/django-autocomplete-light
refs/heads/v2
autocomplete_light/example_apps/non_admin_add_another/models.py
4
from __future__ import unicode_literals from django.db import models from django.core import urlresolvers from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class NonAdminAddAnotherModel(models.Model): name = models.CharField(max_length=100) widgets = models.ManyToMany...
signed/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/conf/locale/sr/__init__.py
12133432
civisanalytics/ansible
refs/heads/civis
lib/ansible/modules/network/sros/__init__.py
12133432
arnaudsj/mdp-toolkit
refs/heads/master
mdp/nodes/__init__.py
1
# -*- coding:utf-8 -*- __docformat__ = "restructuredtext en" from pca_nodes import WhiteningNode, PCANode from sfa_nodes import SFANode, SFA2Node from ica_nodes import ICANode, CuBICANode, FastICANode, TDSEPNode from neural_gas_nodes import GrowingNeuralGasNode, NeuralGasNode from expansion_nodes import (QuadraticExpa...
themaxx75/lapare-bijoux
refs/heads/master
lapare.ca/lapare/apps/www/admin.py
1
from django.contrib import admin from .models import Bijoux, Expo, Vente @admin.register(Expo) class ExpoAdmin(admin.ModelAdmin): pass @admin.register(Vente) class VenteAdmin(admin.ModelAdmin): pass @admin.register(Bijoux) class BijouxAdmin(admin.ModelAdmin): exclude = ('processed', 'processed_path')...
vberaudi/scipy
refs/heads/master
scipy/optimize/lbfgsb.py
6
""" Functions --------- .. autosummary:: :toctree: generated/ fmin_l_bfgs_b """ ## License for the Python wrapper ## ============================== ## Copyright (c) 2004 David M. Cooke <cookedm@physics.mcmaster.ca> ## Permission is hereby granted, free of charge, to any person obtaining a ## copy of this so...
akaihola/django
refs/heads/master
django/bin/django-admin.py
1623
#!/usr/bin/env python from django.core import management if __name__ == "__main__": management.execute_from_command_line()
mete0r/testfixture
refs/heads/master
mete0r_testfixture/testfixture.py
1
# -*- coding: utf-8 -*- # # mete0r_testfixture: a testfixture helper # Copyright (C) 2015-2017 mete0r <mete0r@sarangbang.or.kr> # # 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,...
upgoingstar/datasploit
refs/heads/master
domain/domain_whois.py
2
#!/usr/bin/env python import base import sys import whois from termcolor import colored import time ENABLED = True class style: BOLD = '\033[1m' END = '\033[0m' def whoisnew(domain): try: w = whois.whois(domain) return dict(w) except: return {} def banner(): print colored(style.BOLD + ...
overtherain/scriptfile
refs/heads/master
software/googleAppEngine/lib/django_0_96/django/db/models/fields/generic.py
32
""" Classes allowing "generic" relations through ContentType and object-id fields. """ from django import oldforms from django.core.exceptions import ObjectDoesNotExist from django.db import backend from django.db.models import signals from django.db.models.fields.related import RelatedField, Field, ManyToManyRel from...
gsvic/fmriFlow
refs/heads/master
main.py
1
""" main.py Used to execute operators from bash using sbin/run.sh """ import pickle import argparse import utils import nibabel as nbl from workflow import Workflow from pyspark import SparkContext """ Argument Parsing""" parser = argparse.ArgumentParser(description="fMRI Flow: Neuroimaging with Apache Spark and Py...
rkfg/linux
refs/heads/master
tools/perf/scripts/python/sched-migration.py
1910
#!/usr/bin/python # # Cpu task migration overview toy # # Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com> # # perf script event handlers have been generated by perf script -g python # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Fre...
jakesdavis/ionic-boilerplate-template
refs/heads/master
node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py
960
# 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. # Notes: # # This generates makefiles suitable for inclusion into the Android build system # via an Android.mk file. It is based on make.py, the standard makefile ...
danieldmm/minerva
refs/heads/master
az/az_test.py
1
# <description> # # Copyright: (c) Daniel Duma 2016 # Author: Daniel Duma <danielduma@gmail.com> # For license information, see LICENSE.TXT def main(): pass if __name__ == '__main__': main()
thomas1206/azure-linux-extensions
refs/heads/master
DSC/test/test_apply_mof.py
2
#!/usr/bin/env python # # DSC Extension For Linux # # Copyright 2014 Microsoft Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #...
perfectsearch/sandman
refs/heads/master
code/buildscripts/codescan/check_pep8.py
1
#!/usr/bin/env python # # $Id: check_pep8.py 9319 2011-06-10 02:59:43Z nathan_george $ # # Proprietary and confidential. # Copyright $Date:: 2011#$ Perfect Search Corporation. # All rights reserved. # import sys import os import subprocess buildscriptDir = os.path.dirname(__file__) buildscriptDir = os.path.abspath(os....
neoareslinux/neutron
refs/heads/master
neutron/plugins/ml2/driver_api.py
6
# Copyright (c) 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
mfraezz/osf.io
refs/heads/develop
api_tests/registrations/views/test_registration_embeds.py
10
import pytest from nose.tools import * # noqa: import functools from framework.auth.core import Auth from api.base.settings.defaults import API_BASE from tests.base import ApiTestCase from osf.utils.permissions import WRITE from osf_tests.factories import ( ProjectFactory, AuthUserFactory, RegistrationFa...
DANS-KNAW/dariah-contribute
refs/heads/master
dariah_contribute/urls/dev.py
1
""" DARIAH Contribute - DARIAH-EU Contribute: edit your DARIAH contributions. Copyright 2014 Data Archiving and Networked Services 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 a...
ProfessorX/Config
refs/heads/master
.PyCharm30/system/python_stubs/-1247972723/PyQt4/QtGui/__init__/QMatrix2x2.py
2
# encoding: utf-8 # module PyQt4.QtGui # from /usr/lib/python2.7/dist-packages/PyQt4/QtGui.so # by generator 1.135 # no doc # imports import PyQt4.QtCore as __PyQt4_QtCore class QMatrix2x2(): # skipped bases: <type 'sip.simplewrapper'> """ QMatrix2x2() QMatrix2x2(QMatrix2x2) QMatrix2x2(sequence-of-fl...
anest1s/Refactoring_the_Bad_Boids
refs/heads/master
Good_Boids_module/tests/test_the_Good_Boids.py
1
from Good_Boids_module.Update_Boids import Boids import numpy as np from nose.tools import assert_almost_equal, assert_greater from nose.tools import assert_less, assert_equal from numpy.testing import assert_array_equal import os import yaml from Good_Boids_module.tests.record_fixtures import configuration_file fixt...
udacity/deep-learning
refs/heads/master
first-neural-network/my_answers.py
11
import numpy as np class NeuralNetwork(object): def __init__(self, input_nodes, hidden_nodes, output_nodes, learning_rate): # Set number of nodes in input, hidden and output layers. self.input_nodes = input_nodes self.hidden_nodes = hidden_nodes self.output_nodes = output_nodes ...
40023255/2015cd_0505
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/compat.py
603
"""Python 2.x/3.x compatibility tools""" import sys __all__ = ['geterror', 'long_', 'xrange_', 'ord_', 'unichr_', 'unicode_', 'raw_input_', 'as_bytes', 'as_unicode'] def geterror (): return sys.exc_info()[1] try: long_ = long except NameError: long_ = int try: xrange_ = xrange except Nam...
ktnyt/chainer
refs/heads/master
tests/chainer_tests/exporters_tests/__init__.py
12133432
Johnetordoff/osf.io
refs/heads/develop
admin_tests/mixins/__init__.py
12133432
NotBlizzard/chattrmini
refs/heads/master
app.py
1
from flask import Flask, render_template, url_for app = Flask(__name__) @app.route('/') def hello(): return render_template('index.html') if __name__ == '__main__': app.run()
mgadi/naemonbox
refs/heads/master
sources/psdash/gevent-1.0.1/greentest/test__example_echoserver.py
3
from __future__ import with_statement from gevent.socket import create_connection, timeout from unittest import main import gevent import util class Test(util.TestServer): server = 'echoserver.py' def _run_all_tests(self): def test_client(message): conn = create_connection(('127.0.0.1', ...
USGSDenverPychron/pychron
refs/heads/develop
pychron/modeling/data_loader.py
1
# =============================================================================== # Copyright 2011 Jake Ross # # 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...
redmi/android_kernel_HM2014811
refs/heads/staging/cm-12
tools/perf/scripts/python/sched-migration.py
11215
#!/usr/bin/python # # Cpu task migration overview toy # # Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com> # # perf script event handlers have been generated by perf script -g python # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Fre...
mims2707/bite-project
refs/heads/master
deps/gdata-python-client/src/gdata/Crypto/PublicKey/qNEW.py
228
# # qNEW.py : The q-NEW signature algorithm. # # Part of the Python Cryptography Toolkit # # Distribute and use freely; there are no restrictions on further # dissemination and usage except those imposed by the laws of your # country of residence. This software is provided "as is" without # warranty of fitness fo...
tscheepers/hred-qs
refs/heads/master
baselines/VMM/vmm_rerank.py
3
import os import argparse import cPickle import operator import itertools from Common.psteff import * def rerank(model_file, ctx_file, rnk_file, score=False, no_normalize=False, fallback=False): pstree = PSTInfer() pstree.load(model_file) output_file = open(rnk_file + "_VMM" + (".f" if score else ".gen"), ...
kangxu/crosswalk-test-suite
refs/heads/master
tools/allpairs-plus/metacomm/combinatorics/__init__.py
12133432
adambain-vokal/django-rest-framework
refs/heads/master
tests/browsable_api/__init__.py
12133432
linspector/linspector
refs/heads/master
linspector/services/http/__init__.py
12133432
piffey/ansible
refs/heads/devel
lib/ansible/modules/cloud/cloudstack/cs_storage_pool.py
39
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2017, Netservers Ltd. <support@netservers.co.uk> # (c) 2017, René Moser <mail@renemoser.net> # # 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...
magopian/olympia
refs/heads/master
apps/editors/decorators.py
14
import functools from django.core.exceptions import PermissionDenied from access import acl from amo.decorators import login_required def _view_on_get(request): """Return True if the user can access this page. If the user is in a group with rule 'ReviewerTools:View' and the request is a GET request, th...
bileto/transitfeed
refs/heads/bileto
tests/__init__.py
12133432
Jheguy2/Mercury
refs/heads/master
contrib/bitrpc/bitrpc.py
2348
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:8332") else: access = Ser...
BondAnthony/ansible
refs/heads/devel
lib/ansible/module_utils/facts/virtual/sunos.py
33
# This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that ...
offtools/linux-show-player
refs/heads/master
lisp/modules/midi/midi_common.py
3
# -*- coding: utf-8 -*- # # This file is part of Linux Show Player # # Copyright 2012-2016 Francesco Ceruti <ceppofrancy@gmail.com> # # Linux Show Player 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 ...
danisfermi/CodingPractice
refs/heads/master
Data Structures/Stack/Reverse String/reverseString.py
1
class stack: def __init__(self): self.s = [] self.size = 0 def printStack(self): print "Printing Stack", self.s def isEmpty(self): if self.size == 0: return True else: return False def top(self): return self.s[self.size-1] d...
tejoesperanto/pasportaservo
refs/heads/master
hosting/migrations/0041_auto_20170929_1743.py
4
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-09-29 17:43 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('hosting', '0040_add_point_field_location'), ] operations = [ migrations.AlterModelO...
icloudrnd/automation_tools
refs/heads/master
openstack_dashboard/api/__init__.py
43
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # Copyright 2013 Big Switch Networks # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use th...
pigeonflight/strider-plone
refs/heads/master
docker/appengine/lib/django-1.5/django/utils/ipv6.py
113
# This code was mostly based on ipaddr-py # Copyright 2007 Google Inc. http://code.google.com/p/ipaddr-py/ # Licensed under the Apache License, Version 2.0 (the "License"). from django.core.exceptions import ValidationError from django.utils.six.moves import xrange def clean_ipv6_address(ip_str, unpack_ipv4=False, ...
ar45/django
refs/heads/master
tests/migrations/test_migrations_squashed_complex_multi_apps/app2/__init__.py
12133432
shinyChen/browserscope
refs/heads/master
third_party/gaefy/__init__.py
12133432
thnee/ansible
refs/heads/devel
lib/ansible/module_utils/network/routeros/__init__.py
12133432