repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
brodie/pygit2
test/utils.py
2
3392
# -*- coding: UTF-8 -*- # # Copyright 2010 Google, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2, # as published by the Free Software Foundation. # # In addition to the permissions in the GNU General Public License, # the aut...
gpl-2.0
drpngx/tensorflow
tensorflow/python/debug/__init__.py
33
2918
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
joelpinheiro/safebox-smartcard-auth
Server/veserver/lib/python2.7/site-packages/setuptools/package_index.py
258
38941
"""PyPI and direct package downloading""" import sys import os import re import shutil import socket import base64 import hashlib from functools import wraps from pkg_resources import ( CHECKOUT_DIST, Distribution, BINARY_DIST, normalize_path, SOURCE_DIST, require, Environment, find_distributions, safe_name, s...
gpl-2.0
AdrianGaudebert/socorro
socorro/cron/jobs/matviews.py
2
3998
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import datetime from crontabber.base import BaseCronApp from crontabber.mixins import ( as_backfill_cron_app, w...
mpl-2.0
duncanmmacleod/gwsumm
gwsumm/data/utils.py
2
5424
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2013) # # This file is part of GWSumm. # # GWSumm 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) ...
gpl-3.0
sauloal/pycluster
pypy-1.9_64/lib-python/2.7/encodings/cp862.py
593
33626
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP862.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): ...
mit
praekelt/molo.polls
molo/polls/admin_views.py
1
1756
import csv from collections import OrderedDict from django.http.response import HttpResponse from django.shortcuts import get_object_or_404, render from django.views.generic.edit import FormView from molo.polls.models import Question class QuestionResultsAdminView(FormView): def get(self, request, *args, **kwarg...
bsd-2-clause
easmetz/inasafe
realtime/flood/push_flood.py
3
6207
# coding=utf-8 import json import logging import os from zipfile import ZipFile import requests from realtime.exceptions import RESTRequestFailedError from realtime.flood.flood_event import FloodEvent from realtime.push_rest import ( InaSAFEDjangoREST) from realtime.utilities import realtime_logger_name __author...
gpl-3.0
EmreAtes/spack
var/spack/repos/builtin/packages/oniguruma/package.py
5
1534
############################################################################## # 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
andreparrish/python-for-android
python-modules/twisted/twisted/python/zshcomp.py
61
27579
# -*- test-case-name: twisted.test.test_zshcomp -*- # Copyright (c) 2006 Twisted Matrix Laboratories. # See LICENSE for details. """ Rebuild the completion functions for the currently active version of Twisted:: $ python zshcomp.py -i This module implements a zsh code generator which generates completion code for...
apache-2.0
salaria/odoo
addons/procurement_jit/__init__.py
374
1078
# -*- 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...
agpl-3.0
rickpeters/mkdocs
mkdocs/toc.py
20
3553
# coding: utf-8 """ Deals with generating the per-page table of contents. For the sake of simplicity we use an existing markdown extension to generate an HTML table of contents, and then parse that into the underlying data. The steps we take to generate a table of contents are: * Pre-process the markdown, injecting...
bsd-2-clause
nilsgrabbert/spark
python/pyspark/ml/param/__init__.py
27
16531
# # 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
eddennison/empty-app
ggame/ggame.py
207
47307
""" # ggame The simple cross-platform sprite and game platform for Brython Server (Pygame, Tkinter to follow?). Ggame stands for a couple of things: "good game" (of course!) and also "git game" or "github game" because it is designed to operate with [Brython Server](http://runpython.com) in concert with Github as a b...
mit
chirilo/ephace12345
node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/gyp/pylib/gyp/flock_tool.py
604
1533
#!/usr/bin/env python # Copyright (c) 2011 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. """These functions are executed via gyp-flock-tool when using the Makefile generator. Used on systems that don't have a built-in flock.""" ...
apache-2.0
BitzenyCoreDevelopers/bitzeny
test/functional/p2p-mempool.py
17
1231
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test p2p mempool message. Test that nodes are disconnected if they send mempool messages when bloom fi...
mit
jack8daniels2/dpkt
dpkt/ethernet.py
5
5375
# $Id: ethernet.py 65 2010-03-26 02:53:51Z dugsong $ # -*- coding: utf-8 -*- """Ethernet II, LLC (802.3+802.2), LLC/SNAP, and Novell raw 802.3, with automatic 802.1q, MPLS, PPPoE, and Cisco ISL decapsulation.""" import struct import dpkt import stp ETH_CRC_LEN = 4 ETH_HDR_LEN = 14 ETH_LEN_MIN = 64 # minimum frame ...
bsd-3-clause
liboyin/algo-prac
arrays/weighted_schedule.py
1
2080
from lib import bin_search_right, snd def search(arr): """ Given a list of tasks, represented as tuple of starting time, finishing time, and profit (non-negative). Returns the maximum profit achievable by choosing non-conflicting tasks. Solution is binary search on tasks sorted by finishing time. ...
gpl-3.0
RuudBurger/CouchPotatoServer
libs/chardet/codingstatemachine.py
2931
2318
######################## 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...
gpl-3.0
iqas/e2gui
lib/python/Plugins/Extensions/DVDBurn/Project.py
49
10937
from Tools.Directories import fileExists from Components.config import config, ConfigSubsection, ConfigInteger, ConfigText, ConfigSelection, ConfigSequence, ConfigSubList import Title import xml.dom.minidom from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_FONTS class ConfigColor(ConfigSequence): de...
gpl-2.0
aflaxman/scikit-learn
sklearn/feature_extraction/image.py
21
18105
""" The :mod:`sklearn.feature_extraction.image` submodule gathers utilities to extract features from images. """ # Authors: Emmanuelle Gouillart <emmanuelle.gouillart@normalesup.org> # Gael Varoquaux <gael.varoquaux@normalesup.org> # Olivier Grisel # Vlad Niculae # License: BSD 3 clause fro...
bsd-3-clause
scs/uclinux
user/python/python-2.4.4/Lib/test/test_codecencodings_kr.py
15
2046
#!/usr/bin/env python # # test_codecencodings_kr.py # Codec encoding tests for ROK encodings. # # $CJKCodecs: test_codecencodings_kr.py,v 1.2 2004/06/19 06:09:55 perky Exp $ from test import test_support from test import test_multibytecodec_support import unittest class Test_CP949(test_multibytecodec_support.TestBa...
gpl-2.0
chengjf/database-interface-doc-management
flask-demo/flask/Lib/site-packages/pkg_resources/__init__.py
211
106670
""" Package resource API -------------------- A resource is a logical file contained within a package, or a logical subdirectory thereof. The package resource API expects resource names to have their path parts separated with ``/``, *not* whatever the local path separator is. Do not use os.path operations to manipul...
apache-2.0
darribas/pysal
pysal/esda/tests/test_smoothing.py
10
10917
import unittest import pysal from pysal.esda import smoothing as sm from pysal import knnW import numpy as np class TestFlatten(unittest.TestCase): def setUp(self): self.input = [[1, 2], [3, 3, 4], [5, 6]] def test_flatten(self): out1 = sm.flatten(self.input) out2 = sm.flatten(self.in...
bsd-3-clause
scottkirkwood/clipboard-modifier
clipboardmodifier/plugins/i18n.py
2
2083
#!/usr/bin/env python # -*- encoding: latin1 -*- # # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
apache-2.0
ct-23/home-assistant
tests/components/config/test_customize.py
8
3495
"""Test Customize config panel.""" import asyncio import json from unittest.mock import patch from homeassistant.bootstrap import async_setup_component from homeassistant.components import config from homeassistant.config import DATA_CUSTOMIZE @asyncio.coroutine def test_get_entity(hass, test_client): """Test ge...
apache-2.0
purpleidea/gedit-plugins
plugins/commander/commander/commands/method.py
1
3558
# -*- coding: utf-8 -*- # # method.py - commander # # Copyright (C) 2010 - Jesse van den Kieboom # # 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...
gpl-2.0
sirio81/vmcli
libguest.py
1
3653
from libvmcli import * class Guest: def __init__(self, all_opt, global_cluster_options, cluster_options): self.global_cluster_options = global_cluster_options self.cluster_options = cluster_options self.all_opt = all_opt self.opt = self.parse_opt(all_opt) self.host_name = No...
lgpl-2.1
nharraud/b2share
invenio/legacy/bibcatalog/ticket_templates/metadata_curation.py
15
6606
# -*- 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) any later...
gpl-2.0
sivaramakrishnansr/ryu
ryu/base/app_manager.py
2
17451
# Copyright (C) 2011-2014 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2011 Isaku Yamahata <yamahata at valinux co jp> # # 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 # # ht...
apache-2.0
CongSmile/tp-qemu
generic/tests/yum_update.py
5
1654
import logging import time def internal_yum_update(session, command, prompt, timeout): """ Helper function to perform the yum update test. :param session: shell session stablished to the host :param command: Command to be sent to the shell session :param prompt: Machine prompt :param timeout:...
gpl-2.0
dcroc16/skunk_works
google_appengine/lib/python-gflags/gflags_validators.py
488
6977
#!/usr/bin/env python # 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 l...
mit
yousafsyed/casperjs
bin/Lib/idlelib/rpc.py
71
20933
"""RPC Implemention, originally written for the Python Idle IDE For security reasons, GvR requested that Idle's Python execution server process connect to the Idle process, which listens for the connection. Since Idle has only one client per server, this was not a limitation. +---------------------------------+ +...
mit
umago/kabukiman
kabukiman/module.py
1
1400
#!/usr/bin/python # coding: utf-8 # Copyright (C) 2010 Lucas Alvares Gomes <lucasagomes@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 you...
gpl-2.0
PopCap/GameIdea
Engine/Source/ThirdParty/HTML5/emsdk/Win64/python/2.7.5.3_64bit/Lib/site-packages/isapi/samples/advanced.py
12
8068
# This extension demonstrates some advanced features of the Python ISAPI # framework. # We demonstrate: # * Reloading your Python module without shutting down IIS (eg, when your # .py implementation file changes.) # * Custom command-line handling - both additional options and commands. # * Using a query string - any ...
bsd-2-clause
arnif/CouchPotatoServer
libs/suds/soaparray.py
205
2262
# 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 ...
gpl-3.0
axbaretto/beam
sdks/python/.tox/lint/lib/python2.7/site-packages/pip/_vendor/html5lib/_inputstream.py
328
32532
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type, binary_type from pip._vendor.six.moves import http_client, urllib import codecs import re from pip._vendor import webencodings from .constants import EOF, spaceCharacters, asciiLetters, asciiUppercase from .con...
apache-2.0
miiicmueller/android_kernel_raspberryPi_rpiv2
Documentation/networking/cxacru-cf.py
14668
1626
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # 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. # # This program i...
gpl-2.0
TeachAtTUM/edx-platform
lms/djangoapps/discussion_api/tests/test_pagination.py
48
2065
""" Tests for Discussion API pagination support """ from unittest import TestCase from django.test import RequestFactory from discussion_api.pagination import DiscussionAPIPagination from discussion_api.tests.utils import make_paginated_api_response class PaginationSerializerTest(TestCase): """Tests for Paginat...
agpl-3.0
ArcherSys/ArcherSys
Lib/sre_compile.py
1
19904
# # Secret Labs' Regular Expression Engine # # convert template to internal format # # Copyright (c) 1997-2001 by Secret Labs AB. All rights reserved. # # See the sre.py file for information on usage and redistribution. # """Internal support module for sre""" import _sre import sre_parse from sre_constants import *...
mit
ProfessionalIT/maxigenios-website
sdk/google_appengine/google/appengine/ext/ndb/google_imports.py
3
3049
"""Dynamically decide from where to import Google App Engine modules. All other NDB code should import its Google App Engine modules from this module. If necessary, add new imports here (in both places). """ try: from google.appengine.datastore import entity_pb normal_environment = True except ImportError: fro...
mit
MattsFleaMarket/python-for-android
python-modules/twisted/twisted/names/authority.py
49
11053
# -*- test-case-name: twisted.names.test.test_names -*- # Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ Authoritative resolvers. """ import os import time from twisted.names import dns from twisted.internet import defer from twisted.python import failure import common def getS...
apache-2.0
vipul-tm/DAG
dags-ttpl/createPreviousState.py
1
14429
from airflow import DAG from airflow.operators import PythonOperator from airflow.hooks import RedisHook from datetime import datetime, timedelta from airflow.models import Variable from airflow.hooks import RedisHook from shutil import copyfile import logging import traceback from airflow.hooks import MemcacheHook d...
bsd-3-clause
makinacorpus/odoo
openerp/report/render/__init__.py
381
1374
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 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
joram/sickbeard-orange
lib/bs4/builder/_lxml.py
446
8661
__all__ = [ 'LXMLTreeBuilderForXML', 'LXMLTreeBuilder', ] from io import BytesIO from StringIO import StringIO import collections from lxml import etree from bs4.element import Comment, Doctype, NamespacedAttribute from bs4.builder import ( FAST, HTML, HTMLTreeBuilder, PERMISSIVE, Parse...
gpl-3.0
40223114/w16b_test
static/Brython3.1.1-20150328-091302/Lib/xml/etree/ElementPath.py
785
9477
# # ElementTree # $Id: ElementPath.py 3375 2008-02-13 08:05:08Z fredrik $ # # limited xpath support for element trees # # history: # 2003-05-23 fl created # 2003-05-28 fl added support for // etc # 2003-08-27 fl fixed parsing of periods in element names # 2007-09-10 fl new selection engine # 2007-09-12 fl fix...
agpl-3.0
gonboy/sl4a
python/src/Mac/Modules/menu/menuedit.py
39
2996
f = Function(MenuHandle, 'as_Menu', (Handle, 'h', InMode)) functions.append(f) f = Method(Handle, 'as_Resource', (MenuHandle, 'h', InMode)) methods.append(f) # The following have "Mac" prepended to their names in the include file # since UH 3.1, sigh... f = Function(MenuHandle, 'GetMenu', (short, 'resourceID', In...
apache-2.0
CHBMB/LazyLibrarian
lib/requests/packages/chardet/langthaimodel.py
2930
11275
######################## 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...
gpl-3.0
batxes/4Cin
SHH_WT_models/SHH_WT_models_final_output_0.1_-0.1_11000/SHH_WT_models47890.py
2
17565
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
igemsoftware/SYSU-Software2013
project/Python27/Lib/site-packages/win32/test/test_security.py
17
5204
# Tests for the win32security module. import sys, os import unittest import winerror from pywin32_testutil import testmain, TestSkipped, ob2memory import win32api, win32con, win32security, ntsecuritycon class SecurityTests(unittest.TestCase): def setUp(self): self.pwr_sid=win32security.LookupAccountName('...
mit
andrewyoung1991/supriya
supriya/tools/requesttools/NodeFreeRequest.py
1
1577
# -*- encoding: utf-8 -*- import collections from supriya.tools import osctools from supriya.tools.requesttools.Request import Request class NodeFreeRequest(Request): r'''A /n_free request. :: >>> from supriya.tools import requesttools >>> request = requesttools.NodeFreeRequest( ... ...
mit
francesconuma/yowsup
yowsup/layers/protocol_messages/protocolentities/message_text.py
59
1450
from yowsup.structs import ProtocolEntity, ProtocolTreeNode from .message import MessageProtocolEntity class TextMessageProtocolEntity(MessageProtocolEntity): ''' <message t="{{TIME_STAMP}}" from="{{CONTACT_JID}}" offline="{{OFFLINE}}" type="text" id="{{MESSAGE_ID}}" notify="{{NOTIFY_NAME}}"> ...
gpl-3.0
maxisi/gwsumm
gwsumm/channels.py
1
6672
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2013) # # This file is part of GWSumm. # # GWSumm 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) ...
gpl-3.0
MITRECND/multiscanner
multiscanner/modules/Metadata/MD5.py
2
1079
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from __future__ import division, absolute_import, with_statement, print_function, unicode_literals import hashlib import ...
mpl-2.0
niftynei/zulip
docs/conf.py
8
9917
# -*- coding: utf-8 -*- # # zulip-contributor-docs documentation build configuration file, created by # sphinx-quickstart on Mon Aug 17 16:24:04 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 # autogenera...
apache-2.0
zxqt223/hadoop-ha.1.0.3
src/contrib/hod/hodlib/Common/logger.py
182
28370
#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 use thi...
apache-2.0
nicolargo/intellij-community
python/testData/MockSdk3.4/python_stubs/_io.py
41
52669
# encoding: utf-8 # module _io calls itself io # from (built-in) # by generator 1.135 """ The io module provides the Python interfaces to stream handling. The builtin open function is defined in this module. At the top of the I/O hierarchy is the abstract base class IOBase. It defines the basic interface to a stream. ...
apache-2.0
itabulous/mysql-connector-python
lib/mysql/connector/django/introspection.py
17
13415
# MySQL Connector/Python - MySQL driver written in Python. import re from collections import namedtuple import django if django.VERSION >= (1, 8): from django.db.backends.base.introspection import ( BaseDatabaseIntrospection, FieldInfo, TableInfo ) else: from django.db.backends import BaseDatabas...
gpl-2.0
timvandermeij/unmanned-vehicle-tomography
vehicle/Robot_Vehicle_Arduino.py
3
4062
import time from Robot_Vehicle import Robot_Vehicle from ..trajectory.Servo import Servo class Robot_Vehicle_Arduino(Robot_Vehicle): """ Robot vehicle that is connected via a serial interface to an Arduino. To be used with the "zumo_serial" Arduino program. The Arduino passes through reflectance sens...
gpl-3.0
nikoonia/gem5v
src/cpu/IntrControl.py
19
1782
# Copyright (c) 2005-2007 The Regents of The University of Michigan # 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 ...
bsd-3-clause
joone/chromium-crosswalk
third_party/cython/src/Cython/Compiler/Nodes.py
86
331600
# # Parse tree nodes # import cython cython.declare(sys=object, os=object, copy=object, Builtin=object, error=object, warning=object, Naming=object, PyrexTypes=object, py_object_type=object, ModuleScope=object, LocalScope=object, ClosureScope=object, StructOrUnionScope=ob...
bsd-3-clause
goneri/dci-control-server
sample/tox-agent.py
1
2235
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015 Red Hat, 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 req...
apache-2.0
studio666/gnuradio
gr-utils/python/utils/pyqt_plot.py
91
14619
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'pyqt_plot.ui' # # Created: Tue Oct 6 10:39:58 2009 # by: PyQt4 UI code generator 4.4.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_MainWindow(object): def setupUi(self, MainWi...
gpl-3.0
welenofsky/python_koans
python2/koans/about_sets.py
86
1510
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutSets(Koan): def test_sets_make_keep_lists_unique(self): highlanders = ['MacLeod', 'Ramirez', 'MacLeod', 'Matunas', 'MacLeod', 'Malcolm', 'MacLeod'] there_can_only_be_only_one = set(highlanders) ...
mit
apache/libcloud
libcloud/test/backup/test_dimensiondata_v2_4.py
13
24440
# 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
collex100/odoo
openerp/addons/test_documentation_examples/tests/test_delegation.py
366
1299
# -*- coding: utf-8 -*- from openerp.tests import common class TestDelegation(common.TransactionCase): def setUp(self): super(TestDelegation, self).setUp() env = self.env record = env['delegation.parent'].create({ 'child0_id': env['delegation.child0'].create({'field_0': 0}).id,...
agpl-3.0
brokenjacobs/ansible
lib/ansible/modules/network/aos/aos_template.py
36
8167
#!/usr/bin/python # # (c) 2017 Apstra Inc, <community@apstra.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 of the License, or # (at your opt...
gpl-3.0
smi96/django-blog_website
lib/python2.7/site-packages/django/views/generic/dates.py
212
25790
from __future__ import unicode_literals import datetime from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db import models from django.http import Http404 from django.utils import timezone from django.utils.encoding import force_str, force_text from django.utils.func...
mit
egafford/sahara
sahara/service/validations/edp/job_binary_schema.py
6
1518
# Copyright (c) 2015 Red Hat 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 agreed to in writi...
apache-2.0
kinooo/Sick-Beard
lib/enzyme/real.py
180
4547
# -*- coding: utf-8 -*- # enzyme - Video metadata parser # Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com> # Copyright 2003-2006 Thomas Schueppel <stain@acm.org> # Copyright 2003-2006 Dirk Meyer <dischi@freevo.org> # # This file is part of enzyme. # # enzyme is free software; you can redistribute it and/or mod...
gpl-3.0
joachimmetz/plaso
plaso/parsers/plist_plugins/launchd.py
2
2742
# -*- coding: utf-8 -*- """Plist parser plugin for launchd plist files.""" from dfdatetime import semantic_time as dfdatetime_semantic_time from plaso.containers import plist_event from plaso.containers import time_events from plaso.lib import definitions from plaso.parsers import plist from plaso.parsers.plist_plugi...
apache-2.0
boooka/GeoPowerOff
venv/lib/python2.7/site-packages/django/contrib/flatpages/tests/test_forms.py
111
4042
from __future__ import unicode_literals from django.conf import settings from django.contrib.flatpages.forms import FlatpageForm from django.contrib.flatpages.models import FlatPage from django.test import TestCase, override_settings from django.utils import translation @override_settings(SITE_ID=1) class FlatpageAd...
apache-2.0
shitolepriya/Saloon_erp
erpnext/setup/doctype/naming_series/naming_series.py
4
6147
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import cstr from frappe import msgprint, throw, _ from frappe.model.document import Document class NamingSeriesNotSet...
agpl-3.0
sevenian3/ChromaStarPy
LevelPopsGasServer.py
1
55996
# -*- coding: utf-8 -*- """ Created on Mon Apr 24 14:13:47 2017 @author: ishort """ import math import Useful import ToolBox #import numpy #JB# #from matplotlib.pyplot import plot, title, show, scatter #storage for fits (not all may be used) uw = [] uwa = [] uwb = [] uwStage = [] uwbStage = [] uwu ...
mit
jacksonwilliams/arsenalsuite
cpp/lib/PyQt4/examples/itemviews/chart/chart.py
15
21752
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2010 Riverbank Computing Limited. ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENS...
gpl-2.0
fiete201/qutebrowser
setup.py
2
3967
#!/usr/bin/env python3 # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2021 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as p...
gpl-3.0
daedric/buck
third-party/py/scandir/setup.py
10
2506
"""Run "python setup.py install" to install scandir.""" from distutils.core import setup, Extension import os import re # Get version without importing scandir because that will lock the # .pyd file (if scandir is already installed) so it can't be # overwritten during the install process with open(os.path.join(os.pat...
apache-2.0
Kaian/guake
src/guake/terminal.py
3
12990
# -*- coding: utf-8; -*- """ Copyright (C) 2007-2012 Lincoln de Sousa <lincoln@minaslivre.org> Copyright (C) 2007 Gabriel Falcão <gabrielteratos@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 Foundat...
gpl-2.0
PanYuntao/node-gyp
gyp/test/library/gyptest-static.py
430
2241
#!/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. """ Verifies simple build of a "Hello, world!" program with static libraries, including verifying that libraries are rebuilt correctly when ...
mit
Flimm/linkchecker
linkcheck/plugins/regexcheck.py
9
3009
# -*- coding: iso-8859-1 -*- # Copyright (C) 2000-2014 Bastian Kleineidam # # 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 versi...
gpl-2.0
mhnatiuk/phd_sociology_of_religion
scrapper/build/six/documentation/conf.py
115
7015
# -*- coding: utf-8 -*- # # six documentation build configuration file import os import sys # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like ...
gpl-2.0
cshallue/models
official/mnist/mnist_eager.py
5
7794
# Copyright 2018 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
samskillman/pylibtiff
libtiff/bitarray-0.3.5-numpy/examples/huffman.py
13
3723
#!/usr/bin/env pyhton """ The non-trivial part of the code is derived from: http://en.literateprograms.org/Huffman_coding_(Python) The link also contains a good description of the algorithm. """ import os, sys from bisect import insort from collections import defaultdict from bitarray import bitarray def huffCode(fr...
bsd-3-clause
mhvk/baseband
docs/conf.py
1
7827
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst # # Astropy documentation build configuration file. # # 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 file. # # All configurati...
gpl-3.0
bradsk88/WinkHouse
lib/rsa/pkcs1.py
75
13170
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # 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 # # Unl...
apache-2.0
codelieche/codelieche.com
apps/article/views/pages/article.py
1
11474
# -*- coding:utf-8 -*- import json from django.contrib.auth.decorators import login_required from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponse, HttpResponseRedirect, Http404, JsonResponse from django.shortcuts import render, get_object_or_404, redirect from django.views.generic...
mit
serviceagility/boto
tests/unit/s3/test_cors_configuration.py
136
2461
#!/usr/bin/env python import unittest from boto.s3.cors import CORSConfiguration CORS_BODY_1 = ( '<CORSConfiguration>' '<CORSRule>' '<AllowedMethod>PUT</AllowedMethod>' '<AllowedMethod>POST</AllowedMethod>' '<AllowedMethod>DELETE</AllowedMethod>' '<AllowedOrigin>http://www.example.com</Allowed...
mit
SUSE/ceph-deploy
ceph_deploy/hosts/remotes.py
3
10559
try: import configparser except ImportError: import ConfigParser as configparser import errno import socket import os import shutil import tempfile import platform def platform_information(_linux_distribution=None): """ detect platform information from remote host """ linux_distribution = _linux_distr...
mit
windskyer/nova
nova/tests/unit/compute/test_tracker.py
3
70810
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
gpl-2.0
vighneshbirodkar/scikit-image
skimage/feature/tests/test_canny.py
19
4525
import unittest import numpy as np from numpy.testing import assert_equal from scipy.ndimage import binary_dilation, binary_erosion import skimage.feature as F from skimage import filters, data from skimage import img_as_float class TestCanny(unittest.TestCase): def test_00_00_zeros(self): '''Test that th...
bsd-3-clause
tboyce021/home-assistant
homeassistant/components/numato/binary_sensor.py
15
3834
"""Binary sensor platform integration for Numato USB GPIO expanders.""" from functools import partial import logging from numato_gpio import NumatoGpioError from homeassistant.components.binary_sensor import BinarySensorEntity from homeassistant.const import DEVICE_DEFAULT_NAME from homeassistant.core import callback...
apache-2.0
DirectXMan12/nova-hacking
nova/tests/virt/hyperv/test_hypervapi.py
1
51735
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Cloudbase Solutions Srl # # 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/LICE...
apache-2.0
ChrisAntaki/phantomjs
src/qt/qtwebkit/Tools/QueueStatusServer/handlers/patch.py
146
2482
# Copyright (C) 2009 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...
bsd-3-clause
pam-bot/SMSQuery
lib/flask/testsuite/views.py
561
5068
# -*- coding: utf-8 -*- """ flask.testsuite.views ~~~~~~~~~~~~~~~~~~~~~ Pluggable views. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import flask import flask.views import unittest from flask.testsuite import FlaskTestCase from werkzeug.http import par...
gpl-2.0
marcsans/cnn-physics-perception
phy/lib/python2.7/site-packages/theano/tensor/signal/tests/test_pool.py
4
37670
from itertools import product import unittest import six.moves.builtins as builtins import numpy import theano import theano.tensor as tensor from theano.tests import unittest_tools as utt from theano.tensor.signal.pool import (Pool, pool_2d, MaxPoolGrad, AveragePoolGrad, ...
mit
subutai/nupic.research
nupic/research/frameworks/vernon/mixins/composite_loss.py
3
5942
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2020, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
leiferikb/bitpop
src/tools/gyp/pylib/gyp/common.py
34
19170
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import with_statement import collections import errno import filecmp import os.path import re import tempfile import sys # A minimal memoizing d...
gpl-3.0
updownlife/multipleK
dependencies/biopython-1.65/Tests/test_SearchIO_hmmer3_tab.py
1
20424
# Copyright 2012 by Wibowo Arindrarto. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Tests for SearchIO HmmerIO hmmer3-tab parser.""" import os import unittest from Bio ...
gpl-2.0
dllsf/odootest
addons/purchase/res_config.py
357
6198
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
lehmannro/pootle
setup.py
1
11428
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2008 Zuza Software Foundation # # This file is part of Pootle. # # 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 t...
gpl-2.0