repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
dushu1203/chromium.src
refs/heads/nw12
native_client_sdk/src/doc/_sphinxext/chromesite_builder.py
93
# 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. # # This is a Sphinx extension. # from __future__ import print_function import codecs from collections import namedtuple, OrderedDict import os import strin...
Passtechsoft/TPEAlpGen
refs/heads/master
blender/release/scripts/addons/presets/operator/mesh.primitive_xyz_function_surface/moebius.py
3
import bpy op = bpy.context.active_operator op.x_eq = 'cos(v)+u*cos(v/2)*cos(v)' op.y_eq = 'u*sin(v/2)' op.z_eq = 'sin(v)+u*cos(v/2)*sin(v)' op.range_u_min = -0.4000000059604645 op.range_u_max = 0.4000000059604645 op.range_u_step = 32 op.wrap_u = False op.range_v_min = 0.0 op.range_v_max = 6.2831854820251465 op.range_...
dhhjx880713/GPy
refs/heads/devel
GPy/old_tests/psi_stat_gradient_tests.py
19
''' Created on 22 Apr 2013 @author: maxz ''' import unittest import numpy import GPy import itertools from GPy.core import Model from GPy.core.parameterization.param import Param from GPy.core.parameterization.transformations import Logexp from GPy.core.parameterization.variational import NormalPosterior class PsiSt...
timvandermeij/servo
refs/heads/master
tests/wpt/web-platform-tests/XMLHttpRequest/resources/conditional.py
205
def main(request, response): tag = request.GET.first("tag", None) match = request.headers.get("If-None-Match", None) date = request.GET.first("date", "") modified = request.headers.get("If-Modified-Since", None) if tag: response.headers.set("ETag", '"%s"' % tag) elif date: respon...
AleksNeStu/ggrc-core
refs/heads/release/0.10-Raspberry
src/ggrc_workflows/models/mixins.py
7
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> from ggrc.models.mixins import Timeboxed from ggrc import db class RelativeTimeboxed(Timeboxed): # Frequencies and offset: # annual: # month is the 0-indexed month (0 is January) # day is ...
chispita/epiwork
refs/heads/master
apps/partnersites/migrations/0003_auto__add_field_sitesettings_footer.py
4
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'SiteSettings.footer' db.add_column('partnersites_sitesettings', 'footer', self.gf('django....
siosio/intellij-community
refs/heads/master
python/testData/refactoring/pullup/abstractMethodHasMeta/SuperClass.after.py
80
from abc import ABCMeta, abstractmethod class Parent(object): __metaclass__ = ABCMeta @abstractmethod def my_method2(self): pass @abstractmethod def my_method(self, foo): pass
jmesteve/medical
refs/heads/master
openerp/modules/migration.py
76
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2011 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
marcoserafini/h-store
refs/heads/master
third_party/python/boto/mashups/iobject.py
21
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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, modi...
Lemma1/MAC-POSTS
refs/heads/master
doc_builder/sphinx-contrib/examplecode/sphinxcontrib/__init__.py
308
# -*- coding: utf-8 -*- """ sphinxcontrib ~~~~~~~~~~~~~ This package is a namespace package that contains all extensions distributed in the ``sphinx-contrib`` distribution. :copyright: Copyright 2007-2009 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ __import__(...
DynoGraph/stinger-dynograph
refs/heads/master
lib/dynograph_util/googletest/test/gtest_catch_exceptions_test.py
2139
#!/usr/bin/env python # # Copyright 2010 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 o...
EricMountain-1A/openshift-ansible
refs/heads/master
roles/lib_openshift/src/class/oc_user.py
46
# pylint: skip-file # flake8: noqa # pylint: disable=too-many-instance-attributes class OCUser(OpenShiftCLI): ''' Class to wrap the oc command line tools ''' kind = 'users' def __init__(self, config, groups=None, verbose=False): ''' Constructor fo...
gaddman/ansible
refs/heads/devel
lib/ansible/plugins/terminal/nxos.py
21
# # (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
tripleoxygen/kernel_zeebo
refs/heads/master
tools/perf/scripts/python/failed-syscalls-by-pid.py
944
# failed system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
sxjscience/tvm
refs/heads/master
tests/python/unittest/test_runtime_packed_func.py
2
# 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 u...
fabiocorneti/django-multilingual
refs/heads/master
multilingual/models.py
5
""" Multilingual model support. This code is put in multilingual.models to make Django execute it during application initialization. TO DO: remove it. Right now multilingual must be imported directly into any file that defines translatable models, so it will be installed anyway. This module is here only to make it ...
carlos-lopez-garces/mapnik-trunk
refs/heads/master
scons/scons-local-1.2.0/SCons/Tool/sgicc.py
12
"""SCons.Tool.sgicc Tool-specific initialization for MIPSPro cc on SGI. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation #...
GhostThrone/django
refs/heads/master
django/utils/archive.py
562
""" Based on "python-archive" -- http://pypi.python.org/pypi/python-archive/ Copyright (c) 2010 Gary Wilson Jr. <gary.wilson@gmail.com> and contributors. 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 So...
q1ang/scikit-learn
refs/heads/master
benchmarks/bench_20newsgroups.py
377
from __future__ import print_function, division from time import time import argparse import numpy as np from sklearn.dummy import DummyClassifier from sklearn.datasets import fetch_20newsgroups_vectorized from sklearn.metrics import accuracy_score from sklearn.utils.validation import check_array from sklearn.ensemb...
tumf/xen-3.3.1
refs/heads/master
tools/python/xen/xend/XendNode.py
4
#============================================================================ # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope th...
duqiao/django
refs/heads/master
django/contrib/flatpages/__init__.py
808
default_app_config = 'django.contrib.flatpages.apps.FlatPagesConfig'
gyh1621/GetSubtitles
refs/heads/master
tests/unit/getsubtitles/test_process_archive.py
1
# coding: utf-8 import os from os import path import copy import shutil import unittest from unittest import mock import rarfile from tests import create_test_directory from tests.unit import assets_path from tests.unit.getsubtitles import get_function as get_f from getsub.models import Video def get_function(**kw...
mohamed--abdel-maksoud/chromium.src
refs/heads/nw12
tools/git/mffr.py
167
#!/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. """Usage: mffr.py [-d] [-g *.h] [-g *.cc] REGEXP REPLACEMENT This tool performs a fast find-and-replace operation on files in the ...
vongochung/buiquocviet
refs/heads/master
django/views/i18n.py
57
import os import gettext as gettext_module from django import http from django.conf import settings from django.utils import importlib from django.utils.translation import check_for_language, activate, to_locale, get_language from django.utils.text import javascript_quote from django.utils.encoding import smart_unicod...
indashnet/InDashNet.Open.UN2000
refs/heads/master
android/external/v8/test/sputnik/testcfg.py
8
# Copyright 2009 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditi...
Itxaka/libcloud
refs/heads/trunk
docs/examples/http_proxy/set_http_proxy_method.py
54
from pprint import pprint from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver PROXY_URL_NO_AUTH_1 = 'http://<proxy hostname 1>:<proxy port 2>' PROXY_URL_NO_AUTH_2 = 'http://<proxy hostname 1>:<proxy port 2>' PROXY_URL_BASIC_AUTH = 'http://<user>:<pass>@<proxy hostname>:<proxy...
ebukoz/thrive
refs/heads/develop
erpnext/patches/v12_0/remove_patient_medical_record_page.py
8
# Copyright (c) 2019 from __future__ import unicode_literals import frappe def execute(): frappe.delete_doc("Page", "medical_record")
dsquareindia/scikit-learn
refs/heads/master
sklearn/gaussian_process/kernels.py
31
"""Kernels for Gaussian process regression and classification. The kernels in this module allow kernel-engineering, i.e., they can be combined via the "+" and "*" operators or be exponentiated with a scalar via "**". These sum and product expressions can also contain scalar values, which are automatically converted to...
architecture-building-systems/CityEnergyAnalyst
refs/heads/master
cea/interfaces/dashboard/api/utils.py
2
from flask import current_app import cea.config import cea.inputlocator def deconstruct_parameters(p): params = {'name': p.name, 'type': p.typename, 'value': p.get(), 'help': p.help} if isinstance(p, cea.config.ChoiceParameter): params['choices'] = p._choices if p.typename == 'We...
maurossi/deqp
refs/heads/ndk_r10d_compatible
scripts/launchcontrol_build.py
2
# -*- coding: utf-8 -*- #------------------------------------------------------------------------- # drawElements Quality Program utilities # -------------------------------------- # # Copyright 2015 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use t...
mvaled/OpenUpgrade
refs/heads/8.0
addons/base_import_module/controllers/main.py
354
# -*- coding: utf-8 -*- import functools import openerp from openerp.http import Controller, route, request, Response def webservice(f): @functools.wraps(f) def wrap(*args, **kw): try: return f(*args, **kw) except Exception, e: return Response(response=str(e), status=500...
etherkit/OpenBeacon2
refs/heads/master
client/win/venv/Lib/site-packages/PyInstaller/configure.py
2
#----------------------------------------------------------------------------- # Copyright (c) 2005-2019, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this s...
gangadharkadam/smrtfrappe
refs/heads/develop
frappe/templates/website_group/settings.py
4
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.website.permissions import get_access, clear_permissions from frappe.website.doctype.website_group.website_group import get_pathname from frappe.utils...
djangorussia/django-1.3-branch
refs/heads/master
django/contrib/gis/forms/__init__.py
518
from django.forms import * from django.contrib.gis.forms.fields import GeometryField
Destaneon/python-fundamentals
refs/heads/master
challenges/01-Intro/B_data_and_variables.py
3
# your code here is evaluated by py.test test_B_data_and_variables # instructors ## what are our names? instructors = '' # types ## Now define some other types of variables ## some_int should be an integer ## some_float should be a float ## some_bool should be... what do you think? # redefining ## Here, I define...
NullScope/BorderlessStone
refs/heads/master
tests/multipackage/test_multipackage3.py
77
#----------------------------------------------------------------------------- # Copyright (c) 2013, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this softwa...
mishudark/openhealt
refs/heads/master
mongoengine/base/common.py
43
from mongoengine.errors import NotRegistered __all__ = ('ALLOW_INHERITANCE', 'get_document', '_document_registry') ALLOW_INHERITANCE = False _document_registry = {} def get_document(name): doc = _document_registry.get(name, None) if not doc: # Possible old style name single_end = name.split...
deltreey/ansible
refs/heads/devel
v1/ansible/errors.py
111
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # 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) an...
IBCCW/plen2__ble_motion_installer_python
refs/heads/master
make.py
1
# -*- coding: utf-8 -*- from distutils.core import setup import py2exe option = { "compressed" : 1, "optimize" : 2, "bundle_files" : 1 } setup( options = { "py2exe" : option }, console = [ { "script" : "main.py" } ], zipfile = None )
Seeker1911/talent
refs/heads/master
server/talent/migrations/0001_initial.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-09-17 23:45 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import phonenumber_field.modelfields class Migration(migrations.Migration): initial = True ...
thisissoon/Flask-HAL
refs/heads/master
tests/test_init.py
1
#!/usr/bin/env python # encoding: utf-8 """ tests.test_init =============== Tests for the init module. """ # Standard Libs import json # Third Party Libs from flask import Flask, Response # First Party Libs from flask_hal import HAL, HALResponse, document class TestHAL(object): def test_init(self): ...
blacklin/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/site-packages/setuptools/command/install.py
206
import setuptools import sys import glob from distutils.command.install import install as _install from distutils.errors import DistutilsArgError class install(_install): """Use easy_install to install the package, w/dependencies""" user_options = _install.user_options + [ ('old-and-unmanageable', Non...
paxet/pyglins
refs/heads/master
test/__init__.py
1
# -*- coding: utf-8 -*- import pyglins pyglins.scan_for_plugins('test/plugins') for plugin in pyglins.BasePlugin.plugins: loaded_plugin = plugin() print('Starting {}'.format(loaded_plugin.name)) loaded_plugin.run()
Zhongqilong/kbengine
refs/heads/master
kbe/src/lib/python/Tools/pybench/Lookups.py
92
from pybench import Test class SpecialClassAttribute(Test): version = 2.0 operations = 5*(12 + 12) rounds = 100000 def test(self): class c: pass for i in range(self.rounds): c.__a = 2 c.__b = 3 c.__c = 4 c.__a = 2 ...
fajran/irclogview
refs/heads/master
irclogview/templatetags/irclogview_tags.py
1
import datetime from collections import defaultdict from datetime import timedelta from django import template from django.core.urlresolvers import reverse from django.conf import settings register = template.Library() def build_calendar_table(year, month): # Determine last day of the month one_day = timedel...
lowks/simoorg
refs/heads/master
build/lib/simoorg/plugins/topology/KafkaTopology/MetaData.py
8
# # Copyright 2015 LinkedIn Corp. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
av8ramit/tensorflow
refs/heads/master
tensorflow/contrib/estimator/python/estimator/dnn.py
35
# 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...
polimediaupv/edx-platform
refs/heads/master
lms/djangoapps/mobile_api/social_facebook/preferences/urls.py
128
""" URLs for users sharing preferences """ from django.conf.urls import patterns, url from .views import UserSharing urlpatterns = patterns( 'mobile_api.social_facebook.preferences.views', url( r'^preferences/$', UserSharing.as_view(), name='preferences' ), )
davy39/eric
refs/heads/master
Helpviewer/Bookmarks/XbelWriter.py
1
# -*- coding: utf-8 -*- # Copyright (c) 2009 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing a class to write XBEL bookmark files. """ from __future__ import unicode_literals from PyQt5.QtCore import QXmlStreamWriter, QIODevice, QFile, Qt from .BookmarkNode import BookmarkNode class ...
an0ninja/xbmc
refs/heads/master
lib/libUPnP/Neptune/Extras/Tools/Logging/NeptuneLogConsoleMulticast.py
202
#!/usr/bin/env python from struct import * from socket import * from optparse import OptionParser UDP_ADDR = "0.0.0.0" UDP_MULTICAST_ADDR = "239.255.255.100" UDP_PORT = 7724 BUFFER_SIZE = 65536 #HEADER_KEYS = ['Logger', 'Level', 'Source-File', 'Source-Function', 'Source-Line', 'TimeStamp'] HEADER_KEYS = { 'mini': ...
JCROM-Android/jcrom_external_chromium_org
refs/heads/kitkat
native_client_sdk/src/tools/tests/fix_deps_test.py
104
#!/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. import os import sys import tempfile import unittest SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PARENT_DIR = os.path.d...
stanta/darfchain
refs/heads/master
darfchain_docker_vagrant/tests/integration/test_integration.py
3
import time import pytest pytestmark = [pytest.mark.bdb, pytest.mark.usefixtures('processes')] def test_double_create(b, user_pk): from bigchaindb.models import Transaction from bigchaindb.backend.query import count_blocks tx = Transaction.create([b.me], [([user_pk], 1)], met...
rosenvladimirov/addons
refs/heads/8.0
point_of_sale_bg/res_partner.py
320
import math from openerp.osv import osv, fields import openerp.addons.product.product class res_users(osv.osv): _inherit = 'res.partner' _columns = { 'ean13' : fields.char('EAN13', size=13, help="BarCode"), } def _check_ean(self, cr, uid, ids, context=None): return all( ...
Montana-Studio/PI_Landing
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/input.py
578
# 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. from compiler.ast import Const from compiler.ast import Dict from compiler.ast import Discard from compiler.ast import List from compiler.ast import Module from co...
jackm/Kijiji-Repost-Headless
refs/heads/master
kijiji_repost_headless/kijiji_api.py
1
import json import re import sys from time import strftime from random import choice import bs4 import requests import yaml user_agents = [ # Random list of top UAs for mac and windows/ chrome & FF "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537...
Lekanich/intellij-community
refs/heads/master
python/testData/surround/CustomFoldingRegionSingleStatementInFile.py
79
<selection>print('foo') </selection>
brockwhittaker/zulip
refs/heads/master
zerver/signals.py
3
from django.dispatch import receiver from django.contrib.auth.signals import user_logged_in from django.conf import settings from django.template import loader from django.utils.timezone import get_current_timezone_name as timezone_get_current_timezone_name from django.utils.timezone import now as timezone_now from ty...
hryamzik/ansible
refs/heads/devel
lib/ansible/modules/remote_management/ucs/ucs_vlans.py
33
#!/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'], ...
ContextLogic/luigi
refs/heads/master
luigi/contrib/sparkey.py
92
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
chirilo/kitsune
refs/heads/master
kitsune/tags/tests/test_helpers.py
17
from mock import Mock from nose.tools import eq_ from taggit.models import Tag from kitsune.sumo.tests import TestCase from kitsune.tags.helpers import tags_to_text class TestTagsToText(TestCase): def test_no_tags(self): eq_('', tags_to_text([])) def test_one_tag(self): eq_('tag1', tags_to_t...
mims2707/bite-project
refs/heads/master
deps/gdata-python-client/samples/contentforshopping/add_batch_products.py
39
#!/usr/bin/python # # Copyright 2009 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
geniusgogo/rt-thread
refs/heads/master
tools/codelite.py
6
# # File : codelite.py # This file is part of RT-Thread RTOS # COPYRIGHT (C) 2006 - 2020, RT-Thread Development Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of...
jreigel/saleor
refs/heads/master
saleor/core/management/commands/populatedb.py
6
from __future__ import unicode_literals from django.core.management import call_command from django.core.management.base import BaseCommand from django.db import connection from ...utils.random_data import ( create_orders, create_users, create_shipping_methods, create_products_by_schema, create_product_sales,...
caotianwei/django
refs/heads/master
tests/gis_tests/geoapp/test_functions.py
262
from __future__ import unicode_literals import re from decimal import Decimal from django.contrib.gis.db.models import functions from django.contrib.gis.geos import ( LineString, Point, Polygon, fromstr, geos_version_info, ) from django.db import connection from django.test import TestCase, skipUnlessDBFeature fr...
kelle/astropy
refs/heads/master
astropy/units/astrophys.py
1
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ This package defines the astrophysics-specific units. They are also available in the `astropy.units` namespace. """ from __future__ import (absolute_import, division, print_function, unicode_literals) ...
DANCEcollaborative/forum-xblock
refs/heads/master
XBlock Integration Files/xdjangobb/xblock/lib/python2.7/site-packages/mock/__init__.py
53
from __future__ import absolute_import import mock.mock as _mock from mock.mock import * __all__ = _mock.__all__ #import mock.mock as _mock #for name in dir(_mock): # globals()[name] = getattr(_mock, name)
nealtodd/django
refs/heads/master
django/conf/locale/zh_Hant/formats.py
1008
# -*- 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 = 'Y年n月j日' # 2016年9月5...
MartinDelzant/scikit-learn
refs/heads/master
sklearn/utils/arpack.py
265
""" This contains a copy of the future version of scipy.sparse.linalg.eigen.arpack.eigsh It's an upgraded wrapper of the ARPACK library which allows the use of shift-invert mode for symmetric matrices. Find a few eigenvectors and eigenvalues of a matrix. Uses ARPACK: http://www.caam.rice.edu/software/ARPACK/ """ #...
neraliu/tainted-phantomjs
refs/heads/master
src/breakpad/src/tools/gyp/pylib/gyp/MSVSProject.py
137
#!/usr/bin/python2.4 # 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. """Visual Studio project reader/writer.""" import common import xml.dom import xml.dom.minidom import MSVSNew #----------------------------...
ging/horizon
refs/heads/master
horizon/contrib/bootstrap_datepicker.py
87
# Copyright 2014 IBM Corp. # # 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, s...
kingvuplus/enigma2
refs/heads/master
lib/python/Components/Element.py
47
from Tools.CList import CList # down up # Render Converter Converter Source # a bidirectional connection def cached(f): name = f.__name__ def wrapper(self): cache = self.cache if cache is None: return f(self) if name not in cache: cache[name] = (True, f(self)) return cache[name]...
ilc/imgserv
refs/heads/master
bottle.py
71
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Bottle is a fast and simple micro-framework for small web applications. It offers request dispatching (Routes) with url parameter support, templates, a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and template engines - all in a single file an...
jimcunderwood/MissionPlanner
refs/heads/master
Lib/site-packages/scipy/ndimage/tests/test_io.py
61
from numpy.testing import assert_array_equal, dec, run_module_suite import scipy.ndimage as ndi import os try: from PIL import Image pil_missing = False except ImportError: pil_missing = True @dec.skipif(pil_missing, msg="The Python Image Library could not be found.") def test_imread(): lp = os.path....
open-aerospace/openrocketdoc
refs/heads/master
tests/test_document.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_document ---------------------------------- Tests for `document` module. """ import unittest from openrocketdoc import document class TestOpenrocketdoc(unittest.TestCase): def setUp(self): pass def test_spec_a_rocket(self): rocket = d...
open-synergy/opnsynid-l10n-indonesia
refs/heads/8.0
l10n_id_djbc_kb_lap_pemasukan/reports/__init__.py
1
# -*- coding: utf-8 -*- # Copyright 2018 OpenSynergy Indonesia # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import lap_kb_lap_pemasukan
vivekanand1101/pontoon
refs/heads/master
pontoon/base/migrations/0007_auto_20150710_0944.py
8
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import pontoon.base.models class Migration(migrations.Migration): dependencies = [ ('base', '0006_auto_20150602_0616'), ] operations = [ migrations.AddField( model_name='...
onitake/Uranium
refs/heads/debian
UM/InputDevice.py
1
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from UM.Signal import Signal, signalemitter from UM.PluginObject import PluginObject ## Abstract base class for all input devices (Human Input Devices) # Examples of this are mouse & keyboard @signalemitter class In...
throwable-one/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/django/contrib/gis/db/models/sql/where.py
309
from django.db.models.fields import Field, FieldDoesNotExist from django.db.models.sql.constants import LOOKUP_SEP from django.db.models.sql.expressions import SQLEvaluator from django.db.models.sql.where import Constraint, WhereNode from django.contrib.gis.db.models.fields import GeometryField class GeoConstraint(Con...
ahmedetefy/AccountTracker
refs/heads/master
projects/AccountTracker/main/models.py
1
from django.db import models from django.core.urlresolvers import reverse from django.utils.encoding import python_2_unicode_compatible from django.conf import settings from localflavor.generic.models import IBANField @python_2_unicode_compatible class Account(models.Model): first_name = models.CharField(max_len...
encukou/cython
refs/heads/master
tests/run/purecdef.py
28
import cython from cython import cfunc, cclass, ccall @cython.test_assert_path_exists('//CFuncDefNode') @cython.cfunc def ftang(): x = 0 @cython.test_assert_path_exists('//CFuncDefNode') @cfunc def fpure(a): return a*2 def test(): """ >>> test() 4 """ ftang() return fpure(2) with cfu...
ChodeGames/bitfl
refs/heads/master
menu.py
1
"""Billy in the Fat Lane - A Lame Life Simulation Game Copyright (C) 2013 Chris Parlette, Matt Parlette This file is part of Billy in the Fat Lane. Billy in the Fat Lane 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 Found...
carljm/django
refs/heads/master
tests/forms_tests/field_tests/test_typedchoicefield.py
42
from __future__ import unicode_literals import decimal from django.forms import TypedChoiceField, ValidationError from django.test import SimpleTestCase from django.utils import six class TypedChoiceFieldTest(SimpleTestCase): def test_typedchoicefield_1(self): f = TypedChoiceField(choices=[(1, "+1"), (...
axltxl/kaoru
refs/heads/develop
kaoru/commands/screenlock.py
1
# -*- coding: utf-8 -*- """ kaoru.commands.screenlock ~~~~~~~~ /screenlock implementation :copyright: (c) 2015 by Alejandro Ricoveri :license: MIT, see LICENSE for more details. """ from telegram import Update from .. import utils from .. import config from .. import log from . import bot_command from ..procutils ...
nodakai/watchman
refs/heads/master
python/setup.py
1
#!/usr/bin/env python # vim:ts=4:sw=4:et: from __future__ import absolute_import, division, print_function, unicode_literals import os from distutils.core import Extension, setup watchman_src_dir = os.environ.get("CMAKE_CURRENT_SOURCE_DIR") if watchman_src_dir is None: watchman_src_dir = os.path.join(os.path.di...
xin3liang/platform_external_chromium-trace
refs/heads/master
trace-viewer/third_party/closure_linter/closure_linter/requireprovidesorter_test.py
135
#!/usr/bin/env python # # Copyright 2012 The Closure Linter 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 #...
Basler/linux-usb-zerocopy
refs/heads/linux-4.2.y-usb-zerocopy
Documentation/target/tcm_mod_builder.py
337
#!/usr/bin/python # The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD # # Copyright (c) 2010 Rising Tide Systems # Copyright (c) 2010 Linux-iSCSI.org # # Author: nab@kernel.org # import os, sys import subprocess as sub import string import re import optparse tcm_dir = "" fabric_ops...
adieu/django-nonrel
refs/heads/master
tests/modeltests/mutually_referential/models.py
92
""" 24. Mutually referential many-to-one relationships Strings can be used instead of model literals to set up "lazy" relations. """ from django.db.models import * class Parent(Model): name = CharField(max_length=100) # Use a simple string for forward declarations. bestchild = ForeignKey("Child", null=T...
linuxmcu/ardupilot
refs/heads/master
Tools/LogAnalyzer/tests/TestAutotune.py
265
from LogAnalyzer import Test,TestResult import DataflashLog # from ArduCopter/defines.h AUTOTUNE_INITIALISED = 30 AUTOTUNE_OFF = 31 AUTOTUNE_RESTART = 32 AUTOTUNE_SUCCESS = 33 AUTOTUNE_FAILED = 34 AUTOTUNE_REACHED_LIMIT = 35 AUTOTUNE_PILOT_TESTING = 36 AUTOTUN...
ZipperCoin/zippercoin
refs/heads/master
share/qt/extract_strings_qt.py
2945
#!/usr/bin/python ''' Extract _("...") strings for translation and convert to Qt4 stringdefs so that they can be picked up by Qt linguist. ''' from subprocess import Popen, PIPE import glob import operator OUT_CPP="src/qt/bitcoinstrings.cpp" EMPTY=['""'] def parse_po(text): """ Parse 'po' format produced by x...
RohitDas/cubeproject
refs/heads/master
lib/django/contrib/gis/management/commands/ogrinspect.py
111
import argparse import inspect from django.contrib.gis import gdal from django.core.management.base import BaseCommand, CommandError class LayerOptionAction(argparse.Action): """ Custom argparse action for the `ogrinspect` `layer_key` keyword option which may be an integer or a string. """ def __...
BBN-Q/pyqgl2
refs/heads/master
src/python/pyqgl2/ast_qgl2.py
1
# Copyright 2016 by Raytheon BBN Technologies Corp. All Rights Reserved. """ AST utilities related to QGL2 nodes (primarily with-statements) """ import ast import os import sys from pyqgl2.debugmsg import DebugMsg from pyqgl2.lang import QGL2 def is_with_label(node, label): """ Return True if the given nod...
BDAsdeCorazones/TestAirlines
refs/heads/master
tabo/cherrypy/cherrypy/test/test_wsgi_ns.py
22
import cherrypy from cherrypy._cpcompat import ntob from cherrypy.test import helper class WSGI_Namespace_Test(helper.CPWebCase): def setup_server(): class WSGIResponse(object): def __init__(self, appresults): self.appresults = appresults self.iter = iter(app...
eunchong/build
refs/heads/master
scripts/slave/apply_svn_patch.py
3
#!/usr/bin/python # 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. """Apply a Subversion patch to the checkout. This script can optionally pass the patch contents through an external filter script to alter...
darouwan/shadowsocks
refs/heads/master
shadowsocks/asyncdns.py
655
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014-2015 clowwindy # # 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...
j-dasilva/COMP4350
refs/heads/master
apartment/calendarPage/apps.py
1
from django.apps import AppConfig class CalendarpageConfig(AppConfig): name = 'calendarPage'
realzzt/BitCoin2013
refs/heads/master
contrib/devtools/fix-copyright-headers.py
1
#!/usr/bin/env python3 """ Run this script to update all the copyright headers of files that were changed this year. For example: // Copyright (c) 2009-2012 The Bitcoin Core developers it will change it to // Copyright (c) 2009-2015 The Bitcoin Core developers """ import subprocess import time import...
maheshcn/memory-usage-from-ldfile
refs/heads/master
openpyxl/charts/tests/test_graph.py
2
from datetime import date class TestGraphChart: def test_ctor(self, GraphChart, Axis): c = GraphChart() assert isinstance(c.x_axis, Axis) assert isinstance(c.y_axis, Axis) def test_get_x_unit(self, GraphChart, series): c = GraphChart() c.append(series) assert ...
iSoir/gnuGame
refs/heads/master
gnuGame/settings.py
1
""" Django settings for gnuGame project. Generated by 'django-admin startproject' using Django 1.9.5. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os im...
supergentle/migueltutorial
refs/heads/master
flask/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/mbcharsetprober.py
2923
######################## 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...
mscuthbert/abjad
refs/heads/master
abjad/tools/stringtools/to_accent_free_snake_case.py
2
# -*- encoding: utf-8 -*- import six from abjad.tools.stringtools.strip_diacritics import strip_diacritics def to_accent_free_snake_case(string): '''Changes `string` to accent-free snake case. .. container:: example :: >>> stringtools.to_accent_free_snake_case('Déja vu') 'd...