repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
maxamillion/ansible
refs/heads/devel
test/units/module_utils/basic/test_run_command.py
17
# -*- 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) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type import errno from itertools import product fr...
lucalianas/ProMort
refs/heads/develop
promort/slides_manager/management/commands/link_cases_to_lab.py
2
# Copyright (c) 2019, CRS4 # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribu...
tucan21/python_zadania
refs/heads/master
test/test_fill_contacts.py
1
from model.contact import Contact def test_fill_contacts(app,db): contacts_ui = app.contact.get_contact_list() contacts_db = db.get_contact_list() assert sorted(contacts_ui, key=Contact.id_or_max) == sorted(contacts_db, key=Contact.id_or_max)
FranMachio/plugin.video.Machio.fran
refs/heads/master
servers/servertools.py
24
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Utilidades para detectar vídeos de los diferentes conectores # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ #LvX Edited Patched i...
keisuke-umezawa/chainer
refs/heads/master
tests/chainer_tests/function_hooks_tests/test_timer.py
3
import os import time import unittest import numpy import six import chainer from chainer.backends import cuda from chainer import function_hooks from chainer import functions from chainer.functions.math import basic_math from chainer import testing from chainer.testing import attr try: _get_time = time.perf_cou...
Tagar/incubator-airflow
refs/heads/master
tests/contrib/hooks/test_slack_webhook_hook.py
15
# -*- coding: utf-8 -*- # # 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 #...
xyb/micropython
refs/heads/master
tests/basics/del_local.py
118
# delete local then try to reference it def f(): x = 1 y = 2 print(x, y) del x print(y) try: print(x) except NameError: print("NameError"); f() # delete local then try to delete it again def g(): x = 3 y = 4 print(x, y) del x print(y) try: del...
haydnKing/waistcoat
refs/heads/master
test/postprocess_test.py
1
import unittest, testcases, tempfile, shutil, os.path from waistcoat import postprocess, statistics DATA_DIR = os.path.join(os.path.split(__file__)[0], "data/postprocess/") class TestPostprocess(testcases.TestSamfile): def setUp(self): self.tempdir = tempfile.mkdtemp(prefix='postprocesstest') statistics.recordi...
openhdf/enigma2-wetek
refs/heads/master
lib/python/Screens/PVRState.py
70
from Screen import Screen from Components.Label import Label from Components.Pixmap import Pixmap, MultiPixmap class PVRState(Screen): def __init__(self, session): Screen.__init__(self, session) self["eventname"] = Label() self["state"] = Label() self["speed"] = Label() self["statusicon"] = MultiPixmap() ...
mostafa-z/Gabriel_MM
refs/heads/stockbase
tools/perf/scripts/python/sctop.py
11180
# system call top # (c) 2010, Tom Zanussi <[email protected]> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
chensuchun/fas
refs/heads/master
fas/openid_samadhi.py
3
# -*- coding: utf-8 -*- # Copyright 2008 by Jeffrey C. Ollie # Copyright 2009 by Red Hat, Inc. # # This file is part of Samadhi. # # Samadhi 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...
adam111316/SickGear
refs/heads/master
lib/hachoir_parser/archive/rpm.py
95
""" RPM archive parser. Author: Victor Stinner, 1st December 2005. """ from hachoir_parser import Parser from hachoir_core.field import (FieldSet, ParserError, UInt8, UInt16, UInt32, UInt64, Enum, NullBytes, Bytes, RawBytes, SubFile, Character, CString, String) from hachoir_core.endian import BIG_ENDIAN f...
Sweetgrassbuffalo/ReactionSweeGrass-v2
refs/heads/master
.meteor/local/dev_bundle/python/Lib/test/test_gzip.py
19
"""Test script for the gzip module. """ import unittest from test import test_support import os import io import struct gzip = test_support.import_module('gzip') data1 = """ int length=DEFAULTALLOC, err = Z_OK; PyObject *RetVal; int flushmode = Z_FINISH; unsigned long start_total_out; """ data2 = """/* zlibm...
emanuelschuetze/OpenSlides
refs/heads/master
tests/integration/motions/test_views.py
2
from django.test.client import Client from openslides.core.config import config from openslides.motions.models import Motion from openslides.utils.test import TestCase class AnonymousRequests(TestCase): """ Tests requests from the anonymous user. """ def setUp(self): self.client = Client() ...
LoicTouzard/MapIf
refs/heads/master
core/modules/emails.py
2
#!/usr/bin/env python3 # -!- encoding:utf8 -!- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # file: emails.py # date: 2017-09-22 # authors: david.wobrock, paul.dautry, ... # purpose: # Mailing module based on Elasticemail API # license: # MapIF - Where are INSA de Lyon...
bubenkoff/Arkestra
refs/heads/develop
example/example/arkestra_settings.py
2
# Before we do anything else, get some default settings built into Arkestra. # They are not just Arkestra settings, but settings for other applications # that Arkestra requires to be just so. # These are the only settings you really need. # If you need to modify other aspects of Arkestra's behaviour, see the # settin...
ychfan/tensorflow
refs/heads/master
tensorflow/python/util/protobuf/compare.py
113
# 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...
avanov/django
refs/heads/master
tests/template_backends/apps/good/templatetags/subpackage/tags.py
1426
from django.template import Library register = Library()
Acidburn0zzz/servo
refs/heads/master
tests/wpt/webgl/tests/deqp/functional/gles3/textureshadow/textureshadow_test_generator.py
51
#!/usr/bin/env python # Copyright (c) 2016 The Khronos Group Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and/or associated documentation files (the # "Materials"), to deal in the Materials without restriction, including # without limitation the rights to use...
catherinezucker/dustcurve
refs/heads/master
dustcurve/__init__.py
1
import numpy as np def fillerfunc(): return 'This is a filler function'
bperreault-va/eloworld
refs/heads/master
src/lib/werkzeug/__init__.py
26
# -*- coding: utf-8 -*- """ werkzeug ~~~~~~~~ Werkzeug is the Swiss Army knife of Python web development. It provides useful classes and functions for any WSGI application to make the life of a python web developer much easier. All of the provided classes are independent from each other so yo...
Laimiux/mydeatree
refs/heads/master
django/dispatch/__init__.py
571
"""Multi-consumer multi-producer dispatching mechanism Originally based on pydispatch (BSD) http://pypi.python.org/pypi/PyDispatcher/2.0.1 See license.txt for original license. Heavily modified for Django's purposes. """ from django.dispatch.dispatcher import Signal, receiver
msabramo/ansible
refs/heads/devel
lib/ansible/modules/network/nxos/nxos_snmp_community.py
19
#!/usr/bin/python # # 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 distribut...
lukeiwanski/tensorflow-opencl
refs/heads/master
tensorflow/python/platform/sysconfig.py
74
# 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...
txm/make-good
refs/heads/master
django/contrib/localflavor/pl/forms.py
273
""" Polish-specific form helpers """ import re from django.forms import ValidationError from django.forms.fields import Select, RegexField from django.utils.translation import ugettext_lazy as _ from django.core.validators import EMPTY_VALUES class PLProvinceSelect(Select): """ A select widget with list of P...
tri-CSI/Bioinfo
refs/heads/master
projects/mirem/server_additional_scripts/populate_tables.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- # # Load hsa and mmu miRNA database on to sqlite. # # Author: TRAN MINH TRI # Date: 26 Nov 2015 # CREATE_SCRIPT=''' DROP TABLE IF EXISTS Mirna; CREATE TABLE Mirna ( id INTEGER PRIMARY KEY AUTOINCREMENT, mirna TEXT UNIQUE, sequence TEXT ); DROP TABLE IF EXIST...
AnishShah/tensorflow
refs/heads/master
tensorflow/python/platform/benchmark.py
10
# 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...
mozillazg/Unidecode
refs/heads/master
unidecode/x000.py
113
data = ( # Code points u+007f and below are equivalent to ASCII and are handled by a # special case in the code. Hence they are not present in this table. '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '...
hehongliang/tensorflow
refs/heads/master
tensorflow/python/saved_model/constants.py
2
# 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...
ddayguerrero/blogme
refs/heads/master
flask/lib/python3.4/site-packages/sqlalchemy/dialects/mysql/pymysql.py
59
# mysql/pymysql.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: mysql+pymysql :name: PyMySQL :dbapi: pymysql :connect...
jmesteve/medical
refs/heads/master
openerp/oemedical/web_doc_oemedical/controllers/main.py
5
# -*- coding: utf-8 -*- import ast import base64 import csv import glob import itertools import logging import operator import datetime import hashlib import os import re import simplejson import time import urllib2 import xmlrpclib import zlib from xml.etree import ElementTree from cStringIO import StringIO import bab...
BertieJim/thefuck
refs/heads/master
tests/rules/test_heroku_not_command.py
16
import pytest from tests.utils import Command from thefuck.rules.heroku_not_command import match, get_new_command def suggest_stderr(cmd): return ''' ! `{}` is not a heroku command. ! Perhaps you meant `logs`, `pg`. ! See `heroku help` for a list of available commands.'''.format(cmd) no_sugge...
ingted/voltdb
refs/heads/master
tests/test_apps/adhocbenchmark/scripts/generate.py
7
#!/usr/bin/env python # This file is part of VoltDB. # Copyright (C) 2008-2015 VoltDB Inc. # # 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 limitati...
ity/pants
refs/heads/master
src/python/pants/option/errors.py
12
# coding=utf-8 # Copyright 2014 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) from pants.option.ar...
raymondxyang/tensorflow
refs/heads/master
tensorflow/compiler/aot/tests/make_test_graphs.py
43
# 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...
resmo/ansible
refs/heads/devel
lib/ansible/modules/remote_management/redfish/redfish_info.py
6
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017-2018 Dell EMC Inc. # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'status': ['preview'], ...
twoporeguys/librpc
refs/heads/master
tools/rpcdoc/librpc_doc/__init__.py
1
#!/usr/bin/env python3 # # Copyright 2017 Two Pore Guys, Inc. # All rights reserved # # Redistribution and use in source and binary forms, with or without # modification, are permitted providing that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, thi...
Snergster/virl-salt
refs/heads/master
virl/files/virl_setup.py
1
#! /usr/bin/env python # CLI menu for VIRL setup # Copyright (c) 2017, Cisco Systems, Inc. # All rights reserved. from __future__ import print_function import sys import subprocess import signal import os import datetime import netaddr import configparser import re import tempfile import shutil VINSTALL_CFG = '/etc...
SoftwareMaven/django
refs/heads/master
tests/postgres_tests/test_functions.py
351
from datetime import datetime from time import sleep from django.contrib.postgres.functions import TransactionNow from . import PostgreSQLTestCase from .models import NowTestModel class TestTransactionNow(PostgreSQLTestCase): def test_transaction_now(self): """ The test case puts everything und...
mhbu50/erpnext
refs/heads/develop
erpnext/shopping_cart/utils.py
48
# 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 import frappe.defaults from erpnext.shopping_cart.doctype.shopping_cart_settings.shopping_cart_settings import is_cart_enabled def show_...
skycucumber/restful
refs/heads/master
python/venv/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.py
168
# -*- coding: utf-8 -*- # # Copyright (C) 2012 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """Access to Python's configuration information.""" import codecs import os import re import sys from os.path import pardir, realpath try: import configparser except ImportError: import Conf...
eleonrk/SickRage
refs/heads/master
lib/future/backports/_markupbase.py
84
"""Shared support for scanning document type declarations in HTML and XHTML. Backported for python-future from Python 3.3. Reason: ParserBase is an old-style class in the Python 2.7 source of markupbase.py, which I suspect might be the cause of sporadic unit-test failures on travis-ci.org with test_htmlparser.py. The...
ctbrizhp/swift1.9.2
refs/heads/master
test/unit/common/middleware/test_acl.py
12
# Copyright (c) 2010-2012 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
kasparg/lawcats
refs/heads/master
libs/bs4/tests/test_lxml.py
115
"""Tests to ensure that the lxml tree builder generates good trees.""" import re import warnings try: import lxml.etree LXML_PRESENT = True LXML_VERSION = lxml.etree.LXML_VERSION except ImportError, e: LXML_PRESENT = False LXML_VERSION = (0,) if LXML_PRESENT: from bs4.builder import LXMLTreeB...
WarboyX/MK4_Kernel
refs/heads/master
tools/perf/python/twatch.py
7370
#! /usr/bin/python # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface # Copyright (C) 2011 Arnaldo Carvalho de Melo <[email protected]> # # This application is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License...
esri-es/awesome-arcgis
refs/heads/master
node_modules/gitbook/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py
1452
#!/usr/bin/env python # Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys # Make sure we're using the version of pylib in this repo, not one installed # elsewhere on the system. sys.path.inser...
TileHalo/servo
refs/heads/master
tests/wpt/css-tests/tools/pywebsocket/src/test/mux_client_for_testing.py
457
#!/usr/bin/env python # # Copyright 2012, 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...
shawnferry/ansible
refs/heads/devel
v1/tests/TestModuleUtilsBasic.py
103
import os import tempfile import unittest from nose.tools import raises from nose.tools import timed from ansible import errors from ansible.module_common import ModuleReplacer from ansible.module_utils.basic import heuristic_log_sanitize from ansible.utils import checksum as utils_checksum TEST_MODULE_DATA = """ fr...
rogers0/namebench
refs/heads/master
third_party/__init__.py
176
import os.path import sys # This bit of evil should inject third_party into the path for relative imports. sys.path.insert(1, os.path.dirname(__file__))
PrincetonUniversity/AdvNet-OF_Scripts
refs/heads/master
evaluation/switch/flowmod_test/pox/pox/messenger/log_service.py
26
# Copyright 2011,2012 James McCauley # # This file is part of POX. # # POX 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. # # POX is d...
Archassault/archassaultweb
refs/heads/master
releng/urls.py
2
from django.conf.urls import include, patterns from .views import ReleaseListView, ReleaseDetailView feedback_patterns = patterns('releng.views', (r'^$', 'test_results_overview', {}, 'releng-test-overview'), (r'^submit/$', 'submit_test_result', {}, 'releng-te...
romain-li/edx-platform
refs/heads/master
common/test/acceptance/tests/lms/test_lms.py
1
# -*- coding: utf-8 -*- """ End-to-end tests for the LMS. """ from datetime import datetime, timedelta from flaky import flaky from textwrap import dedent from unittest import skip from nose.plugins.attrib import attr import pytz import urllib from bok_choy.promise import EmptyPromise from common.test.acceptance.tests...
ka7eh/django-oscar
refs/heads/master
src/oscar/apps/dashboard/pages/config.py
58
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class PagesDashboardConfig(AppConfig): label = 'pages_dashboard' name = 'oscar.apps.dashboard.pages' verbose_name = _('Pages dashboard')
chishaku/alembic
refs/heads/master
tests/test_offline_environment.py
3
from alembic.testing.fixtures import TestBase, capture_context_buffer from alembic import command, util from alembic.testing import assert_raises_message from alembic.testing.env import staging_env, _no_sql_testing_config, \ three_rev_fixture, clear_staging_env, env_file_fixture import re a = b = c = None clas...
xionzz/earthquake
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/genshistream.py
1730
from __future__ import absolute_import, division, unicode_literals from genshi.core import QName from genshi.core import START, END, XML_NAMESPACE, DOCTYPE, TEXT from genshi.core import START_NS, END_NS, START_CDATA, END_CDATA, PI, COMMENT from . import _base from ..constants import voidElements, namespaces class ...
ionelmc/python-cogen
refs/heads/master
cogen/core/__init__.py
4
''' This is a library for network oriented, coroutine based programming. The interfaces and events/operations aim to mimic some of the regular thread and socket features. cogen uses the `enhanced generators <http://www.python.org/dev/peps/pep-0342/>`_ in python 2.5. These generators are bidirectional: they allow...
2013Commons/HUE-SHARK
refs/heads/master
desktop/core/ext-py/Django-1.2.3/build/lib.linux-i686-2.7/django/contrib/sessions/backends/base.py
90
import base64 import os import random import sys import time from datetime import datetime, timedelta try: import cPickle as pickle except ImportError: import pickle from django.conf import settings from django.core.exceptions import SuspiciousOperation from django.utils.hashcompat import md5_constructor # Us...
berkeleydeeprlcourse/homework
refs/heads/master
hw5/meta/replay_buffer.py
1
import numpy as np class ReplayBuffer(object): ''' minimalistic replay buffer a sample consists of - observation - action - reward - terminal - hidden state for recurrent policy it is memory inefficient to store windowed observations this way so do not run on tasks with...
xodus7/tensorflow
refs/heads/master
tensorflow/python/ops/clip_ops.py
3
# 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...
kjagoo/wger_stark
refs/heads/master
wger/manager/tests/test_workout.py
2
# This file is part of wger Workout Manager. # # wger Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # wger W...
lucuma/sqlalchemy-wrapper
refs/heads/master
sqla_wrapper/__init__.py
1
from .core import SQLAlchemy # noqa from .base_query import BaseQuery # noqa from .model import Model, DefaultMeta # noqa from .paginator import Paginator, sanitize_page_number # noqa __version__ = '2.0.1'
ziel5122/rl-cache
refs/heads/master
cache/test_opt.py
1
from opt import OPTCache from unittest import main, TestCase class TestConstructor(TestCase): def test_init_error(self): self.assertRaises(TypeError, OPTCache, 'error not thrown with no args') def test_init(self): maxsize = 3 accesses = [3, 4, 5] cache = OPTCache(maxsize, acce...
elfnor/sverchok
refs/heads/master
node_scripts/SN2-templates/test.py
4
class MyScript( SvScript): inputs = [("s" , "List")] outputs = [("s", "Sum")] def process(self): data = self.node.inputs[0].sv_get() out = [] for obj in data: out.append(sum(obj)) self.node.outputs[0].sv_set(out)
openmicroscopy/snoopycrimecop
refs/heads/master
test/integration/test_check_milestone.py
2
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2013 University of Dundee & Open Microscopy Environment # All Rights Reserved. # # 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; ...
rockneurotiko/django
refs/heads/master
django/contrib/sessions/backends/db.py
227
import logging from django.contrib.sessions.backends.base import CreateError, SessionBase from django.core.exceptions import SuspiciousOperation from django.db import IntegrityError, router, transaction from django.utils import timezone from django.utils.encoding import force_text from django.utils.functional import c...
francbartoli/geonode
refs/heads/master
geonode/social/views.py
2
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
cpcloud/numpy
refs/heads/master
numpy/polynomial/tests/test_hermite_e.py
123
"""Tests for hermite_e module. """ from __future__ import division, absolute_import, print_function import numpy as np import numpy.polynomial.hermite_e as herme from numpy.polynomial.polynomial import polyval from numpy.testing import ( TestCase, assert_almost_equal, assert_raises, assert_equal, assert_, run...
bjolivot/ansible
refs/heads/devel
lib/ansible/compat/__init__.py
332
# (c) 2014, Toshio Kuratomi <[email protected]> # # 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...
pcu4dros/pandora-core
refs/heads/master
workspace/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/tarfile.py
422
#------------------------------------------------------------------- # tarfile.py #------------------------------------------------------------------- # Copyright (C) 2002 Lars Gustaebel <[email protected]> # All rights reserved. # # Permission is hereby granted, free of charge, to any person # obtaining a copy ...
ebuchman/daoist_protocol
refs/heads/master
features/steps/nibble_packing.py
4
from behave import register_type from .utils import parse_py from pyethereum import trie register_type(Py=parse_py) @given(u'nibbles: {src_nibbles:Py}') # noqa def step_impl(context, src_nibbles): context.src_nibbles = src_nibbles @when(u'append a terminator') # noqa def step_impl(context): context.src_...
darkleons/odoo
refs/heads/master
addons/Back/point_of_sale/controllers/main.py
43
# -*- coding: utf-8 -*- import logging import simplejson import os import openerp import time import random from openerp import http from openerp.http import request from openerp.addons.web.controllers.main import module_boot, login_redirect _logger = logging.getLogger(__name__) class PosController(http.Controller)...
zeqing-guo/CaptchaReader
refs/heads/master
src/Control/Identify.py
2
''' Created on Aug 28, 2014 @author: Jason Guo E-mail: [email protected] ''' import cStringIO import datetime from sklearn.externals import joblib from PIL import Image import config class Identify(): ''' Usage: to identify the captcha. Input: the string of captcha image Output: the string of captch...
ptressel/sahana-eden-madpub
refs/heads/master
tests/logout.py
7
from selenium import selenium import unittest, time, re class NewTest(unittest.TestCase): def setUp(self): self.verificationErrors = [] self.selenium = selenium("localhost", 4444, "*chrome", "http://change-this-to-the-site-you-are-testing/") self.selenium.start() def test_new(self)...
collective/collective.subsitebehaviors
refs/heads/master
src/collective/subsitebehaviors/__init__.py
1
# -*- coding: utf-8 -*- """Init and utils.""" from zope.i18nmessageid import MessageFactory _ = MessageFactory('collective.subsitebehaviors')
keedio/hue
refs/heads/master
desktop/core/ext-py/python-ldap-2.3.13/Lib/ldap/__init__.py
44
""" ldap - base module See http://www.python-ldap.org/ for details. $Id: __init__.py,v 1.70 2011/02/19 14:36:53 stroeder Exp $ """ # This is also the overall release version number __version__ = '2.3.13' import sys if __debug__: # Tracing is only supported in debugging mode import traceback _trace_level = 0...
Savaged-Zen/Savaged-Zen-Inc
refs/heads/master
scripts/tracing/draw_functrace.py
14679
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <[email protected]> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
Pulgama/supriya
refs/heads/master
supriya/ugens/RunningMax.py
1
import collections from supriya import CalculationRate from supriya.ugens.Peak import Peak class RunningMax(Peak): """ Tracks maximum signal amplitude. :: >>> source = supriya.ugens.In.ar(0) >>> trigger = supriya.ugens.Impulse.kr(1) >>> running_max = supriya.ugens.RunningMax.ar(...
shahbazn/neutron
refs/heads/master
neutron/cmd/eventlet/agents/metadata_proxy.py
58
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
jmesteve/openerpseda
refs/heads/master
openerp/addons/tr_barcode_field/__openerp__.py
1
# -*- coding: utf-8 -*- ################################################################################# # # OpenERP, Open Source Management Solution # Copyright (C) 2011 Julius Network Solutions SARL <[email protected]> # # This program is free software: you can redistribute it and/or modify # it under th...
Yen-Chung-En/2015cdb_W12
refs/heads/master
static/Brython3.1.3-20150514-095342/Lib/_codecs.py
107
def ascii_decode(*args,**kw): pass def ascii_encode(*args,**kw): pass def charbuffer_encode(*args,**kw): pass def charmap_build(*args,**kw): pass def charmap_decode(*args,**kw): pass def charmap_encode(*args,**kw): pass def decode(*args,**kw): """decode(obj, [encoding[,errors]]) -> ob...
hdinsight/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/proxy_model_inheritance/app1/models.py
150
from __future__ import absolute_import # TODO: why can't I make this ..app2 from app2.models import NiceModel class ProxyModel(NiceModel): class Meta: proxy = True
joshavenue/python_notebook
refs/heads/master
insert.py
1
x = [1,2,3] x.insert(1, 1) // Insert 1 into the list 1 // x = [1,1,2,3]
uranusjr/django
refs/heads/master
tests/view_tests/tests/test_default_content_type.py
60
import sys from types import ModuleType from django.conf import Settings from django.test import SimpleTestCase, ignore_warnings from django.utils.deprecation import RemovedInDjango30Warning class DefaultContentTypeTests(SimpleTestCase): msg = 'The DEFAULT_CONTENT_TYPE setting is deprecated.' @ignore_warnin...
AladdinSonni/phantomjs
refs/heads/master
src/breakpad/src/tools/gyp/pylib/gyp/MSVSProject.py
137
#!/usr/bin/python2.4 # Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Visual Studio project reader/writer.""" import common import xml.dom import xml.dom.minidom import MSVSNew #----------------------------...
stclair/wes-cms
refs/heads/master
django/views/generic/__init__.py
493
from django.views.generic.base import View, TemplateView, RedirectView from django.views.generic.dates import (ArchiveIndexView, YearArchiveView, MonthArchiveView, WeekArchiveView, DayArchiveView, TodayArchiveView, DateDetailView) from django.vie...
collex100/odoo
refs/heads/8.0
addons/resource/faces/resource.py
433
#@+leo-ver=4 #@+node:@file resource.py #@@language python #@<< Copyright >> #@+node:<< Copyright >> ############################################################################ # Copyright (C) 2005, 2006, 2007, 2008 by Reithinger GmbH # [email protected] # # This file is part of faces. # # faces is free softwa...
adelina-t/nova
refs/heads/master
nova/api/openstack/compute/schemas/v3/reset_server_state.py
110
# Copyright 2014 NEC Corporation. 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 ...
OpenCobolIDE/OpenCobolIDE
refs/heads/master
open_cobol_ide/extlibs/pygments/styles/manni.py
50
# -*- coding: utf-8 -*- """ pygments.styles.manni ~~~~~~~~~~~~~~~~~~~~~ A colorful style, inspired by the terminal highlighting style. This is a port of the style used in the `php port`_ of pygments by Manni. The style is called 'default' there. :copyright: Copyright 2006-2015 by the Pygments...
lshain-android-source/external-chromium_org
refs/heads/master
chrome/test/chromedriver/test/run_java_tests.py
23
#!/usr/bin/env python # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Runs the WebDriver Java acceptance tests. This script is called from chrome/test/chromedriver/run_all_tests.py and reports results ...
jimi-c/ansible
refs/heads/devel
lib/ansible/modules/files/assemble.py
7
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012, Stephen Fromm <[email protected]> # Copyright: (c) 2016, Toshio Kuratomi <[email protected]> # Copyright: (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 ab...
nesdis/djongo
refs/heads/master
tests/django_tests/tests/v21/tests/i18n/sampleproject/update_catalogs.py
344
#!/usr/bin/env python """ Helper script to update sampleproject's translation catalogs. When a bug has been identified related to i18n, this helps capture the issue by using catalogs created from management commands. Example: The string "Two %% Three %%%" renders differently using trans and blocktrans. This issue i...
open-cloud/xos
refs/heads/master
lib/xos-genx/xos-genx-tests/test_optimize.py
2
# Copyright 2017-present Open Networking Foundation # # 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 agr...
guorendong/iridium-browser-ubuntu
refs/heads/ubuntu/precise
third_party/cython/src/Cython/Debugger/libpython.py
101
#!/usr/bin/python # NOTE: this file is taken from the Python source distribution # It can be found under Tools/gdb/libpython.py. It is shipped with Cython # because it's not installed as a python module, and because changes are only # merged into new python versions (v3.2+). ''' From gdb 7 onwards, gdb's build can be...
hevalberknevruz/oclapi
refs/heads/master
django-nonrel/ocl/orgs/search_indexes.py
5
from haystack import indexes from oclapi.search_backends import SortOrFilterField from oclapi.search_indexes import OCLSearchIndex from orgs.models import Organization __author__ = 'misternando' class OrganizationIndex(OCLSearchIndex, indexes.Indexable): text = indexes.CharField(document=True, use_template=True)...
mattrobenolt/django
refs/heads/master
tests/migrations/test_migrations_squashed_complex/7_auto.py
770
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [("migrations", "6_auto")] operations = [ migrations.RunPython(migrations.RunPython.noop) ]
DestrinStorm/deep-learning
refs/heads/master
tv-script-generation/problem_unittests.py
68
import numpy as np import tensorflow as tf from tensorflow.contrib import rnn def _print_success_message(): print('Tests Passed') def test_create_lookup_tables(create_lookup_tables): with tf.Graph().as_default(): test_text = ''' Moe_Szyslak Moe's Tavern Where the elite meet to drink ...
py-geek/City-Air
refs/heads/master
venv/lib/python2.7/site-packages/oauthlib/oauth1/rfc5849/utils.py
93
# -*- coding: utf-8 -*- """ oauthlib.utils ~~~~~~~~~~~~~~ This module contains utility methods used by various parts of the OAuth spec. """ from __future__ import absolute_import, unicode_literals try: import urllib2 except ImportError: import urllib.request as urllib2 from oauthlib.common import quote, unqu...
TeamSWAP/swap
refs/heads/master
external/pyinstaller/PyInstaller/hooks/hook-xml.dom.ext.py
10
#----------------------------------------------------------------------------- # Copyright (c) 2013, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this softwa...
chris-chris/tensorflow
refs/heads/master
tensorflow/tools/api/tests/api_compatibility_test.py
20
# 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...
lkuchenb/shogun
refs/heads/develop
tests/unit/base/clone_unittest.cc.py
26
#!/usr/bin/env python # 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. # # Written (W) 2013 Viktor Gal # Copyright (C) 2...