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 |
|---|---|---|---|---|---|
strint/tensorflow | tensorflow/contrib/learn/python/learn/estimators/metric_key.py | 36 | 1487 | # 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 |
PokeHunterProject/pogom-linux | pogom/pgoapi/protos/POGOProtos/Networking/Requests/Request_pb2.py | 16 | 2933 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: POGOProtos/Networking/Requests/Request.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.proto... | mit |
HRTKernel/Hacker_Kernel_SM-G92X | tools/perf/scripts/python/failed-syscalls-by-pid.py | 11180 | 2058 | # failed system call counts, by pid
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide failed system call totals, broken down by pid.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os
import sys
sys.pa... | gpl-2.0 |
virtualopensystems/nova | nova/virt/hyperv/volumeutilsv2.py | 15 | 4848 | # Copyright 2012 Pedro Navarro Perez
# Copyright 2013 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org... | apache-2.0 |
vmanoria/bluemix-hue-filebrowser | hue-3.8.1-bluemix/desktop/core/ext-py/markdown/markdown/extensions/legacy.py | 49 | 16190 | """
Legacy Extension for Python-Markdown
====================================
Replaces the core parser with the old one.
"""
import markdown, re
from markdown import etree
"""Basic and reusable regular expressions."""
def wrapRe(raw_re) : return re.compile("^%s$" % raw_re, re.DOTALL)
CORE_RE = {
'header': ... | gpl-2.0 |
erwilan/ansible | test/units/playbook/test_included_file.py | 145 | 3975 | # (c) 2016, Adrian Likins <alikins@redhat.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) any later vers... | gpl-3.0 |
clovett/MissionPlanner | Lib/site-packages/scipy/ndimage/tests/test_measurements.py | 53 | 34240 | from numpy.testing import assert_, assert_array_almost_equal, assert_equal, \
assert_almost_equal, assert_array_equal, \
run_module_suite, TestCase, dec
import numpy as np
import sys
import scipy.ndimage as ndimage
types = [np.int8, np.uint8, np.int16,
np.u... | gpl-3.0 |
CrazyGuo/vincent | examples/map_examples.py | 11 | 6721 | # -*- coding: utf-8 -*-
"""
Vincent Map Examples
"""
#Build a map from scratch
from vincent import *
world_topo = r'world-countries.topo.json'
state_topo = r'us_states.topo.json'
lake_topo = r'lakes_50m.topo.json'
county_geo = r'us_counties.geo.json'
county_topo = r'us_counties.topo.json'
or_topo = r'or_counties.t... | mit |
shaitan/elliptics | tests/pytests/test_session_rwr.py | 4 | 14355 | # =============================================================================
# 2013+ Copyright (c) Kirill Smorodinnikov <shaitkir@gmail.com>
# All rights reserved.
#
# 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 Fre... | lgpl-3.0 |
ruguevara/neon | neon/datasets/iris.py | 7 | 8964 | # ----------------------------------------------------------------------------
# Copyright 2014 Nervana Systems 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.o... | apache-2.0 |
atareao/antiviral | msgfmt.py | 21 | 6229 | # -*- coding: utf-8 -*-
# Written by Martin v. Lwis <loewis@informatik.hu-berlin.de>
# Plural forms support added by alexander smishlajev <alex@tycobka.lv>
"""
Generate binary message catalog from textual translation description.
This program converts a textual Uniforum-style message catalog (.po file) into
a binary G... | gpl-3.0 |
brainstorm/python_koans | python2/koans/about_multiple_inheritance.py | 107 | 4006 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Slightly based on AboutModules in the Ruby Koans
#
from runner.koan import *
class AboutMultipleInheritance(Koan):
class Nameable(object):
def __init__(self):
self._name = None
def set_name(self, new_name):
self._name = n... | mit |
rachwong00/wong-byte2 | lib/werkzeug/contrib/sessions.py | 315 | 12423 | # -*- coding: utf-8 -*-
r"""
werkzeug.contrib.sessions
~~~~~~~~~~~~~~~~~~~~~~~~~
This module contains some helper classes that help one to add session
support to a python WSGI application. For full client-side session
storage see :mod:`~werkzeug.contrib.securecookie` which implements a
secure,... | apache-2.0 |
ElDeveloper/scikit-learn | sklearn/externals/funcsigs.py | 118 | 29982 | # Copyright 2001-2013 Python Software Foundation; All Rights Reserved
"""Function signature objects for callables
Back port of Python 3.3's function signature tools from the inspect module,
modified to be compatible with Python 2.6, 2.7 and 3.2+.
"""
from __future__ import absolute_import, division, print_function
imp... | bsd-3-clause |
larsmans/scipy | scipy/optimize/tests/test_optimize.py | 3 | 41551 | """
Unit tests for optimization routines from optimize.py
Authors:
Ed Schofield, Nov 2005
Andrew Straw, April 2008
To run it in its simplest form::
nosetests test_optimize.py
"""
from __future__ import division, print_function, absolute_import
import warnings
import itertools
import numpy as np
from numpy.... | bsd-3-clause |
yb-kim/gemV | src/mem/slicc/symbols/Type.py | 11 | 22860 | # Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
# Copyright (c) 2009 The Hewlett-Packard Development Company
# 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 co... | bsd-3-clause |
libsh-archive/sh | test/regress/ceil.cpp.py | 1 | 1153 | #!/usr/bin/python
import shtest, sys, common
from common import *
from math import *
def ceil_test(p, types=[]):
if is_array(p):
result = [ceil(a) for a in p]
else:
result = [ceil(p)]
return shtest.make_test(result, [p], types)
def insert_into(test):
test.add_test(ceil_test((3.0, 3.1,... | lgpl-2.1 |
t794104/ansible | lib/ansible/modules/database/mongodb/mongodb_user.py | 24 | 15538 | #!/usr/bin/python
# (c) 2012, Elliott Foster <elliott@fourkitchens.com>
# Sponsored by Four Kitchens http://fourkitchens.com.
# (c) 2014, Epic Games, Inc.
#
# 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
__m... | gpl-3.0 |
embeddedarm/android_external_chromium_org | build/android/pylib/device/adb_wrapper_test.py | 26 | 2595 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Tests for the AdbWrapper class."""
import os
import socket
import tempfile
import time
import unittest
import adb_wrapper
class TestAdbWrapper(unittes... | bsd-3-clause |
jhermann/rituals | src/rituals/util/antglob.py | 1 | 6871 | # -*- coding: utf-8 -*-
# pylint: disable=too-few-public-methods
""" Recursive globbing with ant-style syntax.
"""
#
# The MIT License (MIT)
#
# Original source (2014-02-17) from https://github.com/zacherates/fileset.py
# Copyright (c) 2012 Aaron Maenpaa
#
# Modifications at https://github.com/jhermann/rituals
# Copyri... | gpl-2.0 |
chrislyon/dj_ds1 | static/Brython3.2.0-20150701-214155/Lib/test/unittests/test_grp.py | 85 | 3141 | """Test script for the grp module."""
import unittest
from test import support
grp = support.import_module('grp')
class GroupDatabaseTestCase(unittest.TestCase):
def check_value(self, value):
# check that a grp tuple has the entries and
# attributes promised by the docs
self.assertEqual(... | gpl-2.0 |
DigiThinkIT/stem | test/unit/version.py | 1 | 8982 | """
Unit tests for the stem.version.Version parsing and class.
"""
import unittest
import stem.util.system
import stem.version
from stem.version import Version
try:
# added in python 3.3
from unittest.mock import patch
except ImportError:
from mock import patch
TOR_VERSION_OUTPUT = """Mar 22 23:09:37.088 [no... | lgpl-3.0 |
zhujianwei31415/deepfr | scripts/deepfr/extract_feature.py | 2 | 4507 | #! /usr/bin/env python
#
# Copyright
# Author: zhujianwei@ict.ac.cn (Jianwei Zhu)
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import os
import sys
import time
import numpy as np
from utils import parse_listfile, parse_protein_id
from loc... | gpl-3.0 |
MaDKaTZe/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/outputcapture.py | 124 | 5478 | # Copyright (c) 2009, Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the... | bsd-3-clause |
dh-electronics/linux-imx25 | arch/ia64/scripts/unwcheck.py | 13143 | 1714 | #!/usr/bin/python
#
# Usage: unwcheck.py FILE
#
# This script checks the unwind info of each function in file FILE
# and verifies that the sum of the region-lengths matches the total
# length of the function.
#
# Based on a shell/awk script originally written by Harish Patil,
# which was converted to Perl by Matthew Ch... | gpl-2.0 |
sinhrks/scikit-learn | examples/svm/plot_custom_kernel.py | 171 | 1546 | """
======================
SVM with custom kernel
======================
Simple usage of Support Vector Machines to classify a sample. It will
plot the decision surface and the support vectors.
"""
print(__doc__)
import numpy as np
import matplotlib.pyplot as plt
from sklearn import svm, datasets
# import some data... | bsd-3-clause |
lsinfo/odoo | addons/email_template/wizard/email_template_preview.py | 377 | 3851 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2009 Sharoon Thomas
# Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it ... | agpl-3.0 |
chhao91/QGIS | python/ext-libs/owslib/swe/observation/sos100.py | 27 | 12319 | import cgi
from owslib.etree import etree
from datetime import datetime
from urllib import urlencode
from owslib import ows
from owslib.crs import Crs
from owslib.fes import FilterCapabilities
from owslib.util import openURL, testXMLValue, nspath_eval, nspath, extract_time
from owslib.namespaces import Namespaces
def ... | gpl-2.0 |
ericzundel/pants | src/python/pants/bin/pants_exe.py | 10 | 1738 | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import locale
import... | apache-2.0 |
nfallen/servo | tests/wpt/css-tests/tools/html5lib/html5lib/treewalkers/lxmletree.py | 618 | 6033 | from __future__ import absolute_import, division, unicode_literals
from six import text_type
from lxml import etree
from ..treebuilders.etree import tag_regexp
from gettext import gettext
_ = gettext
from . import _base
from .. import ihatexml
def ensure_str(s):
if s is None:
return None
elif isin... | mpl-2.0 |
brayden2544/Mystuff-final | static_files/manage/views/transactions.py | 2 | 1094 | from django import forms
from django.conf import settings
from django.http import HttpResponse, HttpResponseRedirect, Http404
from manage import models as mmod
from catalog import models as cmod
from . import templater
from django.contrib.auth.decorators import user_passes_test
import datetime
@user_passes_test(lambda... | apache-2.0 |
pozdnyakov/chromium-crosswalk | build/android/pylib/perf_tests_helper.py | 26 | 6792 | # 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.
import re
import sys
import android_commands
import json
import logging
import math
# Valid values of result type.
RESULT_TYPES = {'unimportant': 'RESU... | bsd-3-clause |
comeonfox/Paddle | demo/model_zoo/resnet/classify.py | 2 | 11022 | # Copyright (c) 2016 Baidu, Inc. All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 |
Woerd88/script.module.hachoir | lib/hachoir_core/field/generic_field_set.py | 58 | 19210 | from hachoir_core.field import (MissingField, BasicFieldSet, Field, ParserError,
createRawField, createNullField, createPaddingField, FakeArray)
from hachoir_core.dict import Dict, UniqKeyError
from hachoir_core.error import HACHOIR_ERRORS
from hachoir_core.tools import lowerBound, makeUnicode
import hachoir_core.c... | gpl-2.0 |
cadrev/Titanic-Prediction | data-munging.py | 1 | 3412 | #
# Title : Data munging(AKA cleaning) the Titanic Data
# Author : Felan Carlo Garcia
#
# Notes:
# -- Code is based on the Kaggle Python Tutorial
# -- data cleaning prior to implementing a machine learning algorithm.
import numpy as np
import pandas as pd
def processdata(filename, outputname):
df = pd.read... | mit |
bfirsh/docker-py | setup.py | 1 | 2327 | #!/usr/bin/env python
import codecs
import os
import sys
from setuptools import setup, find_packages
ROOT_DIR = os.path.dirname(__file__)
SOURCE_DIR = os.path.join(ROOT_DIR)
requirements = [
'requests >= 2.5.2, != 2.11.0',
'six >= 1.4.0',
'websocket-client >= 0.32.0',
'docker-pycreds >= 0.2.1'
]
if... | apache-2.0 |
NERC-CEH/ecomaps | ecomaps/controllers/wmsviz.py | 1 | 9385 | # Copyright (C) 2007 STFC & NERC (Science and Technology Facilities Council).
# This software may be distributed under the terms of the
# Q Public License, version 1.0 or later.
# http://ndg.nerc.ac.uk/public_docs/QPublic_license.txt
#
"""
Controller for the 'View' tab - allowing the display of WMC map layers
@autho... | gpl-2.0 |
hrvojem/percona-xtrabackup | storage/innobase/xtrabackup/test/python/subunit/tests/test_tap2subunit.py | 62 | 15605 | #
# subunit: extensions to python unittest to get test results from subprocesses.
# Copyright (C) 2005 Robert Collins <robertc@robertcollins.net>
#
# Licensed under either the Apache License, Version 2.0 or the BSD 3-clause
# license at the users choice. A copy of both licenses are available in the
# project sour... | gpl-2.0 |
Altair3/Tanks | bzagents/agent0.py | 19 | 3850 | #!/usr/bin/python -tt
# An incredibly simple agent. All we do is find the closest enemy tank, drive
# towards it, and shoot. Note that if friendly fire is allowed, you will very
# often kill your own tanks with this code.
#################################################################
# NOTE TO STUDENTS
# This is... | gpl-3.0 |
molotof/infernal-twin | build/reportlab/build/lib.linux-i686-2.7/reportlab/lib/extformat.py | 32 | 2229 | #Copyright ReportLab Europe Ltd. 2000-2012
#see license.txt for license details
__version__='''$Id$'''
__doc__='''Apparently not used anywhere, purpose unknown!'''
try:
from tokenize import tokenprog
except ImportError:
from tokenize import Token
import re
tokenprog = re.compile(Token)
del Token, re
import sys
de... | gpl-3.0 |
quinot/ansible | lib/ansible/modules/cloud/amazon/ecs_taskdefinition.py | 25 | 15843 | #!/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 |
isidorn/test2 | packaging/scripts/VirtuaBuild/vm_build.py | 7 | 10207 | # Copyright 2010-2012 RethinkDB, all rights reserved.
import os
import socket
import time
import socket
# pythonic discriminated union I guess, this is kind of retarded.
#actually 0 need for a base class it's really more like a comment
#that happens to be runable code
class RunError(Exception):
def __init__(self... | agpl-3.0 |
vuolter/pyload | src/pyload/plugins/addons/AndroidPhoneNotify.py | 2 | 1736 | # -*- coding: utf-8 -*-
from ..base.notifier import Notifier
class AndroidPhoneNotify(Notifier):
__name__ = "AndroidPhoneNotify"
__type__ = "addon"
__version__ = "0.16"
__status__ = "testing"
__config__ = [
("enabled", "bool", "Activated", False),
("apikey", "str", "API key", "")... | agpl-3.0 |
intlabs/cannyos-backend-dashboard | horizon-master/openstack_dashboard/test/integration_tests/pages/keypairpage.py | 11 | 2905 | # Copyright 2014 Hewlett-Packard Development Company, L.P
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.... | mit |
ageron/tensorflow | tensorflow/contrib/estimator/python/estimator/export.py | 19 | 1300 | # Copyright 2018 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 |
seocam/django | django/utils/lorem_ipsum.py | 505 | 4960 | """
Utility functions for generating "lorem ipsum" Latin text.
"""
from __future__ import unicode_literals
import random
COMMON_P = (
'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod '
'tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim '
'veniam, quis nostrud e... | bsd-3-clause |
vmanoria/bluemix-hue-filebrowser | hue-3.8.1-bluemix/desktop/core/src/desktop/log/log_buffer_test.py | 40 | 1399 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | gpl-2.0 |
coolbombom/CouchPotatoServer | libs/pyutil/test/current/test_verlib.py | 106 | 4315 | # -*- coding: utf-8 -*-
"""Tests for distutils.version."""
import unittest
import doctest
from pyutil.verlib import NormalizedVersion as V
from pyutil.verlib import IrrationalVersionError
from pyutil.verlib import suggest_normalized_version as suggest
class VersionTestCase(unittest.TestCase):
versions = ((V('1.... | gpl-3.0 |
EtienneCmb/tensorpac | tensorpac/methods/meth_erpac.py | 1 | 5370 | """Individual methods for assessing ERPAC."""
import numpy as np
from scipy.stats import chi2
from joblib import Parallel, delayed
from tensorpac.gcmi import nd_mi_gg
from tensorpac.config import CONFIG
def pearson(x, y, st='i...j, k...j->ik...'):
"""Pearson correlation for multi-dimensional arrays.
Parame... | bsd-3-clause |
SymbiFlow/nixpkgs | pkgs/development/compilers/adoptopenjdk-bin/generate-sources.py | 2 | 2081 | #!/usr/bin/env nix-shell
#!nix-shell --pure -i python3 -p "python3.withPackages (ps: with ps; [ requests ])"
import json
import re
import requests
import sys
releases = ["openjdk11"]
oses = ["mac", "linux"]
types = ["jre", "jdk"]
impls = ["hotspot", "openj9"]
arch_to_nixos = {
"x64": "x86_64",
"aarch64": "aa... | mit |
nanditav/15712-TensorFlow | tensorflow/contrib/learn/python/learn/datasets/mnist.py | 25 | 8308 | # 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 |
seansu4you87/kupo | projects/molt/venv/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.py | 132 | 38702 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""Implementation of the Metadata for Python packages PEPs.
Supports all metadata formats (1.0, 1.1, 1.2, and 2.0 experimental).
"""
from __future__ import unicode_literals
import codecs
from email... | mit |
tobiasgoecke/django-messages | tests/settings.py | 1 | 1335 | import os.path
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django_messages'
]
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'dj... | bsd-3-clause |
vagonbar/GNUnetwork | gwn/gwnc/python/Param.py | 2 | 18071 | """
Copyright 2008-2011 Free Software Foundation, Inc.
This file is part of GNU Radio
GNU Radio Companion 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 l... | gpl-3.0 |
ramcn/demo3 | venv/lib/python3.4/site-packages/pip/utils/appdirs.py | 311 | 9173 | """
This code was taken from https://github.com/ActiveState/appdirs and modified
to suite our purposes.
"""
from __future__ import absolute_import
import os
import sys
from pip.compat import WINDOWS
def user_cache_dir(appname):
r"""
Return full path to the user-specific cache dir for this application.
... | mit |
abhinavmoudgil95/root | interpreter/llvm/src/tools/clang/utils/analyzer/SumTimerInfo.py | 46 | 3095 | #!/usr/bin/env python
"""
Script to Summarize statistics in the scan-build output.
Statistics are enabled by passing '-internal-stats' option to scan-build
(or '-analyzer-stats' to the analyzer).
"""
import string
from operator import itemgetter
import sys
if __name__ == '__main__':
if len(sys.argv) < 2:
... | lgpl-2.1 |
zhengjunwei/configuration | util/vpc-tools/create_stack.py | 70 | 3939 | import argparse
import boto
import yaml
from os.path import basename
from time import sleep
from pprint import pprint
FAILURE_STATES = [
'CREATE_FAILED',
'ROLLBACK_IN_PROGRESS',
'ROLLBACK_FAILED',
'ROLLBACK_COMPLETE',
'DELETE_IN_PROGRESS',
'DELETE_FAILED',
'DELETE_COMPLETE',
]
def upl... | agpl-3.0 |
Klomi/appinventor-sources | appinventor/misc/passwordmail/message_pb2.py | 34 | 2147 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: message.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
... | apache-2.0 |
edhuckle/statsmodels | statsmodels/miscmodels/tests/test_poisson.py | 27 | 6776 | '''Testing GenericLikelihoodModel variations on Poisson
'''
import numpy as np
from numpy.testing import assert_almost_equal
import statsmodels.api as sm
from statsmodels.miscmodels.count import PoissonGMLE, PoissonOffsetGMLE, \
PoissonZiGMLE
from statsmodels.discrete.discrete_model import Poi... | bsd-3-clause |
ismailsunni/inasafe | safe/gis/raster/test/test_contour.py | 3 | 2326 | # coding=utf-8
"""Test Contour."""
import os
from safe.definitions.constants import INASAFE_TEST
from safe.test.utilities import (
load_test_raster_layer, standard_data_path)
import unittest
from safe.gis.raster.contour import (
create_smooth_contour, smooth_shakemap, shakemap_contour)
from safe.common.utili... | gpl-3.0 |
WebSpider/SickRage | lib/sqlalchemy/dialects/mssql/information_schema.py | 79 | 5084 | # mssql/information_schema.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
# TODO: should be using the sys. catalog with SQL Server, not information ... | gpl-3.0 |
hehongliang/tensorflow | tensorflow/contrib/labeled_tensor/python/ops/io_ops_test.py | 158 | 4486 | # 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 |
flavour/RedHat | modules/geojson/feature.py | 48 | 1535 | # ============================================================================
# GeoJSON. Copyright (C) 2007 Sean C. Gillies
#
# See ../LICENSE.txt
#
# Contact: Sean Gillies, sgillies@frii.com
# ============================================================================
"""
SimpleWebFeature is a working example of a... | mit |
bruckhaus/challenges | python_challenges/project_euler/p012_highly_divisible.py | 1 | 2097 | __author__ = 'tilmannbruckhaus'
import numpy
import sys
class HighlyDivisible:
# Highly divisible triangular number
# Problem 12
# The sequence of triangle numbers is generated by adding the natural numbers.
# So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28.
# The first ten te... | mit |
dequis/qtile | libqtile/log_utils.py | 4 | 4593 | # Copyright (c) 2012 Florian Mounier
# Copyright (c) 2013-2014 Tao Sauvage
# Copyright (c) 2014 Sean Vig
# Copyright (c) 2014 roger
#
# 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 r... | mit |
KLab/python-oauth2 | setup.py | 295 | 1233 | #!/usr/bin/env python
from setuptools import setup, find_packages
import os, re
PKG='oauth2'
VERSIONFILE = os.path.join('oauth2', '_version.py')
verstr = "unknown"
try:
verstrline = open(VERSIONFILE, "rt").read()
except EnvironmentError:
pass # Okay, there is no version file.
else:
MVSRE = r"^manual_verstr... | mit |
jean/sentry | tests/sentry/api/endpoints/test_project_environments.py | 2 | 1220 | from __future__ import absolute_import
from django.core.urlresolvers import reverse
from sentry.models import Environment
from sentry.testutils import APITestCase
class ProjectEnvironmentsTest(APITestCase):
def test_simple(self):
project = self.create_project()
env1 = Environment.objects.create... | bsd-3-clause |
ctozlm/Dato-Core | src/unity/python/graphlab/meta/decompiler/simple_instructions.py | 13 | 29481 | '''
Created on Jul 14, 2011
@author: sean
'''
from __future__ import print_function
from opcode import *
import _ast
import sys
from graphlab.meta.utils import py3, py3op, py2op
from graphlab.meta.asttools.visitors.print_visitor import print_ast, dump_ast
from graphlab.meta.asttools import cmp_ast
if py3:
class... | agpl-3.0 |
Ultimaker/Cura | plugins/VersionUpgrade/VersionUpgrade21to22/VersionUpgrade21to22.py | 1 | 18773 | # Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import configparser #To get version numbers from config files.
from typing import Dict, Iterable, List, Optional, Set, Tuple
from UM.VersionUpgrade import VersionUpgrade # Superclass of the plugin.
from . import MachineIn... | lgpl-3.0 |
nathanielvarona/airflow | airflow/jobs/local_task_job.py | 1 | 8884 | #
# 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... | apache-2.0 |
ChaiScript/linguist | samples/Python/django-models-base.py | 92 | 40883 | from __future__ import unicode_literals
import copy
import sys
from functools import update_wrapper
from future_builtins import zip
import django.db.models.manager # Imported to register signal handler.
from django.conf import settings
from django.core.exceptions import (ObjectDoesNotExist,
MultipleObjectsRet... | mit |
ykoga-kyutech/nippou_proj | nippou_app/migrations/0001_initial.py | 1 | 4531 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.core.validators
import django.utils.timezone
import django.contrib.auth.models
import datetime
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
(... | mit |
spisneha25/django | django/conf/locale/lt/formats.py | 504 | 1830 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = r'Y \m. E j \d.'
TIME_FORMAT = 'H:... | bsd-3-clause |
bjzhang/xen_arm_pv | tools/python/xen/xend/XendVnet.py | 52 | 5488 | #============================================================================
# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
# This library is distributed in the hope th... | gpl-2.0 |
sapphon/minecraftpython | src/main/resources/assets/minecraftpython/scripts/base/items.py | 1 | 4641 | IRON_SHOVEL = 'iron_shovel'
IRON_PICKAXE = 'iron_pickaxe'
IRON_AXE = 'iron_axe'
FLINT_AND_STEEL = 'flint_and_steel'
APPLE = 'apple'
BOW = 'bow'
ARROW = 'arrow'
COAL = 'coal'
DIAMOND = 'diamond'
IRON_INGOT = 'iron_ingot'
GOLD_INGOT = 'gold_ingot'
IRON_SWORD = 'iron_sword'
WOODEN_SWORD = 'wooden_sword'
WOODEN_SHOVEL = 'w... | gpl-3.0 |
nicolargo/intellij-community | python/helpers/coverage/control.py | 159 | 29646 | """Core control stuff for Coverage."""
import atexit, os, random, socket, sys
from coverage.annotate import AnnotateReporter
from coverage.backward import string_class, iitems, sorted # pylint: disable=W0622
from coverage.codeunit import code_unit_factory, CodeUnit
from coverage.collector import Collector
from cover... | apache-2.0 |
ingadhoc/odoo-help | help_doc_portal/__openerp__.py | 1 | 1517 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar)
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Pu... | agpl-3.0 |
rocky/python-spark | example/python2/py2_parser.py | 1 | 20426 | # Copyright (c) 2016-2017 Rocky Bernstein
"""
More complex expression parsing
"""
# from __future__ import print_function
import sys
from spark_parser.ast import AST
from py2_scan import Python2Scanner, ENDMARKER
from spark_parser import GenericASTBuilder
DEFAULT_DEBUG = {'rules': False, 'transition': False, 'red... | mit |
vrsys/avangong | examples/low-level-display-setup/compositeviewer-setup.py | 6 | 4873 | # -*- Mode:Python -*-
##########################################################################
# #
# This file is part of AVANGO. #
# ... | lgpl-3.0 |
x111ong/django | django/contrib/contenttypes/management.py | 476 | 2521 | from django.apps import apps
from django.db import DEFAULT_DB_ALIAS, router
from django.utils import six
from django.utils.six.moves import input
def update_contenttypes(app_config, verbosity=2, interactive=True, using=DEFAULT_DB_ALIAS, **kwargs):
"""
Creates content types for models in the given app, removin... | bsd-3-clause |
ntiufalara/openerp7 | openerp/addons/analytic_user_function/__openerp__.py | 119 | 2056 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | mit |
squidsoup/snapcraft | snapcraft/plugins/kernel.py | 4 | 12886 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2016 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 |
jmanday/Master | TFM/library/opencv-3.2.0/modules/python/test/test_texture_flow.py | 2 | 1123 | #!/usr/bin/env python
'''
Texture flow direction estimation.
Sample shows how cv2.cornerEigenValsAndVecs function can be used
to estimate image texture flow direction.
'''
# Python 2/3 compatibility
from __future__ import print_function
import numpy as np
import cv2
import sys
from tests_common import NewOpenCVTes... | apache-2.0 |
ar4s/django | django/views/decorators/http.py | 228 | 7105 | """
Decorators for views based on HTTP headers.
"""
import logging
from calendar import timegm
from functools import wraps
from django.utils.decorators import decorator_from_middleware, available_attrs
from django.utils.http import http_date, parse_http_date_safe, parse_etags, quote_etag
from django.middleware.http i... | bsd-3-clause |
DelazJ/QGIS | tests/src/python/test_qgsserver_wms_dxf.py | 18 | 2175 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsServer WMS GetPrint.
From build dir, run: ctest -R PyQgsServerWMSGetMapDxf -V
.. 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 vers... | gpl-2.0 |
jlcarmic/producthunt_simulator | venv/lib/python2.7/site-packages/scipy/special/__init__.py | 33 | 22410 | """
========================================
Special functions (:mod:`scipy.special`)
========================================
.. module:: scipy.special
Nearly all of the functions below are universal functions and follow
broadcasting and automatic array-looping rules. Exceptions are noted.
Error handling
==========... | mit |
SebKuzminsky/linuxcnc-mirror | configs/sim/axis/orphans/iocontrol-removed/python/oword.py | 7 | 4539 | # This is a component of LinuxCNC
# Copyright 2011, 2013 Dewey Garrett <dgarrett@panix.com>, Michael
# Haberler <git@mah.priv.at>
#
# 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... | lgpl-2.1 |
levkar/odoo | addons/stock/tests/test_shipment.py | 27 | 2475 | # -*- coding: utf-8 -*-
from odoo.addons.stock.tests.common2 import TestStockCommon
class TestInventory(TestStockCommon):
def test_shipment(self):
# TDE NOTE: this test replaces test/shipment.yml present until saas-10
# TDE TODO
# pickign.action_confirm -> confirm moves
# picking... | agpl-3.0 |
FreeAgent/djangoappengine-starter | django/template/loaders/app_directories.py | 229 | 2764 | """
Wrapper for loading templates from "templates" directories in INSTALLED_APPS
packages.
"""
import os
import sys
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.template.base import TemplateDoesNotExist
from django.template.loader import BaseLoader
from django.u... | bsd-3-clause |
sparkslabs/kamaelia | Sketches/AB/backup/Bookmarks/DBDurationCorrector.py | 3 | 3064 | #! /usr/bin/python
import MySQLdb
import cjson
import os
import sys
channels = {"bbcone" : ["bbc one", "/bbcone/programmes/schedules/north_west/today"],
"bbctwo" : ["bbc two", "/bbctwo/programmes/schedules/england"],
"bbcthree" : ["bbc three", "/bbcthree/programmes/schedules"],
... | apache-2.0 |
computersalat/ansible | test/support/integration/plugins/modules/locale_gen.py | 106 | 7254 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# 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',
'status': ['preview'],
... | gpl-3.0 |
agileblaze/OpenStackTwoFactorAuthentication | openstack_dashboard/dashboards/project/data_processing/jobs/urls.py | 34 | 1733 | # 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 the... | apache-2.0 |
yasarkunduz/Wookmark-jQuery | doc/conf.py | 15 | 9259 | # -*- coding: utf-8 -*-
#
# Wookmark documentation build configuration file, created by
# sphinx-quickstart on Thu Jun 4 09:41:23 2015.
#
# 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.
#
# ... | mit |
narahari92/spark | examples/src/main/python/mllib/hypothesis_testing_example.py | 91 | 2630 | #
# 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 us... | apache-2.0 |
abtink/openthread | tests/scripts/thread-cert/pktverify/summary.py | 7 | 6005 | #!/usr/bin/env python3
#
# Copyright (c) 2019, The OpenThread 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:
# 1. Redistributions of source code must retain the above copyright
# ... | bsd-3-clause |
maru/fiubar | fiubar/config/settings/local.py | 1 | 2473 | # -*- coding: utf-8 -*-
"""
Local settings
- Run in Debug mode
- Use console backend for emails
- Add Django Debug Toolbar
- Add django-extensions as app
"""
import socket
from django.contrib.messages import constants as message_constants
from .common import * # noqa
# DEBUG
# -----------------------------------... | mit |
srikantbmandal/ansible | lib/ansible/modules/identity/ipa/ipa_sudocmdgroup.py | 71 | 7679 | #!/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 |
visualputty/Landing-Lights | django/core/files/images.py | 324 | 1733 | """
Utility functions for handling images.
Requires PIL, as you might imagine.
"""
from django.core.files import File
class ImageFile(File):
"""
A mixin for use alongside django.core.files.base.File, which provides
additional features for dealing with images.
"""
def _get_width(self):
ret... | bsd-3-clause |
maxkoryukov/headphones | lib/mako/ext/autohandler.py | 60 | 1841 | # ext/autohandler.py
# Copyright (C) 2006-2015 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""adds autohandler functionality to Mako templates.
requires that the TemplateLookup class is... | gpl-3.0 |
IsCoolEntertainment/debpkg_python-pyzmq | examples/bench/plot_latency.py | 12 | 2229 | """Plot latency data from messaging benchmarks.
To generate the data for each library, I started the server and then did
the following for each client::
from xmlrpc_client import client
for i in range(9):
s = '0'*10**i
print s
%timeit client.echo(s)
"""
from matplotlib.pylab import *
... | lgpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.