repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
Vallher/zulip
refs/heads/master
zproject/test_settings.py
3
from __future__ import absolute_import from .settings import * import os DATABASES["default"] = {"NAME": "zulip_test", "USER": "zulip_test", "PASSWORD": LOCAL_DATABASE_PASSWORD, "HOST": "localhost", "SCHEMA": "zulip", ...
h3llrais3r/SickRage
refs/heads/master
lib/sqlalchemy/dialects/mysql/pyodbc.py
79
# mysql/pyodbc.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: mysql+pyodbc :name: PyODBC :dbapi: pyodbc :connectstrin...
pombredanne/django-inplaceedit
refs/heads/master
testing/settings.py
3
# Django settings for testing project. from os import path DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS BASEDIR = path.dirname(path.abspath(__file__)) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgre...
pymager/pymager
refs/heads/master
pymager/imgengine/_imagemetadatanotfoundexception.py
1
""" Copyright 2010 Sami Dalouche 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 ...
fast90/youtube-dl
refs/heads/master
youtube_dl/extractor/urplay.py
12
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class URPlayIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?urplay\.se/program/(?P<id>[0-9]+)' _TEST = { 'url': 'http://urplay.se/program/190031-tripp-trapp-trad-sovkudde', 'md5': '15ca67b63fd8fb320...
cloudbau/glance
refs/heads/master
glance/tests/unit/api/test_common.py
1
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
DemocracyClub/yournextrepresentative
refs/heads/master
ynr/apps/popolo/migrations/0013_clean_up_after_postextra_move.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-08-21 21:14 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("popolo", "0012_move_post_extra_data_to_base")] operations = [ migrations.AlterField( ...
Evisceration/linux-kernel
refs/heads/master
Documentation/driver-api/conf.py
361
# -*- coding: utf-8; mode: python -*- project = "The Linux driver implementer's API guide" tags.add("subproject") latex_documents = [ ('index', 'driver-api.tex', project, 'The kernel development community', 'manual'), ]
highweb-project/highweb-webcl-html5spec
refs/heads/highweb-20160310
build/android/emma_coverage_stats.py
23
#!/usr/bin/python # Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Generates incremental code coverage reports for Java code in Chromium. Usage: build/android/emma_coverage_stats.py -v --out <output ...
bakhtout/odoo-educ
refs/heads/8.0
addons/l10n_pe/__init__.py
2120
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2011 Cubic ERP - Teradata SAC. (http://cubicerp.com). # # WARNING: This program as such is intended to be used by professional # programmers who take t...
SibirsKoin/SibirsKoin
refs/heads/master
qa/rpc-tests/walletbackup.py
131
#!/usr/bin/env python2 # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Exercise the wallet backup code. Ported from walletbackup.sh. Test case is: 4 nodes. 1 2 and 3 send ...
MichaelNedzelsky/intellij-community
refs/heads/master
plugins/hg4idea/testData/bin/hgext/largefiles/proto.py
92
# Copyright 2011 Fog Creek Software # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. import os import urllib2 from mercurial import error, httppeer, util, wireproto from mercurial.wireproto import batchable, future from mercurial....
paul-rs/amaas-core-sdk-python
refs/heads/master
amaascore/parties/enums.py
3
from __future__ import absolute_import, division, print_function, unicode_literals PARTY_STATUSES = {'Active', 'Inactive', 'Superseded'} PARTY_TYPES = {'AssetManager', 'Broker', 'Company', 'Exchange', 'Fund', 'GovernmentAgency', 'Individual', 'Organisation', 'Party'}
darongE/synergy
refs/heads/master
ext/toolchain/__init__.py
2
# synergy -- mouse and keyboard sharing utility # Copyright (C) 2012 Synergy Si Ltd. # Copyright (C) 2009 Nick Bolton # # This package is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # found in the file COPYING that should have accompanied this file. # # ...
L3K0V/problematic
refs/heads/master
server/app/views.py
1
from .models import Tag, Document from rest_framework import viewsets from app.serializers import TagSerializer, DocumentSerializer from app.filters import DocumentExactTagsFilter class TagViewSet(viewsets.ModelViewSet): """API endpoint that allows tags to be viewed or edited.""" queryset = Tag.objects.all...
stanlyxiang/incubator-hawq
refs/heads/master
tools/bin/lib/gpsnap.py
12
#!/usr/bin/env python # 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 # "L...
58DBA/ansible
refs/heads/master
playbooks/simple.api.py
1
#!/bin/env pythom import ansible.runner runner = ansible.runner.Runner( module_name='ping', module_args='', pattern='web*', forks=10 ) datastructure = runner.run()
Ratler/loopia-dyndns
refs/heads/master
loopia-dyndns.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # loopia-dyndns.py - A dynamic DNS updater using the Loopia API # Copyright (C) 2013 Stefan Wold <ratler@stderr.eu> # # 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 Fr...
WillisXChen/django-oscar
refs/heads/master
oscar/lib/python2.7/site-packages/waitress/tests/test_trigger.py
39
import unittest import os import sys if not sys.platform.startswith("win"): class Test_trigger(unittest.TestCase): def _makeOne(self, map): from waitress.trigger import trigger return trigger(map) def test__close(self): map = {} inst = self._makeOn...
darina/omim
refs/heads/master
tools/user_code_coverage.py
53
import os import json import sys if len(sys.argv) < 3: print "USAGE: " + sys.argv[0] + " [username] [htmlfile]" exit() USERNAME = sys.argv[1] HTMLFILE = sys.argv[1] if __name__ == "__main__": os.system('git log --pretty="%H" --author="'+USERNAME+'" | while read commit_hash; do git show --oneline --name-...
deerwalk/voltdb
refs/heads/master
tests/sqlcoverage/schema/index-varbinary-schema.py
2
#!/usr/bin/env python # This file is part of VoltDB. # Copyright (C) 2008-2017 VoltDB Inc. # # 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 limitati...
nipy/brainx
refs/heads/master
brainx/tests/__init__.py
6
import os def get_tdata_corr_txt_dir(): """Return the directory with text correlation sample files""" return os.path.join(os.path.dirname(__file__),'tdata_corr_txt')
hanlind/nova
refs/heads/master
nova/policies/hosts.py
6
# Copyright 2016 Cloudbase Solutions Srl # 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 r...
lcy-seso/Paddle
refs/heads/develop
python/paddle/fluid/tests/unittests/test_sgd_op.py
5
# Copyright (c) 2018 PaddlePaddle 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 app...
alexmogavero/home-assistant
refs/heads/dev
homeassistant/components/light/limitlessled.py
13
""" Support for LimitlessLED bulbs. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/light.limitlessled/ """ import logging import voluptuous as vol from homeassistant.const import (CONF_NAME, CONF_HOST, CONF_PORT, CONF_TYPE) from homeassistant.component...
slohse/ansible
refs/heads/devel
lib/ansible/modules/crypto/openssl_publickey.py
43
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Yanis Guenane <yanis+ansible@guenane.org> # 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': '...
AndroidOpenDevelopment/android_external_chromium_org
refs/heads/lp
tools/telemetry/telemetry/core/platform/power_monitor/android_temperature_monitor_unittest.py
9
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import unittest from telemetry.core.platform.power_monitor import android_temperature_monitor from telemetry.unittest import simple_mock _ = simple_mock.D...
nanolearningllc/edx-platform-cypress-2
refs/heads/master
common/test/acceptance/pages/lms/tab_nav.py
112
""" High-level tab navigation. """ from bok_choy.page_object import PageObject from bok_choy.promise import Promise, EmptyPromise class TabNavPage(PageObject): """ High-level tab navigation. """ url = None def is_browser_on_page(self): return self.q(css='ol.course-tabs').present de...
bluephlavio/latest
refs/heads/master
docs/conf.py
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # latest documentation build configuration file, created by # sphinx-quickstart on Tue Jul 18 11:02:33 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # aut...
lumig242/Hue-Integration-with-CDAP
refs/heads/pull3
desktop/core/ext-py/boto-2.38.0/boto/s3/__init__.py
114
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # Copyright (c) 2014, Steven Richards <sbrichards@mit.edu> # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation fi...
vismartltd/edx-platform
refs/heads/master
lms/djangoapps/bulk_email/migrations/0001_initial.py
182
# -*- coding: utf-8 -*- from south.db import db from south.v2 import SchemaMigration class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'CourseEmail' db.create_table('bulk_email_courseemail', ( ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True...
aykut/django-oscar
refs/heads/master
oscar/apps/partner/management/commands/import_stock.py
1
import logging import sys import os from optparse import make_option from django.core.management.base import BaseCommand, CommandError from oscar.core.loading import import_module import_module('partner.utils', ['StockImporter'], locals()) import_module('partner.exceptions', ['ImportError'], locals()) class Command...
MotorolaMobilityLLC/external-chromium_org
refs/heads/kitkat-mr1-release-falcon-gpe
tools/json_to_struct/element_generator_test.py
115
#!/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. from element_generator import GenerateFieldContent from element_generator import GenerateElements import unittest class ElementGen...
anbangleo/NlsdeWeb
refs/heads/master
Python-3.6.0/Lib/test/test_binhex.py
7
"""Test script for the binhex C module Uses the mechanism of the python binhex module Based on an original test by Roger E. Masse. """ import binhex import unittest from test import support class BinHexTestCase(unittest.TestCase): def setUp(self): self.fname1 = support.TESTFN + "1" self.fn...
gnychis/gnuradio-3.5.0-dmr
refs/heads/master
grc/gui/DrawingArea.py
34
""" Copyright 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion 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 ...
Rich143/Flight_Controller
refs/heads/master
common/googletest/googlemock/scripts/upload_gmock.py
770
#!/usr/bin/env python # # Copyright 2009, 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...
poiesisconsulting/openerp-restaurant
refs/heads/master
web/__openerp__.py
3
{ 'name': 'Web', 'category': 'Hidden', 'version': '1.0', 'description': """ OpenERP Web core module. ======================== This module provides the core of the OpenERP Web Client. """, 'depends': ['base'], 'auto_install': True, 'data': [ 'views/webclient_templates...
Kazade/NeHe-Website
refs/heads/master
google_appengine/lib/django-1.5/django/contrib/localflavor/be/forms.py
194
""" Belgium-specific Form helpers """ from __future__ import absolute_import from django.contrib.localflavor.be.be_provinces import PROVINCE_CHOICES from django.contrib.localflavor.be.be_regions import REGION_CHOICES from django.forms.fields import RegexField, Select from django.utils.translation import ugettext_lazy...
SCLT1975/python_training
refs/heads/master
test/test_db_matches_ui.py
7
from model.group import Group def test_group_list(app, db): ui_list = app.group.get_group_list() def clean(group): return Group(id=group.id, name=group.name.strip()) db_list = map(clean, db.get_group_list()) assert sorted(ui_list, key=Group.id_or_max) == sorted(db_list, key=Group.id_or_max)
DavidRamirez19/Total-Demolition---PYGAME
refs/heads/master
Total Demolition 1.3.1/Clases/Enemigo.py
2
import pygame import Proyectil from random import randint class Enemigo(pygame.sprite.Sprite): """Clase controlar el vehiculo del enemigo y sus acciones""" """ Constructor de la clase """ def __init__(self, ancho,alto,posx,posy,esTanque,tankFuerte,esJefe): pygame.sprite.Sprite.__init__...
Imaginashion/cloud-vision
refs/heads/master
.fr-d0BNfn/django-jquery-file-upload/venv/lib/python3.5/site-packages/django/contrib/gis/gdal/prototypes/ds.py
349
""" This module houses the ctypes function prototypes for OGR DataSource related data structures. OGR_Dr_*, OGR_DS_*, OGR_L_*, OGR_F_*, OGR_Fld_* routines are relevant here. """ from ctypes import POINTER, c_char_p, c_double, c_int, c_long, c_void_p from django.contrib.gis.gdal.envelope import OGREnvelope from djan...
zero323/spark
refs/heads/master
python/pyspark/ml/fpm.py
6
# # 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...
varunarya10/boto
refs/heads/develop
boto/swf/__init__.py
145
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # 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...
dimagol/trex-core
refs/heads/master
scripts/external_libs/nose-1.3.4/python3/nose/twistedtools.py
11
""" Twisted integration ------------------- This module provides a very simple way to integrate your tests with the Twisted_ event loop. You must import this module *before* importing anything from Twisted itself! Example:: from nose.twistedtools import reactor, deferred @deferred() def test_resolve(): ...
carljm/django
refs/heads/master
tests/migrations/migrations_test_apps/migrated_app/migrations/0001_initial.py
2995
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): operations = [ migrations.CreateModel( "Author", [ ("id", models.AutoField(primary_key=True)), ("name",...
synconics/odoo
refs/heads/8.0
addons/analytic_contract_hr_expense/analytic_contract_hr_expense.py
223
# -*- 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...
ifrsrg/projens-automacao
refs/heads/master
testes/python/teste4.py
2
import sys #London bridge has fallen down... Has fallen down... Fallen down... #London bridge has... Fallen down! My fair lady... #Take the keys and lock then up! Yes! Go on, do it! Yes... Lock then up! #Take the keys and lock then up! My fair lady... #Everything is quite alright, sleepy tight, nighty night... ...
minhphung171093/GreenERP_V8
refs/heads/master
openerp/addons/payment_paypal/controllers/main.py
260
# -*- coding: utf-8 -*- try: import simplejson as json except ImportError: import json import logging import pprint import urllib2 import werkzeug from openerp import http, SUPERUSER_ID from openerp.http import request _logger = logging.getLogger(__name__) class PaypalController(http.Controller): _noti...
vjmac15/Lyilis
refs/heads/master
lib/pip/_vendor/distlib/wheel (VJ Washington's conflicted copy 2017-08-29).py
412
# -*- coding: utf-8 -*- # # Copyright (C) 2013-2016 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # from __future__ import unicode_literals import base64 import codecs import datetime import distutils.util from email import message_from...
stinos/micropython-wrap
refs/heads/master
tests/py/tuple.py
1
import upywraptest pair = ((1, True), 0.2) print(upywraptest.Pair(pair)) tup1 = [0, True, 1] print(upywraptest.Tuple1(tup1)) tup2 = (tup1, 'a', [tup1, tup1]) print(upywraptest.Tuple2(tup2))
openstack/os-win
refs/heads/master
os_win/utils/storage/diskutils.py
1
# Copyright 2016 Cloudbase Solutions Srl # 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 r...
nailor/tyy-vaali
refs/heads/master
aanikone/auth.py
1
from django.contrib.auth.models import User class ShibbolethBackend(object): "Authenticate against Tse/Utu Shibboleth." def authenticate(self, request): """Authenticate user against the data from Shibboleth. Tse provides HTTP_UID in the response, Utu provides HTTP_MAIL in form of user...
Limags/MissionPlanner
refs/heads/master
Lib/encodings/cp437.py
93
""" Python Character Mapping Codec cp437 generated from 'VENDORS/MICSFT/PC/CP437.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,e...
TurboTurtle/sos
refs/heads/master
sos/report/plugins/kernelrt.py
5
# Copyright 2012 Red Hat Inc. # Guy Streeter <streeter@redhat.com> # This file is part of the sos project: https://github.com/sosreport/sos # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # version 2 of the GNU General ...
BehavioralInsightsTeam/edx-platform
refs/heads/release-bit
openedx/core/djangoapps/verified_track_content/forms.py
20
""" Forms for configuring courses for verified track cohorting """ from django import forms from django.utils.translation import ugettext as _ from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from openedx.core.djangoapps.verified_track_content.models import VerifiedTrackCohortedCourse...
realsaiko/odoo
refs/heads/8.0
addons/product_email_template/models/product.py
379
# -*- coding: utf-8 -*- from openerp.osv import fields, osv class product_template(osv.Model): """ Product Template inheritance to add an optional email.template to a product.template. When validating an invoice, an email will be send to the customer based on this template. The customer will receive an e...
jeremiahyan/odoo
refs/heads/master
addons/mail/models/ir_model_fields.py
5
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class IrModelField(models.Model): _inherit = 'ir.model.fields' tracking = fields.Integer( string="Enable Ordered Tracking", help="If set every modification done ...
krishnazure/ansible
refs/heads/devel
v1/tests/TestModules.py
127
# -*- coding: utf-8 -*- import os import ast import unittest from ansible import utils class TestModules(unittest.TestCase): def list_all_modules(self): paths = utils.plugins.module_finder._get_paths() paths = [x for x in paths if os.path.isdir(x)] module_list = [] for path in pa...
LabPy/lantz_qt
refs/heads/master
lantz_qt/blocks/loop.py
4
# -*- coding: utf-8 -*- """ lantz.ui.loop ~~~~~~~~~~~~~ A Loop backend and frontend. :copyright: 2015 by Lantz Authors, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import time import math from enum import IntEnum from lantz.utils.qt import QtCore, QtGui from la...
yuealves/subset-visualization
refs/heads/master
code/s3.read_twenty_news.py
1
import os import random from os.path import dirname import pandas as pd dataset_dir = os.path.join(dirname(dirname(__file__)), "datasets") dataset_news_dir = os.path.join(dataset_dir, "twenty_newsgroups") code_dir = dirname(__file__) output_dir = os.path.join(code_dir, "lda_output") trainSetPath = os....
mathstuf/beets
refs/heads/master
test/test_replaygain.py
25
# This file is part of beets. # Copyright 2015, Thomas Scholtes # # 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, ...
kennedyshead/home-assistant
refs/heads/dev
homeassistant/components/envirophat/__init__.py
36
"""The envirophat component."""
thepaul/morbid-debian
refs/heads/master
setup.py
1
from setuptools import setup, find_packages setup( name='morbid', version='0.8.7.3', author='Michael Carter', author_email='CarterMichael@gmail.com', license='MIT License', install_requires = ['stomper'], description='A Twisted-based publish/subscribe messaging server that uses the STOMP pr...
piquadrat/django
refs/heads/master
tests/template_tests/utils.py
108
import functools import os from django.template.engine import Engine from django.test.utils import override_settings from django.utils.safestring import mark_safe ROOT = os.path.dirname(os.path.abspath(__file__)) TEMPLATE_DIR = os.path.join(ROOT, 'templates') def setup(templates, *args, **kwargs): """ Runs ...
taedla01/MissionPlanner
refs/heads/master
Lib/site-packages/numpy/core/fromnumeric.py
53
import sys # Module containing non-deprecated functions borrowed from Numeric. __docformat__ = "restructuredtext en" # functions that are now methods __all__ = ['take', 'reshape', 'choose', 'repeat', 'put', 'swapaxes', 'transpose', 'sort', 'argsort', 'argmax', 'argmin', 'searchsorted', 'alen', ...
markjin1990/solr
refs/heads/master
dev-tools/scripts/checkJavadocLinks.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 use ...
tsufiev/horizon
refs/heads/master
horizon/management/commands/startdash.py
79
# 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...
vybstat/scikit-learn
refs/heads/master
sklearn/decomposition/tests/test_truncated_svd.py
240
"""Test truncated SVD transformer.""" import numpy as np import scipy.sparse as sp from sklearn.decomposition import TruncatedSVD from sklearn.utils import check_random_state from sklearn.utils.testing import (assert_array_almost_equal, assert_equal, assert_raises, assert_greater, ...
40223247/2015test2-1
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/binascii.py
620
"""A pure Python implementation of binascii. Rather slow and buggy in corner cases. PyPy provides an RPython version too. """ # borrowed from https://bitbucket.org/pypy/pypy/src/f2bf94943a41/lib_pypy/binascii.py class Error(Exception): pass class Done(Exception): pass class Incomplete(Exception): pass ...
ahb0327/intellij-community
refs/heads/master
python/testData/intentions/afterConvertStaticMethodToFunction.py
83
class MyClass(object): """ My class to show intention. """ def __init__(self): self.a = 1 def my_static_method(): import code import time time.sleep(100) print code
joshpfosi/gbn
refs/heads/master
.waf-1.8.12-f00e5b53f6bbeab1384a38c9cc5d51f7/waflib/Task.py
11
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file import os,re,sys from waflib import Utils,Logs,Errors NOT_RUN=0 MISSING=1 CRASHED=2 EXCEPTION=3 SKIPPED=8 SUCCESS=9 ASK_LATER=-1 SKIP_ME=-2 RUN_ME=-3 COMPILE_TEMPLATE_SHELL=''' def f(tsk): env = tsk...
mpmendenhall/rotationshield
refs/heads/master
Scripts/QuadMin.py
1
#!/usr/bin/python from QFile import * from LinFitter import * from polynomial import * import os ########### # Sequence: # - initial guess center, primary axes (orthogonal matrix S), transformed diagonal coefficients lambda_i, and range parameter epsilon # - sample points and perform fit in transformed space #...
ksmit799/Toontown-Source
refs/heads/master
toontown/catalog/CatalogSurfaceColors.py
6
CT_WHITE = (1.0, 1.0, 1.0, 1.0) CT_RED = (1.0, 0.5, 0.5, 1.0) CT_BROWN = (0.641, 0.355, 0.27, 1.0) CT_CANTELOPE = (0.839, 0.651, 0.549, 1.0) CT_TAN = (0.996, 0.695, 0.512, 1.0) CT_ORANGE = (0.992, 0.48, 0.168, 1.0) CT_CORAL = (0.832, 0.5, 0.297, 1.0) CT_PEACH = (1.0, 0.82, 0.7, 1.0) CT_BEIGE = (1.0, 0.8, 0.6, 1.0) CT_T...
nathanielvarona/airflow
refs/heads/master
tests/dags_with_system_exit/c_system_exit.py
10
# # 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...
xInterlopeRx/android_kernel_samsung_msm8930-common
refs/heads/cm-11.0
tools/perf/python/twatch.py
7370
#! /usr/bin/python # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface # Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com> # # This application is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License...
credp/lisa
refs/heads/master
external/workload-automation/wa/framework/target/runtime_config.py
3
# Copyright 2018 ARM Limited # # 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 writin...
Aearsis/economy-game
refs/heads/master
data/old_generators.py
1
class BlackAuctionGenerator: '''This is an abstract class''' def __init__(self): self.game_len = Game.the_row().length self.buffer = [] def create_auction_object(self,entity="Kel"): a = BlackAuction( begin=datetime.timedelta(seconds=1), end=None, var_entity=get_or_create_ent(entity), var_min = ...
cnoviello/micropython
refs/heads/master
tests/bytecode/pylib-tests/aifc.py
22
"""Stuff to parse AIFF-C and AIFF files. Unless explicitly stated otherwise, the description below is true both for AIFF-C files and AIFF files. An AIFF-C file has the following structure. +-----------------+ | FORM | +-----------------+ | <size> | +----+------------+ | | AIFC ...
komsas/OpenUpgrade
refs/heads/master
addons/lunch/report/__init__.py
441
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
thedrow/omcache
refs/heads/master
omcache_pylibmc.py
3
# omcache_pylibmc.py - a kludgy pylbmc API compatibility layer # # Copyright (c) 2013-2014, Oskari Saarenmaa <os@ohmu.fi> # All rights reserved. # # This file is under the Apache License, Version 2.0. # See the file `LICENSE` for details. # # NOTE: The functionality provided by this wrapper is limited and it is not # s...
GladeRom/android_external_chromium_org
refs/heads/gr-3.1
tools/cr/cr/commands/select.py
65
# Copyright 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. """A module for the select command.""" import cr # The set of variables SELECT writes into the client plugin to control the # active output directory. SELE...
Rossonero/bmlswp
refs/heads/master
ch06/install.py
23
# This code is supporting material for the book # Building Machine Learning Systems with Python # by Willi Richert and Luis Pedro Coelho # published by PACKT Publishing # # It is made available under the MIT License # # Sanders-Twitter Sentiment Corpus Install Script # Version 0.1 # # Pulls tweet data from Twitter bec...
papouso/odoo
refs/heads/8.0
addons/sale_service/models/__init__.py
354
import sale_service
tashaband/RYU295
refs/heads/master
ryu/contrib/ovs/jsonrpc.py
48
# Copyright (c) 2010, 2011, 2012 Nicira, 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 agre...
CollabQ/CollabQ
refs/heads/master
vendor/atom/http.py
136
#!/usr/bin/python # # Copyright (C) 2008 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 ...
mrshelly/openerp71313
refs/heads/master
openerp/addons/base/module/wizard/base_module_update.py
109
# -*- 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...
nervenXC/topical_word_embeddings
refs/heads/master
TWE-3/gensim/models/rpmodel.py
70
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html import logging import itertools import numpy import scipy from gensim import interfaces, matutils, utils logger = logging.getLogger...
papedaniel/oioioi
refs/heads/master
oioioi/pa/forms.py
1
from django import forms from django.forms import ValidationError from django.utils.translation import ugettext_lazy as _ from oioioi.pa.models import PARegistration class PARegistrationForm(forms.ModelForm): class Meta(object): model = PARegistration exclude = ['participant'] def __init__(s...
KellyChan/Python
refs/heads/master
javascript/backbone/backbone-templates/backbone-fileupload/venvs/lib/python2.7/site-packages/django/template/loaders/filesystem.py
90
""" Wrapper for loading templates from the filesystem. """ from django.conf import settings from django.template.base import TemplateDoesNotExist from django.template.loader import BaseLoader from django.utils._os import safe_join class Loader(BaseLoader): is_usable = True def get_template_sources(self, temp...
ColmFitz369/DT211-3-Cloud
refs/heads/master
Euler/Soln1.py/lowestdiv.py
1
number = 1 div = 1 answer = 0 for i in range(1-10): while answer != 0: if number % i == 0: answer += 1 i += 1 else: answer = 0 i = 1 number += 1 print(number)
eXistenZNL/SickRage
refs/heads/master
lib/hachoir_metadata/setter.py
94
from datetime import date, datetime import re from hachoir_core.language import Language from locale import setlocale, LC_ALL from time import strptime from hachoir_metadata.timezone import createTimezone from hachoir_metadata import config NORMALIZE_REGEX = re.compile("[-/.: ]+") YEAR_REGEX1 = re.compile("^([0-9]{4})...
azumimuo/family-xbmc-addon
refs/heads/master
plugin.video.bubbles/resources/lib/sources/universal/torrent/open/kickasstorrents.py
1
# -*- coding: utf-8 -*- ''' Bubbles Add-on Copyright (C) 2016 Bubbles This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ...
DylanSecreast/uoregon-cis-portfolio
refs/heads/master
uoregon-cis-471/project-1b/searchAgents.py
1
# Dylan Secreast # CIS 471 - Prof. Lowd # Project 1B - 10/13/16 # @partner: Cathy Webster # searchAgents.py # --------------- # Licensing Information: Please do not distribute or publish solutions to this # project. You are free to use and extend these projects for educational # purposes. The Pacman AI projects were d...
duxinjie/pythontest
refs/heads/master
sudokuretry.py
1
#!/usr/bin/env python from copy import deepcopy import sys import logging sys.setrecursionlimit(1750000) # set the maximum depth as 1500 class Backcondition(Exception): pass class Forwardcondition(Exception): pass class sudoku: def __init__(self): self.value = [0] self.block = [] self.sudokudata = [] # ...
TeamExodus/external_chromium_org
refs/heads/EXODUS-5.1
tools/findit/run_all_tests.py
76
#!/usr/bin/env python # Copyright (c) 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import unittest from chromium_deps_unittest import ChromiumDEPSTest from common.http_client_local_unittest import HttpC...
agustin380/django-localflavor
refs/heads/master
tests/test_gb.py
14
from __future__ import unicode_literals from django.test import SimpleTestCase from localflavor.gb.forms import GBPostcodeField class GBLocalFlavorTests(SimpleTestCase): def test_GBPostcodeField(self): error_invalid = ['Enter a valid postcode.'] valid = { 'BT32 4PX': 'BT32 4PX', ...
MattsFleaMarket/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/lib2to3/fixes/fix_next.py
203
"""Fixer for it.next() -> next(it), per PEP 3114.""" # Author: Collin Winter # Things that currently aren't covered: # - listcomp "next" names aren't warned # - "with" statement targets aren't checked # Local imports from ..pgen2 import token from ..pygram import python_symbols as syms from .. import fixer_base f...
nzavagli/UnrealPy
refs/heads/master
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/boto-2.38.0/tests/integration/iam/test_cert_verification.py
126
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All rights reserved. # # 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 withou...
nvoron23/hue
refs/heads/master
desktop/core/src/desktop/management/commands/config_help.py
38
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
mhnatiuk/phd_sociology_of_religion
refs/heads/master
scrapper/lib/python2.7/site-packages/twisted/manhole/ui/gtk2manhole.py
33
# -*- test-case-name: twisted.manhole.ui.test.test_gtk2manhole -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Manhole client with a GTK v2.x front-end. """ __version__ = '$Revision: 1.9 $'[11:-2] from twisted import copyright from twisted.internet import reactor from twisted.python i...