repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
oldhawaii/oldhawaii-metadata
refs/heads/master
www/oldhawaii_metadata/__init__.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from collections import namedtuple version_info = namedtuple('version_info', ('major', 'minor', 'patch')) VERSION = version_info(0, 0, 1) __title__ = 'Old Hawaii Metadata' __version__ = '{0.major}.{0.minor}.{0.patch}'.format(VERSI...
ThomasMarcel/webapp-course
refs/heads/master
resources/gae-boilerplate/bp_admin/logsvisits.py
11
# -*- coding: utf-8 -*- from google.appengine.datastore.datastore_query import Cursor from google.appengine.ext import ndb from collections import OrderedDict from bp_includes.lib.basehandler import BaseHandler from bp_includes.models import LogVisit from bp_includes.models import User class AdminLogsVisitsHandler(Ba...
fbsder/openthread
refs/heads/master
tools/harness-automation/cases/leader_5_1_13.py
16
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # notic...
p500-ics-cm9/caf-msm-kernel
refs/heads/caf
tools/perf/scripts/python/check-perf-trace.py
11214
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
artdent/mingus-python3
refs/heads/python3
mingus/core/progressions.py
3
#!/usr/bin/python # -*- coding: utf-8 -*- """ ================================================================================ mingus - Music theory Python package, progressions module Copyright (C) 2008-2009, Bart Spaans This program is free software: you can redistribute it and/or modify it under t...
vvvvcp/NeverMore
refs/heads/master
mathtype/Logistic.py
1
import numpy import theano import theano.tensor as T rng = numpy.random N = 400 feats = 784 D = (rng.randn(N, feats), rng.randint(size=N, low=0, high=2)) training_steps = 10000 # Declare Theano symbolic variables x = T.matrix("x") y = T.vector("y") w = theano.shared(rng.randn(feats), name="w") b = theano.shared(0., n...
termie/pupa
refs/heads/master
nova/db/sqlalchemy/migrate_repo/versions/009_add_instance_migrations.py
2
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 OpenStack LLC. # 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/...
uahic/nest-simulator
refs/heads/master
topology/examples/ctx_2n.py
13
# -*- coding: utf-8 -*- # # ctx_2n.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 # (a...
skoppisetty/hackathon
refs/heads/master
lib/sqlalchemy/util/langhelpers.py
17
# util/langhelpers.py # Copyright (C) 2005-2012 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 """Routines to help with the creation, loading and introspection of modules, class...
camon/Flexget
refs/heads/develop
flexget/plugins/output/move.py
6
from __future__ import unicode_literals, division, absolute_import import os import shutil import logging import time from flexget import plugin from flexget.event import event from flexget.utils.template import RenderError from flexget.utils.pathscrub import pathscrub def get_directory_size(directory): """ ...
EvPowerTeam/EV_OP
refs/heads/master
scripts/dl_cleanup.py
202
#!/usr/bin/env python """ # OpenWRT download directory cleanup utility. # Delete all but the very last version of the program tarballs. # # Copyright (C) 2010 Michael Buesch <mb@bu3sch.de> # Copyright (C) 2013 OpenWrt.org """ import sys import os import re import getopt # Commandline options opt_dryrun = False def ...
flavour/tldrmp
refs/heads/master
static/scripts/tools/closure.py
23
import os import tempfile tempdir = tempfile.gettempdir() path = os.path.abspath(os.path.join(os.path.dirname(__file__), "compiler.jar")) if not os.path.exists(path): raise Exception("No closure compiler.jar at %s; Download from http://closure-compiler.googlecode.com/files/compiler-latest.zip" % path) extra_para...
ahnqirage/spark
refs/heads/master
examples/src/main/python/mllib/fpgrowth_example.py
158
# # 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...
jgoclawski/django
refs/heads/master
django/contrib/gis/feeds.py
336
from __future__ import unicode_literals from django.contrib.syndication.views import Feed as BaseFeed from django.utils.feedgenerator import Atom1Feed, Rss201rev2Feed class GeoFeedMixin(object): """ This mixin provides the necessary routines for SyndicationFeed subclasses to produce simple GeoRSS or W3C ...
Aorjoa/aiyara-ceph-dash
refs/heads/aiyara
.tox/flake8/lib/python2.7/site-packages/flake8/options/config.py
3
"""Config handling logic for Flake8.""" import configparser import logging import os.path import sys LOG = logging.getLogger(__name__) __all__ = ('ConfigFileFinder', 'MergedConfigParser') class ConfigFileFinder(object): """Encapsulate the logic for finding and reading config files.""" PROJECT_FILENAMES = (...
yaqiyang/autorest
refs/heads/master
src/generator/AutoRest.Python.Tests/Expected/AcceptanceTests/BodyDuration/autorestdurationtestservice/models/error.py
211
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
TeachAtTUM/edx-platform
refs/heads/master
scripts/show_events.py
22
import json import sys import traceback try: import dateutil.parser except ImportError: def date_string(ds, fmt=''): return ds else: def date_string(ds, fmt='%Y-%m-%d %H:%M:%S.%f'): d = dateutil.parser.parse(ds).astimezone(dateutil.tz.tzutc()) return d.strftime(fmt) def display(me...
follow99/django
refs/heads/master
tests/template_tests/filter_tests/test_truncatewords.py
235
from django.template.defaultfilters import truncatewords from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class TruncatewordsTests(SimpleTestCase): @setup({ 'truncatewords01': '{% autoescape off %}{{ a|truncatewords:"2" }} {{ b|truncatewords:...
miguelmarco/sage-wiki
refs/heads/master
data/plugin/action/__init__.py
79
# -*- coding: iso-8859-1 -*- from MoinMoin.util import pysupport modules = pysupport.getPackageModules(__file__)
connorimes/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/serve/serve.py
215
# -*- coding: utf-8 -*- import argparse import json import os import signal import socket import sys import threading import time import traceback import urllib2 import uuid from collections import defaultdict, OrderedDict from multiprocessing import Process, Event from .. import localpaths import sslutils from wptse...
dulems/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/core/serializers/xml_serializer.py
113
""" XML serializer. """ from __future__ import unicode_literals from django.conf import settings from django.core.serializers import base from django.db import models, DEFAULT_DB_ALIAS from django.utils.xmlutils import SimplerXMLGenerator from django.utils.encoding import smart_text from xml.dom import pulldom from x...
amitskwalia/codesters
refs/heads/master
Imaging-1.1.7/build/lib.linux-x86_64-2.7/PcxImagePlugin.py
40
# # The Python Imaging Library. # $Id$ # # PCX file handling # # This format was originally used by ZSoft's popular PaintBrush # program for the IBM PC. It is also supported by many MS-DOS and # Windows applications, including the Windows PaintBrush program in # Windows 3. # # history: # 1995-09-01 fl Created # 1996...
jenalgit/django
refs/heads/master
django/core/mail/message.py
11
from __future__ import unicode_literals import mimetypes import os import random import time from email import ( charset as Charset, encoders as Encoders, generator, message_from_string, ) from email.header import Header from email.message import Message from email.mime.base import MIMEBase from email.mime.message...
lewisodriscoll/sasview
refs/heads/master
src/sas/sascalc/dataloader/data_info.py
1
""" Module that contains classes to hold information read from reduced data files. A good description of the data members can be found in the CanSAS 1D XML data format: http://www.smallangles.net/wgwiki/index.php/cansas1d_documentation """ ##########################################################...
AutorestCI/azure-sdk-for-python
refs/heads/master
azure-mgmt-network/azure/mgmt/network/v2017_10_01/models/application_gateway_path_rule.py
1
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
was4444/chromium.src
refs/heads/nw15
chrome/test/mini_installer/process_verifier.py
125
# 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 chrome_helper import verifier class ProcessVerifier(verifier.Verifier): """Verifies that the running processes match the expectation dictionaries....
Orochimarufan/youtube-dl
refs/heads/master
youtube_dl/extractor/audioboom.py
13
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( clean_html, float_or_none, ) class AudioBoomIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?audioboom\.com/(?:boos|posts)/(?P<id>[0-9]+)' _TESTS = [{ 'url': 'https://audioboom....
mx-pycoder/yac2qc
refs/heads/master
yac2qc.py
1
#!/usr/bin/env python3 ''' convert csv files downloaded from an online banking account into qif format. ''' # The MIT License (MIT) # # Copyright (c) 2015 mx[replace-this]pycoder.nl # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (...
a-parhom/edx-platform
refs/heads/master
cms/lib/xblock/authoring_mixin.py
14
""" Mixin class that provides authoring capabilities for XBlocks. """ import logging from django.conf import settings from web_fragments.fragment import Fragment from xblock.core import XBlock, XBlockMixin log = logging.getLogger(__name__) VISIBILITY_VIEW = 'visibility_view' @XBlock.needs("i18n") class AuthoringM...
underscorephil/softlayer-python
refs/heads/master
tests/managers/network_tests.py
2
""" SoftLayer.tests.managers.network_tests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :license: MIT, see LICENSE for more details. """ import SoftLayer from SoftLayer import fixtures from SoftLayer import testing class NetworkTests(testing.TestCase): def set_up(self): self.network = SoftLayer.Ne...
Azure/azure-sdk-for-python
refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline
sdk/storage/azure-mgmt-storagesync/azure/mgmt/__init__.py
398
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
sodafree/backend
refs/heads/master
django/contrib/gis/geos/prototypes/errcheck.py
623
""" Error checking functions for GEOS ctypes prototype functions. """ import os from ctypes import c_void_p, string_at, CDLL from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.libgeos import GEOS_VERSION from django.contrib.gis.geos.prototypes.threadsafe import GEOSFunc # Getting the...
fritsch/linux
refs/heads/master
tools/perf/scripts/python/event_analyzing_sample.py
4719
# event_analyzing_sample.py: general event handler in python # # Current perf report is already very powerful with the annotation integrated, # and this script is not trying to be as powerful as perf report, but # providing end user/developer a flexible way to analyze the events other # than trace points. # # The 2 dat...
cdgallahue/atomic-turbine
refs/heads/master
web/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/gb2312prober.py
2993
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
JustinWingChungHui/MyFamilyRoot
refs/heads/master
chinese_relation_name/tests/test_path_to_name_mapper_3rd_gen.py
2
# -*- coding: utf-8 -*- from django.test import TestCase from family_tree.models.family import Family from family_tree.models.person import Person from family_tree.models.relation import PARTNERED, RAISED, RAISED_BY from chinese_relation_name.node import Node from chinese_relation_name.path import Path from chinese_re...
frenchie16/HipKarma
refs/heads/master
karma/admin.py
1
from django.contrib import admin from .models import Instance, Group, KarmicEntity, Karma admin.site.register(Instance) admin.site.register(Group) admin.site.register(KarmicEntity) admin.site.register(Karma)
phalt/pokeapi
refs/heads/master
config/docker-compose.py
1
# Docker settings from .settings import * # NOQA DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'pokeapi', 'USER': 'ash', 'PASSWORD': 'pokemon', 'HOST': 'db', 'PORT': 5432, } } CACHES = { ...
rproepp/spykeutils
refs/heads/develop
spykeutils/plot/spike_amp_hist.py
1
import scipy as sp import quantities as pq from guiqwt.plot import BaseImageWidget from guiqwt.builder import make from ..progress_indicator import ProgressIndicator from .. import SpykeException from ..stationarity import spike_amplitude_histogram as sah import helper from dialog import PlotDialog @helper.needs_qt...
tskisner/pytoast
refs/heads/master
src/python/fft.py
1
# Copyright (c) 2015-2018 by the parties listed in the AUTHORS file. # All rights reserved. Use of this source code is governed by # a BSD-style license that can be found in the LICENSE file. import numpy as np from . import timing as timing from .ctoast import ( fft_r1d_store_get, fft_r1d_store_forward, fft_r...
rochacbruno/dynaconf
refs/heads/master
example/issues/449_django_lazy_path/polls/apps.py
5
from django.apps import AppConfig class PollsConfig(AppConfig): name = "polls"
ellmetha/django-machina
refs/heads/main
machina/apps/forum_member/migrations/0001_initial.py
3
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import machina.models.fields class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations ...
381426068/MissionPlanner
refs/heads/master
Lib/site-packages/numpy/testing/decorators.py
82
""" Decorators for labeling and modifying behavior of test objects. Decorators that merely return a modified version of the original function object are straightforward. Decorators that return a new function object need to use :: nose.tools.make_decorator(original_function)(decorator) in returning the decorator, i...
tkstman/lab4
refs/heads/master
lib/flask/sessions.py
348
# -*- coding: utf-8 -*- """ flask.sessions ~~~~~~~~~~~~~~ Implements cookie based sessions based on itsdangerous. :copyright: (c) 2012 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import uuid import hashlib from datetime import datetime from werkzeug.http import http_date, ...
sonaht/ansible
refs/heads/devel
test/units/modules/network/ovs/test_openvswitch_bridge.py
76
# # (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 d...
ksmaheshkumar/grr
refs/heads/master
lib/flow_runner.py
2
#!/usr/bin/env python """This file contains a helper class for the flows. This flow context class provides all the methods for handling flows (i.e., calling clients, changing state, ...). Each flow must have a flow runner before it can be executed. The flow runner is responsible for queuing messages and maintaining s...
leafclick/intellij-community
refs/heads/master
python/testData/quickFixes/PyMakeFunctionFromMethodQuickFixTest/usageImport_after.py
83
import test b = test b.foo(1)
hdinsight/hue
refs/heads/master
desktop/core/ext-py/boto-2.38.0/boto/ec2/instancestatus.py
181
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # 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...
CoderBotOrg/coderbotsrv
refs/heads/master
server/lib/Crypto/SelfTest/Random/__init__.py
105
# -*- coding: utf-8 -*- # # SelfTest/Random/__init__.py: Self-test for random number generation modules # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the exten...
nycholas/ask-undrgz
refs/heads/master
src/ask-undrgz/django/forms/models.py
13
""" Helper functions for creating Form classes from Django models and database field objects. """ from django.db import connections from django.utils.encoding import smart_unicode, force_unicode from django.utils.datastructures import SortedDict from django.utils.text import get_text_list, capfirst from django.utils.t...
asiersarasua/QGIS
refs/heads/master
python/plugins/processing/gui/AlgorithmExecutor.py
2
# -*- coding: utf-8 -*- """ *************************************************************************** AlgorithmExecutor.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *********************...
lukipuki/obnam
refs/heads/master
obnamlib/fmt_6/checksumtree_tests.py
3
# Copyright 2010-2015 Lars Wirzenius # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed ...
enthought/Meta
refs/heads/develop
meta/asttools/tests/test_replace.py
2
''' Created on Aug 5, 2011 @author: sean ''' from __future__ import print_function import unittest from meta.asttools.mutators.replace_mutator import replace_nodes import ast from meta.asttools.tests import assert_ast_eq class Test(unittest.TestCase): def test_replace_name(self): root = ast.parse('a = ...
kartikdhar/djangotest
refs/heads/master
virt1/lib/python2.7/site-packages/django/conf/locale/el/formats.py
120
# -*- 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/m/Y' TIME_FORMAT = 'P' DATETIME...
gearmover/aptly
refs/heads/master
system/t05_snapshot/verify.py
14
from lib import BaseTest class VerifySnapshot1Test(BaseTest): """ verify snapshot: from wheezy """ fixtureDB = True fixtureCmds = ["aptly snapshot create snap1 from mirror wheezy-main"] runCmd = "aptly snapshot verify snap1" class VerifySnapshot2Test(BaseTest): """ verify snapshot: n...
pabulumm/neighbors
refs/heads/master
lib/python3.4/site-packages/django/core/paginator.py
347
import collections from math import ceil from django.utils import six class InvalidPage(Exception): pass class PageNotAnInteger(InvalidPage): pass class EmptyPage(InvalidPage): pass class Paginator(object): def __init__(self, object_list, per_page, orphans=0, allow_empty_first...
clairejaja/project-euler
refs/heads/master
src/main/python/problem5/smallest_multiple.py
1
# Claire Jaja # 11/4/2014 # # Project Euler # Problem 5 # Smallest multiple # # 2520 is the smallest number that can be divided by each of the numbers # from 1 to 10 without any remainder. # What is the smalelst positive number that is evenly divisible # by all the numbers from 1 to 20? def main(): smallest_multip...
wilsonssun/baseball-gamethread
refs/heads/master
build/lxml/src/lxml/tests/test_htmlparser.py
1
# -*- coding: utf-8 -*- """ HTML parser test cases for etree """ import unittest import tempfile, os, os.path, sys 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, StringIO, BytesIO, fileInTestDir, _bytes, _str from...
TOCyna/tabelinha
refs/heads/master
flask/lib/python2.7/site-packages/jinja2/optimizer.py
1401
# -*- coding: utf-8 -*- """ jinja2.optimizer ~~~~~~~~~~~~~~~~ The jinja optimizer is currently trying to constant fold a few expressions and modify the AST in place so that it should be easier to evaluate it. Because the AST does not contain all the scoping information and the compiler has to ...
ramusus/django-facebook-ads
refs/heads/master
settings_test.py
1
INSTALLED_APPS = ( 'oauth_tokens', 'facebook_api', ) OAUTH_TOKENS_FACEBOOK_CLIENT_ID = 439210362826994 OAUTH_TOKENS_FACEBOOK_CLIENT_SECRET = '02569c93d18e4bc6aa210e594af84652' OAUTH_TOKENS_FACEBOOK_SCOPE = ['offline_access'] OAUTH_TOKENS_FACEBOOK_USERNAME = '+919665223715' OAUTH_TOKENS_FACEBOOK_PASSWORD = 'jce...
yytang2012/linux-kvm-arm
refs/heads/master
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
11088
# Core.py - Python extension for perf script, core functions # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. from collections import defaultdict def aut...
grap/stock-logistics-workflow
refs/heads/8.0
__unported__/stock_move_on_hold/product.py
33
# -*- coding: utf-8 -*- ################################################################################# # # OpenERP, Open Source Management Solution # Copyright (C) 2011 Julius Network Solutions SARL <contact@julius.fr> # # This program is free software: you can redistribute it and/or modify # it under th...
tquizzle/Sick-Beard
refs/heads/development
bs4/tests/test_builder_registry.py
485
"""Tests of the builder registry.""" import unittest from bs4 import BeautifulSoup from bs4.builder import ( builder_registry as registry, HTMLParserTreeBuilder, TreeBuilderRegistry, ) try: from bs4.builder import HTML5TreeBuilder HTML5LIB_PRESENT = True except ImportError: HTML5LIB_PRESENT =...
rfree2/cjdns
refs/heads/master
node_build/dependencies/libuv/build/gyp/test/configurations/target_platform/gyptest-target_platform.py
351
#!/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. """ Tests the msvs specific msvs_target_platform option. """ import TestGyp import TestCommon def RunX64(exe, stdout): try: test.ru...
PepSalehi/scipy_2015_sklearn_tutorial
refs/heads/master
check_env.py
10
from __future__ import print_function try: import curses curses.setupterm() assert curses.tigetnum("colors") > 2 OK = "\x1b[1;%dm[ OK ]\x1b[0m" % (30 + curses.COLOR_GREEN) FAIL = "\x1b[1;%dm[FAIL]\x1b[0m" % (30 + curses.COLOR_RED) except: OK = '[ OK ]' FAIL = '[FAIL]' import sys try: i...
JohnOrlando/gnuradio-bitshark
refs/heads/burx_support
gr-radio-astronomy/src/python/qa_ra.py
5
#!/usr/bin/env python # # Copyright 2004,2006 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 opt...
grimmjow8/ansible
refs/heads/devel
test/units/modules/network/ios/test_ios_config.py
51
# # (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 d...
MeetMe/selenium
refs/heads/master
py/test/selenium/webdriver/common/appcache_tests.py
58
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
yjmade/odoo
refs/heads/8.0
addons/purchase_double_validation/purchase_double_validation_installer.py
432
# -*- 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...
blinktrade/bitex
refs/heads/master
libs/coinkit/setup.py
9
""" Coinkit ============== """ from setuptools import setup setup( name='coinkit', version='0.4.1', url='https://github.com/halfmoonlabs/coinkit', license='MIT', author='Halfmoon Labs', author_email='hello@halfmoon.io', description='Tools for Bitcoin & other cryptocurrencies (incl. Liteco...
pchaigno/grr
refs/heads/master
config/test.py
6
#!/usr/bin/env python """Configuration parameters for the test subsystem.""" import os from grr.lib import config_lib # Default for running in the current directory config_lib.DEFINE_constant_string( "Test.srcdir", os.path.normpath(os.path.dirname(__file__) + "/../.."), "The directory containing the source...
A-deLuna/servo
refs/heads/master
tests/wpt/web-platform-tests/websockets/handlers/echo_wsh.py
91
#!/usr/bin/python from mod_pywebsocket import msgutil _GOODBYE_MESSAGE = u'Goodbye' def web_socket_do_extra_handshake(request): # This example handler accepts any request. See origin_check_wsh.py for how # to reject access from untrusted scripts based on origin value. if request.ws_requested_protocols: ...
jchevin/MissionPlanner-master
refs/heads/master
Lib/site-packages/numpy/numarray/fft.py
102
from numpy.oldnumeric.fft import * import numpy.oldnumeric.fft as nof __all__ = nof.__all__ del nof
ltowarek/budget-supervisor
refs/heads/dependabot/pip/django-3.1.10
budgetsupervisor/saltedge_wrapper/tests/test_api.py
1
from typing import Any, Callable, Iterable import pytest import swagger_client as saltedge_client from saltedge_wrapper.factory import customers_api pytestmark = pytest.mark.saltedge @pytest.fixture def customer_factory() -> Iterable[Callable[..., saltedge_client.Customer]]: created_ids = [] def create_cus...
hynnet/hiwifi-openwrt-HC5661-HC5761
refs/heads/master
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/root-ralink/usr/lib/python2.7/dis.py
270
"""Disassembler of Python byte code into mnemonics.""" import sys import types from opcode import * from opcode import __all__ as _opcodes_all __all__ = ["dis", "disassemble", "distb", "disco", "findlinestarts", "findlabels"] + _opcodes_all del _opcodes_all _have_code = (types.MethodType, types.FunctionT...
wbphelps/ISSTracker
refs/heads/master
lcdButtons.py
1
#!/usr/bin/python import array, fcntl from time import sleep # test program to read state of buttons on HwLevel LCD display for Raspberry Pi # 12 March 2014 - William B Phelps - wm@usa.net # no warranty of any kind, use at your own risk #SSD1289_GET_KEYS = -2147202303 _IOC_NRBITS = 8 _IOC_TYPEBITS = 8 _IOC_SIZEBI...
jk1/intellij-community
refs/heads/master
python/testData/inspections/PyTypeCheckerInspection/MapArgumentsInOppositeOrderPy3.py
13
map(<weak_warning descr="Expected type '(Any) -> Any' (matched generic type '(_T1) -> _S'), got 'str' instead">'foo'</weak_warning>, <weak_warning descr="Expected type 'Iterable' (matched generic type 'Iterable[_T1]'), got '(c: Any) -> int' instead">lambda c: 42</weak_warning>)
jaredculp/faker
refs/heads/master
faker/providers/job/__init__.py
15
# coding=utf-8 localized = True from .. import BaseProvider class Provider(BaseProvider): jobs=["Academic librarian", "Accommodation manager", "Accountant, chartered", "Accountant, chartered certified", "Accountant, chartered management", "Accountant, chartered public finance", "Accounting technician", "Actor", "Ac...
RubenKelevra/rethinkdb
refs/heads/next
external/gtest_1.6.0/test/gtest_list_tests_unittest.py
1068
#!/usr/bin/env python # # Copyright 2006, 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...
foauth/oauth-proxy
refs/heads/master
services/stackexchange.py
2
import os from oauthlib.common import add_params_to_uri from werkzeug.urls import url_decode import foauth.providers class StackExchange(foauth.providers.OAuth2): # General info about the provider name = 'Stack Exchange' provider_url = 'https://stackexchange.com/' docs_url = 'https://api.stackexchange...
Comunitea/OCB
refs/heads/8.0
addons/project_issue/project_issue.py
46
#-*- 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...
mmottahedi/neuralnilm_prototype
refs/heads/master
scripts/e448.py
2
from __future__ import print_function, division import matplotlib import logging from sys import stdout matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab! from neuralnilm import (Net, RealApplianceSource, BLSTMLayer, DimshuffleLayer, Bidirectiona...
danijar/conny
refs/heads/master
test/test_network.py
1
import pytest from conny.core import Node, Network from conny.function import Constant, Sum, Product, Sigmoid from conny.utility import pairwise, connect_layers from test.fixtures import layers class TestNetwork: def test_counts(self, layers): network = Network(layers) assert len(network.current...
rghe/ansible
refs/heads/devel
lib/ansible/modules/cloud/cloudstack/cs_network_offering.py
38
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017, David Passante (@dpassante) # Copyright (c) 2017, René Moser <mail@renemoser.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': [...
mrunge/openstack_horizon
refs/heads/master
openstack_horizon/dashboards/project/volumes/volumes/tables.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...
Just-D/chromium-1
refs/heads/master
tools/telemetry/third_party/gsutilz/third_party/boto/boto/cloudtrail/exceptions.py
127
""" Exceptions that are specific to the cloudtrail module. """ from boto.exception import BotoServerError class InvalidSnsTopicNameException(BotoServerError): """ Raised when an invalid SNS topic name is passed to Cloudtrail. """ pass class InvalidS3BucketNameException(BotoServerError): """ ...
hbrunn/OCB
refs/heads/8.0
addons/base_import/models.py
222
import csv import itertools import logging import operator try: from cStringIO import StringIO except ImportError: from StringIO import StringIO import psycopg2 from openerp.osv import orm, fields from openerp.tools.translate import _ FIELDS_RECURSION_LIMIT = 2 ERROR_PREVIEW_BYTES = 200 _logger = logging.ge...
alephu5/Soundbyte
refs/heads/master
environment/lib/python3.3/site-packages/nose/plugins/prof.py
106
"""This plugin will run tests using the hotshot profiler, which is part of the standard library. To turn it on, use the ``--with-profile`` option or set the NOSE_WITH_PROFILE environment variable. Profiler output can be controlled with the ``--profile-sort`` and ``--profile-restrict`` options, and the profiler output f...
irmen/Pyro5
refs/heads/master
examples/circular/servA.py
1
import Pyro5.api import chain this_node = "A" next_node = "B" servername = "example.chain." + this_node with Pyro5.api.Daemon() as daemon: obj = chain.Chain(this_node, next_node) uri = daemon.register(obj) with Pyro5.api.locate_ns() as ns: ns.register(servername, uri) # enter the service lo...
beaker-project/beaker
refs/heads/develop
IntegrationTests/src/bkr/inttest/server/test_utilisation.py
2
# 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 2 of the License, or # (at your option) any later version. import datetime from turbogears.database import session from bkr.serve...
LiveZenLK/CeygateERP
refs/heads/master
addons/event_sale/models/__init__.py
82
# -*- coding: utf-8 -*- import sale_order import product import event
iurisilvio/flask-admin
refs/heads/master
doc/conf.py
23
# -*- coding: utf-8 -*- # # flask-admin documentation build configuration file, created by # sphinx-quickstart on Tue Nov 01 18:35:30 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. # #...
CrimsonDev14/crimsoncoin
refs/heads/master
contrib/testgen/gen_base58_test_vectors.py
1
#!/usr/bin/env python # Copyright (c) 2012-2016 The crimson Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Generate valid and invalid base58 address and private key test vectors. Usage: gen_base58_test_ve...
basraven/Thesis
refs/heads/master
Implementation/Code/test9/classes/propertyconnecter.py
3
class propertyconnecter(): import logging logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO) def formatResults(self, results): arrayedresults = [] for result in results: resultdict = {} for value in resul...
abm/crypto
refs/heads/master
python/abm_crypto.3.py
1
import base64 import binascii import itertools import re import urllib2 import random import math from operator import itemgetter from Crypto.Cipher import AES h = binascii.hexlify def xor(a, b): """XOR two hex strings >>> xor('1c0111001f010100061a024b53535009181c', '686974207468652062756c6c277320657965') ...
MERegistro/meregistro
refs/heads/master
meregistro/apps/registro/forms/ExtensionAulicaInformacionEdiliciaForm.py
1
# -*- coding: utf-8 -*- from apps.registro.models.ExtensionAulicaInformacionEdilicia import ExtensionAulicaInformacionEdilicia from apps.registro.models.Nivel import Nivel from apps.registro.models.TipoCompartido import TipoCompartido from apps.registro.models.TipoDominio import TipoDominio from django.core.exceptions ...
michellemorales/OpenMM
refs/heads/master
models/object_detection/core/box_list_test.py
27
# 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...
tedder/ansible
refs/heads/devel
lib/ansible/modules/network/fortios/fortios_firewall_ssl_server.py
24
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
likaiwalkman/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/newstringio.py
132
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
fusionbox/django-filer
refs/heads/develop
runtests.py
12
#!/usr/bin/env python from filer.test_utils.cli import configure from filer.test_utils.tmpdir import temp_dir import argparse import sys import warnings def main(verbosity=1, failfast=False, test_labels=None): verbosity = int(verbosity) with temp_dir() as STATIC_ROOT: with temp_dir() as MEDIA_ROOT: ...
saurabh6790/medsynaptic1-app
refs/heads/master
buying/doctype/supplier/test_supplier.py
30
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt test_records = [ [{ "doctype": "Supplier", "supplier_name": "_Test Supplier", "supplier_type": "_Test Supplier Type", "company": "_Test Company" }] ]