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 |
|---|---|---|---|---|---|
gnowledge/OTM2 | opentreemap/treemap/plugin.py | 1 | 3086 | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from django.conf import settings
from django.db.models import Q
from django.test.signals import setting_changed
from django.dispatch import receiver
from treemap.lib import get_functio... | gpl-3.0 |
chjw8016/GreenOdoo7-haibao | openerp/addons/mrp/report/workcenter_load.py | 437 | 9126 | # -*- 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... | mit |
reggie2010/cpp-A_star | vendor/googletest/googletest/test/gtest_xml_test_utils.py | 364 | 8872 | #!/usr/bin/env python
#
# Copyright 2006, 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... | mit |
ivanhorvath/openshift-tools | openshift/installer/vendored/openshift-ansible-3.4.12-1/roles/os_firewall/library/os_firewall_manage_iptables.py | 18 | 10531 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# vim: expandtab:tabstop=4:shiftwidth=4
# pylint: disable=fixme, missing-docstring
from subprocess import call, check_output
DOCUMENTATION = '''
---
module: os_firewall_manage_iptables
short_description: This module manages iptables rules for a given chain
author: Jason DeTibe... | apache-2.0 |
pdamodaran/yellowbrick | yellowbrick/text/dispersion.py | 1 | 10916 | # yellowbrick.text.dispersion
# Implementations of lexical dispersions for text visualization.
#
# Author: Larry Gray
# Created: 2018-06-21 10:06
#
# Copyright (C) 2018 District Data Labs
# For license information, see LICENSE.txt
#
# ID: dispersion.py [] lwgray@gmail.com $
"""
Implementation of lexical dispersion ... | apache-2.0 |
joone/chromium-crosswalk | third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem_unittest.py | 57 | 13211 | # vim: set fileencoding=utf-8 :
# Copyright (C) 2010 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, t... | bsd-3-clause |
deepakkv07/Implementation-of-UDP-Lite-in-ns-3 | src/visualizer/visualizer/plugins/show_last_packets.py | 182 | 9460 | import gobject
import gtk
import ns.core
import ns.network
import ns.visualizer
from visualizer.base import InformationWindow
from visualizer.higcontainer import HIGContainer
from kiwi.ui.objectlist import ObjectList, Column
class ShowLastPackets(InformationWindow):
class PacketList(gtk.ScrolledWindow):
... | gpl-2.0 |
xiangel/hue | desktop/libs/libsolr/src/libsolr/api.py | 7 | 28474 | #!/usr/bin/env python
# -- coding: utf-8 --
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (th... | apache-2.0 |
MortimerGoro/servo | tests/wpt/web-platform-tests/tools/pytest/testing/test_runner.py | 167 | 20633 | # -*- coding: utf-8 -*-
from __future__ import with_statement
import _pytest._code
import os
import py
import pytest
import sys
from _pytest import runner, main
class TestSetupState:
def test_setup(self, testdir):
ss = runner.SetupState()
item = testdir.getitem("def test_func(): pass")
l =... | mpl-2.0 |
ddy88958620/lib | Python/scrapy/cocopanda/cocopanda_spider.py | 2 | 1352 | import re
import os
import json
from scrapy.spider import BaseSpider
from scrapy.contrib.spiders import XMLFeedSpider
from scrapy.selector import XmlXPathSelector
from scrapy.http import Request, XmlResponse
from scrapy.utils.response import get_base_url
from scrapy.utils.url import urljoin_rfc
from urllib import urle... | apache-2.0 |
lucasberti/telegrao-py | plugins/apex.py | 1 | 2106 | import requests
import json
from api import send_message
ENDPOINT = "https://public-api.tracker.gg/apex/v1/standard/profile/5/"
PLAYERS = {
14160874: "bertoncio",
16631085: "beartz",
85867003: "R3TCH4",
52451934: "xisteaga",
10549434: "Axasdas123",
123123862: "MeroFabio",
569341... | mit |
dcroc16/skunk_works | google_appengine/lib/django-1.5/django/contrib/localflavor/es/es_provinces.py | 110 | 1482 | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
PROVINCE_CHOICES = (
('01', _('Araba')),
('02', _('Albacete')),
('03', _('Alacant')),
('04', _('Almeria')),
('05', _('Avila')),
('06', _('Badajoz')),
('07', _('Illes Balears')),
('08', _('Barcelona')),
(... | mit |
Silight/ComicEnv | ComicEnv/lib/python3.2/site-packages/pip/_vendor/html5lib/treebuilders/_base.py | 915 | 13711 | from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type
from ..constants import scopingElements, tableInsertModeElements, namespaces
# The scope markers are inserted when entering object elements,
# marquees, table cells, and table captions, and are used to prevent for... | mit |
gwAdvNet2015/adv-net-samples | sdn/pox/pox/forwarding/hub.py | 41 | 1092 | # Copyright 2012 James McCauley
#
# 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 writi... | mit |
amarant/servo | tests/wpt/web-platform-tests/tools/wptserve/tests/functional/test_cookies.py | 299 | 1996 | import os
import unittest
import urllib2
import json
import wptserve
from base import TestUsingServer, doc_root
class TestResponseSetCookie(TestUsingServer):
def test_name_value(self):
@wptserve.handlers.handler
def handler(request, response):
response.set_cookie("name", "value")
... | mpl-2.0 |
DecipherOne/Troglodyte | Trog Build Dependencies/Python26/Lib/bsddb/test/test_all.py | 1 | 16100 | """Run all test cases.
"""
import sys
import os
import unittest
try:
# For Pythons w/distutils pybsddb
import bsddb3 as bsddb
except ImportError:
# For Python 2.3
import bsddb
if sys.version_info[0] >= 3 :
charset = "iso8859-1" # Full 8 bit
class cursor_py3k(object) :
def __init__(s... | mit |
home-assistant/home-assistant | tests/components/wiffi/test_config_flow.py | 8 | 3856 | """Test the wiffi integration config flow."""
import errno
from unittest.mock import patch
import pytest
from homeassistant import config_entries, data_entry_flow
from homeassistant.components.wiffi.const import DOMAIN
from homeassistant.const import CONF_PORT, CONF_TIMEOUT
from homeassistant.data_entry_flow import (... | apache-2.0 |
watspidererik/testenv | flask/lib/python2.7/site-packages/wtforms/fields/html5.py | 178 | 1855 | """
Fields to support various HTML5 input types.
"""
from ..widgets import html5 as widgets
from . import core
__all__ = (
'DateField', 'DateTimeField', 'DateTimeLocalField', 'DecimalField',
'DecimalRangeField', 'EmailField', 'IntegerField', 'IntegerRangeField',
'SearchField', 'TelField', 'URLField',
)
c... | mit |
vik001ind/RSAExploits | RSAExploits/exploits/hastad.py | 1 | 3524 | """ Class defintion for simple hastad broadcast exploit """
from RSAExploits import util
from RSAExploits.exploits.exploit import Exploit
class Hastad(Exploit):
""" Class providing a run interface to hastad broadcast exploit"""
def run(self, rsadata_list, info_dict = None):
""" Attempts to recove... | mit |
sunsrising/xnhb | contrib/devtools/optimize-pngs.py | 126 | 3201 | #!/usr/bin/env python
'''
Run this script every time you change one of the png files. Using pngcrush, it will optimize the png files, remove various color profiles, remove ancillary chunks (alla) and text chunks (text).
#pngcrush -brute -ow -rem gAMA -rem cHRM -rem iCCP -rem sRGB -rem alla -rem text
'''
import os
impor... | mit |
aschleg/mathpy | mathpy/special/gamma.py | 1 | 1555 | # encoding=utf8
import numpy as np
def k_function(n):
r"""
Returns the K-function up to a given integer n.
Parameters
----------
n : int
The length of the returned K-function as in :math:`K(n)`.
Returns
-------
array-like
numpy array of the computed integers returne... | mit |
Radioafricagroup/swafe | swafe/tests/mocker.py | 2 | 2752 | from swafe.workflow import Workflow
from swafe import activity
import boto3
import uuid
from builtins import str
from swafe.helpers import start_workflow
from swafe.task import DecisionTask
TEST_DOMAIN_PARAMS = { 'name': 'CLITestCaseDomain',
'workflowExecutionRetentionPeriodInDays': '14', 'description': 'Te... | gpl-3.0 |
maarteninja/ml2014 | three/minimize.py | 1 | 8935 | #This program is distributed WITHOUT ANY WARRANTY; without even the implied
#warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
#
#This file contains a Python version of Carl Rasmussen's Matlab-function
#minimize.m
#
#minimize.m is copyright (C) 1999 - 2006, Carl Edward Rasmussen.
#Python adaptation ... | gpl-2.0 |
bkirui/odoo | addons/account/ir_sequence.py | 336 | 2454 | # -*- 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 |
rande/python-element | element/plugins/disqus/disqus.py | 1 | 1405 | #
# Copyright 2014 Thomas Rabaix <thomas.rabaix@gmail.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 required by applicable law... | apache-2.0 |
chauhanhardik/populo_2 | lms/djangoapps/notes/api.py | 165 | 7855 | from opaque_keys.edx.locations import SlashSeparatedCourseKey
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse, Http404
from django.core.exceptions import ValidationError
from notes.models import Note
from notes.utils import notes_enabled_for_course
from courseware.courses... | agpl-3.0 |
40223231/6-22-Final-Exam-1-2 | static/Brython3.1.1-20150328-091302/Lib/_socket.py | 742 | 6431 | """Implementation module for socket operations.
See the socket module for documentation."""
AF_APPLETALK = 16
AF_DECnet = 12
AF_INET = 2
AF_INET6 = 23
AF_IPX = 6
AF_IRDA = 26
AF_SNA = 11
AF_UNSPEC = 0
AI_ADDRCONFIG = 1024
AI_ALL = 256
AI_CANONNAME = 2
AI_NUMERICHOST = 4
AI_NUMERICSERV = 8
AI_PASSIVE = 1... | gpl-3.0 |
sinkuri256/python-for-android | python3-alpha/python3-src/Lib/tkinter/scrolledtext.py | 164 | 1814 | """A ScrolledText widget feels like a text widget but also has a
vertical scroll bar on its right. (Later, options may be added to
add a horizontal bar as well, to make the bars disappear
automatically when not needed, to move them to the other side of the
window, etc.)
Configuration options are passed to the Text wi... | apache-2.0 |
gdimitris/ChessPuzzler | Virtual_Environment/lib/python2.7/site-packages/werkzeug/wrappers.py | 147 | 76919 | # -*- coding: utf-8 -*-
"""
werkzeug.wrappers
~~~~~~~~~~~~~~~~~
The wrappers are simple request and response objects which you can
subclass to do whatever you want them to do. The request object contains
the information transmitted by the client (webbrowser) and the response
object contains al... | mit |
kirmani/hlpr_cadence | third_party/vector_v1/vector_desktop/vector_dashboard/src/vector_dashboard/led_widget.py | 5 | 1451 | import rospy
from functools import partial
from kobuki_msgs.msg import Led
from rqt_robot_dashboard.widgets import MenuDashWidget
from python_qt_binding.QtCore import QSize
class LedWidget(MenuDashWidget):
def __init__(self, topic):
self._pub = rospy.Publisher(topic, Led, queue_size=5)
self._off... | mit |
GiulioRossetti/ndlib | ndlib/models/epidemics/IndependentCascadesModel.py | 1 | 3628 | from ..DiffusionModel import DiffusionModel
import numpy as np
import future.utils
__author__ = 'Giulio Rossetti'
__license__ = "BSD-2-Clause"
__email__ = "giulio.rossetti@gmail.com"
class IndependentCascadesModel(DiffusionModel):
"""
Edge Parameters to be specified via ModelConfig
:param thresh... | bsd-2-clause |
TingOOOgniT/sine_controller | pox/lib/packet/icmpv6.py | 42 | 25205 | # Copyright 2011-2013 James McCauley
#
# 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 |
raycarnes/hr | hr_job_categories/__openerp__.py | 9 | 1504 | # -*- coding:utf-8 -*-
##############################################################################
#
# Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>.
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero ... | agpl-3.0 |
parrishmyers/tacmap | ThirdParty/googletest/test/gtest_catch_exceptions_test.py | 2139 | 9901 | #!/usr/bin/env python
#
# Copyright 2010 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 o... | mit |
mvaled/OpenUpgrade | addons/base_action_rule/__init__.py | 438 | 1098 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... | agpl-3.0 |
veorq/blueflower | blueflower/modules/pdf.py | 2 | 2063 | # copyright (c) 2014 JP Aumasson <jeanphilippe.aumasson@gmail.com>
#
# This file is part of blueflower.
#
# blueflower 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 |
qizdyyt/CPLogProgram | HebcaLog/Pods/AVOSCloudCrashReporting/Breakpad/src/tools/gyp/pylib/gyp/common_test.py | 2542 | 1970 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Unit tests for the common.py file."""
import gyp.common
import unittest
import sys
class TestTopologicallySorted(unittest.TestCase):
... | apache-2.0 |
jonasjberg/autonameow | autonameow/vendor/unidecode/x013.py | 252 | 4247 | data = (
'ja', # 0x00
'ju', # 0x01
'ji', # 0x02
'jaa', # 0x03
'jee', # 0x04
'je', # 0x05
'jo', # 0x06
'jwa', # 0x07
'ga', # 0x08
'gu', # 0x09
'gi', # 0x0a
'gaa', # 0x0b
'gee', # 0x0c
'ge', # 0x0d
'go', # 0x0e
'[?]', # 0x0f
'gwa', # 0x10
'[?]', # 0x11
'gwi', # 0x1... | gpl-2.0 |
KL-WLCR/incubator-airflow | airflow/hooks/postgres_hook.py | 10 | 2920 | # -*- 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 |
maoxuxiang/termite_mallet_project | web2py/gluon/validators.py | 9 | 127935 | #!/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
Thanks to ga2arch for help with IS_IN_DB and IS_NOT_IN_DB on GAE
"""
import os
import re
import datetime
impor... | bsd-3-clause |
nikesh-mahalka/nova | nova/tests/unit/keymgr/test_key.py | 93 | 1908 | # Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/... | apache-2.0 |
diagramsoftware/odoomrp-wip | account_treasury_forecast_cashflow_banking/report/account_treasury_forecast_analysis.py | 31 | 5233 | # -*- encoding: utf-8 -*-
##############################################################################
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the... | agpl-3.0 |
SamiHiltunen/invenio-demosite | invenio_demosite/testsuite/regression/test_search_engine_summarizer.py | 7 | 1656 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio Demosite.
# Copyright (C) 2011, 2012, 2013 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,... | gpl-2.0 |
z0by/django | tests/dbshell/test_mysql.py | 442 | 2849 | from django.db.backends.mysql.client import DatabaseClient
from django.test import SimpleTestCase
class MySqlDbshellCommandTestCase(SimpleTestCase):
def test_fails_with_keyerror_on_incomplete_config(self):
with self.assertRaises(KeyError):
self.get_command_line_arguments({})
def test_bas... | bsd-3-clause |
oscaro/django | tests/order_with_respect_to/tests.py | 36 | 3335 | from __future__ import unicode_literals
from operator import attrgetter
from django.test import TestCase
from django.db import models
from .models import Post, Question, Answer
class OrderWithRespectToTests(TestCase):
def test_basic(self):
q1 = Question.objects.create(text="Which Beatle starts with th... | bsd-3-clause |
edvakf/thrift | test/py/TSimpleJSONProtocolTest.py | 69 | 4068 | #!/usr/bin/env python
#
# 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
# "L... | apache-2.0 |
Northeaster/TargetSentimentAnalysis | lib/rnn_cells/gru_cell.py | 1 | 1575 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
from lib.rnn_cells.base_cell import BaseCell
from lib import linalg
#***************************************************************
clas... | apache-2.0 |
sharkykh/SickRage | lib/twilio/rest/resources/trunking/origination_urls.py | 24 | 2796 | from .. import NextGenInstanceResource, NextGenListResource
class OriginationUrl(NextGenInstanceResource):
"""
An Origination URL resource.
See the `TaskRouter API reference
<https://www.twilio.com/docs/sip-trunking/rest/origination-urls>_`
for more information.
.. attribute:: sid
Th... | gpl-3.0 |
MERegistro/meregistro | django/core/serializers/__init__.py | 200 | 3665 | """
Interfaces for serializing Django objects.
Usage::
from django.core import serializers
json = serializers.serialize("json", some_query_set)
objects = list(serializers.deserialize("json", json))
To add your own serializers, use the SERIALIZATION_MODULES setting::
SERIALIZATION_MODULES = {
... | bsd-3-clause |
cbenhagen/kivy | kivy/uix/textinput.py | 1 | 108858 | # -*- encoding: utf-8 -*-
'''
Text Input
==========
.. versionadded:: 1.0.4
.. image:: images/textinput-mono.jpg
.. image:: images/textinput-multi.jpg
The :class:`TextInput` widget provides a box for editable plain text.
Unicode, multiline, cursor navigation, selection and clipboard features
are supported.
The :cl... | mit |
gregpuzzles1/Sandbox | Example Programs/Ch_12_Student_Files/teststudent.py | 1 | 1833 | """
File: teststudent.py
Unit test suite for the Student class.
"""
from student import Student
import unittest
class TestStudent(unittest.TestCase):
"""Defines a unit test suite for the Student class."""
def setUp(self):
"""Sets up the test fixture. Scores are 1-5."""
self._student = Student... | gpl-3.0 |
remotesyssupport/cobbler-1 | cobbler/modules/manage_tftpd_py.py | 3 | 3319 | """
This is some of the code behind 'cobbler sync'.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distribute... | gpl-2.0 |
robcarver17/systematictradingexamples | plots_for_perhaps/compareoptmethods.py | 1 | 22426 | import numpy as np
import matplotlib.pyplot as plt
from matplotlib.pyplot import plot, show, xticks, xlabel, ylabel, legend, yscale, title, savefig, rcParams, figure, hist, text, bar, subplots
import Image
def file_process(filename):
fig = plt.gcf()
fig.set_size_inches(18.5,10.5)
fig.savefig("/home/rob/%s.... | gpl-2.0 |
abenzbiria/clients_odoo | addons/calendar/controllers/main.py | 24 | 3486 | import simplejson
import openerp
import openerp.http as http
from openerp.http import request
import openerp.addons.web.controllers.main as webmain
import json
class meeting_invitation(http.Controller):
@http.route('/calendar/meeting/accept', type='http', auth="calendar")
def accept(self, db, token, action, ... | agpl-3.0 |
ravindrapanda/tensorflow | tensorflow/python/kernel_tests/scatter_ops_test.py | 117 | 7188 | # 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 |
thedrow/django | django/db/backends/mysql/client.py | 520 | 1518 | import subprocess
from django.db.backends.base.client import BaseDatabaseClient
class DatabaseClient(BaseDatabaseClient):
executable_name = 'mysql'
@classmethod
def settings_to_cmd_args(cls, settings_dict):
args = [cls.executable_name]
db = settings_dict['OPTIONS'].get('db', settings_dic... | bsd-3-clause |
sogis/Quantum-GIS | python/ext-libs/owslib/feature/wfs100.py | 28 | 14347 | # =============================================================================
# OWSLib. Copyright (C) 2005 Sean C. Gillies
#
# Contact email: sgillies@frii.com
#
# $Id: wfs.py 503 2006-02-01 17:09:12Z dokai $
# =============================================================================
import cgi
from cStringIO im... | gpl-2.0 |
MrNuggles/HeyBoet-Telegram-Bot | temboo/Library/Facebook/Reading/VideoTags.py | 5 | 5532 | # -*- coding: utf-8 -*-
###############################################################################
#
# VideoTags
# Retrieves a list of video tags associated with a specified user.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
... | gpl-3.0 |
poiesisconsulting/openerp-restaurant | account/report/common_report_header.py | 386 | 6479 | # -*- 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 |
girving/tensorflow | tensorflow/contrib/timeseries/python/timeseries/state_space_models/kalman_filter.py | 27 | 16368 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
mgogoulos/libcloud | libcloud/loadbalancer/drivers/ninefold.py | 61 | 1169 | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | apache-2.0 |
drwyrm/Flexget | flexget/tests/api_tests/test_cached_api.py | 13 | 1062 | from __future__ import unicode_literals, division, absolute_import
from builtins import * # noqa pylint: disable=unused-import, redefined-builtin
import pytest
import requests
@pytest.mark.online
class TestCachedAPI(object):
config = 'tasks: {}'
def test_cached_api(self, api_client):
rsp = api_clie... | mit |
harsh365/RestifyErr | node_modules/restify/node_modules/bunyan/tools/cutarelease.py | 171 | 22043 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2009-2012 Trent Mick
"""cutarelease -- Cut a release of your project.
A script that will help cut a release for a git-based project that follows
a few conventions. It'll update your changelog (CHANGES.md), add a git
tag, push those changes, update your ver... | mit |
msabramo/ansible | lib/ansible/modules/cloud/openstack/os_router.py | 27 | 14113 | #!/usr/bin/python
#
# 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 version 3 of the License, or
# (at your option) any later version.
#
# This software is distributed in the hope that it ... | gpl-3.0 |
kyl191/ansible | lib/ansible/utils/vars.py | 38 | 4104 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@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 by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | gpl-3.0 |
devoid/nova | nova/virt/baremetal/db/sqlalchemy/migrate_repo/versions/010_add_preserve_ephemeral.py | 16 | 1846 | # Copyright 2013 Hewlett-Packard Development Company, L.P.
# 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 |
tiancj/emesene | emesene/e3/xmpp/SleekXMPP/sleekxmpp/plugins/xep_0172/user_nick.py | 14 | 3409 | """
SleekXMPP: The Sleek XMPP Library
Copyright (C) 2011 Nathanael C. Fritz, Lance J.T. Stout
This file is part of SleekXMPP.
See the file LICENSE for copying permission.
"""
import logging
from sleekxmpp.stanza.message import Message
from sleekxmpp.stanza.presence import Presence
from sleekxmpp.xmls... | gpl-3.0 |
spring-week-topos/horizon-week | horizon/test/settings.py | 8 | 4775 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... | apache-2.0 |
anchore/anchore-engine | tests/integration/subsys/auth/stores/test_basic_store.py | 1 | 5494 | import json
import unittest
from anchore_engine.db import session_scope
from anchore_engine.subsys import identities
from anchore_engine.subsys.identities import AccountTypes, UserAccessCredentialTypes
from anchore_engine.subsys.auth.stores import basic as basic_accountstore
from yosai.core import UsernamePasswordToken... | apache-2.0 |
tsabi/Odoo-tsabi-fixes | addons/hr_payroll_account/wizard/__init__.py | 433 | 1116 | #-*- coding:utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# d$
#
# This program is free software: you can redistribute it and/or modify
# ... | agpl-3.0 |
mjschultz/ansible-modules-extras | cloud/amazon/ec2_vpc_route_table_facts.py | 26 | 3998 | #!/usr/bin/python
#
# This is a 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 Ansible library is distributed in the hope that i... | gpl-3.0 |
willprice/arduino-sphere-project | scripts/example_direction_finder/temboo/Library/SendGrid/WebAPI/Unsubscribes/AddAddressToUnsubscribesList.py | 5 | 4088 | # -*- coding: utf-8 -*-
###############################################################################
#
# AddAddressToUnsubscribesList
# Add an address to the Unsubscribe list.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you ... | gpl-2.0 |
andrewshadura/omim | 3party/protobuf/gtest/test/gtest_catch_exceptions_test.py | 403 | 9422 | #!/usr/bin/env python
#
# Copyright 2010 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 o... | apache-2.0 |
AlexHill/django | django/contrib/formtools/tests/tests.py | 5 | 7437 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
import os
import unittest
import warnings
from django import http
from django.contrib.formtools import preview, utils
from django.test import TestCase
from django.test.utils import override_settings
from django.utils._os import upath
fro... | bsd-3-clause |
with-git/tensorflow | tensorflow/contrib/keras/python/keras/layers/convolutional_test.py | 5 | 28168 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
bqbn/addons-server | src/olympia/users/tests/test_user_utils.py | 1 | 1451 | # -*- coding: utf-8 -*-
import pytest
from olympia.amo.tests import user_factory
from olympia.users.utils import (
UnsubscribeCode, system_addon_submission_allowed)
def test_email_unsubscribe_code_parse():
email = u'nobody@mozîlla.org'
token, hash_ = UnsubscribeCode.create(email)
r_email = Unsubscri... | bsd-3-clause |
ojengwa/django-1 | django/conf/locale/az/formats.py | 1059 | 1267 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j E Y г.'
TIME_FORMAT = 'G:i'
DAT... | bsd-3-clause |
idovear/odoo | addons/hr_evaluation/__init__.py | 432 | 1084 | # -*- encoding: 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 G... | agpl-3.0 |
greenoaktree/MissionPlanner | Lib/compileall.py | 50 | 7452 | """Module/script to "compile" all .py files to .pyc (or .pyo) file.
When called as a script with arguments, this compiles the directories
given as arguments recursively; the -l option prevents it from
recursing into directories.
Without arguments, if compiles all modules on sys.path, without
recursing into sub... | gpl-3.0 |
maxive/erp | addons/google_drive/models/google_drive.py | 9 | 11240 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
import json
import re
import requests
import werkzeug.urls
from odoo import api, fields, models
from odoo.exceptions import RedirectWarning, UserError
from odoo.tools import pycompat
from odoo.tools.safe_... | agpl-3.0 |
vst/normalazy | normalazy.py | 1 | 27657 | import copy
import datetime
from collections import OrderedDict
from decimal import Decimal
from functools import wraps
from six import add_metaclass
#: Defines the version of the `normalazy` library.
__version__ = "0.0.3"
def iffnotnull(func):
"""
Wraps a function, returns None if the first argument is Non... | bsd-2-clause |
2014c2g1/c2g1 | exts/wsgi/static/Brython2.1.0-20140419-113919/Lib/itertools.py | 54 | 15457 | import operator
class accumulate:
def __init__(self, iterable, func = operator.add):
self.it = iter(iterable)
self._total = None
self.func = func
def __iter__(self):
return self
def __next__(self):
if not self._total:
self._total = next(self.it)... | gpl-2.0 |
janhahne/nest-simulator | pynest/nest/tests/test_connect_arrays.py | 1 | 3293 | # -*- coding: utf-8 -*-
#
# test_connect_arrays.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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 Lic... | gpl-2.0 |
juanmhidalgo/subliminal | subliminal/providers/tvsubtitles.py | 25 | 8046 | # -*- coding: utf-8 -*-
import io
import logging
import re
from zipfile import ZipFile
from babelfish import Language, language_converters
from guessit import guessit
from requests import Session
from . import ParserBeautifulSoup, Provider
from .. import __short_version__
from ..cache import EPISODE_EXPIRATION_TIME, ... | mit |
CIECODE-Madrid/tipi-engine | stats/process_stats.py | 1 | 6001 | from tipi_data.models.stats import Stats
from tipi_data.models.topic import Topic
from tipi_data.models.initiative import Initiative
class GenerateStats(object):
def __init__(self):
self.topics = Topic.objects()
self.subtopics = self.topics.distinct('tags.subtopic')
self.stats = Stats()
... | gpl-3.0 |
DayGitH/Python-Challenges | DailyProgrammer/DP20120723C.py | 1 | 1700 | """
[7/23/2012] Challenge #80 [difficult] (Multi-word anagrams)
https://www.reddit.com/r/dailyprogrammer/comments/x0vj7/7232012_challenge_80_difficult_multiword_anagrams/
In [today's easy problem](http://www.reddit.com/r/dailyprogrammer/comments/x0v3e/7232012_challenge_80_easy_anagrams/),
we investigated anagrams tha... | mit |
nttks/xqueue | queue/tests/test_lms_interface.py | 5 | 3885 | """
Run me with:
python manage.py test --settings=xqueue.test_settings queue
"""
import json
import unittest
from django.contrib.auth.models import User
from django.test.client import Client
from queue import lms_interface
def parse_xreply(xreply):
xreply = json.loads(xreply)
return (xreply['return_code... | agpl-3.0 |
tumbl3w33d/ansible | lib/ansible/plugins/lookup/lastpass.py | 52 | 2927 | # (c) 2016, Andrew Zenk <azenk@umn.edu>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = """
lookup: lastpass
author:
- Andrew Ze... | gpl-3.0 |
asposepdf/Aspose_Pdf_Cloud | Examples/Python/Examples/GetTextFormatOfPDFFragment.py | 2 | 1363 | import asposepdfcloud
from asposepdfcloud.PdfApi import PdfApi
from asposepdfcloud.PdfApi import ApiException
import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi
from asposestoragecloud.StorageApi import ResponseMessage
apiKey = "XXXXX" #sepcify App Key
appSid = "XXXXX" #sepcify App SID
api... | mit |
apechimp/servo | components/script/dom/bindings/codegen/parser/tests/test_const.py | 134 | 3000 | import WebIDL
def WebIDLTest(parser, harness):
parser.parse("""
interface TestConsts {
const byte zero = 0;
const byte b = -1;
const octet o = 2;
const short s = -3;
const unsigned short us = 0x4;
const long l = -0X5;
const unsigned long... | mpl-2.0 |
mercycorps/tola-activity | htdocs/activitydb/migrations/0037_auto_20151028_1631.py | 1 | 1470 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('activitydb', '0036_auto_20151028_1519'),
]
operations = [
migrations.AlterField(
model_name='siteprofile',
... | gpl-2.0 |
williamthegrey/swift | test/probe/test_object_metadata_replication.py | 1 | 30416 | #!/usr/bin/python -u
# 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 ap... | apache-2.0 |
carsongee/edx-platform | common/djangoapps/track/management/tracked_command.py | 255 | 2063 | """Provides management command calling info to tracking context."""
from django.core.management.base import BaseCommand
from eventtracking import tracker
class TrackedCommand(BaseCommand):
"""
Provides management command calling info to tracking context.
Information provided to context includes the fol... | agpl-3.0 |
srajag/contrail-controller | src/config/device-manager/device_manager/db.py | 1 | 14129 | #
# Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
#
"""
This file contains implementation of data model for physical router
configuration manager
"""
from vnc_api.common.exceptions import NoIdError
from physical_router_config import PhysicalRouterConfig
from sandesh.dm_introspect import ttypes as sand... | apache-2.0 |
hitrust/namebench | nb_third_party/dns/e164.py | 248 | 3063 | # Copyright (C) 2006, 2007, 2009 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 "AS I... | apache-2.0 |
tlatzko/spmcluster | .tox/2.6-cover/lib/python2.6/site-packages/wheel/metadata.py | 219 | 10424 | """
Tools for converting old- to new-style metadata.
"""
from collections import defaultdict, namedtuple
from .pkginfo import read_pkg_info
import re
import os.path
import textwrap
import pkg_resources
import email.parser
import wheel
METADATA_VERSION = "2.0"
PLURAL_FIELDS = { "classifier" : "classifiers",
... | bsd-2-clause |
rackspace/pyrax | samples/queueing/claim_messages.py | 13 | 3336 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c)2013 Rackspace US, 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.ap... | apache-2.0 |
alexandrucoman/vbox-nova-driver | nova/api/openstack/compute/plugins/v3/remote_consoles.py | 12 | 7437 | # Copyright 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 ... | apache-2.0 |
os-cloud-storage/openstack-workload-disaster-recovery | dragon/common/timeutils.py | 5 | 1345 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# 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 |
CanonicalBootStack/charm-hacluster | tests/charmhelpers/contrib/amulet/deployment.py | 3 | 3388 | # Copyright 2014-2015 Canonical Limited.
#
# 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.