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 |
|---|---|---|---|---|---|
ds-hwang/chromium-crosswalk | tools/perf/page_sets/dummy_story_set.py | 8 | 1060 | # Copyright 2015 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.
from telemetry.page import page as page_module
from telemetry import story
class DummyPage(page_module.Page):
def __init__(self, page_set):
super(Dum... | bsd-3-clause |
RyanYoung25/tensorflow | tensorflow/python/ops/data_flow_grad.py | 6 | 2847 | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 |
progdupeupl/pdp_website | pdp/article/models.py | 1 | 7425 | # coding: utf-8
#
# This file is part of Progdupeupl.
#
# Progdupeupl is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Progdu... | agpl-3.0 |
TNT-Samuel/Coding-Projects | DNS Server/Source/Lib/ctypes/test/test_buffers.py | 97 | 2284 | from ctypes import *
from ctypes.test import need_symbol
import unittest
class StringBufferTestCase(unittest.TestCase):
def test_buffer(self):
b = create_string_buffer(32)
self.assertEqual(len(b), 32)
self.assertEqual(sizeof(b), 32 * sizeof(c_char))
self.assertIs(type(b[0]), bytes)... | gpl-3.0 |
TeachAtTUM/edx-platform | lms/djangoapps/courseware/tests/test_model_data.py | 19 | 20490 | """
Test for lms courseware app, module data (runtime data storage for XBlocks)
"""
import json
from functools import partial
from django.db import DatabaseError
from django.test import TestCase
from mock import Mock, patch
from nose.plugins.attrib import attr
from xblock.core import XBlock
from xblock.exceptions impo... | agpl-3.0 |
citrix-openstack/build-ryu | ryu/contrib/ncclient/operations/edit.py | 69 | 5754 | # Copyright 2009 Shikhar Bhushan
#
# 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 writin... | apache-2.0 |
Justin-Yuan/Image2Music-Generator | library/jython2.5.3/Lib/encodings/ptcp154.py | 647 | 8950 | """ Python Character Mapping Codec generated from 'PTCP154.txt' with gencodec.py.
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
(c) Copyright 2000 Guido van Rossum.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,err... | gpl-2.0 |
tadebayo/myedge | myvenv/Lib/site-packages/PIL/features.py | 14 | 1617 | from PIL import Image
modules = {
"pil": "PIL._imaging",
"tkinter": "PIL._imagingtk",
"freetype2": "PIL._imagingft",
"littlecms2": "PIL._imagingcms",
"webp": "PIL._webp",
"transp_webp": ("WEBP", "WebPDecoderBuggyAlpha")
}
def check_module(feature):
if feature not in modules:
raise... | mit |
wkhtmltopdf/qtwebkit | Tools/Scripts/webkitpy/port/pulseaudio_sanitizer_mock.py | 125 | 1666 | # Copyrigth (C) 2013 Zan Dobersek <zandobersek@gmail.com>
#
# 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 ... | gpl-2.0 |
hgn/pmu-tools | bdw_client_ratios.py | 2 | 74607 |
#
# auto generated TopDown 3.0 description for Intel 5th gen Core / Core M (code named Broadwell)
# Please see http://ark.intel.com for more details on these CPUs.
#
# References:
# http://halobates.de/blog/p/262
# https://sites.google.com/site/analysismethods/yasin-pubs
#
# Helpers
print_error = lambda msg: False
... | gpl-2.0 |
CrusherXRay/PyPiCOM | d-view/dicom/test/test_dictionary.py | 5 | 1960 | # test_dictionary.py
"""Test suite for dicom_dictionary.py"""
# Copyright (c) 2008 Darcy Mason
# This file is part of pydicom, released under a modified MIT license.
# See the file license.txt included with this distribution, also
# available at http://pydicom.googlecode.com
import unittest
from dicom.tag import... | gpl-3.0 |
ingadhoc/openerp-travel | airline/__openerp__.py | 2 | 1777 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Savoir-faire Linux
# (<http://www.savoirfairelinux.com>).
#
# This program is free software: you can redistribute it and/or m... | agpl-3.0 |
FireCARES/harvester | tests/test_esri_harvest.py | 1 | 1453 | import unittest
from harvester.providers.esri import RESTHarvester
from harvester.util import chunk
from harvester.transform.esri import ESRIJSON
from tests import TEST_DIR
from tests.util import load_mock
import requests_mock
import os
@requests_mock.Mocker()
class TestESRIHarvesting(unittest.TestCase):
def setU... | gpl-2.0 |
cancan101/tensorflow | tensorflow/contrib/linalg/python/kernel_tests/linear_operator_diag_test.py | 13 | 6110 | # 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 |
hefen1/chromium | third_party/google_input_tools/third_party/closure_library/closure/bin/calcdeps.py | 223 | 18544 | #!/usr/bin/env python
#
# Copyright 2006 The Closure Library 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 |
pnedunuri/scipy | scipy/sparse/linalg/isolve/lsmr.py | 73 | 13048 | """
Copyright (C) 2010 David Fong and Michael Saunders
LSMR uses an iterative method.
07 Jun 2010: Documentation updated
03 Jun 2010: First release version in Python
David Chin-lung Fong clfong@stanford.edu
Institute for Computational and Mathematical Engineering
Stanford University
Michael Saunders ... | bsd-3-clause |
GitHublong/hue | apps/search/src/search/tests.py | 12 | 196604 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (... | apache-2.0 |
xbmc/xbmc-antiquated | xbmc/lib/libPython/Python/Lib/test/string_tests.py | 5 | 35487 | """
Common tests shared by test_str, test_unicode, test_userstring and test_string.
"""
import unittest, string, sys
from test import test_support
from UserList import UserList
class Sequence:
def __init__(self, seq='wxyz'): self.seq = seq
def __len__(self): return len(self.seq)
def __getitem__(self, i): ... | gpl-2.0 |
yordan-desta/QgisIns | python/plugins/processing/tools/__init__.py | 63 | 1099 | # -*- coding: utf-8 -*-
"""
***************************************************************************
__init__.py
---------------------
Date : February 2013
Copyright : (C) 2013 by Victor Olaya
Email : volayaf at gmail dot com
****************************... | gpl-2.0 |
mdsitton/pyogl | pglgen/xmlparse.py | 1 | 3930 | from xml.parsers import expat
class TagStack(object):
def __init__(self):
self.tags = []
self.args = []
self.data = []
self.dataAdded = []
self.stackSize = 0
self.frameHasData = False
def push(self, tag, args):
self.tags.append(tag)
self.args.ap... | bsd-2-clause |
djludo/navitia | source/tyr/tyr/command/__init__.py | 12 | 1478 | # Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobility and open public tr... | agpl-3.0 |
edoko/AIR-Kernel_ICS | tools/perf/scripts/python/failed-syscalls-by-pid.py | 11180 | 2058 | # failed system call counts, by pid
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide failed system call totals, broken down by pid.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os
import sys
sys.pa... | gpl-2.0 |
kilfu0701/py_tools | .venv/bin/activate_this.py | 669 | 1129 | """By using execfile(this_file, dict(__file__=this_file)) you will
activate this virtualenv environment.
This can be used when you must use an existing Python interpreter, not
the virtualenv bin/python
"""
try:
__file__
except NameError:
raise AssertionError(
"You must run this like execfile('path/to/... | mit |
utarsuno/urbtek | nexus_django/nexus_front_end/views.py | 1 | 45865 | # coding=utf-8
"""
This module, views.py, is where all the backend and frontend server requests are handled and returned to the user.
"""
# Needed to send back a rendered HTML page.
from django.shortcuts import render
# Needed for sending a simple HttpResponse such as a string response.
from django.http import HttpRe... | apache-2.0 |
Applied-GeoSolutions/gips | gips/data/sarannual/sarannual.py | 1 | 6502 | #!/usr/bin/env python
################################################################################
# GIPS: Geospatial Image Processing System
#
# AUTHOR: Matthew Hanson
# EMAIL: matt.a.hanson@gmail.com
#
# Copyright (C) 2014-2018 Applied Geosolutions
#
# This program is free software; you can redist... | gpl-3.0 |
davidalber/react-server | packages/react-server-website/deployment/encrypt_credentials.py | 6 | 1127 | import argparse
from base64 import b64decode, b64encode
import boto3
import json
"""
Use this script to generate a new encrypted data blob that contains secrets we
need on the production machine.
"""
def encrypt(args):
data = {
'asini-slack.api.token' : args.asini_slack_key,
'react-server-s... | apache-2.0 |
johannmeyer/bepoppy8 | sw/ground_segment/joystick/gb2ivy.py | 13 | 7529 | #!/usr/bin/env python
from __future__ import print_function
import sys
from os import path, getenv
# if PAPARAZZI_SRC not set, then assume the tree containing this
# file is a reasonable substitute
PPRZ_SRC = getenv("PAPARAZZI_SRC", path.normpath(path.join(path.dirname(path.abspath(__file__)), '../../../')))
sys.pat... | gpl-2.0 |
apdjustino/DRCOG_Urbansim | src/opus_gui/results_manager/run/indicator_framework/visualizer/visualizers/matplotlib_lorenzcurve.py | 1 | 10890 | # Opus/UrbanSim urban simulation software.
# Copyright (C) 2010-2011 University of California, Berkeley, 2005-2009 University of Washington
# See opus_core/LICENSE
import os, re, sys, time, traceback
from copy import copy
from opus_gui.results_manager.run.indicator_framework.visualizer.visualizers.abstract_visualizat... | agpl-3.0 |
CERNDocumentServer/invenio | modules/bibsched/lib/bibtasklet.py | 3 | 5253 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2009, 2010, 2011 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 optio... | gpl-2.0 |
inasafe/inasafe | safe/metadata/test/__init__.py | 8 | 1431 | # coding=utf-8
"""Init File for Test Package."""
# DO NOT REMOVE THIS
# noinspection PyUnresolvedReferences
import qgis # pylint: disable=unused-import
import os
from safe.common.utilities import temp_dir
__copyright__ = "Copyright 2016, The InaSAFE Project"
__license__ = "GPL version 3"
__email__ = "info@inasafe.or... | gpl-3.0 |
cristiana214/cristianachavez214-cristianachavez | python/src/Tools/scripts/findlinksto.py | 100 | 1070 | #! /usr/bin/env python
# findlinksto
#
# find symbolic links to a path matching a regular expression
import os
import sys
import re
import getopt
def main():
try:
opts, args = getopt.getopt(sys.argv[1:], '')
if len(args) < 2:
raise getopt.GetoptError('not enough arguments', None)
... | apache-2.0 |
dani-i/bachelor-project | file_experts/data_set/cifar10_data_set_preparations.py | 1 | 3240 | from file_experts.data_set.data_set_validator import DataSetValidator
from file_experts.data_set import data_set_creator
from time import sleep
import constants.create_data_set_constants as const
import file_experts.file_expert as fe
import urllib.request
import threading
import tarfile
class Cifar10DataSetPrepara... | apache-2.0 |
freemed/orthanc | Resources/Samples/Python/ChangesLoop.py | 1 | 2310 | #!/usr/bin/python
# Orthanc - A Lightweight, RESTful DICOM Store
# Copyright (C) 2012-2014 Medical Physics Department, CHU of Liege,
# Belgium
#
# 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, ... | gpl-3.0 |
joker946/nova | nova/tests/unit/volume/encryptors/test_base.py | 69 | 3773 | # Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory
# 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/... | apache-2.0 |
lthurlow/Network-Grapher | proj/external/networkx-1.7/networkx/algorithms/bipartite/tests/test_project.py | 10 | 12631 | #!/usr/bin/env python
from nose.tools import *
import networkx as nx
from networkx.algorithms import bipartite
class TestBipartiteProject:
def test_path_projected_graph(self):
G=nx.path_graph(4)
P=bipartite.projected_graph(G,[1,3])
assert_equal(sorted(P.nodes()),[1,3])
assert_equa... | mit |
aimas/TuniErp-8.0 | addons/mrp_operations/report/__init__.py | 443 | 1131 | # -*- 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 |
MalloyDelacroix/DownloaderForReddit | DownloaderForReddit/gui/database_views/filter_input_widget.py | 1 | 5786 | from PyQt5.QtWidgets import QWidget, QLineEdit, QSpinBox, QComboBox, QDateTimeEdit, QSizePolicy
from PyQt5.QtCore import Qt, pyqtSignal
from sqlalchemy import Integer, String, DateTime, Enum, Boolean
from DownloaderForReddit.guiresources.database_views.filter_input_widget_auto import Ui_FilterInputWidget
from Download... | gpl-3.0 |
benfinkelcbt/CPD200 | CPD200-Lab14-Python/simplejson/scanner.py | 153 | 4653 | """JSON token scanner
"""
import re
def _import_c_make_scanner():
try:
from simplejson._speedups import make_scanner
return make_scanner
except ImportError:
return None
c_make_scanner = _import_c_make_scanner()
__all__ = ['make_scanner', 'JSONDecodeError']
NUMBER_RE = re.compile(
r... | gpl-3.0 |
signalfx/Diamond | src/collectors/filestat/test/testfilestat.py | 29 | 1853 | #!/usr/bin/python
# coding=utf-8
################################################################################
from test import CollectorTestCase
from test import get_collector_config
from test import unittest
from mock import Mock
from mock import patch
try:
from cStringIO import StringIO
except ImportError:
... | mit |
cortedeltimo/SickRage | lib/pgi/obj.py | 18 | 15898 | # Copyright 2012, 2013 Christoph Reiter
#
# 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.
import itertools
fro... | gpl-3.0 |
TeamExodus/external_chromium_org | ppapi/native_client/tools/browser_tester/browser_tester.py | 69 | 17888 | #!/usr/bin/python
# Copyright (c) 2012 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 glob
import optparse
import os.path
import socket
import sys
import thread
import time
import urllib
# Allow the import of thir... | bsd-3-clause |
praekelt/django-activity-stream | actstream/urls.py | 3 | 1612 | from django.conf.urls.defaults import *
from django.conf import settings
from actstream.feeds import *
urlpatterns = patterns('actstream.views',
# Syndication Feeds
url(r'^feed/(?P<content_type_id>\d+)/(?P<object_id>\d+)/atom/$', AtomObjectActivityFeed(), name='actstream_object_feed_atom'),
url(r'^feed/(?P... | bsd-3-clause |
XYM1988/Algorithm | Chp8/8.1-General-Tree.py | 1 | 2720 | # Tree is an organizational relationship that is richer than the simple "before"
# and "after" relationships between objects in sequences.
# We define a tree T as a set of nodes storing elements such that the nodes have
# a parent-child relationship that satisfies the following properties:
# 1. If T is nonempty, it ha... | mit |
batermj/algorithm-challenger | code-analysis/programming_anguage/python/source_codes/Python3.8.0/Python-3.8.0/Lib/configparser.py | 23 | 54374 | """Configuration file parser.
A configuration file consists of sections, lead by a "[section]" header,
and followed by "name: value" entries, with continuations and such in
the style of RFC 822.
Intrinsic defaults can be specified by passing them into the
ConfigParser constructor as a dictionary.
class:
ConfigParse... | apache-2.0 |
anthill-platform/anthill-social | anthill/social/model/social/facebook.py | 1 | 2400 |
import datetime
from anthill.common import to_int
from anthill.common.social import APIError
from anthill.common.social.apis import FacebookAPI
from .. social import SocialAPI, SocialAuthenticationRequired
from .. token import NoSuchToken
class FacebookSocialAPI(SocialAPI, FacebookAPI):
def __init__(self, appl... | mit |
ebukoz/thrive | erpnext/buying/report/procurement_tracker/test_procurement_tracker.py | 5 | 2443 | # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import unittest
from datetime import datetime
import frappe
from erpnext.buying.report.procurement_tracker.procurement_tracker import execute
from erpnext.stock... | gpl-3.0 |
ftl-toolbox/lib_openshift | test/test_v1beta1_scale_status.py | 2 | 1310 | # coding: utf-8
"""
OpenAPI spec version:
Generated by: https://github.com/swagger-api/swagger-codegen.git
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
... | apache-2.0 |
NDKoehler/DataScienceBowl2017_7th_place | dsb3_networks/classification/resnet2D_0.7res_80/config_2Dfinal.py | 1 | 3207 | from collections import defaultdict
from datetime import datetime
import json
import tensorflow as tf
import os, sys
import pandas as pd
#config dic
H = defaultdict(lambda: None)
#All possible config options:
H['optimizer'] = 'MomentumOptimizer'#'RMSPropOptimizer'
H['learning_rate'] = 0.001
H['momentum'] = 0.9 #0.9... | mit |
MebiusHKU/flask-web | flask/lib/python2.7/site-packages/pip/commands/wheel.py | 239 | 7442 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import logging
import os
import warnings
from pip.basecommand import RequirementCommand
from pip.index import PackageFinder
from pip.exceptions import CommandError, PreviousBuildDirError
from pip.req import RequirementSet
from pip.utils import import_or_r... | bsd-3-clause |
Simran-B/arangodb | 3rdParty/V8-4.3.61/third_party/python_26/Lib/test/test_MimeWriter.py | 56 | 7669 | """Test program for MimeWriter module.
The test program was too big to comfortably fit in the MimeWriter
class, so it's here in its own file.
This should generate Barry's example, modulo some quotes and newlines.
"""
import unittest, StringIO
from test.test_support import run_unittest
import warnings
warnings.filt... | apache-2.0 |
EBII/account-invoicing | account_invoice_shipping_address/sale.py | 34 | 1453 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011 Domsense s.r.l. (<http://www.domsense.com>).
# Copyright (C) 2013 Andrea Cometa Perito Informatico (www.andreacometa.it)
#
# This program... | agpl-3.0 |
vectorijk/servo | tests/wpt/web-platform-tests/tools/pywebsocket/src/mod_pywebsocket/handshake/__init__.py | 658 | 4406 | # Copyright 2011, 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 f... | mpl-2.0 |
styx0x6/gremlins | lib/thirdparty/requests/packages/chardet/gb2312freq.py | 3132 | 36011 | ######################## 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... | agpl-3.0 |
faun/django_test | build/lib/django/utils/dates.py | 120 | 1193 | "Commonly-used date structures"
from django.utils.translation import ugettext_lazy as _
WEEKDAYS = {
0:_('Monday'), 1:_('Tuesday'), 2:_('Wednesday'), 3:_('Thursday'), 4:_('Friday'),
5:_('Saturday'), 6:_('Sunday')
}
WEEKDAYS_ABBR = {
0:_('Mon'), 1:_('Tue'), 2:_('Wed'), 3:_('Thu'), 4:_('Fri'),
5:_('Sat'... | bsd-3-clause |
af1rst/bite-project | deps/gdata-python-client/src/atom/http_core.py | 33 | 19992 | #!/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... | apache-2.0 |
hipnusleo/laserjet | resource/pypi/cryptography-1.7.1/tests/hazmat/primitives/test_pbkdf2hmac.py | 1 | 2440 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import pytest
from cryptography.exceptions import (
Already... | apache-2.0 |
bright-dev/Bright-lite | cmake/generate_test_macros.py | 12 | 3258 | """generate_test_macros.py
A simple module and default main execution to generate a listing of
ADD_TEST CMake macros for all non-disabled tests in a
google-test-based executable.
The default main function writes a list of macros to the given output
file.
"""
from __future__ import print_function
import os
import sub... | bsd-3-clause |
dlintott/gns3-ppa | src/GNS3/Ui/ConfigurationPages/Form_IOSRouterPage.py | 3 | 26666 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './ConfigurationPages/Form_IOSRouterPage.ui'
#
# Created: Mon Sep 9 21:29:22 2013
# by: PyQt4 UI code generator 4.8.6
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore... | gpl-2.0 |
medspx/QGIS | python/plugins/db_manager/sql_dictionary.py | 50 | 2723 | # -*- coding: utf-8 -*-
"""
***************************************************************************
sql_dictionary.py
---------------------
Date : April 2012
Copyright : (C) 2012 by Giuseppe Sucameli
Email : brush dot tyler at gmail dot com
************... | gpl-2.0 |
hosseinmh/Django_learning | djmod/.venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/chardistribution.py | 2755 | 9226 | ######################## 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... | mit |
geerlingguy/ansible | lib/ansible/plugins/shell/cmd.py | 13 | 2202 | # Copyright (c) 2019 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__ = type
DOCUMENTATION = '''
name: cmd
plugin_type: shell
version_added: '2.8'
short_description: Windows Comm... | gpl-3.0 |
mlaitinen/odoo | openerp/addons/base/ir/ir_values.py | 228 | 26238 | # -*- 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 |
carlomt/dicom_tools | dicom_tools/pyqtgraph/exceptionHandling.py | 47 | 4149 | # -*- coding: utf-8 -*-
"""This module installs a wrapper around sys.excepthook which allows multiple
new exception handlers to be registered.
Optionally, the wrapper also stops exceptions from causing long-term storage
of local stack frames. This has two major effects:
- Unhandled exceptions will no longer cause ... | mit |
yuanbaowen521/tadbit | scripts/liftover_tads_genomes.py | 2 | 7055 | """
17 May 2013
Liftover (1) wrapper applied to the comparison of topologically associated
domains.
This script allows to compare Hi-C experiments (mainly align TAD boundaries)
done with different assemblies (e.g.: NCBI36 and GRCh37 for human genome), or
in different species.
INSTALL:
- liftover tool needs to b... | gpl-3.0 |
KousikaGanesh/purchaseandInventory | openerp/pooler.py | 61 | 2131 | # -*- 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 |
RoyalTS/econ-python-environment | .mywaflib/waflib/extras/ticgt.py | 2 | 9754 | #!/usr/bin/env python
# encoding: utf-8
# Texas Instruments code generator support (experimental)
# When reporting issues, please directly assign the bug to the maintainer.
__author__ = __maintainer__ = "Jérôme Carretero <cJ-waf@zougloub.eu>"
__copyright__ = "Jérôme Carretero, 2012"
"""
TI cgt6x is a compiler suite ... | bsd-3-clause |
alexgorban/models | research/ptn/pretrain_rotator.py | 5 | 9680 | # 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 applicab... | apache-2.0 |
duducosmos/pgs4a | private/lib/android/apk.py | 1 | 3947 | import os
import struct
import zipfile
import cStringIO
class SubFile(object):
def __init__(self, f, name, base, length):
self.f = f
self.base = base
self.offset = 0
self.length = length
self.name = name
self.f.seek(self.base)
def read(self, length=None):
... | lgpl-2.1 |
camptocamp/odoo | addons/lunch/report/report_lunch_order.py | 39 | 2778 | # -*- 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 |
tersmitten/ansible | lib/ansible/modules/crypto/openssl_csr_info.py | 11 | 20851 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2016-2017, Yanis Guenane <yanis+ansible@guenane.org>
# Copyright: (c) 2017, Markus Teufelberger <mteufelberger+ansible@mgit.at>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import... | gpl-3.0 |
enthought/depsolver | depsolver/pool.py | 1 | 8318 | import collections
from .bundled.traitlets \
import \
HasTraits, Dict, Instance, List, Long, Unicode
from .errors \
import \
DepSolverError, MissingPackageInfoInPool
from .package \
import \
PackageInfo
from .repository \
import \
Repository
from .requirement \
impor... | bsd-3-clause |
pmoleri/memorize-accesible | speak/espeak_cmd.py | 1 | 2079 | # 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 is distributed in the hope that it will be useful,
# bu... | gpl-2.0 |
bobcyw/django | django/conf/locale/nb/formats.py | 504 | 1766 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. F Y'
TIME_FORMAT = 'H:i'
DATET... | bsd-3-clause |
lhellebr/GreenTea | apps/core/forms.py | 1 | 3210 | # Author: Pavel Studenik <pstudeni@redhat.com>
# Date: 24.9.2013
import difflib
import logging
from django import forms
import apps.core.views
from models import GroupTemplate, GroupTestTemplate, JobTemplate, Test
logger = logging.getLogger("main")
class HomepageForm(forms.Form):
ORDER_CHOICES = (
("r... | gpl-2.0 |
dexterx17/nodoSocket | clients/Python-2.7.6/Lib/distutils/errors.py | 251 | 3494 | """distutils.errors
Provides exceptions used by the Distutils modules. Note that Distutils
modules may raise standard exceptions; in particular, SystemExit is
usually raised for errors that are obviously the end-user's fault
(eg. bad command-line arguments).
This module is safe to use in "from ... import *" mode; it... | mit |
kevalds51/sympy | sympy/parsing/tests/test_maxima.py | 123 | 1647 | from sympy.parsing.maxima import parse_maxima
from sympy import Rational, Abs, Symbol, sin, cos, E, oo, log, factorial
from sympy.abc import x
n = Symbol('n', integer=True)
def test_parser():
assert Abs(parse_maxima('float(1/3)') - 0.333333333) < 10**(-5)
assert parse_maxima('13^26') == 917333301932686166583... | bsd-3-clause |
jjangsangy/python-matlab-bridge | pymatbridge/tests/test_magic.py | 2 | 4408 | import os
import pymatbridge as pymat
from pymatbridge.matlab_magic import MatlabInterperterError
from IPython.testing.globalipapp import get_ipython
import numpy.testing as npt
class TestMagic:
# Create an IPython shell and load Matlab magic
@classmethod
def setup_class(cls):
cls.ip = get_ipyt... | bsd-3-clause |
maellak/invenio | modules/bibsword/lib/bibsword_client_dblayer.py | 35 | 13645 | ## This file is part of Invenio.
## Copyright (C) 2010, 2011 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 version.
##
... | gpl-2.0 |
gfrances/model-based-social-simulations | experiments/all-agents-simple.py | 1 | 1661 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
# from experiments.src.exp import AggregateExperiment, MDPAgentConfiguration, SingleExperiment
from src.sequential_taskgen import SequentialTaskgen
from src.experiment import AggregateExperiment, MDPAgentConfiguration, SingleExperiment, LazyAgentConfigurat... | gpl-2.0 |
keithfancher/Blobulous | blobulous/enemy.py | 1 | 3919 | # Copyright 2011, 2012 Keith Fancher
#
# This file is part of Blobulous.
#
# Blobulous 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.
... | gpl-3.0 |
github-account-because-they-want-it/django | django/db/migrations/optimizer.py | 339 | 15773 | from __future__ import unicode_literals
from django.db.migrations import (
AddField, AlterField, AlterIndexTogether, AlterModelTable,
AlterOrderWithRespectTo, AlterUniqueTogether, CreateModel, DeleteModel,
RemoveField, RenameField, RenameModel,
)
from django.utils import six
class MigrationOptimizer(obje... | bsd-3-clause |
oppo-source/Find7-kernel-source | scripts/rt-tester/rt-tester.py | 11005 | 5307 | #!/usr/bin/python
#
# rt-mutex tester
#
# (C) 2006 Thomas Gleixner <tglx@linutronix.de>
#
# This program 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.
#
import os
import sys
import getopt
import sh... | gpl-2.0 |
BT-ojossen/odoo | openerp/release.py | 284 | 2591 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | agpl-3.0 |
cajal/pipeline | python/pipeline/collection.py | 5 | 1851 | import datajoint as dj
from pipeline import experiment
schema = dj.schema('pipeline_collection', create_tables=True)
@schema
class Study(dj.Manual):
definition = """
# class of experiments towards specific aim
study_name :varchar(50) # name of study
---
descri... | lgpl-3.0 |
initOS/server-tools | scheduler_error_mailer/ir_cron.py | 9 | 2957 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Scheduler Error Mailer module for OpenERP
# Copyright (C) 2012-2013 Akretion (http://www.akretion.com/)
# @author: Sébastien Beau <sebastien.beau@akretion.com>
# @author David Beal <bealdavid@gmail.c... | agpl-3.0 |
IssamLaradji/scikit-learn | sklearn/tests/test_grid_search.py | 8 | 26766 | """
Testing for grid search module (sklearn.grid_search)
"""
from collections import Iterable, Sized
from sklearn.externals.six.moves import cStringIO as StringIO
from sklearn.externals.six.moves import xrange
from itertools import chain, product
import pickle
import sys
import warnings
import numpy as np
import sci... | bsd-3-clause |
hradec/gaffer | python/GafferUITest/ListContainerTest.py | 7 | 10503 | ##########################################################################
#
# Copyright (c) 2011, John Haddon. All rights reserved.
# Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided ... | bsd-3-clause |
JoonghyunCho/crosswalk-tizen | tools/gyp/pylib/gyp/easy_xml.py | 1049 | 4803 | # 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.
import re
import os
def XmlToString(content, encoding='utf-8', pretty=False):
""" Writes the XML content to disk, touching the file only if it has changed.
... | apache-2.0 |
hellofreedom/ansible | lib/ansible/module_utils/ec2.py | 30 | 9043 | # This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own license
# to the complete wo... | gpl-3.0 |
demvher/pythondotorg | blogs/admin.py | 10 | 1527 | from django.contrib import admin
from django.core.management import call_command
from cms.admin import ContentManageableModelAdmin
from .models import BlogEntry, Contributor, Translation, Feed, FeedAggregate
class TranslationAdmin(ContentManageableModelAdmin):
list_display = ['name', '_display_url']
def _... | apache-2.0 |
michalliu/chromium-depot_tools | third_party/logilab/common/deprecation.py | 15 | 4357 | # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-common.
#
# logilab-common is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as publ... | bsd-3-clause |
yugang/crosswalk-test-suite | webapi/tct-backgrounds-css3-tests/inst.wgt.py | 136 | 6856 | #!/usr/bin/env python
import os
import shutil
import glob
import time
import sys
import subprocess
import string
from optparse import OptionParser, make_option
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PKG_NAME = os.path.basename(SCRIPT_DIR)
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=... | bsd-3-clause |
alexm92/sentry | src/sentry/south_migrations/0105_auto__chg_field_projectcountbyminute_time_spent_total__chg_field_group.py | 36 | 28446 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'ProjectCountByMinute.time_spent_total'
db.alter_column(u'sentry_projectcountbyminute', 't... | bsd-3-clause |
CIBC-Internal/teem | python/ctypes/interface_test.py | 3 | 1873 | #!/usr/bin/env python
# test.py: 16-bit grayscale PNG to nrrd file
# Sam Quinan
import Nrrd as nrd, numpy as np
# TESTING: fmob-ch4 crop test
print "TEST: fmob-ch4.nrrd"
a = nrd.Nrrd()
a.load("../../data/fmob-c4h.nrrd")
print "nrrd loaded..."
b = nrd.ExtendedArray(a)
print "wrapped as array..."
c = b[5:11,:,:]
prin... | lgpl-2.1 |
IshankGulati/scikit-learn | benchmarks/bench_plot_svd.py | 72 | 2914 | """Benchmarks of Singular Value Decomposition (Exact and Approximate)
The data is mostly low rank but is a fat infinite tail.
"""
import gc
from time import time
import numpy as np
from collections import defaultdict
import six
from scipy.linalg import svd
from sklearn.utils.extmath import randomized_svd
from sklear... | bsd-3-clause |
jschub/python-oauth2 | example/client.py | 375 | 6700 | """
The MIT License
Copyright (c) 2007 Leah Culver
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, publis... | mit |
Beit-Hatfutsot/dbs-back | scripts/migrate.py | 1 | 16413 | # -*- coding: utf-8 -*-
import re
import os
import sys
import logging
from argparse import ArgumentParser
from decimal import Decimal
import datetime
import calendar
import time
from functools import partial
from pymongo import MongoClient
from pymongo.errors import BulkWriteError
from bson.code import Code
from gedc... | agpl-3.0 |
ppries/tensorflow | tensorflow/python/kernel_tests/large_concat_op_test.py | 1 | 1511 | # 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 |
REANNZ/faucet | faucet/conf.py | 3 | 9565 | """Base configuration implementation."""
# Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer.
# Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd.
# Copyright (C) 2015--2019 The Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use ... | apache-2.0 |
mick-d/nipype | nipype/interfaces/bids_utils.py | 3 | 5108 | # -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
""" Set of interfaces that allow interaction with BIDS data. Currently
available interfaces are:
BIDSDataGrabber: Query data from BIDS dataset using pybids grabbids.
Change di... | bsd-3-clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.