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
irzaip/chippy
scripts/robot/puma560akb.py
1
2841
''' PUMA560AKB Load kinematic and dynamic data for a Puma 560 manipulator from robot.puma560akb import * Defines the object 'p560m' in current workspace which describes the kinematic and dynamic characterstics of a Unimation Puma 560 manipulator modified DH conventions and using the data and conventions of: Arms...
lgpl-3.0
doismellburning/django
django/views/generic/detail.py
29
6696
from __future__ import unicode_literals from django.core.exceptions import ImproperlyConfigured from django.db import models from django.http import Http404 from django.utils.translation import ugettext as _ from django.views.generic.base import TemplateResponseMixin, ContextMixin, View class SingleObjectMixin(Conte...
bsd-3-clause
sony/nnabla
python/test/function/test_top_k_grad.py
1
2808
# Copyright 2018,2019,2020,2021 Sony Corporation. # Copyright 2021 Sony Group Corporation. # # 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 #...
apache-2.0
freakboy3742/django
django/template/base.py
2
39107
""" This is the Django template system. How it works: The Lexer.tokenize() method converts a template string (i.e., a string containing markup with custom template tags) to tokens, which can be either plain text (TokenType.TEXT), variables (TokenType.VAR), or block statements (TokenType.BLOCK). The Parser() class ta...
bsd-3-clause
oleksa-pavlenko/gae-django-project-template
django/contrib/gis/geos/libgeos.py
90
5287
""" This module houses the ctypes initialization procedures, as well as the notice and error handler function callbacks (get called when an error occurs in GEOS). This module also houses GEOS Pointer utilities, including get_pointer_arr(), and GEOM_PTR. """ import logging import os import re from ctypes import c_...
mit
eduOS/anki
anki/hooks.py
23
1819
# -*- coding: utf-8 -*- # Copyright: Damien Elmes <anki@ichi2.net> # License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html """\ Hooks - hook management and tools for extending Anki ============================================================================== To find available hooks, grep for r...
agpl-3.0
hkhamm/django_rest_tutorial_2
env/lib/python2.7/site-packages/django/conf/locale/tr/formats.py
118
1142
# -*- 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 = 'd F Y' TIME_FORMAT = 'H:i:s' DATE...
mit
317070/kaggle-heart
configurations/j2_crps2.py
1
6318
from deep_learning_layers import ConvolutionOver2DAxisLayer, MaxPoolOverAxisLayer, MaxPoolOver2DAxisLayer, \ MaxPoolOver3DAxisLayer, ConvolutionOver3DAxisLayer, ConvolutionOverAxisLayer from default import * import theano.tensor as T from layers import MuLogSigmaErfLayer, CumSumLayer import objectives from lasagne...
mit
beni55/scrapy
scrapy/contrib/downloadermiddleware/redirect.py
15
4291
from six.moves.urllib.parse import urljoin from scrapy import log from scrapy.http import HtmlResponse from scrapy.utils.response import get_meta_refresh from scrapy.exceptions import IgnoreRequest, NotConfigured class BaseRedirectMiddleware(object): enabled_setting = 'REDIRECT_ENABLED' def __init__(self, ...
bsd-3-clause
hiikezoe/android_kernel_asus_tf300t
tools/perf/scripts/python/syscall-counts.py
11181
1522
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
gpl-2.0
kaiweifan/vse-lbaas-plugin-poc
quantum/tests/unit/linuxbridge/test_linuxbridge_plugin.py
5
2464
# Copyright (c) 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 agreed to...
apache-2.0
Ryanglambert/pybrain
pybrain/tests/unittests/structure/modules/test_simple_mdlstm.py
25
2009
""" Build a simple mdlstm network with peepholes: >>> n = buildSimpleMDLSTMNetwork(True) >>> print(n) simpleMDLstmNet Modules: [<BiasUnit 'bias'>, <LinearLayer 'i'>, <MDLSTMLayer 'MDlstm'>, <LinearLayer 'o'>] Connections: [<FullConnection 'f1': 'i' -> 'MDlstm'>, <FullConnectio...
bsd-3-clause
HybridF5/tempest_debug
tempest/tests/cmd/test_tempest_init.py
2
4209
# Copyright 2015 Hewlett-Packard Development Company, L.P. # # 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 applicabl...
apache-2.0
zihua/scikit-learn
sklearn/model_selection/tests/test_validation.py
6
30876
"""Test the validation module""" from __future__ import division import sys import warnings import tempfile import os from time import sleep import numpy as np from scipy.sparse import coo_matrix, csr_matrix from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_false from sklearn.uti...
bsd-3-clause
kriswuollett/grpc
tools/buildgen/plugins/expand_filegroups.py
13
5473
# Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
bsd-3-clause
freedomtan/tensorflow
tensorflow/python/data/ops/optional_ops.py
5
8971
# 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
kbrebanov/ansible
lib/ansible/modules/network/avi/avi_microservicegroup.py
3
3753
#!/usr/bin/python # # Created on Aug 25, 2016 # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # # # 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...
gpl-3.0
acerix/doge-millionaire
pycoin/tx/script/der.py
14
4582
# -*- coding: utf-8 -*- """ Deal with DER encoding and decoding. Adapted from python-ecdsa at https://github.com/warner/python-ecdsa Copyright (c) 2010 Brian Warner Portions written in 2005 by Peter Pearson and placed in the public domain. The MIT License (MIT) Copyright (c) 2013 by Richard Kiss Permission is here...
mit
mmeeks/bootchart
pybootchartgui/process_tree.py
4
12259
# This file is part of pybootchartgui. # pybootchartgui 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. # pybootchartgui is dis...
gpl-2.0
jawed123/django-stripe-payments
payments/admin.py
8
6461
from django.contrib import admin from django.db.models.fields import FieldDoesNotExist from .models import ( Charge, CurrentSubscription, Customer, Event, EventProcessingException, Invoice, InvoiceItem, Transfer ) from .utils import get_user_model def user_search_fields(): User = ...
mit
dimdung/boto
tests/integration/ec2/elb/__init__.py
454
1103
# Copyright (c) 2006-2011 Mitch Garnaat http://garnaat.org/ # # 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, modi...
mit
johndpope/tensorflow
tensorflow/contrib/learn/python/learn/estimators/dynamic_rnn_estimator_test.py
9
30828
# 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
grupoprog3/proyecto_final
Entrega Final/flask/Lib/site-packages/pip/_vendor/requests/packages/chardet/langgreekmodel.py
2763
12628
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
apache-2.0
meabsence/python-for-android
python-build/python-libs/gdata/tests/gdata_tests/docs/service_test.py
87
17205
#!/usr/bin/python # # Copyright 2009 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
gavinengel/gavinengel.github.io
aeonx/node_modules/harp/node_modules/terraform/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py
1355
44604
# Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """cmake output module This module is under development and should be considered experimental. This module produces cmake (2.8.8+) input as its output. One CMake...
mit
lukeiwanski/tensorflow
tensorflow/contrib/distributions/python/ops/bijectors/square.py
35
2857
# 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
OSU-CS-325/Project_Two_Coin_Change
nbmerge.py
2
1055
#!/usr/bin/python3 # Note, updated version of # https://github.com/ipython/ipython-in-depth/blob/master/tools/nbmerge.py """ usage: python nbmerge.py A.ipynb B.ipynb C.ipynb > merged.ipynb """ import io import os import sys import nbformat def merge_notebooks(filenames): merged = None for fname in filenames...
mit
shackspace/inkcut_dmpl
app/bin/serial/serialposix.py
2
24213
#!/usr/bin/env python # # Python Serial Port Extension for Win32, Linux, BSD, Jython # module for serial IO for POSIX compatible systems, like Linux # see __init__.py # # (C) 2001-2010 Chris Liechti <cliechti@gmx.net> # this is distributed under a free software license, see license.txt # # parts based on code from Gran...
gpl-3.0
thomasgilgenast/spqr-nonrel
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
onshape-public/onshape-clients
python/onshape_client/oas/models/bt_string_format_match_pattern2446.py
1
7539
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: api-support@onshape.zendesk.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 im...
mit
hottwaj/django
django/utils/tree.py
372
4883
""" A class for storing a tree graph. Primarily used for filter constructs in the ORM. """ import copy class Node(object): """ A single internal node in the tree graph. A Node should be viewed as a connection (the root) with the children being either leaf nodes or other Node instances. """ # ...
bsd-3-clause
csdms/pymt
tests/test_timeline.py
2
3554
#! /usr/bin/env python import pytest from pytest import approx from pymt.timeline import Timeline def test_init_without_args(): timeline = Timeline() assert 0.0 == timeline.time assert set() == timeline.events with pytest.raises(IndexError): timeline.time_of_next_event with pytest.raises...
mit
yb-kim/gemV
configs/ruby/MOESI_CMP_directory.py
3
8055
# Copyright (c) 2006-2007 The Regents of The University of Michigan # Copyright (c) 2009 Advanced Micro Devices, 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 co...
bsd-3-clause
ojengwa/grr
lib/flows/general/find_test.py
3
5959
#!/usr/bin/env python # -*- mode: python; encoding: utf-8 -*- """Tests for the Find flow.""" from grr.client import vfs from grr.lib import action_mocks from grr.lib import aff4 from grr.lib import flags from grr.lib import rdfvalue from grr.lib import test_lib from grr.lib import type_info from grr.lib import utils ...
apache-2.0
jlspyaozhongkai/Uter
third_party_build/Python-2.7.9/lib/python2.7/test/test_capi.py
15
4750
# Run the _testcapi module tests (tests for the Python/C API): by defn, # these are all functions _testcapi exports whose name begins with 'test_'. from __future__ import with_statement import sys import time import random import unittest from test import test_support try: import thread import threading excep...
gpl-3.0
nightjean/Deep-Learning
tensorflow/contrib/sparsemax/python/ops/sparsemax.py
104
2649
# 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
dan-ionut-fechete/ev3
test/test_ev3_motor.py
1
1650
from ev3.ev3dev import Motor import unittest import time from util import get_input class TestMotor(unittest.TestCase): get_input('Attach a motor on port A then continue') def __init__(self,*args, **kwargs): super(TestMotor, self).__init__(*args, **kwargs) self.d=Motor(port=Motor.PORT.A...
apache-2.0
ajaxsys/dict-admin
docutils/writers/s5_html/__init__.py
2
14734
# $Id: __init__.py 7025 2011-05-05 23:19:51Z milde $ # Authors: Chris Liechti <cliechti@gmx.net>; # David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ S5/HTML Slideshow Writer. """ __docformat__ = 'reStructuredText' import sys import os impor...
bsd-3-clause
Sodki/ansible
lib/ansible/modules/network/lenovo/cnos_rollback.py
59
11069
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Lenovo, 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 # ...
gpl-3.0
rocco8773/bapsflib
bapsflib/_hdf/utils/hdfoverview.py
1
15938
# This file is part of the bapsflib package, a Python toolkit for the # BaPSF group at UCLA. # # http://plasma.physics.ucla.edu/ # # Copyright 2017-2018 Erik T. Everson and contributors # # License: Standard 3-clause BSD; see "LICENSES/LICENSE.txt" for full # license terms and contributor agreement. # import os impor...
bsd-3-clause
jnordling/cabin
onadata/apps/api/viewsets/stats_viewset.py
5
1128
from rest_framework import viewsets from onadata.apps.api.permissions import XFormPermissions from onadata.apps.logger.models.xform import XForm from onadata.libs import filters from onadata.libs.mixins.anonymous_user_public_forms_mixin import ( AnonymousUserPublicFormsMixin) from onadata.libs.mixins.last_modifie...
bsd-2-clause
Soya93/Extract-Refactoring
python/helpers/py2only/docutils/io.py
48
14403
# $Id: io.py 6269 2010-03-18 22:27:53Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ I/O classes provide a uniform API for low-level input and output. Subclasses will exist for a variety of input/output mechanisms. """ __docformat__ = 'reStruc...
apache-2.0
liaoyuke/EECS542_Final_Project_VQA
code/concept_extraction/lib/en/parser/nltk_lite/chat/zen.py
9
9944
# Natural Language Toolkit: Zen Chatbot # # Copyright (C) 2005-2006 University of Melbourne # Author: Amy Holland <amyrh@csse.unimelb.edu.au> # URL: <http://nltk.sf.net> # For license information, see LICENSE.TXT """ Zen Chatbot talks in gems of Zen wisdom. This is a sample conversation with Zen Chatbot: ZC: Welco...
mit
was4444/chromium.src
tools/auto_bisect/bisect_results.py
15
10479
# 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. import math import os import bisect_utils import math_utils import source_control import ttest from bisect_state import RevisionState class BisectResults...
bsd-3-clause
hcsturix74/django
tests/or_lookups/tests.py
275
7624
from __future__ import unicode_literals from datetime import datetime from operator import attrgetter from django.db.models import Q from django.test import TestCase from .models import Article class OrLookupsTests(TestCase): def setUp(self): self.a1 = Article.objects.create( headline='Hel...
bsd-3-clause
lateminer/bitcoin
test/functional/rpc_preciousblock.py
28
5304
#!/usr/bin/env python3 # Copyright (c) 2015-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the preciousblock RPC.""" from test_framework.test_framework import BitcoinTestFramework from tes...
mit
lumig242/Hue-Integration-with-CDAP
apps/oozie/src/oozie/migrations/0022_auto__chg_field_mapreduce_node_ptr__chg_field_start_node_ptr.py
37
25559
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Mapreduce.node_ptr' db.alter_column('oozie_mapreduce', 'node_ptr_id', self.gf('django.db.models....
apache-2.0
boegel/hanythingondemand
test/unit/rmscheduler/__init__.py
16
1140
### # Copyright 2009-2014 Ghent University # # This file is part of hanythingondemand # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundat...
gpl-2.0
mspark93/VTK
Examples/Modelling/Python/faultLines.py
42
2235
#!/usr/bin/env python # Create a constrained Delaunay triangulation following fault lines. The # fault lines serve as constraint edges in the Delaunay triangulation. import vtk from vtk.util.misc import vtkGetDataRoot from vtk.util.colors import * VTK_DATA_ROOT = vtkGetDataRoot() # Generate some points by reading a ...
bsd-3-clause
jgbarah/GrimoireLib
vizgrimoire/analysis/timezone.py
4
8430
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2014 Bitergia # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later v...
gpl-3.0
abramhindle/UnnaturalCodeFork
python/testdata/launchpad/lib/lp/soyuz/model/files.py
1
1945
# Copyright 2009-2013 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). __metaclass__ = type __all__ = [ 'BinaryPackageFile', 'SourceFileMixin', 'SourcePackageReleaseFile', ] from sqlobject import ForeignKey from zope.interface im...
agpl-3.0
naslanidis/ansible
lib/ansible/modules/cloud/lxd/lxd_container.py
6
21441
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Hiroaki Nakamura <hnakamur@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...
gpl-3.0
alphafoobar/intellij-community
python/testData/MockSdk3.4/python_stubs/sys.py
100
17611
# encoding: utf-8 # module sys # from (built-in) # by generator 1.135 """ This module provides access to some objects used or maintained by the interpreter and to functions that interact strongly with the interpreter. Dynamic objects: argv -- command line arguments; argv[0] is the script pathname if known path -- mod...
apache-2.0
qguv/config
weechat/plugins/python/twitch.py
1
27158
# -*- 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 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope tha...
gpl-3.0
AgostonSzepessy/servo
tests/wpt/web-platform-tests/tools/py/py/_code/_assertionnew.py
217
12384
""" Find intermediate evalutation results in assert statements through builtin AST. This should replace _assertionold.py eventually. """ import sys import ast import py from py._code.assertion import _format_explanation, BuiltinAssertionError if sys.platform.startswith("java") and sys.version_info < (2, 5, 2): ...
mpl-2.0
kubeflow/kfserving
python/lgbserver/lgbserver/test_lightgbm_model_repository.py
1
1383
# Copyright 2020 kubeflow.org. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
apache-2.0
Thermi/ocfs2-tools
ocfs2console/ocfs2interface/fsck.py
8
2563
# OCFS2Console - GUI frontend for OCFS2 management and debugging # Copyright (C) 2005 Oracle. 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 Free Software Foundation; either version 2 of the Lice...
gpl-2.0
damdam-s/hr
hr_language/models/__init__.py
27
1028
# -*- encoding: utf-8 -*- ############################################################################### # # OpenERP, Open Source Management Solution # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or modify # it un...
agpl-3.0
jiadaizhao/LeetCode
0401-0500/0427-Construct Quad Tree/0427-Construct Quad Tree.py
1
1392
# Definition for a QuadTree node. class Node: def __init__(self, val, isLeaf, topLeft, topRight, bottomLeft, bottomRight): self.val = val self.isLeaf = isLeaf self.topLeft = topLeft self.topRight = topRight self.bottomLeft = bottomLeft self.bottomRight = bottomRight ...
mit
matthewzimmer/carnd-behavioral-cloning
zimpy/camera_preprocessor.py
1
1757
import cv2 import numpy as np from scipy import misc def flip_image(image_array, steering_angle): return np.fliplr(image_array), -steering_angle def preprocess_image(image_array, output_shape=None): if output_shape is None: output_shape = (66, 200) image_array = cv2.cvtColor(image_array, cv2.COL...
mit
signalw/charliechat
main/utils/queryGoogleForDirectionsv3.py
1
18357
import requests from CharlieChat import settings import re #ticket price variables. assumes no charlie-card #most prices pertain to charlie card zones. '1A' is the price to go between two '1A' stops only #the whole numbers are prices to go between a 1A stop to the listed zone, the keys that end #in .5 are inte...
mit
ewdurbin/sentry
src/sentry/models/user.py
4
4208
""" sentry.models.user ~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import warnings from django.contrib.auth.models import AbstractBaseUser, UserManager from django.db import mode...
bsd-3-clause
qrkourier/ansible
lib/ansible/module_utils/urls.py
9
44724
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
trondhindenes/ansible
lib/ansible/module_utils/facts/network/openbsd.py
232
1600
# 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 in the hope that ...
gpl-3.0
huihoo/reader
vendor/paypal/pro/models.py
1
4422
#!/usr/bin/env python # -*- coding: utf-8 -*- from string import split as L from django.db import models from django.utils.http import urlencode from django.forms.models import model_to_dict from django.contrib.auth.models import User class PayPalNVP(models.Model): """Record of a NVP interaction with PayPal.""" ...
mit
jreinhardt/BOLTS
freecad/bearings/bearings.py
2
10731
# ************************************************************************************** # * * # * BOLTS - Open Library of Technical Specifications * # * ...
gpl-3.0
ryfeus/lambda-packs
pytorch/source/numpy/core/memmap.py
3
11612
from __future__ import division, absolute_import, print_function import numpy as np from .numeric import uint8, ndarray, dtype from numpy.compat import ( long, basestring, os_fspath, contextlib_nullcontext, is_pathlib_path ) from numpy.core.overrides import set_module __all__ = ['memmap'] dtypedescr = dtype vali...
mit
kmarius/qutebrowser
tests/unit/mainwindow/statusbar/test_backforward.py
2
3211
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2017-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
gpl-3.0
aarsan/azure-sdk-for-python
azure-common/testutils/common_auth.py
6
1755
#------------------------------------------------------------------------- # Copyright (c) Microsoft. 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.apa...
apache-2.0
temasek/android_external_chromium_org
tools/cr/cr/commands/command.py
25
3270
# 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. """Module to hold the Command plugin.""" import argparse import cr class Command(cr.Plugin, cr.Plugin.Type): """Base class for implementing cr commands....
bsd-3-clause
BladeSmithJohn/nixysa
nixysa/unsized_array_binding.py
9
27709
#!/usr/bin/python2.4 # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
dendisuhubdy/tensorflow
tensorflow/python/keras/engine/saving_test.py
2
27094
# 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
mylons/kubernetes
cluster/juju/charms/trusty/kubernetes-master/hooks/hooks.py
52
11792
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 # # Unle...
apache-2.0
MrKepzie/google-test
test/gtest_break_on_failure_unittest.py
2140
7339
#!/usr/bin/env python # # Copyright 2006, 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...
bsd-3-clause
quheng/scikit-learn
sklearn/preprocessing/tests/test_label.py
156
17626
import numpy as np from scipy.sparse import issparse from scipy.sparse import coo_matrix from scipy.sparse import csc_matrix from scipy.sparse import csr_matrix from scipy.sparse import dok_matrix from scipy.sparse import lil_matrix from sklearn.utils.multiclass import type_of_target from sklearn.utils.testing impor...
bsd-3-clause
alpenwasser/laborjournal
versuche/skineffect/python/stuetzpunkte_new_lowfreq.py
1
6373
#!/usr/bin/env python3 from sympy import * from mpmath import * from matplotlib.pyplot import * #init_printing() # make things prettier when we print stuff for debugging. # ************************************************************************** # # Magnetic field inside copper coil with hollow copper cylinde...
mit
CompassionCH/l10n-switzerland
l10n_ch_fds_upload_dd/__manifest__.py
1
1739
# -*- coding: utf-8 -*- ############################################################################## # # Swiss Postfinance File Delivery Services module for Odoo # Copyright (C) 2015 Compassion CH # @author: Nicolas Tran # # This program is free software: you can redistribute it and/or modify # it unde...
agpl-3.0
chemelnucfin/tensorflow
tensorflow/python/debug/cli/analyzer_cli.py
5
58700
# 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
mapbased/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/commands/openbugs_unittest.py
124
2412
# 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 f...
bsd-3-clause
mkhutornenko/incubator-aurora
src/main/python/apache/thermos/observer/http/file_browser.py
1
4015
# # 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 ...
apache-2.0
Menooker/gem5_pcm
src/arch/x86/isa/insts/simd128/floating_point/arithmetic/subtraction.py
91
3967
# 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
nfedera/rg3-youtube-dl
youtube_dl/extractor/airmozilla.py
78
3097
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( int_or_none, parse_duration, parse_iso8601, ) class AirMozillaIE(InfoExtractor): _VALID_URL = r'https?://air\.mozilla\.org/(?P<id>[0-9a-z-]+)/?' _TEST = { 'url': 'htt...
unlicense
shujaatak/UAV_MissionPlanner
Lib/site-packages/numpy/linalg/__init__.py
54
2194
""" Core Linear Algebra Tools ========================= =============== ========================================================== Linear algebra basics ========================================================================== norm Vector or matrix norm inv Inverse of a square matrix solve ...
gpl-2.0
fkie-cad/FACT_core
src/test/acceptance/rest/test_rest_download.py
1
1656
from base64 import standard_b64encode import time import urllib.parse from storage.db_interface_backend import BackEndDbInterface from test.acceptance.base import TestAcceptanceBase from test.common_helper import create_test_firmware class TestIntegrationRestDownloadFirmware(TestAcceptanceBase): def setUp(self)...
gpl-3.0
watspidererik/testenv
flask/lib/python2.7/site-packages/openid/fetchers.py
138
13937
# -*- test-case-name: openid.test.test_fetchers -*- """ This module contains the HTTP fetcher interface and several implementations. """ __all__ = ['fetch', 'getDefaultFetcher', 'setDefaultFetcher', 'HTTPResponse', 'HTTPFetcher', 'createHTTPFetcher', 'HTTPFetchingError', 'HTTPError'] import urll...
mit
ermin-sakic/common-open-research-emulator-CORE
coreemu-read-only/daemon/core/emane/ieee80211abg.py
8
7116
# # CORE # Copyright (c)2010-2014 the Boeing Company. # See the LICENSE file included in this distribution. # # author: Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com> # ''' ieee80211abg.py: EMANE IEEE 802.11abg model for CORE ''' import sys import string try: from emanesh.events import EventService except: pa...
bsd-3-clause
CubicERP/odoo
addons/stock/tests/test_stock_flow.py
219
74767
# -*- coding: utf-8 -*- from openerp.addons.stock.tests.common import TestStockCommon from openerp.tools import mute_logger, float_round class TestStockFlow(TestStockCommon): @mute_logger('openerp.addons.base.ir.ir_model', 'openerp.models') def test_00_picking_create_and_transfer_quantity(self): """...
agpl-3.0
fpy171/django
tests/template_tests/test_smartif.py
580
2178
import unittest from django.template.smartif import IfParser class SmartIfTests(unittest.TestCase): def assertCalcEqual(self, expected, tokens): self.assertEqual(expected, IfParser(tokens).parse().eval({})) # We only test things here that are difficult to test elsewhere # Many other tests are f...
bsd-3-clause
cuongnv23/ansible
test/units/modules/network/netscaler/test_netscaler_ssl_certkey.py
30
22156
# Copyright (c) 2017 Citrix Systems # # 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
tinkhaven-organization/odoo
addons/google_account/__openerp__.py
312
1457
# -*- 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
AshenDrops/hangups
hangups/test/test_message_parser.py
3
2826
"""Tests for ReParser-based message parser""" from hangups import message_parser, hangouts_pb2 def parse_text(text): parser = message_parser.ChatMessageParser() return [(s.text, s.params) for s in parser.parse(text)] def test_parse_linebreaks(): text = 'line1\nline2\r\nline3' expected = [('line1', ...
mit
RomainBrault/scikit-learn
sklearn/datasets/__init__.py
61
3734
""" The :mod:`sklearn.datasets` module includes utilities to load datasets, including methods to load and fetch popular reference datasets. It also features some artificial data generators. """ from .base import load_breast_cancer from .base import load_boston from .base import load_diabetes from .base import load_digi...
bsd-3-clause
hortinstein/ghost_hortinstein.github.io
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/lexers/_asybuiltins.py
369
27319
# -*- coding: utf-8 -*- """ pygments.lexers._asybuiltins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This file contains the asy-function names and asy-variable names of Asymptote. Do not edit the ASYFUNCNAME and ASYVARNAME sets by hand. TODO: perl/python script in Asymptote SVN similar to asy-list.pl but onl...
mit
hagurinLv1/huis-ui-creator
docs/generator/code_converter.py
3
5493
#!/usr/bin/env python # -*- coding: utf-8 -*- #!/usr/bin/python # # doxy_preprocess.py # # creator: kan.k # created: [2013-12-06 18:18:06+09:00] # modified: [2013-12-10 19:29:12+09:00] # description: # Converting function notation. # This is just easy made script to generate doc with less effort. # 少...
apache-2.0
bqbn/addons-server
src/olympia/translations/tests/test_forms.py
8
4536
# -*- coding: utf-8 -*- from django.forms import ModelForm import pytest from pyquery import PyQuery as pq from olympia.amo.tests import TestCase from olympia.translations import fields, forms from olympia.translations.tests.testapp.models import TranslatedModel class DummyForm(forms.TranslationFormMixin, ModelForm...
bsd-3-clause
dwightgunning/django
django/core/management/commands/showmigrations.py
440
4901
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.core.management.base import BaseCommand, CommandError from django.db import DEFAULT_DB_ALIAS, connections from django.db.migrations.loader import MigrationLoader class Command(BaseCommand): help = "Shows all available migrations for the ...
bsd-3-clause
stscieisenhamer/glue
glue/core/data_factories/excel.py
5
1367
from __future__ import absolute_import, division, print_function import os from glue.core.data_factories.helpers import has_extension from glue.core.data_factories.pandas import panda_process from glue.config import data_factory __all__ = [] @data_factory(label="Excel", identifier=has_extension('xls xlsx')) def p...
bsd-3-clause
Rath1on/kor-d2vzw
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
1927
# 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 system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
gpl-2.0
shaananc/security-proj2
bindings/python/apidefs/gcc-LP64/ns3_module_stats.py
10
33153
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() ## data-output-interface.h: ns3::DataOutputCallback [class] module.add_class('DataOutputCallback', allow_subclassing=True) ## data-calculator.h: ns3::Statis...
gpl-2.0
Vvucinic/Wander
venv_2_7/lib/python2.7/site-packages/pexpect/spawnbase.py
13
19734
import codecs import os import sys import re import errno from .exceptions import ExceptionPexpect, EOF, TIMEOUT from .expect import Expecter, searcher_string, searcher_re PY3 = (sys.version_info[0] >= 3) text_type = str if PY3 else unicode class _NullCoder(object): """Pass bytes through unchanged.""" @static...
artistic-2.0