repo_name stringlengths 5 100 | path stringlengths 4 294 | copies stringclasses 990
values | size stringlengths 4 7 | content stringlengths 666 1M | license stringclasses 15
values |
|---|---|---|---|---|---|
google-research/google-research | seq2act/data_generation/create_android_synthetic_dataset.py | 1 | 22915 | # coding=utf-8
# Copyright 2021 The Google Research 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 applicab... | apache-2.0 |
sumedhasingla/VTK | ThirdParty/Twisted/twisted/python/win32.py | 36 | 5436 | # -*- test-case-name: twisted.python.test.test_win32 -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Win32 utilities.
See also twisted.python.shortcut.
@var O_BINARY: the 'binary' mode flag on Windows, or 0 on other platforms, so it
may safely be OR'ed into a mask for os.open.
"""... | bsd-3-clause |
mlperf/training_results_v0.5 | v0.5.0/google/cloud_v2.8/resnet-tpuv2-8/code/resnet/model/models/official/utils/misc/model_helpers_test.py | 4 | 4502 | # 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 |
joaquimrocha/Rancho | rancho/lib/templatetags/displaystatistic.py | 1 | 1691 | ########################################################################
# Rancho - Open Source Group/Project Management Tool
# Copyright (C) 2008 The Rancho Team
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by t... | agpl-3.0 |
qnib/QNIBCollect | src/diamond/collectors/disktemp/disktemp.py | 49 | 3036 | # coding=utf-8
"""
Collect disk temperature with S.M.A.R.T.
This collector use hddtemp to collect only the disk temperature from the disk
S.M.A.R.T information. This can be faster than smartctl since it only extracts
a single value.
#### Dependencies
* [hddtemp](http://www.guzu.net/linux/hddtemp.php)
"""
import ... | apache-2.0 |
chushao/Gradesource-Uploader---GUI | Gradesource-Uploader-master/gradesourceuploader.py | 2 | 2394 | # gradesourceuploader.py
# Chu Shao
# Dec 22, 2012
# cshao@eng.ucsd.edu
from gradesourcesession import GradesourceSession
from getpass import getpass
# To use: gradesourceuploader.downloadEmail(loginname, courseID)
# Also, these can be hardcoded as global variables
#
# staticLogin = 'moocow'
# staticCourseID = '12345... | mit |
tuxfux-hlp-notes/python-batches | batch-67/19-files/myenv/lib/python2.7/site-packages/pip/_vendor/ordereddict.py | 1047 | 4094 | # Copyright (c) 2009 Raymond Hettinger
#
# 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, modify, merge,
# publish,... | gpl-3.0 |
MicroTrustRepos/microkernel | src/l4/pkg/python/contrib/Lib/test/test_nis.py | 58 | 1317 | from test import test_support
import unittest
import nis
class NisTests(unittest.TestCase):
def test_maps(self):
try:
maps = nis.maps()
except nis.error, msg:
# NIS is probably not active, so this test isn't useful
if test_support.verbose:
print "... | gpl-2.0 |
sylarcp/anita | venv/lib/python2.7/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 ... | mit |
okwow123/djangol2 | example/env/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py | 216 | 13871 | '''SSL with SNI_-support for Python 2.
This needs the following packages installed:
* pyOpenSSL (tested with 0.13)
* ndg-httpsclient (tested with 0.3.2)
* pyasn1 (tested with 0.1.6)
To activate it call :func:`~urllib3.contrib.pyopenssl.inject_into_urllib3`.
This can be done in a ``sitecustomize`` module, or at any o... | mit |
kariefury/sailor-atlas | sailor-atlas/main.py | 1 | 1590 | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | gpl-2.0 |
rhertzog/django | django/apps/registry.py | 51 | 16980 | import sys
import threading
import warnings
from collections import Counter, OrderedDict, defaultdict
from functools import partial
from django.core.exceptions import AppRegistryNotReady, ImproperlyConfigured
from django.utils import lru_cache
from .config import AppConfig
class Apps(object):
"""
A registry... | bsd-3-clause |
ThomasFeher/audacity | lib-src/lv2/lv2/plugins/eg-amp.lv2/waflib/Tools/gcc.py | 196 | 2738 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
from waflib.Tools import ccroot,ar
from waflib.Configure import conf
@conf
def find_gcc(conf):
cc=conf.find_program(['gcc','cc'],var='CC')
cc=conf.cmd_to_list(cc)
conf.get_... | gpl-2.0 |
Xeralux/tensorflow | tensorflow/python/keras/_impl/keras/applications/inception_resnet_v2.py | 4 | 15143 | # 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 |
bopo/PopClip-Extensions | source/OneNote/requests/packages/urllib3/packages/six.py | 2375 | 11628 | """Utilities for writing code that runs on Python 2 and 3"""
#Copyright (c) 2010-2011 Benjamin Peterson
#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 l... | mit |
bdh1011/wau | venv/lib/python2.7/site-packages/path.py | 1 | 55665 | #
# Copyright (c) 2010 Mikhail Gusarov
#
# 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, modify, merge, publish, d... | mit |
lwiecek/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 |
teamfx/openjfx-9-dev-rt | modules/javafx.web/src/main/native/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py | 1 | 19188 | # Copyright (C) 2011 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 ... | gpl-2.0 |
rosmo/ansible | lib/ansible/modules/network/f5/bigip_provision.py | 15 | 28869 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks 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
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 |
tarzan0820/odoo | addons/account/account_bank.py | 258 | 5481 | # -*- 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 |
trivoldus28/pulsarch-verilog | tools/local/bas-release/bas,3.9/lib/python/lib/python2.3/idlelib/ColorDelegator.py | 2 | 9256 | import time
import re
import keyword
from Tkinter import *
from Delegator import Delegator
from configHandler import idleConf
#$ event <<toggle-auto-coloring>>
#$ win <Control-slash>
#$ unix <Control-slash>
DEBUG = 0
def any(name, list):
return "(?P<%s>" % name + "|".join(list) + ")"
def make_pat():
kw = r... | gpl-2.0 |
proppy/appengine-try-python-flask | lib/werkzeug/debug/repr.py | 313 | 9350 | # -*- coding: utf-8 -*-
"""
werkzeug.debug.repr
~~~~~~~~~~~~~~~~~~~
This module implements object representations for debugging purposes.
Unlike the default repr these reprs expose a lot more information and
produce HTML instead of ASCII.
Together with the CSS and JavaScript files of the debug... | apache-2.0 |
espadrine/opera | chromium/src/third_party/python_26/Lib/encodings/hp_roman8.py | 647 | 7391 | """ Python Character Mapping Codec generated from 'hp_roman8.txt' with gencodec.py.
Based on data from ftp://dkuug.dk/i18n/charmaps/HP-ROMAN8 (Keld Simonsen)
Original source: LaserJet IIP Printer User's Manual HP part no
33471-90901, Hewlet-Packard, June 1989.
"""#"
import codecs
### Codec APIs
class ... | bsd-3-clause |
krafczyk/spack | var/spack/repos/builtin/packages/r-trimcluster/package.py | 5 | 1642 | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 |
pigeonflight/strider-plone | docker/appengine/lib/django-1.4/tests/regressiontests/file_storage/tests.py | 23 | 20745 | # -*- coding: utf-8 -*-
import errno
import os
import shutil
import sys
import tempfile
import time
from datetime import datetime, timedelta
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
try:
import threading
except ImportError:
import dummy_threading as threadin... | mit |
tungvx/deploy | .google_appengine/google/appengine/api/appinfo_includes.py | 7 | 9349 | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 |
SaM-Solutions/samba | source4/scripting/python/samba/netcmd/drs.py | 19 | 19605 | #!/usr/bin/env python
#
# implement samba_tool drs commands
#
# Copyright Andrew Tridgell 2010
#
# based on C implementation by Kamen Mazdrashki <kamen.mazdrashki@postpath.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by... | gpl-3.0 |
chrisfranzen/django | tests/regressiontests/introspection/tests.py | 44 | 7272 | from __future__ import absolute_import, unicode_literals
from functools import update_wrapper
from django.db import connection
from django.test import TestCase, skipUnlessDBFeature, skipIfDBFeature
from django.utils import six, unittest
from .models import Reporter, Article
if connection.vendor == 'oracle':
exp... | bsd-3-clause |
MediffRobotics/DeepRobotics | rpiRobotArm/InverseKine/robotics-toolbox-python1/trunk/robotics-toolbox-python/test/robot/jacobian.py | 5 | 3119 | """
Jacobian matrix operations.
@author: Peter Corke
@copyright: Peter Corke
"""
from numpy import *
from robot.utility import *
from robot.transform import *
from robot.kinematics import *
from numpy.linalg import norm
def jacob0(robot, q):
"""
Compute manipulator Jacobian in world coordinates for joint coo... | gpl-3.0 |
stephane-martin/salt-debian-packaging | salt-2016.3.3/salt/modules/smartos_vmadm.py | 2 | 28353 | # -*- coding: utf-8 -*-
'''
Module for running vmadm command on SmartOS
'''
from __future__ import absolute_import
# Import Python libs
import logging
import json
import os
try:
from shlex import quote as _quote_args # pylint: disable=E0611
except ImportError:
from pipes import quote as _quote_args
# Import ... | apache-2.0 |
Yen-Chung-En/w16b_test | static/Brython3.1.3-20150514-095342/Lib/subprocess.py | 728 | 67282 | # subprocess - Subprocesses with accessible I/O streams
#
# For more information about this module, see PEP 324.
#
# Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se>
#
# Licensed to PSF under a Contributor Agreement.
# See http://www.python.org/2.4/license for licensing details.
r"""subprocess - Subpr... | agpl-3.0 |
jamesliu/mxnet | python/mxnet/callback.py | 4 | 7827 | # 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 |
Comunitea/OCB | openerp/addons/base/res/res_currency.py | 35 | 15615 | # -*- 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 |
abhishekgahlot/youtube-dl | youtube_dl/extractor/nfl.py | 76 | 6197 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import (
compat_urllib_parse_urlparse,
)
from ..utils import (
ExtractorError,
int_or_none,
remove_end,
)
class NFLIE(InfoExtractor):
IE_NAME = 'nfl.com'
_VALID_URL = r'''(?x)htt... | unlicense |
dagbldr/dagbldr | dagbldr/nodes/tests/test_stochastic_nodes.py | 2 | 2939 | import numpy as np
import theano
from theano import tensor
from nose.tools import assert_raises
from numpy.testing import assert_almost_equal
from dagbldr.datasets import load_digits
from dagbldr import del_shared
from dagbldr.utils import convert_to_one_hot
from dagbldr.nodes import linear
from dagbldr.nodes import s... | bsd-3-clause |
aledbf/ingress-nginx | hack/add-namespace.py | 3 | 1420 | #!/usr/bin/env python3
# Copyright 2020 The Kubernetes 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 appl... | apache-2.0 |
pepeantena4040/MiSitioWeb | lib/toaster/bldcollector/views.py | 9 | 2744 | #
# BitBake Toaster Implementation
#
# Copyright (C) 2014 Intel Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it... | gpl-2.0 |
CollabQ/CollabQ | .google_appengine/google/appengine/api/namespace_manager/__init__.py | 1 | 2505 | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 |
leleobhz/phonetica | praatwrapper/praatwrapper.py | 1 | 1499 | # -*- coding: utf-8 -*-
# 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 hope that ... | gpl-2.0 |
daterrell2/pint_journal_project | pints_user/views.py | 2 | 3554 | from django.shortcuts import render, redirect
from django.core.urlresolvers import reverse
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from pints_user.forms import UserForm
from pints_user.models impor... | mit |
afloren/nipype | nipype/interfaces/semtools/diffusion/tests/test_auto_DWIConvert.py | 2 | 2188 | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.interfaces.semtools.diffusion.diffusion import DWIConvert
def test_DWIConvert_inputs():
input_map = dict(args=dict(argstr='%s',
),
conversionMode=dict(argstr='--conversionMode %s',
),
environ=d... | bsd-3-clause |
CryCLL/tmoHacko | requests/__init__.py | 69 | 3507 | # -*- coding: utf-8 -*-
# __
# /__) _ _ _ _ _/ _
# / ( (- (/ (/ (- _) / _)
# /
"""
Requests HTTP Library
~~~~~~~~~~~~~~~~~~~~~
Requests is an HTTP library, written in Python, for human beings. Basic GET
usage:
>>> import requests
>>> r = requests.get('https://www.python.org')
>>> ... | mit |
outsmartit/foundout6 | node_modules/node-gyp/gyp/pylib/gyp/generator/make.py | 896 | 91092 | # Copyright (c) 2013 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Notes:
#
# This is all roughly based on the Makefile system used by the Linux
# kernel, but is a non-recursive make -- we put the entire dependency
# graph in fr... | gpl-3.0 |
voxlol/scikit-learn | sklearn/dummy.py | 208 | 17370 | # Author: Mathieu Blondel <mathieu@mblondel.org>
# Arnaud Joly <a.joly@ulg.ac.be>
# Maheshakya Wijewardena <maheshakya.10@cse.mrt.ac.lk>
# License: BSD 3 clause
from __future__ import division
import warnings
import numpy as np
import scipy.sparse as sp
from .base import BaseEstimator, ClassifierMixin... | bsd-3-clause |
andreparrish/python-for-android | python3-alpha/python3-src/Lib/test/test_audioop.py | 51 | 7803 | import audioop
import unittest
from test.support import run_unittest
def gendata1():
return b'\0\1\2'
def gendata2():
if audioop.getsample(b'\0\1', 2, 0) == 1:
return b'\0\0\0\1\0\2'
else:
return b'\0\0\1\0\2\0'
def gendata4():
if audioop.getsample(b'\0\0\0\1', 4, 0) == 1:
re... | apache-2.0 |
cpennington/edx-platform | openedx/core/lib/gating/api.py | 1 | 18895 | """
API for the gating djangoapp
"""
import json
import logging
from django.contrib.auth.models import User
from django.urls import reverse
from django.utils.translation import ugettext as _
from completion.models import BlockCompletion
from lms.djangoapps.courseware.access import _has_access_to_course
from lms.djan... | agpl-3.0 |
Mozta/pagina-diagnostijuego | venv/lib/python2.7/site-packages/django/db/models/manager.py | 108 | 7232 | import copy
import inspect
from importlib import import_module
from django.db import router
from django.db.models.query import QuerySet
from django.utils import six
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class BaseManager(object):
# Tracks each time a Manager i... | gpl-3.0 |
sotdjin/glibglab | venv/lib/python2.7/site-packages/six.py | 2715 | 30098 | """Utilities for writing code that runs on Python 2 and 3"""
# Copyright (c) 2010-2015 Benjamin Peterson
#
# 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 with... | mit |
TeamTwisted/external_chromium_org | remoting/tools/runclient.py | 182 | 1717 | #!/usr/bin/env python
# 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.
"""Gets the chromoting host info from an input arg and then
tries to find the authentication info in the .chromotingAuthToken file
... | bsd-3-clause |
mrbox/django | tests/aggregation/tests.py | 17 | 45691 | from __future__ import unicode_literals
import datetime
import re
from decimal import Decimal
from django.core.exceptions import FieldError
from django.db import connection
from django.db.models import (
F, Avg, Count, DecimalField, DurationField, FloatField, Func, IntegerField,
Max, Min, Sum, Value,
)
from d... | bsd-3-clause |
AOSPU/external_chromium_org | tools/perf/page_sets/gmail_expand_collapse_conversation.py | 9 | 2149 | # Copyright 2014 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.
# pylint: disable=W0401,W0614
from telemetry.page.actions.all_page_actions import *
from telemetry.page import page as page_module
from telemetry.page import ... | bsd-3-clause |
ayarshabeer/wagtail | wagtail/wagtailsearch/backends/__init__.py | 21 | 2746 | # Backend loading
# Based on the Django cache framework
# https://github.com/django/django/blob/5d263dee304fdaf95e18d2f0619d6925984a7f02/django/core/cache/__init__.py
import sys
import six
from importlib import import_module
from django.utils.module_loading import import_string
from django.core.exceptions import Impr... | bsd-3-clause |
tejasapatil/spark | examples/src/main/python/ml/feature_hasher_example.py | 67 | 1560 | #
# 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 |
JazzeYoung/VeryDeepAutoEncoder | theano/sandbox/cuda/blas.py | 1 | 107221 | from __future__ import absolute_import, print_function, division
import os
import logging
from six import integer_types
from six.moves import StringIO, reduce
import theano
from theano import Apply
from theano import tensor
from theano.sandbox.cuda.type import CudaNdarrayType
from theano.sandbox.cuda import GpuOp
from ... | bsd-3-clause |
berinhard/py-notify | run-tests.py | 4 | 3647 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#--------------------------------------------------------------------#
# This file is part of Py-notify. #
# #
# Copyright (C) 2007, 2008 Paul Pogonyshev. ... | lgpl-2.1 |
wolfram74/numerical_methods_iserles_notes | venv/lib/python2.7/site-packages/sympy/polys/agca/modules.py | 24 | 45751 | """
Computations with modules over polynomial rings.
This module implements various classes that encapsulate groebner basis
computations for modules. Most of them should not be instantiated by hand.
Instead, use the constructing routines on objects you already have.
For example, to construct a free module over ``QQ[x... | mit |
jakirkham/splauncher | splauncher/core.py | 3 | 1955 | from __future__ import print_function
__author__ = "John Kirkham <kirkhamj@janelia.hhmi.org>"
__date__ = "$May 18, 2015 16:52:18 EDT$"
import datetime
import os
import logging
drmaa_logger = logging.getLogger(__name__)
try:
import drmaa
except ImportError:
# python-drmaa is not installed.
drmaa_logger... | bsd-3-clause |
AnishShah/tensorflow | tensorflow/python/debug/examples/debug_mnist.py | 34 | 6803 | # 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 |
SimonWang2014/DockerConsoleApp | libs/stormed-amqp/stormed/message.py | 4 | 3116 | from stormed.util import WithFields
from stormed.method import basic
class Message(WithFields):
"""An AMQP Message
The body parameter represents the message content. If the parameter
is a unicode object, it is encoded to UTF8.
The optional properties are those defined in the AMQP standard
(see s... | apache-2.0 |
rysson/filmkodi | plugin.video.mrknow/mylib/pydevd_attach_to_process/winappdbg/win32/defines.py | 102 | 22799 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2009-2014, Mario Vilas
# 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... | apache-2.0 |
CSIEMIAT/linux-3.6.0-MIAT | tools/perf/scripts/python/futex-contention.py | 11261 | 1486 | # futex contention
# (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Translation of:
#
# http://sourceware.org/systemtap/wiki/WSFutexContention
#
# to perf python scripting.
#
# Measures futex contention
import os, sys
sys.path.append(os.environ['PER... | gpl-2.0 |
solin319/incubator-mxnet | example/cnn_text_classification/text_cnn.py | 28 | 7469 | #!/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
# "L... | apache-2.0 |
AOSP-TEAM/android_kernel_google_tuna | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py | 11088 | 3246 | # Core.py - Python extension for perf script, core functions
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
from collections import defaultdict
def aut... | gpl-2.0 |
fyfcauc/android_external_chromium-org | tools/telemetry/telemetry/page/page_test_unittest.py | 24 | 3967 | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
from telemetry.core import util
from telemetry.page import page as page_module
from telemetry.page import page_test
from telemetry.page.... | bsd-3-clause |
mdeemer/XlsxWriter | xlsxwriter/test/comparison/test_hyperlink11.py | 8 | 1912 | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | bsd-2-clause |
laydros/commission | sale_commission/models/sale_order.py | 8 | 4065 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011 Pexego Sistemas Informáticos (<http://www.pexego.es>).
# Copyright (C) 2015 Avanzosc (<http://www.avanzosc.es>)
# Copyright (C) 2015 Pedro ... | agpl-3.0 |
crazy-canux/django | django/core/checks/model_checks.py | 525 | 2390 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import inspect
import types
from django.apps import apps
from django.core.checks import Error, Tags, register
@register(Tags.models)
def check_all_models(app_configs=None, **kwargs):
errors = []
for model in apps.get_models():
if app_co... | bsd-3-clause |
wweiradio/django | tests/template_tests/test_custom.py | 152 | 20056 | from __future__ import unicode_literals
import os
from django.template import Context, Engine, TemplateSyntaxError
from django.template.base import Node
from django.template.library import InvalidTemplateLibrary
from django.test import SimpleTestCase, ignore_warnings
from django.test.utils import extend_sys_path
from... | bsd-3-clause |
Newman101/scipy | scipy/sparse/csc.py | 33 | 6947 | """Compressed Sparse Column matrix format"""
from __future__ import division, print_function, absolute_import
__docformat__ = "restructuredtext en"
__all__ = ['csc_matrix', 'isspmatrix_csc']
import numpy as np
from scipy._lib.six import xrange
from .base import spmatrix
from ._sparsetools import csc_tocsr
from . i... | bsd-3-clause |
chunywang/crosswalk-test-suite | webapi/webapi-rawsockets-w3c-tests/inst.apk.py | 1996 | 3186 | #!/usr/bin/env python
import os
import shutil
import glob
import time
import sys
import subprocess
from optparse import OptionParser, make_option
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
ADB_CMD = "adb"
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool... | bsd-3-clause |
glaubitz/fs-uae-debian | arcade/OpenGL/GLX/NV/copy_image.py | 8 | 1125 | '''OpenGL extension NV.copy_image
This module customises the behaviour of the
OpenGL.raw.GLX.NV.copy_image to provide a more
Python-friendly API
Overview (from the spec)
This extension enables efficient image data transfer between image
objects (i.e. textures and renderbuffers) without the need to bind
the obj... | gpl-2.0 |
robmcmullen/peppy | peppy/third_party/pubsub/core/pubsub3.py | 1 | 8095 | '''
This is the top-level API to pubsub, API version 3.
This version is selected by default by the pubsub configuration module,
pubsubconf. To load a different API version,
see the pubsubconf docs (from pubsub import pubsubconf; help(pubsubconf)).
TODO: add isMsgReceivable(listener, topicName) to find out if listener... | gpl-2.0 |
jschuhmacher/cvm | src/train/cerberus.py | 2 | 5944 | #!/usr/bin/env python
# vim: set fileencoding=utf-8 ts=4 sw=4 expandtab:
################################################################################
# File: cerberus.py
#
# Copyright (c) 2009, Jelle Schühmacher <j.schuhmacher@student.science.ru.nl>
#
# This program is free software: you can redistribute it and/or... | gpl-3.0 |
nyee/RMG-Py | rmgpy/data/kinetics/groups.py | 7 | 26065 | #!/usr/bin/python
# -*- coding: utf-8 -*-
################################################################################
#
# RMG - Reaction Mechanism Generator
#
# Copyright (c) 2002-2010 Prof. William H. Green (whgreen@mit.edu) and the
# RMG Team (rmg_dev@mit.edu)
#
# Permission is hereby granted, free of c... | mit |
Denisolt/IEEE-NYIT-MA | local/lib/python2.7/site-packages/django/contrib/gis/gdal/field.py | 355 | 6739 | from ctypes import byref, c_int
from datetime import date, datetime, time
from django.contrib.gis.gdal.base import GDALBase
from django.contrib.gis.gdal.error import GDALException
from django.contrib.gis.gdal.prototypes import ds as capi
from django.utils.encoding import force_text
# For more information, see the OG... | gpl-3.0 |
jimi-c/ansible | lib/ansible/modules/cloud/cloudstack/cs_ip_address.py | 22 | 8009 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2015, Darren Worrall <darren@iweb.co.uk>
# Copyright (c) 2015, René Moser <mail@renemoser.net>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {'metadata_version': '1.1',
'sta... | gpl-3.0 |
strogo/turbion | turbion/bits/utils/tests/merging.py | 1 | 2375 | from datetime import date
from django.db import models
from django.test import TestCase
from django.contrib.auth.models import User
from turbion.bits.utils import merging
class MyProfile(models.Model):
user_ptr = models.ForeignKey(User, unique=True)
nickname = models.CharField(max_length=100)
www = model... | bsd-3-clause |
BrainDamage/Flexget | flexget/plugins/filter/seen_info_hash.py | 8 | 1940 | from __future__ import unicode_literals, division, absolute_import
from flexget import plugin
from flexget.event import event
from flexget.plugins.filter.seen import FilterSeen
class FilterSeenInfoHash(FilterSeen):
"""Prevents the same torrent from being downloaded twice by remembering the infohash of all downlo... | mit |
salguarnieri/intellij-community | python/lib/Lib/site-packages/django/contrib/gis/management/commands/inspectdb.py | 311 | 1553 | from optparse import make_option
from django.core.management.base import CommandError
from django.core.management.commands.inspectdb import Command as InspectDBCommand
class Command(InspectDBCommand):
db_module = 'django.contrib.gis.db'
gis_tables = {}
def get_field_type(self, connection, table_name, row... | apache-2.0 |
ronakkhunt/kuma | vendor/packages/translate/lang/km.py | 29 | 1949 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2007 Zuza Software Foundation
#
# This file is part of translate.
#
# translate 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 t... | mpl-2.0 |
nsat/gnuradio | grc/core/Block.py | 3 | 30838 | """
Copyright 2008-2015 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 |
menardorama/ReadyNAS-Add-ons | headphones-1.0.0/debian/headphones/apps/headphones/lib/apscheduler/executors/base.py | 33 | 4649 | from abc import ABCMeta, abstractmethod
from collections import defaultdict
from datetime import datetime, timedelta
from traceback import format_tb
import logging
import sys
from pytz import utc
import six
from apscheduler.events import JobExecutionEvent, EVENT_JOB_MISSED, EVENT_JOB_ERROR, EVENT_JOB_EXECUTED
class... | gpl-2.0 |
davidzchen/tensorflow | tensorflow/python/data/experimental/kernel_tests/serialization/sequence_dataset_serialization_test.py | 6 | 5123 | # 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 |
puruckertom/poptox | poptox/logistic/logistic_algorithm.py | 1 | 1472 | # -*- coding: utf-8 -*-
"""
Created on Tue Jan 03 13:30:41 2012
@author: T.H
"""
import webapp2 as webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext.webapp import template
import os
class genericAlgorithmPage(webapp.RequestHandler):
def get(self):
text_file1 = ope... | unlicense |
Connexions/cnx-upgrade | cnxupgrade/tests/test_upgrades_cnxml7.py | 1 | 4511 | # -*- coding: utf-8 -*-
# ###
# Copyright (c) 2013, Rice University
# This software is subject to the provisions of the GNU Affero General
# Public License version 3 (AGPLv3).
# See LICENCE.txt for details.
# ###
"""Tests for cnx-upgrades cnxml7
"""
import os
import psycopg2
import unittest
import lxml.etree
from .... | agpl-3.0 |
twstrike/le_for_patching | letsencrypt-apache/letsencrypt_apache/tests/complex_parsing_test.py | 6 | 4551 | """Tests for letsencrypt_apache.parser."""
import os
import shutil
import unittest
from letsencrypt import errors
from letsencrypt_apache.tests import util
class ComplexParserTest(util.ParserTest):
"""Apache Parser Test."""
def setUp(self): # pylint: disable=arguments-differ
super(ComplexParserTes... | apache-2.0 |
crosenth/bioy | bioy_pkg/subcommands/pull_reads.py | 2 | 1748 | # This file is part of Bioy
#
# Bioy 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.
#
# Bioy is distributed in the hope... | gpl-3.0 |
pigeonflight/strider-plone | docker/appengine/lib/django-1.3/django/db/backends/oracle/base.py | 150 | 32300 | """
Oracle database backend for Django.
Requires cx_Oracle: http://cx-oracle.sourceforge.net/
"""
import datetime
import sys
import time
from decimal import Decimal
def _setup_environment(environ):
import platform
# Cygwin requires some special voodoo to set the environment variables
# properly so that... | mit |
mohclips/k5-ansible-modules | k5_server_console_output.py | 1 | 8174 | #!/usr/bin/python
ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community',
'version': '1.0'}
DOCUMENTATION = '''
---
module: k5_server_console_output
short_description: Display the URL to the NoVNC Console
version_added: "1.0"
description:
- returns the opens... | gpl-3.0 |
ferranti/watchdog | vendor/BeautifulSoup.py | 112 | 77863 | """Beautiful Soup
Elixir and Tonic
"The Screen-Scraper's Friend"
http://www.crummy.com/software/BeautifulSoup/
Beautiful Soup parses a (possibly invalid) XML or HTML document into a
tree representation. It provides methods and Pythonic idioms that make
it easy to navigate, search, and modify the tree.
A well-formed X... | agpl-3.0 |
google/makerspace-auth | software/authbox/tests/test_config.py | 2 | 3709 | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 |
polypapps/RandomRango_Web | vendor/doctrine/orm/docs/en/conf.py | 2448 | 6497 | # -*- coding: utf-8 -*-
#
# Doctrine 2 ORM documentation build configuration file, created by
# sphinx-quickstart on Fri Dec 3 18:10:24 2010.
#
# 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.
... | gpl-2.0 |
metsarono/dotfiles | linux/.config/sublime-text-2/Packages/CSSLint/CSSLint.py | 2 | 11828 | import os
import re
import sublime
import sublime_plugin
import subprocess
import zipfile
try: # ST2
from version_file_checker import check_file_match
except ImportError: # ST3
from .version_file_checker import check_file_match
RESULT_VIEW_NAME = 'csslint_result_view'
RESULT_REGION_NAME = 'csslint_highlighted_... | gpl-3.0 |
wroersma/volatility | volatility/plugins/mac/arp.py | 58 | 1398 | # Volatility
# Copyright (C) 2007-2013 Volatility Foundation
#
# This file is part of Volatility.
#
# Volatility 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 ... | gpl-2.0 |
kaku289/paparazzi | sw/tools/airframe_editor/paparazzi.py | 72 | 3597 | #!/usr/bin/env python
from __future__ import print_function
import glob
from collections import namedtuple
from os import path, getenv
#from subprocess import call
import commands
import lxml.etree as ET
# if PAPARAZZI_HOME not set, then assume the tree containing this
# file is a reasonable substitute
home_dir = ... | gpl-2.0 |
nortikin/sverchok | node_scripts/SNLite_templates/utils/splitting_pols.py | 2 | 1548 | """
in vers_in v d=[[]] n=0
in pols_in s d=[[]] n=0
in value s d=0.5 n=2
in direction s d=0 n=2
in shift s d=0 n=2
in ignoresecond s d=0 n=2
out vers_out v
out pols_out s
"""
from mathutils import Vector as V
pols_out, vers_out = [], []
sh = True
igs = ignoresecond
for ver, pol in zip(vers_in,pols_in):
nex = len... | gpl-3.0 |
magreiner/base | lib/python/openstack_get_cluster_nodes.py | 1 | 2900 | import json
import subprocess
from optparse import OptionParser
def parse_arguments():
parser = OptionParser(
prog="openstack_get_cluster_nodes",
version="0",
usage="%prog [options]")
parser.add_option(
"-k", "--key_file", type="string", default="swarm_key_1.pem",
help=... | bsd-2-clause |
samfpetersen/gnuradio | docs/exploring-gnuradio/fm_demod.py | 53 | 3367 | #!/usr/bin/env python
#
# Copyright 2013 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 |
hyperized/ansible | contrib/inventory/lxd.py | 37 | 3723 | #!/usr/bin/env python
# (c) 2013, Michael Scherer <misc@zarb.org>
# (c) 2014, Hiroaki Nakamura <hnakamur@gmail.com>
# (c) 2016, Andew Clarke <andrew@oscailte.org>
#
# This file is based on https://github.com/ansible/ansible/blob/devel/plugins/inventory/libvirt_lxc.py which is part of Ansible,
# and https://github.com/... | gpl-3.0 |
vrsys/avangong | avango-utils/python/_converter.py | 1 | 7630 | # -*- Mode:Python -*-
##########################################################################
# #
# This file is part of AVANGO. #
# ... | lgpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.