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 |
|---|---|---|---|---|---|
sipwise/repoapi | repoapi/views.py | 1 | 5367 | # Copyright (C) 2020 The Sipwise Team - http://sipwise.com
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
# This pr... | gpl-3.0 |
c2theg/DDoS_Information_Sharing | libraries/suds-jurko-0.6/suds/sax/parser.py | 9 | 4320 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will b... | mit |
MeltingCake/twodate | image-tagging/alchemyapi.py | 32 | 34868 | #!/usr/bin/env python
# Copyright 2013 AlchemyAPI
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | gpl-3.0 |
zhengzhihust/tablib | tablib/packages/yaml3/parser.py | 83 | 25356 |
# The following YAML grammar is LL(1) and is parsed by a recursive descent
# parser.
#
# stream ::= STREAM-START implicit_document? explicit_document* STREAM-END
# implicit_document ::= block_node DOCUMENT-END*
# explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END*
# block_node_or_inden... | mit |
iuliat/nova | nova/api/openstack/compute/contrib/__init__.py | 35 | 1550 | # Copyright 2011 Justin Santa Barbara
# 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 |
Finntack/pootle | tests/pootle_fs/utils.py | 4 | 6308 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) Pootle contributors.
#
# This file is a part of the Pootle project. It is distributed under the GPL3
# or later license. See the LICENSE file for a copy of the license and the
# AUTHORS file for copyright and authorship information.
from fnmatch import tr... | gpl-3.0 |
atdaemon/pip | pip/_vendor/progress/helpers.py | 521 | 2854 | # Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE A... | mit |
benthomasson/ansible | lib/ansible/modules/cloud/openstack/os_image.py | 18 | 6880 | #!/usr/bin/python
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
# Copyright (c) 2013, Benno Joy <benno@ansible.com>
#
# This module 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 vers... | gpl-3.0 |
tquilian/exeNext | exe/engine/fileattachidevice.py | 8 | 3074 | # ===========================================================================
# eXe
# Copyright 2004-2005, University of Auckland
#
# 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 versi... | gpl-2.0 |
wireservice/csvkit | tests/test_utilities/test_csvjson.py | 3 | 23451 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import sys
import six
try:
from mock import patch
except ImportError:
from unittest.mock import patch
from csvkit.utilities.csvjson import CSVJSON, launch_new_instance
from tests.utils import CSVKitTestCase, EmptyFileTests
class TestCSVJSON(CSVKitT... | mit |
fly19890211/edx-platform | common/lib/calc/calc/functions.py | 279 | 1521 | """
Provide the mathematical functions that numpy doesn't.
Specifically, the secant/cosecant/cotangents and their inverses and
hyperbolic counterparts
"""
import numpy
# Normal Trig
def sec(arg):
"""
Secant
"""
return 1 / numpy.cos(arg)
def csc(arg):
"""
Cosecant
"""
return 1 / nump... | agpl-3.0 |
keedio/hue | desktop/core/ext-py/Babel-0.9.6/babel/messages/pofile.py | 67 | 16497 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software cons... | apache-2.0 |
luiseduardohdbackup/odoo | addons/lunch/tests/__init__.py | 260 | 1077 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | agpl-3.0 |
koltegirish/Arduino | arduino-core/src/processing/app/i18n/python/requests/auth.py | 165 | 5461 | # -*- coding: utf-8 -*-
"""
requests.auth
~~~~~~~~~~~~~
This module contains the authentication handlers for Requests.
"""
import os
import time
import hashlib
import logging
from base64 import b64encode
from .compat import urlparse, str
from .utils import parse_dict_header
log = logging.getLogger(__name__)
CON... | lgpl-2.1 |
janarthananfit/Nightlies-4.4 | 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 |
msrb/freeipa | ipalib/util.py | 2 | 26045 | # Authors:
# Jason Gerard DeRose <jderose@redhat.com>
#
# Copyright (C) 2008 Red Hat
# see file 'COPYING' for use and warranty information
#
# 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, ei... | gpl-3.0 |
arborh/tensorflow | tensorflow/python/kernel_tests/reduction_ops_test.py | 1 | 42967 | # 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 |
arun6582/django | tests/contenttypes_tests/test_fields.py | 130 | 1349 | import json
from django.contrib.contenttypes.fields import GenericForeignKey
from django.db import models
from django.test import SimpleTestCase, TestCase
from django.test.utils import isolate_apps
from .models import Answer, Question
@isolate_apps('contenttypes_tests')
class GenericForeignKeyTests(SimpleTestCase):... | bsd-3-clause |
campagnola/acq4 | acq4/pyqtgraph/widgets/RemoteGraphicsView.py | 4 | 12447 | from ..Qt import QtGui, QtCore, QT_LIB
if QT_LIB in ['PyQt4', 'PyQt5']:
import sip
from .. import multiprocess as mp
from .GraphicsView import GraphicsView
from .. import CONFIG_OPTIONS
import numpy as np
import mmap, tempfile, ctypes, atexit, sys, random
__all__ = ['RemoteGraphicsView']
class RemoteGraphicsView(... | mit |
4eek/edx-platform | common/test/acceptance/pages/studio/settings_certificates.py | 7 | 16853 | """
Course Certificates page objects.
The methods in these classes are organized into several conceptual buckets:
* Helpers: General utility methods used throughout, such as css selection helpers
* Properties: Specific page/object field getters/setters (mainly for form inputs)
* Wait Actions: EmptyPromises ... | agpl-3.0 |
MountainWei/nova | nova/api/openstack/compute/security_groups.py | 13 | 23048 | # Copyright 2011 OpenStack Foundation
# Copyright 2012 Justin Santa Barbara
# 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/l... | apache-2.0 |
Scille/parsec-cloud | parsec/core/cli/invitation.py | 1 | 16036 | # Parsec Cloud (https://parsec.cloud) Copyright (c) AGPLv3 2016-2021 Scille SAS
import click
import platform
from uuid import UUID
from functools import partial
from parsec.utils import trio_run
from parsec.cli_utils import cli_exception_handler, spinner, operation, aprompt
from parsec.api.data import UserProfile
fro... | agpl-3.0 |
mkennedy04/knodj | env/Lib/site-packages/django/template/__init__.py | 45 | 1898 | """
Django's support for templates.
The django.template namespace contains two independent subsystems:
1. Multiple Template Engines: support for pluggable template backends,
built-in backends and backend-independent APIs
2. Django Template Language: Django's own template engine, including its
built-in loaders, ... | mit |
moijes12/oh-mainline | vendor/packages/twisted/twisted/protocols/socks.py | 71 | 7782 | # -*- test-case-name: twisted.test.test_socks -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Implementation of the SOCKSv4 protocol.
"""
# python imports
import struct
import string
import socket
import time
# twisted imports
from twisted.internet import reactor, protocol, defer
from... | agpl-3.0 |
mre/the-coding-interview | problems/euler/11/largestgrid.py | 1 | 3039 | import operator
raw_grid = """08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08
49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00
81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65
52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91
22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 28 6... | mit |
exequielrafaela/proton | modules/mail_fab.py | 1 | 4804 | # -*- coding: UTF-8 -*-
# This is part of Artemisa.
#
# Artemisa 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.
#
# Artemisa is dis... | gpl-3.0 |
aldur/RedditWallpaperChooser | RedditWallpaperChooser/config.py | 1 | 3161 | #!/usr/bin/env/ python
# encoding: utf-8
"""
Configuration logic.
"""
import configparser
import logging
import RedditWallpaperChooser.utils
__author__ = 'aldur'
logger = logging.getLogger(__name__)
SECTION_REDDIT = "reddit"
REDDIT_SUBREDDITS = "subreddits"
REDDIT_RESULT_LIMIT = "result_limit"
REDDIT_SORTING = "... | mit |
dafei2015/hugula | Client/tools/site-packages/PIL/IcoImagePlugin.py | 14 | 2017 | #
# The Python Imaging Library.
# $Id: IcoImagePlugin.py 2134 2004-10-06 08:55:20Z fredrik $
#
# Windows Icon support for PIL
#
# Notes:
# uses BmpImagePlugin.py to read the bitmap data.
#
# History:
# 96-05-27 fl Created
#
# Copyright (c) Secret Labs AB 1997.
# Copyright (c) Fredrik Lundh 1996.
#
# See... | mit |
sffjunkie/home-assistant | homeassistant/components/binary_sensor/nest.py | 8 | 1642 | """
Support for Nest Thermostat Binary Sensors.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/binary_sensor.nest/
"""
import voluptuous as vol
import homeassistant.components.nest as nest
from homeassistant.components.binary_sensor import BinarySensorD... | mit |
xiang12835/python_web | py2_web2py/web2py/gluon/contrib/AuthorizeNet.py | 1 | 10688 | """
AIM class to credit card payment with authorize.net
Fork of authnet code written by John Conde
http://www.johnconde.net/blog/integrate-the-authorizenet-aim-api-with-python-3-2/
BSDv3 License
Modifed by Massimo Di Pierro
- ported from Python 3.x run on Python 2.4+
- fixed a couple of bugs
- merged with test so si... | apache-2.0 |
ehopsolidaires/ehop-solidaires.fr | ehop/ehop/wsgi.py | 1 | 1832 | # @copyright (C) 2014-2015
#Developpeurs 'BARDOU AUGUSTIN - BREZILLON ANTOINE - EUZEN DAVID - FRANCOIS SEBASTIEN - JOUNEAU NICOLAS - KIBEYA AISHA - LE CONG SEBASTIEN -
# MAGREZ VALENTIN - NGASSAM NOUMI PAOLA JOVANY - OUHAMMOUCH SALMA - RIAND MORGAN - TREIMOLEIRO ALEX - TRULLA AURELIEN '
# @license https://... | agpl-3.0 |
pmaxit/DJANGO_IOT | sqsConnection.py | 1 | 3134 | import boto3
import pusher
import time
import json
pusher_client = pusher.Pusher(
app_id='330825',
key='a9603eebc0a6a7c05d7e',
secret='56b571ab2b832dbabee1',
ssl=True
)
class Queue:
def __init__(self):
self.QueueName = 'test'
self.sqs = boto3.resource('sqs... | mit |
wrouesnel/ansible | lib/ansible/modules/web_infrastructure/ansible_tower/tower_host.py | 34 | 4115 | #!/usr/bin/python
# coding: utf-8 -*-
# (c) 2017, Wayne Witzel III <wayne@riotousliving.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_version': '1.1... | gpl-3.0 |
fredericlepied/ansible | lib/ansible/modules/network/panos/panos_admin.py | 78 | 6011 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Ansible module to manage PaloAltoNetworks Firewall
# (c) 2016, techbizdev <techbizdev@paloaltonetworks.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 publish... | gpl-3.0 |
hujiajie/pa-chromium | third_party/mesa/MesaLib/src/mapi/glapi/gen-es/gl_parse_header.py | 34 | 13689 | #!/usr/bin/python
#
# Copyright (C) 2009 Chia-I Wu <olv@0xlab.org>
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# on the rights to use, ... | bsd-3-clause |
nodice73/hspipeline | web/env/lib/python2.7/site-packages/pip/_vendor/requests/packages/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-2.0 |
blaggacao/odoo | addons/crm_partner_assign/report/__init__.py | 443 | 1096 | # -*- 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 |
robinro/ansible-modules-core | system/sysctl.py | 10 | 13006 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, David "DaviXX" CHANIAL <david.chanial@gmail.com>
# (c) 2014, James Tanner <tanner.jc@gmail.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 ... | gpl-3.0 |
grepman/detective.io | app/detective/migrations/0033_empty_topic_skeleton_title.py | 3 | 10456 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
def forwards(self, orm):
for topic in orm.Topic.objects.filter(skeleton_title__in=[u'Custom', 'No skeleton']):
... | lgpl-3.0 |
Ted1993/Flasky | venv/lib/python2.7/site-packages/flask/testsuite/reqctx.py | 557 | 5960 | # -*- coding: utf-8 -*-
"""
flask.testsuite.reqctx
~~~~~~~~~~~~~~~~~~~~~~
Tests the request context.
:copyright: (c) 2012 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import flask
import unittest
try:
from greenlet import greenlet
except ImportError:
greenlet = None... | mit |
jymannob/Sick-Beard | lib/hachoir_parser/program/exe_ne.py | 90 | 3551 | from lib.hachoir_core.field import (FieldSet,
Bit, UInt8, UInt16, UInt32, Bytes,
PaddingBits, PaddingBytes, NullBits, NullBytes)
from lib.hachoir_core.text_handler import textHandler, hexadecimal, filesizeHandler
class NE_Header(FieldSet):
static_size = 64*8
def createFields(self):
yield Bytes(... | gpl-3.0 |
hanigamal/webslayer | overGui.py | 8 | 2117 | #from PyQt4.QtCore import *
#from PyQt4.QtGui import *
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4 import QtCore,QtGui
class ListPay(QtGui.QListWidget):
def _init_(self,parent=None):
super(ListPay, self._init_(parent))
self.setAcceptDrops(True)
self.setDragEnabled(True)
self.dropAction = ... | gpl-2.0 |
techie66/helper-scripts | find_orphans.py | 1 | 7204 | #!/usr/bin/env python
from MythTV import MythDB, MythBE, Recorded, MythError
from socket import timeout
import os
import sys
def human_size(s):
s = float(s)
o = 0
while s > 1000:
s /= 1000
o += 1
return str(round(s,1))+('B ','KB','MB','GB')[o]
class File( str ):
def __new__(self,... | gpl-2.0 |
cyclecomputing/boto | tests/integration/dynamodb2/test_layer1.py | 21 | 11472 | # Copyright (c) 2013 Amazon.com, Inc. or its affiliates.
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the right... | mit |
abagh0703/RetailTrail | flask/lib/python2.7/site-packages/sqlalchemy/dialects/firebird/kinterbasdb.py | 55 | 6299 | # firebird/kinterbasdb.py
# Copyright (C) 2005-2016 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
"""
.. dialect:: firebird+kinterbasdb
:name: kinterbasdb
:dbapi: kin... | mit |
chitrang/osquery | tools/tests/test_http_server.py | 29 | 6864 | #!/usr/bin/env python
# Copyright (c) 2014, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
fro... | bsd-3-clause |
antinucleon/shadowsocks | tests/test_udp_src.py | 1009 | 2482 | #!/usr/bin/python
import socket
import socks
SERVER_IP = '127.0.0.1'
SERVER_PORT = 1081
if __name__ == '__main__':
# Test 1: same source port IPv4
sock_out = socks.socksocket(socket.AF_INET, socket.SOCK_DGRAM,
socket.SOL_UDP)
sock_out.set_proxy(socks.SOCKS5, SERVER_IP, S... | apache-2.0 |
acq4/acq4 | acq4/pyqtgraph/util/colorama/winterm.py | 51 | 4205 | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
from . import win32
# from wincon.h
class WinColor(object):
BLACK = 0
BLUE = 1
GREEN = 2
CYAN = 3
RED = 4
MAGENTA = 5
YELLOW = 6
GREY = 7
# from wincon.h
class WinStyle(object):
NORMAL = 0... | mit |
jesseengel/magenta | magenta/models/piano_genie/gold.py | 2 | 2974 | # Copyright 2019 The Magenta 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 ... | apache-2.0 |
Giftingnation/GN-Oscar-Custom | oscar/apps/shipping/migrations/0001_initial.py | 23 | 2556 | # 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):
# Adding model 'OrderAndItemLevelChargeMethod'
db.create_table('shipping_orderanditemlevelchargemethod', (... | bsd-3-clause |
beiko-lab/gengis | bin/Lib/site-packages/wx-2.8-msw-unicode/wx/calendar.py | 6 | 22979 | # This file was created automatically by SWIG 1.3.29.
# Don't modify this file, modify the SWIG interface instead.
"""
Classes for an interactive Calendar control.
"""
import _calendar
import new
new_instancemethod = new.instancemethod
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
if (name ==... | gpl-3.0 |
srid/fablib | venv.py | 1 | 12985 | # Copyright (c) 2013 ActiveState Software Inc. All rights reserved.
"""Virtualenv utilities for fabric"""
import os
from os import path
from glob import glob
import sys
import shutil
import time
import subprocess
import urllib
from contextlib import contextmanager
# Fabric's local is buggy; so disable it
def local(... | mit |
ankurankan/scikit-learn | sklearn/metrics/cluster/__init__.py | 312 | 1322 | """
The :mod:`sklearn.metrics.cluster` submodule contains evaluation metrics for
cluster analysis results. There are two forms of evaluation:
- supervised, which uses a ground truth class values for each sample.
- unsupervised, which does not and measures the 'quality' of the model itself.
"""
from .supervised import ... | bsd-3-clause |
neurodata/ndstore | django/catmaid/views.py | 2 | 3404 | # Copyright 2014 NeuroData (http://neurodata.io)
#
# 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... | apache-2.0 |
ar7z1/ansible | test/runner/lib/sanity/sanity_docs.py | 78 | 1312 | """Sanity test for documentation of sanity tests."""
from __future__ import absolute_import, print_function
import os
from lib.sanity import (
SanitySingleVersion,
SanityMessage,
SanityFailure,
SanitySuccess,
sanity_get_tests,
)
from lib.config import (
SanityConfig,
)
class SanityDocsTest(... | gpl-3.0 |
40223112/0623test1 | static/Brython3.1.1-20150328-091302/Lib/unittest/test/test_skipping.py | 744 | 5173 | import unittest
from .support import LoggingResult
class Test_TestSkipping(unittest.TestCase):
def test_skipping(self):
class Foo(unittest.TestCase):
def test_skip_me(self):
self.skipTest("skip")
events = []
result = LoggingResult(events)
test = Foo("t... | gpl-3.0 |
Learningtribes/edx-platform | lms/djangoapps/teams/search_indexes.py | 63 | 5030 | """ Search index used to load data into elasticsearch"""
import logging
from elasticsearch.exceptions import ConnectionError
from django.conf import settings
from django.db.models.signals import post_delete, post_save
from django.dispatch import receiver
from django.utils import translation
from functools import wrap... | agpl-3.0 |
yoer/hue | desktop/core/ext-py/tablib-0.10.0/tablib/packages/odf3/grammar.py | 56 | 193388 | # -*- coding: utf-8 -*-
# Copyright (C) 2006-2010 Søren Roug, European Environment Agency
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at you... | apache-2.0 |
ShoRit/shipping-costs-sample | v2/lib/python2.7/site-packages/pip/operations/freeze.py | 342 | 5194 | from __future__ import absolute_import
import logging
import re
import pip
from pip.req import InstallRequirement
from pip.req.req_file import COMMENT_RE
from pip.utils import get_installed_distributions
from pip._vendor import pkg_resources
from pip._vendor.packaging.utils import canonicalize_name
from pip._vendor.p... | apache-2.0 |
dnozay/lettuce | tests/integration/lib/Django-1.3/django/views/generic/list.py | 98 | 5863 | import re
from django.core.paginator import Paginator, InvalidPage
from django.core.exceptions import ImproperlyConfigured
from django.http import Http404
from django.utils.encoding import smart_str
from django.utils.translation import ugettext as _
from django.views.generic.base import TemplateResponseMixin, View
c... | gpl-3.0 |
centic9/subversion-ppa | subversion/bindings/swig/python/tests/mergeinfo.py | 6 | 9197 | #
#
# 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 n... | apache-2.0 |
tapanagupta/mi-instrument | mi/instrument/mclane/ras/ppsdn/test/test_driver.py | 8 | 27669 | """
@package mi.instrument.mclane.pps.ooicore.test.test_driver
@file marine-integrations/mi/instrument/mclane/pps/ooicore/test/test_driver.py
@author Dan Mergens
@brief Test cases for ppsdn driver
USAGE:
Make tests verbose and provide stdout
* From the IDK
$ bin/test_driver
$ bin/test_driver -u [-t t... | bsd-2-clause |
postfix/gensim | gensim/test/test_big.py | 71 | 2470 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2014 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html
"""
Automated tests for checking processing/storing large inputs.
"""
import logging
import unittest
import os
import itertools
import... | gpl-3.0 |
stijnvanhoey/pyFUSE | pyfuse/modelsetup.py | 1 | 8870 | # -*- coding: utf-8 -*-
"""
Created on Wed Oct 10 16:51:28 2012
@author: VHOEYS
"""
import re
import pprint
import numpy as np
from infodicts import *
from parameter import *
from extrafunctions import *
###############################################################################
### START-UP... | bsd-3-clause |
atris/gpdb | gpMgmt/bin/ext/yaml/tokens.py | 985 | 2573 |
class Token(object):
def __init__(self, start_mark, end_mark):
self.start_mark = start_mark
self.end_mark = end_mark
def __repr__(self):
attributes = [key for key in self.__dict__
if not key.endswith('_mark')]
attributes.sort()
arguments = ', '.join(['%s=... | apache-2.0 |
zlaja/android_kernel_lge_msm8610 | scripts/gcc-wrapper.py | 1276 | 3382 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2011-2012, The Linux Foundation. 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 th... | gpl-2.0 |
mmnelemane/nova | nova/tests/functional/api_sample_tests/test_quota_sets.py | 2 | 4070 | # Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# 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 |
eHealthAfrica/onadata | onadata/apps/stats/migrations/0002_auto__chg_field_statscount_value.py | 15 | 1169 | # 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):
# Changing field 'StatsCount.value'
db.alter_column('stats_statscount', 'value', self.gf('django.db.models... | bsd-2-clause |
btribulski/girlsknowhow | sites/all/modules/civicrm/packages/fckeditor/editor/filemanager/connectors/py/connector.py | 55 | 4026 | #!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http://www.gn... | gpl-2.0 |
ktnyt/chainer | tests/chainer_tests/functions_tests/math_tests/test_einsum.py | 3 | 10563 | import functools
import unittest
import numpy
import chainer
from chainer.backends import cuda
from chainer.functions.math import einsum
from chainer import gradient_check
from chainer import testing
from chainer.testing import attr
from chainer import utils
def _tuple_to_gpu(xs):
return tuple(cuda.to_gpu(x) fo... | mit |
9XD/9XD | config/urls.py | 1 | 1977 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views import defaults as default_views
from django.views.generic import TemplateView
urlpat... | mit |
ihsanudin/odoo | addons/mail/mail_followers.py | 168 | 12482 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2009-today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | agpl-3.0 |
wercker/wercker-cli | werckercli/netrc.py | 1 | 4558 | """An object-oriented interface to .netrc files."""
# Module and documentation by Eric S. Raymond, 21 Dec 1998
# netrc.py copied from python 2.7.3 source code, modified to call
# str instead of repr for serializing the netrc file
# and pep8 modification
import os
import shlex
__all__ = ["netrc", "NetrcParseError"]
... | mit |
tbeadle/django | tests/template_tests/filter_tests/test_phone2numeric.py | 176 | 1500 | from django.template.defaultfilters import phone2numeric_filter
from django.test import SimpleTestCase
from django.utils.safestring import mark_safe
from ..utils import setup
class Phone2numericTests(SimpleTestCase):
@setup({'phone2numeric01': '{{ a|phone2numeric }} {{ b|phone2numeric }}'})
def test_phone2n... | bsd-3-clause |
SUSE/azure-sdk-for-python | azure-mgmt-datalake-store/azure/mgmt/datalake/store/models/data_lake_store_account_update_parameters.py | 2 | 3857 | # 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 |
silmunc1916/WIFI-LED-Christmas-tree-installation | raspi-python-scripts/ledudp.py | 1 | 1434 | #!/usr/bin/python
import os
import socket
import subprocess
import time
import ledconfig
#----- Definitionen -------------------------------
UDP_PORT = 8002 # UDP-Port fuer Broadcasts
BROADCAST_IP = "10.0.0.255"
MSG = "<iamledc:raspi01>"
#---- Hauptprogramm -----------------
s = socket.socket(socket.AF_INET, so... | mit |
mgax/babel | babel/messages/extract.py | 1 | 22958 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2011 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software consists... | bsd-3-clause |
rob356/SickRage | lib/unidecode/x069.py | 252 | 4673 | data = (
'Wan ', # 0x00
'Guo ', # 0x01
'Lu ', # 0x02
'Hao ', # 0x03
'Jie ', # 0x04
'Yi ', # 0x05
'Chou ', # 0x06
'Ju ', # 0x07
'Ju ', # 0x08
'Cheng ', # 0x09
'Zuo ', # 0x0a
'Liang ', # 0x0b
'Qiang ', # 0x0c
'Zhi ', # 0x0d
'Zhui ', # 0x0e
'Ya ', # 0x0f
'Ju ', # 0x10
'Be... | gpl-3.0 |
Jandersolutions/jander777-ghost | node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-3.3/pygments/style.py | 95 | 3672 | # -*- coding: utf-8 -*-
"""
pygments.style
~~~~~~~~~~~~~~
Basic style object.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.token import Token, STANDARD_TYPES
class StyleMeta(type):
def __new__(mcs, name, bases,... | mit |
cmlh/Maltego-Transforms | Email-Rapportive.py | 2 | 1833 | #!/usr/bin/python
#Email-Rapportive.py
#Author: Sudhanshu Chauhan - @Sudhanshu_C
#Based upon the service Rapportive: http://www.rapportive.com/
#Credits: This code is based upon the research and code of Jordan Wright.
#Blog Link: http://jordan-wright.github.io/blog/2013/10/14/automated-social-engineering-recon-using-... | mit |
Stan1989/volatility | volatility/plugins/registry/shimcache.py | 44 | 10530 | # Volatility
# Copyright (C) 2008-2013 Volatility Foundation
# Copyright (C) 2011 Jamie Levy (Gleeda) <jamie.levy@gmail.com>
#
# This file is part of Volatility.
#
# Volatility 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 Softw... | gpl-2.0 |
valentin-krasontovitsch/ansible | lib/ansible/modules/inventory/group_by.py | 46 | 1462 | # -*- mode: python -*-
#
# Copyright: Ansible Team
# 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',
'status': ['stablein... | gpl-3.0 |
piotrbla/pyExamples | tkinterMaze.py | 1 | 6018 | from tkinter import *
MARGIN = 20
ROOM_SIZE = 60
WALL_SIZE = ROOM_SIZE // 2 - 6
level_map = []
iteration_counter = 0
class Room:
def __init__(self):
self.north = None
self.south = None
self.west = None
self.east = None
self.is_wall = False
self.visited = False
... | mit |
vinhqdang/my_mooc | MOOC-work/mongodb university/MongoDB for Dev/hw3-2and3-3/blogPostDAO.py | 1 | 4028 | __author__ = 'aje'
#
# Copyright (c) 2008 - 2013 10gen, Inc. <http://10gen.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://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | mit |
Gisleude/speakerfight | deck/migrations/0009_activity.py | 18 | 2174 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
import django_extensions.db.fields
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('deck',... | mit |
louiss007/Mashup | onlinewikipedia.py | 7 | 2776 | #!/usr/bin/python
# onlinewikipedia.py: Demonstrates the use of online VB for LDA to
# analyze a bunch of random Wikipedia articles.
#
# Copyright (C) 2010 Matthew D. Hoffman
#
# 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... | gpl-3.0 |
likelyzhao/mxnet | example/ssd/tools/prepare_dataset.py | 9 | 3133 | from __future__ import print_function
import sys, os
import argparse
import subprocess
curr_path = os.path.abspath(os.path.dirname(__file__))
sys.path.append(os.path.join(curr_path, '..'))
from dataset.pascal_voc import PascalVoc
from dataset.concat_db import ConcatDB
def load_pascal(image_set, year, devkit_path, shuf... | apache-2.0 |
maestrano/odoo | addons/report_intrastat/__openerp__.py | 116 | 1888 | # -*- 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 |
swilcox/pinax-blog | pinax/blog/forms.py | 3 | 3217 | from django import forms
from django.utils import timezone
from django.utils.functional import curry
from django.utils.translation import ugettext_lazy as _
from .conf import settings
from .models import Post, Revision
from .utils import can_tweet, load_path_attr
from .signals import post_published
FIELDS = [
"s... | mit |
sontek/rethinkdb | external/v8_3.30.33.16/build/gyp/test/lib/TestCmd.py | 330 | 52544 | """
TestCmd.py: a testing framework for commands and scripts.
The TestCmd module provides a framework for portable automated testing
of executable commands and scripts (in any language, not just Python),
especially commands and scripts that require file system interaction.
In addition to running tests and evaluating... | agpl-3.0 |
captiosus/treadmill | treadmill/syscall/_sigsetops.py | 4 | 3575 | """Wrapper for sigsetops(3).
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
import os
import ctypes
from ctypes import (
c_int,
c_ulong,
c_void_p,
)
from ctypes.util import find_libr... | apache-2.0 |
iismd17/scikit-learn | sklearn/utils/sparsefuncs.py | 220 | 11424 | # Authors: Manoj Kumar
# Thomas Unterthiner
# License: BSD 3 clause
import scipy.sparse as sp
import numpy as np
from .fixes import sparse_min_max, bincount
from .sparsefuncs_fast import csr_mean_variance_axis0 as _csr_mean_var_axis0
from .sparsefuncs_fast import csc_mean_variance_axis0 as _csc_mean_var_axis... | bsd-3-clause |
pacoqueen/upy | formularios/up_listado_grupos.py | 1 | 5332 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright (C) 2005-2008 Francisco José Rodríguez Bogado, #
# (pacoqueen@users.sourceforge.net) #
# ... | gpl-2.0 |
CharlesJUDITH/rpm-dashing | SOURCES/dashing/dashing/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.6.1/ext/nokogiri/tmp/x86_64-redhat-linux/ports/libxml2/2.8.0/libxml2-2.8.0/regressions.py | 360 | 12439 | #!/usr/bin/python -u
import glob, os, string, sys, thread, time
# import difflib
import libxml2
###
#
# This is a "Work in Progress" attempt at a python script to run the
# various regression tests. The rationale for this is that it should be
# possible to run this on most major platforms, including those (such as
# ... | mit |
doug-fish/horizon | openstack_dashboard/dashboards/project/volumes/volumes/views.py | 8 | 18770 | # 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
#
# Unless required by applicable law or agree... | apache-2.0 |
sherzberg/asq | asq/test/test_record.py | 5 | 2182 | import unittest
import pickle
from asq.record import Record, new
__author__ = "Robert Smallshire"
class TestRecord(unittest.TestCase):
def test_create(self):
r = Record(x=10, y=20, z=30)
self.assertEqual(r.x, 10)
self.assertEqual(r.y, 20)
self.assertEqual(r.z, 30)
... | mit |
ufieeehw/IEEE2015 | ros/ieee2015_simulator/scripts/etch_talker_dummy.py | 1 | 1063 | #!/usr/bin/env python
import rospy
import random
from std_msgs.msg import Float64
from ieee2015_simulator.msg import Float_List
#constants
SCREEN_WIDTH = 250
SCREEN_HEIGHT = 1300/8
def displace(start, boundary):
midpoint = boundary / 2
#set direction
if start < midpoint / 2 :
direction = 1
... | gpl-2.0 |
t1m0thyj/aiyprojects-raspbian | src/aiy/assistant/grpc.py | 2 | 2773 | # Copyright 2017 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 or agreed to in writing, ... | apache-2.0 |
alqfahad/odoo | addons/product/tests/test_pricelist.py | 280 | 6748 | from openerp.tests.common import TransactionCase
class TestPricelist(TransactionCase):
"""Tests for unit of measure conversion"""
def setUp(self):
super(TestPricelist, self).setUp()
cr, uid, context = self.cr, self.uid, {}
self.ir_model_data = self.registry('ir.model.data')
sel... | agpl-3.0 |
tushevorg/namebench | nb_third_party/dns/inet.py | 248 | 3236 | # Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED ... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.