repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
FireWRT/OpenWrt-Firefly-Libraries
refs/heads/master
staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python3.4/plat-linux/CDROM.py
330
# Generated by h2py from /usr/include/linux/cdrom.h CDROMPAUSE = 0x5301 CDROMRESUME = 0x5302 CDROMPLAYMSF = 0x5303 CDROMPLAYTRKIND = 0x5304 CDROMREADTOCHDR = 0x5305 CDROMREADTOCENTRY = 0x5306 CDROMSTOP = 0x5307 CDROMSTART = 0x5308 CDROMEJECT = 0x5309 CDROMVOLCTRL = 0x530a CDROMSUBCHNL = 0x530b CDROMREADMODE2 = 0x530c ...
denisenkom/django-sqlserver
refs/heads/master
sqlserver/base.py
1
"""Microsoft SQL Server database backend for Django.""" from __future__ import absolute_import, unicode_literals import datetime import collections import django.db.backends.base.client from django.utils.timezone import utc import sqlserver_ado import sqlserver_ado.base import sqlserver_ado.compiler import sqlserver_...
pratapvardhan/pandas
refs/heads/master
pandas/tests/indexes/multi/conftest.py
1
# -*- coding: utf-8 -*- import numpy as np import pytest from pandas import Index, MultiIndex @pytest.fixture def idx(): # a MultiIndex used to test the general functionality of the # general functionality of this object major_axis = Index(['foo', 'bar', 'baz', 'qux']) minor_axis = Index(['one', 'two...
ycaihua/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/test/test_devpoll.py
87
# Test case for the select.devpoll() function # Initial tests are copied as is from "test_poll.py" import os import random import select import sys import unittest from test.support import TESTFN, run_unittest, cpython_only if not hasattr(select, 'devpoll') : raise unittest.SkipTest('test works only on Solaris O...
btjhjeon/ConversationalQA
refs/heads/master
skipthoughts/decoding/search.py
2
""" Code for sequence generation """ import numpy import copy def gen_sample(tparams, f_init, f_next, ctx, options, trng=None, k=1, maxlen=30, stochastic=True, argmax=False, use_unk=False): """ Generate a sample, using either beam search or stochastic sampling """ if k > 1: asser...
ngokevin/zamboni
refs/heads/master
mkt/api/base.py
2
import functools import json from django.db.models.sql import EmptyResultSet import commonware.log from rest_framework.decorators import api_view from rest_framework.exceptions import ParseError from rest_framework.mixins import ListModelMixin from rest_framework.routers import Route, SimpleRouter from rest_framework...
kmolab/kmolab.github.io
refs/heads/master
data/Brython-3.3.4/Lib/urllib/request.py
8
from browser import ajax from . import error class FileIO: def __init__(self, data): self._data=data def read(self): return self._data def urlopen(url, data=None, timeout=None): global result result=None def on_complete(req): global result if req.status == 200: ...
jordigh/mercurial-crew
refs/heads/master
mercurial/cmdutil.py
1
# cmdutil.py - help for command processing in mercurial # # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from node import hex, nullid, nullrev, short from i18n import _ import ...
josephbolus/dokku
refs/heads/master
tests/apps/python-flask/hello.py
236
import os from flask import Flask app = Flask(__name__) @app.route('/') def hello(): return 'python/flask'
DBuildService/atomic-reactor
refs/heads/master
tests/plugins/test_compress.py
1
import os import tarfile import pytest from atomic_reactor.constants import (EXPORTED_COMPRESSED_IMAGE_NAME_TEMPLATE, IMAGE_TYPE_DOCKER_ARCHIVE) from atomic_reactor.core import DockerTasker from atomic_reactor.plugin import PostBuildPluginsRunner from atomic_reactor.plugins.post_...
msebire/intellij-community
refs/heads/master
python/testData/postfix/not/and.py
39
def f(): return True and False.not<caret>
JuliBakagianni/CEF-ELRC
refs/heads/master
lib/python2.7/site-packages/unidecode/x013.py
252
data = ( 'ja', # 0x00 'ju', # 0x01 'ji', # 0x02 'jaa', # 0x03 'jee', # 0x04 'je', # 0x05 'jo', # 0x06 'jwa', # 0x07 'ga', # 0x08 'gu', # 0x09 'gi', # 0x0a 'gaa', # 0x0b 'gee', # 0x0c 'ge', # 0x0d 'go', # 0x0e '[?]', # 0x0f 'gwa', # 0x10 '[?]', # 0x11 'gwi', # 0x1...
Mistobaan/tensorflow
refs/heads/master
tensorflow/contrib/predictor/testing_common.py
93
# 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...
mdsafwan/Deal-My-Stuff
refs/heads/master
Lib/site-packages/MySQLdb/constants/FIELD_TYPE.py
124
"""MySQL FIELD_TYPE Constants These constants represent the various column (field) types that are supported by MySQL. """ DECIMAL = 0 TINY = 1 SHORT = 2 LONG = 3 FLOAT = 4 DOUBLE = 5 NULL = 6 TIMESTAMP = 7 LONGLONG = 8 INT24 = 9 DATE = 10 TIME = 11 DATETIME = 12 YEAR = 13 NEWDATE = 14 VARCHAR = 15 BIT = 16 NEWDECIMA...
imsparsh/python-social-auth
refs/heads/master
social/backends/stocktwits.py
3
""" Stocktwits OAuth2 backend, docs at: http://psa.matiasaguirre.net/docs/backends/stocktwits.html """ from social.backends.oauth import BaseOAuth2 class StocktwitsOAuth2(BaseOAuth2): """Stockwiths OAuth2 backend""" name = 'stocktwits' AUTHORIZATION_URL = 'https://api.stocktwits.com/api/2/oauth/author...
brennanmorell/Mariner
refs/heads/master
WhaleLevel.py
1
#_____DEPRECATED FOR NOW_____ class WhaleLevel(): def __init__(self, price, volume, orders, current_whale): self._price = price self._orders = orders self._volume = volume self._current_whale = current_whale def get_price(self): return self._price def get_orders(self): return self._orders def add_ord...
spacehitchhiker/test-task
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
2779
# Copyright (c) 2011 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """gypsh output module gypsh is a GYP shell. It's not really a generator per se. All it does is fire up an interactive Python session with a few local variables...
gwpy/gwpy.github.io
refs/heads/master
docs/v0.3/examples/signal/gw150914-1.py
43
from gwpy.timeseries import TimeSeries data = TimeSeries.fetch_open_data('H1', 1126259446, 1126259478)
allenp/odoo
refs/heads/9.0
addons/l10n_cn_standard/__init__.py
256
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (C) 2007-2014 Jeff Wang(<http://jeff@osbzr.com>).
c-a/jhbuild
refs/heads/github
jhbuild/modtypes/autotools.py
1
# jhbuild - a tool to ease building collections of source packages # Copyright (C) 2001-2006 James Henstridge # Copyright (C) 2007-2008 Frederic Peters # # autotools.py: autotools module type definitions. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Genera...
henaras/horizon
refs/heads/master
openstack_dashboard/dashboards/admin/networks/subnets/urls.py
54
# Copyright 2012 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
JamesMura/sentry
refs/heads/master
src/sentry/south_migrations/0102_ensure_slugs.py
6
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): from sentry.models import slugify_instance for team in orm['sentry.Team'].objects.filter(slug__isnull=True): ...
LudwigKnuepfer/RIOT
refs/heads/master
tests/pkg_fatfs_vfs/tests/01-run.py
5
#!/usr/bin/env python3 # Copyright (C) 2017 HAW-Hamburg.de # # This file is subject to the terms and conditions of the GNU Lesser # General Public License v2.1. See the file LICENSE in the top level # directory for more details. import os import sys class TestFailed(Exception): pass def testfunc(child): ...
JiscPER/esprit
refs/heads/master
esprit/mappings.py
1
EXACT = { "default" : { "match" : "*", "match_mapping_type": "string", "mapping" : { "type" : "multi_field", "fields" : { "{name}" : {"type" : "{dynamic_type}", "index" : "analyzed", "store" : "no"}, "exact" : {"type" : "{dynamic_type}"...
vsmolyakov/cv
refs/heads/master
image_search/image_search.py
1
import numpy as np import matplotlib.pyplot as plt import os import random from PIL import Image import h5py from keras.models import Sequential from keras.layers.core import Flatten, Dense, Dropout from keras.layers import Convolution2D, ZeroPadding2D, MaxPooling2D from keras.optimizers import SGD from keras import...
zulip/zulip
refs/heads/master
zerver/migrations/0032_verify_all_medium_avatar_images.py
3
import hashlib from unittest.mock import patch from django.conf import settings from django.db import migrations from django.db.backends.postgresql.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps from zerver.lib.upload import upload_backend from zerver.lib.utils import make_safe_di...
Weihonghao/ECM
refs/heads/master
Vpy34/lib/python3.5/site-packages/pip/_vendor/html5lib/_trie/_base.py
354
from __future__ import absolute_import, division, unicode_literals from collections import Mapping class Trie(Mapping): """Abstract base class for tries""" def keys(self, prefix=None): # pylint:disable=arguments-differ keys = super(Trie, self).keys() if prefix is None: r...
Intel-bigdata/s3-tests
refs/heads/master
setup.py
5
#!/usr/bin/python from setuptools import setup, find_packages setup( name='s3tests', version='0.0.1', packages=find_packages(), author='Tommi Virtanen', author_email='tommi.virtanen@dreamhost.com', description='Unofficial Amazon AWS S3 compatibility tests', license='MIT', keywords='s3 ...
foxish/test-infra
refs/heads/master
gubernator/main_test.py
4
#!/usr/bin/env python # Copyright 2016 The Kubernetes Authors. # # 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 appli...
davidzchen/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/linalg/sparse/csr_sparse_matrix_grad_test.py
9
# 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...
chrisndodge/edx-platform
refs/heads/master
common/djangoapps/embargo/admin.py
154
""" Django admin page for embargo models """ from django.contrib import admin import textwrap from config_models.admin import ConfigurationModelAdmin from embargo.models import IPFilter, CountryAccessRule, RestrictedCourse from embargo.forms import IPFilterForm, RestrictedCourseForm class IPFilterAdmin(Configuration...
saghul/uvent
refs/heads/master
setup.py
1
# -*- coding: utf-8 -*- from setuptools import setup from uvent import __version__ setup( name = 'uvent', version = __version__, url = 'https://github.com/saghul/uvent', author = 'Saúl Ibarra Corretgé', author_email = 'saghul@gmail.com', descript...
davidnmurray/iris
refs/heads/master
lib/iris/tests/integration/format_interop/__init__.py
17
# (C) British Crown Copyright 2013 - 2015, Met Office # # This file is part of Iris. # # Iris 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 3 of the License, or # (at your option) any l...
Zanzibar82/plugin.video.pelisalacarta_ui.pureita
refs/heads/master
servers/sendvid.py
6
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para sendvid # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core impor...
WillisXChen/django-oscar
refs/heads/master
oscar/lib/python2.7/site-packages/sorl/thumbnail/compat.py
3
from __future__ import unicode_literals import sys import django __all__ = [ 'json', 'BufferIO', 'urlopen', 'urlparse', 'quote', 'quote_plus', 'URLError', 'force_unicode', 'text_type' ] PY2 = sys.version_info[0] == 2 PY3 = sys.version_info[0] == 3 # Django version if django.VERSION...
pombredanne/similarityPy
refs/heads/master
tests/measure_tests/string_data_tests/__init__.py
98
__author__ = 'cenk'
YOTOV-LIMITED/kuma
refs/heads/master
kuma/authkeys/views.py
31
from django.core.exceptions import PermissionDenied from django.shortcuts import get_object_or_404, render, redirect from django.contrib.auth.decorators import login_required, permission_required from kuma.core.utils import paginate from .models import Key from .forms import KeyForm ITEMS_PER_PAGE = 15 @login_req...
dbertha/odoo
refs/heads/8.0
addons/purchase_requisition/wizard/bid_line_qty.py
374
# -*- 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...
richardfergie/googleads-python-lib
refs/heads/master
examples/dfp/v201508/base_rate_service/__init__.py
618
#!/usr/bin/python # # Copyright 2015 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...
mr-led/stock_carrier
refs/heads/master
__openerp__.py
1
# -*- 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...
evamwangi/bc-7-Todo_List
refs/heads/master
venv/Lib/site-packages/flask_login.py
26
# -*- coding: utf-8 -*- ''' flask.ext.login --------------- This module provides user session management for Flask. It lets you log your users in and out in a database-independent manner. :copyright: (c) 2011 by Matthew Frazier. :license: MIT/X11, see LICENSE for more details. ''' __version_i...
da1z/intellij-community
refs/heads/master
python/testData/inspections/PyUnboundLocalVariableInspection/ControlFlowInTryExceptFinally.py
83
def foo1(): a = 1 try: for i in range(10): pass except Exception: pass finally: b = a #pass def foo2(): a = 1 try: for i in range(10): pass except Exception: c = a #pass finally: b = a #pass
robertwb/incubator-beam
refs/heads/master
sdks/python/apache_beam/io/gcp/tests/pubsub_matcher_test.py
5
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
j-marjanovic/myhdl
refs/heads/master
myhdl/_join.py
6
# This file is part of the myhdl library, a Python package for using # Python as a Hardware Description Language. # # Copyright (C) 2003-2008 Jan Decaluwe # # The myhdl 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 t...
alajara/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/py/py/_path/cacheutil.py
278
""" This module contains multithread-safe cache implementations. All Caches have getorbuild(key, builder) delentry(key) methods and allow configuration when instantiating the cache class. """ from time import time as gettime class BasicCache(object): def __init__(self, maxentries=128): self.maxe...
badloop/SickRage
refs/heads/master
lib/unidecode/x0bc.py
253
data = ( 'mil', # 0x00 'milg', # 0x01 'milm', # 0x02 'milb', # 0x03 'mils', # 0x04 'milt', # 0x05 'milp', # 0x06 'milh', # 0x07 'mim', # 0x08 'mib', # 0x09 'mibs', # 0x0a 'mis', # 0x0b 'miss', # 0x0c 'ming', # 0x0d 'mij', # 0x0e 'mic', # 0x0f 'mik', # 0x10 'mit', # ...
vitan/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/i18n/urls.py
79
from __future__ import unicode_literals from django.conf.urls.i18n import i18n_patterns from django.http import HttpResponse, StreamingHttpResponse from django.utils.translation import ugettext_lazy as _ urlpatterns = i18n_patterns('', (r'^simple/$', lambda r: HttpResponse()), (r'^streaming/$', lambda r: Stre...
sposh-science/pycode-browser
refs/heads/master
Code/Physics/series_sin.py
1
from pylab import * from scipy import * x = linspace(-pi,pi,40) a = zeros(40) plot(x,sin(x)) for n in range(1,5): sign = (-1)**(n+1) term = x**(2*n-1) / factorial(2*n-1) a = a + sign * term print( n,sign) plot(x,term) plot(x,a,'+') show()
geekroot/erpnext
refs/heads/develop
erpnext/patches/v6_4/repost_gle_for_journal_entries_where_reference_name_missing.py
30
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import print_function, unicode_literals import frappe def execute(): je_list = frappe.db.sql_list("""select distinct parent from `tabJournal Entry Account` je where docs...
linktlh/Toontown-journey
refs/heads/master
toontown/coghq/BarrelBase.py
5
import random class BarrelBase: def getRng(self): return random.Random(self.entId * self.level.doId) def getRewardPerGrab(self): if not hasattr(self, '_reward'): if self.rewardPerGrabMax > self.rewardPerGrab: self._reward = self.getRng().randrange(self.rewardPerGra...
senderista/s3-multipart
refs/heads/master
s3-mp-upload.py
2
#!/usr/bin/env python import argparse from cStringIO import StringIO import logging from math import ceil from multiprocessing import Pool import time import urlparse import boto from boto.s3.connection import OrdinaryCallingFormat parser = argparse.ArgumentParser(description="Transfer large files to S3", pro...
syhw/contextual_word_segmentation
refs/heads/master
mark_scripts/topicsandcollocations/eval-words.py
2
#! /bin/env python description = """ eval-words.py version of 20th August, 2011 Evaluates the accuracy of specific words in word segmentation output (e.g., the *.sws or *.avprs files produced by py-cfg). When the corpus is read, each word is first transformed by matching it with --match-re, and generating t...
patrickleotardif/airflow
refs/heads/master
airflow/operators/postgres_operator.py
14
import logging from airflow.hooks import PostgresHook from airflow.models import BaseOperator from airflow.utils import apply_defaults class PostgresOperator(BaseOperator): """ Executes sql code in a specific Postgres database :param postgres_conn_id: reference to a specific postgres database :type ...
mirkobrombin/Bottles
refs/heads/master
src/pages/dialog.py
1
# dialog.py # # Copyright 2020 brombinmirko <send@mirko.pm> # # 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 p...
JingJunYin/tensorflow
refs/heads/master
tensorflow/tools/graph_transforms/__init__.py
152
# 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...
ChristinaZografou/sympy
refs/heads/parabola2
sympy/polys/domains/finitefield.py
117
"""Implementation of :class:`FiniteField` class. """ from __future__ import print_function, division from sympy.polys.domains.field import Field from sympy.polys.domains.simpledomain import SimpleDomain from sympy.polys.domains.groundtypes import SymPyInteger from sympy.polys.domains.modularinteger import ModularInte...
LUTAN/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/reader_ops_test.py
1
# 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...
chienlieu2017/it_management
refs/heads/master
odoo/addons/mrp/models/mrp_production.py
1
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from collections import defaultdict import math from odoo import api, fields, models, _ from odoo.addons import decimal_precision as dp from odoo.exceptions import UserError class MrpProduction(models.Model): """ ...
simongoffin/my_odoo_tutorial
refs/heads/master
addons/purchase_requisition/__openerp__.py
61
############################################################################## # # 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 Affero General Public L...
iam-TJ/node-gyp
refs/heads/master
gyp/test/mac/gyptest-xcode-env-order.py
86
#!/usr/bin/env python # 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. """ Verifies that dependent Xcode settings are processed correctly. """ import TestGyp import sys if sys.platform == 'darwin': test = T...
Simran-B/arangodb
refs/heads/docs_3.0
3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/pythonwin/pywin/Demos/dyndlg.py
40
# dyndlg.py # contributed by Curt Hagenlocher <chi@earthlink.net> # Dialog Template params: # Parameter 0 - Window caption # Parameter 1 - Bounds (rect tuple) # Parameter 2 - Window style # Parameter 3 - Extended style # Parameter 4 - Font tuple # Parameter 5 - Menu name # Parameter 6 - Window class # Dialog item para...
tedder/ansible
refs/heads/devel
lib/ansible/plugins/action/debug.py
34
# Copyright 2012, Dag Wieers <dag@wieers.com> # Copyright 2016, Toshio Kuratomi <tkuratomi@ansible.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 versi...
shivanikhosa/browserscope
refs/heads/master
categories/richtext2/tests/applyCSS.py
16
APPLY_TESTS_CSS = { 'id': 'AC', 'caption': 'Apply Formatting Tests, using styleWithCSS', 'checkAttrs': True, 'checkStyle': True, 'styleWithCSS': True, 'Proposed': [ { 'desc': '', 'command': '', 'tests': [ ] }, { 'desc': '[HTML5] bo...
EduPepperPDTesting/pepper2013-testing
refs/heads/www0
lms/djangoapps/django_comment_client/tests/test_helpers.py
20
from django.test import TestCase from django_comment_client.helpers import pluralize class PluralizeTestCase(TestCase): def testPluralize(self): self.term = "cat" self.assertEqual(pluralize(self.term, 0), "cats") self.assertEqual(pluralize(self.term, 1), "cat") self.assertEqual(p...
digideskio/st2contrib
refs/heads/master
packs/newrelic/actions/get_alerts.py
2
import requests from st2actions.runners.pythonrunner import Action class GetAppHealthStatusAction(Action): """ Get health status of new relic application(s). """ def __init__(self, *args, **kwargs): super(GetAppHealthStatusAction, Action).__init__(*args, **kwargs) self.url = 'https://...
topicusonderwijs/zxing-ios
refs/heads/master
cpp/scons/scons-local-2.0.0.final.0/SCons/compat/_scons_collections.py
34
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation # # 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 li...
mikel-egana-aranguren/SADI-Galaxy-Docker
refs/heads/master
galaxy-dist/eggs/requests-2.2.1-py2.7.egg/requests/api.py
637
# -*- coding: utf-8 -*- """ requests.api ~~~~~~~~~~~~ This module implements the Requests API. :copyright: (c) 2012 by Kenneth Reitz. :license: Apache2, see LICENSE for more details. """ from . import sessions def request(method, url, **kwargs): """Constructs and sends a :class:`Request <Request>`. Retur...
vadimtk/chrome4sdp
refs/heads/master
third_party/cython/src/Cython/Debugger/__init__.py
1472
# empty file
michaelgallacher/intellij-community
refs/heads/master
python/testData/editing/enterDocstringStubWhenFunctionDocstringBelow.after.py
44
def f(): """ Returns: """ def g(): """ bar """
aayushidwivedi01/spark-tk
refs/heads/master
python/sparktk/models/clustering/__init__.py
137
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel Corporation  # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # #       http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
slobberchops/rop
refs/heads/master
art/life.py
1
__author__ = 'rafe' from opc.hue import hue import random import numpy HSCALE = 0.1 RESET_INTERVAL = 20 class Art(object): description = "Conway's Game of Life" def __init__(self, matrix, config): self.iterations = config.get('ITERATIONS', 1000) self.hscale = config.get('HSCALE', HSCALE) ...
sonata-nfv/son-cli
refs/heads/master
src/son/monitor/utils.py
5
""" Copyright (c) 2015 SONATA-NFV 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 agreed to in...
halberom/ansible-modules-core
refs/heads/devel
cloud/docker/docker_image_facts.py
8
#!/usr/bin/python # # Copyright 2016 Red Hat | Ansible # # 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 la...
njmube/erpnext
refs/heads/develop
erpnext/projects/doctype/project/project.py
2
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import flt, getdate, get_url from frappe import _ from frappe.model.document import Document from erpnext.controllers....
mattvick/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/test/main_unittest.py
124
# Copyright (C) 2012 Google, Inc. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer...
rdo-management/heat
refs/heads/mgt-master
heat/db/sqlalchemy/migrate_repo/versions/045_stack_backup.py
13
# # 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 # ...
mayankcu/Django-social
refs/heads/master
venv/Lib/encodings/euc_jisx0213.py
816
# # euc_jisx0213.py: Python Unicode Codec for EUC_JISX0213 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_jp, codecs import _multibytecodec as mbc codec = _codecs_jp.getcodec('euc_jisx0213') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(m...
Daniel-CA/odoo-addons
refs/heads/8.0
product_stock_on_hand/post_install.py
1
# -*- coding: utf-8 -*- # Copyright 2017 Ainara Galdona - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import SUPERUSER_ID def update_stock_on_hand_locations(cr, pool): slo = pool['stock.location'] location_ids = slo.search(cr, SUPERUSER_ID, [('usage', '=', 'internal...
idaholab/raven
refs/heads/devel
scripts/TestHarness/testers/RAVENImageDiff.py
2
# Copyright 2017 Battelle Energy Alliance, 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 t...
fhaoquan/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/lib2to3/fixes/fix_reduce.py
203
# Copyright 2008 Armin Ronacher. # Licensed to PSF under a Contributor Agreement. """Fixer for reduce(). Makes sure reduce() is imported from the functools module if reduce is used in that module. """ from lib2to3 import fixer_base from lib2to3.fixer_util import touch_import class FixReduce(fixer_base.BaseFix): ...
pcubillos/MCcubed
refs/heads/master
MCcubed/mc/chain.py
1
# Copyright (c) 2015-2019 Patricio Cubillos and contributors. # MC3 is open-source software under the MIT license (see LICENSE). import sys import os import warnings import random import multiprocessing as mp import numpy as np sys.path.append(os.path.dirname(os.path.realpath(__file__)) + '/../lib') import chisq as ...
manqala/erpnext
refs/heads/develop
erpnext/patches/v7_0/update_conversion_factor_in_supplier_quotation_item.py
53
from __future__ import unicode_literals import frappe def execute(): frappe.reload_doc('buying', 'doctype', 'supplier_quotation_item') frappe.db.sql("""update `tabSupplier Quotation Item` as sqi_t, (select sqi.item_code as item_code, sqi.uom as uom, ucd.conversion_factor as conversion_factor from `tabS...
vim-scripts/Python-mode-klen
refs/heads/master
pymode/async.py
26
""" Python-mode async support. """ from ._compat import Queue RESULTS = Queue()
daevaorn/sentry
refs/heads/master
tests/sentry/lang/javascript/test_sourcemaps.py
28
# -*- coding: utf-8 -*- from __future__ import absolute_import from sentry.lang.javascript.sourcemaps import ( SourceMap, parse_vlq, parse_sourcemap, sourcemap_to_index, find_source ) from sentry.testutils import TestCase from sentry.utils import json sourcemap = """{ "version":3, "file":"file.min.js",...
xzh86/scikit-learn
refs/heads/master
sklearn/preprocessing/__init__.py
268
""" The :mod:`sklearn.preprocessing` module includes scaling, centering, normalization, binarization and imputation methods. """ from ._function_transformer import FunctionTransformer from .data import Binarizer from .data import KernelCenterer from .data import MinMaxScaler from .data import MaxAbsScaler from .data ...
AMOboxTV/AMOBox.LegoBuild
refs/heads/master
script.module.unidecode/lib/unidecode/x1d7.py
248
data = ( '', # 0x00 '', # 0x01 '', # 0x02 '', # 0x03 '', # 0x04 '', # 0x05 '', # 0x06 '', # 0x07 '', # 0x08 '', # 0x09 '', # 0x0a '', # 0x0b '', # 0x0c '', # 0x0d '', # 0x0e '', # 0x0f '', # 0x10 '', # 0x11 '', # 0x12 '', # 0x13 '', # 0x14 '', # 0x15 '',...
danielbruns-wf/rockstar
refs/heads/master
examples/scheme_rockstar.py
22
from rockstar import RockStar scheme_code = '(display "Hello world")' rock_it_bro = RockStar(days=400, file_name='helloWorld.scm', code=scheme_code) rock_it_bro.make_me_a_rockstar()
ContinuumIO/numpy
refs/heads/master
numpy/testing/tests/test_doctesting.py
224
""" Doctests for NumPy-specific nose/doctest modifications """ from __future__ import division, absolute_import, print_function # try the #random directive on the output line def check_random_directive(): ''' >>> 2+2 <BadExample object at 0x084D05AC> #random: may vary on your system ''' # check the ...
fabian-paul/PyEMMA
refs/heads/devel
pyemma/_ext/variational/util.py
3
""" Add convenience functions here if needed """ __author__ = 'noe' import numpy as _np class ZeroRankError(_np.linalg.LinAlgError): """Input matrix has rank zero.""" pass def features_to_basis(infiles, basisset, outfiles): """Reads input files basisset : BasisSet object basis set tob e use...
apark263/tensorflow
refs/heads/master
tensorflow/python/ops/parallel_for/math_test.py
2
# Copyright 2018 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...
garwynn/L900_3.4_Experiment
refs/heads/master
Documentation/target/tcm_mod_builder.py
4981
#!/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...
itsjeyd/edx-platform
refs/heads/master
common/lib/capa/capa/tests/test_customrender.py
37
from lxml import etree import unittest import xml.sax.saxutils as saxutils from capa.tests.helpers import test_capa_system from capa import customrender # just a handy shortcut lookup_tag = customrender.registry.get_class_for_tag def extract_context(xml): """ Given an xml element corresponding to the output...
alfredodeza/ceph-deploy
refs/heads/master
ceph_deploy/tests/unit/test_new.py
18
from ceph_deploy import new from ceph_deploy.tests import util import pytest class TestValidateHostIp(object): def test_for_all_subnets_all_ips_match(self): ips = util.generate_ips("10.0.0.1", "10.0.0.40") ips.extend(util.generate_ips("10.0.1.1", "10.0.1.40")) subnets = ["10.0.0.1/16", "1...
krafczyk/spack
refs/heads/develop
lib/spack/spack/build_systems/makefile.py
5
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
mathewpower/djangorestframework-queryparams
refs/heads/master
rest_framework_queryparams/schema.py
1
from rest_framework import serializers from rest_framework.schemas import SchemaGenerator as _SchemaGenerator from rest_framework.compat import coreapi, urlparse class SchemaGenerator(_SchemaGenerator): def get_link(self, path, method, view): """ Return a `coreapi.Link` instance for the given endp...
spaceone/pyjs
refs/heads/master
pyjswidgets/pyjslib.PyJS.py
7
# Copyright 2006 James Tauber and contributors # # 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...
dagwieers/ansible
refs/heads/devel
test/integration/targets/azure_rm_keyvault/lookup_plugins/azure_service_principal_attribute.py
84
# (c) 2018 Yunge Zhu, <yungez@microsoft.com> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = """ lookup: azure_service_principal_attribute req...
onesfreedom/pybuilder
refs/heads/master
src/main/python/pybuilder/plugins/python/distutils_plugin.py
3
# -*- coding: utf-8 -*- # # This file is part of PyBuilder # # Copyright 2011-2015 PyBuilder Team # # 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/l...
salguarnieri/intellij-community
refs/heads/master
python/testData/copyPaste/multiLine/IndentMulti23.dst.py
664
class C: def foo(self): <caret> y = 2
nismod/energy_demand
refs/heads/master
energy_demand/plotting/fig_3_weather_map.py
1
import os import numpy as np import geopandas as gpd import pandas as pd import matplotlib.pyplot as plt import matplotlib.patches as mpatches from matplotlib.patches import Circle from matplotlib.colors import LinearSegmentedColormap import argparse import cartopy.crs as ccrs import cartopy.io.shapereader as shpreade...