repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
safwanrahman/mozillians
refs/heads/master
vendor-local/lib/python/unidecode/x0b1.py
253
data = ( 'nyaess', # 0x00 'nyaeng', # 0x01 'nyaej', # 0x02 'nyaec', # 0x03 'nyaek', # 0x04 'nyaet', # 0x05 'nyaep', # 0x06 'nyaeh', # 0x07 'neo', # 0x08 'neog', # 0x09 'neogg', # 0x0a 'neogs', # 0x0b 'neon', # 0x0c 'neonj', # 0x0d 'neonh', # 0x0e 'neod', # 0x0f 'neol', ...
jacroe/spynot
refs/heads/master
google/protobuf/internal/wire_format.py
561
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
joedursun/.emacs.d
refs/heads/master
elpa/elpy-20150226.1148/elpy/tests/compat.py
43
"""Python 2/3 compatibility definitions. These are used by the rest of Elpy to keep compatibility definitions in one place. """ import sys if sys.version_info >= (3, 0): PYTHON3 = True import builtins from io import StringIO else: PYTHON3 = False import __builtin__ as builtins # noqa from ...
iseppi/zookeepr
refs/heads/master
zk/model/voucher.py
5
"""The application's model objects""" import sqlalchemy as sa from meta import Base from pylons.controllers.util import abort from person import Person from product import Product from meta import Session class Voucher(Base): __tablename__ = 'voucher' id = sa.Column(sa.types.Integer, primary_key=True) ...
jspargo/AneMo
refs/heads/master
django/lib/python2.7/site-packages/django/db/backends/mysql/client.py
84
import os import sys from django.db.backends import BaseDatabaseClient class DatabaseClient(BaseDatabaseClient): executable_name = 'mysql' def runshell(self): settings_dict = self.connection.settings_dict args = [self.executable_name] db = settings_dict['OPTIONS'].get('db', settings_...
rodolfoams/tsp-solver
refs/heads/master
src/tspsolver/solver/geneticsearch.py
1
from random import shuffle, randint, random, choice from ..core import Edge from sys import maxint from math import sqrt, ceil mutationRate = 0.001 populationSize = 200 tournamentSize = 7 crossoverProbability = 0.85 eliteSize = 3 def totalCost(population): # return reduce(lambda x, y: x + y[1] if isinstance(x, int...
mlorbetske/PTVS
refs/heads/master
Python/Product/Django/Templates/Projects/DjangoWebRole/manage.py
57
#!/usr/bin/env python """ Command-line utility for administrative tasks. """ import os import sys if __name__ == "__main__": os.environ.setdefault( "DJANGO_SETTINGS_MODULE", "$safeprojectname$.settings" ) from django.core.management import execute_from_command_line ex...
linktlh/Toontown-journey
refs/heads/master
otp/distributed/AccountAI.py
5
from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI class AccountAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory("AccountAI")
thaim/ansible
refs/heads/fix-broken-link
test/units/modules/network/fortios/test_fortios_firewall_schedule_onetime.py
21
# Copyright 2019 Fortinet, Inc. # # 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. # # This program is distributed in the...
apprentice3d/Wox
refs/heads/master
PythonHome/Lib/site-packages/requests/packages/chardet/langgreekmodel.py
2762
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
nolanliou/tensorflow
refs/heads/master
tensorflow/examples/how_tos/reading_data/fully_connected_preloaded.py
130
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
named-data-ndnSIM/ns-3-dev
refs/heads/ndnSIM-ns-3.29
src/click/test/examples-to-run.py
62
#! /usr/bin/env python ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- # A list of C++ examples to run in order to ensure that they remain # buildable and runnable over time. Each tuple in the list contains # # (example_name, do_run, do_valgrind_run). # # See test.py for more i...
rcommande/decorrelate
refs/heads/master
decorrelate/tests/test_decorrelate.py
1
import pytest import sys @pytest.fixture def clean_registry(): import decorrelate registry = decorrelate.get_registry() registry._registered = {} ressources_module_name = 'decorrelate.tests.ressources' if ressources_module_name in sys.modules: del sys.modules[ressources_module_name] def ...
plotly/python-api
refs/heads/master
packages/python/plotly/plotly/validators/area/marker/__init__.py
1
import sys if sys.version_info < (3, 7): from ._symbolsrc import SymbolsrcValidator from ._symbol import SymbolValidator from ._sizesrc import SizesrcValidator from ._size import SizeValidator from ._opacitysrc import OpacitysrcValidator from ._opacity import OpacityValidator from ._colorsr...
felixbuenemann/sentry
refs/heads/master
tests/sentry/metrics/test_datadog.py
14
from __future__ import absolute_import from mock import patch from datadog.util.hostname import get_hostname from sentry.metrics.datadog import DatadogMetricsBackend from sentry.testutils import TestCase class DatadogMetricsBackendTest(TestCase): def setUp(self): self.backend = DatadogMetricsBackend(pr...
swiperthefox/python-source-browser
refs/heads/master
app/__main__.py
1
from __future__ import ( absolute_import, print_function, unicode_literals ) import os import errno import logging import argparse from flask import Flask, request, jsonify, g, current_app, send_from_directory # Workaround for the werkzeug reloader removing the current directory from the # path. It's nast...
Jonas-Drotleff/yo
refs/heads/master
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...
sorenk/ansible
refs/heads/devel
lib/ansible/modules/network/aci/aci_contract_subject_to_filter.py
12
#!/usr/bin/python # -*- coding: utf-8 -*- # 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'], ...
Meninblack007/android_kernel_yu_msm8916
refs/heads/almighty-v1.0
tools/perf/scripts/python/sctop.py
11180
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
jessstrap/servotk
refs/heads/master
tests/wpt/css-tests/css-text-decor-3_dev/xhtml1print/support/generate-text-emphasis-line-height-tests.py
829
#!/usr/bin/env python # - * - coding: UTF-8 - * - """ This script generates tests text-emphasis-line-height-001 ~ 004 except 001z. They test the line height expansion in different directions. This script outputs a list of all tests it generated in the format of Mozilla reftest.list to the stdout. """ from __future__ ...
adityamogadala/xLiMeSemanticIntegrator
refs/heads/master
xlimedataparser/DataCollector.py
1
# -*- coding: utf-8 -*- #============================================================================== #Description : Call all types of data collectors #Author : Aditya Mogadala #email : aditya.mogadala@kit.edu #Version : 1.0.1 #Copyright : Institute AIFB, Karlsruhe Institute of T...
kanagasabapathi/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/test/inspect_fodder2.py
179
# line 1 def wrap(foo=None): def wrapper(func): return func return wrapper # line 7 def replace(func): def insteadfunc(): print('hello') return insteadfunc # line 13 @wrap() @wrap(wrap) def wrapped(): pass # line 19 @replace def gone(): pass # line 24 oll = lambda m: m # lin...
nyu-devops-echo/shopcarts
refs/heads/master
db_create.py
1
#!usr//bin/python """ Database Creation Script This Python script will create the database base on the environment variables DATABASE_URI or SQLALCHEMY_DATABASE_URI in that order. (DATABASE_URI overrides SQLALCHEMY_DATABASE_URI) You can also override the database name in the URI by passing in a new name. Enviroment V...
montanapr/Plugin.Video.Mercy
refs/heads/master
servers/watchfreeinhd.py
44
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para watchfreeinhd # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core...
yzl0083/orange
refs/heads/master
Orange/OrangeCanvas/help/intersphinx.py
6
""" Parsers for intersphinx inventory files Taken from `sphinx.ext.intersphinx` """ import re import codecs import zlib b = str UTF8StreamReader = codecs.lookup('utf-8')[2] def read_inventory_v1(f, uri, join): f = UTF8StreamReader(f) invdata = {} line = f.next() projname = line.rstrip()[11:] l...
ArtsiomCh/tensorflow
refs/heads/master
tensorflow/contrib/distributions/python/__init__.py
959
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Juniper/python-neutronclient
refs/heads/master
neutronclient/tests/unit/test_cli20_securitygroup.py
1
#!/usr/bin/env python # Copyright 2012 Red Hat # 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 # # Un...
currychou/1
refs/heads/master
static/Brython3.1.3-20150514-095342/Lib/copy.py
628
"""Generic (shallow and deep) copying operations. Interface summary: import copy x = copy.copy(y) # make a shallow copy of y x = copy.deepcopy(y) # make a deep copy of y For module specific errors, copy.Error is raised. The difference between shallow and deep copying is only relev...
ufal/neuralmonkey
refs/heads/master
scripts/decompound_truecased.py
3
#!/usr/bin/env python3 import sys import codecs import javabridge from tokenize_data import get_decompounder def main(): sys.stdin = codecs.getreader('utf-8')(sys.stdin) sys.stdout = codecs.getwriter('utf-8')(sys.stdout) sys.stderr = codecs.getwriter('utf-8')(sys.stderr) try: decompounder = ...
HossainKhademian/XBMC
refs/heads/master
lib/gtest/test/gtest_xml_outfiles_test.py
2526
#!/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...
GeoNode/geonode
refs/heads/master
geonode/documents/migrations/0028_auto_20170801_1228_squashed_0035_auto_20190404_0820.py
6
# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-04-04 08:24 from django.db import migrations, models import django.db.models.manager class Migration(migrations.Migration): replaces = [('documents', '0028_auto_20170801_1228'), ('documents', '0029_auto_20180301_1947'), ('documents', '0030_auto_2018...
friendly-of-python/flask-online-store
refs/heads/master
flask_online_store/forms/admin/security.py
1
from flask_wtf import FlaskForm from wtforms import StringField, SubmitField, PasswordField from wtforms.validators import DataRequired, Email, EqualTo, Length class LoginForm(FlaskForm): username = StringField('username', validators=[ DataRequired() ...
devdelay/home-assistant
refs/heads/dev
homeassistant/components/light/demo.py
3
""" Demo light platform that implements lights. For more details about this platform, please refer to the documentation https://home-assistant.io/components/demo/ """ import random from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_RGB_COLOR, Light) LIGHT_COLORS = [ [237, 224...
trishnaguha/ansible
refs/heads/devel
test/integration/targets/script/files/no_shebang.py
97
import sys sys.stdout.write("Script with shebang omitted")
zzzeek/sqlalchemy
refs/heads/master
lib/sqlalchemy/sql/sqltypes.py
2
# sql/sqltypes.py # Copyright (C) 2005-2021 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 """SQL specific types. """ import codecs import datetime as dt import decimal impo...
ericem/sprintkit
refs/heads/master
setup.py
1
from os import path from setuptools import setup, find_packages here = path.abspath(path.dirname(__file__)) README = open(path.join(here, 'README.rst')).read() CHANGES = open(path.join(here, 'CHANGES')).read() version = '0.2.0' setup( name='sprintkit', version=version, description="Access Sprint's Networ...
proffalken/edison
refs/heads/master
piston/admin.py
1
# This file is part of the Edison Project. # Please refer to the LICENSE document that was supplied with this software for information on how it can be used. from django.contrib import admin from piston.models import Nonce, Consumer, Token admin.site.register(Nonce) admin.site.register(Consumer) admin.site.register(To...
nzavagli/UnrealPy
refs/heads/master
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Lib/tempfile.py
7
"""Temporary files. This module provides generic, low- and high-level interfaces for creating temporary files and directories. All of the interfaces provided by this module can be used without fear of race conditions except for 'mktemp'. 'mktemp' is subject to race conditions and should not be used; it is provided f...
eteq/ginga
refs/heads/staging
ginga/LayerImage.py
3
# # LayerImage.py -- Abstraction of an generic layered image. # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # import numpy import time from ginga import BaseImage from...
MattsFleaMarket/python-for-android
refs/heads/master
python-modules/twisted/twisted/trial/test/weird.py
82
from twisted.trial import unittest from twisted.internet import defer # Used in test_tests.TestUnhandledDeferred class TestBleeding(unittest.TestCase): """This test creates an unhandled Deferred and leaves it in a cycle. The Deferred is left in a cycle so that the garbage collector won't pick it up i...
MackZxh/OCA-Choice
refs/heads/8.0
hr/hr_worked_days_from_timesheet/__openerp__.py
19
# -*- coding:utf-8 -*- ############################################################################## # # Copyright (C) 2014 Odoo Canada. All Rights Reserved. # # 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 # ...
tux-00/ansible
refs/heads/devel
test/units/plugins/action/test_synchronize.py
8
''' (Epdb) pprint(DeepDiff(self.final_task_vars, out_task_vars), indent=2) { 'dic_item_added': set([u"root['ansible_python_interpreter']"]), 'dic_item_removed': set([ u"root['hostvars']['127.0.0.1']", u"root['hostvars']['::1']", u"root['hostvars']['localhost']"]...
2014c2g4/2015cda_g7
refs/heads/master
static/Brython3.1.0-20150301-090019/Lib/webbrowser.py
735
from browser import window __all__ = ["Error", "open", "open_new", "open_new_tab"] class Error(Exception): pass _target = { 0: '', 1: '_blank', 2: '_new' } # hack... def open(url, new=0, autoraise=True): """ new window or tab is not controllable on the client side. autoraise not available. ""...
hamishwillee/ardupilot
refs/heads/master
libraries/SITL/examples/Morse/rover_follow.py
35
''' This is an example builder script that sets up a a set of rovers to be driven by ArduPilot for demonstrating follow mode The rover has the basic set of sensors that ArduPilot needs To start the simulation use this: morse run rover_follow.py ''' from morse.builder import * num_vehicles = 3 for i in range(num_...
jdowner/qtile
refs/heads/develop
libqtile/widget/graph.py
6
# Copyright (c) 2010 Aldo Cortesi # Copyright (c) 2010-2011 Paul Colomiets # Copyright (c) 2010, 2014 roger # Copyright (c) 2011 Mounier Florian # Copyright (c) 2011 Kenji_Takahashi # Copyright (c) 2012 Mika Fischer # Copyright (c) 2012, 2014-2015 Tycho Andersen # Copyright (c) 2012-2013 Craig Barnes # Copyright (c) 20...
vmax-feihu/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/template_tests/templatetags/broken_tag.py
240
from django import Xtemplate
bbansalWolfPack/servo
refs/heads/master
tests/wpt/css-tests/tools/serve/__init__.py
458
import serve
tbombach/autorest
refs/heads/master
src/generator/AutoRest.Python.Tests/Expected/AcceptanceTests/Header/autorestswaggerbatheaderservice/exceptions.py
687
# 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 ...
Nowheresly/account-financial-tools
refs/heads/8.0
account_constraints/tests/test_account_constraints.py
24
# -*- coding: utf-8 -*- # # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # All Rights Reserved # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsibility of assessing all potential # consequences result...
GageGaskins/osf.io
refs/heads/develop
scripts/osfstorage/migrate_metadata.py
28
# -*- coding: utf-8 -*- """Script which ensures that every file version's content_type, size, and date_modified fields are consistent with the metadata from waterbutler. """ from modularodm import Q import logging import sys from website.addons.osfstorage.model import OsfStorageFileVersion from website.app import init...
iModels/mbuild
refs/heads/master
mbuild/formats/par_writer.py
2
"""CHARMM Par format.""" import warnings __all__ = ["write_par"] def write_par(structure, filename): """Write CHARMM Par file given a parametrized structure. Notes ----- Follows format according to https://www.ks.uiuc.edu/Training/Tutorials/namd/namd-tutorial-unix-html/ node25.html Furth...
qateam123/eq
refs/heads/master
tests/integration/questionnaire/test_questionnaire_save_sign_out.py
1
from tests.integration.create_token import create_token from tests.integration.integration_test_case import IntegrationTestCase class TestSaveSignOut(IntegrationTestCase): def test_save_sign_out_with_mandatory_question_not_answered(self): # We can save and go to the sign-out page without having to fill i...
nugget/home-assistant
refs/heads/dev
tests/components/media_player/test_blackbird.py
3
"""The tests for the Monoprice Blackbird media player platform.""" import unittest from unittest import mock import voluptuous as vol from collections import defaultdict from homeassistant.components.media_player.const import ( DOMAIN, SUPPORT_TURN_ON, SUPPORT_TURN_OFF, SUPPORT_SELECT_SOURCE) from homeassistant.co...
leekchan/django_test
refs/heads/master
django/contrib/gis/utils/layermapping.py
23
# LayerMapping -- A Django Model/OGR Layer Mapping Utility """ The LayerMapping class provides a way to map the contents of OGR vector files (e.g. SHP files) to Geographic-enabled Django models. For more information, please consult the GeoDjango documentation: http://geodjango.org/docs/layermapping.html """ impo...
csieg/ardupilot
refs/heads/master
Tools/mavproxy_modules/lib/geodesic_grid.py
108
# Copyright (C) 2016 Intel Corporation. All rights reserved. # # This file 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. # # This fi...
tixxdz/ahaggar
refs/heads/master
scripts/pahaggar/gcc.py
1
"""GCC Utils.""" # # Copyright (C) 2012-2013 Djalal Harouni <tixxdz@opendz.org> # Copyright (C) 2012-2013 LIRE Laboratory. # University Constantine 2, Algeria. # # 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 So...
bovesan/mistika-hyperspeed
refs/heads/master
Afterscripts/Rewrap-to-mov/rewrap-to-mov.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- import hyperspeed.afterscript title = 'Rewrap to mov' cmd = '-vcodec copy -acodec copy' # Path relative to primary output folder of render: # default_output = '[project]_[render_name].[codec].mov' # Absolute path: default_output = '/Volumes/SAN3/Master...
QuLogic/meson
refs/heads/master
mesonbuild/mesonlib/__init__.py
2
# SPDX-license-identifier: Apache-2.0 # Copyright 2012-2021 The Meson development team # Copyright © 2021 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.ap...
repotvsupertuga/tvsupertuga.repository
refs/heads/master
script.module.schism.common/lib/requests/packages/chardet/utf8prober.py
2918
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
mengxn/tensorflow
refs/heads/master
tensorflow/python/ops/check_ops.py
9
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
mblondel/scikit-learn
refs/heads/master
sklearn/svm/tests/test_bounds.py
280
import nose from nose.tools import assert_equal, assert_true from sklearn.utils.testing import clean_warning_registry import warnings import numpy as np from scipy import sparse as sp from sklearn.svm.bounds import l1_min_c from sklearn.svm import LinearSVC from sklearn.linear_model.logistic import LogisticRegression...
blablack/beatslash-lv2
refs/heads/master
waflib/Tools/compiler_fc.py
56
#!/usr/bin/env python # encoding: utf-8 import re from waflib import Utils, Logs from waflib.Tools import fc fc_compiler = { 'win32' : ['gfortran','ifort'], 'darwin' : ['gfortran', 'g95', 'ifort'], 'linux' : ['gfortran', 'g95', 'ifort'], 'java' : ['gfortran', 'g95', 'ifort'], 'default': ['gfortran'], 'aix' ...
ShassAro/ShassAro
refs/heads/master
DockerAdmin/dockerVirtualEnv/lib/python2.7/site-packages/django/core/mail/backends/dummy.py
835
""" Dummy email backend that does nothing. """ from django.core.mail.backends.base import BaseEmailBackend class EmailBackend(BaseEmailBackend): def send_messages(self, email_messages): return len(list(email_messages))
terbolous/SickRage
refs/heads/master
lib/pgi/cffilib/gir/giunioninfo.py
20
# Copyright 2013 Christoph Reiter # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. from .._compat import xran...
bgris/ODL_bgris
refs/heads/master
lib/python3.5/site-packages/skimage/transform/pyramids.py
20
import math import numpy as np from scipy import ndimage as ndi from ..transform import resize from ..util import img_as_float def _smooth(image, sigma, mode, cval): """Return image with each channel smoothed by the Gaussian filter.""" smoothed = np.empty(image.shape, dtype=np.double) # apply Gaussian f...
aloksinha2001/rk3066-kernel
refs/heads/master
mm/tools/perf/scripts/python/sctop.py
11180
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
molebot/vnpy
refs/heads/master
vn.demo/ctpdemo/mdtest.py
96
# encoding: UTF-8 import sys from time import sleep from PyQt4 import QtGui from vnctpmd import * #---------------------------------------------------------------------- def print_dict(d): """按照键值打印一个字典""" for key,value in d.items(): print key + ':' + str(value) #-----------------...
haomiao/monster
refs/heads/master
setup.py
1
''' monster ----- monster is a python general template framework for new project, you can fastly build yourself projects.and before you know: It's MIT licensed! some tips: 1. setup setuptools tool 2. run pip requirements.txt, setup the required modules 3. others ''' import codecs from setuptools import setup...
alexmorozov/django
refs/heads/master
tests/migrations/test_migrations_unmigdep/0001_initial.py
282
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("auth", "__first__"), ] operations = [ migrations.CreateModel( "Book", [ ("id", mode...
40223249-1/-w16b_test
refs/heads/master
static/Brython3.1.3-20150514-095342/Lib/site-packages/pygame/base.py
603
#!/usr/bin/env python ## https://bitbucket.org/pygame/pygame/raw/2383b8ab0e2273bc83c545ab9c18fee1f3459c64/pygame/base.py '''Pygame core routines Contains the core routines that are used by the rest of the pygame modules. Its routines are merged directly into the pygame namespace. This mainly includes the auto-initia...
vsajip/django
refs/heads/django3
tests/regressiontests/dates/models.py
93
from django.db import models class Article(models.Model): title = models.CharField(max_length=100) pub_date = models.DateField() categories = models.ManyToManyField("Category", related_name="articles") def __unicode__(self): return self.title class Comment(models.Model): article = model...
mnahm5/django-estore
refs/heads/master
Lib/site-packages/django/contrib/gis/geos/prepared.py
137
from .base import GEOSBase from .error import GEOSException from .geometry import GEOSGeometry from .libgeos import geos_version_info from .prototypes import prepared as capi class PreparedGeometry(GEOSBase): """ A geometry that is prepared for performing certain operations. At the moment this includes th...
anhstudios/swganh
refs/heads/develop
data/scripts/templates/object/tangible/ship/components/booster/shared_bst_mandal_jbj_mk2.py
2
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/ship/components/booster/shared_bst_mandal_jbj_mk2.iff" result.attri...
MalloyPower/parsing-python
refs/heads/master
front-end/testsuite-python-lib/Python-2.2/Lib/test/test_mimetypes.py
10
import mimetypes import StringIO import unittest import test_support # Tell it we don't know about external files: mimetypes.knownfiles = [] class MimeTypesTestCase(unittest.TestCase): def setUp(self): self.db = mimetypes.MimeTypes() def test_default_data(self): self.assertEqual(self.db.gue...
tliber/scrapy
refs/heads/master
scrapy/squeue.py
144
import warnings from scrapy.exceptions import ScrapyDeprecationWarning warnings.warn("Module `scrapy.squeue` is deprecated, " "use `scrapy.squeues` instead", ScrapyDeprecationWarning, stacklevel=2) from scrapy.squeues import *
valkjsaaa/sl4a
refs/heads/master
python-build/python-libs/gdata/src/atom/token_store.py
280
#!/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 ...
xingwu1/autorest
refs/heads/master
AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyDateTimeRfc1123/autorestrfc1123datetimetestservice/exceptions.py
687
# 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 ...
Samuc/Proyecto-IV
refs/heads/master
lib/python2.7/site-packages/setuptools/tests/test_sdist.py
332
# -*- coding: utf-8 -*- """sdist tests""" import locale import os import shutil import sys import tempfile import unittest import unicodedata import re from setuptools.tests import environment, test_svn from setuptools.tests.py26compat import skipIf from setuptools.compat import StringIO, unicode from setuptools.test...
tcwicklund/django
refs/heads/master
tests/template_tests/filter_tests/test_stringformat.py
345
from django.template.defaultfilters import stringformat from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class StringformatTests(SimpleTestCase): """ Notice that escaping is applied *after* any filters, so the string formatting here only needs...
lisa-lab/pylearn2
refs/heads/master
pylearn2/models/tests/test_maxout.py
44
""" Tests of the maxout functionality. So far these don't test correctness, just that you can run the objects. """ __authors__ = "Ian Goodfellow" __copyright__ = "Copyright 2013, Universite de Montreal" __credits__ = ["Ian Goodfellow"] __license__ = "3-clause BSD" __maintainer__ = "LISA Lab" import numpy as np import ...
google-research/valan
refs/heads/master
r2r/house_parser.py
1
# coding=utf-8 # Copyright 2019 Google LLC # 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 ...
antoviaque/edx-platform
refs/heads/master
common/test/acceptance/pages/studio/asset_index.py
53
""" The Files and Uploads page for a course in Studio """ import urllib import os from opaque_keys.edx.locator import CourseLocator from . import BASE_URL from .course_page import CoursePage from bok_choy.javascript import wait_for_js, requirejs @requirejs('js/views/assets') class AssetIndexPage(CoursePage): ""...
meego-tablet-ux/meego-app-browser
refs/heads/master
third_party/mesa/MesaLib/src/mapi/glapi/gen/gl_procs.py
33
#!/usr/bin/env python # (C) Copyright IBM Corporation 2004, 2005 # 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 restriction, including without limitation # ...
edulramirez/nova
refs/heads/master
nova/db/sqlalchemy/migrate_repo/versions/219_placeholder.py
810
# 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 # d...
MrKiven/gunicorn
refs/heads/master
scripts/update_thanks.py
22
#!/usr/bin/env python # Usage: git log --format="%an <%ae>" | python update_thanks.py # You will get a result.txt file, you can work with the file (update, remove, ...) # # Install # ======= # pip install validate_email pyDNS # from __future__ import print_function import os import sys from validate_email import valid...
Zhongqilong/mykbengineer
refs/heads/master
kbe/src/lib/python/Lib/test/final_b.py
103
""" Fodder for module finalization tests in test_module. """ import shutil import test.final_a x = 'b' class C: def __del__(self): # Inspect module globals and builtins print("x =", x) print("final_a.x =", test.final_a.x) print("shutil.rmtree =", getattr(shutil.rmtree, '__name__',...
theflofly/tensorflow
refs/heads/master
tensorflow/compiler/tests/self_adjoint_eig_op_test.py
5
# Copyright 2019 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...
kenshay/ImageScripter
refs/heads/master
ProgramData/SystemFiles/Python/Lib/ensurepip/__main__.py
171
import ensurepip if __name__ == "__main__": ensurepip._main()
ibis-project/ibis
refs/heads/master
ibis/backends/dask/execution/strings.py
1
import itertools import dask.dataframe as dd import dask.dataframe.groupby as ddgb import numpy as np import pandas import toolz from pandas import isnull import ibis import ibis.expr.operations as ops from ibis.backends.pandas.core import integer_types, scalar_types from ibis.backends.pandas.execution.strings import...
wronk/mne-python
refs/heads/master
mne/time_frequency/tfr.py
1
"""A module which implements the time frequency estimation. Morlet code inspired by Matlab code from Sheraz Khan & Brainstorm & SPM """ # Authors : Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Hari Bharadwaj <hari@nmr.mgh.harvard.edu> # Clement Moutard <clement.moutard@polytechniq...
phupn1510/ELK
refs/heads/master
kibana/kibana/node/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py
1452
#!/usr/bin/env python # Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys # Make sure we're using the version of pylib in this repo, not one installed # elsewhere on the system. sys.path.inser...
raymondxyang/tensorflow
refs/heads/master
tensorflow/contrib/learn/python/learn/ops/ops_test.py
94
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
beernarrd/gramps
refs/heads/sl-master
gramps/gen/datehandler/_date_el.py
2
# -*- coding: utf-8 -*- # # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2004-2006 Donald N. Allingham # Copyright (C) 2013 Zissis Papadopoulos <zissis@mail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as p...
wangmiao1981/spark
refs/heads/master
python/pyspark/sql/group.py
23
# # 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...
tovrstra/horton
refs/heads/master
horton/scripts/test/test_espfit.py
4
# -*- coding: utf-8 -*- # HORTON: Helpful Open-source Research TOol for N-fermion systems. # Copyright (C) 2011-2017 The HORTON Development Team # # This file is part of HORTON. # # HORTON is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by th...
davisein/jitsudone
refs/heads/master
django/templatetags/tz.py
80
from __future__ import with_statement from datetime import datetime, tzinfo try: import pytz except ImportError: pytz = None from django.template import Node from django.template import TemplateSyntaxError, Library from django.utils import timezone register = Library() # HACK: datetime is an old-style cla...
Endika/c2c-rd-addons
refs/heads/8.0
chricar_stock_dispo_production_V1/__openerp__.py
4
{ 'sequence': 500, "name" : "Dispo Production" , "version" : "1.0" , "author" : "ChriCar Beteiligungs- und Beratungs- GmbH" , "website" : "http://www.chricar.at" , "description" : """Dispo Production generated 2010-04-02 15:01:02+02""" , "category" : "Client Modules/Farm" , "depends" :...
antoinecarme/pyaf
refs/heads/master
tests/model_control/detailed/transf_Logit/model_control_one_enabled_Logit_ConstantTrend_NoCycle_LSTM.py
1
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Logit'] , ['ConstantTrend'] , ['NoCycle'] , ['LSTM'] );
vdloo/raptiformica
refs/heads/master
raptiformica/actions/update.py
1
from logging import getLogger from raptiformica.actions.slave import provision_machine from raptiformica.settings.types import get_first_server_type log = getLogger(__name__) def update_machine(server_type=None): """ Update the local machine by running the configured commands from the installed provisio...
alxgu/ansible
refs/heads/devel
lib/ansible/modules/messaging/rabbitmq/rabbitmq_queue.py
10
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Manuel Sousa <manuel.sousa@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_vers...