repo_name stringlengths 5 100 | path stringlengths 4 375 | copies stringclasses 991
values | size stringlengths 4 7 | content stringlengths 666 1M | license stringclasses 15
values |
|---|---|---|---|---|---|
BorgERP/borg-erp-6of3 | addons/account/account.py | 1 | 184756 | # -*- 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 |
scholer/zotero-client | doc/conf.py | 4 | 8305 | # -*- coding: utf-8 -*-
#
# Pyzotero documentation build configuration file, created by
# sphinx-quickstart on Mon Jul 4 19:52:05 2011.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... | gpl-3.0 |
ScholzVolkmer/django-cms | cms/test_utils/fixtures/menus.py | 18 | 5198 | # -*- coding: utf-8 -*-
from __future__ import with_statement
from cms.api import create_page
from cms.test_utils.util.context_managers import SettingsOverride
class MenusFixture(object):
def create_fixtures(self):
"""
Tree from fixture:
+ P1
| + P2
... | bsd-3-clause |
twidi/satchmo | satchmo/apps/shipping/config.py | 5 | 3085 | from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from livesettings import *
from satchmo_store.shop import get_satchmo_setting
from satchmo_utils import is_string_like, load_module
SHIPPING_GROUP = ConfigurationGroup('SHIPPING', _('Shipping Settings'))
SHIPPING_ACTIVE = config_... | bsd-3-clause |
cloudify-cosmo/cloudify-agent | cloudify_agent/tests/installer/runners/test_winrm_runner.py | 1 | 2645 | import pytest
from cloudify_agent.installer.runners import winrm_runner
from cloudify_agent.installer.runners.winrm_runner import split_into_chunks
##############################################################################
# note that this file only tests validation and defaults of the winrm runner.
# it does not... | apache-2.0 |
schambers/civmarket | civmarket/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py | 13 | 13203 | from __future__ import unicode_literals
import os
import sys
from optparse import make_option
from django.core.files.storage import FileSystemStorage
from django.core.management.base import CommandError, NoArgsCommand
from django.utils.encoding import smart_text
from django.utils.datastructures import SortedDict
from... | apache-2.0 |
ThiefMaster/indico | indico/modules/events/editing/fields.py | 4 | 4283 | # This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
import fnmatch
import os
from marshmallow import ValidationError
from marshmallow.fields import Dict
fro... | mit |
mruddy/bitcoin | test/functional/rpc_invalid_address_message.py | 16 | 3689 | #!/usr/bin/env python3
# Copyright (c) 2020 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 error messages for 'getaddressinfo' and 'validateaddress' RPC commands."""
from test_framework.test_fr... | mit |
zhlinh/leetcode | 0033.Search in Rotated Sorted Array/solution.py | 1 | 1309 | #!/usr/bln/env python
# -*- codlng: utf-8 -*-
'''
*****************************************
Author: zhllnh
Emall: zhllnhng@gmall.com
Verslon: 0.0.1
Created Tlme: 2016-02-16
Last_modify: 2016-02-16
******************************************
'''
'''
Suppose a sorted array ls rotated at some ... | apache-2.0 |
cristian69/KernotekV3 | venv/lib/python2.7/site-packages/pip/_vendor/requests/models.py | 277 | 26436 | # -*- coding: utf-8 -*-
"""
requests.models
~~~~~~~~~~~~~~~
This module contains the primary objects that power Requests.
"""
import collections
import datetime
from io import BytesIO, UnsupportedOperation
from .hooks import default_hooks
from .structures import CaseInsensitiveDict
from .auth import HTTPBasicAuth
... | gpl-3.0 |
hectord/lettuce | tests/integration/lib/Django-1.3/tests/regressiontests/utils/feedgenerator.py | 51 | 2526 | 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 generates TagURIs.
"""
self.ass... | gpl-3.0 |
GenericStudent/home-assistant | tests/components/wiffi/test_config_flow.py | 7 | 3859 | """Test the wiffi integration config flow."""
import errno
import pytest
from homeassistant import config_entries, data_entry_flow
from homeassistant.components.wiffi.const import DOMAIN
from homeassistant.const import CONF_PORT, CONF_TIMEOUT
from homeassistant.data_entry_flow import (
RESULT_TYPE_ABORT,
RESU... | apache-2.0 |
CenterForOpenScience/waterbutler | waterbutler/server/api/v1/core.py | 2 | 1710 | import tornado.web
import tornado.gen
import tornado.iostream
import sentry_sdk
from waterbutler import tasks
from waterbutler.server import utils
from waterbutler.core import exceptions
class BaseHandler(utils.CORsMixin, utils.UtilMixin, tornado.web.RequestHandler):
@classmethod
def as_entry(cls):
... | apache-2.0 |
eestay/edx-platform | common/lib/xmodule/xmodule/partitions/partitions.py | 53 | 6735 | """Defines ``Group`` and ``UserPartition`` models for partitioning"""
from collections import namedtuple
from stevedore.extension import ExtensionManager
# We use ``id`` in this file as the IDs of our Groups and UserPartitions,
# which Pylint disapproves of.
# pylint: disable=invalid-name, redefined-builtin
class U... | agpl-3.0 |
henocdz/python-social-auth | social/backends/kakao.py | 72 | 1285 | """
Kakao OAuth2 backend, docs at:
http://psa.matiasaguirre.net/docs/backends/kakao.html
"""
from social.backends.oauth import BaseOAuth2
class KakaoOAuth2(BaseOAuth2):
"""Kakao OAuth authentication backend"""
name = 'kakao'
AUTHORIZATION_URL = 'https://kauth.kakao.com/oauth/authorize'
ACCESS_TOKE... | bsd-3-clause |
Justin-Yuan/Image2Music-Generator | library/image.py | 2 | 13273 | ################################################################################################################
# image.py Version 1.5 19-May-2014 Bill Manaris
###########################################################################
#
# This file is part of Jython Music.
#
# Copyright (C) 2014 Bill Mana... | gpl-2.0 |
wonder-sk/QGIS | python/ext-libs/requests/packages/chardet/mbcsgroupprober.py | 2769 | 1967 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | gpl-2.0 |
davidcusatis/horizon | openstack_dashboard/enabled/_1051_project_ng_images_panel.py | 17 | 1179 | # (c) Copyright 2015 Hewlett-Packard Development Company, L.P.
#
# 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 appli... | apache-2.0 |
ted-gould/nova | nova/tests/unit/scheduler/test_host_manager.py | 11 | 50114 | # Copyright (c) 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | apache-2.0 |
GatorQue/git-repo-flow | subcmds/push.py | 1 | 3111 | #
# Copyright (C) 2016 Pieter Smith
#
# 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 w... | apache-2.0 |
mdietrichc2c/OCB | addons/hr_recruitment/report/hr_recruitment_report.py | 325 | 4836 | # -*- 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 |
vongochung/buiquocviet | django/contrib/admin/helpers.py | 84 | 13636 | from django import forms
from django.contrib.admin.util import (flatten_fieldsets, lookup_field,
display_for_field, label_for_field, help_text_for_field)
from django.contrib.admin.templatetags.admin_static import static
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import Ob... | bsd-3-clause |
Distrotech/mod_python | lib/python/mod_python/Cookie.py | 1 | 12688 | # vim: set sw=4 expandtab :
#
# Copyright 2004 Apache Software Foundation
#
# 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
#
#... | apache-2.0 |
arthru/OpenUpgrade | addons/account/ir_sequence.py | 44 | 2392 | # -*- 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 |
nicholaschris/massive-wight | tests/unit/common_safe_dom.py | 13 | 9954 | """Unit tests for the common.sanitize module."""
__author__ = 'John Orr (jorr@google.com)'
import unittest
from common import safe_dom
class MockNode(safe_dom.Node):
def __init__(self, value):
self._value = value
@property
def sanitized(self):
return self._value
class NodeListTests(un... | apache-2.0 |
thandang/TComponent | TComponents/cpp/scons/scons-local-2.0.0.final.0/SCons/Tool/mslink.py | 34 | 10680 | """SCons.Tool.mslink
Tool-specific initialization for the Microsoft linker.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SC... | apache-2.0 |
School-of-Innovation-Experiment/InnovationManagement | debug_toolbar/utils/sqlparse/engine/__init__.py | 12 | 2321 | # Copyright (C) 2008 Andi Albrecht, albrecht.andi@gmail.com
#
# This module is part of python-sqlparse and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php.
"""filter"""
from debug_toolbar.utils.sqlparse import lexer
from debug_toolbar.utils.sqlparse.engine import grouping
from ... | agpl-3.0 |
stephen144/odoo | addons/l10n_br/__openerp__.py | 5 | 2224 | # -*- encoding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (C) 2009 Renato Lima - Akretion
{
'name': 'Brazilian - Accounting',
'category': 'Localization/Account Charts',
'description': """
Base module for the Brazilian localization
===================... | agpl-3.0 |
zasdfgbnm/tensorflow | tensorflow/contrib/learn/python/learn/estimators/estimators_test.py | 46 | 6682 | # 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 |
sysexits/cs530 | tools/perf/scripts/python/syscall-counts-by-pid.py | 1996 | 2105 | # 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 system call totals, broken down by syscall.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os, sys
sys.path.append(os.env... | gpl-2.0 |
scionrep/scioncc | src/putil/test/test_reflection.py | 1 | 1161 |
from unittest.case import TestCase
import unittest
import os
import shutil
from putil.reflection import EggCache
repo = 'https://pypi.python.org/packages/source/i/iomock'
egg = 'iomock-0.1.tar.gz#md5=13d842a2f989922034601233c826590e'
class TestReflection(TestCase):
@unittest.skip("Leads to SSL error")
def... | bsd-2-clause |
NavyaJayaram/MyRepository | YouTubeUsingAJS/lib/python2.7/site-packages/setuptools/tests/test_bdist_egg.py | 286 | 1954 | """develop tests
"""
import sys
import os, re, shutil, tempfile, unittest
import tempfile
import site
from distutils.errors import DistutilsError
from setuptools.compat import StringIO
from setuptools.command.bdist_egg import bdist_egg
from setuptools.command import easy_install as easy_install_pkg
from setuptools.dis... | mit |
virtualopensystems/neutron | neutron/agent/linux/daemon.py | 8 | 4316 | # Copyright 2012 New Dream Network, LLC (DreamHost)
#
# 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 a... | apache-2.0 |
mjirayu/sit_academy | common/djangoapps/heartbeat/views.py | 199 | 1440 | from xmodule.modulestore.django import modulestore
from dogapi import dog_stats_api
from util.json_request import JsonResponse
from django.db import connection
from django.db.utils import DatabaseError
from xmodule.exceptions import HeartbeatFailure
@dog_stats_api.timed('edxapp.heartbeat')
def heartbeat(request):
... | agpl-3.0 |
sarahkemi/movesio | movesio/bin/activate_this.py | 1076 | 1137 | """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 |
jbair34/moose | python/PresentationBuilder/base/PresentationBuilder.py | 19 | 5594 | import sys, os, inspect, re
from collections import OrderedDict
from FactorySystem import *
from utils import colorText
from ..slidesets import *
from ..slides import *
##
# Class for generating complete slide shows from markdown syntax
#
# Available properties in top-level "[presentation]" block
# style = 'inl'
#... | lgpl-2.1 |
brightchen/Impala | tests/query_test/test_local_fs.py | 16 | 1062 | # Copyright (c) 2015 Cloudera, Inc. All rights reserved.
# Validates table stored on the LocalFileSystem.
#
import pytest
from tests.common.impala_test_suite import ImpalaTestSuite
from tests.common.test_dimensions import create_single_exec_option_dimension
class TestLocalFileSystem(ImpalaTestSuite):
@classmethod
... | apache-2.0 |
muhummadPatel/raspied | students/views.py | 1 | 6116 | from datetime import datetime, timedelta
from dateutil import parser as timestring_parser
from django.conf import settings
from django.contrib.auth import authenticate, get_user_model, login
from django.contrib.auth.decorators import login_required
from django.contrib.auth.views import login as default_login_view
from ... | mit |
wheldom01/privacyidea | privacyidea/lib/stats.py | 3 | 5545 | # -*- coding: utf-8 -*-
#
# 2015-07-16 Initial writeup
# (c) Cornelius Kölbel
# License: AGPLv3
# contact: http://www.privacyidea.org
#
# This code is free software; you can redistribute it and/or
# modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
# License as published by the Free Software Foun... | agpl-3.0 |
mikalstill/nova | nova/db/sqlalchemy/types.py | 10 | 2491 | # Copyright 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 |
actuaryzhang/spark | python/pyspark/ml/tests/test_wrapper.py | 8 | 5156 | #
# 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 |
michaelaye/scikit-image | skimage/restoration/_denoise.py | 8 | 11219 | # coding: utf-8
import numpy as np
from .. import img_as_float
from ..restoration._denoise_cy import _denoise_bilateral, _denoise_tv_bregman
def denoise_bilateral(image, win_size=5, sigma_range=None, sigma_spatial=1,
bins=10000, mode='constant', cval=0):
"""Denoise image using bilateral filt... | bsd-3-clause |
devs1991/test_edx_docmode | venv/lib/python2.7/site-packages/newrelic-2.46.0.37/newrelic/packages/requests/packages/chardet/mbcharsetprober.py | 2924 | 3268 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | agpl-3.0 |
jithinbp/pslab-desktop-apps | PSL_Apps/utilityApps/outputs.py | 1 | 6975 | #!/usr/bin/python
'''
Output Peripheral control for FOSSASIA PSLab - version 1.0.0.
'''
from __future__ import print_function
import os
os.environ['QT_API'] = 'pyqt'
import sip
sip.setapi("QString", 2)
sip.setapi("QVariant", 2)
from PyQt4 import QtCore, QtGui
import time,sys
from PSL_Apps.templates import ui_control... | gpl-3.0 |
bpgc-cte/python2017 | Week 7/django/lib/python3.6/site-packages/django/contrib/gis/shortcuts.py | 66 | 1227 | import zipfile
from io import BytesIO
from django.conf import settings
from django.http import HttpResponse
from django.template import loader
# NumPy supported?
try:
import numpy
except ImportError:
numpy = False
def compress_kml(kml):
"Returns compressed KMZ from the given KML string."
kmz = Bytes... | mit |
aquarimeter/aquarimeter | lib/python2.7/site-packages/pip/_vendor/colorama/ansitowin32.py | 287 | 6621 | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
import re
import sys
from .ansi import AnsiFore, AnsiBack, AnsiStyle, Style
from .winterm import WinTerm, WinColor, WinStyle
from .win32 import windll
if windll is not None:
winterm = WinTerm()
def is_a_tty(stream):
return hasattr(s... | apache-2.0 |
vasyarv/edx-platform | lms/djangoapps/courseware/migrations/0009_add_field_default.py | 114 | 9698 | # -*- 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 'XModuleContentField.value'
db.alter_column('courseware_xmodulecontentfield', 'value', sel... | agpl-3.0 |
jlane9/pytest-needle | docs/conf.py | 1 | 5171 | # -*- coding: utf-8 -*-
#
# pytest-needle documentation build configuration file, created by
# sphinx-quickstart on Wed Oct 25 11:30:00 2017.
#
# 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.... | mit |
kmonsoor/python-for-android | python-modules/twisted/twisted/conch/tap.py | 49 | 1690 | # -*- test-case-name: twisted.conch.test.test_tap -*-
# Copyright (c) 2001-2009 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Support module for making SSH servers with twistd.
"""
from twisted.conch import checkers, unix
from twisted.conch.openssh_compat import factory
from twisted.cred import portal
f... | apache-2.0 |
Unity-Technologies/ml-agents | ml-agents-envs/mlagents_envs/communicator_objects/unity_rl_initialization_input_pb2.py | 1 | 4514 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mlagents_envs/communicator_objects/unity_rl_initialization_input.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as ... | apache-2.0 |
i17c/pyspider | pyspider/libs/bench.py | 57 | 8187 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<roy@binux.me>
# http://binux.me
# Created on 2014-12-08 22:23:10
import time
import logging
logger = logging.getLogger('bench')
from six.moves import queue as Queue
from pyspider.scheduler import S... | apache-2.0 |
rahushen/ansible | lib/ansible/modules/network/nxos/nxos_gir.py | 19 | 12262 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | gpl-3.0 |
opendesk/winnow | src/winnow/tests/time_tests.py | 1 | 2102 | import time
from decimal import Decimal
from winnow.values import value_factory
import unittest
from decimal import Decimal
from winnow.values import value_factory
from winnow.values.numeric_values import NumericNumberWinnowValue, \
NumericSetWinnowValue, \
NumericRangeWinnowValue, \
NumericStepWinnowV... | unlicense |
jamixzol/chatah | node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py | 60 | 88275 | # 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.
# Notes:
#
# This is all roughly based on the Makefile system used by the Linux
# kernel, but is a non-recursive make -- we put the entire dependency
# graph in fr... | gpl-2.0 |
rishiloyola/bedrock | bedrock/settings/base.py | 1 | 29975 | # 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 json
import logging
from os.path import abspath
from django.utils.functional import lazy
from django.utils.http ... | mpl-2.0 |
Marcerisson/his-dudeness | graphalama/tree.py | 1 | 6043 | # -*- coding: utf-8 -*-
import pygame
from graphalama.borg import Borg
from graphalama.rectangle import Rectangle
borg_baby = Borg()
class TreeCell(Rectangle):
def __init__(self, y, w, h):
Rectangle.__init__(self, 0, y, w, h)
self.render()
self.item = None
def set_item(self, item):
... | mit |
shelbycruver/real-python-test | env/lib/python2.7/site-packages/pip/_vendor/requests/status_codes.py | 695 | 3136 | # -*- coding: utf-8 -*-
from .structures import LookupDict
_codes = {
# Informational.
100: ('continue',),
101: ('switching_protocols',),
102: ('processing',),
103: ('checkpoint',),
122: ('uri_too_long', 'request_uri_too_long'),
200: ('ok', 'okay', 'all_ok', 'all_okay', 'all_good', '\\o/'... | gpl-2.0 |
OneEducation/AppUniverse_Server | fdroidserver/scanner.py | 2 | 4051 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# scanner.py - part of the FDroid server tools
# Copyright (C) 2010-13, Ciaran Gultnieks, ciaran@ciarang.com
#
# This program 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 ... | agpl-3.0 |
lizardsystem/lizard-map | lizard_map/migrations/0005_auto__del_workspacecollagesnippetgroup__del_workspaceitem__del_workspa.py | 1 | 26945 | # encoding: 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):
# Deleting model 'WorkspaceCollageSnippetGroup'
db.delete_table('lizard_map_workspacecollagesnippetgroup')
... | lgpl-3.0 |
tedi3231/openerp | build/lib/openerp/addons/sale/report/sale_report.py | 5 | 5578 | # -*- 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 |
smoitra87/gerbil | deepnet/compute_data_stats.py | 11 | 2959 | """Utility for computing data stats."""
# python compute_data_stats.py mnist.pbtxt mnist_stats.npz train_full_data
import sys
from datahandler import *
from google.protobuf import text_format
class DataViewer(object):
def __init__(self, proto_file):
assert os.path.exists(proto_file)
self.data_proto = util.Re... | bsd-3-clause |
lmjohns3/besta-player | beetsplug/besta.py | 1 | 7387 | from __future__ import division, absolute_import, print_function
import beets.plugins
import beets.ui
import beetsplug.web
import flask
import math
import os
import PIL.Image
import random
import tempfile
import time
from flask import g
app = beetsplug.web.app
@app.before_request
def before_request():
g.player... | mit |
skoppisetty/idigbio-appliance | lib/sqlalchemy/dialects/sybase/pysybase.py | 5 | 3205 | # sybase/pysybase.py
# Copyright (C) 2010-2011 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
Support for Sybase via the python-sybase driver.
http://python-sybase.sourcefo... | gpl-3.0 |
thespacedoctor/panstamps | panstamps/tests/test_cl_utils.py | 1 | 3673 | from __future__ import print_function
from builtins import str
import os
import unittest
import shutil
import yaml
from panstamps.utKit import utKit
from fundamentals import tools
from os.path import expanduser
from docopt import docopt
from panstamps import cl_utils
doc = cl_utils.__doc__
home = expanduser("~")
packa... | mit |
CharlieGreenman/codeIllustrator | node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py | 899 | 2768 | # 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.
import collections
import os
import gyp
import gyp.common
import gyp.msvs_emulation
import json
import sys
generator_supports_multiple_toolsets = True
generator_... | mit |
MackZxh/OCA-Choice | server-tools/fetchmail_attach_from_folder/__init__.py | 54 | 1083 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Therp BV (<http://therp.nl>)
# All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
#... | lgpl-3.0 |
iulian787/spack | var/spack/repos/builtin/packages/admixtools/package.py | 2 | 1868 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Admixtools(MakefilePackage):
"""The ADMIXTOOLS package implements 5 methods described in
... | lgpl-2.1 |
ngageoint/scale | scale/job/test/messages/test_blocked_jobs.py | 1 | 5153 | from __future__ import unicode_literals
import datetime
import django
from django.utils.timezone import now
from django.test import TransactionTestCase
from job.messages.blocked_jobs import BlockedJobs
from job.models import Job
from job.test import utils as job_test_utils
class TestBlockedJobs(TransactionTestCase... | apache-2.0 |
shabab12/edx-platform | common/djangoapps/xblock_django/tests/test_api.py | 9 | 6609 | """
Tests related to XBlock support API.
"""
from xblock_django.models import XBlockConfiguration, XBlockStudioConfiguration, XBlockStudioConfigurationFlag
from xblock_django.api import deprecated_xblocks, disabled_xblocks, authorable_xblocks
from openedx.core.djangolib.testing.utils import CacheIsolationTestCase
cla... | agpl-3.0 |
2015fallproject/2015fallcase1 | static/Brython3.2.0-20150701-214155/Lib/test/unittests/test_parser.py | 113 | 26114 | import parser
import unittest
import sys
import operator
import struct
from test import support
from test.script_helper import assert_python_failure
#
# First, we test that we can generate trees from valid source fragments,
# and that these valid trees are indeed allowed by the tree-loading side
# of the parser mod... | agpl-3.0 |
HPI-SocialMediaMining/meetup_crawler | serializers.py | 1 | 8910 | class RelationHandler(object):
def __init__(self, object_location, object_class):
self.object_location = object_location
self.object_class = object_class
class Serializer(object):
"""Abstract class that serializes a JSON object according to parameters
that are described by its subclasses."""
TABLE_P... | mit |
redhat-openstack/trove | trove/extensions/account/models.py | 7 | 2002 | # Copyright 2010-2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | apache-2.0 |
ds-hwang/chromium-crosswalk | third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer.py | 11 | 18177 | # Copyright (C) 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... | bsd-3-clause |
jayceyxc/hue | apps/filebrowser/src/filebrowser/urls.py | 2 | 2617 | #!/usr/bin/env python
# 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 (the
# "License"); you ma... | apache-2.0 |
ybrs/terminator-forked | build/lib.linux-x86_64-2.7/terminatorlib/container.py | 3 | 9556 | #!/usr/bin/python
# Terminator by Chris Jones <cmsj@tenshu.net>
# GPL v2 only
"""container.py - classes necessary to contain Terminal widgets"""
import gobject
import gtk
from factory import Factory
from config import Config
from util import dbg, err
from translation import _
from signalman import Signalman
# pylint... | gpl-2.0 |
joksnet/youtube-dl | youtube_dl/extractor/pornotube.py | 4 | 1645 | import re
from .common import InfoExtractor
from ..utils import (
compat_urllib_parse,
unified_strdate,
)
class PornotubeIE(InfoExtractor):
_VALID_URL = r'^(?:https?://)?(?:\w+\.)?pornotube\.com(/c/(?P<channel>[0-9]+))?(/m/(?P<videoid>[0-9]+))(/(?P<title>.+))$'
_TEST = {
u'url': u'http://por... | unlicense |
linvictor88/vse-lbaas-driver | quantum/db/migration/alembic_migrations/versions/49332180ca96_ryu_plugin_update.py | 7 | 1687 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2013 OpenStack Foundation
#
# 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... | apache-2.0 |
imtapps/django-imt-fork | django/core/mail/backends/filebased.py | 145 | 2522 | """Email backend that writes messages to a file."""
import datetime
import os
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.mail.backends.console import EmailBackend as ConsoleEmailBackend
from django.utils import six
class EmailBackend(ConsoleEmailBackend)... | bsd-3-clause |
tedder/ansible | lib/ansible/modules/commands/expect.py | 16 | 7760 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Matt Martz <matt@sivel.net>
# 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 |
mattesno1/Sick-Beard | lib/hachoir_parser/archive/sevenzip.py | 90 | 15608 | """
7zip file parser
Informations:
- File 7zformat.txt of 7-zip SDK:
http://www.7-zip.org/sdk.html
Author: Olivier SCHWAB
Creation date: 6 december 2006
"""
from lib.hachoir_parser import Parser
from lib.hachoir_core.field import (Field, FieldSet, ParserError,
GenericVector,
Enum, UInt8, UInt32, UInt64,
... | gpl-3.0 |
mattcongy/itshop | docker-images/taigav2/taiga-back/taiga/projects/migrations/0019_auto_20150311_0821.py | 26 | 1481 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import djorm_pgarray.fields
class Migration(migrations.Migration):
dependencies = [
('projects', '0018_auto_20150219_1606'),
]
operations = [
migrations.AlterField(
model... | mit |
dokterbob/django-brainstorm | brainstorm/views.py | 1 | 2918 | import datetime
from django.template import RequestContext
from django.core.urlresolvers import reverse
from django.shortcuts import get_object_or_404, render_to_response, redirect
from django.http import HttpResponse
from django.contrib.comments.models import Comment
from django.contrib.contenttypes.models import Cont... | bsd-3-clause |
rexshihaoren/scikit-learn | sklearn/cluster/hierarchical.py | 128 | 34831 | """Hierarchical Agglomerative Clustering
These routines perform some hierarchical agglomerative clustering of some
input data.
Authors : Vincent Michel, Bertrand Thirion, Alexandre Gramfort,
Gael Varoquaux
License: BSD 3 clause
"""
from heapq import heapify, heappop, heappush, heappushpop
import warnings
im... | bsd-3-clause |
chrisdroid/nexmon | buildtools/gcc-arm-none-eabi-5_4-2016q2-osx/arm-none-eabi/lib/armv7e-m/softfp/fpv5-sp-d16/libstdc++.a-gdb.py | 6 | 2629 | # -*- python -*-
# Copyright (C) 2009-2015 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later versio... | gpl-3.0 |
tbabej/astropy | astropy/vo/samp/tests/test_hub_proxy.py | 4 | 1177 | from ..hub_proxy import SAMPHubProxy
from ..hub import SAMPHubServer
from .. import conf
def setup_module(module):
conf.use_internet = False
class TestHubProxy(object):
def setup_method(self, method):
self.hub = SAMPHubServer(web_profile=False, mode='multiple', pool_size=1)
self.hub.start(... | bsd-3-clause |
pathway27/servo | tests/wpt/web-platform-tests/tools/py/testing/root/test_xmlgen.py | 162 | 4008 |
import py
from py._xmlgen import unicode, html, raw
class ns(py.xml.Namespace):
pass
def test_escape():
uvalue = py.builtin._totext('\xc4\x85\xc4\x87\n\xe2\x82\xac\n', 'utf-8')
class A:
def __unicode__(self):
return uvalue
def __str__(self):
x = self.__unicode__()
... | mpl-2.0 |
karahiyo/hanoi-hadoop-2.0.0-cdh | src/contrib/hod/hodlib/HodRing/hodRing.py | 64 | 32427 | #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 |
goliate/sarakha63-persomov | libs/tornado/platform/auto.py | 139 | 1599 | #!/usr/bin/env python
#
# Copyright 2011 Facebook
#
# 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... | gpl-3.0 |
MaxiCM/android_kernel_samsung_degaswifi | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | 12527 | 1935 | # Util.py - Python extension for perf script, miscellaneous utility code
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
import errno, os
FUTEX_WAIT = 0... | gpl-2.0 |
pygeek/django | django/contrib/gis/gdal/field.py | 96 | 6334 | from ctypes import byref, c_int
from datetime import date, datetime, time
from django.contrib.gis.gdal.base import GDALBase
from django.contrib.gis.gdal.error import OGRException
from django.contrib.gis.gdal.prototypes import ds as capi
# For more information, see the OGR C API source code:
# http://www.gdal.org/ogr/... | bsd-3-clause |
snnn/tensorflow | tensorflow/contrib/rnn/python/ops/rnn.py | 20 | 10800 | # Copyright 2015 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 |
crmccreary/openerp_server | openerp/addons/project_scrum/report/task_burndown.py | 15 | 3549 | # -*- 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 |
cades/qualitybots | src/appengine/models/site.py | 26 | 3464 | #!/usr/bin/python2.4
#
# Copyright 2011 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... | apache-2.0 |
ltilve/ChromiumGStreamerBackend | tools/perf/page_sets/top_7_stress.py | 13 | 12125 | # 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.
from telemetry.page import page as page_module
from telemetry.page import shared_page_state
from telemetry import story
def _GetCurrentLocation(action_runne... | bsd-3-clause |
0x90sled/catapult | dashboard/dashboard/list_monitored_tests_test.py | 5 | 2432 | # 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.
import json
import unittest
import webapp2
import webtest
from dashboard import list_monitored_tests
from dashboard import testing_common
from dashboard.mo... | bsd-3-clause |
Dannnno/odo | odo/backends/ssh.py | 9 | 7008 | from __future__ import absolute_import, division, print_function
import paramiko
from contextlib import contextmanager
from toolz import keyfilter, memoize, take, curry
from datashape import discover
import re
import uuid
from ..directory import Directory
from ..utils import keywords, tmpfile, sample, ignoring, copyd... | bsd-3-clause |
bbannier/ROOT | interpreter/llvm/src/tools/clang/docs/analyzer/conf.py | 3 | 8021 | # -*- coding: utf-8 -*-
#
# Clang Static Analyzer documentation build configuration file, created by
# sphinx-quickstart on Wed Jan 2 15:54:28 2013.
#
# 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... | lgpl-2.1 |
onceuponatimeforever/oh-mainline | vendor/packages/python-social-auth/social/backends/open_id.py | 66 | 14306 | import datetime
from calendar import timegm
from jwt import InvalidTokenError, decode as jwt_decode
from openid.consumer.consumer import Consumer, SUCCESS, CANCEL, FAILURE
from openid.consumer.discover import DiscoveryFailure
from openid.extensions import sreg, ax, pape
from social.utils import url_add_parameters
fr... | agpl-3.0 |
liuqr/edx-xiaodun | lms/djangoapps/shoppingcart/migrations/0004_auto__add_field_orderitem_fulfilled_time.py | 68 | 8620 | # -*- 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):
# Adding field 'OrderItem.fulfilled_time'
db.add_column('shoppingcart_orderitem', 'fulfilled_time',
... | agpl-3.0 |
AsimmHirani/ISpyPi | tensorflow/contrib/tensorflow-master/tensorflow/python/saved_model/tag_constants.py | 70 | 1120 | # 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.