repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
sbellem/bitcoin
qa/rpc-tests/receivedby.py
140
7345
#!/usr/bin/env python2 # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Exercise the listreceivedbyaddress API from test_framework.test_framework import BitcoinTestFramework from ...
mit
dayongxie/mod-pbxproj
pbxproj/XcodeProject.py
2
2206
import shutil import datetime from pbxproj.pbxextensions import * class XcodeProject(PBXGenericObject, ProjectFiles, ProjectFlags, ProjectGroups): """ Top level class, handles the project CRUD operations, new, load, save, delete. Also, exposes methods to manipulate the project's content, add/remove files,...
bsd-3-clause
freeflightsim/ffs-app-engine
_freeflightsim.appspot.com.1/gdata/test_config.py
2
14876
#!/usr/bin/env python # Copyright (C) 2009 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 l...
gpl-2.0
WhireCrow/openwrt-mt7620
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/ctypes/test/test_internals.py
109
2623
# This tests the internal _objects attribute import unittest from ctypes import * from sys import getrefcount as grc # XXX This test must be reviewed for correctness!!! """ ctypes' types are container types. They have an internal memory block, which only consists of some bytes, but it has to keep references to other...
gpl-2.0
PolicyStat/django
tests/model_fields/models.py
21
9803
import os import tempfile import uuid import warnings try: from PIL import Image except ImportError: Image = None from django.core.files.storage import FileSystemStorage from django.db import models from django.db.models.fields.files import ImageFieldFile, ImageField from django.utils import six class Foo(m...
bsd-3-clause
mihaip/NewsBlur
apps/rss_feeds/management/commands/mark_read.py
19
1348
from django.core.management.base import BaseCommand from django.contrib.auth.models import User from apps.reader.models import UserSubscription from optparse import make_option import datetime class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option("-d", "--days", dest="days", nar...
mit
yqm/sl4a
python-build/python-libs/gdata/tests/gdata_tests/blogger/service_test.py
128
3578
#!/usr/bin/python # # Copyright (C) 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
lmascare/utils
python/admin/lank/db_bkup_restore_schema.py
1
1130
r"""Schema file to host status of MySQL Database backups.""" def table_db_brman_status(*args): r"""DDL for Database Backups Status.""" create_sql = """ CREATE TABLE IF NOT EXISTS db_brman_status ( dbname varchar(16), bkup_rest varchar(8), filename varchar(128), filesiz...
artistic-2.0
henryhallam/piksi_firmware
scripts/serial_link.py
1
13314
#!/usr/bin/env python # Copyright (C) 2011-2014 Swift Navigation Inc. # Contact: Fergus Noble <fergus@swift-nav.com> # # This source is subject to the license found in the file 'LICENSE' which must # be be distributed together with this source. All other rights reserved. # # THIS CODE AND INFORMATION IS PROVIDED "AS IS...
gpl-3.0
yamada-h/ryu
ryu/services/protocols/bgp/operator/commands/show/vrf.py
5
5246
import logging import pprint from ryu.services.protocols.bgp.operator.command import Command from ryu.services.protocols.bgp.operator.command import CommandsResponse from ryu.services.protocols.bgp.operator.command import STATUS_ERROR from ryu.services.protocols.bgp.operator.command import STATUS_OK from ryu.services....
apache-2.0
sursum/buckanjaren
buckanjaren/lib/python3.5/site-packages/django/contrib/auth/urls.py
105
1140
# The views used below are normally mapped in django.contrib.admin.urls.py # This URLs file is used to provide a reliable view deployment for test purposes. # It is also provided as a convenience to those who want to deploy these URLs # elsewhere. from django.conf.urls import url from django.contrib.auth import views ...
mit
safchain/contrail-controller
src/config/test/config_systest.py
16
1779
#!/usr/bin/env python # # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # # # analytics_systest.py # # System tests for analytics # import sys builddir = sys.path[0] + '/../..' from gevent import monkey monkey.patch_all() import os import unittest import testtools import fixtures import socket from...
apache-2.0
kalahbrown/HueBigSQL
desktop/core/ext-py/requests-2.6.0/requests/packages/chardet/sjisprober.py
1777
3764
######################## 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...
apache-2.0
mccheung/kbengine
kbe/res/scripts/common/Lib/lib2to3/fixes/fix_metaclass.py
88
8201
"""Fixer for __metaclass__ = X -> (metaclass=X) methods. The various forms of classef (inherits nothing, inherits once, inherints many) don't parse the same in the CST so we look at ALL classes for a __metaclass__ and if we find one normalize the inherits to all be an arglist. For one-liner classes ('c...
lgpl-3.0
0359xiaodong/viewfinder
backend/www/test/save_photos_test.py
13
19773
# Copyright 2013 Viewfinder Inc. All Rights Reserved. """Test saving photos to a default viewpoint. """ __author__ = 'andy@emailscrubbed.com (Andy Kimball)' import mock import time from copy import deepcopy from functools import partial from operator import itemgetter from viewfinder.backend.base import util from v...
apache-2.0
mhaessig/servo
tests/wpt/css-tests/tools/manifest/item.py
62
6322
import os from six.moves.urllib.parse import urljoin from abc import ABCMeta, abstractmethod, abstractproperty def get_source_file(source_files, tests_root, manifest, path): def make_new(): from .sourcefile import SourceFile return SourceFile(tests_root, path, manifest.url_base) if source_fi...
mpl-2.0
royosherove/bitcoinxt
qa/rpc-tests/txn_doublespend.py
101
6478
#!/usr/bin/env python2 # Copyright (c) 2014 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 proper accounting with a double-spend conflict # from test_framework.test_framework import BitcoinTe...
mit
andrewyoung1991/abjad
abjad/tools/agenttools/IterationAgent.py
1
48284
# -*- encoding: utf-8 -*- from __future__ import print_function import collections from abjad.tools import abctools from abjad.tools import durationtools from abjad.tools import scoretools from abjad.tools import sequencetools from abjad.tools import spannertools from abjad.tools.topleveltools import inspect_ from abja...
gpl-3.0
DevangS/CoralNet
images/migrations/0011_view_and_edit_perms_for_sources.py
1
18414
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): depends_on = ( ("guardian", "0005_auto__chg_field_groupobjectpermission_object_pk__chg_field_userobjectp"), ) def forwards(self, orm): ...
bsd-2-clause
andreyvit/pyjamas
library/__ie6__/pyjamas/History.py
5
2645
def init(): JS(""" // Check for existence of the history frame. var historyFrame = $doc.getElementById('__pygwt_historyFrame'); if (!historyFrame) return false; // Get the initial token from the url's hash component. var hash = $wnd.location.hash; if (hash.length > 0) $wnd._...
apache-2.0
sserrot/champion_relationships
venv/Lib/site-packages/pip/_internal/models/format_control.py
11
2823
from pip._vendor.packaging.utils import canonicalize_name from pip._internal.exceptions import CommandError from pip._internal.utils.typing import MYPY_CHECK_RUNNING if MYPY_CHECK_RUNNING: from typing import Optional, Set, FrozenSet class FormatControl(object): """Helper for managing formats from which a pa...
mit
Ecogenomics/GTDBNCBI
scripts_dev/legacy_code/ncbi_ftp_update/update_genbank_from_ftp_files.py
1
18935
#!/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...
gpl-3.0
Matt-Deacalion/django
django/utils/baseconv.py
650
2982
# Copyright (c) 2010 Guilherme Gondim. All rights reserved. # Copyright (c) 2009 Simon Willison. All rights reserved. # Copyright (c) 2002 Drew Perttula. All rights reserved. # # License: # Python Software Foundation License version 2 # # See the file "LICENSE" for terms & conditions for usage, and a DISCLAIMER OF # ...
bsd-3-clause
redhat-openstack/trove
trove/tests/unittests/common/test_remote.py
3
28702
# Copyright 2013 OpenStack Foundation # Copyright 2013 Rackspace Hosting # Copyright 2013 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a co...
apache-2.0
skymanaditya1/numpy
numpy/distutils/command/build_py.py
264
1210
from __future__ import division, absolute_import, print_function from distutils.command.build_py import build_py as old_build_py from numpy.distutils.misc_util import is_string class build_py(old_build_py): def run(self): build_src = self.get_finalized_command('build_src') if build_src.py_modules...
bsd-3-clause
cloudfoundry-community/etherpad-lite-cf
bin/dirty-db-cleaner.py
1
1520
#!/usr/bin/env PYTHONUNBUFFERED=1 python # # Created by Bjarni R. Einarsson, placed in the public domain. Go wild! # import json import os import sys try: dirtydb_input = sys.argv[1] dirtydb_output = '%s.new' % dirtydb_input assert(os.path.exists(dirtydb_input)) assert(not os.path.exists(dirtydb_output...
apache-2.0
vuolter/pyload
src/pyload/plugins/downloaders/ZippyshareCom.py
2
4066
# -*- coding: utf-8 -*- import re import urllib.parse from bs4 import BeautifulSoup from pyload.core.utils.misc import eval_js from ..anticaptchas.ReCaptcha import ReCaptcha from ..base.simple_downloader import SimpleDownloader class ZippyshareCom(SimpleDownloader): __name__ = "ZippyshareCom" __type__ = "...
agpl-3.0
zofuthan/airmozilla
airmozilla/comments/helpers.py
13
1205
import hashlib import re import jinja2 from jingo import register from django.template.loader import render_to_string from airmozilla.comments.models import Comment @register.function def recurse_comments(comment, discussion, request, query_filter, can_manage_comments): comments = Comment....
bsd-3-clause
roryk/bipy
bipy/toolbox/novoalign.py
1
1472
""" handling running novoalign """ from bipy.utils import (build_results_dir, flatten, which, replace_suffix, flatten_options) from bcbio.utils import safe_makedir import os import subprocess import logging logger = logging.getLogger(__name__) def _build_output_file(input_file, novoalign_con...
mit
samatt/OpenWPM
automation/SocketInterface.py
2
5024
import Queue import threading import socket import struct import json #TODO - Implement a cleaner shutdown for server socket # see: https://stackoverflow.com/questions/1148062/python-socket-accept-blocks-prevents-app-from-quitting class serversocket: """ A server socket to recieve and process string messages ...
gpl-3.0
kanghj/dinner-tables-planner
tables/solve.py
1
10927
import csv import uuid from collections import defaultdict import subprocess import os import re import tempfile import boto3 import json import math from werkzeug.utils import secure_filename from botocore.exceptions import ClientError from openpyxl import load_workbook from .coarser import coarse_local s3 = boto3...
mit
blois/AndroidSDKCloneMin
ndk/prebuilt/linux-x86_64/lib/python2.7/sgmllib.py
306
17884
"""A parser for SGML, using the derived class as a static DTD.""" # XXX This only supports those SGML features used by HTML. # XXX There should be a way to distinguish between PCDATA (parsed # character data -- the normal case), RCDATA (replaceable character # data -- only char and entity references and end tags are ...
apache-2.0
bhargav/scikit-learn
sklearn/ensemble/tests/test_forest.py
26
41675
""" Testing for the forest module (sklearn.ensemble.forest). """ # Authors: Gilles Louppe, # Brian Holt, # Andreas Mueller, # Arnaud Joly # License: BSD 3 clause import pickle from collections import defaultdict from itertools import combinations from itertools import product import numpy ...
bsd-3-clause
sudovijay/youtube-dl
youtube_dl/extractor/tweakers.py
37
2227
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( xpath_text, xpath_with_ns, int_or_none, float_or_none, ) class TweakersIE(InfoExtractor): _VALID_URL = r'https?://tweakers\.net/video/(?P<id>\d+)' _TEST = { 'url': 'https://tweakers.net/vid...
unlicense
Weihonghao/ECM
Vpy34/lib/python3.5/site-packages/tensorflow/contrib/slim/python/slim/nets/vgg.py
25
10637
# 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 applicable ...
agpl-3.0
Weihonghao/ECM
Vpy34/lib/python3.5/site-packages/numpy/distutils/command/autodist.py
148
2048
"""This module implements additional tests ala autoconf which can be useful. """ from __future__ import division, absolute_import, print_function # We put them here since they could be easily reused outside numpy.distutils def check_inline(cmd): """Return the inline identifier (may be empty).""" cmd._check_...
agpl-3.0
miguelinux/vbox
src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/Common/TargetTxtClassObject.py
1
8415
## @file # This file is used to define each component of Target.txt file # # Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR> # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. Th...
gpl-2.0
BehavioralInsightsTeam/edx-platform
lms/djangoapps/course_api/blocks/transformers/milestones.py
14
6712
""" Milestones Transformer """ import logging from django.conf import settings from edx_proctoring.api import get_attempt_status_summary from edx_proctoring.exceptions import ProctoredExamNotFoundException from openedx.core.djangoapps.content.block_structure.transformer import ( BlockStructureTransformer, ) from...
agpl-3.0
HalcyonChimera/osf.io
website/search_migration/__init__.py
2
34031
JSON_UPDATE_NODES_SQL = """ SELECT json_agg( json_build_object( '_type', CASE WHEN N.type = 'osf.registration' THEN 'registration' WHEN PREPRINT.URL IS NOT NULL THEN 'preprint' WHEN PARENT_GUID._id IS NULL ...
apache-2.0
revmischa/boto
boto/ec2/autoscale/tag.py
173
3379
# 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 ...
mit
MrNuggles/HeyBoet-Telegram-Bot
temboo/Library/Xively/Triggers/ReadTrigger.py
5
3479
# -*- coding: utf-8 -*- ############################################################################### # # ReadTrigger # Returns a specific trigger for the authenticated account. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you...
gpl-3.0
Blitzen/oauthlib
oauthlib/oauth2/rfc6749/request_validator.py
33
19622
# -*- coding: utf-8 -*- """ oauthlib.oauth2.rfc6749.grant_types ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ from __future__ import unicode_literals, absolute_import import logging log = logging.getLogger(__name__) class RequestValidator(object): def client_authentication_required(self, request, *args, **kwargs): ...
bsd-3-clause
evanma92/routeh
flask/lib/python2.7/site-packages/whoosh/filedb/filetables.py
52
25256
# Copyright 2009 Matt Chaput. 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 notice, # this list of conditions and the...
bsd-3-clause
liuming9283/SmartGateway
serial_python/main_entry.py
1
1410
#!/usr/bin/env python # coding:utf-8 # 项目的主程序入口,利用python多进程 # created by webber 2017/1/13 import sys import multiprocessing import httpclient import http_multi_threading import gateway_monitor import websocket_test import tcp_wifi import tcp_control plist = [] def worker_1(): print '=========worker---1 start !...
gpl-3.0
tun4f1sh/virtuous-kernel-7x30-gingerbread
arch/ia64/scripts/unwcheck.py
13143
1714
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
gpl-2.0
lafayette/JBTT
framework/python/Lib/re.py
7
12841
# # Secret Labs' Regular Expression Engine # # re-compatible interface for the sre matching engine # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # This version of the SRE library can be redistributed under CNRI's # Python 1.6 license. For any other use, please contact Secret Labs # AB (info@py...
mit
kytvi2p/tahoe-lafs
setuptools-0.6c16dev4.egg/setuptools/site-patch.py
7
2327
def __boot(): import sys, imp, os, os.path PYTHONPATH = os.environ.get('PYTHONPATH') if PYTHONPATH is None or (sys.platform=='win32' and not PYTHONPATH): PYTHONPATH = [] else: PYTHONPATH = PYTHONPATH.split(os.pathsep) pic = getattr(sys,'path_importer_cache',{}) stdpath = sys.pat...
gpl-2.0
barry-scott/git-workbench
Source/Common/wb_debug.py
2
2965
''' ==================================================================== Copyright (c) 2016 Barry A Scott. All rights reserved. This software is licensed as described in the file LICENSE.txt, which you should have received as part of this distribution. ===========================================================...
apache-2.0
Azure/azure-sdk-for-python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/_compute_management_client.py
1
13836
# 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 may ...
mit
sivakuna-aap/superdesk-core
superdesk/eve_backend.py
2
8327
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license from flask ...
agpl-3.0
kou/zulip
zerver/lib/export.py
2
69765
# This is the main code for the `./manage.py export` data export tool. # User docs: https://zulip.readthedocs.io/en/latest/production/export-and-import.html # # Most developers will interact with this primarily when they add a # new table to the schema, in which case they likely need to (1) add # it the lists in `ALL_Z...
apache-2.0
jbenden/ansible
lib/ansible/modules/network/cloudengine/ce_dldp_interface.py
42
22885
#!/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...
gpl-3.0
supriyantomaftuh/syzygy
third_party/numpy/files/numpy/core/tests/test_regression.py
11
55215
from StringIO import StringIO import pickle import sys import platform import gc import copy from os import path from numpy.testing import * from numpy.testing.utils import _assert_valid_refcount, WarningManager from numpy.compat import asbytes, asunicode, asbytes_nested import warnings import tempfile import numpy as ...
apache-2.0
AlexProfi/django-cms
cms/tests/test_signals.py
23
4283
# -*- coding: utf-8 -*- from __future__ import with_statement from contextlib import contextmanager from django.conf import settings from django.contrib.auth import get_user_model from django.test import TestCase from django.test.utils import override_settings from cms.api import create_page from cms.models import ...
bsd-3-clause
yograterol/django
django/contrib/staticfiles/management/commands/findstatic.py
463
1745
from __future__ import unicode_literals import os from django.contrib.staticfiles import finders from django.core.management.base import LabelCommand from django.utils.encoding import force_text class Command(LabelCommand): help = "Finds the absolute paths for the given static file(s)." label = 'static file...
bsd-3-clause
kickstandproject/wildcard
wildcard/openstack/common/fileutils.py
1
2986
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apac...
apache-2.0
dmsimard/ansible
lib/ansible/modules/wait_for.py
4
25813
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012, Jeroen Hoekx <jeroen@hoekx.be> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r''' --- module: wait_for...
gpl-3.0
ryfeus/lambda-packs
pytorch/source/torch/distributions/one_hot_categorical.py
1
3680
import torch from torch.distributions import constraints from torch.distributions.categorical import Categorical from torch.distributions.distribution import Distribution class OneHotCategorical(Distribution): r""" Creates a one-hot categorical distribution parameterized by :attr:`probs` or :attr:`logits`...
mit
tkarna/cofs
test/swe2d/generate_basin_mms_setup.py
2
4988
""" Generates setups for 2d shallow water MMS tests """ import sympy from sympy import init_printing init_printing() # coordinates x, y, z = sympy.symbols('x[0] x[1] x[2]') z_tilde = sympy.symbols('z_tilde') # domain lenght, x in [0, Lx], y in [0, Ly] lx, ly = sympy.symbols('lx ly') # depth scale h0 = sympy.symbols(...
mit
hmcmooc/muddx-platform
common/lib/capa/capa/tests/response_xml_factory.py
47
34688
from lxml import etree from abc import ABCMeta, abstractmethod class ResponseXMLFactory(object): """ Abstract base class for capa response XML factories. Subclasses override create_response_element and create_input_element to produce XML of particular response types""" __metaclass__ = ABCMeta @a...
agpl-3.0
datalogics-robb/scons
test/SHLIBSUFFIX.py
2
1597
#!/usr/bin/env python # # __COPYRIGHT__ # # 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, ...
mit
sankhesh/VTK
Imaging/Core/Testing/Python/TestAllLogic.py
26
3380
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' ========================================================================= Program: Visualization Toolkit Module: TestNamedColorsIntegration.py Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www....
bsd-3-clause
endlessm/chromium-browser
native_client/pnacl/driver/driver_env.py
2
18165
#!/usr/bin/python # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Global environment and expression parsing for the PNaCl driver # This dictionary initializes a shell-like environment. # Shell...
bsd-3-clause
pekeler/arangodb
3rdParty/V8-4.3.61/build/gyp/test/make/gyptest-noload.py
362
2023
#!/usr/bin/env python # Copyright (c) 2010 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 use of the NO_LOAD flag which makes loading sub .mk files optional. """ # Python 2.5 needs this for the with statement. from ...
apache-2.0
chen0510566/MissionPlanner
Lib/site-packages/numpy/doc/structured_arrays.py
58
7222
""" ===================================== Structured Arrays (aka Record Arrays) ===================================== Introduction ============ Numpy provides powerful capabilities to create arrays of structs or records. These arrays permit one to manipulate the data by the structs or by fields of the struct. A simpl...
gpl-3.0
wooga/airflow
airflow/providers/google/marketing_platform/example_dags/example_search_ads.py
5
2874
# # 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...
apache-2.0
futurecolors/suds
suds/serviceproxy.py
206
2978
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
lgpl-3.0
tnwhitwell/lexicon
lexicon/providers/cloudflare.py
1
4914
from __future__ import absolute_import from __future__ import print_function import json import logging import requests from .base import Provider as BaseProvider logger = logging.getLogger(__name__) def ProviderParser(subparser): subparser.add_argument("--auth-username", help="specify email address used to a...
mit
red-hood/calendarserver
contrib/performance/benchmarks/find_events.py
1
3184
## # Copyright (c) 2010-2015 Apple Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
apache-2.0
gnu3ra/SCC15HPCRepast
INSTALLATION/boost_1_54_0/libs/python/pyste/src/Pyste/utils.py
54
2614
# Copyright Bruno da Silva de Oliveira 2003. Use, modification and # distribution is subject to the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) from __future__ import generators import string import sys #===========================...
bsd-3-clause
honnibal/spaCy
spacy/lookups.py
1
8880
# coding: utf-8 from __future__ import unicode_literals import srsly from collections import OrderedDict from preshed.bloom import BloomFilter from .errors import Errors from .util import SimpleFrozenDict, ensure_path from .strings import get_string_id UNSET = object() class Lookups(object): """Container for ...
mit
gsmartway/odoo
addons/sale_crm/__openerp__.py
260
2036
# -*- 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
yanikou19/pymatgen
pymatgen/io/feffio_set.py
3
9972
# coding: utf-8 from __future__ import division, unicode_literals """ This module defines the FeffInputSet abstract base class and a concrete implementation for the Materials Project. The basic concept behind an input set is to specify a scheme to generate a consistent set of Feff inputs from a structure without fur...
mit
remybaranx/qtaste
doc/src/docbkx/scripts/lib/PyGithub/github/StatsParticipation.py
74
2654
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> # # ...
gpl-3.0
SiCKRAGETV/SickRage
sickrage/core/media/__init__.py
2
2512
from __future__ import unicode_literals import io import os from mimetypes import guess_type from tornado.escape import url_escape import sickrage from sickrage.core.exceptions import MultipleShowObjectsException from sickrage.core.helpers import findCertainShow class Media(object): def __init__(self, indexer_...
gpl-3.0
epfl-cosmo/lammps
tools/moltemplate/moltemplate/lttree_styles.py
8
10397
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Andrew Jewett (jewett.aij at g mail) # http://www.chem.ucsb.edu/~sheagroup # License: 3-clause BSD License (See LICENSE.TXT) # Copyright (c) 2012, Regents of the University of California # All rights reserved. try: from .ttree_lex import InputError ...
gpl-2.0
Sutto/cloud-custodian
tools/c7n_mailer/c7n_mailer/ldap_lookup.py
5
9070
# Copyright 2017 Capital One Services, 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 in...
apache-2.0
40223110/2015cd_midterm-
static/Brython3.1.1-20150328-091302/Lib/unittest/loader.py
739
13883
"""Loading unittests.""" import os import re import sys import traceback import types import functools from fnmatch import fnmatch from . import case, suite, util __unittest = True # what about .pyc or .pyo (etc) # we would need to avoid loading the same tests multiple times # from '.py', '.pyc' *and* '.pyo' VALID...
gpl-3.0
coursemdetw/2014c2
w2/static/Brython2.0.0-20140209-164925/Lib/test/support.py
111
67787
"""Supporting definitions for the Python regression tests.""" if __name__ != 'test.support': raise ImportError('support must be imported from the test package') import contextlib import errno import functools import gc import socket import sys import os import platform import shutil import warnings import unittes...
gpl-2.0
PythonSanSebastian/epcon
conference/forms.py
1
25437
# -*- coding: UTF-8 -*- from django import forms from django.conf import settings as dsettings from django.contrib.admin import widgets as admin_widgets from django.core import mail from django.db import transaction from django.forms import widgets from django.forms.util import flatatt from django.utils.encoding import...
bsd-2-clause
USGS-EROS/lcmap-firebird
test/test_pyccd.py
1
6748
from ccdc import cassandra from ccdc import ids from ccdc import pyccd from cytoolz import first from cytoolz import get #from .shared import ccd_schema_names #from .shared import ccd_format_keys #from .shared import faux_dataframe #from .shared import mock_cassandra_read #from .shared import timeseries_element from py...
unlicense
sencha/chromium-spacewalk
tools/perf/measurements/memory_pressure.py
7
1856
# 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. """Multi tab memory test. This test is a multi tab test, but we're interested in measurements for the entire test rather than each single page. """ import ...
bsd-3-clause
2014c2g14/2014c2
wsgi/static/Brython2.1.0-20140419-113919/Lib/errno.py
113
2776
""" This module makes available standard errno system symbols. The value of each symbol is the corresponding integer value, e.g., on most systems, errno.ENOENT equals the integer 2. The dictionary errno.errorcode maps numeric codes to symbol names, e.g., errno.errorcode[2] could be the string 'ENOENT'. Symbols that ar...
gpl-2.0
wangming28/syzygy
third_party/virtualenv/files/virtualenv_support/distribute_setup.py
32
15757
#!python """Bootstrap distribute installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from distribute_setup import use_setuptools use_setuptools() If you want to require a specific version of se...
apache-2.0
Dazzozo/huawei-kernel-3.4
arch/ia64/scripts/unwcheck.py
13143
1714
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
gpl-2.0
glneo/gnuradio
gr-qtgui/apps/plot_psd_base.py
47
5350
#!/usr/bin/env python # # Copyright 2013 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) # ...
gpl-3.0
glneo/gnuradio
gr-uhd/examples/python/usrp_wfm_rcv.py
58
11053
#!/usr/bin/env python # # Copyright 2005-2007,2009,2011,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...
gpl-3.0
yangqun/lily2-gem5
src/arch/x86/isa/insts/x87/data_transfer_and_conversion/convert_and_load_or_store_bcd.py
91
2157
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
bsd-3-clause
speedbot/android_kernel_htc_golfu
arch/ia64/scripts/unwcheck.py
13143
1714
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
gpl-2.0
MISS3D/s2p
s2p/block_matching.py
1
12352
# Copyright (C) 2015, Carlo de Franchis <carlo.de-franchis@ens-cachan.fr> # Copyright (C) 2015, Gabriele Facciolo <facciolo@cmla.ens-cachan.fr> # Copyright (C) 2015, Enric Meinhardt <enric.meinhardt@cmla.ens-cachan.fr> # Copyright (C) 2015, Julien Michel <julien.michel@cnes.fr> import os import numpy as np from s2p i...
agpl-3.0
Big-B702/python-for-android
python3-alpha/python3-src/Lib/test/test_normalization.py
62
3225
from test.support import run_unittest, open_urlresource import unittest from http.client import HTTPException import sys import os from unicodedata import normalize, unidata_version TESTDATAFILE = "NormalizationTest.txt" TESTDATAURL = "http://www.unicode.org/Public/" + unidata_version + "/ucd/" + TESTDATAFILE def ch...
apache-2.0
wenlinyao/RegularTemporalEventPairs
model/generate_new_seed_test.py
1
4331
from nltk.stem.snowball import SnowballStemmer from util_class import * #from nltk.stem.wordnet import WordNetLemmatizer def transform_format(line): words = line.split() for i, word in enumerate(words): if word in ["<==", "==>", "<==>"] and i != 0: relation_index = i #pair = " ".join(w...
mit
CyanogenMod/android_kernel_samsung_msm8930-common
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py
12980
5411
# SchedGui.py - Python extension for perf script, basic GUI code for # traces drawing and overview. # # Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com> # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. ...
gpl-2.0
jholewinski/ics-12-overlapped-tiling
scripts/yaml/representer.py
359
17642
__all__ = ['BaseRepresenter', 'SafeRepresenter', 'Representer', 'RepresenterError'] from error import * from nodes import * import datetime import sys, copy_reg, types class RepresenterError(YAMLError): pass class BaseRepresenter(object): yaml_representers = {} yaml_multi_representers = {} d...
mit
wetneb/django
tests/template_tests/filter_tests/test_dictsortreversed.py
342
1066
from django.template.defaultfilters import dictsortreversed from django.test import SimpleTestCase class FunctionTests(SimpleTestCase): def test_sort(self): sorted_dicts = dictsortreversed( [{'age': 23, 'name': 'Barbara-Ann'}, {'age': 63, 'name': 'Ra Ra Rasputin'}, {...
bsd-3-clause
openstack/horizon
openstack_dashboard/dashboards/identity/identity_providers/protocols/views.py
1
1697
# Copyright (C) 2015 Yahoo! Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
apache-2.0
thaumos/ansible
lib/ansible/modules/cloud/vmware/vmware_host_acceptance.py
48
6958
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metadat...
gpl-3.0
jcrist/pydy
examples/Kane1985/Chapter4/Ex8.18.py
7
1162
#!/usr/bin/env python # -*- coding: utf-8 -*- """Exercise 8.18 from Kane 1985.""" from __future__ import division from sympy import symbols from sympy.physics.mechanics import ReferenceFrame from sympy.physics.mechanics import cross, dot, dynamicsymbols, inertia from util import msprint print("\n part a") Ia, Ib, Ic,...
bsd-3-clause
JTCunning/sentry
tests/sentry/quotas/redis/tests.py
13
2628
# -*- coding: utf-8 -*- from __future__ import absolute_import import mock from exam import fixture, patcher from sentry.quotas.redis import RedisQuota from sentry.testutils import TestCase class RedisQuotaTest(TestCase): @fixture def quota(self): inst = RedisQuota(hosts={ 0: {'db': 9}...
bsd-3-clause
dwaynebailey/virtaal
virtaal/plugins/tm/models/google_translate.py
4
6927
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2009 Zuza Software Foundation # Copyright 2014 F Wolff # # This file is part of Virtaal. # # 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 Foundat...
gpl-2.0