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
aarondewindt/paparazzi_torrap
sw/ground_segment/python/udp_link/datalink_to_w5100.py
89
1441
#!/usr/bin/python import os import sys import socket import struct from optparse import OptionParser sys.path.append(os.getenv("PAPARAZZI_HOME") + "/sw/lib/python") parser = OptionParser() parser.add_option("-d", "--destip", dest="dest_addr", help="Destination IP for messages picked up from local socket", default="1...
gpl-2.0
52ai/django-ccsds
tests/template_tests/filter_tests/test_cut.py
521
2269
from django.template.defaultfilters import cut from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class CutTests(SimpleTestCase): @setup({'cut01': '{% autoescape off %}{{ a|cut:"x" }} {{ b|cut:"x" }}{% endautoescape %}'}) def test_cut01(self): ...
bsd-3-clause
scaramallion/pynetdicom
pynetdicom/tests/encoded_dimse_n_msg.py
2
15444
"""Encoding DIMSE-N messages for use in testing.""" n_er_rq_cmd = ( # Message control header byte: command set, last fragment b'\x03' # Command Group Length, length 4, value 110 b'\x00\x00\x00\x00\x04\x00\x00\x00\x6e\x00\x00\x00' # Affected SOP Class UID, length 26, value 1.2.840.10008.5.1.4.1.1.2...
mit
getcircle/protobuf-to-dict
src/tests/sample_proto3_pb2.py
1
5497
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: tests/sample-proto3.proto from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.p...
unlicense
samithaj/headphones
lib/unidecode/x017.py
252
4190
data = ( '[?]', # 0x00 '[?]', # 0x01 '[?]', # 0x02 '[?]', # 0x03 '[?]', # 0x04 '[?]', # 0x05 '[?]', # 0x06 '[?]', # 0x07 '[?]', # 0x08 '[?]', # 0x09 '[?]', # 0x0a '[?]', # 0x0b '[?]', # 0x0c '[?]', # 0x0d '[?]', # 0x0e '[?]', # 0x0f '[?]', # 0x10 '[?]', # 0x11 '[?]'...
gpl-3.0
vollov/net-audit
src/werkzeug/testsuite/datastructures.py
76
19939
# -*- coding: utf-8 -*- """ werkzeug.testsuite.datastructures ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the functionality of the provided Werkzeug datastructures. TODO: - FileMultiDict - convert to proper asserts - Immutable types undertested - Split up dict tests :copy...
mit
googleinterns/userjourneytool
tests/test_transformers.py
1
9933
# pylint: disable=redefined-outer-name from unittest.mock import Mock, patch import pytest from graph_structures_pb2 import Client, Node, NodeType, Status, VirtualNode import ujt.constants import ujt.transformers @pytest.fixture def patch_path(): return "ujt.transformers" def test_apply_node_property_classes...
apache-2.0
schleichdi2/OPENNFR-6.3-CORE
meta-oe-alliance/meta-brands/meta-edision/recipes-linux/linux-edision-5.3/findkerneldevice.py
7
3237
#!/usr/bin/python import os import sys import collections import struct import sys import uuid # http://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_table_header_.28LBA_1.29 GPT_HEADER_FORMAT = """ 8s signature 4s revision L header_size L crc32 4x _ Q current_lba Q backup_lba Q first_usable_lba Q last_usable_...
gpl-2.0
labordoc/labordoc-next
modules/webdeposit/lib/webdeposit_form.py
2
4312
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2013 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) a...
gpl-2.0
DirtyUnicorns/android_external_chromium-org
build/android/pylib/host_driven/test_runner.py
27
4658
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Runs host-driven tests on a particular device.""" import logging import sys import time import traceback from pylib.base import base_test_result from py...
bsd-3-clause
jasonthomas/zamboni
mkt/search/tests/test_middleware.py
19
1188
from django.test.client import RequestFactory import elasticsearch import mock from nose.tools import eq_ import mkt.site.tests from mkt.search.middleware import ElasticsearchExceptionMiddleware as ESM class TestElasticsearchExceptionMiddleware(mkt.site.tests.TestCase): def setUp(self): self.request = ...
bsd-3-clause
gangadhar-kadam/verve-erp
erpnext/stock/doctype/packing_slip/packing_slip.py
3
6006
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import flt, cint from frappe import _ from frappe.model.document import Document class PackingSlip(Document): def...
agpl-3.0
Appono/hey-eurydices
test/distutils/setup.py
82
1104
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import envoy try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == "publish": os.system("python setup.py sdist upload") sys.exit() required = [] setup( name='envoy', vers...
mit
JaDogg/__py_playground
reference/sketchbook/lex/dfa_minimize.py
1
2237
import DFA # 'his' DFAs def minimal_state_count(dfa): """Return the minimum number of states an equivalent dfa can have. Don't count the error state if one must be added to satisfy the DFA module's definition of a dfa.""" dfa_with_error = maybe_add_error_state(dfa) error_diff =...
mit
farhaanbukhsh/networkx
networkx/readwrite/json_graph/adjacency.py
41
4896
# Copyright (C) 2011-2013 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. from itertools import chain, count import networkx as nx __author__ = """Aric Hagberg <aric.hagberg@gmail.com>""" __all__ = ['adjacenc...
bsd-3-clause
jagguli/intellij-community
python/helpers/pycharm_generator_utils/clr_tools.py
82
2171
# coding=utf-8 """ .NET (CLR) specific functions """ __author__ = 'Ilya.Kazakevich' def get_namespace_by_name(object_name): """ Gets namespace for full object name. Sometimes last element of name is module while it may be class. For System.Console returns System, for System.Web returns System.Web. Be ...
apache-2.0
nox/servo
tests/wpt/css-tests/tools/py/py/__init__.py
171
5872
""" py.test and pylib: rapid testing and development utils this module uses apipkg.py for lazy-loading sub modules and classes. The initpkg-dictionary below specifies name->value mappings where value can be another namespace dictionary or an import path. (c) Holger Krekel and others, 2004-2014 """ __version__ = '1....
mpl-2.0
tbeckham/calyptos
docs/conf.py
9
9299
# -*- coding: utf-8 -*- # # calyptos documentation build configuration file, created by # sphinx-quickstart on Mon May 11 15:52:37 2015. # # 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. # # ...
bsd-2-clause
SUSE-Cloud/nova
nova/cells/rpc_driver.py
11
11809
# Copyright (c) 2012 Rackspace Hosting # 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 req...
apache-2.0
JVillella/tensorflow
tensorflow/python/feature_column/feature_column.py
13
97953
# 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...
apache-2.0
rripio/FIRtro
bin/soundcards.py
2
14694
#!/usr/bin/python # -*- coding: utf-8 -*- u""" Módulo interno para gestión de las tarjetas declaradas en ~/audio/config - Gestión del mixer de las tarjetas. - Integración en Jack mediante resampling (zita). - Gestión del reloj en tarjetas profesionales. NOTA: Las tarjetas profesionales con...
gpl-3.0
revolutionaryG/phantomjs
src/qt/qtwebkit/Source/ThirdParty/gtest/test/gtest_uninitialized_test.py
2901
2480
#!/usr/bin/env python # # Copyright 2008, 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...
bsd-3-clause
bcheung92/Paperproject
gem5/src/arch/x86/isa/insts/x87/arithmetic/change_sign.py
70
2266
# 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...
mit
Bysmyyr/chromium-crosswalk
tools/telemetry/telemetry/util/process_statistic_timeline_data_unittest.py
26
1653
# 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. import unittest from telemetry.util import process_statistic_timeline_data class ProcessStatisticTimelineDataTest(unittest.TestCase): def testProcessSt...
bsd-3-clause
dudonwai/dudonsblog
Lib/site-packages/django/db/models/sql/where.py
76
17910
""" Code to manage the creation and SQL rendering of 'where' constraints. """ import collections import datetime import warnings from itertools import repeat from django.conf import settings from django.db.models.fields import DateTimeField, Field from django.db.models.sql.datastructures import Empty, EmptyResultSet ...
mit
jjmeyer0/incubator-metron
metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/ELASTICSEARCH/2.3.3/package/scripts/properties_config.py
27
1430
#!/usr/bin/env python """ 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");...
apache-2.0
nugget/home-assistant
homeassistant/components/camera/ffmpeg.py
1
2654
""" Support for Cameras with FFmpeg as decoder. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/camera.ffmpeg/ """ import asyncio import logging import voluptuous as vol from homeassistant.const import CONF_NAME from homeassistant.components.camera impo...
apache-2.0
matthiasdiener/spack
var/spack/repos/builtin/packages/r-backports/package.py
5
2031
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
cindyyu/kuma
kuma/core/helpers.py
2
11447
import datetime import HTMLParser import os import urllib import hashlib import bitly_api from babel import localedata from babel.dates import format_date, format_time, format_datetime from babel.numbers import format_decimal import bleach import pytz from urlobject import URLObject from jingo import register, env imp...
mpl-2.0
tempbottle/restcommander
play-1.2.4/python/Lib/site-packages/pyreadline/keysyms/winconstants.py
16
2544
#This file contains constants that are normally found in win32all #But included here to avoid the dependency VK_LBUTTON=1 VK_RBUTTON=2 VK_CANCEL=3 VK_MBUTTON=4 VK_XBUTTON1=5 VK_XBUTTON2=6 VK_BACK=8 VK_TAB=9 VK_CLEAR=12 VK_RETURN=13 VK_SHIFT=16 VK_CONTROL=17 VK_MENU=18 VK_PAUSE=19 VK_CAPITAL=20 VK_KANA=0x15 VK_HANGEUL=...
apache-2.0
trik/djangae
djangae/tests/test_caching.py
2
27318
import unittest from google.appengine.api import datastore from google.appengine.api import datastore_errors from google.appengine.ext.db import non_transactional from django.db import models from django.http import HttpRequest from django.core.signals import request_finished, request_started from django.core.cache i...
bsd-3-clause
2015fallproject/2015fallcase2
static/Brython3.2.0-20150701-214155/Lib/test/unittests/test_nntplib.py
23
56030
import io import socket import datetime import textwrap import unittest import functools import contextlib from test import support from nntplib import NNTP, GroupInfo, _have_ssl import nntplib if _have_ssl: import ssl TIMEOUT = 30 # TODO: # - test the `file` arg to more commands # - test error conditions # - tes...
agpl-3.0
sunzhxjs/JobGIS
lib/python2.7/site-packages/pip/req/req_install.py
21
46670
from __future__ import absolute_import import logging import os import re import shutil import sys import tempfile import traceback import warnings import zipfile from distutils import sysconfig from distutils.util import change_root from email.parser import FeedParser from pip._vendor import pkg_resources, six from...
mit
wevote/WebAppPublic
polling_location/urls.py
1
1083
# polling_location/urls.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from django.conf.urls import url from . import views_admin urlpatterns = [ url(r'^$', views_admin.polling_location_list_view, name='polling_location_list',), url(r'^import/$', views_admin.polling_locations_import...
bsd-3-clause
aosagie/spark
python/pyspark/shell.py
37
2333
# # 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
garbled1/ansible
lib/ansible/modules/web_infrastructure/ansible_tower/tower_group.py
34
6284
#!/usr/bin/python # coding: utf-8 -*- # (c) 2017, Wayne Witzel III <wayne@riotousliving.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 = {'metadata_version': '1.1...
gpl-3.0
leighpauls/k2cro4
third_party/webpagereplay/third_party/dns/entropy.py
250
3872
# Copyright (C) 2009 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 "AS IS" AND NOMIN...
bsd-3-clause
ned14/BEurtle
Installer/test/ZSI-2.1-a1/ZSI/resolvers.py
2
4755
#! /usr/bin/env python # $Header$ '''SOAP messaging parsing. ''' from ZSI import _copyright, _child_elements, EvaluateException, TC import multifile, mimetools, urllib from base64 import decodestring as b64decode import cStringIO as StringIO def Opaque(uri, tc, ps, **keywords): '''Resolve a URI and return its co...
lgpl-2.1
qjcina/GomokuBot
GomokuBot/GomokuBot/Input/MouseClicker.py
1
1119
from win32 import win32api, win32gui import win32con import time from Input.CommandListener import * class MouseClicker(object): lastMousePosition = None def __init__(self): self.oCommandListener = getCommandListener() self.lastPos = (0,0) def click(self, iX, iY): iX = int(iX) ...
gpl-2.0
unixnut/cpylmnl
examples/netfilter/nf-log-graphite.py
2
9342
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function, absolute_import import sys, logging, errno import socket, time, struct, multiprocessing import signal import cPickle as pickle import dpkt import cpylmnl.linux.netlinkh as netlink import cpylmnl.linux.netfilter.nfnetlinkh as nfnl im...
lgpl-2.1
JrtPec/opengrid
opengrid/library/plotting.py
2
6242
# -*- coding: utf-8 -*- """ Created on Wed Nov 26 18:03:24 2014 @author: KDB """ import numpy as np import pandas as pd import datetime as dt import matplotlib.pyplot as plt import matplotlib.cm as cm from matplotlib.dates import date2num, num2date, HourLocator, DayLocator, AutoDateLocator, DateFormatter from matplotl...
apache-2.0
lfz/Guided-Denoise
Attackset/fgsm_v3_random/nets/inception_v1_test.py
54
8721
# 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 ...
apache-2.0
rooty/minishopgae
werkzeug/debug/repr.py
89
8968
# -*- coding: utf-8 -*- """ werkzeug.debug.repr ~~~~~~~~~~~~~~~~~~~ This module implements object representations for debugging purposes. Unlike the default repr these reprs expose a lot more information and produce HTML instead of ASCII. Together with the CSS and JavaScript files of the debug...
gpl-3.0
tommo/gii
lib/3rdparty/common/pygments/regexopt.py
78
3067
# -*- coding: utf-8 -*- """ pygments.regexopt ~~~~~~~~~~~~~~~~~ An algorithm that generates optimized regexes for matching long lists of literal strings. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from re import esc...
mit
CSC301H-Fall2013/JuakStore
site-packages/tests/regressiontests/utils/feedgenerator.py
104
4304
from __future__ import unicode_literals import datetime from django.utils import feedgenerator, tzinfo, unittest class FeedgeneratorTest(unittest.TestCase): """ Tests for the low-level syndication feed framework. """ def test_get_tag_uri(self): """ Test get_tag_uri() correctly genera...
mit
brianlsharp/MissionPlanner
Lib/site-packages/numpy/linalg/__init__.py
54
2194
""" Core Linear Algebra Tools ========================= =============== ========================================================== Linear algebra basics ========================================================================== norm Vector or matrix norm inv Inverse of a square matrix solve ...
gpl-3.0
dyyi/moneybook
venv/Lib/site-packages/pip/_vendor/requests/packages/urllib3/request.py
714
5988
from __future__ import absolute_import try: from urllib.parse import urlencode except ImportError: from urllib import urlencode from .filepost import encode_multipart_formdata __all__ = ['RequestMethods'] class RequestMethods(object): """ Convenience mixin for classes who implement a :meth:`urlopen...
apache-2.0
thebongy/MakeMyOutputs
docx/api.py
12
1179
# encoding: utf-8 """ Directly exposed API functions and classes, :func:`Document` for now. Provides a syntactically more convenient API for interacting with the OpcPackage graph. """ from __future__ import absolute_import, division, print_function import os from docx.opc.constants import CONTENT_TYPE as CT from do...
mit
dya2/python-for-android
python-build/python-libs/gdata/tests/gdata_tests/calendar/calendar_acl_test.py
128
8433
#!/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
bfaviero/ok
oauthlib/oauth1/rfc5849/endpoints/resource.py
42
7083
# -*- coding: utf-8 -*- """ oauthlib.oauth1.rfc5849.endpoints.resource ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module is an implementation of the resource protection provider logic of OAuth 1.0 RFC 5849. """ from __future__ import absolute_import, unicode_literals import logging from .base import BaseEndpoin...
mit
batxes/4c2vhic
Six_zebra_models/Six_zebra_models_final_output_0.1_-0.1_13000/Six_zebra_models44419.py
4
13927
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
gpl-3.0
jctanner/ansible
test/support/integration/plugins/modules/selogin.py
85
7779
#!/usr/bin/python # (c) 2017, Petr Lautrbach <plautrba@redhat.com> # Based on seport.py module (c) 2014, Dan Keder <dan.keder@gmail.com> # 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 ...
gpl-3.0
xenserver/xs-cim
test/pywbem-tests/RequestStateChangeTest.py
1
11817
#!/usr/bin/env python '''Copyright (C) 2008 Citrix Systems Inc. This 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 the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This...
lgpl-2.1
ebrehault/diazo
docs/conf.py
3
6987
# -*- coding: utf-8 -*- # # Diazo documentation build configuration file, created by # sphinx-quickstart on Tue Nov 2 18:58:07 2010. # # 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 c...
bsd-3-clause
oxagast/hashnet
stratum/stratum/server.py
1
5375
def setup(setup_event=None): try: from twisted.internet import epollreactor epollreactor.install() except ImportError: print "Failed to install epoll reactor, default reactor will be used instead." try: import settings except ImportError: print "***** Is conf...
gpl-2.0
tjhei/burnman-original
burnman/equation_of_state.py
1
2790
# BurnMan - a lower mantle toolkit # Copyright (C) 2012, 2013, Heister, T., Unterborn, C., Rose, I. and Cottaar, S. # Released under GPL v2 or later. class equation_of_state: """ This class defines the interface for an equation of state that a mineral uses to determine its properties at a given P,T. ...
gpl-2.0
dot-project/dot
share/qt/make_spinner.py
4415
1035
#!/usr/bin/env python # W.J. van der Laan, 2011 # Make spinning .mng animation from a .png # Requires imagemagick 6.7+ from __future__ import division from os import path from PIL import Image from subprocess import Popen SRC='img/reload_scaled.png' DST='../../src/qt/res/movies/update_spinner.mng' TMPDIR='/tmp' TMPNAM...
mit
mtils/ems
ems/converter/readers/dbdump.py
1
4101
''' Created on 24.10.2010 @author: michi ''' from xml.etree import ElementTree as et from ems.converter.inputreader import InputReader from ems.core.mimetype import MimeTypeDB from ems.core.mimetype import MimeType class DBDump(InputReader): ''' classdocs ''' def select(self,xpath): pathMod...
mit
amperser/proselint
tests/test_redundancy_misc.py
1
1445
"""Tests for redundancy.misc check.""" from __future__ import absolute_import from proselint.checks.redundancy import misc as chk from .check import Check class TestCheck(Check): """The test class for redundancy.misc.""" __test__ = True @property def this_check(self): """Boilerplate.""" ...
bsd-3-clause
LumaPictures/rez
src/rez/vendor/pygraph/readwrite/dot.py
10
9068
# Copyright (c) 2007-2009 Pedro Matiello <pmatiello@gmail.com> # # 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,...
lgpl-3.0
KingxBanana/zulip
zproject/wsgi.py
25
1415
""" WSGI config for zulip project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` se...
apache-2.0
gauribhoite/personfinder
env/google_appengine/lib/django-1.5/django/contrib/gis/tests/utils.py
102
1378
from django.conf import settings from django.db import DEFAULT_DB_ALIAS # function that will pass a test. def pass_test(*args): return def no_backend(test_func, backend): "Use this decorator to disable test on specified backend." if settings.DATABASES[DEFAULT_DB_ALIAS]['ENGINE'].rsplit('.')[-1] == backend: ...
apache-2.0
andmos/ansible
lib/ansible/modules/files/blockinfile.py
18
11773
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2014, 2015 YAEGASHI Takeshi <yaegashi@debian.org> # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass_...
gpl-3.0
TNT-Samuel/Coding-Projects
DNS Server/Source - Copy/Lib/site-packages/dask/bag/tests/test_bag.py
2
40727
# coding=utf-8 from __future__ import absolute_import, division, print_function import pytest import math import os import random import sys from collections import Iterator from itertools import repeat import partd from toolz import merge, join, filter, identity, valmap, groupby, pluck import dask import dask.bag a...
gpl-3.0
Haifen/android_kernel_google_msm
tools/perf/python/twatch.py
7370
1334
#! /usr/bin/python # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface # Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com> # # This application is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License...
gpl-2.0
skoslowski/gnuradio
gr-qtgui/examples/pyqt_time_raster_b.py
3
2198
#!/usr/bin/env python # # Copyright 2012,2013,2015 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from __future__ import print_function from __future__ import unicode_literals from gnuradio import gr from gnuradio import blocks from gnuradio import b...
gpl-3.0
silly-wacky-3-town-toon/SOURCE-COD
toontown/toon/GroupPanel.py
1
18262
from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer from direct.gui.DirectGui import * from panda3d.core import * from panda3d.direct import * from direct.showbase import DirectObject from toontown.toon import ToonAvatarPanel from to...
apache-2.0
androidarmv6/android_external_chromium_org
third_party/closure_linter/closure_linter/common/filetestcase.py
135
3835
#!/usr/bin/env python # # Copyright 2007 The Closure Linter 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 #...
bsd-3-clause
ogenstad/ansible
lib/ansible/modules/network/avi/avi_wafpolicy.py
26
5675
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ANSIB...
gpl-3.0
pipermerriam/py-geth
tests/installation/test_geth_installation.py
1
1450
import os import pytest import semantic_version from geth import ( get_geth_version, ) from geth.install import ( INSTALL_FUNCTIONS, get_platform, install_geth, get_executable_path, ) INSTALLATION_TEST_PARAMS = tuple( (platform, version) for platform, platform_install_functions in INSTA...
mit
mdavid/cherokee-webserver-svnclone
admin/wizards/rails.py
1
14777
# -*- coding: utf-8 -*- # # Cherokee-admin's Ruby on Rails Wizard # # Authors: # Taher Shihadeh <taher@octality.com> # # Copyright (C) 2010 Alvaro Lopez Ortega # # This program is free software; you can redistribute it and/or # modify it under the terms of version 2 of the GNU General Public # License as published...
gpl-2.0
chen0510566/MissionPlanner
Lib/fpformat.py
66
4844
"""General floating point formatting functions. Functions: fix(x, digits_behind) sci(x, digits_behind) Each takes a number or a string and a number of digits as arguments. Parameters: x: number to be formatted; or a string resembling a number digits_behind: number of digits behind the decimal p...
gpl-3.0
liamgh/liamgreenhughes-sl4a-tf101
python/src/Demo/rpc/mountclient.py
42
6632
# Mount RPC client -- RFC 1094 (NFS), Appendix A # This module demonstrates how to write your own RPC client in Python. # When this example was written, there was no RPC compiler for # Python. Without such a compiler, you must first create classes # derived from Packer and Unpacker to handle the data types for the # s...
apache-2.0
maxrosan/NS-3-support-for-OBS
waf-tools/shellcmd.py
137
12146
# Copyright (C) 2008 Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com> # 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. ...
gpl-2.0
XiaodunServerGroup/ddyedx
lms/djangoapps/debug/management/commands/dump_xml_courses.py
19
2377
""" Export all xml courses in a diffable format. This command loads all of the xml courses in the configured DATA_DIR. For each of the courses, it loops through all of the modules, and dumps each as a separate output file containing the json representation of each of its fields (including those fields that are set as ...
agpl-3.0
sometallgit/AutoUploader
Python27/Lib/site-packages/pip/_vendor/webencodings/labels.py
512
8979
""" webencodings.labels ~~~~~~~~~~~~~~~~~~~ Map encoding labels to their name. :copyright: Copyright 2012 by Simon Sapin :license: BSD, see LICENSE for details. """ # XXX Do not edit! # This file is automatically generated by mklabels.py LABELS = { 'unicode-1-1-utf-8': 'utf-8', 'utf-...
mit
alawnchen/djangoproject.com
docs/search.py
8
7056
# -*- coding: utf-8 -*- from django.core.paginator import EmptyPage, Page, PageNotAnInteger, Paginator from django.utils.html import strip_tags from django.utils.text import unescape_entities from elasticsearch.helpers import streaming_bulk from elasticsearch_dsl import DocType, Long, Nested, Object, String, analysis f...
bsd-3-clause
joeythesaint/yocto-autobuilder
lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/conch/test/test_helper.py
12
18162
# -*- test-case-name: twisted.conch.test.test_helper -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from twisted.conch.insults import helper from twisted.conch.insults.insults import G0, G1, G2, G3 from twisted.conch.insults.insults import modes, privateModes from twisted.conch.insults.ins...
gpl-2.0
genkilife/qemu-linaro
scripts/qapi-visit.py
18
14554
# # QAPI visitor generator # # Copyright IBM, Corp. 2011 # # Authors: # Anthony Liguori <aliguori@us.ibm.com> # Michael Roth <mdroth@linux.vnet.ibm.com> # # This work is licensed under the terms of the GNU GPL, version 2. # See the COPYING file in the top-level directory. from ordereddict import OrderedDict from ...
gpl-2.0
amohanta/thug
src/DOM/W3C/HTML/HTMLIFrameElement.py
8
1114
#!/usr/bin/env python import logging from .HTMLElement import HTMLElement from .attr_property import attr_property log = logging.getLogger("Thug") class HTMLIFrameElement(HTMLElement): def __init__(self, doc, tag): HTMLElement.__init__(self, doc, tag) align = attr_property("align") fr...
gpl-2.0
p0cisk/Quantum-GIS
python/plugins/processing/gui/RenderingStyles.py
4
2746
# -*- coding: utf-8 -*- """ *************************************************************************** RenderingStyles.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ***********************...
gpl-2.0
rmetzger/flink
flink-python/pyflink/dataset/__init__.py
20
1234
################################################################################ # 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...
apache-2.0
pymanopt/pymanopt
tests/test_multi_tools.py
2
2999
import numpy as np from numpy import linalg as la, random as rnd, testing as np_testing from scipy.linalg import expm, logm from pymanopt.tools.multi import (multiexp, multieye, multilog, multiprod, multisym, multitransp) from ._test import TestCase class TestMulti(TestCase): de...
bsd-3-clause
danieljaouen/ansible
lib/ansible/modules/windows/win_path.py
52
3082
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2016, Red Hat | Ansible # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # This is a windows documentation stub. Actual code lives in the .ps1 # file of the same name ANSIBLE_METADATA = {'metadata_version': '1.1',...
gpl-3.0
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/site-packages/jupyter_client/localinterfaces.py
12
7872
"""Utilities for identifying local IP addresses.""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import os import re import socket import subprocess from subprocess import Popen, PIPE from warnings import warn LOCAL_IPS = [] PUBLIC_IPS = [] LOCALHOST = '' ...
gpl-3.0
certik/sympy-oldcore
sympy/plotting/pyglet/window/xlib/xinerama.py
5
4026
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2007 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
bsd-3-clause
Geoion/urllib3
dummyserver/server.py
5
8100
#!/usr/bin/env python """ Dummy server used for unit testing. """ from __future__ import print_function import errno import logging import os import random import string import sys import threading import socket import warnings from urllib3.exceptions import HTTPWarning from tornado.platform.auto import set_close_e...
mit
robofit/ar-table-itable
art_projected_gui/src/art_projected_gui/items/icon_item.py
6
1099
#!/usr/bin/env python from PyQt4 import QtGui, QtCore, QtSvg from item import Item import rospy class IconItem(Item): def __init__( self, scene, x, y, w, h, fn, fixed=False): self.img = None self.w =...
lgpl-2.1
wshallum/ansible
lib/ansible/modules/network/cumulus/cl_interface.py
1
15111
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Cumulus Networks <ce-ceng@cumulusnetworks.com> # # 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...
gpl-3.0
vrenaville/ngo-addons-backport
addons/l10n_ma/__openerp__.py
170
2154
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2010 kazacube (http://kazacube.com). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
agpl-3.0
mikehcox/gtest
test/gtest_env_var_test.py
2408
3487
#!/usr/bin/env python # # Copyright 2008, 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...
bsd-3-clause
ghorn/rawesome
studies/makeOctaveCarousel.py
2
2408
# Copyright 2012-2013 Greg Horn # # This file is part of rawesome. # # rawesome 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 version. ...
lgpl-3.0
kidswong999/Arduino
arduino-core/src/processing/app/i18n/python/requests/packages/charade/euctwfreq.py
3133
34872
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client 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 R...
lgpl-2.1
p0psicles/SickRage
lib/sqlalchemy/dialects/drizzle/base.py
79
14993
# drizzle/base.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # Copyright (C) 2010-2011 Monty Taylor <mordred@inaugust.com> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: drizz...
gpl-3.0
fsschneider/DeepOBS
deepobs/scripts/deepobs_plot_results.py
1
2904
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import argparse import deepobs def parse_args(): parser = argparse.ArgumentParser(description="Plotting tool for DeepOBS.") parser.add_argument("path", help="Path to the results folder") parser.add_argument( "--ge...
mit
rfdsp/usedbook
usedbook/views.py
1
5739
# -*- coding: utf-8 -*- from usedbook.models import WantedBook from django.shortcuts import get_object_or_404, render_to_response from django.template import RequestContext from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse import threading class offer: isbn='' ...
mit
dbaxa/django
tests/admin_inlines/admin.py
293
5354
from django import forms from django.contrib import admin from .models import ( Author, BinaryTree, CapoFamiglia, Chapter, ChildModel1, ChildModel2, Consigliere, EditablePKBook, ExtraTerrestrial, Fashionista, Holder, Holder2, Holder3, Holder4, Inner, Inner2, Inner3, Inner4Stacked, Inner4Tabular, NonAut...
bsd-3-clause
allenlavoie/tensorflow
tensorflow/contrib/kfac/examples/mnist.py
21
2576
# 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...
apache-2.0
ArcherSys/ArcherSys
Lib/site-packages/jupyter_client/win_interrupt.py
13
1401
"""Use a Windows event to interrupt a child process like SIGINT. The child needs to explicitly listen for this - see ipykernel.parentpoller.ParentPollerWindows for a Python implementation. """ import ctypes def create_interrupt_event(): """Create an interrupt event handle. The parent process should call thi...
mit
amyvmiwei/kbengine
kbe/src/lib/python/Lib/lib2to3/patcomp.py
93
7075
# Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Pattern compiler. The grammer is taken from PatternGrammar.txt. The compiler compiles a pattern to a pytree.*Pattern instance. """ __author__ = "Guido van Rossum <guido@python.org>" # Python imports import io imp...
lgpl-3.0