repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
DickJC123/mxnet
python/mxnet/gluon/contrib/estimator/event_handler.py
3
33212
# 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
chromatic-universe/imap2017
src/imap-python-gadget/cci_imap_gadget/core_on_login.py
1
4756
# core_on_login.py chromatic universe william k. johnson 2018 from time import sleep #cci from cci_imap_gadget.imap_gadget_base import cci_chilkat , \ cci_ecosys , \ cci_mini_imap_mail from cci_imap_gadget.core_on_logout i...
mit
52ai/django-ccsds
tests/delete_regress/models.py
99
2930
from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from django.db import models class Award(models.Model): name = models.CharField(max_length=25) object_id = models.PositiveIntegerField() content_type = mode...
bsd-3-clause
fxtentacle/phantomjs
src/qt/qtbase/src/3rdparty/angle/src/libGLESv2/Float16ToFloat32.py
329
1897
# Copyright (c) 2012 The ANGLE Project Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # # This script generates a function that converts 16-bit precision floating # point numbers to 32-bit. # It is based on ftp://ftp.fox-toolkit.org/p...
bsd-3-clause
markoshorro/gem5
tests/configs/tsunami-simple-atomic-dual.py
64
2354
# Copyright (c) 2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
bsd-3-clause
wataash/Instr
instr/ke2636a.py
1
3794
import numpy as np import unittest2 from instr.base import SourceMeter class Keithley2636A(SourceMeter): def __init__(self, rsrc=None, timeout_sec=600, reset=True): self._smu = 'a' idn = 'Keithley Instruments Inc., Model 2636A' super().__init__(rsrc, idn, timeout_sec, reset) @proper...
mit
brianmhunt/SIWorldMap
werkzeug/contrib/cache.py
12
23019
# -*- coding: utf-8 -*- """ werkzeug.contrib.cache ~~~~~~~~~~~~~~~~~~~~~~ The main problem with dynamic Web sites is, well, they're dynamic. Each time a user requests a page, the webserver executes a lot of code, queries the database, renders templates until the visitor gets the page he sees. ...
mit
mxrrow/zaicoin
src/deps/boost/libs/python/test/auto_ptr.py
46
1812
# Copyright David Abrahams 2004. Distributed under the Boost # Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ''' >>> from auto_ptr_ext import * >>> x = X(42) >>> x.value() 42 >>> look(x), look(x) (42, 42) >>> maybe_steal(x, 0) 42 >>> look(x) 42...
mit
xiaoshaozi52/ansible
v1/ansible/module_common.py
83
8039
# (c) 2013-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
hernad/frappe
frappe/desk/notifications.py
16
4612
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import time_diff_in_seconds, now, now_datetime, DATETIME_FORMAT from dateutil.relativedelta import relativedelta @frappe.whitelist() def get_notif...
mit
uclmr/inferbeddings
tests/inferbeddings/adversarial/closedform/test_lifted_simple_distmult_unit_cube.py
1
3989
# -*- coding: utf-8 -*- import numpy as np import tensorflow as tf from inferbeddings.models import base as models from inferbeddings.models import similarities from inferbeddings.knowledgebase import Fact, KnowledgeBaseParser from inferbeddings.parse import parse_clause from inferbeddings.models.training import cons...
mit
MichaelMraka/dnf
tests/test_base.py
2
10377
# Copyright (C) 2012-2013 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the hope that it will...
gpl-2.0
asandyz/oppia
core/storage/job/gae_models.py
13
5760
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
apache-2.0
puttarajubr/commcare-hq
corehq/fluff/calculators/xform.py
2
7802
from datetime import timedelta import warnings import fluff from fluff.filters import Filter, ORFilter, ANDFilter from fluff.models import SimpleCalculator def default_date(form): return form.received_on def in_range_calc(input, reference_tuple): if not input: # filter empty strings return F...
bsd-3-clause
StevenLOL/aicyber_semeval_2016_ivector
System_2/utils/nnet/gen_hamm_mat.py
5
1553
#!/usr/bin/env python # Copyright 2012 Brno University of Technology (author: Karel Vesely) # 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 # ...
gpl-3.0
hobbyjobs/photivo
site_scons/site_tools/qt4/__init__.py
7
37558
"""SCons.Tool.qt4 Tool-specific initialization for Qt4. 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-7,2010 The SCons Foundation # # Permission is hereby granted, free of charge, t...
gpl-3.0
highweb-project/highweb-webcl-html5spec
chrome/browser/web_dev_style/js_checker_test.py
16
11434
#!/usr/bin/env python # Copyright 2015 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 js_checker from os import path as os_path import re from sys import path as sys_path import test_util import unittest _HERE = o...
bsd-3-clause
uskudnik/ggrc-core
src/ggrc_workflows/migrations/versions/20150514130212_1431e7094e26_add_new_notification_type.py
1
1859
"""add new notification type Revision ID: 1431e7094e26 Revises: 2b89912f95f1 Create Date: 2015-05-14 13:02:12.165612 """ from alembic import op import sqlalchemy as sa from sqlalchemy.sql import table, column from datetime import timedelta, date from sqlalchemy import and_ from ggrc import db from ggrc_workflows.mo...
apache-2.0
arank/mxnet
example/reinforcement-learning/ddpg/strategies.py
15
1705
import numpy as np class BaseStrategy(object): """ Base class of exploration strategy. """ def get_action(self, obs, policy): raise NotImplementedError def reset(self): pass class OUStrategy(BaseStrategy): """ Ornstein-Uhlenbeck process: dxt = theta * (mu - xt) * dt +...
apache-2.0
barbuza/django
django/test/utils.py
178
20899
import logging import re import sys import time import warnings from contextlib import contextmanager from functools import wraps from unittest import skipIf, skipUnless from xml.dom.minidom import Node, parseString from django.apps import apps from django.conf import UserSettingsHolder, settings from django.core impo...
bsd-3-clause
zhimin711/nova
nova/tests/unit/virt/libvirt/volume/test_smbfs.py
42
4618
# 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 # d...
apache-2.0
lixt/lily2-gem5
src/arch/x86/isa/insts/simd128/integer/shift/right_logical_shift.py
91
4565
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
bsd-3-clause
fracting/depot_tools
third_party/oauth2client/tools.py
171
8344
# Copyright (C) 2013 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
bsd-3-clause
indashnet/InDashNet.Open.UN2000
android/external/chromium_org/third_party/mesa/src/src/gallium/drivers/llvmpipe/lp_tile_soa.py
13
23290
#!/usr/bin/env python CopyRight = ''' /************************************************************************** * * Copyright 2009 VMware, Inc. * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the * "...
apache-2.0
grompe/magnet2
xmpp/debug.py
207
14069
## debug.py ## ## Copyright (C) 2003 Jacob Lundqvist ## ## 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 Foundation; either version 2, or (at your option) ## any later version. ## ## ...
gpl-3.0
shimpe/frescobaldi
frescobaldi_app/matcher.py
1
7388
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2008 - 2014 by Wilbert Berendsen # # 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 ...
gpl-2.0
AlbertXingZhang/android_kernel_sony_msm8x60
tools/perf/scripts/python/sctop.py
11180
1924
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
githubutilities/LeetCode
Python/count-of-range-sum.py
3
3525
# Time: O(nlogn) # Space: O(n) # Given an integer array nums, return the number of range # sums that lie in [lower, upper] inclusive. # Range sum S(i, j) is defined as the sum of the elements # in nums between indices i and j (i <= j), inclusive. # # Note: # A naive algorithm of O(n^2) is trivial. You MUST do better ...
mit
turbokongen/home-assistant
tests/helpers/test_device_registry.py
1
38502
"""Tests for the Device Registry.""" import time from unittest.mock import patch import pytest from homeassistant.const import EVENT_HOMEASSISTANT_STARTED from homeassistant.core import CoreState, callback from homeassistant.helpers import device_registry, entity_registry from tests.common import MockConfigEntry, fl...
apache-2.0
TriggeredMessaging/pydotmailer
pydotmailer.py
1
26995
# pydotmailer - A lightweight wrapper for the dotMailer API, written in Python. # Copyright (c) 2012 Triggered Messaging Ltd, released under the MIT license # Home page: # https://github.com/TriggeredMessaging/pydotmailer/ # See README and LICENSE files. # # dotMailer API docs are at http://www.dotmailer.co.uk/api/ # T...
mit
tcpcloud/contrail-controller
src/discovery/setup.py
2
1449
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # from setuptools import setup, find_packages, Command import os, sys, re class RunTestsCommand(Command): description = "Test command to run testr in virtualenv" user_options = [ ('coverage', 'c', "Generate code coverage repor...
apache-2.0
ticosax/django
django/contrib/postgres/aggregates/statistics.py
493
2033
from django.db.models import FloatField, IntegerField from django.db.models.aggregates import Aggregate __all__ = [ 'CovarPop', 'Corr', 'RegrAvgX', 'RegrAvgY', 'RegrCount', 'RegrIntercept', 'RegrR2', 'RegrSlope', 'RegrSXX', 'RegrSXY', 'RegrSYY', 'StatAggregate', ] class StatAggregate(Aggregate): def __in...
bsd-3-clause
poiati/django
tests/save_delete_hooks/models.py
409
1030
""" Adding hooks before/after saving and deleting To execute arbitrary code around ``save()`` and ``delete()``, just subclass the methods. """ from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Person(...
bsd-3-clause
GDGLima/contentbox
third_party/openid/oidutil.py
12
5404
"""This module contains general utility code that is used throughout the library. For users of this library, the C{L{log}} function is probably the most interesting. """ __all__ = ['log', 'appendArgs', 'toBase64', 'fromBase64', 'autoSubmitHTML', 'toUnicode'] import binascii import sys import urlparse import logging ...
apache-2.0
appsembler/edx-platform
openedx/core/lib/api/test_utils.py
17
3614
""" Helpers for API tests. """ import base64 import json import re from django.test import TestCase from django.test.utils import override_settings TEST_API_KEY = "test_api_key" @override_settings(EDX_API_KEY=TEST_API_KEY) class ApiTestCase(TestCase): """ Parent test case for API workflow coverage """ ...
agpl-3.0
linearhub/titanium_mobile
support/module/android/bootstrap.py
42
11678
#!/usr/bin/env python # # Generates V8 bootstrapping JS code # import os, re, sys, optparse sys.path.append(os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "..", "common"))) try: import json except ImportError: import simplejson as json Kroll_DEFAULT = "org.appcelerator.kroll.annotat...
apache-2.0
amit0701/rally
rally/plugins/openstack/scenarios/murano/utils.py
6
9885
# Copyright 2015: Mirantis 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 b...
apache-2.0
safwanrahman/kitsune
kitsune/sumo/tests/test_api_utils.py
5
4041
import pytz from datetime import datetime from mock import Mock from nose.tools import eq_ from django.test.client import RequestFactory from django.test.utils import override_settings from rest_framework import fields, serializers from kitsune.sumo import api_utils from kitsune.sumo.tests import TestCase @overrid...
bsd-3-clause
Runscope/pysaml2
tests/test_30_mdstore.py
1
7860
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import re from saml2.httpbase import HTTPBase from saml2.mdstore import MetadataStore, MetaDataMDX from saml2.mdstore import destinations from saml2.mdstore import name from saml2 import md from saml2 import sigver from saml2 import BINDING_SOAP from saml2...
bsd-2-clause
stefan-jonasson/home-assistant
homeassistant/components/switch/demo.py
18
2008
""" Demo platform that has two fake switches. For more details about this platform, please refer to the documentation https://home-assistant.io/components/demo/ """ from homeassistant.components.switch import SwitchDevice from homeassistant.const import DEVICE_DEFAULT_NAME # pylint: disable=unused-argument def setup...
mit
fintech-circle/edx-platform
common/lib/xmodule/xmodule/modulestore/tests/test_semantics.py
35
19796
""" Tests of modulestore semantics: How do the interfaces methods of ModuleStore relate to each other? """ import ddt import itertools from collections import namedtuple from xmodule.course_module import CourseSummary from mock import patch from xmodule.modulestore.tests.utils import ( PureModulestoreTestCase, Mo...
agpl-3.0
noslenfa/tdjangorest
uw/lib/python2.7/site-packages/django/contrib/auth/tests/management.py
97
9156
from __future__ import unicode_literals from datetime import date from django.contrib.auth import models, management from django.contrib.auth.management import create_permissions from django.contrib.auth.management.commands import changepassword from django.contrib.auth.models import User from django.contrib.auth.test...
apache-2.0
himleyb85/django
tests/serializers/tests.py
41
16912
# -*- coding: utf-8 -*- from __future__ import unicode_literals from datetime import datetime from django.core import serializers from django.core.serializers import SerializerDoesNotExist from django.core.serializers.base import ProgressBar from django.db import connection, transaction from django.http import HttpRe...
bsd-3-clause
npiganeau/odoo
addons/l10n_in_hr_payroll/report/report_hr_yearly_salary_detail.py
374
6855
#-*- 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
liancheng/parquet-mr
dev/merge_parquet_pr.py
3
12576
#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Li...
apache-2.0
landscapeio/astroid
test/unittest_manager.py
1
4552
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of astroid. # # astroid 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 #...
gpl-2.0
837468220/python-for-android
python-build/python-libs/gdata/build/lib/gdata/tlslite/utils/RSAKey.py
253
8575
"""Abstract class for RSA.""" from cryptomath import * class RSAKey: """This is an abstract base class for RSA keys. Particular implementations of RSA keys, such as L{OpenSSL_RSAKey.OpenSSL_RSAKey}, L{Python_RSAKey.Python_RSAKey}, and L{PyCrypto_RSAKey.PyCrypto_RSAKey}, inherit from this. ...
apache-2.0
kubeflow/pipelines
test/sample-test/check_notebook_results.py
1
4241
# Copyright 2018-2021 The Kubeflow 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 ...
apache-2.0
rootpy/root_numpy
setup.py
2
6947
#!/usr/bin/env python from __future__ import print_function import sys if sys.version_info[0] < 3: import __builtin__ as builtins else: import builtins try: # Try to use setuptools if installed from setuptools import setup, Extension from pkg_resources import parse_version, get_distribution ...
bsd-3-clause
JioCloud/tempest
tempest/api/compute/admin/test_instance_usage_audit_log.py
17
2319
# Copyright 2013 IBM Corporation # 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
codeforamerica/skillcamp
ENV/lib/python2.7/site-packages/werkzeug/http.py
317
33404
# -*- coding: utf-8 -*- """ werkzeug.http ~~~~~~~~~~~~~ Werkzeug comes with a bunch of utilities that help Werkzeug to deal with HTTP data. Most of the classes and functions provided by this module are used by the wrappers, but they are useful on their own, too, especially if the response and ...
mit
python-xlib/python-xlib
examples/xdamage.py
1
4638
#!/usr/bin/python # # examples/xdamage.py -- demonstrate damage extension # # Copyright (C) 2019 Mohit Garg <mrmohitgarg1990@gmail.com> # # 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...
lgpl-2.1
OrlandoSoto/owning-a-home
test/browser_testing/features/steps/steps_home.py
11
1301
from behave import given, when, then from hamcrest.core import assert_that from hamcrest.core.core.isequal import equal_to from pages.home import Home from pages.base import Base # EMAIL SIGNUP @when(u'I enter "{email_address}"') def step(context, email_address): context.rate_checker.set_email_address(email_addr...
cc0-1.0
skycucumber/xuemc
python/venv/lib/python2.7/site-packages/whoosh/lang/isri.py
95
17041
# -*- coding: utf-8 -*- # # Natural Language Toolkit: The ISRI Arabic Stemmer # # Copyright (C) 2001-2012 NLTK Proejct # Algorithm: Kazem Taghva, Rania Elkhoury, and Jeffrey Coombs (2005) # Author: Hosam Algasaier <hosam_hme@yahoo.com> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT """ ISRI A...
gpl-2.0
Joni-Aaltonen/pebble-owner-info
.waf-1.7.0-9334f7e963bee5410f4fa28728feffdd/waflib/Tools/tex.py
2
8320
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,re from waflib import Utils,Task,Errors,Logs from waflib.TaskGen import feature,before_method re_bibunit=re.compile(r'\\(?P<type>putbib)\[(?P<file>[^\[\]]*)\]',re.M)...
gpl-2.0
twenty0ne/CocosBuilder-wxPython
cocos/test/test_hierarchy2.py
6
1960
from __future__ import division, print_function, unicode_literals # This code is so you can run the samples without installing the package import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) # testinfo = "s, q" tags = "CocosNode, Sprite, child, rotation, position" import cocos from...
mit
ketjow4/NOV
Lib/robotparser.py
169
7202
""" robotparser.py Copyright (C) 2000 Bastian Kleineidam You can choose between two licenses when using this package: 1) GNU GPLv2 2) PSF license for Python 2.2 The robots.txt Exclusion Protocol is implemented as specified in http://info.webcrawler.com/mak/projects/robots/norobots-rfc.html "...
gpl-3.0
ergs/rever
tests/test_tools.py
1
1374
"""Rever tools tests""" import os import tempfile import pytest from rever.tools import indir, render_authors, hash_url, replace_in_file @pytest.mark.parametrize('inp, pattern, new, leading_whitespace, exp', [ ('__version__ = "wow.mom"', r'__version__\s*=.*', '__version__ = "WAKKA"', True, '__version__ = "W...
bsd-3-clause
scruiser/kernel
scripts/analyze_suspend.py
445
49020
#!/usr/bin/python # # Tool for analyzing suspend/resume timing # Copyright (c) 2013, 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. # # This prog...
gpl-2.0
lindegroup/lookback
config/models.py
1
1764
# This Python file uses the following encoding: utf-8 # Part of the Lookback project (https://github.com/lindegroup/lookback) # Copyright 2015 The Linde Group Computer Support, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # ...
apache-2.0
Zlash65/erpnext
erpnext/buying/doctype/request_for_quotation/request_for_quotation.py
2
12544
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe, json from frappe import _ from frappe.model.mapper import get_mapped_doc from frappe.utils import get_url, cint from frap...
gpl-3.0
klusark/android_external_chromium_org
chrome/test/pyautolib/fetch_prebuilt_pyauto.py
67
8213
#!/usr/bin/env python # 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. """Fetch prebuilt binaries to run PyAuto. Sets up Chrome and PyAuto binaries using prebuilt binaries from the continuous build arc...
bsd-3-clause
swiftstack/swift
swift/common/middleware/domain_remap.py
3
8723
# Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
apache-2.0
uclouvain/OSIS-Louvain
base/models/enums/person_source_type.py
1
1455
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
agpl-3.0
Stratoscale/inaugurator
inaugurator/grubconfparser.py
2
1185
import re class GrubConfParser: def __init__(self, contents): self._contents = contents @classmethod def fromFile(cls, path): with open(path) as f: return cls(f.read()) def defaultKernelImage(self): return self._entryKernelImage(self._entries()[self._defaultIndex(...
apache-2.0
xianian/qt-creator
tests/system/shared/project_explorer.py
2
16769
############################################################################# ## ## Copyright (C) 2015 The Qt Company Ltd. ## Contact: http://www.qt.io/licensing ## ## This file is part of Qt Creator. ## ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance wit...
lgpl-2.1
bhattmansi/Implementation-of-CARED-in-ns3
src/click/bindings/modulegen__gcc_LP64.py
10
352339
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
gpl-2.0
mikedchavez1010/XX-Net
python27/1.0/lib/noarch/dnslib/proxy.py
7
5364
# -*- coding: utf-8 -*- from __future__ import print_function import binascii,socket,struct from dnslib import DNSRecord from dnslib.server import DNSServer,DNSHandler,BaseResolver,DNSLogger class ProxyResolver(BaseResolver): """ Proxy resolver - passes all requests to upstream DNS server and re...
bsd-2-clause
egabancho/invenio-base
tests/test_flash_security.py
2
2568
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 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 later...
gpl-2.0
arraypan/Food-Stickers
FoodStickersMessages/lib/python3.5/site-packages/pip/commands/freeze.py
342
2835
from __future__ import absolute_import import sys import pip from pip.compat import stdlib_pkgs from pip.basecommand import Command from pip.operations.freeze import freeze from pip.wheel import WheelCache DEV_PKGS = ('pip', 'setuptools', 'distribute', 'wheel') class FreezeCommand(Command): """ Output ins...
mit
vastin/sumatrapdf
scripts/upload_sources.py
14
2741
#!/usr/bin/env python """ Creates a 7-zip archive of the sources and uploads them to s3. It's meant to be run after tagging a realease (it checks out the sources from svn's /tags/${ver}rel branch). Run as: ./scripts/upload_sources.bat 2.4 The sources are uploaded as: https://kjkpub.s3.amazonaws.com/sumat...
gpl-3.0
igavrilov/django-tastypie
tests/core/tests/paginator.py
25
11701
# -*- coding: utf-8 -*- from django.conf import settings from django.test import TestCase from tastypie.exceptions import BadRequest from tastypie.paginator import Paginator from core.models import Note from core.tests.resources import NoteResource from django.db import reset_queries from django.http import QueryDict ...
bsd-3-clause
frank-tancf/scikit-learn
benchmarks/bench_multilabel_metrics.py
276
7138
#!/usr/bin/env python """ A comparison of multilabel target formats and metrics over them """ from __future__ import division from __future__ import print_function from timeit import timeit from functools import partial import itertools import argparse import sys import matplotlib.pyplot as plt import scipy.sparse as...
bsd-3-clause
pilwon/ansible
lib/ansible/runner/lookup_plugins/password.py
22
4417
# (c) 2012, Daniel Hokka Zakrisson <daniel@hozac.com> # (c) 2013, Javier Candeira <javier@candeira.com> # (c) 2013, Maykel Moya <mmoya@speedyrails.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published...
gpl-3.0
surdupetru/android_kernel_huawei_g620s
tools/perf/scripts/python/event_analyzing_sample.py
4719
7393
# event_analyzing_sample.py: general event handler in python # # Current perf report is already very powerful with the annotation integrated, # and this script is not trying to be as powerful as perf report, but # providing end user/developer a flexible way to analyze the events other # than trace points. # # The 2 dat...
gpl-2.0
caLew/sugartest
src/jarabe/intro/genderpicker.py
7
3502
# Copyright (C) 2014, Sugar Labs # Copyright (C) 2014, Walter Bender # # 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
andreparames/odoo
openerp/addons/base/ir/ir_ui_view.py
19
52300
# -*- 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 GNU...
agpl-3.0
louiejtaylor/pyViKO
examples/batch.py
1
1173
if __name__ == '__main__': ##### ##temporary dev hack import os,time os.chdir('..') ##### from pyviko import core, mutation, restriction #ovr = core.readFasta('test/dem/over/2000.fasta') #toKO = core.readFasta('test/dem/ko/2000.fasta') '''#True batch script t1 = time.time() for i in range(len(toKO)): ...
mit
tangledhelix/dp_pp_utils
make_project.py
1
11438
#!/usr/bin/env python3 import json import requests import os import sys import re import shutil from os.path import basename from jinja2 import Template from subprocess import call from trello import TrelloClient from zipfile import ZipFile AUTH_CONFIG = "auth-config.json" TRELLO_TEMPLATE = "TEMPLATE: PPgen workflow...
mit
vbshah1992/microblog
flask/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.py
1093
8936
# Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy. # Passes Python2.7's test suite and incorporates all the latest updates. # Copyright 2009 Raymond Hettinger, released under the MIT License. # http://code.activestate.com/recipes/576693/ try: from thread import get_ident as _get_ide...
bsd-3-clause
turbokongen/home-assistant
homeassistant/components/statsd/__init__.py
21
2961
"""Support for sending data to StatsD.""" import logging import statsd import voluptuous as vol from homeassistant.const import CONF_HOST, CONF_PORT, CONF_PREFIX, EVENT_STATE_CHANGED from homeassistant.helpers import state as state_helper import homeassistant.helpers.config_validation as cv _LOGGER = logging.getLogg...
apache-2.0
losywee/rethinkdb
test/interface/table_fuzzer.py
9
15525
#!/usr/bin/env python # Copyright 2014 RethinkDB, all rights reserved. '''This test randomly runs db, table, and index creates/drops, as well as reads, writes, and optionally changefeeds across any number of client threads and any number of servers in a cluster.''' from __future__ import print_function import pprint...
agpl-3.0
DazWorrall/ansible
lib/ansible/plugins/action/eos.py
8
5673
# # (c) 2016 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 d...
gpl-3.0
ajose01/rethinkdb
external/v8_3.30.33.16/tools/testrunner/local/execution.py
44
10169
# Copyright 2012 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, this list of conditi...
agpl-3.0
RTHMaK/RPGOne
deep_qa-master/deep_qa/data/tokenizers/word_splitter.py
4
5690
from collections import OrderedDict from typing import List from overrides import overrides class WordSplitter: """ A ``WordSplitter`` splits strings into words. This is typically called a "tokenizer" in NLP, but we need ``Tokenizer`` to refer to something else, so we're using ``WordSplitter`` here ...
apache-2.0
drower/wireshark-1.10.0
tools/lex.py
482
40739
# ----------------------------------------------------------------------------- # ply: lex.py # # Copyright (C) 2001-2011, # David M. Beazley (Dabeaz LLC) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ar...
gpl-2.0
pydanny/django-easy-profiles
setup.py
1
1088
from setuptools import setup, find_packages version = '0.1.0' LONG_DESCRIPTION = open("README.rst").read() setup( name='django-easy-profiles', version=version, description="django-easy-profiles", long_description=LONG_DESCRIPTION, classifiers=[ "Development Status :: 2 - Pre-Alpha", ...
mit
jmcarbo/openerp7
openerp/addons/mrp/wizard/mrp_price.py
56
2144
# -*- 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
Wingless-Archangel/CustomCommand
Python Practice/learn_django/lib/python3.6/site-packages/wheel/test/test_install.py
455
1866
# Test wheel. # The file has the following contents: # hello.pyd # hello/hello.py # hello/__init__.py # test-1.0.data/data/hello.dat # test-1.0.data/headers/hello.dat # test-1.0.data/scripts/hello.sh # test-1.0.dist-info/WHEEL # test-1.0.dist-info/METADATA # test-1.0.dist-info/RECORD # The ...
gpl-3.0
sahlinet/fastapp
fastapp/api_serializers.py
1
3087
from rest_framework import serializers from rest_framework.reverse import reverse from fastapp.models import Base, Apy, Setting, Counter, TransportEndpoint, Transaction, LogEntry import logging logger = logging.getLogger(__name__) class CounterSerializer(serializers.ModelSerializer): class Meta: model =...
mit
sidmitra/django_nonrel_testapp
django/core/management/__init__.py
152
17415
import os import sys from optparse import OptionParser, NO_DEFAULT import imp import django from django.core.management.base import BaseCommand, CommandError, handle_default_options from django.utils.importlib import import_module # For backwards compatibility: get_version() used to be in this module. get_version = d...
bsd-3-clause
greghogan/flink
flink-python/pyflink/fn_execution/beam/beam_operations_slow.py
4
4168
################################################################################ # 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...
apache-2.0
lucalianas/openmicroscopy
examples/Training/python/Task_Scripts/ROIs_To_Table.py
9
7625
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2011 University of Dundee & Open Microscopy Environment. # All Rights Reserved. # Use is subject to license terms supplied in LICENSE.txt # import omero.scripts as scripts from random import random import math from numpy import array f...
gpl-2.0
kern3020/opportunity
opportunity/tracker/migrations/0002_auto__add_mentorship.py
1
13807
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Mentorship' db.create_table('tracker_mentorship', ( ('id', self.gf('django.db.mo...
mit
stclair/wes-cms
django/contrib/gis/sitemaps/kml.py
482
2481
from django.core import urlresolvers from django.contrib.sitemaps import Sitemap from django.contrib.gis.db.models.fields import GeometryField from django.db import models class KMLSitemap(Sitemap): """ A minimal hook to produce KML sitemaps. """ geo_format = 'kml' def __init__(self, locations=Non...
bsd-3-clause
nwinter/bantling
src/lib/werkzeug/testsuite/formparser.py
63
16107
# -*- coding: utf-8 -*- """ werkzeug.testsuite.formparser ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the form parsing facilities. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import with_statement import unittest from StringIO import StringIO ...
mit
jjmleiro/hue
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/templatetags/highlighting.py
41
3098
""" Similar to syntax_color.py but this is intended more for being able to copy+paste actual code into your Django templates without needing to escape or anything crazy. http://lobstertech.com/2008/aug/30/django_syntax_highlight_template_tag/ Example: {% load highlighting %} <style> @import url("http://lobsterte...
apache-2.0
sephii/django
tests/many_to_many/tests.py
58
19011
from __future__ import unicode_literals from django.db import transaction from django.test import TestCase from django.utils import six from .models import Article, Publication class ManyToManyTests(TestCase): def setUp(self): # Create a couple of Publications. self.p1 = Publication.objects.cre...
bsd-3-clause
inspirehep/invenio
modules/bibsword/lib/bibsword_config.py
19
4478
## This file is part of Invenio. ## Copyright (C) 2010, 2011, 2013 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 later versio...
gpl-2.0
Universal-Model-Converter/UMC3.0a
data/Python/x86/Lib/distutils/command/config.py
175
13130
"""distutils.command.config Implements the Distutils 'config' command, a (mostly) empty command class that exists mainly to be sub-classed by specific module distributions and applications. The idea is that while every "config" command is different, at least they're all named the same, and users always see "config" i...
mit