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 |
|---|---|---|---|---|---|
abhi931375/requests-oauthlib | tests/test_compliance_fixes.py | 6 | 2723 | from __future__ import unicode_literals
import unittest
import mock
import requests
from requests_oauthlib import OAuth2Session
from requests_oauthlib.compliance_fixes import facebook_compliance_fix
from requests_oauthlib.compliance_fixes import linkedin_compliance_fix
from requests_oauthlib.compliance_fixes import w... | isc |
nagyistoce/odoo-dev-odoo | addons/account_check_writing/report/check_print.py | 320 | 2943 | # -*- 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 |
eahneahn/free | lib/python2.7/site-packages/django/views/decorators/http.py | 228 | 7105 | """
Decorators for views based on HTTP headers.
"""
import logging
from calendar import timegm
from functools import wraps
from django.utils.decorators import decorator_from_middleware, available_attrs
from django.utils.http import http_date, parse_http_date_safe, parse_etags, quote_etag
from django.middleware.http i... | agpl-3.0 |
kannan-usf/AppInventorJavaBridge | appinventor/lib/blockly/src/i18n/common.py | 74 | 7608 | #!/usr/bin/python
# Code shared by translation conversion scripts.
#
# Copyright 2013 Google Inc.
# https://blockly.googlecode.com/
#
# 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... | apache-2.0 |
Circumstellar/ChannelMaps | chmaps.py | 1 | 9863 | #!/usr/bin/env python
# Reads everything from a config.yaml file located in the same directory.
import argparse
parser = argparse.ArgumentParser(description="Plot channel maps.")
parser.add_argument("--config", default="config.yaml", help="The configuration file specifying defaults.")
parser.add_argument("--measure"... | mit |
hms-dbmi/fourfront | src/encoded/tests/test_clear_db_es_contents.py | 2 | 3453 | import pytest
from unittest import mock
from ..commands.clear_db_es_contents import (
clear_db_tables,
run_clear_db_es
)
from ..commands import clear_db_es_contents
pytestmark = [pytest.mark.setone, pytest.mark.working]
def test_clear_db_tables(app, testapp):
# post an item and make sure it's there
... | mit |
hassanabidpk/django | django/db/backends/sqlite3/operations.py | 180 | 9372 | from __future__ import unicode_literals
import datetime
import uuid
from django.conf import settings
from django.core.exceptions import FieldError, ImproperlyConfigured
from django.db import utils
from django.db.backends import utils as backend_utils
from django.db.backends.base.operations import BaseDatabaseOperatio... | bsd-3-clause |
darongliu/Lstm_Turing_LM | lstm-neural-turing-machines-lm/experiment_version/lstm+attention+pretrain/theano_lstm/shared_memory.py | 43 | 4649 | from multiprocessing import sharedctypes
from numpy import ctypeslib
import numpy as np
def wrap_params(params):
"""
For each parameter in a list of Theano TensorSharedVariable
we substitute the memory with a sharedctype using the
multiprocessing library.
The wrapped memory can then be used by... | mit |
phalax4/CarnotKE | jyhton/Lib/test/clamp.py | 12 | 2254 | import java
import os
import os.path
from java.lang.reflect import Modifier
from org.python.util import CodegenUtils
from org.python.compiler import CustomMaker, ProxyCodeHelpers
__all__ = ["PackageProxy", "SerializableProxies"]
class SerializableProxies(CustomMaker):
# NOTE: SerializableProxies is itself a j... | apache-2.0 |
vapor-ware/synse-server | tests/unit/cmd/test_info.py | 1 | 1756 | """Unit tests for the ``synse_server.cmd.info`` module."""
import asynctest
import pytest
from synse_grpc import api
from synse_server import cmd, errors
@pytest.mark.asyncio
async def test_info_device_not_found():
with asynctest.patch('synse_server.cache.get_device') as mock_get:
mock_get.return_value ... | gpl-3.0 |
pombredanne/taskflow-1 | taskflow/engines/worker_based/dispatcher.py | 2 | 7136 | # -*- coding: utf-8 -*-
# Copyright (C) 2014 Yahoo! Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2... | apache-2.0 |
nextgis-extra/tests | lib_gdal/utilities/test_gdal_translate_lib.py | 1 | 13366 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# $Id: test_gdal_translate_lib.py 33902 2016-04-06 19:07:34Z rouault $
#
# Project: GDAL/OGR Test Suite
# Purpose: test librarified gdal_translate
# Author: Faza Mahamood <fazamhd at gmail d... | gpl-2.0 |
daidokoro/qaz | examples/encryption/lambda.py | 2 | 2361 | import base64
import uuid
import httplib
import urlparse
import json
import boto3
def send_response(request, response, status=None, reason=None):
""" Send our response to the pre-signed URL supplied by CloudFormation
If no ResponseURL is found in the request, there is no place to send a
response. This may... | apache-2.0 |
xiaom-GitHub/openthread | tests/scripts/thread-cert/Cert_5_6_09_NetworkDataForwarding.py | 4 | 5202 | #!/usr/bin/env python
#
# Copyright (c) 2016, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# ... | bsd-3-clause |
immenz/pyload | module/plugins/hoster/OverLoadMe.py | 2 | 2406 | # -*- coding: utf-8 -*-
import re
from random import randrange
from urllib import unquote
from module.common.json_layer import json_loads
from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
from module.utils import parseFileSize
class OverLoadMe(MultiHoster):
__name__ = "OverLoadMe"
... | gpl-3.0 |
Fingercomp/python-utils | cc-chat.py | 1 | 41086 | #!/usr/bin/env python3
"""
Copyright 2016 Fingercomp
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable... | apache-2.0 |
polojacky/ehfpi | ehf/rest_framework/mixins.py | 14 | 6974 | """
Basic building blocks for generic class based views.
We don't bind behaviour to http method handlers yet,
which allows mixin classes to be composed in interesting ways.
"""
from __future__ import unicode_literals
from django.core.exceptions import ValidationError
from django.http import Http404
from rest_framewor... | apache-2.0 |
martinbede/second-sight | tensorflow/python/kernel_tests/decode_raw_op_test.py | 15 | 2331 | # 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 |
robofab-developers/fontParts | Lib/fontParts/test/test_normalizers.py | 1 | 72178 | import unittest
from fontTools.misc.py23 import unicode
from fontParts.base import normalizers
class TestNormalizers(unittest.TestCase):
# ----
# Font
# ----
def getFont_layers(self):
font, _ = self.objectGenerator("font")
for name in ["A", "B", "C", "D", "E"]:
font.newLa... | mit |
dansantee/OctoPrint | src/octoprint/util/__init__.py | 3 | 23685 | # coding=utf-8
"""
This module bundles commonly used utility methods or helper classes that are used in multiple places withing
OctoPrint's source code.
"""
__author__ = "Gina Häußge <osd@foosel.net>"
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
import os
import traceback
im... | agpl-3.0 |
Tsjerk/Martinize | martinize/ForceFields/martini22_ff.py | 1 | 11769 | from .. import functions
from .forcefield import Forcefield
################################
## 6 # FORCE FIELD PARAMETERS ## -> @FF <-
################################
# New martini 2.2 parameters.
# Changed:
# Unstructured Pro backbone bead
# Proline side chains
# Phe sidechain
# Trp sidechain
# Helix B... | gpl-2.0 |
jeffrey4l/nova | nova/tests/unit/pci/test_utils.py | 44 | 7119 | # Copyright (c) 2013 Intel, Inc.
# Copyright (c) 2012 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/li... | apache-2.0 |
KyleAMoore/KanjiNani | Android/.buildozer/android/platform/build/build/other_builds/kivy-python3crystax-sdl2/armeabi-v7a/kivy/examples/gestures/my_gestures.py | 31 | 6301 | from kivy.gesture import GestureDatabase
gdb = GestureDatabase()
cross = gdb.str_to_gesture(
'eNq1l9tu3DYQhu/1It6bLjicE+cFtrcF/ACBYwv2Iqkt7G7a5u1DDqlT0lZ7I2Mxsj5JP2f4k'
'xR1OH85//X9+Npfb98uffd7Ow6hO7wM0D0+vD/92T90Q8z/5gN218eH6+3y8aW/5lPqDl8H7g'
'7/KvLot3WDFCnNzw8f5/dbeSyVx+w/Hvuj3NUNUDMoKXzPj0DsTuGIGiRJGC... | gpl-3.0 |
tanji/replication-manager | share/opensvc/compliance/com.replication-manager/self.signed.cert.py | 2 | 5369 | #!/usr/bin/env python
data = {
"default_prefix": "OSVC_COMP_CERT_",
"example_value": """
{
"CN": "%%ENV:SERVICES_SVCNAME%%",
"crt": "/srv/%%ENV:SERVICES_SVCNAME%%/data/nginx/conf/ssl/server.crt",
"key": "/srv/%%ENV:SERVICES_SVCNAME%%/data/nginx/conf/ssl/server.key",
"bits": 2048,
"C": "FR",
... | gpl-3.0 |
Debian/openjfx | modules/web/src/main/native/Tools/Scripts/webkitpy/port/mac.py | 2 | 12125 | # Copyright (C) 2011 Google Inc. All rights reserved.
# Copyright (C) 2012, 2013, 2016 Apple 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 reta... | gpl-2.0 |
jab/lektor | lektor/build_programs.py | 1 | 6852 | import os
import sys
import json
import shutil
import posixpath
from itertools import chain
from werkzeug.debug.tbtools import Traceback
from lektor.db import Page, Attachment
from lektor.assets import File, Directory, LessFile
from lektor.reporter import reporter
from lektor.context import get_ctx
from lektor.utils... | bsd-3-clause |
ipsosante/holidays.py | holidays.py | 1 | 54190 | # -*- coding: utf-8 -*-
# holidays.py
# -----------
# A fast, efficient Python library for generating country-specific sets of
# holidays on the fly. It aims to make determining whether a specific date is
# a holiday as fast and flexible as possible.
#
# Author: ryanss <ryanssdev@icloud.com>
# Website: https:/... | mit |
Teagan42/home-assistant | homeassistant/components/todoist/calendar.py | 2 | 20277 | """Support for Todoist task management (https://todoist.com)."""
from datetime import datetime, timedelta
import logging
from todoist.api import TodoistAPI
import voluptuous as vol
from homeassistant.components.calendar import PLATFORM_SCHEMA, CalendarEventDevice
from homeassistant.const import CONF_ID, CONF_NAME, CO... | apache-2.0 |
MER-GROUP/intellij-community | python/testData/MockSdk2.7/Lib/_abcoll.py | 218 | 14672 | # Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Abstract Base Classes (ABCs) for collections, according to PEP 3119.
DON'T USE THIS MODULE DIRECTLY! The classes here should be imported
via collections; they are defined here only to alleviate certain
bootstrappin... | apache-2.0 |
catapult-project/catapult | third_party/gsutil/gslib/vendored/boto/boto/sns/__init__.py | 22 | 2123 | # Copyright (c) 2010-2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010-2011, Eucalyptus Systems, Inc.
#
# 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, includin... | bsd-3-clause |
Pablo126/SSBW | Entrega1/lib/python3.5/site-packages/bson/objectid.py | 69 | 9278 | # Copyright 2009-2015 MongoDB, 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 writin... | gpl-3.0 |
chriszs/redash | redash/authentication/saml_auth.py | 1 | 4968 | import logging
from flask import flash, redirect, url_for, Blueprint, request
from redash.authentication import create_and_login_user, logout_and_redirect_to_index
from redash.authentication.org_resolving import current_org
from redash.handlers.base import org_scoped_rule
from saml2 import BINDING_HTTP_POST, BINDING_HT... | bsd-2-clause |
SamiHiltunen/invenio-demosite | invenio_demosite/base/recordext/functions/sync_authors.py | 7 | 1749 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio Demosite.
# Copyright (C) 2014 CERN.
#
# Invenio Demosite 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... | gpl-2.0 |
linglung/ytdl | youtube_dl/extractor/xnxx.py | 43 | 1596 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..compat import compat_urllib_parse_unquote
class XNXXIE(InfoExtractor):
_VALID_URL = r'https?://(?:video|www)\.xnxx\.com/video-?(?P<id>[0-9a-z]+)/'
_TESTS = [{
'url': 'http://www.xnxx.com/video-55awb78/sky... | unlicense |
ivanod/nemesys-qos | nemesys/utils.py | 9 | 1100 | # utils.py
# -*- coding: utf-8 -*-
# Copyright (c) 2014 Fondazione Ugo Bordoni.
#
# 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 late... | gpl-3.0 |
synicalsyntax/zulip | zerver/webhooks/wordpress/tests.py | 4 | 4256 | from zerver.lib.test_classes import WebhookTestCase
class WordPressHookTests(WebhookTestCase):
STREAM_NAME = 'wordpress'
URL_TEMPLATE = "/api/v1/external/wordpress?api_key={api_key}&stream={stream}"
FIXTURE_DIR_NAME = 'wordpress'
def test_publish_post(self) -> None:
expected_topic = "WordPre... | apache-2.0 |
jhajek/euca2ools | euca2ools/commands/ec2/modifysnapshotattribute.py | 6 | 4371 | # Copyright 2013-2014 Eucalyptus Systems, Inc.
#
# Redistribution and use of this software 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 ... | bsd-2-clause |
ryuunosukeyoshi/PartnerPoi-Bot | lib/chardet/charsetprober.py | 289 | 5110 | ######################## 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-3.0 |
ehabkost/tp-qemu | qemu/tests/qemu_option_check.py | 7 | 2433 | import re
import logging
from autotest.client import utils
from autotest.client.shared import error
from virttest import utils_misc
@error.context_aware
def run(test, params, env):
"""
QEMU support options check test
Test Step:
1) Get qemu support device options
2) Check whether qemu have... | gpl-2.0 |
Ex-Mente/auxi.0 | auxi/modelling/financial/des_test.py | 1 | 15012 | #!/usr/bin/env python3
"""
This module provides testing code for the auxi.modelling.financial.des module.
"""
import unittest
from datetime import datetime
from auxi.modelling.financial.des import AccountType
from auxi.modelling.financial.des import GeneralLedgerAccount
from auxi.modelling.financial.des import Transa... | lgpl-3.0 |
shumik/skencil-c | Sketch/UI/skpixmaps.py | 1 | 4968 | # Sketch - A Python-based interactive drawing program
# Copyright (C) 1997, 1998, 1999, 2003, 2004 by Bernhard Herzog
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2... | gpl-2.0 |
jcai19/smm_gem5 | src/arch/x86/isa/insts/simd128/floating_point/data_conversion/__init__.py | 91 | 2483 | # Copyright (c) 2007 The Hewlett-Packard Development Company
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implemen... | bsd-3-clause |
yaroslavprogrammer/django | django/utils/deprecation.py | 133 | 2395 | import inspect
import warnings
class warn_about_renamed_method(object):
def __init__(self, class_name, old_method_name, new_method_name, deprecation_warning):
self.class_name = class_name
self.old_method_name = old_method_name
self.new_method_name = new_method_name
self.deprecation... | bsd-3-clause |
Klozz/TheXperienceProject_Motorola_Kernel_msm8226_falcon | scripts/tracing/draw_functrace.py | 14676 | 3560 | #!/usr/bin/python
"""
Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com>
Licensed under the terms of the GNU GPL License version 2
This script parses a trace provided by the function tracer in
kernel/trace/trace_functions.c
The resulted trace is processed into a tree to produce a more human
view of the call ... | gpl-2.0 |
benhoff/listenerplugins | listenerplugins/pagecheck.py | 35 | 1515 | import urllib.parse
from bs4 import BeautifulSoup
import requests
import requests.exceptions
from cloudbot import hook
@hook.command("down", "offline", "up")
def down(text):
"""<url> - checks if <url> is online or offline
:type text: str
"""
if "://" not in text:
text = 'http://' + text
... | gpl-3.0 |
onitake/ansible | hacking/tests/gen_distribution_version_testcase.py | 63 | 1905 | #!/usr/bin/env python
"""
This script generated test_cases for test_distribution_version.py.
To do so it outputs the relevant files from /etc/*release, the output of platform.dist() and the current ansible_facts regarding the distribution version.
This assumes a working ansible version in the path.
"""
import platf... | gpl-3.0 |
gylian/sickrage | lib/hachoir_parser/file_system/iso9660.py | 90 | 4966 | """
ISO 9660 (cdrom) file system parser.
Documents:
- Standard ECMA-119 (december 1987)
http://www.nondot.org/sabre/os/files/FileSystems/iso9660.pdf
Author: Victor Stinner
Creation: 11 july 2006
"""
from lib.hachoir_parser import Parser
from lib.hachoir_core.field import (FieldSet, ParserError,
UInt8, UInt32, ... | gpl-3.0 |
hyperspy/hyperspy | hyperspy/tests/model/test_model_storing.py | 2 | 5973 | # -*- coding: utf-8 -*-
# Copyright 2007-2021 The HyperSpy developers
#
# This file is part of HyperSpy.
#
# HyperSpy 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... | gpl-3.0 |
lgeiger/ide-python | dist/debugger/VendorLib/vs-py-debugger/pythonFiles/experimental/ptvsd/ptvsd/__main__.py | 2 | 5774 | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE in the project root
# for license information.
import argparse
import os.path
import sys
from ptvsd._attach import attach_main
from ptvsd._local import debug_main, run_main
from ptvsd.socket import Address
from p... | mit |
Codefans-fan/odoo | openerp/addons/base/ir/ir_sequence.py | 83 | 14810 | # -*- 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 |
miscaandrei/django-testapp | django/contrib/localflavor/uy/forms.py | 87 | 2143 | # -*- coding: utf-8 -*-
"""
UY-specific form helpers.
"""
from __future__ import absolute_import
from django.core.validators import EMPTY_VALUES
from django.forms.fields import Select, RegexField
from django.forms import ValidationError
from django.utils.translation import ugettext_lazy as _
from django.contrib.local... | bsd-3-clause |
jjmleiro/hue | desktop/core/ext-py/Django-1.6.10/django/core/serializers/python.py | 106 | 6103 | """
A Python "serializer". Doesn't do much serializing per se -- just converts to
and from basic Python data types (lists, dicts, strings, etc.). Useful as a basis for
other serializers.
"""
from __future__ import unicode_literals
from django.conf import settings
from django.core.serializers import base
from django.db... | apache-2.0 |
SUSE/calamari-clients | dashboard/app/bower_components/dygraphs/generate-download.py | 12 | 2117 | #!/usr/bin/env python
# Generates docs/download.html
# Run:
# ./generate-download.py > docs/download.html
import json
releases = json.load(file('releases.json'))
def file_links(release):
v = release['version']
return ['<a href="%(v)s/%(f)s">%(f)s</a>' % {
'f': f, 'v': v} for f in release['files']]
# Valid... | mit |
cloud-rocket/python-OBD | obd/elm327.py | 1 | 12165 |
########################################################################
# #
# python-OBD: A python OBD-II serial module derived from pyobd #
# #
# Copyright 2004 Donour Siz... | gpl-2.0 |
slevenhagen/odoo | addons/multi_company/__openerp__.py | 259 | 1620 | # -*- 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 |
DavidResin/aps-aalto | stitch/cv/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/url.py | 713 | 5879 | from __future__ import absolute_import
from collections import namedtuple
from ..exceptions import LocationParseError
url_attrs = ['scheme', 'auth', 'host', 'port', 'path', 'query', 'fragment']
class Url(namedtuple('Url', url_attrs)):
"""
Datastructure for representing an HTTP URL. Used as a return value f... | gpl-3.0 |
stephane-martin/salt-debian-packaging | salt-2016.3.2/tests/unit/modules/memcached_test.py | 2 | 13768 | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
'''
# Import Python Libs
from __future__ import absolute_import
# Import Salt Testing Libs
from salttesting import TestCase, skipIf
from salttesting.mock import (
MagicMock,
patch,
NO_MOCK,
NO_MOCK_REASON
)
fro... | apache-2.0 |
guewen/OpenUpgrade | addons/account_bank_statement_extensions/report/__init__.py | 415 | 1128 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
#
# Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# i... | agpl-3.0 |
shoopio/shoop | shuup/xtheme/migrations/0001_squashed_0005_alter_names.py | 2 | 2909 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import enumfields.fields
from django.db import migrations, models
import shuup.core.fields
import shuup.xtheme.models
class Migration(migrations.Migration):
replaces = [
('shuup_xtheme', '0001_initial'),
('shuup_xtheme', '0002_md_to... | agpl-3.0 |
asomya/test | horizon/dashboards/syspanel/dashboard.py | 3 | 1126 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Nebula, 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
#
# ... | apache-2.0 |
ryfeus/lambda-packs | Selenium_Chromium/source/selenium/webdriver/support/color.py | 45 | 11396 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | mit |
Ll0ir/android_external_chromium | chrome/common/extensions/docs/examples/apps/hello-python/main.py | 70 | 5222 | #!/usr/bin/python
# Copyright (c) 2010 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 google.appengine.ext import webapp
from google.appengine.ext.webapp import util
from google.appengine.api import users
from google... | bsd-3-clause |
hitakaken/ifplus | example/settings.py | 1 | 2352 | # -*- coding: utf-8 -*-
SERVER_IP = '10.1.80.180'
# SERVER_IP = '106.14.20.122'
# SERVER_IP = '127.0.0.1'
MONGO_HOST = SERVER_IP # '106.14.20.122'
MONGO_PORT = 27017
MONGO_DBNAME = 'istis'
REDIS_IP = '127.0.0.1' # SERVER_IP # '192.168.25.105' # '10.1.80.180'
REDIS_URL = 'redis://' + REDIS_IP + ':6379/0'
CACHE = {
... | mit |
egabancho/invenio | invenio/modules/oauthclient/utils.py | 1 | 3989 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2014, 2015 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 opt... | gpl-2.0 |
thnee/ansible | lib/ansible/modules/cloud/azure/azure_rm_functionapp.py | 41 | 15193 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2016, Thomas Stringer <tomstr@microsoft.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_ver... | gpl-3.0 |
kenshay/ImageScripter | ProgramData/SystemFiles/Python/Lib/site-packages/skimage/io/tests/test_fits.py | 4 | 2601 | import os.path
import numpy as np
import skimage.io as io
from skimage import data_dir
from skimage._shared import testing
pyfits_available = True
try:
from astropy.io import fits as pyfits
except ImportError:
try:
import pyfits
except ImportError:
pyfits_available = False
if pyfits_avai... | gpl-3.0 |
joelddiaz/openshift-tools | openshift/installer/vendored/openshift-ansible-3.9.14-1/roles/lib_openshift/src/class/oc_adm_policy_group.py | 33 | 7719 | # pylint: skip-file
# flake8: noqa
class PolicyGroupException(Exception):
''' PolicyGroup exception'''
pass
class PolicyGroupConfig(OpenShiftCLIConfig):
''' PolicyGroupConfig is a DTO for group related policy. '''
def __init__(self, namespace, kubeconfig, policy_options):
super(PolicyGroupC... | apache-2.0 |
backtou/longlab | grc/python/Constants.py | 13 | 3204 | """
Copyright 2008-2011 Free Software Foundation, Inc.
This file is part of GNU Radio
GNU Radio Companion 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 l... | gpl-3.0 |
Paul-Ezell/cinder-1 | doc/ext/cinder_todo.py | 24 | 3333 | # This is a hack of the builtin todo extension, to make the todo_list
# more user friendly
from sphinx.ext.todo import *
import re
def _(s):
return s
def process_todo_nodes(app, doctree, fromdocname):
if not app.config['todo_include_todos']:
for node in doctree.traverse(todo_node):
node... | apache-2.0 |
gasman/shortcrust | shortcrust/raspi/egl.py | 2 | 3308 | # Copyright (c) 2012 Peter de Rivaz
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted.
import ctypes
# Pick up our constants extracted from the header files with prepare_constants.py
from egl_constants import *
# Define verbose=True to get debug messages
verbose = Fa... | mit |
moylop260/odoo-dev | addons/base_report_designer/plugin/openerp_report_designer/bin/script/modify.py | 384 | 4437 | #########################################################################
#
# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
# Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>).
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser Gene... | agpl-3.0 |
GenericStudent/home-assistant | tests/components/wilight/test_init.py | 6 | 1727 | """Tests for the WiLight integration."""
import pytest
import pywilight
from homeassistant.components.wilight.const import DOMAIN
from homeassistant.config_entries import (
ENTRY_STATE_LOADED,
ENTRY_STATE_NOT_LOADED,
ENTRY_STATE_SETUP_RETRY,
)
from homeassistant.helpers.typing import HomeAssistantType
fro... | apache-2.0 |
openstack/mistral-extra | mistral_extra/actions/openstack/utils/context.py | 1 | 1246 | # Copyright 2013 - Mirantis, Inc.
# Copyright 2016 - Brocade Communications Systems, 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/LI... | apache-2.0 |
martinghunt/iva | iva/common.py | 2 | 1856 | # Copyright (c) 2014-2016 Genome Research Ltd.
#
# This file is part of IVA.
#
# IVA 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 |
ryannathans/micropython | examples/hwapi/soft_pwm.py | 43 | 1367 | import utime
from hwconfig import LED
# Using sleep_ms() gives pretty poor PWM resolution and
# brightness control, but we use it in the attempt to
# make this demo portable to even more boards (e.g. to
# those which don't provide sleep_us(), or provide, but
# it's not precise, like would be on non realtime OSes).
# ... | mit |
kvar/ansible | test/units/modules/packaging/os/test_redhat_subscription.py | 7 | 42365 | # Author: Jiri Hnidek (jhnidek@redhat.com)
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import json
from ansible.module_utils import basic
from ansible.modules.packaging.os import... | gpl-3.0 |
lmazuel/azure-sdk-for-python | azure-mgmt-search/azure/mgmt/search/operations/services_operations.py | 4 | 21218 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit |
vicky2135/lucious | oscar/lib/python2.7/site-packages/py/_path/svnwc.py | 5 | 45089 | """
svn-Command based Implementation of a Subversion WorkingCopy Path.
SvnWCCommandPath is the main class.
"""
import os, sys, time, re, calendar
import py
import subprocess
from py._path import common
#-----------------------------------------------------------
# Caching latest repository revision ... | bsd-3-clause |
tkaitchuck/nupic | external/darwin64/lib/python2.6/site-packages/numpy/lib/benchmarks/sorting.py | 45 | 1024 | from benchmark import Benchmark
modules = ['numpy','Numeric','numarray']
b = Benchmark(modules,runs=3,reps=100)
N = 10000
b.title = 'Sorting %d elements' % N
b['numarray'] = ('a=np.array(None,shape=%d,typecode="i");a.sort()'%N,'')
b['numpy'] = ('a=np.empty(shape=%d, dtype="i");a.sort()'%N,'')
b['Numeric'] = ('a=np.em... | gpl-3.0 |
Matt5sean3/amtrak-recorder | scripts/poll.py | 1 | 24095 | #!/usr/bin/python
# Needs major revamp to conform to the restructuring
# This script is meant to pull information from the Google Maps Engine
# used internally by the Track a Train Webapp
# This script is responsible for 4 tables
# ALIAS, STATION, TRAIN, STOP
# Generally, this information has low update frequency
#... | mit |
matmarti/Electroweak_Database_Extraction_Tool | GUI.py | 1 | 6517 | from Tkinter import *
import searching_function as sf
import isotopeDataExportingDat as ided
root = Tk()
root.title("Data Extraction")
class Application(Frame):
def __init__(self,master):
Frame.__init__(self,master)
self.create_widgets()
self.grid()
#Here are the vari... | mit |
digimarc/django | tests/forms_tests/tests/test_regressions.py | 14 | 8031 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.forms import (
CharField, ChoiceField, Form, HiddenInput, IntegerField, ModelForm,
ModelMultipleChoiceField, MultipleChoiceField, RadioSelect, Select,
TextInput,
)
from django.test import TestCase, ignore_warnings
from django.utils... | bsd-3-clause |
nhenezi/kuma | vendor/packages/translate-toolkit/translate/misc/ini.py | 7 | 18186 | # Copyright (c) 2001, 2002, 2003 Python Software Foundation
# Copyright (c) 2004 Paramjit Oberoi <param.cs.wisc.edu>
# All Rights Reserved. See LICENSE-PSF & LICENSE for details.
"""Access and/or modify INI files
* Compatiable with ConfigParser
* Preserves order of sections & options
* Preserves comments/blank lines... | mpl-2.0 |
maru-sama/pyblosxom | Pyblosxom/plugins/tags.py | 3 | 17632 | #######################################################################
# This file is part of Pyblosxom.
#
# Copyright (c) 2009, 2010, 2011 Will Kahn-Greene
#
# Pyblosxom is distributed under the MIT license. See the file
# LICENSE for distribution details.
############################################################... | mit |
einstein95/crunchy-xml-decoder | crunchy-xml-decoder/bs4/builder/__init__.py | 97 | 11088 | from collections import defaultdict
import itertools
import sys
from bs4.element import (
CharsetMetaAttributeValue,
ContentMetaAttributeValue,
whitespace_re
)
__all__ = [
'HTMLTreeBuilder',
'SAXTreeBuilder',
'TreeBuilder',
'TreeBuilderRegistry',
]
# Some useful features for a Tree... | gpl-2.0 |
AcornHack/joodle-dump | doodle.py | 1 | 6638 | import pygame
import time
# todo
# wrap round off edge of screen
# make screen scrolling smoother?
# add audio?
# new character
# simple character animation?
# tune movement to make it feel good
# add more platforms
# add more items and different types
# fall down to a crisis
# remove platforms that scroll off the bot... | mit |
leighpauls/k2cro4 | third_party/WebKit/Source/ThirdParty/gyp/pylib/gyp/MSVSSettings_test.py | 12 | 65283 | #!/usr/bin/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.
""" Unit tests for the MSVSSettings.py file. """
import sys
import unittest
import MSVSSettings
import StringIO
class TestSequenceFunctions(... | bsd-3-clause |
dsemi/Flexget | flexget/utils/tools.py | 1 | 16736 | """Contains miscellaneous helpers"""
from __future__ import unicode_literals, division, absolute_import
from builtins import * # pylint: disable=unused-import, redefined-builtin
from future.moves.urllib import request
from future.utils import PY2
from past.builtins import basestring
import logging
import ast
import c... | mit |
alivecor/tensorflow | tensorflow/python/kernel_tests/functional_ops_test.py | 5 | 20117 | # 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 |
AOSPERIA/android_kernel_sony | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py | 12980 | 5411 | # SchedGui.py - Python extension for perf script, basic GUI code for
# traces drawing and overview.
#
# Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com>
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
... | gpl-2.0 |
c0defreak/python-for-android | python3-alpha/extra_modules/gdata/projecthosting/data.py | 120 | 3309 | #!/usr/bin/env python
#
# Copyright 2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | apache-2.0 |
40223134/40223134w17 | static/Brython3.1.1-20150328-091302/Lib/zipfile.py | 620 | 66368 | """
Read and write ZIP files.
XXX references to utf-8 need further investigation.
"""
import io
import os
import re
import imp
import sys
import time
import stat
import shutil
import struct
import binascii
try:
import zlib # We may need its compression method
crc32 = zlib.crc32
except ImportError:
zlib =... | gpl-3.0 |
benfinke/ns_python | nssrc/com/citrix/netscaler/nitro/resource/stat/system/systemcpu_stats.py | 3 | 3712 | #
# Copyright (c) 2008-2015 Citrix Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | apache-2.0 |
sunlianqiang/kbengine | kbe/src/lib/python/Lib/xml/sax/xmlreader.py | 824 | 12612 | """An XML Reader is the SAX 2 name for an XML parser. XML Parsers
should be based on this code. """
from . import handler
from ._exceptions import SAXNotSupportedException, SAXNotRecognizedException
# ===== XMLREADER =====
class XMLReader:
"""Interface for reading an XML document using callbacks.
XMLReade... | lgpl-3.0 |
Tobychev/tardis | tardis/plasma/properties/general.py | 4 | 2966 | import logging
import numpy as np
from astropy import constants as const
from tardis.plasma.properties.base import ProcessingPlasmaProperty
logger = logging.getLogger(__name__)
__all__ = ['BetaRadiation', 'GElectron', 'NumberDensity', 'SelectedAtoms',
'ElectronTemperature', 'BetaElectron']
class BetaRad... | bsd-3-clause |
MoisesTedeschi/python | Scripts-Python/Modulos-Diversos/python-com-scrapy/Lib/site-packages/setuptools/command/install_egg_info.py | 412 | 2203 | from distutils import log, dir_util
import os
from setuptools import Command
from setuptools import namespaces
from setuptools.archive_util import unpack_archive
import pkg_resources
class install_egg_info(namespaces.Installer, Command):
"""Install an .egg-info directory for the package"""
description = "In... | gpl-3.0 |
praekelt/panya-social | setup.py | 1 | 1673 | from setuptools import setup, find_packages
setup(
name='panya-social',
version='0.0.5',
description='Panya social app.',
long_description = open('README.rst', 'r').read() + open('AUTHORS.rst', 'r').read() + open('CHANGELOG.rst', 'r').read(),
author='Praekelt Foundation',
author_email='dev@prae... | bsd-3-clause |
was4444/chromium.src | third_party/protobuf/python/google/protobuf/internal/descriptor_pool_test.py | 210 | 9375 | #! /usr/bin/python
#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# ... | bsd-3-clause |
talon-one/talon_one.py | talon_one/configuration.py | 1 | 14376 | # coding: utf-8
"""
Talon.One API
The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. #... | mit |
GodBlessPP/2015cd_midterm2 | static/Brython3.1.1-20150328-091302/Lib/_collections.py | 603 | 19111 | # "High performance data structures
# "
# copied from pypy repo
#
# Copied and completed from the sandbox of CPython
# (nondist/sandbox/collections/pydeque.py rev 1.1, Raymond Hettinger)
#
# edited for Brython line 558 : catch ImportError instead of AttributeError
import operator
#try:
# from thread import get_i... | agpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.