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 |
|---|---|---|---|---|---|
cp16net/virgo-base | deps/breakpad/src/testing/gtest/test/gtest_xml_outfiles_test.py | 718 | 5312 | #!/usr/bin/env python
#
# Copyright 2008, 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... | apache-2.0 |
AthinaB/synnefo | snf-cyclades-app/synnefo/api/versions.py | 9 | 3096 | # Copyright (C) 2010-2014 GRNET S.A.
#
# 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 program is distributed i... | gpl-3.0 |
openstack-infra/shade | shade/tests/functional/test_quotas.py | 1 | 3250 | # 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
# distributed under t... | apache-2.0 |
jtrag/namebench | libnamebench/selectors_test.py | 175 | 3406 | #!/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 |
bmazin/ARCONS-pipeline | examples/Pal2012-sdss/ConvolutionWithTemp.py | 1 | 3536 | import numpy as np
import matplotlib.pyplot as plt
from util import utils
import mpfit
import scipy.optimize as optimize
#This program slides a template across the data to try to improve the data quality. This convultion was not very successful. The program bins the data if neccessary so the template and data have the... | gpl-2.0 |
yzl0083/orange | Orange/OrangeWidgets/OWDlgs.py | 6 | 13862 | import os
from OWBaseWidget import *
import OWGUI
_have_qwt = True
try:
from PyQt4.Qwt5 import *
except ImportError:
_have_qwt = False
_have_gl = True
try:
from PyQt4.QtOpenGL import QGLWidget
except ImportError:
_have_gl = False
from PyQt4.QtGui import QGraphicsScene, QGraphicsView
from PyQt4.QtSvg ... | gpl-3.0 |
omegamoon/huawei-g300-u8815-msm7227a | tools/perf/scripts/python/netdev-times.py | 11271 | 15048 | # Display a process of packets and processed time.
# It helps us to investigate networking or network device.
#
# options
# tx: show only tx chart
# rx: show only rx chart
# dev=: show only thing related to specified device
# debug: work with debug mode. It shows buffer status.
import os
import sys
sys.path.append(os... | gpl-2.0 |
pasqualguerrero/django | tests/gis_tests/inspectapp/tests.py | 73 | 8305 | from __future__ import unicode_literals
import os
import re
from unittest import skipUnless
from django.contrib.gis.gdal import HAS_GDAL
from django.core.management import call_command
from django.db import connection, connections
from django.test import TestCase, skipUnlessDBFeature
from django.test.utils import mod... | bsd-3-clause |
aksareen/balrog | auslib/test/util/test_versions.py | 2 | 2530 | import unittest
from auslib.errors import BadDataError
from auslib.util.versions import MozillaVersion
class TestMozillaVersions(unittest.TestCase):
# This tests the new behaviour we've added for suffixes
def test_special_version(self):
version = MozillaVersion('3.6.3plugin1')
self.assertEqu... | mpl-2.0 |
omnirom/android_external_chromium-org | build/android/pylib/utils/flakiness_dashboard_results_uploader.py | 37 | 6629 | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Uploads the results to the flakiness dashboard server."""
# pylint: disable=E1002,R0201
import logging
import os
import shutil
import tempfile
import... | bsd-3-clause |
brennie/reviewboard | reviewboard/admin/siteconfig.py | 1 | 17799 | #
# reviewboard/admin/siteconfig.py -- Siteconfig definitions for the admin app
# in Review Board. This expands on
# djblets.siteconfig to let administrators
# configure special authentication and
# ... | mit |
kev169/theHarvester | discovery/DNS/Base.py | 24 | 11574 | """
$Id: Base.py,v 1.12.2.4 2007/05/22 20:28:31 customdesigned Exp $
This file is part of the pydns project.
Homepage: http://pydns.sourceforge.net
This code is covered by the standard Python License.
Base functionality. Request and Response classes, that sort of thing.
"""
import socket, string, types, time
im... | gpl-2.0 |
Arno-Nymous/pyload | module/plugins/hooks/MergeFiles.py | 5 | 2916 | # -*- coding: utf-8 -*-
from __future__ import with_statement
import os
import re
from ..internal.Addon import Addon
from ..internal.misc import fsjoin, threaded
class MergeFiles(Addon):
__name__ = "MergeFiles"
__type__ = "hook"
__version__ = "0.22"
__status__ = "testing"
__config__ = [("activ... | gpl-3.0 |
rooi/CouchPotatoServer | couchpotato/core/providers/torrent/torrentleech/main.py | 4 | 2976 | from bs4 import BeautifulSoup
from couchpotato.core.helpers.encoding import tryUrlencode
from couchpotato.core.helpers.variable import tryInt
from couchpotato.core.logger import CPLog
from couchpotato.core.providers.torrent.base import TorrentProvider
import traceback
log = CPLog(__name__)
class TorrentLeech(Torren... | gpl-3.0 |
OpringaoDoTurno/airflow | airflow/example_dags/example_branch_python_dop_operator_3.py | 44 | 1672 | # -*- 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 |
spallavolu/scikit-learn | examples/cluster/plot_dict_face_patches.py | 337 | 2747 | """
Online learning of a dictionary of parts of faces
==================================================
This example uses a large dataset of faces to learn a set of 20 x 20
images patches that constitute faces.
From the programming standpoint, it is interesting because it shows how
to use the online API of the sciki... | bsd-3-clause |
openhatch/oh-mainline | mysite/missions/models.py | 13 | 1422 | # This file is part of OpenHatch.
# Copyright (C) 2010 John Stumpo
#
# 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 versi... | agpl-3.0 |
Chumbak/RetailstoreTV-Content-Player | django_project/store_cms/manage.py | 1 | 1535 | #!/usr/bin/env python
import os
import sys
import re
def read_env():
"""Pulled from Honcho code with minor updates, reads local default
environment variables from a .env file located in the project root
directory.
"""
try:
with open(os.path.dirname(os.path.abspath(__file__)) + '/settings/.... | apache-2.0 |
grigorisg9gr/menpo | menpo/transform/groupalign/base.py | 5 | 1151 |
class MultipleAlignment(object):
r"""
Abstract base class for aligning multiple `source` shapes to a `target`
shape.
Parameters
----------
sources : `list` of :map:`PointCloud`
List of pointclouds to be aligned.
target : :map:`PointCloud`, optional
The target :map:`PointCl... | bsd-3-clause |
alonbl/otopi | src/plugins/otopi/core/transaction.py | 1 | 3593 | #
# otopi -- plugable installer
# Copyright (C) 2012-2013 Red Hat, Inc.
#
# 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 late... | lgpl-2.1 |
Tomtomgo/phantomjs | src/qt/qtwebkit/Tools/TestResultServer/model/jsonresults_unittest.py | 120 | 28576 | # 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 |
hiropppe/RocAlphaGo | AlphaGo/ai.py | 3 | 6249 | """Policy players"""
import numpy as np
from AlphaGo import go
from AlphaGo import mcts
from operator import itemgetter
class GreedyPolicyPlayer(object):
"""A player that uses a greedy policy (i.e. chooses the highest probability
move each turn)
"""
def __init__(self, policy_function, pass_when_of... | mit |
LarsSchy/SMAC-M | chart-installation/generate_map_files/scripts/instructions.py | 1 | 8002 | # This file is kept only for backwards compatibility. Edit the one in ../mapgen
import re
import warnings
class NotImplementedWarning(UserWarning):
pass
pattern = re.compile(r'^([^(]+)\((.+?)\)?$', re.DOTALL)
def get_command(instruction):
match = pattern.match(instruction)
if match is None:
co... | mit |
marcus67/rechtschreibung | rulesets.py | 1 | 12304 | # coding: utf-8
# This file is part of https://github.com/marcus67/rechtschreibung
import six
import spelling_mode
from rule_decorator import *
if six.PY3:
from importlib import reload
reload(spelling_mode)
from spelling_mode import *
global default_mode
def set_default_mode(mymode):
global default_mode
def... | gpl-2.0 |
JeroenZegers/Nabu-MSSS | nabu/postprocessing/postprocessors/ivector_extractor_matlab.py | 1 | 1869 | """@file ivector_extractor.py
contains the IvectorExtractor class"""
import os
import numpy as np
import postprocessor
from nabu.processing.feature_computers import feature_computer_factory
import matlab.engine
import matlab
class IvectorExtractor(postprocessor.Postprocessor):
"""the ivector extractor class
a ivect... | mit |
v0lk3r/ansible-modules-core | cloud/rackspace/rax_keypair.py | 157 | 4957 | #!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed... | gpl-3.0 |
wangyj1/depdep | lib/nmap.py | 8 | 2133 | try:
import sys
import re
import os
import tempfile
import subprocess
except ImportError,e:
import sys
sys.stdout.write("%s\n" %e)
sys.exit(1)
class Nmap:
"""
Nmap operations ...
"""
def __init__(self, nmap_path):
"""
init functions and variables ...
"""
... | mit |
thedemz/python-gems | modules/pycrypto-2.6.1/lib/Crypto/SelfTest/Cipher/__init__.py | 117 | 2401 | # -*- coding: utf-8 -*-
#
# SelfTest/Cipher/__init__.py: Self-test for cipher modules
#
# Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net>
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication ... | mit |
codesparkle/youtube-dl | youtube_dl/extractor/vier.py | 8 | 4199 | # coding: utf-8
from __future__ import unicode_literals
import re
import itertools
from .common import InfoExtractor
class VierIE(InfoExtractor):
IE_NAME = 'vier'
_VALID_URL = r'https?://(?:www\.)?vier\.be/(?:[^/]+/videos/(?P<display_id>[^/]+)(?:/(?P<id>\d+))?|video/v3/embed/(?P<embed_id>\d+))'
_TESTS =... | unlicense |
blockbomb/plover | plover/test_steno_dictionary.py | 8 | 2811 | # Copyright (c) 2013 Hesky Fisher
# See LICENSE.txt for details.
"""Unit tests for steno_dictionary.py."""
import unittest
from steno_dictionary import StenoDictionary, StenoDictionaryCollection
class StenoDictionaryTestCase(unittest.TestCase):
def test_dictionary(self):
notifications = []
def l... | gpl-2.0 |
aprefontaine/TMScheduler | tests/not_return_sets.py | 107 | 4276 | from .testmodels import FieldsWithOptionsModel, OrderedModel, SelfReferenceModel
import datetime
from django.test import TestCase
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned
class NonReturnSetsTest(TestCase):
floats = [5.3, 2.6, 9.1, 1.58, 2.4]
emails = ['app-engine@scholard... | bsd-3-clause |
bbci/wyrm | test/test_jumping_means.py | 2 | 3215 | from __future__ import division
import unittest
import numpy as np
from wyrm.types import Data
from wyrm.processing import jumping_means
from wyrm.processing import swapaxes
class TestJumpingMeans(unittest.TestCase):
def setUp(self):
ones = np.ones((10, 5))
# cnt with 1, 2, 3
cnt = np.... | mit |
tuanvu216/udacity-course | designing-restful-apis/Lesson_4/07_Implementing Token-Based Authentication in Flask/views.py | 2 | 2441 | from models import Base, User
from flask import Flask, jsonify, request, url_for, abort, g
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship, sessionmaker
from sqlalchemy import create_engine
from flask.ext.httpauth import HTTPBasicAuth
auth = HTTPBasicAuth()
engine = cr... | mit |
freshs/freshs | server/modules/spres/configpoints_spres_multDB.py | 1 | 12051 | # -*- coding: utf-8 -*-
# Copyright (c) 2013 Kai Kratzer, Universität Stuttgart, ICP,
# Allmandring 3, 70569 Stuttgart, Germany; all rights
# reserved unless otherwise stated.
#
# 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 |
TRESCLOUD/odoo | history/migrate/3.4.0-4.0.0/post.py | 52 | 4898 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... | agpl-3.0 |
amohanta/miasm | test/ir/analysis.py | 5 | 23660 | """ Test cases for dead code elimination"""
from miasm2.expression.expression import ExprId, ExprInt32, ExprAff, ExprMem
from miasm2.core.asmbloc import asm_label
from miasm2.ir.analysis import ira
from miasm2.ir.ir import ir, irbloc
a = ExprId("a")
b = ExprId("b")
c = ExprId("c")
d = ExprId("d")
r = ExprId("r")
a_in... | gpl-2.0 |
streamlio/heron | heron/api/src/python/state/state.py | 2 | 1943 | # Copyright 2016 Twitter. 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 |
pascalchevrel/bedrock | bedrock/security/tests/test_utils.py | 9 | 10665 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from datetime import date
from textwrap import dedent
from io import StringIO
import pytest
from mock import patch, call... | mpl-2.0 |
Lujeni/ansible | lib/ansible/modules/network/aci/mso_schema_template_l3out.py | 13 | 6339 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.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 |
nshafer/django-hashid-field | tests/test_rest_framework.py | 1 | 4120 | from unittest import skipUnless
from django.core import exceptions
from django.test import TestCase
from tests.models import Artist, Track
import hashids
try:
from rest_framework import serializers
from rest_framework.renderers import JSONRenderer
from hashid_field.rest import UnconfiguredHashidSerialFie... | mit |
samthor/intellij-community | plugins/hg4idea/testData/bin/hgext/churn.py | 90 | 6836 | # churn.py - create a graph of revisions count grouped by template
#
# Copyright 2006 Josef "Jeff" Sipek <jeffpc@josefsipek.net>
# Copyright 2008 Alexander Solovyov <piranha@piranha.org.ua>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later ve... | apache-2.0 |
samstav/satori | tools/install_venv_common.py | 31 | 6003 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack Foundation
# 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.a... | apache-2.0 |
AlexeyKruglov/Skeinforge-fabmetheus | fabmetheus_utilities/intercircle.py | 8 | 30760 | """
Intercircle is a collection of utilities for intersecting circles, used to get smooth loops around a collection of points and inset & outset loops.
"""
from __future__ import absolute_import
try:
import psyco
psyco.full()
except:
pass
#Init has to be imported first because it has code to workaround the python ... | agpl-3.0 |
Crossway/django-zesty-metrics | zesty_metrics/views.py | 1 | 4287 | # -*- coding: utf-8 -*-
import time
import json
from django.http import HttpResponse
from django.views.generic import View
from django.views.generic.edit import ProcessFormView, FormMixin
from django.forms import Form
from django.core.cache import cache
import statsd
from . import conf
from . import forms
from . impo... | bsd-3-clause |
hsluo/youtube-dl | youtube_dl/extractor/franceculture.py | 116 | 2574 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..compat import (
compat_urlparse,
)
from ..utils import (
determine_ext,
int_or_none,
)
class FranceCultureIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?franceculture\.fr/player/reecouter\?play=(?P<... | unlicense |
rholy/dnf-stack-ci | dnf-behave-tests/dnf/steps/module.py | 3 | 4412 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
import behave
import glob
import os
try:
from configparser import ConfigParser
except ImportError:
from ConfigParser import ConfigParser
from common.lib.behave_ext import check_context_table
from lib.dnf imp... | gpl-2.0 |
Medigate/cutiuta-server | cutiuta-server/env/lib/python3.4/site-packages/django/core/management/commands/dbshell.py | 174 | 1240 | from django.core.management.base import BaseCommand, CommandError
from django.db import DEFAULT_DB_ALIAS, connections
class Command(BaseCommand):
help = (
"Runs the command-line client for specified database, or the "
"default database if none is provided."
)
requires_system_checks = Fals... | gpl-3.0 |
nharraud/b2share | invenio/modules/cloudconnector/utils.py | 12 | 4432 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2014, 2015 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any... | gpl-2.0 |
klahnakoski/Bugzilla-ETL | vendor/mo_collections/persistent_queue.py | 2 | 7623 | # encoding: utf-8
#
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Author: Kyle Lahnakoski (kyle@lahnakoski.com)
#
from __future__ import absolute_import
from __... | mpl-2.0 |
kike28XD/twofor | funciones/facebook.py | 1 | 6546 | #!usr/bin/python
#coding: utf-8
from options import opciones
import os, mechanize, random, sys
from terminaltables import DoubleTable
#--------------------------------------------------------------------#
# Este archivo hace parte de twofor. #
# Twofor es un software libre: Puedes redistribuirlo y/o modifica... | gpl-3.0 |
CloudWareChile/OpenChile | openerp/addons/crm_profiling/wizard/__init__.py | 438 | 1080 | # -*- 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 |
sassoftware/saspy | saspy/sas_magic.py | 1 | 7181 | #
# Copyright SAS Institute
#
# 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 |
olasitarska/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 |
AntonioMtn/NZBMegaSearch | DeepsearchModule.py | 1 | 18906 | # # ## # ## # ## # ## # ## # ## # ## # ## # ## # ## # ## # ## # ## # ## #
#~ This file is part of NZBmegasearch by 0byte.
#~
#~ NZBmegasearch 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 |
wangxuan007/flasky | venv/lib/python2.7/site-packages/sqlalchemy/util/deprecations.py | 55 | 4403 | # util/deprecations.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
"""Helpers related to deprecation of functions, methods, classes, other
functio... | gpl-3.0 |
Vassy/odoo | addons/crm_partner_assign/crm_partner_assign.py | 16 | 11290 | # -*- 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 |
coolyangzc/ucore_os_lab | related_info/ostep/ostep2-segmentation.py | 54 | 6613 | #! /usr/bin/env python
import sys
from optparse import OptionParser
import random
import math
def convert(size):
length = len(size)
lastchar = size[length-1]
if (lastchar == 'k') or (lastchar == 'K'):
m = 1024
nsize = int(size[0:length-1]) * m
elif (lastchar == 'm') or (lastchar == 'M'... | gpl-2.0 |
gnowledge/OTM2 | opentreemap/otm_comments/views.py | 3 | 7823 | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from functools import partial
from django.core.paginator import Paginator, EmptyPage
from django.db import transaction
from django.core.urlresolvers import reverse
from django_tinsel.... | gpl-3.0 |
acshan/odoo | addons/mass_mailing/wizard/mail_compose_message.py | 308 | 3066 | # -*- coding: utf-8 -*-
from openerp.osv import osv, fields
class MailComposeMessage(osv.TransientModel):
"""Add concept of mass mailing campaign to the mail.compose.message wizard
"""
_inherit = 'mail.compose.message'
_columns = {
'mass_mailing_campaign_id': fields.many2one(
'ma... | agpl-3.0 |
oposs/check_mk_mirror | web/plugins/views/sorters.py | 1 | 18464 | #!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
# | | | | '_ \ / _ \/ __| |/ /... | gpl-2.0 |
adamtiger/tensorflow | tensorflow/python/training/server_lib_same_variables_clear_container_test.py | 134 | 3129 | # 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 |
shrimpboyho/git.js | emscript/python/2.7.5.1_32bit/Lib/string.py | 81 | 20756 | """A collection of string operations (most are no longer used).
Warning: most of the code you see here isn't normally used nowadays.
Beginning with Python 1.6, many of these functions are implemented as
methods on the standard string object. They used to be implemented by
a built-in module called strop, but strop is n... | gpl-2.0 |
robionica/b3 | src/main/python/b3/steps/cc_binary_step.py | 1 | 1992 | # http://www.bionicbunny.org/
#
# Copyright (c) 2014 Oleksandr Sviridenko
#
# 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 requi... | apache-2.0 |
jaubut/maman_web | node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py | 1355 | 44604 | # Copyright (c) 2013 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.
"""cmake output module
This module is under development and should be considered experimental.
This module produces cmake (2.8.8+) input as its output. One CMake... | mit |
moonbury/pythonanywhere | MasteringMLWithScikit-learn/8365OS_07_Codes/adult-data-plot.py | 3 | 1277 | import matplotlib
matplotlib.use('Qt4Agg')
import numpy as np
import matplotlib.pyplot as plt
from sklearn.decomposition import PCA
from sklearn import datasets
import pandas as pd
from sklearn.feature_extraction import DictVectorizer
df = pd.read_csv('data/adult.data', header=None)
y = df[14]
X = df[range(0, 14)]
d... | gpl-3.0 |
ccoss/fas | fas/tgcaptcha2/model.py | 2 | 2054 | from datetime import datetime
import calendar
import cPickle
class Captcha(object):
"""Pertinent data about a Captcha.
Exposed properties are:
plaintext: (read/write) a string representing the text of the captcha
(i.e. what is it supposed to say)
created: (read only) the UTC date ... | gpl-2.0 |
fchu/hadoop-0.20.205 | contrib/hod/support/logcondense.py | 3 | 7109 | #!/bin/sh
#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 ... | apache-2.0 |
DavidLP/home-assistant | homeassistant/components/climate/reproduce_state.py | 10 | 3123 | """Module that groups code required to handle state restore for component."""
import asyncio
from typing import Iterable, Optional
from homeassistant.const import (
ATTR_TEMPERATURE, SERVICE_TURN_OFF,
SERVICE_TURN_ON, STATE_OFF, STATE_ON)
from homeassistant.core import Context, State
from homeassistant.helpers... | apache-2.0 |
PetePriority/home-assistant | setup.py | 1 | 2240 | #!/usr/bin/env python3
"""Home Assistant setup script."""
from datetime import datetime as dt
from setuptools import setup, find_packages
import homeassistant.const as hass_const
PROJECT_NAME = 'Home Assistant'
PROJECT_PACKAGE_NAME = 'homeassistant'
PROJECT_LICENSE = 'Apache License 2.0'
PROJECT_AUTHOR = 'The Home As... | apache-2.0 |
brokenjacobs/ansible | lib/ansible/plugins/action/junos_template.py | 25 | 4215 | #
# (c) 2017 Red Hat, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is ... | gpl-3.0 |
shawnsi/ansible-modules-core | network/openswitch/ops_config.py | 14 | 7947 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | gpl-3.0 |
fbradyirl/home-assistant | tests/components/hassio/test_init.py | 4 | 12404 | """The tests for the hassio component."""
import asyncio
import os
from unittest.mock import patch, Mock
import pytest
from homeassistant.auth.const import GROUP_ID_ADMIN
from homeassistant.setup import async_setup_component
from homeassistant.components.hassio import STORAGE_KEY
from homeassistant.components import ... | apache-2.0 |
fin-ger/color-harmonization | color_harmonization/gui/gl_image.py | 1 | 1417 | '''
Copyright (C) 2016 David Bögelsack, Fin Christensen
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 distr... | gpl-2.0 |
jiajiax/crosswalk-test-suite | webapi/tct-csp-w3c-tests/csp-py/csp_child-src_cross-origin_blocked-manual.py | 25 | 2612 | def main(request, response):
response.headers.set(
"Content-Security-Policy",
"child-src http://www.w3c.com")
response.headers.set(
"X-Content-Security-Policy",
"child-src http://www.w3c.com")
response.headers.set("X-WebKit-CSP", "child-src http://www.w3c.com")
return """... | bsd-3-clause |
linjoahow/2015cdaa-w11 | static/Brython3.1.0-20150301-090019/Lib/_io.py | 629 | 72610 | """
Python implementation of the io module.
"""
import os
import abc
import codecs
import errno
# Import _thread instead of threading to reduce startup cost
try:
from _thread import allocate_lock as Lock
except ImportError:
from _dummy_thread import allocate_lock as Lock
import io
#brython fix me
#from io imp... | gpl-3.0 |
gpkulkarni/linux-arm64 | tools/perf/scripts/python/call-graph-from-postgresql.py | 758 | 11125 | #!/usr/bin/python2
# call-graph-from-postgresql.py: create call-graph from postgresql database
# Copyright (c) 2014, Intel Corporation.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free So... | gpl-2.0 |
valexandersaulys/prudential_insurance_kaggle | venv/lib/python2.7/site-packages/scipy/interpolate/rbf.py | 3 | 9379 | """rbf - Radial basis functions for interpolation/smoothing scattered Nd data.
Written by John Travers <jtravs@gmail.com>, February 2007
Based closely on Matlab code by Alex Chirokov
Additional, large, improvements by Robert Hetland
Some additional alterations by Travis Oliphant
Permission to use, modify, and distrib... | gpl-2.0 |
inspirehep/refextract | tests/test_engine.py | 1 | 19496 | # -*- coding: utf-8 -*-
#
# This file is part of refextract
# Copyright (C) 2016, 2017, 2018, 2020 CERN.
#
# refextract 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... | gpl-2.0 |
olsonse/linuxcnc | src/emc/usr_intf/axis/scripts/axis.py | 2 | 142944 | #!/usr/bin/env python2
# This is a component of AXIS, a front-end for LinuxCNC
# Copyright 2004, 2005, 2006, 2007, 2008, 2009
# Jeff Epler <jepler@unpythonic.net> and Chris Radek <chris@timeguy.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU G... | gpl-2.0 |
donutmonger/youtube-dl | youtube_dl/extractor/common.py | 7 | 50001 | from __future__ import unicode_literals
import base64
import datetime
import hashlib
import json
import netrc
import os
import re
import socket
import sys
import time
import xml.etree.ElementTree
from ..compat import (
compat_cookiejar,
compat_cookies,
compat_HTTPError,
compat_http_client,
compat_... | unlicense |
elssar/calibre | src/calibre/gui2/convert/gui_conversion.py | 24 | 2612 | # -*- coding: utf-8 -*-
__license__ = 'GPL 3'
__copyright__ = '2009, John Schember <john@nachtimwald.com>'
__docformat__ = 'restructuredtext en'
from optparse import OptionParser
from calibre.customize.conversion import OptionRecommendation, DummyReporter
from calibre.ebooks.conversion.plumber import Plumber
from ca... | gpl-3.0 |
groschovskiy/personfinder | app/unidecode/x080.py | 252 | 4651 | data = (
'Yao ', # 0x00
'Lao ', # 0x01
'[?] ', # 0x02
'Kao ', # 0x03
'Mao ', # 0x04
'Zhe ', # 0x05
'Qi ', # 0x06
'Gou ', # 0x07
'Gou ', # 0x08
'Gou ', # 0x09
'Die ', # 0x0a
'Die ', # 0x0b
'Er ', # 0x0c
'Shua ', # 0x0d
'Ruan ', # 0x0e
'Er ', # 0x0f
'Nai ', # 0x10
'Zhuan... | apache-2.0 |
Hakuba/youtube-dl | youtube_dl/extractor/vuclip.py | 115 | 2708 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import (
compat_urllib_parse_urlparse,
)
from ..utils import (
ExtractorError,
parse_duration,
qualities,
)
class VuClipIE(InfoExtractor):
_VALID_URL = r'http://(?:m\.)?vuclip\.com/w\?.*?cid=(?P<id>... | unlicense |
p0psicles/SickGear | lib/unidecode/x0fd.py | 252 | 3764 | data = (
'', # 0x00
'', # 0x01
'', # 0x02
'', # 0x03
'', # 0x04
'', # 0x05
'', # 0x06
'', # 0x07
'', # 0x08
'', # 0x09
'', # 0x0a
'', # 0x0b
'', # 0x0c
'', # 0x0d
'', # 0x0e
'', # 0x0f
'', # 0x10
'', # 0x11
'', # 0x12
'', # 0x13
'', # 0x14
'', # 0x15
'',... | gpl-3.0 |
nithinmurali/robocomp | tools/rcmonitor/examples/rgbd.py | 2 | 3024 | # -*- coding: utf-8 -*-
# Copyright (C) 2010 by RoboLab - University of Extremadura
#
# This file is part of RoboComp
#
# RoboComp 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 |
PyCon/pycon | symposion/proposals/urls.py | 1 | 1154 | from django.conf.urls import patterns, url
urlpatterns = patterns("symposion.proposals.views",
url(r"^submit/$", "proposal_submit", name="proposal_submit"),
url(r"^submit/([\w-]+)/$", "proposal_submit_kind", name="proposal_submit_kind"),
url(r"^(\d+)/$", "proposal_detail", name="proposal_detail"),
url... | bsd-3-clause |
tungvx/deploy | .google_appengine/lib/django_1_2/django/contrib/localflavor/is_/is_postalcodes.py | 438 | 4913 | # -*- coding: utf-8 -*-
IS_POSTALCODES = (
('101', u'101 Reykjavík'),
('103', u'103 Reykjavík'),
('104', u'104 Reykjavík'),
('105', u'105 Reykjavík'),
('107', u'107 Reykjavík'),
('108', u'108 Reykjavík'),
('109', u'109 Reykjavík'),
('110', u'110 Reykjavík'),
('111', u'111 Reykjavík'... | apache-2.0 |
alubbock/pysb | ez_setup.py | 17 | 11434 | #!/usr/bin/env python
"""
Setuptools bootstrapping installer.
Run this script to install or upgrade setuptools.
"""
import os
import shutil
import sys
import tempfile
import zipfile
import optparse
import subprocess
import platform
import textwrap
import contextlib
import warnings
from distutils import log
try:
... | bsd-2-clause |
joshisa/taiga-back | taiga/projects/history/permissions.py | 21 | 2874 | # Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán <bameda@dbarragan.com>
# 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 F... | agpl-3.0 |
vcgato29/linux | Documentation/target/tcm_mod_builder.py | 337 | 24391 | #!/usr/bin/python
# The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD
#
# Copyright (c) 2010 Rising Tide Systems
# Copyright (c) 2010 Linux-iSCSI.org
#
# Author: nab@kernel.org
#
import os, sys
import subprocess as sub
import string
import re
import optparse
tcm_dir = ""
fabric_ops... | gpl-2.0 |
yyjiang/scikit-learn | sklearn/neighbors/graph.py | 208 | 7031 | """Nearest Neighbors graph functions"""
# Author: Jake Vanderplas <vanderplas@astro.washington.edu>
#
# License: BSD 3 clause (C) INRIA, University of Amsterdam
import warnings
from .base import KNeighborsMixin, RadiusNeighborsMixin
from .unsupervised import NearestNeighbors
def _check_params(X, metric, p, metric_... | bsd-3-clause |
yotchang4s/cafebabepy | src/main/python/test/test_importlib/extension/test_case_sensitivity.py | 8 | 1573 | from importlib import _bootstrap_external
from test import support
import unittest
from .. import util
importlib = util.import_importlib('importlib')
machinery = util.import_importlib('importlib.machinery')
@unittest.skipIf(util.EXTENSIONS.filename is None, '_testcapi not available')
@util.case_insensitive_tests
cl... | bsd-3-clause |
moreymat/attelo | attelo/tests.py | 2 | 9695 | """
attelo tests
"""
# pylint: disable=too-few-public-methods, no-self-use, no-member
# no-member: numpy
from __future__ import print_function
import unittest
import scipy.sparse
import numpy
import numpy as np
import attelo
import attelo.fold
from .edu import EDU, FAKE_ROOT
from .fold import select_training
from ... | gpl-3.0 |
jemmyw/ansible | lib/ansible/playbook/handler.py | 237 | 1957 | # (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 |
3v1n0/snapcraft | integration_tests/test_nil_plugin.py | 4 | 1416 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2015 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the h... | gpl-3.0 |
snahelou/awx | awx/main/tests/unit/utils/test_named_url_graph.py | 1 | 17176 | # -*- coding: utf-8 -*-
import pytest
import mock
import random
from django.db import models
from django.contrib.contenttypes.models import ContentType
from awx.main.utils.named_url_graph import generate_graph
from awx.main.models.base import CommonModel, CommonModelNameNotUnique
@pytest.fixture
def common_model_cl... | apache-2.0 |
aaronknister/linux-stable | tools/perf/scripts/python/export-to-postgresql.py | 238 | 25591 | # export-to-postgresql.py: export perf data to a postgresql database
# Copyright (c) 2014, Intel Corporation.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# Thi... | gpl-2.0 |
evaschalde/odoo | addons/portal_sale/portal_sale.py | 288 | 8177 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2012 OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... | agpl-3.0 |
shonenada/shadowsocks | shadowsocks/common.py | 945 | 8921 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2013-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 requi... | apache-2.0 |
ttm/pyo | externals/external-template.py | 12 | 3847 | # minimal imports.
# _core contains PyoObject, Mix, Dummy and some utility functions.
# _maps contains all SLMap objects used to set up slider controls.
from pyolib._core import *
from pyolib._maps import *
# Objects generating vectors of samples must inherit from PyoObject.
# Always provide a __doc__ string with the ... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.