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 |
|---|---|---|---|---|---|
kennedyshead/home-assistant | tests/components/stream/conftest.py | 5 | 2030 | """Test fixtures for the stream component.
The tests encode stream (as an h264 video), then load the stream and verify
that it is decoded properly. The background worker thread responsible for
decoding will decode the stream as fast as possible, and when completed
clears all output buffers. This can be a problem for t... | apache-2.0 |
viger/docker | proxy/proxy/code/default/python27/1.0/lib/noarch/pyasn1/type/univ.py | 8 | 39459 | # ASN.1 "universal" data types
import operator, sys
from pyasn1.type import base, tag, constraint, namedtype, namedval, tagmap
from pyasn1.codec.ber import eoo
from pyasn1.compat import octets
from pyasn1 import error
# "Simple" ASN.1 types (yet incomplete)
class Integer(base.AbstractSimpleAsn1Item):
tagSet = bas... | mit |
blakfeld/ansible | test/units/module_utils/test_database.py | 325 | 5737 | import collections
import mock
import os
import re
from nose.tools import eq_
try:
from nose.tools import assert_raises_regexp
except ImportError:
# Python < 2.7
def assert_raises_regexp(expected, regexp, callable, *a, **kw):
try:
callable(*a, **kw)
except expected as e:
... | gpl-3.0 |
uclouvain/OSIS-Louvain | base/migrations/0373_message_template_egys_automatic_postponement_update.py | 2 | 8123 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-10-31 13:01
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('base', '0372_auto_20181017_1601'),
]
operations = [
migrations.RunSQL(
... | agpl-3.0 |
jorgenschaefer/healthmonitor | features/test_0001_login.py | 1 | 2211 | from features.support import SeleniumTestCase
from django.contrib.auth.models import User
# As an unauthenticated user
# I want to be able to log in
# In order to use the features of the site
class Test0001(SeleniumTestCase):
def test_login_prompt(self):
# Given an unauthenticated user
# When I ... | agpl-3.0 |
bhmm/bhmm-force-spectroscopy-manuscript | bhmm/msm/tmatrix_disconnected.py | 4 | 2267 | __author__ = 'noe'
import numpy as np
def estimate_P(C, reversible = True, fixed_statdist=None):
# import emma
import pyemma.msm.estimation as msmest
# output matrix. Initially eye
n = np.shape(C)[0]
P = np.eye((n), dtype=np.float64)
# treat each connected set separately
S = msmest.connect... | lgpl-3.0 |
brandond/ansible | lib/ansible/modules/remote_management/hpilo/hponcfg.py | 150 | 2984 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Dag Wieers <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_version': '1.1',
... | gpl-3.0 |
cindyker/p2pool | nattraverso/pynupnp/soap.py | 288 | 3547 | """
This module is a SOAP client using twisted's deferreds.
It uses the SOAPpy package.
@author: Raphael Slinckx
@copyright: Copyright 2005
@license: LGPL
@contact: U{raphael@slinckx.net<mailto:raphael@slinckx.net>}
@version: 0.1.0
"""
__revision__ = "$id"
import SOAPpy, logging
from SOAPpy.Config import Config
from... | gpl-3.0 |
wistoch/meego-app-browser | tools/grit/grit/format/policy_templates/writers/doc_writer_unittest.py | 3 | 16458 | # Copyright (c) 2011 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.
'''Unit tests for grit.format.policy_templates.writers.doc_writer'''
import os
import re
import sys
if __name__ == '__main__':
sys.path.append(os.pat... | bsd-3-clause |
mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/tool_shed/util/tool_dependency_util.py | 1 | 25596 | import logging
import os
import shutil
from galaxy import util
from galaxy.model.orm import and_
from galaxy.web.form_builder import SelectField
from tool_shed.util import hg_util
from tool_shed.util import xml_util
log = logging.getLogger( __name__ )
def build_tool_dependencies_select_field( app, tool_shed_reposit... | gpl-3.0 |
ghtmtt/QGIS | tests/src/python/test_qgslayoutexporter.py | 26 | 47796 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsLayoutExporter
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
"""
... | gpl-2.0 |
fdvarela/odoo8 | addons/fleet/fleet.py | 18 | 46292 | # -*- 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 |
amanabt/DG_Maxwell | dg_maxwell/tests/utils/test_utils.py | 1 | 1980 | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
import numpy as np
import arrayfire as af
from dg_maxwell import params
from dg_maxwell import utils
from dg_maxwell import lagrange
af.set_backend('cpu')
af.set_device(0)
def test_matmul_3D():
'''
'''
M = 3
N = 2
P = 4
Q = 2
a = af.range(... | gpl-3.0 |
tensorflow/moonlight | moonlight/vision/hough.py | 1 | 5557 | # Copyright 2018 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 |
zombo/p2pool | SOAPpy/NS.py | 289 | 3724 | from __future__ import nested_scopes
"""
################################################################################
#
# SOAPpy - Cayce Ullman (cayce@actzero.com)
# Brian Matthews (blm@actzero.com)
# Gregory Warnes (Gregory.R.Warnes@Pfizer.com)
# Christopher Blunck (blunck... | gpl-3.0 |
rpalmite/webutilitykit | build.py | 2 | 4918 | #!/usr/bin/python
from subprocess import call
import os
import argparse
import subprocess
import sys
parser = argparse.ArgumentParser()
parser.add_argument("-se", "--setup", help="setup a new server", action="store_true")
parser.add_argument("-p", "--project", help="specify only a specific project")
parser.add_argume... | bsd-2-clause |
qmagico/sampleappqm | src/django/contrib/gis/geos/geometry.py | 76 | 24261 | """
This module contains the 'base' GEOSGeometry object -- all GEOS Geometries
inherit from this object.
"""
# Python, ctypes and types dependencies.
import warnings
from ctypes import addressof, byref, c_double
# super-class for mutable list behavior
from django.contrib.gis.geos.mutable_list import ListMixin
# GEO... | mit |
Sparrho/bungiesearch | tests/core/models.py | 2 | 1996 | from django.db import models
from bungiesearch.managers import BungiesearchManager
class Article(models.Model):
title = models.TextField(db_index=True)
authors = models.TextField(blank=True)
description = models.TextField(blank=True)
text_field = models.TextField(null=True)
link = models.URLField... | bsd-3-clause |
tronlogistics/micro | flask/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/big5prober.py | 2931 | 1684 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | bsd-3-clause |
kvaps/vdsm | lib/vdsm/tool/configurators/multipath.py | 1 | 5944 | # Copyright 2014 Red Hat, Inc.
#
# 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 distributed in the ... | gpl-2.0 |
antonve/s4-project-mooc | common/lib/symmath/symmath/symmath_check.py | 36 | 12584 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# File: symmath_check.py
# Date: 02-May-12 (creation)
#
# Symbolic mathematical expression checker for edX. Uses sympy to check for expression equality.
#
# Takes in math expressions given as Presentation MathML (from ASCIIMathML), converts to Content MathML using Snuggl... | agpl-3.0 |
angryrancor/kivy | kivy/core/video/video_ffpyplayer.py | 26 | 10674 | '''
FFmpeg based video abstraction
==============================
To use, you need to install ffpyplyaer and have a compiled ffmpeg shared
library.
https://github.com/matham/ffpyplayer
The docs there describe how to set this up. But briefly, first you need to
compile ffmpeg using the shared flags while disabling... | mit |
2014cdag4/2014cdag4 | wsgi/programs/cdag8/__init__.py | 10 | 32129 | import cherrypy
# 這是 CDAG8 類別的定義
class CDAG8(object):
# 各組利用 index 引導隨後的程式執行
@cherrypy.expose
def index(self, *args, **kwargs):
outstring = '''
這是 2014CDA 協同專案下的 cdag8 分組程式開發網頁, 以下為 W12 的任務執行內容.<br />
<!-- 這裡採用相對連結, 而非網址的絕對連結 (這一段為 html 註解) -->
<a href="cube1">cdag8 正方體參數繪圖</a>(尺寸變數 a, b, c)<br /><... | gpl-2.0 |
Swapnil133609/Zeus_exp | Documentation/networking/cxacru-cf.py | 14668 | 1626 | #!/usr/bin/env python
# Copyright 2009 Simon Arlott
#
# 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 i... | gpl-2.0 |
krismz/Delv | jydelv/JRI_ggplot.py | 1 | 1554 | # Use JRI interface to communicate w/ ggplot
# works from jython
#from ggplot import ggplot
import tempfile
import time
#class JRI_ggplot(ggplot):
# TODO make sure all classes new-style
class JRI_ggplot:
def __init__(self, svgElem, Rengine):
# TODO svgElem or file names? For now files
#ggplot.__init__(self,... | bsd-3-clause |
kchodorow/tensorflow | tensorflow/contrib/training/__init__.py | 26 | 4425 | # 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 |
jnerin/ansible | lib/ansible/modules/system/timezone.py | 8 | 25252 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2016, Shinichi TAMURA (@tmshn)
# 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 |
benbox69/pyload | module/plugins/hoster/OneFichierCom.py | 9 | 4287 | # -*- coding: utf-8 -*-
import re
from module.network.RequestFactory import getURL as get_url
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class OneFichierCom(SimpleHoster):
__name__ = "OneFichierCom"
__type__ = "hoster"
__version__ = "0.90"
__status__ = "test... | gpl-3.0 |
GarySparrow/mFlaskWeb | venv/Lib/encodings/cp1255.py | 272 | 12466 | """ Python Character Mapping Codec cp1255 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1255.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,in... | mit |
xiao26/scrapy | scrapy/utils/iterators.py | 93 | 4569 | import re
import csv
import logging
try:
from cStringIO import StringIO as BytesIO
except ImportError:
from io import BytesIO
import six
from scrapy.http import TextResponse, Response
from scrapy.selector import Selector
from scrapy.utils.python import re_rsearch, to_unicode
logger = logging.getLogger(__nam... | bsd-3-clause |
vmaini/reinforcement_learning | q_learning_nn.py | 1 | 2715 | # Source: https://medium.com/emergent-future/simple-reinforcement-learning-with-tensorflow-part-0-q-learning-with-tables-and-neural-networks-d195264329d0
import gym
import numpy as np
import random
import tensorflow as tf
import matplotlib.pyplot as plt
env = gym.make('FrozenLake-v0')
tf.reset_default_graph()
render... | mit |
unreal666/youtube-dl | youtube_dl/extractor/tv3.py | 69 | 1513 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class TV3IE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?tv3\.co\.nz/(?P<id>[^/]+)/tabid/\d+/articleID/\d+/MCat/\d+/Default\.aspx'
_TEST = {
'url': 'http://www.tv3.co.nz/MOTORSPORT-SRS-SsangYong-Hampton-Dow... | unlicense |
CZ-NIC/ucollect | src/master/sniff/task.py | 2 | 1209 | #
# Ucollect - small utility for real-time analysis of network data
# Copyright (C) 2014 CZ.NIC, z.s.p.o. (http://www.nic.cz/)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; ei... | gpl-2.0 |
JKingdom/KingCoin | app/market/market.py | 1 | 11572 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from app import config as cfg, context as ctx
from app.base.serialize import *
from app.block.utils import cryptoutil
from app.db import db
from app.utils import timeutil, baseutil
from app.block.key import PyKey
from app.net import net
class P... | gpl-3.0 |
pistatium/blog_on_appengine | appengine_django/sessions/backends/db.py | 60 | 2526 | #!/usr/bin/python2.4
#
# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | apache-2.0 |
alqfahad/odoo | addons/account/report/account_general_journal.py | 381 | 7669 | # -*- 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 |
taejoonlab/taejoonlab-toolbox | express/idxstats-to-read_count_tbl.py | 1 | 2649 | #!/usr/bin/python3
import os
import sys
import re
filename_conf = sys.argv[1]
output_name = filename_conf.split('.')[0]
def read_count(filename):
rv = dict()
f = open(filename,'r')
for line in f:
if line.startswith('#'):
continue
tokens = line.strip().split("\t")
t_id ... | gpl-3.0 |
Mj258/weiboapi | srapyDemo/envs/Lib/site-packages/win32/Demos/security/setkernelobjectsecurity.py | 34 | 4159 | import win32security,win32api,win32con, win32process
## You need SE_RESTORE_NAME to be able to set the owner of a security descriptor to anybody
## other than yourself or your primary group. Most admin logins don't have it by default, so
## enabling it may fail
new_privs = ((win32security.LookupPrivilegeValue('',win32... | mit |
CydarLtd/ansible | lib/ansible/parsing/yaml/dumper.py | 90 | 2246 | # (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 |
realms-team/solmanager | libs/smartmeshsdk-REL-1.3.0.1/libs/VManagerSDK/vmanager/models/ap_list_element.py | 3 | 3937 | # coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applica... | bsd-3-clause |
garvitr/sympy | sympy/polys/tests/test_densebasic.py | 97 | 21462 | """Tests for dense recursive polynomials' basic tools. """
from sympy.polys.densebasic import (
dup_LC, dmp_LC,
dup_TC, dmp_TC,
dmp_ground_LC, dmp_ground_TC,
dmp_true_LT,
dup_degree, dmp_degree,
dmp_degree_in, dmp_degree_list,
dup_strip, dmp_strip,
dmp_validate,
dup_reverse,
dup... | bsd-3-clause |
PadaliaRushabh/arapk | arapk.py | 1 | 6304 | '''
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
############################---------------arapk : Android Reverse APK.-------------##################################################
############################-... | gpl-2.0 |
Lyrositor/CoilSnake | coilsnake/modules/eb/EnemyModule.py | 2 | 13393 | import logging
from coilsnake.model.eb.blocks import EbCompressibleBlock
from coilsnake.model.eb.enemy_groups import EnemyGroupTableEntry
from coilsnake.model.eb.palettes import EbPalette
from coilsnake.model.eb.sprites import EbBattleSprite
from coilsnake.model.eb.table import eb_table_from_offset
from coilsnake.modu... | gpl-3.0 |
syphar/django | tests/update/models.py | 282 | 1196 | """
Tests for the update() queryset method that allows in-place, multi-object
updates.
"""
from django.db import models
from django.utils import six
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class DataPoint(models.Model):
name = models.CharField(max_length=20)
... | bsd-3-clause |
mKeRix/home-assistant | homeassistant/components/lock/device_trigger.py | 8 | 2647 | """Provides device automations for Lock."""
from typing import List
import voluptuous as vol
from homeassistant.components.automation import AutomationActionType, state
from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA
from homeassistant.const import (
CONF_DEVICE_ID,
CONF_DOMAIN,
... | mit |
TaddyLab/gensim | gensim/corpora/textcorpus.py | 68 | 4188 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html
"""
Text corpora usually reside on disk, as text files in one format or another
In a common scenario, we need to build a dictionary (a `word->integer id`
mapping), which is then used to construct ... | gpl-3.0 |
codemac/servo | components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py | 134 | 1154 | import WebIDL
def WebIDLTest(parser, harness):
parser.parse("""
callback interface TestCallbackInterface {
attribute boolean bool;
};
""")
results = parser.finish()
iface = results[0]
harness.ok(iface.isCallback(), "Interface should be a callback")
parser = parser.... | mpl-2.0 |
SnappleCap/oh-mainline | vendor/packages/Jinja2/jinja2/__init__.py | 238 | 2270 | # -*- coding: utf-8 -*-
"""
jinja2
~~~~~~
Jinja2 is a template engine written in pure Python. It provides a
Django inspired non-XML syntax but supports inline expressions and
an optional sandboxed environment.
Nutshell
--------
Here a small example of a Jinja2 template::
{% ... | agpl-3.0 |
campenberger/boto | tests/integration/configservice/test_configservice.py | 93 | 2081 | # Copyright (c) 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights ... | mit |
MonicaHsu/truvaluation | venv/lib/python2.7/urllib.py | 4 | 58211 | """Open an arbitrary URL.
See the following document for more info on URLs:
"Names and Addresses, URIs, URLs, URNs, URCs", at
http://www.w3.org/pub/WWW/Addressing/Overview.html
See also the HTTP spec (from which the error codes are derived):
"HTTP - Hypertext Transfer Protocol", at
http://www.w3.org/pub/WWW/Protocols... | mit |
robertodr/xcfun | docs/conf.py | 2 | 4171 | # -*- coding: utf-8 -*-
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document wi... | mpl-2.0 |
vjpai/grpc | src/python/grpcio_tests/tests/unit/_exit_scenarios.py | 13 | 8798 | # Copyright 2016 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | apache-2.0 |
pepeportela/edx-platform | cms/djangoapps/contentstore/tests/test_contentstore.py | 1 | 96743 | # -*- coding: utf-8 -*-
import copy
import shutil
from datetime import timedelta
from functools import wraps
from json import loads
from textwrap import dedent
from unittest import SkipTest
from uuid import uuid4
import ddt
import lxml.html
import mock
from django.conf import settings
from django.contrib.auth.models ... | agpl-3.0 |
jdmonaco/grid-remapping-model | src/tools/bash.py | 1 | 4473 | # encoding: utf-8
"""
bash.py -- Functions relating to bash scripting and output
Created by Joe Monaco on 2007-11-14.
Copyright (c) 2007 Columbia University. All rights reserved.
"""
# Library imports
from enthought.traits.api import HasTraits, Instance, Trait, String
from sys import stdout as _out, stderr as _err, p... | mit |
sdh11/gnuradio | gr-digital/python/digital/ofdm_sync_pnac.py | 6 | 5936 | #!/usr/bin/env python
#
# Copyright 2007 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or (at your option)
# ... | gpl-3.0 |
htzy/bigfour | lms/djangoapps/django_comment_client/tests/test_utils.py | 20 | 40418 | # -*- coding: utf-8 -*-
import datetime
import json
import mock
from nose.plugins.attrib import attr
from pytz import UTC
from django.utils.timezone import UTC as django_utc
from django.core.urlresolvers import reverse
from django.test import TestCase, RequestFactory
from edxmako import add_lookup
from django_comment... | agpl-3.0 |
FATruden/boto | boto/ec2/autoscale/group.py | 12 | 12574 | # Copyright (c) 2009-2011 Reza Lotun http://reza.lotun.name/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, mod... | mit |
Workday/OpenFrame | tools/telemetry/third_party/gsutilz/gslib/tests/test_perfdiag.py | 14 | 5038 | # -*- coding: utf-8 -*-
# Copyright 2013 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 require... | bsd-3-clause |
web30s/odoo-9.0c-20160402 | hello/templates/openerp/addons/anonymization/anonymization.py | 11 | 27892 | # -*- encoding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from lxml import etree
import os
import base64
try:
import cPickle as pickle
except ImportError:
import pickle
import random
import datetime
from openerp.release import version_info
from openerp.osv import fiel... | gpl-3.0 |
grani/grpc | src/python/grpcio_tests/tests/unit/_junkdrawer/stock_pb2.py | 23 | 6454 | # Copyright 2015, 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 f... | bsd-3-clause |
chrcoe/django-in-cloud9 | .c9/metadata/workspace/c9_django_test/settings.py | 1 | 17362 | {"filter":false,"title":"settings.py","tooltip":"/c9_django_test/settings.py","undoManager":{"mark":100,"position":100,"stack":[[{"group":"doc","deltas":[{"action":"insertText","range":{"start":{"row":45,"column":62},"end":{"row":45,"column":63}},"text":"r"}]}],[{"group":"doc","deltas":[{"action":"insertText","range":{... | mit |
jjscarafia/odoo | addons/crm_partner_assign/wizard/crm_channel_interested.py | 263 | 3795 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# ... | agpl-3.0 |
goodwinos/linux-dm | tools/perf/scripts/python/check-perf-trace.py | 11214 | 2503 | # perf script event handlers, generated by perf script -g python
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# This script tests basic functionality such as flag and symbol
# strings, common_xxx() calls back into perf, begin, end, unhandled
# events, etc. ... | gpl-2.0 |
mavenlin/tensorflow | tensorflow/contrib/data/python/kernel_tests/flat_map_dataset_op_test.py | 31 | 11139 | # 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 |
dset0x/invenio | invenio/legacy/websearch/templates.py | 1 | 185322 | # -*- coding: utf-8 -*-
# This file is part of Invenio.
# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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 F... | gpl-2.0 |
lucafavatella/intellij-community | python/helpers/pydev/tests_pydevd_mainloop/gui-wx.py | 46 | 3355 | #!/usr/bin/env python
"""
A Simple wx example to test PyDev's event loop integration.
To run this:
1) Enable the PyDev GUI event loop integration for wx
2) do an execfile on this script
3) ensure you have a working GUI simultaneously with an
interactive console
Ref: Modified from wxPython source code wxPython/samp... | apache-2.0 |
simonwydooghe/ansible | contrib/inventory/consul_io.py | 37 | 20850 | #!/usr/bin/env python
#
# (c) 2015, Steve Gargan <steve.gargan@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
# (a... | gpl-3.0 |
timj/scons | bin/docs-validate.py | 1 | 1096 | #!/usr/bin/env python
#
# Searches through the whole source tree and validates all
# documentation files against our own XSD in docs/xsd.
#
from __future__ import print_function
import sys,os
import SConsDoc
if __name__ == "__main__":
if len(sys.argv)>1:
if SConsDoc.validate_all_xml((sys.argv[1],)):
... | mit |
hilaskis/UAV_MissionPlanner | Lib/uuid.py | 187 | 21095 | r"""UUID objects (universally unique identifiers) according to RFC 4122.
This module provides immutable UUID objects (class UUID) and the functions
uuid1(), uuid3(), uuid4(), uuid5() for generating version 1, 3, 4, and 5
UUIDs as specified in RFC 4122.
If all you want is a unique ID, you should probably call uuid1() ... | gpl-2.0 |
sobomax/virtualbox_64bit_edd | src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/GenFds/CompressSection.py | 11 | 2999 | ## @file
# process compress section generation
#
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license ... | gpl-2.0 |
sebmarchand/syzygy | third_party/numpy/files/numpy/lib/tests/test_arraysetops.py | 22 | 5677 | """ Test functions for 1D array set operations.
"""
from numpy.testing import *
import numpy as np
from numpy.lib.arraysetops import *
import warnings
class TestAso(TestCase):
def test_unique( self ):
a = np.array( [5, 7, 1, 2, 1, 5, 7] )
ec = np.array( [1, 2, 5, 7] )
c = unique( a )
... | apache-2.0 |
birkelbach/CAN-FIX-Utility | cfutil/main.py | 1 | 4153 | #!/usr/bin/env python3
# CAN-FIX Utilities - An Open Source CAN FIX Utility Package
# Copyright (c) 2012 Phil Birkelbach
#
# 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 o... | gpl-2.0 |
crafty78/ansible | lib/ansible/modules/packaging/os/rpm_key.py | 25 | 7500 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Ansible module to import third party repo keys to your rpm db
# (c) 2013, Héctor Acosta <hector.acosta@gazzang.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 ... | gpl-3.0 |
macchina-io/macchina.io | platform/JS/V8/v8/tools/release/common_includes.py | 2 | 29177 | #!/usr/bin/env python
# Copyright 2013 the V8 project authors. 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... | apache-2.0 |
ayepezv/GAD_ERP | addons/mail/models/mail_channel.py | 1 | 33198 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from email.utils import formataddr
import re
import uuid
from odoo import _, api, fields, models, modules, tools
from odoo.exceptions import UserError
from odoo.osv import expression
from odoo.tools import ormcache
fro... | gpl-3.0 |
SCgeeker/OpenSesame | libopensesame/widgets/_image.py | 2 | 3398 | #-*- coding:utf-8 -*-
"""
This file is part of openexp.
openexp 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.
openexp is distributed in ... | gpl-3.0 |
tiagocardosos/stoq | stoqlib/gui/wizards/renegotiationwizard.py | 2 | 6772 | # -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2009 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## This program 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 F... | gpl-2.0 |
chentao/thrift | lib/py/src/TTornado.py | 7 | 6402 | #
# 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 u... | apache-2.0 |
andreaso/ansible | lib/ansible/parsing/yaml/objects.py | 18 | 4164 | # (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 |
Metaswitch/calico-nova | nova/api/openstack/compute/contrib/rescue.py | 7 | 4012 | # Copyright 2011 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 |
jdramani/servo | tests/wpt/web-platform-tests/tools/wptserve/docs/conf.py | 467 | 7855 | # -*- coding: utf-8 -*-
#
# wptserve documentation build configuration file, created by
# sphinx-quickstart on Wed Aug 14 17:23:24 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... | mpl-2.0 |
mjfarmer/scada_py | env/lib/python2.7/site-packages/zope/interface/common/tests/basemapping.py | 32 | 3914 | ##############################################################################
#
# Copyright (c) 2001, 2002 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# TH... | gpl-3.0 |
alexcuellar/odoo | addons/membership/__openerp__.py | 197 | 2207 | # -*- 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 |
vladon/omim | 3party/protobuf/python/google/protobuf/internal/text_encoding_test.py | 74 | 2858 | #! /usr/bin/python
#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
... | apache-2.0 |
faroit/mir_eval | mir_eval/segment.py | 1 | 43678 | # CREATED:2013-08-13 12:02:42 by Brian McFee <brm2132@columbia.edu>
'''
Evaluation criteria for structural segmentation fall into two categories:
boundary annotation and structural annotation. Boundary annotation is the task
of predicting the times at which structural changes occur, such as when a verse
transitions to... | mit |
spatialdev/onadata | onadata/apps/viewer/migrations/0013_auto__add_unique_export_filename_xform.py | 13 | 10223 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding unique constraint on 'Export', fields ['filename', 'xform']
db.create_unique('odk_viewer_export',... | bsd-2-clause |
bgxavier/neutron | neutron/tests/functional/agent/linux/test_ip_monitor.py | 58 | 2612 | # Copyright 2015 Red Hat, 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... | apache-2.0 |
jirikuncar/invenio | invenio/utils/viaf.py | 15 | 1958 | from urllib2 import urlopen
from lxml import etree
from invenio.modules.formatter.engine import BibFormatObject
CFG_VIAF_WIKIPEDIA_LINK_BFO_FIELD = "856"
CFG_VIAF_LINK_NAME_LABEL_SUBFIELD = 'n'
CFG_VIAF_WIKIPEDIA_NAME_VALUE_SUBFIELD = 'wikipedia'
CFG_VIAF_WIKIPEDIA_LINK_SUBFIELD = 'a'
def get_wikipedia_link(viaf_id):... | gpl-2.0 |
pchauncey/ansible | test/units/modules/network/junos/junos_module.py | 43 | 3332 | # (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 dis... | gpl-3.0 |
donaloconnor/bitcoin | test/functional/p2p_fingerprint.py | 10 | 5825 | #!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test various fingerprinting protections.
If a stale block more than a month old or its header are requested... | mit |
DarkFenX/Pyfa | gui/fitCommands/gui/localModule/changeStates.py | 2 | 1720 | import wx
import eos.db
import gui.mainFrame
from gui import globalEvents as GE
from gui.fitCommands.calc.module.localChangeStates import CalcChangeLocalModuleStatesCommand
from gui.fitCommands.helpers import InternalCommandHistory, restoreRemovedDummies
from service.fit import Fit
class GuiChangeLocalModuleStatesCo... | gpl-3.0 |
ibanezchen/linux-8173 | tools/perf/scripts/python/syscall-counts.py | 1996 | 1700 | # system call counts
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide system call totals, broken down by syscall.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os
import sys
sys.path.append(os.envir... | gpl-2.0 |
pforret/python-for-android | python-build/python-libs/gdata/build/lib/gdata/exif/__init__.py | 253 | 6981 | # -*-*- encoding: utf-8 -*-*-
#
# This is gdata.photos.exif, implementing the exif namespace in gdata
#
# $Id: __init__.py 81 2007-10-03 14:41:42Z havard.gulldahl $
#
# Copyright 2007 Håvard Gulldahl
# Portions copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not... | apache-2.0 |
PKRoma/python-for-android | pythonforandroid/recipes/liblzma/__init__.py | 4 | 2591 | import sh
from multiprocessing import cpu_count
from os.path import exists, join
from pythonforandroid.archs import Arch
from pythonforandroid.logger import shprint
from pythonforandroid.recipe import Recipe
from pythonforandroid.util import current_directory, ensure_dir
class LibLzmaRecipe(Recipe):
version = ... | mit |
MortalViews/incubator-airflow | airflow/operators/redshift_to_s3_operator.py | 8 | 4117 | # -*- 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 |
francisco-dlp/hyperspy | hyperspy/_signals/eds_tem.py | 1 | 28238 | # -*- coding: utf-8 -*-
# Copyright 2007-2016 The HyperSpy developers
#
# This file is part of HyperSpy.
#
# HyperSpy 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 |
tbeckham/eutester | testcases/cloud_admin/load/locust/user_profiles.py | 6 | 1595 | # Software License Agreement (BSD License)
#
# Copyright (c) 2009-2011, Eucalyptus Systems, Inc.
# All rights reserved.
#
# Redistribution and use of this software in source and binary forms, with or
# without modification, are permitted provided that the following conditions
# are met:
#
# Redistributions of source ... | bsd-2-clause |
yanweifu/chainer | tests/cupy_tests/math_tests/test_floating.py | 24 | 1579 | import unittest
import numpy
import cupy
from cupy import testing
@testing.gpu
class TestFloating(unittest.TestCase):
_multiprocess_can_split_ = True
@testing.for_all_dtypes()
@testing.numpy_cupy_allclose(atol=1e-5)
def check_unary(self, name, xp, dtype):
a = testing.shaped_arange((2, 3), ... | mit |
HyperBaton/ansible | lib/ansible/modules/cloud/hcloud/hcloud_floating_ip_info.py | 13 | 6151 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2019, Hetzner Cloud GmbH <info@hetzner-cloud.de>
# 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 = {
"met... | gpl-3.0 |
jhawkesworth/ansible-modules-core | cloud/openstack/_keystone_user.py | 32 | 14115 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# 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.
#
... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.