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 |
|---|---|---|---|---|---|
saltastro/pysalt | saltred/saltcrclean.py | 2 | 19878 | ################################# LICENSE ##################################
# Copyright (c) 2009, South African Astronomical Observatory (SAAO) #
# All rights reserved. #
# #
# Redistribu... | bsd-3-clause |
perzizzle/ansible-modules-extras | monitoring/pagerduty.py | 12 | 7181 | #!/usr/bin/python
DOCUMENTATION = '''
module: pagerduty
short_description: Create PagerDuty maintenance windows
description:
- This module will let you create PagerDuty maintenance windows
version_added: "1.2"
author:
- "Andrew Newdigate (@suprememoocow)"
- "Dylan Silva (@thaumos)"
- "Justin Johns"
re... | gpl-3.0 |
gitromand/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/style/checkers/xcodeproj.py | 194 | 2753 | # 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:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | bsd-3-clause |
LabD/django-postcode-lookup | docs/conf.py | 1 | 10306 | # -*- coding: utf-8 -*-
#
# Django PostcodeLookup documentation build configuration file, created by
# sphinx-quickstart on Wed Aug 10 17:06:14 2016.
#
# 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
# autogenerat... | mit |
RobberPhex/mysql-connector-python | tests/issues/test_bug21879914.py | 5 | 2148 | # -*- coding: utf-8 -*-
# MySQL Connector/Python - MySQL driver written in Python.
# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
# MySQL Connector/Python is licensed under the terms of the GPLv2
# <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
# MySQL Connectors. There ar... | gpl-2.0 |
renard/ansible | test/support/integration/plugins/module_utils/azure_rm_common.py | 6 | 65418 | # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com>
# Chris Houseknecht, <house@redhat.com>
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
import os
import re
import types
import copy
import inspect
import traceback
import json
from os.path import e... | gpl-3.0 |
codekaki/odoo | addons/account/wizard/account_report_partner_balance.py | 56 | 2288 | # -*- 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 |
WoLpH/EventGhost | languages/de_DE.py | 4 | 61680 | # -*- coding: UTF-8 -*-
class General:
apply = u"Ü&bernehmen"
autostartItem = u"Autostart"
browse = u"Suchen..."
cancel = u"Abbrechen"
choose = u"Auswählen"
configTree = u"Konfigurations-Baum"
deleteLinkedItems = u"Wenigstens ein Element außerhalb der momentanen Selektion verweist auf ein El... | gpl-2.0 |
Parcks/core | test/domain/post_install/shell/test_root_shell_command_runner.py | 1 | 2885 | """
Scriptable Packages Installer - Parcks
Copyright (C) 2017 JValck - Setarit
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.... | gpl-2.0 |
harshays/southwest | southwest/utils.py | 1 | 1537 | import os, sys, argparse
import datetime as dt
import threading
from functools import wraps
def _caffeinate():
os.system('caffeinate')
def caffeinate(fn):
@wraps(fn)
def wrapper(*args, **kwargs):
if sys.platform == 'darwin':
thrd = threading.Thread(target = _caffeinate, args = ())
... | mit |
krishna-pandey-git/django | django/contrib/gis/gdal/layer.py | 477 | 8693 | from ctypes import byref, c_double
from django.contrib.gis.gdal.base import GDALBase
from django.contrib.gis.gdal.envelope import Envelope, OGREnvelope
from django.contrib.gis.gdal.error import (
GDALException, OGRIndexError, SRSException,
)
from django.contrib.gis.gdal.feature import Feature
from django.contrib.g... | bsd-3-clause |
nviennot/rethinkdb | test/interface/distribution.py | 7 | 1972 | #!/usr/bin/env python
# Copyright 2010-2012 RethinkDB, all rights reserved.
import sys, os, time
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'common')))
import driver, http_admin, scenario_common
from memcached_workload_common import MemcacheConnection
from vcoptparse import ... | agpl-3.0 |
peterayeni/django-kong-admin | docs/conf.py | 3 | 8178 | # -*- coding: utf-8 -*-
#
# complexity documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 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 file.
#
# ... | bsd-3-clause |
bjodah/sym | sym/tests/test_cse.py | 1 | 1882 | from .. import Backend
import pytest
backends = []
for bk in Backend.backends.keys():
try:
_be = Backend(bk)
except ImportError:
continue
_x = _be.Symbol('x')
try:
_be.cse([_x])
except:
continue
backends.append(bk)
def _inverse_cse(subs_cses, cse_exprs):
... | bsd-2-clause |
ctiller/grpc | src/python/grpcio_tests/tests/unit/_cython/_cancel_many_calls_test.py | 8 | 8244 | # Copyright 2016 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | apache-2.0 |
samhoo/askbot-realworld | askbot/utils/forms.py | 1 | 8152 | import re
from django import forms
from django.http import str_to_unicode
from django.contrib.auth.models import User
from django.conf import settings
from django.utils.translation import ugettext as _
from django.utils.safestring import mark_safe
from askbot.conf import settings as askbot_settings
from askbot.utils.sl... | gpl-3.0 |
e-baumer/sampling | sampling/stratified_rand.py | 1 | 5349 | from __future__ import division
from collections import defaultdict
import numpy as np
from base_sample import BaseSample
from sklearn.cluster import AffinityPropagation as AP
import pandas as pd
from collections import Counter
class StratifiedRandom(BaseSample):
def __init__(self, data_frame, number_arms=2):... | apache-2.0 |
lekum/ansible-modules-extras | messaging/rabbitmq_parameter.py | 42 | 4803 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Chatham Financial <oss@chathamfinancial.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3... | gpl-3.0 |
nwjs/chromium.src | tools/grit/grit/tool/update_resource_ids/assigner.py | 10 | 11048 | # Copyright 2019 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.
"""Assign IDs to resource_ids file based on usage, while preserving structure.
resource_ids assignment is divided into two parts:
(A) Coarse assignment: Assi... | bsd-3-clause |
hlin117/scikit-learn | sklearn/gaussian_process/regression_models.py | 72 | 2172 | # -*- coding: utf-8 -*-
# Author: Vincent Dubourg <vincent.dubourg@gmail.com>
# (mostly translation, see implementation details)
# License: BSD 3 clause
"""
The built-in regression models submodule for the gaussian_process module.
"""
import numpy as np
def constant(x):
"""
Zero order polynomial (... | bsd-3-clause |
gilt/incubator-airflow | airflow/contrib/hooks/emr_hook.py | 61 | 2325 | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | apache-2.0 |
achang97/YouTunes | lib/python2.7/site-packages/youtube_dl/extractor/telewebion.py | 64 | 1843 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class TelewebionIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?telewebion\.com/#!/episode/(?P<id>\d+)'
_TEST = {
'url': 'http://www.telewebion.com/#!/episode/1263668/',
'info_dict': {
... | mit |
cherrydocker/minos | supervisor/supervisor/medusa/asyncore_25.py | 16 | 16744 | # -*- Mode: Python -*-
# Id: asyncore.py,v 2.51 2000/09/07 22:29:26 rushing Exp
# Author: Sam Rushing <rushing@nightmare.com>
# ======================================================================
# Copyright 1996 by Sam Rushing
#
# All Rights Reserved
#
# Permission to use, copy, modify,... | apache-2.0 |
wfxiang08/django190 | django/conf/locale/zh_Hant/formats.py | 1008 | 1810 | # -*- 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 = 'Y年n月j日' # 2016年9月5... | bsd-3-clause |
hgiemza/DIRAC | RequestManagementSystem/private/test/RequestTaskTests.py | 7 | 3127 |
""" :mod: RequestTaskTests
=======================
.. module: RequestTaskTests
:synopsis: test cases for RequestTask class
test cases for RequestTask class
"""
__RCSID__ = "$Id $"
# #
# @file RequestTaskTests.py
# @author Krzysztof.Ciba@NOSPAMgmail.com
# @date 2013/03/27 15:59:40
# @brief Definition ... | gpl-3.0 |
blackbliss/medity-expo-2014 | remote-api/flask/lib/python2.7/site-packages/pip/wheel.py | 145 | 20120 | """
Support for installing and building the "wheel" binary package format.
"""
from __future__ import with_statement
import compileall
import csv
import functools
import hashlib
import os
import re
import shutil
import sys
from base64 import urlsafe_b64encode
from email.parser import Parser
from pip.backwardcompat i... | mit |
DevinDewitt/pyqt5 | examples/itemviews/dirview.py | 2 | 2429 | #!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENS... | gpl-3.0 |
boneyao/sentry | src/sentry/db/models/fields/node.py | 15 | 3456 | """
sentry.db.models.fields.node
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import, print_function
import collections
import logging
import six
import warnings
from django.d... | bsd-3-clause |
lawrence34/python-social-auth | social/tests/backends/test_facebook.py | 64 | 1198 | import json
from social.exceptions import AuthUnknownError
from social.tests.backends.oauth import OAuth2Test
class FacebookOAuth2Test(OAuth2Test):
backend_path = 'social.backends.facebook.FacebookOAuth2'
user_data_url = 'https://graph.facebook.com/v2.3/me'
expected_username = 'foobar'
access_token_... | bsd-3-clause |
brokenseal/broke | examples/django/broke/blog/views.py | 1 | 2027 | import simplejson as json
from django.core import serializers
from django.http import HttpResponse, Http404
from django.shortcuts import get_object_or_404
from django.contrib.contenttypes.models import ContentType
from django.utils.html import strip_tags
from models import Entry
from forms import EntryForm
... | bsd-3-clause |
glomium/django-bmf | djangobmf/contrib/task/permissions.py | 2 | 2444 | #!/usr/bin/python
# ex:set fileencoding=utf-8:
from __future__ import unicode_literals
from django.db.models import Q
# from djangobmf.permissions import ModulePermission
from djangobmf.utils import FilterQueryset
class GoalFilter(FilterQueryset):
def filter_queryset(self, qs, user):
if user.has_perm(... | bsd-3-clause |
fpsluozi/youtube-dl | youtube_dl/extractor/cbsnews.py | 96 | 3204 | # encoding: utf-8
from __future__ import unicode_literals
import re
import json
from .common import InfoExtractor
class CBSNewsIE(InfoExtractor):
IE_DESC = 'CBS News'
_VALID_URL = r'http://(?:www\.)?cbsnews\.com/(?:[^/]+/)+(?P<id>[\da-z_-]+)'
_TESTS = [
{
'url': 'http://www.cbsnews.... | unlicense |
mozilla/fjord | fjord/heartbeat/tests/test_healthchecks.py | 2 | 3731 | from django.core import mail
from fjord.base.tests import TestCase
from fjord.heartbeat.healthcheck import (
CheckAnyAnswers,
CheckMissingVotes,
email_healthchecks,
MAILINGLIST,
run_healthchecks,
SEVERITY_LOW,
SEVERITY_MEDIUM,
SEVERITY_HIGH,
)
from fjord.heartbeat.tests import AnswerFac... | bsd-3-clause |
OriHoch/Open-Knesset | simple/parsers/parse_gov_legislation_comm.py | 5 | 5821 | # encoding: utf-8
import urllib2
from BeautifulSoup import BeautifulStoneSoup
import re
import logging
from knesset.utils import send_chat_notification
logger = logging.getLogger("open-knesset.parse_gov_legislation_comm")
class ParseGLC:
"""
Parse Government Legislation Committee decisions, from their webpag... | bsd-3-clause |
SafPlusPlus/django-drf-tutorial | mysite/polls/migrations/0001_initial.py | 2 | 1083 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Choice',
fields=[
('id', models.AutoField(auto_... | mit |
will-Do/tp-libvirt | libvirt/tests/src/virsh_cmd/domain/virsh_qemu_agent_command_fs.py | 4 | 5000 | import time
import logging
from autotest.client.shared import error
from virttest import virsh
from virttest import utils_misc
from virttest.utils_test import libvirt
from virttest.libvirt_xml import vm_xml
def run(test, params, env):
"""
Test command: virsh qemu-agent-command.
"""
vm_name = params.... | gpl-2.0 |
s-gv/rnicu-webapp | ecg/ecg_visualizer_arduino_PC/galry/glrenderer.py | 6 | 60655 | try:
import OpenGL.GL as gl
except:
from galry import log_warn
log_warn(("PyOpenGL is not available and Galry won't be"
" able to render plots."))
class _gl(object):
def mock(*args, **kwargs):
return None
def __getattr__(self, name):
return self.mock
g... | agpl-3.0 |
Pritesh242/python | illuz/0000/0000_add_number_to_image.py | 40 | 1863 | # Author: illuz <iilluzen[at]gmail.com>
# File: add_number_to_image.py
# Create Date: 2015-02-08 23:52:01
# Descripton: Add a number to right top corner of images.
# Will backup the image in ./[file]_bak.[ext]
# Usage: add_number_to_image.py [image] [number]
'''
第 0000 题:
将你的 QQ 头像(或者微博... | mit |
redhat-openstack/swift | swift/container/sync.py | 22 | 24260 | # Copyright (c) 2010-2012 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-2.0
#
# Unless required by applicable law or agree... | apache-2.0 |
Intel-tensorflow/tensorflow | tensorflow/python/kernel_tests/softmax_op_test.py | 14 | 10775 | # 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 |
jasonwzhy/django | tests/migrations/test_loader.py | 165 | 13346 | from __future__ import unicode_literals
from unittest import skipIf
from django.db import connection, connections
from django.db.migrations.exceptions import AmbiguityError, NodeNotFoundError
from django.db.migrations.loader import MigrationLoader
from django.db.migrations.recorder import MigrationRecorder
from djang... | bsd-3-clause |
CforED/Machine-Learning | sklearn/tests/test_cross_validation.py | 20 | 46586 | """Test the cross_validation module"""
from __future__ import division
import warnings
import numpy as np
from scipy.sparse import coo_matrix
from scipy.sparse import csr_matrix
from scipy import stats
from sklearn.utils.testing import assert_true
from sklearn.utils.testing import assert_false
from sklearn.utils.test... | bsd-3-clause |
dllsf/odootest | addons/account/installer.py | 381 | 8404 | # -*- 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 |
rasata/ansible | lib/ansible/plugins/action/unarchive.py | 51 | 4294 | # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2013, Dylan Martin <dmartin@seattlecentral.edu>
#
# 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 v... | gpl-3.0 |
atsuyim/MITMf | core/servers/LDAP.py | 24 | 5467 | #!/usr/bin/env python
# This file is part of Responder
# Original work by Laurent Gaffie - Trustwave Holdings
#
# 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, o... | gpl-3.0 |
li-xirong/simpleknn | im2fea.py | 3 | 2045 | import sys
import os
import numpy as np
from basic.common import makedirsforfile, checkToSkip, printStatus
from bigfile import BigFile
INFO = __file__
def process(options, feat_dir, imsetfile, result_dir):
resultfile = os.path.join(result_dir, 'feature.bin')
if checkToSkip(resultfile, options.overwrite):
... | mit |
shabinp555/https-github.com-torvalds-linux | tools/perf/scripts/python/sctop.py | 1996 | 2102 | # system call top
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Periodically displays system-wide system call totals, broken down by
# syscall. If a [comm] arg is specified, only syscalls called by
# [comm] are displayed. If an [interval] arg is specified,... | gpl-2.0 |
alvarofierroclavero/scikit-learn | sklearn/cross_decomposition/cca_.py | 209 | 3150 | from .pls_ import _PLS
__all__ = ['CCA']
class CCA(_PLS):
"""CCA Canonical Correlation Analysis.
CCA inherits from PLS with mode="B" and deflation_mode="canonical".
Read more in the :ref:`User Guide <cross_decomposition>`.
Parameters
----------
n_components : int, (default 2).
numb... | bsd-3-clause |
enzochiau/peru | tests/test_parallelism.py | 4 | 3886 | from textwrap import dedent
import unittest
from peru import plugin
import shared
def assert_parallel(n):
# The plugin module keep a global counter of all the jobs that run in
# parallel, so that we can write these tests.
if plugin.DEBUG_PARALLEL_MAX != n:
raise AssertionError('Expected {} paral... | mit |
hryamzik/ansible | test/units/modules/network/nxos/test_nxos_vxlan_vtep.py | 57 | 2521 | # (c) 2016 Red Hat Inc.
#
# 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 dis... | gpl-3.0 |
Big-B702/python-for-android | python3-alpha/python3-src/Lib/runpy.py | 46 | 11101 | """runpy.py - locating and running Python code using the module namespace
Provides support for locating and running Python scripts using the Python
module namespace instead of the native filesystem.
This allows Python code to play nicely with non-filesystem based PEP 302
importers when locating support scripts as wel... | apache-2.0 |
simsor/BomberLAN | PodSixNet/Server.py | 14 | 3022 | import socket
import sys
from async import poll, asyncore
from Channel import Channel
class Server(asyncore.dispatcher):
channelClass = Channel
def __init__(self, channelClass=None, localaddr=("127.0.0.1", 31425), listeners=5):
if channelClass:
self.channelClass = channelClass
self._map = {}
self.channel... | mit |
galaxy001/libtorrent | BitTornado-0.3.18/BitTornado/parseargs.py | 17 | 4230 | # Written by Bill Bumgarner and Bram Cohen
# see LICENSE.txt for license information
from types import *
from cStringIO import StringIO
def splitLine(line, COLS=80, indent=10):
indent = " " * indent
width = COLS - (len(indent) + 1)
if indent and width < 15:
width = COLS - 2
indent = " "
... | mit |
jnewland/home-assistant | homeassistant/components/config/config_entries.py | 6 | 7460 | """Http views to control the config manager."""
from homeassistant import config_entries, data_entry_flow
from homeassistant.auth.permissions.const import CAT_CONFIG_ENTRIES
from homeassistant.components.http import HomeAssistantView
from homeassistant.exceptions import Unauthorized
from homeassistant.helpers.data_ent... | apache-2.0 |
sxlijin/tfs_updater | lib/chardet/langgreekmodel.py | 2763 | 12628 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | gpl-3.0 |
miguelgrinberg/python-socketio | tests/asyncio/test_asyncio_namespace.py | 1 | 10400 | import asyncio
import sys
import unittest
from unittest import mock
from socketio import asyncio_namespace
def AsyncMock(*args, **kwargs):
"""Return a mock asynchronous function."""
m = mock.MagicMock(*args, **kwargs)
async def mock_coro(*args, **kwargs):
return m(*args, **kwargs)
mock_coro... | mit |
oe-alliance/oe-alliance-enigma2 | lib/python/Screens/Screen.py | 32 | 4548 | from Tools.Profile import profile
profile("LOAD:GUISkin")
from Components.GUISkin import GUISkin
profile("LOAD:Source")
from Components.Sources.Source import Source
profile("LOAD:GUIComponent")
from Components.GUIComponent import GUIComponent
profile("LOAD:eRCInput")
from enigma import eRCInput
class Screen(dict, GUI... | gpl-2.0 |
lamberss/selfea | externals/googletest_1.8.0/googletest/scripts/common.py | 1180 | 2919 | # Copyright 2013 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 foll... | apache-2.0 |
Endika/partner-contact | base_contact/__init__.py | 18 | 1265 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013-TODAY OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms... | agpl-3.0 |
appleseedhq/cortex | python/IECore/RelativePreset.py | 2 | 22977 | ##########################################################################
#
# Copyright (c) 2011-2012, Image Engine Design 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:
#
# * Redis... | bsd-3-clause |
bally12345/enigma2 | lib/python/Components/Converter/ClockToText.py | 1 | 2991 | from Converter import Converter
from time import localtime, strftime
from Components.Element import cached
class ClockToText(Converter, object):
DEFAULT = 0
WITH_SECONDS = 1
IN_MINUTES = 2
DATE = 3
FORMAT = 4
AS_LENGTH = 5
TIMESTAMP = 6
FULL = 7
SHORT_DATE = 8
LONG_DATE = 9
VFD = 10
FULL_DATE = 11
# add:... | gpl-2.0 |
octosend/octosend-docs | conf.py | 1 | 9945 | # -*- coding: utf-8 -*-
#
# Octosend Documentation documentation build configuration file, created by
# sphinx-quickstart on Fri Oct 23 18:25:47 2015.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerate... | isc |
FabioRosado/opsdroid | opsdroid/connector/matrix/tests/test_event_parsing.py | 3 | 4061 | import logging
import pytest
from nio.responses import SyncResponse
from opsdroid.connector.matrix.tests.conftest import message_factory, sync_response
async def events_from_sync(events, connector):
response = SyncResponse.from_dict(sync_response(events))
return [m async for m in connector._parse_sync_resp... | apache-2.0 |
markYoungH/chromium.src | native_client_sdk/src/build_tools/sdk_tools/sdk_update_common.py | 168 | 3249 | # 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.
"""Utility functions for sdk_update.py and sdk_update_main.py."""
import errno
import logging
import os
import shutil
import subprocess
import sys
impor... | bsd-3-clause |
openstack/poppy | poppy/model/ssl_certificate.py | 2 | 4785 | # Copyright (c) 2015 Rackspace, 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 wr... | apache-2.0 |
mohammed-alfatih/servo | tests/wpt/update/fetchlogs.py | 222 | 3183 | # 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 argparse
import cStringIO
import gzip
import json
import os
import requests
import urlparse
treeherder_base = "h... | mpl-2.0 |
klahnakoski/MySQL-to-S3 | vendor/jx_sqlite/snowflake.py | 1 | 12852 | # encoding: utf-8
#
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http:# mozilla.org/MPL/2.0/.
#
from __future__ import absolute_import
from __future__ import division
from __future__ import un... | mpl-2.0 |
reiven/pungabot | modules/module_tell.py | 1 | 1418 | # -*- coding: utf-8 -*-
import string
from datetime import datetime
def sanitize(buf):
return filter(lambda x: x in string.printable, buf)
def handle_userJoined(bot, user, channel):
"""Someone Joined, lets salute him"""
dbCursor.execute("SELECT * FROM tell WHERE tell_to = '%s' AND tell_channel = '%s'" ... | gpl-3.0 |
2uller/LotF | App/Lib/site-packages/setuptools/command/egg_info.py | 39 | 14205 | """setuptools.command.egg_info
Create a distribution's .egg-info directory and contents"""
# This module should be kept compatible with Python 2.3
import os, re
from setuptools import Command
from distutils.errors import *
from distutils import log
from setuptools.command.sdist import sdist
from distutils.util import... | gpl-2.0 |
cschenck/blender_sim | fluid_sim_deps/blender-2.69/2.69/python/lib/python3.3/csv.py | 54 | 16123 |
"""
csv.py - read/write/investigate CSV files
"""
import re
from _csv import Error, __version__, writer, reader, register_dialect, \
unregister_dialect, get_dialect, list_dialects, \
field_size_limit, \
QUOTE_MINIMAL, QUOTE_ALL, QUOTE_NONNUMERIC, QUOTE_NONE, \
... | gpl-3.0 |
asedunov/intellij-community | python/helpers/pydev/pydev_ipython/inputhookqt5.py | 22 | 7264 | # -*- coding: utf-8 -*-
"""
Qt5's inputhook support function
Author: Christian Boos
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, d... | apache-2.0 |
brahamcosoX3/TheIoTLearningInitiative | InternetOfThings101/main.py | 1 | 5409 | #!/usr/bin/python
# Libraries
import paho.mqtt.client as paho
import psutil
import pywapi
import signal
import sys
import time
import dweepy
import random
import plotly.plotly as py
import pyupm_i2clcd as lcd
import pyupm_grove as grove
from threading import Thread
from flask import Flask
from flask_restful import A... | apache-2.0 |
unnikrishnankgs/va | venv/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/export_strategy.py | 76 | 3566 | # 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... | bsd-2-clause |
mollstam/UnrealPy | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/django-1.8.2/django/db/backends/postgresql_psycopg2/version.py | 632 | 1517 | """
Extracts the version of the PostgreSQL server.
"""
import re
# This reg-exp is intentionally fairly flexible here.
# Needs to be able to handle stuff like:
# PostgreSQL #.#.#
# EnterpriseDB #.#
# PostgreSQL #.# beta#
# PostgreSQL #.#beta#
VERSION_RE = re.compile(r'\S+ (\d+)\.(\d+)\.?(\d+)?')
def _parse_... | mit |
Noviat/odoo | addons/point_of_sale/account_bank_statement.py | 313 | 2159 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2008 PC Solutions (<http://pcsol.be>). All Rights Reserved
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free... | agpl-3.0 |
marcoitur/Freecad_test | src/Mod/Fem/Init.py | 16 | 2199 | # FreeCAD init script of the Fem module
# (c) 2001 Juergen Riegel
#***************************************************************************
#* (c) Juergen Riegel (juergen.riegel@web.de) 2002 *
#* *
#* This f... | lgpl-2.1 |
saneyuki/servo | tests/wpt/web-platform-tests/tools/third_party/html5lib/html5lib/treewalkers/genshi.py | 508 | 2309 | from __future__ import absolute_import, division, unicode_literals
from genshi.core import QName
from genshi.core import START, END, XML_NAMESPACE, DOCTYPE, TEXT
from genshi.core import START_NS, END_NS, START_CDATA, END_CDATA, PI, COMMENT
from . import base
from ..constants import voidElements, namespaces
class T... | mpl-2.0 |
blueboxgroup/nova | nova/api/openstack/compute/contrib/server_usage.py | 61 | 2984 | # 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-2.0
#
# Unless required by applicable law or a... | apache-2.0 |
antonev/django-handlers | django_handlers.py | 1 | 6406 | from itertools import chain
from collections import (
defaultdict,
Iterable,
)
from django.http import HttpResponseNotAllowed
__version__ = '0.1.1'
class Handler(object):
"""Container for views.
:param decorators: (optional) list of decorators that will be applied
to each endpoint.
""... | mit |
yzl0083/orange | Orange/OrangeWidgets/Visualize/OWRadviz.py | 6 | 1811 | """
<name>Radviz</name>
<description>Create a radviz projection.</description>
<contact>Gregor Leban (gregor.leban@fri.uni-lj.si)</contact>
<icon>icons/Radviz.svg</icon>
<priority>3100</priority>
"""
# Radviz.py
#
# Show a radviz projection of the data
#
from OWLinProj import *
class OWRadviz(OWLinProj):
settings... | gpl-3.0 |
fdvarela/odoo8 | addons/product_extended/wizard/__init__.py | 374 | 1078 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
#... | agpl-3.0 |
Senseg/robotframework | src/robot/libraries/BuiltIn.py | 1 | 87619 | # Copyright 2008-2012 Nokia Siemens Networks Oyj
#
# 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 |
wintermind/pypedal | PyPedal/examples/sets/sets.py | 1 | 1026 | from PyPedal import *
import copy
def main():
options1 = {
'pedname': 'Fake Pedigree 1',
'messages': 'verbose',
'renumber': 1,
'pedfile': 'set1.ped',
'pedformat': 'asd',
'debug_messages': True,
}
options2 = copy.copy(options1)
options2['pedname'] = 'Fake Pedigree 2'
options2['pedfile'] = 'set2.ped'
... | gpl-2.0 |
lotcom/automateBoringstuffPython | Chapter13PracBruteForcePDF.py | 1 | 1031 | #! /usr/bin/env python3
# Chapter 13 Practice Brute-Force PDF Password Breaker
# USAGE: Change the pdfFile varible below and run the script to try 44,000 English words
# from the dictionary.txt file to decrypt the encrypted PDF.
import PyPDF2
pdfFile = open('bruteForce.pdf', 'rb') #Change this file name an... | cc0-1.0 |
jhaals/ansible-modules-core | cloud/rackspace/rax_clb.py | 157 | 9240 | #!/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 distributed... | gpl-3.0 |
datenbetrieb/odoo | addons/account_analytic_plans/wizard/analytic_plan_create_model.py | 384 | 2829 | # -*- 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 |
fernandog/Medusa | ext/boto/cloudformation/stack.py | 32 | 14230 | from datetime import datetime
from boto.resultset import ResultSet
class Stack(object):
def __init__(self, connection=None):
self.connection = connection
self.creation_time = None
self.description = None
self.disable_rollback = None
self.notification_arns = []
self... | gpl-3.0 |
mydongistiny/external_chromium_org | third_party/cython/src/Cython/Compiler/Parsing.py | 87 | 107990 | # cython: auto_cpdef=True, infer_types=True, language_level=3, py2_import=True
#
# Parser
#
# This should be done automatically
import cython
cython.declare(Nodes=object, ExprNodes=object, EncodedString=object,
BytesLiteral=object, StringEncoding=object,
FileSourceDescriptor=object, loo... | bsd-3-clause |
MaxTyutyunnikov/lino | obsolete/tests/27.py | 1 | 3813 | # coding: latin1
## Copyright 2005 Luc Saffre
## This file is part of the Lino project.
## Lino 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 ... | gpl-3.0 |
GregDMeyer/dynamite | dynamite/subspaces.py | 1 | 10964 | '''
Classes that define the various subspaces on which operators can be defined.
The methods generally are just an interface to the backend, so that there is only
one implementation of each of the functions.
'''
import numpy as np
from copy import deepcopy
from zlib import crc32
from . import validate, states
from .... | mit |
apereira/mothership | mothership/network_mapper/__init__.py | 2 | 6343 | # Copyright 2011 Gilt Groupe, 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 writing,... | apache-2.0 |
cerebrus29301/crowncoin | qa/rpc-tests/invalidateblock.py | 123 | 3175 | #!/usr/bin/env python2
# Copyright (c) 2014 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 InvalidateBlock code
#
from test_framework import BitcoinTestFramework
from bitcoinrpc.authproxy imp... | mit |
ccpgames/eve-metrics | web2py/applications/welcome/languages/hu.py | 1 | 6444 | # coding: utf8
{
'!langcode!': 'hu',
'!langname!': 'Magyar',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
'%s %%{row} deleted': ... | mit |
filias/django | tests/middleware/test_security.py | 23 | 7742 | from django.http import HttpResponse
from django.test import RequestFactory, SimpleTestCase
from django.test.utils import override_settings
class SecurityMiddlewareTest(SimpleTestCase):
@property
def middleware(self):
from django.middleware.security import SecurityMiddleware
return SecurityMid... | bsd-3-clause |
cbeck88/fifengine | demos/rio_de_hola/run.py | 2 | 5481 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ####################################################################
# Copyright (C) 2005-2013 by the FIFE team
# http://www.fifengine.net
# This file is part of FIFE.
#
# FIFE is free software; you can redistribute it and/or
# modify it under the terms of the GNU ... | lgpl-2.1 |
geopython/QGIS | tests/src/python/test_qgsmetadatabase.py | 13 | 18761 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsMetadataBase.
Run with: ctest -V -R QgsMetadataBase
.. note:: 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
(a... | gpl-2.0 |
cristianquaglio/odoo | addons/sale_stock/res_config.py | 331 | 5235 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | apache-2.0 |
meganbkratz/acq4 | acq4/pyqtgraph/graphicsItems/GraphicsItem.py | 5 | 23382 | from ..Qt import QtGui, QtCore, isQObjectAlive
from ..GraphicsScene import GraphicsScene
from ..Point import Point
from .. import functions as fn
import weakref
import operator
from ..util.lru_cache import LRUCache
class GraphicsItem(object):
"""
**Bases:** :class:`object`
Abstract class providing useful... | mit |
Eksmo/calibre | src/chardet/charsetgroupprober.py | 217 | 3642 | ######################## 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 ... | gpl-3.0 |
kemalakyol48/python-for-android | python3-alpha/python3-src/Lib/test/lock_tests.py | 46 | 25219 | """
Various tests for synchronization primitives.
"""
import sys
import time
from _thread import start_new_thread, get_ident, TIMEOUT_MAX
import threading
import unittest
from test import support
def _wait():
# A crude wait/yield function not relying on synchronization primitives.
time.sleep(0.01)
class Bu... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.