repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
ahachete/gpdb
refs/heads/master
gpMgmt/bin/gppylib/test/regress/test_regress_gpssh.py
17
#!/usr/bin/env python import os, signal, time, re import unittest2 as unittest import psutil from subprocess import PIPE class GpsshTestCase(unittest.TestCase): # return count of stranded ssh processes def searchForProcessOrChildren(self): euid = os.getuid() count = 0 for p in psut...
kapt/django-oscar
refs/heads/master
sites/demo/apps/shipping/migrations/__init__.py
12133432
tiagofrepereira2012/tensorflow
refs/heads/master
tensorflow/python/summary/__init__.py
12133432
geonition/auth_page
refs/heads/master
auth_page/tests.py
6666
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests that 1 + 1 a...
seann1/portfolio5
refs/heads/master
.meteor/dev_bundle/python/Tools/pynche/pyColorChooser.py
101
"""Color chooser implementing (almost) the tkColorColor interface """ import os import Main import ColorDB class Chooser: """Ask for a color""" def __init__(self, master = None, databasefile = None, initfile = None, ignore = None, ...
races1986/SafeLanguage
refs/heads/master
CEM/wiktionary/meaning.py
3
#!/usr/bin/python # -*- coding: utf-8 -*- import term import structs import re class Meaning: """ This class contains one meaning for a word or an expression. """ def __init__(self,term,definition='',etymology='',synonyms={'remark': '', 'synonyms': [{'remark': '', 'synonym': ''}]},translations={},label='...
beagles/neutron_hacking
refs/heads/neutron_oslo_messaging
neutron/tests/unit/ml2/test_agent_scheduler.py
46
# Copyright (c) 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
simonpatrick/bite-project
refs/heads/master
deps/gdata-python-client/tests/gdata_tests/spreadsheet_test.py
41
#!/usr/bin/python # # Copyright (C) 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
jabesq/home-assistant
refs/heads/dev
homeassistant/components/threshold/__init__.py
36
"""The threshold component."""
indictranstech/reciphergroup-erpnext
refs/heads/master
erpnext/manufacturing/doctype/manufacturing_settings/__init__.py
12133432
archen/django
refs/heads/master
tests/serializers_regress/__init__.py
12133432
daler/Pharmacogenomics_Prediction_Pipeline_P3
refs/heads/master
tools/__init__.py
12133432
abhattad4/Digi-Menu
refs/heads/master
django/conf/locale/bs/__init__.py
12133432
WillisXChen/django-oscar
refs/heads/master
oscar/lib/python2.7/site-packages/django/conf/locale/km/formats.py
619
# -*- 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 = 'j ខែ F ឆ្នាំ Y' TIME_FORMAT = 'G:...
SEL-Columbia/commcare-hq
refs/heads/master
corehq/ex-submodules/casexml/apps/case/xml/generator.py
1
from casexml.apps.case.xml import V1, V2, check_version, V2_NAMESPACE from xml.etree import ElementTree import logging from dimagi.utils.parsing import json_format_datetime def safe_element(tag, text=None): # shortcut for commonly used functionality # bad! copied from the phone's XML module if text: ...
fly19890211/edx-platform
refs/heads/master
common/djangoapps/util/tests/__init__.py
12133432
RichardLitt/wyrd-django-dev
refs/heads/master
tests/regressiontests/queryset_pickle/__init__.py
12133432
hurricup/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/contrib/auth/tests/models.py
318
from django.conf import settings from django.test import TestCase from django.contrib.auth.models import User, SiteProfileNotAvailable class ProfileTestCase(TestCase): fixtures = ['authtestdata.json'] def setUp(self): """Backs up the AUTH_PROFILE_MODULE""" self.old_AUTH_PROFILE_MODULE = getattr...
makinacorpus/django
refs/heads/master
tests/admin_ordering/__init__.py
12133432
matiasb/python-unidiff
refs/heads/master
tests/test_parser.py
1
# -*- coding: utf-8 -*- # The MIT License (MIT) # Copyright (c) 2014-2021 Matias Bordese # # 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 t...
fastschnell/Lawliet
refs/heads/master
lawliet/__init__.py
2
# -*- coding: utf-8 -*- from .app import Route from .handler.response import response from .handler.route_dict import tuple_dict from .tools.cache import DoCache from .tools.private_cache import PrivateCache from .tools.json_loads import str_json from .tools.requests import Requests from .handler.db import LawSession f...
munkiat/didata-mist
refs/heads/master
src/mist/io/tests/api/features/steps/general.py
7
from behave import * @when(u'I list supported providers') def list_providers(context): context.providers = context.client.supported_providers()
DavidResin/aps-aalto
refs/heads/master
stitch/image_warp.py
1
import cv2, watershed import exposure as ex import numpy as np # Convert a vector of non-homogeneous 2D points to a vector of homogenehous 2D points. def to_homogeneous(non_homo): shape = non_homo.shape return np.c_[non_homo, np.ones(shape[0])] # Convert a vector of homogeneous 2D points to a vector of non-homogene...
lifenggg/assaydata
refs/heads/master
get_NDCG_sampled_new_uniq.py
1
import math import numpy from os import path from cal_ndcg import get_ndcg if __name__ == "__main__": for rank_function in range(2): # svm_rank:0 or svm_light:1 if rank_function == 0: print 'for svm ranking \n' output_path = 'NDCG_result/svm_rank_sampled_733_0_0.02_uniq.resu...
danakj/chromium
refs/heads/master
tools/grit/grit/format/minifier.py
2
# Copyright 2016 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. """Framework for stripping whitespace and comments from resource files""" import subprocess __js_minifier = None def SetJsMinifier(minifier): global __j...
SuperStarPL/mopidy
refs/heads/develop
tests/local/test_search.py
17
from __future__ import unicode_literals import unittest from mopidy.local import search from mopidy.models import Album, Track class LocalLibrarySearchTest(unittest.TestCase): def test_find_exact_with_album_query(self): expected_tracks = [Track(album=Album(name='foo'))] tracks = [Track(), Track...
pulilab/rapidpro
refs/heads/master
temba/msgs/views.py
2
from __future__ import unicode_literals import json import six from datetime import date, timedelta from django import forms from django.conf import settings from django.core.exceptions import ValidationError from django.core.urlresolvers import reverse from django.contrib import messages from django.forms import For...
minixalpha/WatchTips
refs/heads/master
app/controllers/auth.py
1
#coding: utf-8 # Helper Functions about authority from hashlib import sha256 from hmac import HMAC import os import web from validate_email import validate_email as ve import userstate def validate_email(email_address): """ Validate Whether Email Address is legal and exists Args: email_address:...
curtisstpierre/django
refs/heads/master
django/db/models/__init__.py
239
from functools import wraps from django.core.exceptions import ObjectDoesNotExist # NOQA from django.db.models import signals # NOQA from django.db.models.aggregates import * # NOQA from django.db.models.deletion import ( # NOQA CASCADE, DO_NOTHING, PROTECT, SET, SET_DEFAULT, SET_NULL, ProtectedError, ) from d...
vadimtk/chrome4sdp
refs/heads/master
tools/telemetry/telemetry/value/list_of_scalar_values.py
3
# 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. import numbers import math from telemetry import value as value_module from telemetry.value import none_values def Variance(sample): """ Compute the pop...
ABaldwinHunter/django-clone-classic
refs/heads/master
tests/template_tests/filter_tests/test_center.py
345
from django.template.defaultfilters import center from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class CenterTests(SimpleTestCase): @setup({'center01': '{% autoescape off %}.{{ a|center:"5" }}. .{{ b|center:"5" }}.{% endautoescape %}'}) ...
mazimkhan/mbed-os
refs/heads/master
tools/dev/rpc_classes.py
68
""" mbed SDK Copyright (c) 2011-2013 ARM Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wr...
mrunge/openstack_horizon
refs/heads/master
openstack_horizon/dashboards/admin/info/tabs.py
1
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
liamw9534/mopidy
refs/heads/master
mopidy/utils/formatting.py
3
from __future__ import unicode_literals import re import unicodedata def indent(string, places=4, linebreak='\n', singles=False): lines = string.split(linebreak) if not singles and len(lines) == 1: return string for i, line in enumerate(lines): lines[i] = ' ' * places + line result = ...
jlegendary/nupic
refs/heads/master
external/linux32/lib/python2.6/site-packages/matplotlib/backends/backend_qt4agg.py
70
""" Render to qt from agg """ from __future__ import division import os, sys import matplotlib from matplotlib.figure import Figure from backend_agg import FigureCanvasAgg from backend_qt4 import QtCore, QtGui, FigureManagerQT, FigureCanvasQT,\ show, draw_if_interactive, backend_version, \ NavigationToolba...
MAPC/warren-st-development-database
refs/heads/master
development/templatetags/__init__.py
12133432
lz1988/django-web2015
refs/heads/master
tests/modeltests/mutually_referential/__init__.py
12133432
gauravbose/digital-menu
refs/heads/master
digimenu2/django/conf/locale/ga/__init__.py
12133432
cecep-edu/edx-platform
refs/heads/eucalyptus.2
cms/djangoapps/xblock_config/__init__.py
12133432
google/llvm-propeller
refs/heads/bb-clusters
llvm/utils/llvm-build/llvmbuild/util.py
143
import os import sys def _write_message(kind, message): program = os.path.basename(sys.argv[0]) sys.stderr.write('%s: %s: %s\n' % (program, kind, message)) note = lambda message: _write_message('note', message) warning = lambda message: _write_message('warning', message) error = lambda message: _write_message...
srimai/odoo
refs/heads/8.0
addons/hw_escpos/controllers/main.py
31
# -*- coding: utf-8 -*- import commands import logging import simplejson import os import os.path import io import base64 import openerp import time import random import math import md5 import openerp.addons.hw_proxy.controllers.main as hw_proxy import pickle import re import subprocess import traceback try: from...
ashhher3/invenio
refs/heads/master
modules/websubmit/lib/functions/Send_APP_Mail.py
24
## This file is part of Invenio. ## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio 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...
petteyg/intellij-community
refs/heads/master
python/helpers/profiler/thrift/protocol/__init__.py
259
# # 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...
jasimpson/gnuradio-jasimpson
refs/heads/master
gnuradio-examples/python/usrp/usrp_wfm_rcv2_nogui.py
9
#!/usr/bin/env python # # Copyright 2005,2006,2007 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at you...
ido-ran/ran-smart-frame2
refs/heads/master
web/server/lib/cloudstorage/common.py
129
# Copyright 2012 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 by applicable law or ag...
neerajvashistha/pa-dude
refs/heads/master
lib/python2.7/site-packages/nltk/six.py
2715
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2015 Benjamin Peterson # # 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 with...
utkarshx/mosquitto
refs/heads/master
test/broker/03-publish-qos1.py
18
#!/usr/bin/env python # Test whether a PUBLISH to a topic with QoS 1 results in the correct PUBACK packet. import subprocess import socket import time import inspect, os, sys # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder cmd_subfolder = os.path.realpath(os.path.abspath(os.path...
Hobsons/hippo
refs/heads/master
data_sources/sqs.py
1
import boto3 import logging from data_sources.hippo_base import HippoDataSource class SqsQueue(HippoDataSource): namespace = 'sqs' label = 'SQS Queue' inputs = { 'awskey': {'input':'text','label':'AWS Key Id'}, 'awssecret': {'input':'text','label':'AWS Secret'}, 'awsregion': {'inpu...
kr41/ggrc-core
refs/heads/develop
src/ggrc_workflows/migrations/versions/20140806232046_520b31514bd2_add_relative_dates.py
7
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Add relative dates Revision ID: 520b31514bd2 Revises: 32221e9f330c Create Date: 2014-08-06 23:20:46.059979 """ # revision identifiers, used by Alembic. revision = '520b31514bd2' down_revision = '32221...
Innovahn/odoo.old
refs/heads/master
openerp/service/wsgi_server.py
335
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011-2012 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
caroso1222/wapy
refs/heads/master
wapy/api.py
1
import requests import json try: # Python 2.6-2.7 from HTMLParser import HTMLParser except ImportError: # Python 3 from html.parser import HTMLParser h = HTMLParser() API_BASE_URL='http://api.walmartlabs.com/v1/' class WalmartException(Exception): """Base Class for Walmart Api Exceptions. """ ...
tchernomax/ansible
refs/heads/devel
test/integration/targets/module_utils/library/test_override.py
263
#!/usr/bin/python from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.facts import data results = {"data": data} AnsibleModule(argument_spec=dict()).exit_json(**results)
ales-erjavec/orange-canvas
refs/heads/master
orangecanvas/gui/tests/test_framelesswindow.py
1
from AnyQt.QtCore import QTimer from ..framelesswindow import FramelessWindow from ..test import QAppTestCase class TestFramelessWindow(QAppTestCase): def test_framelesswindow(self): window = FramelessWindow() window.show() def cycle(): window.setRadius((window.radius() + 3) ...
bgilbert/scanvark
refs/heads/master
scanvark/save.py
1
# # Scanvark -- a Gtk-based batch scanning program # # Copyright (c) 2012 Benjamin Gilbert # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the h...
angdraug/nova
refs/heads/master
nova/objects/base.py
2
# Copyright 2013 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 agree...
zzzzzsh/pyspider
refs/heads/master
pyspider/webui/bench_test.py
82
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<roy@binux.me> # http://binux.me # Created on 2014-12-08 22:31:17 import random try: from urllib import urlencode except ImportError: from urllib.parse import urlencode from flask import req...
prepare/TestWeasyPrint
refs/heads/master
weasyprint/layout/percentages.py
4
# coding: utf8 """ weasyprint.layout.percentages ----------------------------- Resolve percentages into fixed values. :copyright: Copyright 2011-2014 Simon Sapin and contributors, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import division, unicode_literals from ..f...
Lekanich/intellij-community
refs/heads/master
python/testData/refactoring/pullup/moveInstanceAttributesLeaveEmptyInit.py
80
class Parent(object): C = 12 def foo(self): pass class Child(Parent, object): def __init__(self): self.foo = 12 AC = 11 def foo(self): pass class Bar(object): pass
siouka/dmind
refs/heads/master
plugin.video.genesis/service.py
5
# -*- coding: utf-8 -*- ''' Genesis Add-on Copyright (C) 2015 lambda 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 ...
vauxoo-dev/server-tools
refs/heads/8.0
scheduler_error_mailer/__openerp__.py
23
# -*- encoding: utf-8 -*- ############################################################################## # # Scheduler Error Mailer module for OpenERP # Copyright (C) 2012-2013 Akretion (http://www.akretion.com/) # @author: Sébastien Beau <sebastien.beau@akretion.com> # @author David Beal <bealdavid@gmail.c...
ovnicraft/odoo
refs/heads/8.0
addons/account/wizard/account_report_common_journal.py
385
# -*- 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...
opencb/opencga
refs/heads/develop
opencga-client/src/main/python/pyopencga/rest_clients/study_client.py
1
""" WARNING: AUTOGENERATED CODE This code was generated by a tool. Autogenerated on: 2021-05-21 14:06:25 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. """ from pyopencga.rest_clients._pare...
NL66278/OCB
refs/heads/8.0
addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/rpc.py
381
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
rkawale/Internalhr-frappe
refs/heads/develop
frappe/core/doctype/outgoing_email_settings/__init__.py
12133432
emijrp/pywikibot-core
refs/heads/master
scripts/selflink.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- """ This bot searches for selflinks and allows removing them. These command line parameters can be used to specify which pages to work on: &params; -always Unlink always but don't prompt you for each replacement. ATTENTION: Use this with care! ""...
ytjiang/django
refs/heads/master
tests/admin_views/models.py
27
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import os import tempfile from django.contrib.auth.models import User from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from django.core.f...
2ndy/RaspIM
refs/heads/master
usr/lib/python2.7/dist-packages/chardet/big5freq.py
2
../../../../share/pyshared/chardet/big5freq.py
pkilambi/ceilometer
refs/heads/master
ceilometer/orchestration/notifications.py
2
# 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...
Verbalist/electrum-server
refs/heads/master
src/stratum_tcp.py
1
import json import Queue as queue import socket import select import threading import time import sys from processor import Session, Dispatcher from utils import print_log, logger READ_ONLY = select.POLLIN | select.POLLPRI | select.POLLHUP | select.POLLERR READ_WRITE = READ_ONLY | select.POLLOUT WRITE_ONLY = select.P...
andela-earinde/bellatrix-py
refs/heads/master
app/js/lib/lib/modules/email/parser.py
392
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw, Thomas Wouters, Anthony Baxter # Contact: email-sig@python.org """A parser of RFC 2822 and MIME email messages.""" __all__ = ['Parser', 'HeaderParser'] import warnings from cStringIO import StringIO from email.feedparser import FeedParser ...
CVML/scikit-learn
refs/heads/master
sklearn/covariance/tests/test_covariance.py
142
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Gael Varoquaux <gael.varoquaux@normalesup.org> # Virgile Fritsch <virgile.fritsch@inria.fr> # # License: BSD 3 clause import numpy as np from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_array_alm...
Edraak/edx-platform
refs/heads/master
lms/djangoapps/edraak_university/migrations/0002_university_id_setting.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import xmodule_django.models class Migration(migrations.Migration): dependencies = [ ('course_groups', '0001_initial'), ('edraak_university', '0001_initial'), ] operations = [ ...
fzimmermann89/pyload
refs/heads/stable
module/plugins/crypter/MultiuploadCom.py
1
# -*- coding: utf-8 -*- from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo class MultiuploadCom(DeadCrypter): __name__ = "MultiuploadCom" __type__ = "crypter" __version__ = "0.04" __status__ = "stable" __pattern__ = r'http://(?:www\.)?multiupload\.(com|nl)/\w+' ...
slyphon/pants
refs/heads/master
src/python/pants/backend/python/tasks/checkstyle/import_order.py
6
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import ast import os...
RipcordSoftware/avancedb-replication-monitor
refs/heads/master
ui/listview_models/replication_tasks_listview_model.py
2
import time from src.listview_model import ListViewModel class ReplicationTasksListViewModel(ListViewModel): def __init__(self): cols = ( ListViewModel.ColDefinition('source', str), ListViewModel.ColDefinition('target', str), ListViewModel.ColDefinition(lambda row: '',...
jxta/cc
refs/heads/master
vendor/boto/boto/manage/server.py
3
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010 Chris Moyer http://coredumped.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, incl...
prutseltje/ansible
refs/heads/devel
test/units/modules/network/nxos/test_nxos_pim_rp_address.py
57
# (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 dis...
EvenStrangest/tensorflow
refs/heads/master
tensorflow/python/training/input_test.py
2
# 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...
uglyboxer/linear_neuron
refs/heads/master
net-p3/lib/python3.5/site-packages/scipy/io/matlab/mio5_params.py
57
''' Constants and classes for matlab 5 read and write See also mio5_utils.pyx where these same constants arise as c enums. If you make changes in this file, don't forget to change mio5_utils.pyx ''' from __future__ import division, print_function, absolute_import import numpy as np from .miobase import convert_dtyp...
meghana1995/sympy
refs/heads/master
sympy/polys/tests/test_monomials.py
83
"""Tests for tools and arithmetics for monomials of distributed polynomials. """ from sympy.polys.monomials import ( itermonomials, monomial_count, monomial_mul, monomial_div, monomial_gcd, monomial_lcm, monomial_max, monomial_min, monomial_divides, Monomial, ) from sympy.polys.polyerrors impo...
houglum/apitools
refs/heads/master
apitools/base/py/testing/mock.py
6
# # Copyright 2015 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
yanheven/nova
refs/heads/master
nova/tests/unit/virt/hyperv/test_rdpconsoleutilsv2.py
83
# Copyright 2013 Cloudbase Solutions Srl # # 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 ...
nmayorov/scipy
refs/heads/master
scipy/cluster/tests/hierarchy_test_data.py
47
from numpy import array Q_X = array([[5.26563660e-01, 3.14160190e-01, 8.00656370e-02], [7.50205180e-01, 4.60299830e-01, 8.98696460e-01], [6.65461230e-01, 6.94011420e-01, 9.10465700e-01], [9.64047590e-01, 1.43082200e-03, 7.39874220e-01], [1.08159060e-01, 5.53028790e-...
rohitwaghchaure/vestasi-frappe
refs/heads/develop
frappe/core/doctype/print_format/print_format.py
15
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe import frappe.utils from jinja2 import TemplateSyntaxError from frappe.model.document import Document class PrintFormat(Document): def validate(self): if sel...
avsaj/rtpmidi
refs/heads/master
rtpmidi/protocols/rtp/nat.py
1
# Code for NATs and the like. Also includes code for determining local IP # address (suprisingly tricky, in the presence of STUPID STUPID STUPID # networking stacks) from twisted.internet import defer from twisted.internet.protocol import DatagramProtocol import socket import random from twisted.python import log fro...
Glignos/inspire-next
refs/heads/master
inspirehep/modules/workflows/serializers/schemas/json.py
3
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2014-2017 CERN. # # INSPIRE 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 ...
joebos/django-allauth
refs/heads/master
allauth/socialaccount/providers/foursquare/tests.py
68
from allauth.socialaccount.tests import create_oauth2_tests from allauth.tests import MockedResponse from allauth.socialaccount.providers import registry from .provider import FoursquareProvider class FoursquareTests(create_oauth2_tests(registry.by_id(FoursquareProvider.id))): def get_mocked_response(self): ...
Tao-Ma/gpdb
refs/heads/master
gpMgmt/bin/gppylib/commands/__init__.py
12133432
rogerhu/django
refs/heads/master
django/contrib/formtools/tests/__init__.py
12133432
emakis/erpnext
refs/heads/develop
erpnext/regional/print_format/__init__.py
12133432
tnaganawa/execjson
refs/heads/master
web/mysite/app1/migrations/__init__.py
12133432
FlorianLudwig/odoo
refs/heads/8.0
addons/sale_stock/report/sale_report.py
231
# -*- 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...
Lh4cKg/sl4a
refs/heads/master
python-build/python-libs/gdata/src/gdata/tlslite/VerifierDB.py
359
"""Class for storing SRP password verifiers.""" from utils.cryptomath import * from utils.compat import * import mathtls from BaseDB import BaseDB class VerifierDB(BaseDB): """This class represent an in-memory or on-disk database of SRP password verifiers. A VerifierDB can be passed to a server handshake...
ProfessorKaos64/openlierox
refs/heads/0.59
tools/DedicatedServerVideo/gdata/alt/__init__.py
271
#!/usr/bin/python # # Copyright (C) 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
diogoosorio/flask-sapo-ink
refs/heads/master
setup.py
1
#!/usr/env/python # -*- coding: utf-8 -*- from setuptools import setup setup( name='Flask-Ink', version='3.1.10', url='https://github.com/diogoosorio/flask-sapo-ink', license='MIT', author='Diogo Osório', author_email='diogo.g.osorio@gmail.com', description='Easily integrate Sapo Ink\'s fr...
jairideout/qiime2
refs/heads/master
qiime2/plugin/tests/test_plugin.py
2
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2017, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
dataxu/ansible
refs/heads/dx-stable-2.5
lib/ansible/modules/windows/win_whoami.py
16
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # this is a windows documentation stub. actual code lives in the .ps1 # file of the same name ANSIBLE_METADATA = {'metadata_version': '1.1', ...
vhbit/rust-docset
refs/heads/master
docset/rust/actions.py
1
from docset.actions import cached_html, update_toc from docset.scrape import scrape import index_rules import logging import os from rust_doc import guide_title import toc_rules from types import to_dash_type log = logging.getLogger('docset.rust') # Creates a full qualified name based on prefix and name def make_fqn...
dsolimando/Hot
refs/heads/master
hot-jython-modules/src/main/resources/_LWPCookieJar.py
267
"""Load / save to libwww-perl (LWP) format files. Actually, the format is slightly extended from that used by LWP's (libwww-perl's) HTTP::Cookies, to avoid losing some RFC 2965 information not recorded by LWP. It uses the version string "2.0", though really there isn't an LWP Cookies 2.0 format. This indicates that ...
sloria/osf.io
refs/heads/develop
addons/base/tests/serializers.py
26
import abc import mock from framework.auth import Auth from nose.tools import (assert_equal, assert_false, assert_in, assert_is_not_none, assert_raises, assert_true) from osf_tests.factories import ProjectFactory, AuthUserFactory from tests.utils import mock_auth from website.util import web_ur...