repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
gangadharkadam/vervefrappe
refs/heads/v5.0
frappe/website/doctype/contact_us_settings/contact_us_settings.py
73
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class ContactUsSettings(Document): def on_update(self): from frap...
zdary/intellij-community
refs/heads/master
python/testData/quickFixes/PyRemoveUnusedLocalQuickFixTest/removeChainedAssignmentStatementUnpackingFirstTarget.py
9
def f(): a = <caret>unused, b = 42, 42 return a, b
tacaswell/pims
refs/heads/master
pims/tests/test_common.py
1
from __future__ import (absolute_import, division, print_function, unicode_literals) import six import os import tempfile import zipfile import sys import random import types import unittest import pickle from io import BytesIO import nose import numpy as np from numpy.testing import (assert_e...
geo-poland/frappe
refs/heads/develop
frappe/website/doctype/user_vote/__init__.py
12133432
rahushen/ansible
refs/heads/devel
lib/ansible/module_utils/network/nso/__init__.py
12133432
filias/django
refs/heads/master
django/conf/locale/en/__init__.py
12133432
arun6582/django
refs/heads/master
tests/test_client_regress/__init__.py
12133432
LeoTestard/qt-ubuntu-components
refs/heads/master
tests/autopilot/tavastia/tests/progressbar/__init__.py
12133432
dkdewitt/werkzeug
refs/heads/master
tests/contrib/test_wrappers.py
25
# -*- coding: utf-8 -*- """ tests.contrib.wrappers ~~~~~~~~~~~~~~~~~~~~~~ Added tests for the sessions. :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import with_statement from werkzeug.contrib import wrappers from werkzeug import routin...
dimagi/rapidsms-contrib-apps-dev
refs/heads/master
echo/handlers/echo.py
12
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 from rapidsms.contrib.handlers.handlers.keyword import KeywordHandler class EchoHandler(KeywordHandler): """ Handle any message prefixed ``echo``, responding with the remainder of the text. Useful for remotely testing internationalization. """ ...
mick-d/nipype_source
refs/heads/master
nipype/workflows/dmri/camino/setup.py
28
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('camino', parent_package, top_path) return config if __name__ ==...
bonethrown/azure-sdk-for-python
refs/heads/master
azure-servicebus/tests/test_servicebus_servicebus.py
5
# coding: utf-8 #------------------------------------------------------------------------- # Copyright (c) Microsoft. 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 #...
ohadbc/hwspinlock-next
refs/heads/for_arnd
scripts/rt-tester/rt-tester.py
11005
#!/usr/bin/python # # rt-mutex tester # # (C) 2006 Thomas Gleixner <tglx@linutronix.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # import os import sys import getopt import sh...
hshindo/POS-Tagging-benchmark
refs/heads/master
Chainer/ctagger/train.py
1
from . import nn from . import util import os import logging import time import random import chainer.optimizers as O import chainer.functions as F import chainer.links as L from chainer import Variable from chainer import cuda def _log_str(lst): s = [] for k, v in lst: s.append(k + ':') if ...
OmkarPathak/Python-Programs
refs/heads/master
CompetitiveProgramming/HackerEarth/Basics_Of_Input_Output/P03_FindProduct.py
1
# You have been given an array A of size N consisting of positive integers. You need to find and print the product of all # the number in this array Modulo (10^9+7). # # Input Format: # The first line contains a single integer N denoting the size of the array. The next line contains N space separated # integers denotin...
acenario/Payable
refs/heads/master
lib/python2.7/site-packages/django/contrib/auth/tests/__init__.py
12133432
srilatha44/threepress
refs/heads/master
bookworm/library/test-data/__init__.py
12133432
vuntz/glance
refs/heads/master
glance/contrib/plugins/image_artifact/__init__.py
12133432
mdrumond/tensorflow
refs/heads/master
tensorflow/contrib/tpu/profiler/pip_package/setup.py
20
# 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...
teochenglim/ansible-modules-extras
refs/heads/devel
cloud/lxd/lxd_container.py
18
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Hiroaki Nakamura <hnakamur@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...
superdesk/superdesk-core
refs/heads/develop
content_api/packages_versions/__init__.py
1
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import super...
mdaniel/intellij-community
refs/heads/master
python/testData/refactoring/rename/renameShadowingVariable_after.py
83
def lab(): pass bar = 1 print(bar)
Jesus89/apio
refs/heads/develop
setup.py
1
# -*- coding: utf-8 -*- import os import json from setuptools import setup from apio import (__author__, __description__, __email__, __license__, __title__, __url__, __version__) # Load extras_require extras_require = {} filepath = os.path.join('apio', 'resources', 'distribution.json') with open(f...
henriknelson/micropython
refs/heads/master
tests/basics/floordivide_intbig.py
45
# check modulo matches python definition a = 987654321987987987987987987987 b = 19 print(a // b) print(a // -b) print(-a // b) print(-a // -b) a = 10000000000000000000000000000000000000000000 b = 100 print(a // b) print(a // -b) print(-a // b) print(-a // -b)
mdaniel/intellij-community
refs/heads/master
python/testData/completion/className/function/function.after.py
83
from mypackage import shazam shazam()
sharpdeep/pyspider
refs/heads/master
pyspider/libs/utils.py
53
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<i@binux.me> # http://binux.me # Created on 2012-11-06 11:50:13 import logging import hashlib import datetime import base64 import six from six import iteritems md5string = lambda x: hashlib.md5(ut...
cpennington/edx-platform
refs/heads/master
openedx/features/course_duration_limits/tests/__init__.py
12133432
japeto/Vigtech-Services
refs/heads/master
env/lib/python2.7/site-packages/pip/_vendor/pkg_resources/tests/__init__.py
12133432
etkirsch/legends-of-erukar
refs/heads/master
erukar/content/enemies/human/VelmyreanCleric.py
12133432
slyphon/pants
refs/heads/master
contrib/cpp/src/python/pants/contrib/cpp/__init__.py
12133432
byt3bl33d3r/CrackMapExec
refs/heads/master
cme/protocols/ssh/__init__.py
12133432
postlund/home-assistant
refs/heads/dev
homeassistant/components/eliqonline/__init__.py
36
"""The eliqonline component."""
blackmiaool/rt-thread
refs/heads/master
tools/buildbot.py
39
import os import sys def usage(): print '%s all -- build all bsp' % os.path.basename(sys.argv[0]) print '%s clean -- clean all bsp' % os.path.basename(sys.argv[0]) print '%s project -- update all prject files' % os.path.basename(sys.argv[0]) BSP_ROOT = '../bsp' if len(sys.argv) != 2: usage() sys.e...
hcsturix74/django
refs/heads/master
tests/model_fields/test_uuid.py
81
import json import uuid from django.core import exceptions, serializers from django.db import models from django.test import SimpleTestCase, TestCase from .models import ( NullableUUIDModel, PrimaryKeyUUIDModel, RelatedToUUIDModel, UUIDGrandchild, UUIDModel, ) class TestSaveLoad(TestCase): def test_uuid...
lz1988/django-web2015
refs/heads/master
tests/regressiontests/staticfiles_tests/urls/default.py
176
from django.conf.urls import patterns, url urlpatterns = patterns('', url(r'^static/(?P<path>.*)$', 'django.contrib.staticfiles.views.serve'), )
CDNoyes/EDL-Py
refs/heads/master
EntryGuidance/chebyshevPDG.py
1
import numpy as np from numpy import sin, cos, pi import matplotlib.pyplot as plt # from scipy.optimize import minimize, differential_evolution import pyOpt from scipy.integrate import cumtrapz from scipy.interpolate import interp1d def ChebyshevDiff(n): # %Returns the (Sorted) Chebyshev Differentiation Matri...
anhstudios/swganh
refs/heads/develop
data/scripts/templates/object/tangible/veteran_reward/shared_emote_group_1.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/veteran_reward/shared_emote_group_1.iff" result.attribute_template_...
gades/novacoin
refs/heads/master
contrib/seeds/makeseeds.py
37
#!/usr/bin/env python NSEEDS=600 import re import sys from subprocess import check_output def main(): lines = sys.stdin.readlines() ips = [] pattern = re.compile(r"^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3}):7777") for line in lines: m = pattern.match(line) if m is None: ...
drkitty/cyder
refs/heads/master
cyder/cydns/tests/__init__.py
12133432
ngageoint/voxel-globe
refs/heads/nga_p2_release
voxel_globe/tiepoint_registration/__init__.py
12133432
praekeltfoundation/ndoh-hub
refs/heads/develop
scripts/migrate_to_rapidpro/__init__.py
12133432
lundjordan/services
refs/heads/master
lib/backend_common/backend_common/api.py
1
# -*- coding: utf-8 -*- # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import pathlib import connexion import flask import werkzeug import cli_common.log logger = c...
devttys1/linux-fslc
refs/heads/patches-4.0
scripts/gdb/linux/__init__.py
2010
# nothing to do for the initialization of this package
paulsmith/geodjango
refs/heads/master
django/template/loader.py
28
# Wrapper for loading templates from storage of some sort (e.g. filesystem, database). # # This uses the TEMPLATE_LOADERS setting, which is a list of loaders to use. # Each loader is expected to have this interface: # # callable(name, dirs=[]) # # name is the template name. # dirs is an optional list of directories ...
maxamillion/ansible-modules-extras
refs/heads/devel
network/f5/bigip_hostname.py
18
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2016 F5 Networks 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 # ...
nomadcube/scikit-learn
refs/heads/master
examples/cluster/plot_lena_ward_segmentation.py
271
""" =============================================================== A demo of structured Ward hierarchical clustering on Lena image =============================================================== Compute the segmentation of a 2D image with Ward hierarchical clustering. The clustering is spatially constrained in order ...
ITDevLtd/MCVirt
refs/heads/master
source/mcvirt-daemon/usr/lib/python2.7/dist-packages/mcvirt/thread/auto_start_watchdog.py
1
# Copyright (c) 2016 - I.T. Dev Ltd # # This file is part of MCVirt. # # MCVirt is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # # MCV...
gandarez/wakatime
refs/heads/master
wakatime/packages/pygments_py3/pygments/lexers/templates.py
29
# -*- coding: utf-8 -*- """ pygments.lexers.templates ~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for various template engines' markup. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexers.html import HtmlLexer, XmlLex...
erikdejonge/youtube-dl
refs/heads/master
youtube_dl/extractor/npr.py
7
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, qualities, ) class NprIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?npr\.org/(?:sections/[^/]+/)?\d{4}/\d{2}/\d{2}/(?P<id>\d+)' _TESTS = [{ 'url': 'https://www.npr.org/sections/...
MattsFleaMarket/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/importlib/test/__init__.py
12133432
femmerling/DirMaker
refs/heads/master
box/lib/python2.7/site-packages/migrate/versioning/templates/repository/__init__.py
12133432
aviarypl/mozilla-l10n-addons-server
refs/heads/master
src/olympia/devhub/management/__init__.py
12133432
wangxiangyu/horizon
refs/heads/stable/kilo
openstack_dashboard/dashboards/project/images/snapshots/__init__.py
12133432
nevir/plexability
refs/heads/master
extern/depot_tools/third_party/logilab/__init__.py
12133432
blockstack/packaging
refs/heads/master
imported/future/src/future/moves/tkinter/simpledialog.py
118
from __future__ import absolute_import from future.utils import PY3 if PY3: from tkinter.simpledialog import * else: try: from SimpleDialog import * except ImportError: raise ImportError('The SimpleDialog module is missing. Does your Py2 ' 'installation include tk...
elvrsn/share-thoughts
refs/heads/master
iwas/urls.py
1
from django.conf.urls import patterns, include, url #from django.contrib import admin #admin.autodiscover() import os from views import * urlpatterns = patterns('', # Examples: # url(r'^$', 'iwas.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^$', home), url(r'^share/$', t...
CristianCantoro/wikidump
refs/heads/master
wikidump/extractors/misc.py
1
"""Various extractors.""" import functools import regex import signal import itertools from more_itertools import peekable from typing import (Callable, Iterable, Iterator, List, TypeVar, NamedTuple, Optional) from . import arxiv, doi, isbn, pubmed from .common import CaptureResult, Span from .. i...
monikagrabowska/osf.io
refs/heads/develop
api_tests/comments/views/test_comment_report_detail.py
6
import mock import pytest from django.utils import timezone from nose.tools import * # flake8: noqa from datetime import datetime from framework.guid.model import Guid from api.base.settings.defaults import API_BASE from api_tests import utils as test_utils from tests.base import ApiTestCase from osf_tests.factories...
StudentCV/TableSoccerCV
refs/heads/master
GrabVideo.py
1
#Copyright 2016 StudentCV #Copyright and related rights are licensed under the #Solderpad Hardware License, Version 0.51 (the “License”); #you may not use this file except in compliance with the License. #You may obtain a copy of the License at http://solderpad.org/licenses/SHL-0.51. #Unless required by applicable law ...
demon-ru/iml-crm
refs/heads/master
addons/website/__openerp__.py
27
{ 'name': 'Website Builder', 'category': 'Website', 'summary': 'Build Your Enterprise Website', 'version': '1.0', 'description': """ OpenERP Website CMS =================== """, 'author': 'OpenERP SA', 'depends': ['web', 'share', 'mail'], 'installable': True, 'data': [ ...
jteehan/cfme_tests
refs/heads/master
utils/tests/test_soft_get.py
4
import pytest from utils.soft_get import soft_get, MultipleResultsException def test_soft_get(): class TestObj(object): a = 1 b = 2 c = 3 aa = 11 bb = 22 bbb = 222 container_image = 'container_image' image_registry = 'image_registry' test_dict...
vmanoria/bluemix-hue-filebrowser
refs/heads/master
hue-3.8.1-bluemix/desktop/core/ext-py/Django-1.6.10/django/conf/locale/gl/__init__.py
12133432
da1z/intellij-community
refs/heads/master
python/testData/refactoring/move/moduleToNonPackage/after/src/nonp3/__init__.py
12133432
ehashman/oh-mainline
refs/heads/master
vendor/packages/Django/tests/regressiontests/__init__.py
12133432
mapr/hue
refs/heads/hue-3.9.0-mapr
desktop/core/ext-py/Django-1.6.10/tests/signals/__init__.py
12133432
kustodian/ansible
refs/heads/devel
lib/ansible/module_utils/network/junos/facts/legacy/__init__.py
12133432
JetBrains/intellij-community
refs/heads/master
python/testData/inspections/RenameShadowingBuiltins.py
83
def f(name): <weak_warning descr="Shadows built-in name 'file'">f<caret>ile</weak_warning> = open(name, 'rb') return file.read()
Memrise/unidecode
refs/heads/master
unidecode/x025.py
252
data = ( '-', # 0x00 '-', # 0x01 '|', # 0x02 '|', # 0x03 '-', # 0x04 '-', # 0x05 '|', # 0x06 '|', # 0x07 '-', # 0x08 '-', # 0x09 '|', # 0x0a '|', # 0x0b '+', # 0x0c '+', # 0x0d '+', # 0x0e '+', # 0x0f '+', # 0x10 '+', # 0x11 '+', # 0x12 '+', # 0x13 '+', # 0...
AlienVault-Engineering/service-manager
refs/heads/master
src/unittest/resources/service_templates_test/pylib/{{cookiecutter.project_slug}}/src/main/python/noop.py
145
pass
Alexander-M-Waldman/local_currency_site
refs/heads/master
lib/python2.7/site-packages/django/views/static.py
300
""" Views and functions for serving static files. These are only to be used during development, and SHOULD NOT be used in a production setting. """ from __future__ import unicode_literals import mimetypes import os import posixpath import re import stat from django.http import ( FileResponse, Http404, HttpRespons...
greenpau/PyEwsClient
refs/heads/master
pyewsclient/__init__.py
1
# PyEwsClient - Microsoft Office 365 EWS (Exchange Web Services) Client Library # Copyright (C) 2013 Paul Greenberg <paul@greenberg.pro> # # 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 Foundatio...
virtUOS/courseware
refs/heads/master
tests/selenium_webdriver/selenium-webdriver-test-quick/videoblock.py
2
# -*- coding: iso-8859-15 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import Select from selenium.common.exceptions import NoSuchElementException import unittest, time, re import mysuite class VideoBlo...
pipermerriam/eth-testrpc
refs/heads/master
tests/client/test_get_block_number.py
4
def test_get_block_number(client): assert client.get_block_number() == 0 client.wait_for_block(10) assert client.get_block_number() == 10
dudymas/python-openstacksdk
refs/heads/master
openstack/network/v2/network.py
3
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
Salmista-94/Ninja_3.0_PyQt5
refs/heads/master
ninja_ide/gui/main_panel/browser_widget.py
1
# -*- coding: utf-8 -*- # # This file is part of NINJA-IDE (http://ninja-ide.org). # # NINJA-IDE 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 # any later version. # # NIN...
AccelAI/accel.ai
refs/heads/master
flask-aws/lib/python2.7/site-packages/ebcli/objects/requests.py
2
# Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
Osmose/snippets-service
refs/heads/master
snippets/base/migrations/0014_populate_countries.py
2
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models from snippets.base import ENGLISH_COUNTRY_CHOICES class Migration(DataMigration): def forwards(self, orm): for country_code, country_name in ENGLISH_COUNTRY_CHOICES: ...
TechWritingWhiz/indy-node
refs/heads/master
indy_common/test/auth/test_auth_nym.py
1
from plenum.common.constants import TRUSTEE, STEWARD, VERKEY from indy_common.auth import Authoriser from indy_common.constants import ROLE, NYM, TGB, TRUST_ANCHOR def test_make_trustee(role, is_owner): authorized = (role == TRUSTEE) assert authorized == Authoriser.authorised(typ=NYM, ...
ivuk/wile
refs/heads/master
tests/test_wile.py
2
import os import pytest import click import wile def test_wile__get_or_gen_key(inside_tmpdir, logcapture, monkeypatch): account_key_path = 'account.key' account_key_size = 2048 monkeypatch.setattr(click, 'prompt', lambda *args, **kwargs: u'somepassword') assert os.listdir(os.curdir) == [] key1...
illicitonion/givabit
refs/heads/master
lib/sdks/google_appengine_1.7.1/google_appengine/lib/django_1_3/django/db/models/sql/compiler.py
52
from django.core.exceptions import FieldError from django.db import connections from django.db.backends.util import truncate_name from django.db.models.sql.constants import * from django.db.models.sql.datastructures import EmptyResultSet from django.db.models.sql.expressions import SQLEvaluator from django.db.models.sq...
joshka/SoundCloud2.Bundle
refs/heads/master
Contents/Libraries/Shared/simplejson/tests/test_pass1.py
147
from unittest import TestCase import simplejson as json # from http://json.org/JSON_checker/test/pass1.json JSON = r''' [ "JSON Test Pattern pass1", {"object with 1 member":["array with 1 element"]}, {}, [], -42, true, false, null, { "integer": 1234567890, "real": -...
SebastianLloret/Clever-Bot
refs/heads/master
http/cookies.py
54
from __future__ import absolute_import import sys assert sys.version_info[0] < 3 from Cookie import * from Cookie import Morsel # left out of __all__ on Py2.7!
edmorley/treeherder
refs/heads/master
tests/__init__.py
12133432
mollstam/UnrealPy
refs/heads/master
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/httplib2-0.9.1/python2/httplib2/test/brokensocket/socket.py
314
from realsocket import gaierror, error, getaddrinfo, SOCK_STREAM
konstruktoid/ansible-upstream
refs/heads/devel
lib/ansible/modules/web_infrastructure/deploy_helper.py
149
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Jasper N. Brouwer <jasper@nerdsweide.nl> # (c) 2014, Ramon de la Fuente <ramon@delafuente.nl> # # 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 __metaclas...
frappe/erpnext
refs/heads/develop
erpnext/controllers/taxes_and_totals.py
1
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import json import frappe, erpnext from frappe import _, scrub from frappe.utils import cint, flt, round_based_on_smallest_currency_fraction from erpnex...
SripriyaSeetharam/tacker
refs/heads/master
tacker/api/views/versions.py
29
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010-2011 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www...
styskin/pybrain
refs/heads/master
examples/unsupervised/lsh.py
26
#!/usr/bin/env python __author__ = 'Justin Bayer, bayer.justin@googlemail.com' import logging from random import shuffle from pylab import show, plot, clf from pybrain.supervised.knn.lsh.nearoptimal import MultiDimHash from scipy import random, array, dot, zeros from scipy.linalg import orth def randomRotation(d...
supercheetah/diceroller
refs/heads/master
rollenum.py
1
from enum import Enum Ops = Enum('add','sub','mul','div') Fn = Enum('constant','dice','xdice','op','var_grouping','const_grouping') StrFn = lambda x: eval('Fn.{0}'.format(x)) StrOps = lambda x: eval('Ops.{0}'.format(x)) OpsRepr = { Ops.add:'+', Ops.sub:'-', Ops.mul:'*', Ops.div:'/' }
WatanabeYasumasa/edx-platform
refs/heads/gacco2/master
i18n/tests/test_segment.py
24
"""Test i18n/segment.py""" import os.path import shutil import unittest from path import path import polib from i18n.segment import segment_pofile HERE = path(__file__).dirname() TEST_DATA = HERE / "data" WORK = HERE / "work" class SegmentTest(unittest.TestCase): """Test segment_pofile.""" def setUp(sel...
wangjun/pyload
refs/heads/stable
module/plugins/crypter/LofCc.py
2
# -*- coding: utf-8 -*- from module.plugins.internal.DeadCrypter import DeadCrypter class LofCc(DeadCrypter): __name__ = "LofCc" __type__ = "container" __pattern__ = r"http://lof.cc/(.*)" __version__ = "0.21" __description__ = """lof.cc Plugin""" __author_name__ = ("mkaay") __author_mail_...
jusdng/odoo
refs/heads/8.0
addons/mrp_byproduct/mrp_byproduct.py
150
# -*- 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...
alexryndin/ambari
refs/heads/branch-adh-1.5
ambari-server/src/main/resources/stacks/BigInsights/4.2.5/hooks/after-INSTALL/scripts/hook.py
4
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
NicoVarg99/daf-recipes
refs/heads/master
ckan/ckan/ckanext-harvest/ckanext/harvest/tests/test_action.py
1
import json import factories import unittest from nose.tools import assert_equal, assert_raises from nose.plugins.skip import SkipTest try: from ckan.tests import factories as ckan_factories from ckan.tests.helpers import (_get_test_app, reset_db, FunctionalTestBase, assert_...
agarbuno/deepdish
refs/heads/master
deepdish/parallel/mpi.py
2
from __future__ import division, print_function, absolute_import import sys import itertools as itr import numpy as np __all__ = ['rank', 'imap_unordered', 'imap', 'starmap_unordered', 'starmap', 'main'] # Global set of workers - initialized a map function is first called _g_available_workers = None _g_i...
openstack/networking-l2gw
refs/heads/master
networking_l2gw/tests/unit/services/l2gateway/test_agent_scheduler.py
1
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # 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/LICEN...
MXWXZ/DuiMini
refs/heads/master
thirdpart/googletest/googletest/test/googletest-param-test-invalid-name1-test.py
122
#!/usr/bin/env python # # Copyright 2015 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 of...
stanchan/jenkins-job-builder
refs/heads/master
tests/macros/__init__.py
12133432
pepetreshere/odoo
refs/heads/patch-2
addons/website/models/website_rewrite.py
9
from odoo import models, fields, api, _ from odoo.exceptions import AccessDenied, ValidationError import logging _logger = logging.getLogger(__name__) class WebsiteRoute(models.Model): _rec_name = 'path' _name = 'website.route' _description = "All Website Route" _order = 'path' path = fields.Cha...
anryko/ansible
refs/heads/devel
test/units/modules/network/fortios/test_fortios_facts.py
20
# 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...