repo_name stringlengths 5 100 | path stringlengths 4 294 | copies stringclasses 990
values | size stringlengths 4 7 | content stringlengths 666 1M | license stringclasses 15
values |
|---|---|---|---|---|---|
denys-duchier/django | tests/generic_inline_admin/models.py | 133 | 1617 | from django.contrib.contenttypes.fields import (
GenericForeignKey, GenericRelation,
)
from django.contrib.contenttypes.models import ContentType
from django.db import models
class Episode(models.Model):
name = models.CharField(max_length=100)
length = models.CharField(max_length=100, blank=True)
auth... | bsd-3-clause |
MostAwesomeDude/construct | construct/formats/graphics/bmp.py | 1 | 3315 | """
Windows/OS2 Bitmap (BMP)
this could have been a perfect show-case file format, but they had to make
it ugly (all sorts of alignment or
"""
from construct import *
#===============================================================================
# pixels: uncompressed
#==============================================... | mit |
licode/scikit-beam | skbeam/core/fitting/models.py | 4 | 5983 | # ######################################################################
# Copyright (c) 2014, Brookhaven Science Associates, Brookhaven #
# National Laboratory. All rights reserved. #
# #
# @author: Li Li (lili@bnl.g... | bsd-3-clause |
bluemini/kuma | kuma/search/tests/test_types.py | 26 | 1836 | from nose.tools import ok_, eq_
from elasticsearch_dsl import query
from kuma.wiki.models import Document
from kuma.wiki.search import WikiDocumentType
from . import ElasticTestCase
class WikiDocumentTypeTests(ElasticTestCase):
fixtures = ElasticTestCase.fixtures + ['wiki/documents.json']
def test_get_exc... | mpl-2.0 |
sander76/home-assistant | tests/components/homekit_controller/test_climate.py | 6 | 26995 | """Basic checks for HomeKitclimate."""
from aiohomekit.model.characteristics import (
ActivationStateValues,
CharacteristicsTypes,
CurrentHeaterCoolerStateValues,
SwingModeValues,
TargetHeaterCoolerStateValues,
)
from aiohomekit.model.services import ServicesTypes
from homeassistant.components.clim... | apache-2.0 |
fweik/espresso | testsuite/scripts/tutorials/test_lattice_boltzmann_part3.py | 3 | 2511 | # Copyright (C) 2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later versio... | gpl-3.0 |
arskom/spyne | spyne/const/xml.py | 2 | 8841 |
#
# spyne - Copyright (C) Spyne contributors.
#
# 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 your option) any later version.
#
# This libra... | lgpl-2.1 |
darren-rogan/CouchPotatoServer | libs/subliminal/__init__.py | 109 | 1366 | # -*- coding: utf-8 -*-
# Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com>
#
# This file is part of subliminal.
#
# subliminal 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 3 of... | gpl-3.0 |
mmauroy/SickRage | lib/guessit/transfo/guess_episodes_rexps.py | 28 | 12285 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# GuessIt - A library for guessing information from filenames
# Copyright (c) 2013 Nicolas Wack <wackou@gmail.com>
#
# GuessIt is free software; you can redistribute it and/or modify it under
# the terms of the Lesser GNU General Public License as published by
# the Free ... | gpl-3.0 |
billy-inn/scikit-learn | sklearn/tests/test_cross_validation.py | 27 | 41664 | """Test the cross_validation module"""
from __future__ import division
import warnings
import numpy as np
from scipy.sparse import coo_matrix
from scipy import stats
from sklearn.utils.testing import assert_true
from sklearn.utils.testing import assert_false
from sklearn.utils.testing import assert_equal
from sklearn... | bsd-3-clause |
mdj2/django | tests/custom_columns/models.py | 114 | 1396 | """
17. Custom column/table names
If your database column name is different than your model attribute, use the
``db_column`` parameter. Note that you'll use the field's name, not its column
name, in API usage.
If your database table name is different than your model name, use the
``db_table`` Meta attribute. This has... | bsd-3-clause |
sgh/vtk | Graphics/Testing/Python/tubeComb.py | 1 | 2098 | #!/usr/bin/env python
import sys
for i in range(0, len(sys.argv)):
if sys.argv[i] == '-A' and i < len(sys.argv)-1:
sys.path = sys.path + [sys.argv[i+1]]
import vtk
from vtk.util.misc import vtkRegressionTestImage, vtkGetDataRoot
# create planes
# Create the RenderWindow, Renderer
#
ren = vtk.vtkRenderer... | bsd-3-clause |
DanteOnline/free-art | venv/lib/python3.4/site-packages/django/test/runner.py | 60 | 26988 | import collections
import ctypes
import itertools
import logging
import multiprocessing
import os
import pickle
import textwrap
import unittest
from importlib import import_module
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db import DEFAULT_DB_ALIAS, connection... | gpl-3.0 |
mrkev/three.js | utils/exporters/blender/addons/io_three/exporter/io.py | 201 | 2836 | import os
import shutil
from .. import constants, logger
from . import _json
def copy_registered_textures(dest, registration):
"""Copy the registered textures to the destination (root) path
:param dest: destination directory
:param registration: registered textures
:type dest: str
:type registrat... | mit |
caphrim007/ansible-modules-core | database/mysql/mysql_user.py | 12 | 19403 | #!/usr/bin/python
# (c) 2012, Mark Theunissen <mark.theunissen@gmail.com>
# Sponsored by Four Kitchens http://fourkitchens.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... | gpl-3.0 |
k0ste/ansible | lib/ansible/modules/iptables.py | 20 | 28339 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2015, Linus Unnebäck <linus@folkdatorn.se>
# Copyright: (c) 2017, Sébastien DA ROCHA <sebastien@da-rocha.net>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_... | gpl-3.0 |
celebdor/python-midonetclient | src/midonetclient/topology/hosts.py | 2 | 1390 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2015 Midokura Europe SARL, All Rights Reserved.
# 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://w... | apache-2.0 |
chillbu/cblib | thirdparty/protobuf-2.5.0/python/google/protobuf/service_reflection.py | 601 | 11010 | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions o... | apache-2.0 |
adamchainz/ansible | lib/ansible/plugins/test/files.py | 62 | 1339 | # (c) 2015, Ansible, 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 di... | gpl-3.0 |
zhoulingjun/django | tests/gis_tests/geoapp/test_serializers.py | 245 | 3731 | from __future__ import unicode_literals
import json
from django.contrib.gis.geos import LinearRing, Point, Polygon
from django.core import serializers
from django.test import TestCase, mock, skipUnlessDBFeature
from django.utils import six
from .models import City, MultiFields, PennsylvaniaCity
@skipUnlessDBFeatur... | bsd-3-clause |
LittlePeng/redis-monitor | src/api/util/RDP.py | 14 | 1160 | """
The Ramer-Douglas-Peucker algorithm roughly ported from the pseudo-code provided
by http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm
"""
from math import sqrt
def distance(a, b):
return sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2)
def point_line_distance(point, start, end):
if (start == en... | mit |
SKIRT/PTS | modeling/maps/selector.py | 1 | 26666 | #!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
##... | agpl-3.0 |
virtualopensystems/nova | nova/openstack/common/report/views/text/header.py | 79 | 1534 | # Copyright 2013 Red Hat, 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 agre... | apache-2.0 |
cherrydocker/minos | supervisor/superlance/crashmailbatch.py | 5 | 4173 | #!/usr/bin/env python -u
##############################################################################
#
# Copyright (c) 2007 Agendaless Consulting and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the BSD-like license at
# http://www.repoze.org/LICENSE.txt. A copy of the lice... | apache-2.0 |
ebifrier/saya_chan | third-party/gtest-1.7.0/test/gtest_break_on_failure_unittest.py | 2140 | 7339 | #!/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... | gpl-3.0 |
kei-yamazaki/cf-php-build-pack | lib/build_pack_utils/process.py | 3 | 8083 | from __future__ import print_function
import signal
import subprocess
import sys
import logging
from datetime import datetime
from threading import Thread
from Queue import Queue, Empty
#
# This code comes from Honcho. Didn't need the whole Honcho
# setup, so I just swiped this part which is what the build
# pa... | apache-2.0 |
NaPs/Kolekto | kolekto/commands/flags.py | 1 | 2010 | from kolekto.commands import Command
from kolekto.printer import printer
from kolekto.helpers import get_hash
class FlagCommand(Command):
flags = [] # Flags to set when this flag is set
unset_flags = [] # Flags to unset when this flag is set
unflag_unset_flags = [] # Flags to unset when this flag is u... | mit |
helldorado/ansible | lib/ansible/modules/system/debconf.py | 44 | 5675 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2014, Brian Coca <briancoca+ansible@gmail.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_ve... | gpl-3.0 |
pixlra/HARP-fork | PythonLib/Encoder/Base_Encoder.py | 1 | 9022 | #!/usr/bin/env python
# coding: utf8
# (c) 2014 Dominic Springer
# File licensed under GNU GPL (see HARP_License.txt)
from Imports_Basic import *
#|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
class Base_Encoder(object):
#|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
#Name ... | gpl-3.0 |
ouijan/rabbit | tests/test_app.py | 1 | 3766 | import unittest
from mock import *
from rabbit import settings
from rabbit.app import App
from rabbit.config import Config
from rabbit.command import Command
from rabbit.group import Group
class TestApp(unittest.TestCase):
def test_it_creates_CONFIG_FILE_global(self):
self.assertNotEqual(settings.CONFIG_FILE, Non... | mit |
museumsvictoria/nodel-recipes | (retired)/udp/script.py | 2 | 1996 | # Copyright (c) 2014 Museum Victoria
# This software is released under the MIT license (see license.txt for details)
'''This node demonstrates a simple udp controller.'''
import socket
# Functions used by this node
def send_udp_string(msg):
#open socket
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
t... | mit |
tlodge/homehub.nox | src/nox/coreapps/examples/countdown.py | 10 | 1618 | # Copyright 2008 (C) Nicira, Inc.
#
# This file is part of NOX.
#
# NOX 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.
#
# NOX is d... | gpl-3.0 |
igraph/python-igraph | src/igraph/statistics.py | 1 | 22508 | # vim:ts=4:sw=4:sts=4:et
# -*- coding: utf-8 -*-
"""
Statistics related stuff in igraph
"""
import math
__all__ = (
"FittedPowerLaw",
"Histogram",
"RunningMean",
"mean",
"median",
"percentile",
"quantile",
"power_law_fit",
)
class FittedPowerLaw(object):
"""Result of fitting a po... | gpl-2.0 |
ldirer/scikit-learn | sklearn/manifold/locally_linear.py | 14 | 26498 | """Locally Linear Embedding"""
# Author: Fabian Pedregosa -- <fabian.pedregosa@inria.fr>
# Jake Vanderplas -- <vanderplas@astro.washington.edu>
# License: BSD 3 clause (C) INRIA 2011
import numpy as np
from scipy.linalg import eigh, svd, qr, solve
from scipy.sparse import eye, csr_matrix
from scipy.sparse.li... | bsd-3-clause |
doganov/edx-platform | common/djangoapps/track/tests/test_tracker.py | 35 | 3443 | from django.conf import settings
from django.test import TestCase
from django.test.utils import override_settings
import track.tracker as tracker
from track.backends import BaseBackend
SIMPLE_SETTINGS = {
'default': {
'ENGINE': 'track.tests.test_tracker.DummyBackend',
'OPTIONS': {
'fl... | agpl-3.0 |
keerts/home-assistant | tests/helpers/test_customize.py | 3 | 4270 | """Test the customize helper."""
import homeassistant.helpers.customize as customize
from voluptuous import MultipleInvalid
import pytest
class MockHass(object):
"""Mock object for HassAssistant."""
data = {}
class TestHelpersCustomize(object):
"""Test homeassistant.helpers.customize module."""
de... | apache-2.0 |
Pablo126/SSBW | Tarea4/tarea4/lib/python3.5/site-packages/django/conf/locale/mk/formats.py | 504 | 1742 | # -*- 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 = 'd F Y'
TIME_FORMAT = 'H:i'
DATETI... | gpl-3.0 |
aviabrams/django-pagination | pagination/tests.py | 16 | 3645 | """
>>> from django.core.paginator import Paginator
>>> from pagination.templatetags.pagination_tags import paginate
>>> from django.template import Template, Context
>>> p = Paginator(range(15), 2)
>>> paginate({'paginator': p, 'page_obj': p.page(1)})['pages']
[1, 2, 3, 4, 5, 6, 7, 8]
>>> p = Paginator(range(17), 2)... | bsd-3-clause |
chongtianfeiyu/kbengine | kbe/res/scripts/common/Lib/distutils/fancy_getopt.py | 207 | 17784 | """distutils.fancy_getopt
Wrapper around the standard getopt module that provides the following
additional features:
* short and long options are tied together
* options have help strings, so fancy_getopt could potentially
create a complete usage summary
* options set attributes of a passed-in object
"""
im... | lgpl-3.0 |
ionelmc/virtualenv | virtualenv/_utils.py | 1 | 1837 | from __future__ import absolute_import, division, print_function
import os
import re
import shutil
import stat
def ensure_directory(directory, *args, **kwargs):
# Fail if the destination exists and it's not a directory
if not os.path.isdir(directory):
os.makedirs(directory, *args, **kwargs)
def cop... | mit |
MicroTrustRepos/microkernel | src/l4/pkg/python/contrib/Demo/tkinter/guido/brownian2.py | 42 | 1379 | # Brownian motion -- an example of a NON multi-threaded Tkinter program ;)
# By Michele Simoniato, inspired by brownian.py
from Tkinter import *
import random
import sys
WIDTH = 400
HEIGHT = 300
SIGMA = 10
BUZZ = 2
RADIUS = 2
LAMBDA = 10
FILL = 'red'
stop = 0 # Set when main loop exits... | gpl-2.0 |
tobegit3hub/deep_cnn | java_predict_client/src/main/proto/tensorflow/python/ops/resource_variable_ops.py | 2 | 7588 | # 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 |
noironetworks/nova | nova/context.py | 12 | 10174 | # Copyright 2011 OpenStack Foundation
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance wi... | apache-2.0 |
wan-qy/shadowsocks | shadowsocks/manager.py | 925 | 9692 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2015 clowwindy
#
# 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 b... | apache-2.0 |
edlabh/SickRage | lib/dateutil/rrule.py | 17 | 58639 | # -*- coding: utf-8 -*-
"""
The rrule module offers a small, complete, and very fast, implementation of
the recurrence rules documented in the
`iCalendar RFC <http://www.ietf.org/rfc/rfc2445.txt>`_,
including support for caching of results.
"""
import itertools
import datetime
import calendar
import sys
try:
from ... | gpl-3.0 |
thinkle/gourmet | gourmet/recipeIdentifier.py | 1 | 9681 | """recipeIdentifier.py
This module contains code for creating hashes to identify recipes
based on title & instructions (recipe hash) or based on ingredients (ingredient hash).
The hash_recipe function is a convenience function that provide both a
recipe hash and an ingredient hash.
For individual hashes, use the get... | gpl-2.0 |
axinging/chromium-crosswalk | native_client_sdk/src/build_tools/tests/sdktools_config_test.py | 160 | 1609 | #!/usr/bin/env python
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import sys
import os
import unittest
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
BUILD_TOOLS_DIR = os.path.dirname(SCRI... | bsd-3-clause |
wwj718/edx-platform | lms/djangoapps/rss_proxy/tests/test_views.py | 42 | 2777 | """
Tests for the rss_proxy views
"""
from django.test import TestCase
from django.core.urlresolvers import reverse
from mock import patch, Mock
from rss_proxy.models import WhitelistedRssUrl
class RssProxyViewTests(TestCase):
""" Tests for the rss_proxy views """
def setUp(self):
super(RssProxyViewT... | agpl-3.0 |
timabell/gpodder | src/gpodder/gtkui/frmntl/preferences.py | 1 | 9136 | # -*- coding: utf-8 -*-
#
# gPodder - A media aggregator and podcast client
# Copyright (c) 2005-2010 Thomas Perl and the gPodder Team
#
# gPodder 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... | gpl-3.0 |
so0k/zulip | zerver/lib/bugdown/codehilite.py | 116 | 8441 | """
CodeHilite Extension for Python-Markdown
========================================
Adds code/syntax highlighting to standard Python-Markdown code blocks.
Copyright 2006-2008 [Waylan Limberg](http://achinghead.com/).
Project website: <http://packages.python.org/Markdown/extensions/code_hilite.html>
Contact: markdo... | apache-2.0 |
Innovahn/odoo.old | addons/product_email_template/models/invoice.py | 321 | 1969 | # -*- coding: utf-8 -*-
from openerp.osv import osv
class account_invoice(osv.Model):
_inherit = 'account.invoice'
def invoice_validate_send_email(self, cr, uid, ids, context=None):
Composer = self.pool['mail.compose.message']
for invoice in self.browse(cr, uid, ids, context=context):
... | agpl-3.0 |
chirilo/remo | vendor-local/lib/python/unidecode/x09f.py | 252 | 4509 | data = (
'Cu ', # 0x00
'Qu ', # 0x01
'Chao ', # 0x02
'Wa ', # 0x03
'Zhu ', # 0x04
'Zhi ', # 0x05
'Mang ', # 0x06
'Ao ', # 0x07
'Bie ', # 0x08
'Tuo ', # 0x09
'Bi ', # 0x0a
'Yuan ', # 0x0b
'Chao ', # 0x0c
'Tuo ', # 0x0d
'Ding ', # 0x0e
'Mi ', # 0x0f
'Nai ', # 0x10
'Ding ... | bsd-3-clause |
mahak/ansible | lib/ansible/cli/galaxy.py | 14 | 80269 | # Copyright: (c) 2013, James Cammarata <jcammarata@ansible.com>
# Copyright: (c) 2018-2021, 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
import json
import os.path
im... | gpl-3.0 |
Godiyos/python-for-android | python-modules/twisted/twisted/protocols/finger.py | 81 | 1246 | # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
"""The Finger User Information Protocol (RFC 1288)"""
from twisted.protocols import basic
import string
class Finger(basic.LineReceiver):
def lineReceived(self, line):
parts = string.split(line)
if not parts:
... | apache-2.0 |
jackwluo/py-quantmod | quantmod/datetools.py | 1 | 1489 | """Date and time functions
Refactored from Cufflinks' 'date_tools.py' module.
Credits to @jorgesantos.
"""
import datetime as dt
def get_date_from_today(delta, strfmt='%Y%m%d'):
""" Returns a string that represents a date n numbers of days from today.
Parameters
----------
delta : int
... | mit |
nvmd/bitcoin | qa/rpc-tests/getchaintips.py | 140 | 2130 | #!/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.
# Exercise the getchaintips API. We introduce a network split, work
# on chains of different lengths, and joi... | mit |
theflofly/tensorflow | tensorflow/contrib/gan/python/losses/__init__.py | 56 | 1385 | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | apache-2.0 |
jsteemann/arangodb | 3rdParty/V8-4.3.61/build/gyp/test/sibling/gyptest-relocate.py | 137 | 1170 | #!/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.
"""
"""
import TestGyp
test = TestGyp.TestGyp()
test.run_gyp('build/all.gyp', chdir='src')
test.relocate('src', 'relocate/src')
test.bu... | apache-2.0 |
justinpotts/mozillians | vendor-local/lib/python/tablib/formats/_yaml.py | 6 | 1252 | # -*- coding: utf-8 -*-
""" Tablib - YAML Support.
"""
import sys
try:
import yaml
except ImportError:
if sys.version_info[0] > 2:
import tablib.packages.yaml3 as yaml
else:
import tablib.packages.yaml as yaml
import tablib
title = 'yaml'
extentions = ('yaml', 'yml')
def export_se... | bsd-3-clause |
fitoria/askbot-devel | askbot/deps/django_authopenid/mimeparse.py | 23 | 7745 | """MIME-Type Parser
This module provides basic functions for handling mime-types. It can handle
matching mime-types against a list of media-ranges. See section 14.1 of
the HTTP specification [RFC 2616] for a complete explaination.
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1
Contents:
- par... | gpl-3.0 |
sajadkk/odoo-addons | portal_procurement/portal_procurement.py | 1 | 3701 | # -*- coding: utf-8 -*-
from openerp import SUPERUSER_ID
from openerp.osv import osv, fields
import openerp.addons.decimal_precision as dp
from openerp.tools.translate import _
class ProcurementOrder(osv.Model):
_inherit = "procurement.order"
def create(self, cr, user, vals, context=None):
if contex... | agpl-3.0 |
Ghostkeeper/Luna | luna/stream.py | 1 | 2727 | #!/usr/bin/env python
#-*- coding: utf-8 -*-
#This software is distributed under the Creative Commons license (CC0) version 1.0. A copy of this license should have been distributed with this software.
#The license can also be read online: <https://creativecommons.org/publicdomain/zero/1.0/>. If this online license dif... | cc0-1.0 |
wangyum/tensorflow | tensorflow/contrib/session_bundle/gc.py | 47 | 6397 | # 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 |
cfossace/test | crits/samples/handlers.py | 1 | 60996 | import copy
import json
import logging
import os
import pprint
import subprocess
import tempfile, shutil
import time
from bson.objectid import ObjectId
from django.core.mail import send_mail
from django.core.urlresolvers import reverse
from django.http import HttpResponse
from django.shortcuts import render_to_respons... | mit |
JurassicWordExcel/core | wizards/com/sun/star/wizards/fax/CallWizard.py | 4 | 3060 | #
# This file is part of the LibreOffice project.
#
# 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/.
#
# This file incorporates work covered by the following license noti... | mpl-2.0 |
ProfessionalIT/professionalit-webiste | sdk/google_appengine/google/appengine/ext/mapreduce/api/map_job/map_job_config.py | 10 | 6778 | #!/usr/bin/env python
#
# Copyright 2007 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 o... | lgpl-3.0 |
pilou-/ansible | lib/ansible/modules/cloud/digital_ocean/digital_ocean_tag.py | 54 | 6486 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: 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
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 |
unix1986/scons | engine/SCons/Tool/sunf90.py | 9 | 2127 | """SCons.Tool.sunf90
Tool-specific initialization for sunf90, the Sun Studio F90 compiler.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001 - 2014 The SCons Foundation
#
# Permission is... | mit |
ecoal95/servo | tests/wpt/update/tree.py | 20 | 7753 | # 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 https://mozilla.org/MPL/2.0/.
from distutils.spawn import find_executable
import re
import subprocess
import sys
import tempfile
from wptrunner impo... | mpl-2.0 |
sebrandon1/nova | nova/tests/unit/api/openstack/compute/test_availability_zone.py | 3 | 13714 | # Copyright 2012 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 by applicable law or agreed t... | apache-2.0 |
Bounti/avatar-python | avatar/tests/test_configuration.py | 1 | 3055 | from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from avatar.configuration.configurationFactory import ConfigurationFactory
from avatar.system impor... | apache-2.0 |
acq4/acq4 | acq4/devices/DAQGeneric/DOChannelTemplate.py | 3 | 5794 | # -*- coding: utf-8 -*-
from __future__ import print_function
# Form implementation generated from reading ui file 'DOChannelTemplate.ui'
#
# Created: Sun Feb 22 13:29:09 2015
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_... | mit |
santoshsahoo/filesync-server | src/backends/filesync/data/tests/test_services.py | 6 | 7010 | # Copyright 2008-2015 Canonical
#
# 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
# License, or (at your option) any later version.
#
# This program is distributed... | agpl-3.0 |
PourroyJean/performance_modelisation | script/data visualisation/venv/lib/python3.6/site-packages/pip/wheel.py | 338 | 32010 | """
Support for installing and building the "wheel" binary package format.
"""
from __future__ import absolute_import
import compileall
import csv
import errno
import functools
import hashlib
import logging
import os
import os.path
import re
import shutil
import stat
import sys
import tempfile
import warnings
from ba... | gpl-3.0 |
gustavo-guimaraes/siga | backend/appengine/lib/pip/_vendor/requests/packages/chardet/langhebrewmodel.py | 2763 | 11318 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Simon Montagu
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved... | mit |
fgesora/odoo | addons/account_analytic_plans/report/__init__.py | 445 | 1084 | # -*- 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 |
ingo-m/py_pRF_mapping | pyprf/analysis/model_creation_timecourses_par.py | 2 | 7380 | # -*- coding: utf-8 -*-
"""Parallelisation function for crt_prf_tcmdl."""
# Part of py_pRF_mapping library
# Copyright (C) 2016 Ingo Marquardt
#
# 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,... | gpl-3.0 |
RK905/pokedex-1 | pokedex/db/util.py | 4 | 3883 | """Helpers for common ways to work with pokedex queries
These include identifier- and name-based lookup, filtering out base forms
of pokemon, and filtering/ordering by name.
"""
from sqlalchemy.orm import aliased
from sqlalchemy.sql.expression import func
from sqlalchemy.sql.functions import coalesce
from sqlalchemy.... | mit |
chhao91/QGIS | python/ext-libs/jinja2/testsuite/__init__.py | 404 | 4641 | # -*- coding: utf-8 -*-
"""
jinja2.testsuite
~~~~~~~~~~~~~~~~
All the unittests of Jinja2. These tests can be executed by
either running run-tests.py using multiple Python versions at
the same time.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
i... | gpl-2.0 |
alangwansui/mtl_ordercenter | openerp/addons/l10n_in_hr_payroll/wizard/hr_yearly_salary_detail.py | 51 | 2418 | #-*- coding:utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011 OpenERP SA (<http://openerp.com>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under th... | agpl-3.0 |
rlizana/l10n-spain | l10n_es_aeat_mod340/__init__.py | 3 | 1249 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 20011 Ting (http://www.ting.es)
# Copyright (c) 2011-2013 Acysos S.L. (http://acysos.com)
# Ignacio Ibeas Izquierdo <ignacio@... | agpl-3.0 |
shakamunyi/neutron | neutron/plugins/ml2/drivers/arista/exceptions.py | 23 | 1036 | # Copyright (c) 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 agreed to ... | apache-2.0 |
benoitsteiner/tensorflow | tensorflow/contrib/keras/api/keras/callbacks/__init__.py | 30 | 1766 | # 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 |
MurpheyLab/trep | examples/dual_pendulums.py | 1 | 1282 | import trep
from trep import tx,ty,tz,rx,ry,rz
import time
import trep.visual as visual
dt = 0.01
tf = 10.0
def simulate_system(system):
# Now we'll extract the current configuration into a tuple to use as
# initial conditions for a variational integrator.
q0 = system.q
# Create and initialize the va... | gpl-3.0 |
crmccreary/openerp_server | openerp/service/netrpc_server.py | 14 | 6163 | # -*- coding: utf-8 -*-
#
# Copyright P. Christeas <p_christ@hol.gr> 2008,2009
# 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 Affero General Public License as
# published by the Free Software F... | agpl-3.0 |
berr/stagger | test/specs.py | 16 | 23395 | #!/usr/bin/env python3
#
# specs.py
# From the stagger project: http://code.google.com/p/stagger/
#
# Copyright (c) 2009-2011 Karoly Lorentey <karoly@lorentey.hu>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following con... | bsd-2-clause |
yoki/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/filesystem.py | 126 | 9517 | # 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, this list of conditions and the ... | bsd-3-clause |
RubenKelevra/rethinkdb | test/regression/issue_852.py | 36 | 3132 | #!/usr/bin/env python
# Copyright 2010-2014 RethinkDB, all rights reserved.
from __future__ import print_function
import sys, os, time
startTime = time.time()
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'common')))
import driver, rdb_workload_common, scenario_common, util... | agpl-3.0 |
AkademieOlympia/sympy | sympy/geometry/line3d.py | 55 | 40385 | """Line-like geometrical entities.
Contains
========
LinearEntity3D
Line3D
Ray3D
Segment3D
"""
from __future__ import division, print_function
from sympy.core import Dummy, S, nan
from sympy.functions.elementary.trigonometric import acos
from sympy.simplify.simplify import simplify
from sympy.solvers.solveset import... | bsd-3-clause |
windyuuy/opera | chromium/src/third_party/protobuf/python/google/protobuf/service.py | 590 | 9131 | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions o... | bsd-3-clause |
kfitzgerald/titcoin | contrib/pyminer/pyminer.py | 385 | 6434 | #!/usr/bin/python
#
# Copyright (c) 2011 The Bitcoin developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
import time
import json
import pprint
import hashlib
import struct
import re
import base64
import httplib
import... | mit |
Xperia-Nicki/android_platform_sony_nicki | external/webkit/LayoutTests/http/tests/websocket/tests/hybi/protocol-test_wsh.py | 108 | 1907 | # Copyright (C) 2009 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 ... | apache-2.0 |
VillageAlliance/django-cms | cms/forms/utils.py | 2 | 3495 | # -*- coding: utf-8 -*-
from cms.models import Page
from cms.models.titlemodels import Title
from cms.utils import i18n
from collections import defaultdict
from django.conf import settings
from django.contrib.sites.models import Site
from django.core.cache import cache
from django.db.models.signals import post_save, po... | bsd-3-clause |
pauloschilling/sentry | src/sentry/web/forms/invite_organization_member.py | 22 | 1583 | from __future__ import absolute_import
from django import forms
from django.db import transaction, IntegrityError
from sentry.models import (
AuditLogEntry, AuditLogEntryEvent, OrganizationMember,
OrganizationMemberType
)
class InviteOrganizationMemberForm(forms.ModelForm):
class Meta:
fields = ... | bsd-3-clause |
thatchristoph/namebench | namebench.py | 171 | 2390 | #!/usr/bin/env python
# Copyright 2009 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | apache-2.0 |
dmore70/nexus7-kernel | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py | 12980 | 5411 | # SchedGui.py - Python extension for perf script, basic GUI code for
# traces drawing and overview.
#
# Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com>
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
... | gpl-2.0 |
p0psicles/SickRage | lib/sqlalchemy/sql/expression.py | 78 | 5624 | # sql/expression.py
# Copyright (C) 2005-2014 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
"""Defines the public namespace for SQL expression constructs.
Prior to version 0.9... | gpl-3.0 |
gitromand/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/user_unittest.py | 124 | 7300 | # Copyright (C) 2010 Research in Motion Ltd. 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 conditio... | bsd-3-clause |
tomasreimers/tensorflow-emscripten | tensorflow/python/saved_model/tag_constants.py | 70 | 1120 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
IEMLdev/ieml-api | ieml/dictionary/script/script.py | 2 | 23759 | import itertools
import numpy as np
from ieml.exceptions import InvalidScriptCharacter, InvalidScript, IncompatiblesScriptsLayers, TooManySingularSequences
from ieml.commons import TreeStructure, DecoratedComponent
from ieml.constants import MAX_LAYER, MAX_SINGULAR_SEQUENCES, MAX_SIZE_HEADER, LAYER_MARKS, PRIMITIVES, ... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.