repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
nirmeshk/oh-mainline
vendor/packages/gdata/src/gdata/alt/appengine.py
77
11666
#!/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 ...
agpl-3.0
legnaleurc/tornado
tornado/process.py
7
12611
#!/usr/bin/env python # # Copyright 2011 Facebook # # 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 a...
apache-2.0
vorlock/ansible-modules-core
cloud/docker/docker.py
2
34272
#!/usr/bin/python # (c) 2013, Cove Schneider # (c) 2014, Joshua Conner <joshua.conner@gmail.com> # (c) 2014, Pavel Antonov <antonov@adwz.ru> # # 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...
gpl-3.0
vaidap/zulip
zerver/webhooks/helloworld/view.py
7
1494
# Webhooks for external integrations. from __future__ import absolute_import from django.utils.translation import ugettext as _ from zerver.lib.actions import check_send_message from zerver.lib.response import json_success, json_error from zerver.decorator import REQ, has_request_variables, api_key_only_webhook_view fr...
apache-2.0
efortuna/AndroidSDKClone
ndk_experimental/prebuilt/linux-x86_64/lib/python2.7/encodings/bz2_codec.py
501
2993
""" Python 'bz2_codec' Codec - bz2 compression encoding Unlike most of the other codecs which target Unicode, this codec will return Python string objects for both encode and decode. Adapted by Raymond Hettinger from zlib_codec.py which was written by Marc-Andre Lemburg (mal@lemburg.com). """ import ...
apache-2.0
AMOboxTV/AMOBox.LegoBuild
plugin.video.specto/resources/lib/libraries/f4mproxy/f4mDownloader.py
55
38147
import xml.etree.ElementTree as etree import base64 from struct import unpack, pack import sys import io import os import time import itertools import xbmcaddon import xbmc import urllib2,urllib import traceback import urlparse import posixpath import re import hmac import hashlib import binascii import zlib from hash...
gpl-2.0
was4444/chromium.src
content/shell/tools/breakpad_integration_test.py
21
4605
#!/usr/bin/env python # # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Integration test for breakpad in content shell. This test checks that content shell and breakpad are correctly hooked up, as well...
bsd-3-clause
praduman/robotframework-selenium2library
src/Selenium2Library/keywords/_javascript.py
61
6560
import os from selenium.common.exceptions import WebDriverException from keywordgroup import KeywordGroup class _JavaScriptKeywords(KeywordGroup): def __init__(self): self._cancel_on_next_confirmation = False # Public def alert_should_be_present(self, text=''): """Verifies an alert is pr...
apache-2.0
byterom/android_external_chromium_org
tools/cr/cr/base/host.py
89
5957
# 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. """Module for build host support.""" import os import pipes import signal import subprocess import cr # Controls what verbosity level turns on command tra...
bsd-3-clause
CLVsol/oehealth
oehealth_patient/res_partner.py
1
1797
# -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # ...
agpl-3.0
muzixing/ryu
ryu/contrib/tinyrpc/transports/wsgi.py
42
3181
#!/usr/bin/env python # -*- coding: utf-8 -*- import Queue from werkzeug.wrappers import Response, Request from . import ServerTransport class WsgiServerTransport(ServerTransport): """WSGI transport. Requires :py:mod:`werkzeug`. Due to the nature of WSGI, this transport has a few pecularities: It mus...
apache-2.0
MSusik/matraz
license.py
1
2039
def get_license(owner, repo_info): licenses = { "agpl-3.0": { "name": "GNU Affero GPL v3.0", "url": "https://api.github.com/licenses/agpl-3.0" }, "apache-2.0": { "name": "Apache License 2.0", "url": "https://api.github.com/licenses/apache-2.0" }, "artis...
unlicense
hynnet/hiwifi-openwrt-HC5661-HC5761
staging_dir/host/lib/python2.7/test/test_compiler.py
112
11233
import test.test_support compiler = test.test_support.import_module('compiler', deprecated=True) from compiler.ast import flatten import os, sys, time, unittest from random import random from StringIO import StringIO # How much time in seconds can pass before we print a 'Still working' message. _PRINT_WORKING_MSG_INTE...
gpl-2.0
gsmartway/odoo
addons/purchase_analytic_plans/purchase_analytic_plans.py
378
1667
# -*- 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...
agpl-3.0
redreamality/thefuck
tests/rules/test_brew_install.py
12
1639
import pytest from thefuck.rules.brew_install import match, get_new_command from thefuck.rules.brew_install import _get_formulas from tests.utils import Command @pytest.fixture def brew_no_available_formula(): return '''Error: No available formula for elsticsearch ''' @pytest.fixture def brew_install_no_argumen...
mit
RobinQuetin/CAIRIS-web
cairis/cairis/GoalAssociationListCtrl.py
1
4978
# 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...
apache-2.0
Celedhrim/persomov
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/ynet.py
41
1728
# coding: utf-8 from __future__ import unicode_literals import re import json from .common import InfoExtractor from ..compat import compat_urllib_parse class YnetIE(InfoExtractor): _VALID_URL = r'http://(?:.+?\.)?ynet\.co\.il/(?:.+?/)?0,7340,(?P<id>L(?:-[0-9]+)+),00\.html' _TESTS = [ { ...
gpl-3.0
ky822/scikit-learn
sklearn/neighbors/approximate.py
71
22357
"""Approximate nearest neighbor search""" # Author: Maheshakya Wijewardena <maheshakya.10@cse.mrt.ac.lk> # Joel Nothman <joel.nothman@gmail.com> import numpy as np import warnings from scipy import sparse from .base import KNeighborsMixin, RadiusNeighborsMixin from ..base import BaseEstimator from ..utils.va...
bsd-3-clause
osrg/ryu-book
zh_tw/source/conf.py
2
14532
# -*- coding: utf-8 -*- # # a documentation build configuration file, created by # sphinx-quickstart on Mon Sep 1 17:46:38 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All con...
apache-2.0
kbrebanov/ansible
lib/ansible/modules/windows/win_uri.py
30
6692
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Corwin Brown <corwin@corwinbrown.com> # Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
Appono/hey-orpheus
vendor/distribute-0.6.36/setuptools/command/alias.py
135
2477
import distutils, os from setuptools import Command from distutils.util import convert_path from distutils import log from distutils.errors import * from setuptools.command.setopt import edit_config, option_base, config_file def shquote(arg): """Quote an argument for later parsing by shlex.split()""" for c in ...
mit
talha81/TACTIC-DEV
3rd_party/CherryPy/cherrypy/test/test_misc_tools.py
6
7335
from cherrypy.test import test test.prefer_parent_path() import os localDir = os.path.dirname(__file__) logfile = os.path.join(localDir, "test_misc_tools.log") import cherrypy from cherrypy import tools def setup_server(): class Root: def index(self): yield "Hello, world" index.expos...
epl-1.0
zadgroup/edx-platform
lms/djangoapps/instructor/paidcourse_enrollment_report.py
21
8943
""" Defines concrete class for cybersource Enrollment Report. """ from courseware.access import has_access import collections from django.conf import settings from django.utils.translation import ugettext as _ from courseware.courses import get_course_by_id from instructor.enrollment_report import BaseAbstractEnrollm...
agpl-3.0
mollstam/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/lxml-3.4.4/src/lxml/tests/test_nsclasses.py
19
7242
# -*- coding: utf-8 -*- """ Test cases related to namespace implementation classes and the namespace registry mechanism """ import unittest, sys, os.path this_dir = os.path.dirname(__file__) if this_dir not in sys.path: sys.path.insert(0, this_dir) # needed for Py3 from common_imports import etree, HelperTestCa...
mit
Ayaz2589/Ayaz2589.github.io
node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/gyp/buildbot/buildbot_run.py
1467
4228
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Argument-less script to select what to run on the buildbots.""" import os import shutil import subprocess import sys BUILDBOT_DIR = os....
mit
Balachan27/django
tests/generic_views/urls.py
52
14592
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf.urls import url from django.contrib.auth import views as auth_views from django.contrib.auth.decorators import login_required from django.views.decorators.cache import cache_page from django.views.generic import TemplateView from . impor...
bsd-3-clause
metamx/spark
python/pyspark/sql/functions.py
10
67306
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
mvadu/influxdb
build.py
1
42849
#!/usr/bin/python2.7 -u import sys import os import subprocess import time from datetime import datetime import shutil import tempfile import hashlib import re import logging import argparse ################ #### InfluxDB Variables ################ # Packaging variables PACKAGE_NAME = "influxdb" INSTALL_ROOT_DIR = "...
mit
kalahbrown/HueBigSQL
desktop/core/ext-py/cx_Oracle-5.1.2/test/ObjectVar.py
37
2212
"""Module for testing object variables.""" import sys class TestObjectVar(BaseTestCase): def __TestData(self, expectedIntValue, expectedObjectValue, expectedArrayValue): intValue, objectValue, arrayValue = self.cursor.fetchone() if objectValue is not None: attributeValues ...
apache-2.0
android-legacy/android_kernel_exynos
tools/perf/scripts/python/syscall-counts.py
11181
1522
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
gpl-2.0
cntnboys/410Lab6
v1/lib/python2.7/site-packages/django/contrib/gis/sitemaps/georss.py
66
2158
from django.core import urlresolvers from django.contrib.sitemaps import Sitemap class GeoRSSSitemap(Sitemap): """ A minimal hook to produce sitemaps for GeoRSS feeds. """ def __init__(self, feed_dict, slug_dict=None): """ This sitemap object initializes on a feed dictionary (as would ...
apache-2.0
abomyi/django
tests/model_validation/models.py
260
1346
from django.db import models class ThingItem(object): def __init__(self, value, display): self.value = value self.display = display def __iter__(self): return (x for x in [self.value, self.display]) def __len__(self): return 2 class Things(object): def __iter__(se...
bsd-3-clause
cuauv/software
hydrocode/scripts/data_spoofer.py
1
3125
#!/usr/bin/env python3 #Script for generating a dump containing a single simulated ping of specified frequency and location. Read Hydrophones Code wiki entry. import math import scipy.io BIT_DEPTH = 16383 #maximum possible level of a signal IDLE_TIME = 1.996 #padding before and after ping (in seconds) NIPPL...
bsd-3-clause
VigTech/Vigtech-Services
env/lib/python2.7/site-packages/django/conf/locale/it/formats.py
115
2079
# -*- 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 = 'd F Y' # 25 Ottobre 2006 TIME_FO...
lgpl-3.0
davisein/jitsudone
django/django/core/mail/backends/base.py
660
1164
"""Base email backend class.""" class BaseEmailBackend(object): """ Base class for email backend implementations. Subclasses must at least overwrite send_messages(). """ def __init__(self, fail_silently=False, **kwargs): self.fail_silently = fail_silently def open(self): """Op...
bsd-3-clause
mqyqlx/deeppy
deeppy/feedforward/convnet_layers.py
13
5677
import numpy as np from .layers import Layer from ..base import ParamMixin from ..parameter import Parameter import cudarray as ca def padding(win_shape, border_mode): if border_mode == 'valid': return (0, 0) elif border_mode == 'same': return (win_shape[0]//2, win_shape[1]//2) elif border...
mit
chandlercr/aima-python
submissions/Johnson/myKMeans.py
2
4160
from sklearn.cluster import KMeans import traceback from sklearn.neural_network import MLPClassifier from submissions.Johnson import education class DataFrame: data = [] feature_names = [] target = [] target_names = [] moneyvsthings = DataFrame() joint = {} educations = education.get_all_states() fo...
mit
pireerliu/ardupilot
Tools/LogAnalyzer/tests/TestGPSGlitch.py
273
2325
from LogAnalyzer import Test,TestResult import DataflashLog class TestGPSGlitch(Test): '''test for GPS glitch reporting or bad GPS data (satellite count, hdop)''' def __init__(self): Test.__init__(self) self.name = "GPS" def run(self, logdata, verbose): self.result = TestResult() self.result.status = Tes...
gpl-3.0
mixman/djangodev
django/templatetags/tz.py
80
5674
from __future__ import with_statement from datetime import datetime, tzinfo try: import pytz except ImportError: pytz = None from django.template import Node from django.template import TemplateSyntaxError, Library from django.utils import timezone register = Library() # HACK: datetime is an old-style cla...
bsd-3-clause
payeldillip/django
tests/gis_tests/relatedapp/tests.py
39
15582
from __future__ import unicode_literals from django.contrib.gis.db.models import F, Collect, Count, Extent, Union from django.contrib.gis.geometry.backend import Geometry from django.contrib.gis.geos import GEOSGeometry, MultiPoint, Point from django.db import connection from django.test import TestCase, skipUnlessDBF...
bsd-3-clause
etkirsch/scikit-learn
examples/cluster/plot_mini_batch_kmeans.py
265
4081
""" ==================================================================== Comparison of the K-Means and MiniBatchKMeans clustering algorithms ==================================================================== We want to compare the performance of the MiniBatchKMeans and KMeans: the MiniBatchKMeans is faster, but give...
bsd-3-clause
rtilder/websigning
websigning/tests/data.py
1
1966
# coding=utf-8 MANIFEST = """Manifest-Version: 1.0 Name: test-file Digest-Algorithms: MD5 SHA1 MD5-Digest: 5BXJnAbD0DzWPCj6Ve/16w== SHA1-Digest: 5Hwcbg1KaPMqjDAXV/XDq/f30U0= Name: test-dir/nested-test-file Digest-Algorithms: MD5 SHA1 MD5-Digest: 53dwfEn/GnFiWp0NQyqWlA== SHA1-Digest: 4QzlrC8QyhQW1T0/Nay5kRr3gVo= """ ...
mpl-2.0
CFDEMproject/LIGGGHTS-3-beta-PUBLIC
tools/moltemplate/src/nbody_alternate_symmetry/nbody_ImpropersJIJKJLswapIKL.py
8
1924
from nbody_graph_search import Ugraph # To find 4-body "improper" interactions, we would use this subgraph: # 3 # * 1st bond connects atoms 1 and 0 # | => 2nd bond connects atoms 1 and 2 # _.*._ 3rd bond connects atoms 1 and 3 # ...
gpl-2.0
wzbozon/statsmodels
statsmodels/tsa/tests/test_arima.py
9
89483
import warnings from statsmodels.compat.python import lrange, BytesIO import numpy as np from nose.tools import nottest from numpy.testing import (assert_almost_equal, assert_, assert_allclose, assert_raises, dec, TestCase) from statsmodels.tools.testing import assert_equal import statsmodel...
bsd-3-clause
nens/dpnetcdf
dpnetcdf/migrations/0030_auto__del_field_opendapdataset_year.py
1
5881
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'OpendapDataset.year' db.delete_column('dpnetcdf_opendapdataset', 'year') def backwar...
gpl-3.0
epssy/hue
apps/hbase/src/hbase/conf.py
23
2360
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
matuu/simpleai
simpleai/machine_learning/metrics.py
4
2286
#!/usr/bin/env python # coding: utf-8 import math import numpy from collections import defaultdict class Counter(defaultdict): """ Counter of examples. Counts the total of examples added and also the times that the target of that example appears. To add an example use the `add` method and to check t...
mit
nju520/django
django/db/models/__init__.py
239
1679
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...
bsd-3-clause
Zhongqilong/kbengine
kbe/src/lib/python/Lib/distutils/command/bdist_wininst.py
86
14896
"""distutils.command.bdist_wininst Implements the Distutils 'bdist_wininst' command: create a windows installer exe-program.""" import sys, os from distutils.core import Command from distutils.util import get_platform from distutils.dir_util import create_tree, remove_tree from distutils.errors import * from distutil...
lgpl-3.0
moreati/django
tests/test_client/views.py
109
10961
from xml.dom.minidom import parseString from django.contrib.auth.decorators import login_required, permission_required from django.core import mail from django.forms import fields from django.forms.forms import Form, ValidationError from django.forms.formsets import BaseFormSet, formset_factory from django.http import...
bsd-3-clause
kowall116/roadTrip
node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py
2736
6387
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Visual Studio project reader/writer.""" import gyp.common import gyp.easy_xml as easy_xml #-------------------------------------------------------------------...
mit
omaciel/robottelo
tests/upgrades/test_role.py
3
8402
"""Test for Role related Upgrade Scenario's :Requirement: Upgraded Satellite :CaseAutomation: NotAutomated :CaseLevel: Acceptance :CaseComponent: API :TestType: Functional :CaseImportance: High :Upstream: No """ from nailgun import entities from robottelo.test import APITestCase from upgrade_tests import pre_upg...
gpl-3.0
randomblame/a500_2.6
Documentation/target/tcm_mod_builder.py
3119
42754
#!/usr/bin/python # The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD # # Copyright (c) 2010 Rising Tide Systems # Copyright (c) 2010 Linux-iSCSI.org # # Author: nab@kernel.org # import os, sys import subprocess as sub import string import re import optparse tcm_dir = "" fabric_ops...
gpl-2.0
bowang/tensorflow
tensorflow/python/kernel_tests/save_restore_ops_test.py
38
2301
# 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...
apache-2.0
sanghinitin/golismero
tools/sqlmap/plugins/dbms/firebird/enumeration.py
8
1120
#!/usr/bin/env python """ Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ from lib.core.data import logger from plugins.generic.enumeration import Enumeration as GenericEnumeration class Enumeration(GenericEnumeration): def __init__(self): ...
gpl-2.0
TeamAADGT/CMPUT404-project-socialdistribution
background_task/management/commands/process_tasks.py
1
2921
# -*- coding: utf-8 -*- import logging import random import sys import time from django import VERSION from django.core.management.base import BaseCommand from background_task.tasks import tasks, autodiscover from compat import close_connection logger = logging.getLogger(__name__) def _configure_log_std(): cl...
apache-2.0
rzarzynski/tempest
tempest/tests/test_waiters.py
10
1927
# Copyright 2014 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
apache-2.0
garyd203/flying-circus
tests/service_test/ec2_test/vpc_test.py
1
6537
"""Test VPC service components.""" import pytest from flyingcircus.core import Stack from flyingcircus.intrinsic_function import Ref from flyingcircus.service.ec2 import InternetGateway from flyingcircus.service.ec2 import VPC from flyingcircus.service.ec2 import VPCGatewayAttachment from flyingcircus.service.ec2 imp...
lgpl-3.0
huran2014/huran.github.io
wot_gateway/usr/lib/python2.7/uu.py
251
6555
#! /usr/bin/env python # Copyright 1994 by Lance Ellinghouse # Cathedral City, California Republic, United States of America. # All Rights Reserved # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provide...
gpl-2.0
bobcyw/django
tests/admin_widgets/tests.py
65
58859
# -*- coding: utf-8 -*- from __future__ import unicode_literals import gettext import os from datetime import datetime, timedelta from importlib import import_module from unittest import skipIf from django import forms from django.conf import settings from django.contrib import admin from django.contrib.admin import ...
bsd-3-clause
UKTradeInvestment/export-wins-data
fdi/migrations/0028_auto_20180213_1050.py
1
1454
# Generated by Django 2.0.2 on 2018-02-13 10:50 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('fdi', '0027_auto_20180208_1059'), ] operations = [ migrations.CreateModel( name='MarketGroupCou...
gpl-3.0
benjaminbrinkman/open-ad-platform
.venv/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/etree_lxml.py
1724
14031
"""Module for supporting the lxml.etree library. The idea here is to use as much of the native library as possible, without using fragile hacks like custom element names that break between releases. The downside of this is that we cannot represent all possible trees; specifically the following are known to cause proble...
mit
drzoidberg33/plexpy
lib/dns/rdtypes/ANY/NSEC3PARAM.py
8
3099
# Copyright (C) 2004-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
gpl-3.0
gamecredits-project/GameCredits
test/functional/forknotify.py
29
2463
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the -alertnotify option.""" import os import time from test_framework.test_framework import Bitco...
mit
sadig/DC2
documentation/source/conf.py
1
7309
# -*- coding: utf-8 -*- # # dc2-documentation build configuration file, created by # ReST Editor on Aug 17, 2011 # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values h...
gpl-2.0
surligas/gnuradio
gr-analog/python/analog/am_demod.py
58
2926
# # Copyright 2006,2007,2012 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 your option) # any later ve...
gpl-3.0
chafique-delli/OpenUpgrade
addons/l10n_fr/__init__.py
424
1447
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential #...
agpl-3.0
macchina-io/macchina.io
platform/JS/V8/v8/third_party/jinja2/nodes.py
342
28954
# -*- coding: utf-8 -*- """ jinja2.nodes ~~~~~~~~~~~~ This module implements additional nodes derived from the ast base node. It also provides some node tree helper functions like `in_lineno` and `get_nodes` used by the parser and translator in order to normalize python and jinja nodes. :...
apache-2.0
TeachAtTUM/edx-platform
common/lib/xmodule/xmodule/tests/test_editing_module.py
4
2773
""" Tests for editing descriptors""" import unittest import os import logging from mock import Mock from pkg_resources import resource_string from opaque_keys.edx.locator import BlockUsageLocator, CourseLocator from xmodule.editing_module import TabsEditingDescriptor from xblock.field_data import DictFieldData from xb...
agpl-3.0
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/pywt/tests/test_concurrent.py
2
4385
""" Tests used to verify running PyWavelets transforms in parallel via concurrent.futures.ThreadPoolExecutor does not raise errors. """ from __future__ import division, print_function, absolute_import import sys import warnings import multiprocessing import numpy as np from functools import partial from numpy.testing...
gpl-3.0
tknapen/rewardUP
subjects_import.py
1
6247
#!/usr/bin/env python # encoding: utf-8 """ analyze_7T_S1.py Created by Tomas HJ Knapen on 2009-11-26. Copyright (c) 2009 TK. All rights reserved. To run this script headlessly and hopefully avoiding X server errors in the process, execute this script using 'xvfb-run python subjects.py' """ import os, sys, datetime ...
gpl-2.0
Maximilian-Reuter/SickRage
lib/feedparser/html.py
43
7922
from __future__ import absolute_import, unicode_literals import re try: from html.entities import name2codepoint except ImportError: from htmlentitydefs import name2codepoint from .sgml import * _cp1252 = { 128: '\u20ac', # euro sign 130: '\u201a', # single low-9 quotation mark 131: '\u0192', # ...
gpl-3.0
ViktorM/baselines
baselines/trpo_mpi/run_mujoco.py
4
1827
#!/usr/bin/env python # noinspection PyUnresolvedReferences import mujoco_py # Mujoco must come before other imports. https://openai.slack.com/archives/C1H6P3R7B/p1492828680631850 from mpi4py import MPI from baselines.common import set_global_seeds import os.path as osp import gym import logging from baselines import l...
mit
codeka/wwmmo
website/bs4/tests/test_lxml.py
273
2965
"""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...
mit
lsst-ts/ts_wep
tests/bsc/test_starData.py
1
6039
# This file is part of ts_wep. # # Developed for the LSST Telescope and Site Systems. # This product includes software developed by the LSST Project # (https://www.lsst.org). # See the COPYRIGHT file at the top-level directory of this distribution # for details of code ownership. # # This program is free software: you ...
gpl-3.0
wkeyword/pip
pip/_vendor/packaging/__about__.py
441
1073
# Copyright 2014 Donald Stufft # # 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, so...
mit
susilehtola/psi4
psi4/driver/p4util/testing.py
7
12863
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2021 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This file is part of Psi4. # # Psi4 is free software; you can redistribute it and/or modify #...
lgpl-3.0
amboutin/GCP
storage/api/customer_supplied_keys.py
6
6273
#!/usr/bin/env python # Copyright 2016 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 r...
apache-2.0
tempbottle/kbengine
kbe/src/lib/python/Lib/unittest/result.py
75
7308
"""Test result object""" import io import sys import traceback from . import util from functools import wraps __unittest = True def failfast(method): @wraps(method) def inner(self, *args, **kw): if getattr(self, 'failfast', False): self.stop() return method(self, *args, **kw) ...
lgpl-3.0
pshen/ansible
lib/ansible/modules/cloud/amazon/ec2_vpc_endpoint.py
28
14227
#!/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 distributed...
gpl-3.0
vdloo/raptiformica
tests/unit/raptiformica/actions/mesh/test_try_run_consul_join.py
1
1053
from mock import ANY, call from raptiformica.actions.mesh import try_run_consul_join from tests.testcase import TestCase class TestTryRunConsulJoin(TestCase): def setUp(self): self.run_consul_join = self.set_up_patch( 'raptiformica.actions.mesh.run_consul_join' ) def test_try_run...
mit
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/skimage/filters/tests/test_gabor.py
29
2888
import numpy as np from numpy.testing import (assert_equal, assert_almost_equal, assert_array_almost_equal) from skimage.filters._gabor import gabor_kernel, gabor, _sigma_prefactor def test_gabor_kernel_size(): sigma_x = 5 sigma_y = 10 # Sizes cut off at +/- three sigma + 1 for...
gpl-3.0
dahlia/libsass-python
upload_appveyor_builds.py
1
4135
#!/usr/bin/env python3 # TODO: Upload to GitHub releases # TODO: .pypirc configuration import argparse import json import os import os.path import shutil import subprocess from urllib.parse import urljoin from urllib.request import urlopen from twine.commands import upload APPVEYOR_API_BASE_URL = 'https://ci.appveyo...
mit
JarbasAI/jarbas-core
mycroft/dialog/__init__.py
2
4711
# Copyright 2016 Mycroft AI, Inc. # # This file is part of Mycroft Core. # # Mycroft Core 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 versio...
gpl-3.0
PaulKinlan/cli-caniuse
site/app/scripts/bower_components/jsrepl-build/extern/python/unclosured/lib/python2.7/mutex.py
243
1877
"""Mutual exclusion -- for use with module sched A mutex has two pieces of state -- a 'locked' bit and a queue. When the mutex is not locked, the queue is empty. Otherwise, the queue contains 0 or more (function, argument) pairs representing functions (or methods) waiting to acquire the lock. When the mutex is unlocke...
apache-2.0
dencold/blt
blt/tools/aws.py
1
15711
""" Toolset module for AWS using blt. Currently, the primary use case is access to the Amazon Simple Storage Service (`S3 <http://aws.amazon.com/s3/>`_) through the `boto api <http://boto.s3.amazonaws.com/ref/s3.html>`_. More functionality may be added down the road for other AWS services. Author: @dencold (Dennis Co...
mit
feer56/Kitsune2
kitsune/kpi/tests/test_cron.py
17
15383
from datetime import date, timedelta from mock import patch from nose.tools import eq_ import kitsune.kpi.cron from kitsune.kpi import surveygizmo_utils from kitsune.kpi.cron import ( update_visitors_metric, update_l10n_metric, googleanalytics, update_search_ctr_metric, _process_exit_survey_results) from kits...
bsd-3-clause
erickt/hue
desktop/core/ext-py/Django-1.6.10/tests/one_to_one_regress/tests.py
107
8452
from __future__ import absolute_import from django.test import TestCase from .models import Place, Restaurant, Bar, Favorites, Target, UndergroundBar class OneToOneRegressionTests(TestCase): def setUp(self): self.p1 = Place(name='Demon Dogs', address='944 W. Fullerton') self.p1.save() s...
apache-2.0
lagopus/ryu-lagopus-ext
ryu/app/rest_router.py
9
70965
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
apache-2.0
glennw/servo
tests/wpt/css-tests/tools/webdriver/webdriver/exceptions.py
263
6460
"""Definition of WebDriverException classes.""" def create_webdriver_exception_strict(status_code, message): """Create the appropriate WebDriverException given the status_code.""" if status_code in _exceptions_strict: return _exceptions_strict[status_code](message) return UnknownStatusCodeException...
mpl-2.0
coderbone/SickRage
lib/bs4/element.py
438
61538
import collections import re import sys import warnings from bs4.dammit import EntitySubstitution DEFAULT_OUTPUT_ENCODING = "utf-8" PY3K = (sys.version_info[0] > 2) whitespace_re = re.compile("\s+") def _alias(attr): """Alias one attribute name to another for backward compatibility""" @property def alias...
gpl-3.0
bzero/statsmodels
statsmodels/sandbox/distributions/tests/test_multivariate.py
31
6330
# -*- coding: utf-8 -*- """ Created on Sat Apr 16 15:02:13 2011 @author: Josef Perktold """ import numpy as np from numpy.testing import assert_almost_equal, assert_array_almost_equal from statsmodels.sandbox.distributions.multivariate import ( mvstdtprob, mvstdnormcdf) from statsmodels.sandbox.distri...
bsd-3-clause
mjnbike/tapiriik
stats_cron.py
15
7077
from tapiriik.database import db, close_connections from tapiriik.settings import RABBITMQ_USER_QUEUE_STATS_URL from datetime import datetime, timedelta import requests # total distance synced distanceSyncedAggr = list(db.sync_stats.aggregate([{"$group": {"_id": None, "total": {"$sum": "$Distance"}}}])) if dist...
apache-2.0
bartlwojcik/bartlwojcik.github.io
node_modules/node-gyp/gyp/tools/pretty_vcproj.py
2637
9586
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Make the format of a vcproj really pretty. This script normalize and sort an xml. It also fetches all the properties inside linked...
mit
moniqx4/bite-project
deps/gdata-python-client/tests/gdata_tests/client_smoke_test.py
39
1743
#!/usr/bin/env python # # Copyright (C) 2010 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 ...
apache-2.0
jmgc/myhdl-numeric
myhdl/conversion/_toVHDLPackage.py
1
19142
# This file is part of the myhdl library, a Python package for using # Python as a Hardware Description Language. # # Copyright (C) 2003-2008 Jan Decaluwe # # The myhdl library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License as # published by t...
lgpl-2.1
jmakov/ggrc-core
src/ggrc/fulltext/sql.py
3
1354
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: david@reciprocitylabs.com # Maintained By: david@reciprocitylabs.com from ggrc import db from . import Indexer class SqlIndexer(Indexer): def cr...
apache-2.0
jeffdwyatt/taiga-back
settings/common.py
3
15500
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # This program 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 F...
agpl-3.0
RaumZeit/griffith
lib/plugins/imp/__init__.py
3
18022
# -*- coding: UTF-8 -*- __revision__ = '$Id$' # Copyright (c) 2006-2011 Piotr Ożarowski # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published byp # the Free Software Foundation; either version 2 of the License, or # (at your option...
gpl-2.0
alogg/dolfin
demo/undocumented/advection-diffusion/python/demo_advection-diffusion.py
1
3225
# Copyright (C) 2007 Kristian B. Oelgaard # # This file is part of DOLFIN. # # DOLFIN is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
gpl-3.0