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
mjirayu/sit_academy
lms/djangoapps/courseware/tests/test_model_data.py
43
19753
""" Test for lms courseware app, module data (runtime data storage for XBlocks) """ import json from mock import Mock, patch from nose.plugins.attrib import attr from functools import partial from courseware.model_data import DjangoKeyValueStore, FieldDataCache, InvalidScopeError from courseware.models import StudentM...
agpl-3.0
Hasimir/letsencrypt
acme/acme/jose/interfaces_test.py
33
3627
"""Tests for acme.jose.interfaces.""" import unittest class JSONDeSerializableTest(unittest.TestCase): # pylint: disable=too-many-instance-attributes def setUp(self): from acme.jose.interfaces import JSONDeSerializable # pylint: disable=missing-docstring,invalid-name class Basic(JSO...
apache-2.0
laosiaudi/tensorflow
tensorflow/contrib/learn/python/learn/learn_io/__init__.py
8
2293
# 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
flyfei/python-for-android
python3-alpha/python3-src/Lib/xml/dom/minicompat.py
781
3228
"""Python version compatibility support for minidom.""" # This module should only be imported using "import *". # # The following names are defined: # # NodeList -- lightest possible NodeList implementation # # EmptyNodeList -- lightest possible NodeList that is guaranteed to # remain empty...
apache-2.0
TathagataChakraborti/resource-conflicts
PLANROB-2015/seq-sat-lama/py2.5/lib/python2.5/distutils/cmd.py
138
19253
"""distutils.cmd Provides the Command class, the base class for the command classes in the distutils.command package. """ # This module should be kept compatible with Python 2.1. __revision__ = "$Id: cmd.py 37828 2004-11-10 22:23:15Z loewis $" import sys, os, string, re from types import * from distutils.errors imp...
mit
abramhindle/UnnaturalCodeFork
python/testdata/launchpad/lib/lp/app/interfaces/security.py
1
1572
# Copyright 2011 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Interfaces for the Launchpad security policy.""" __metaclass__ = type __all__ = [ 'IAuthorization', ] from zope.interface import Interface class IAuthorization(Inte...
agpl-3.0
mrpau/kolibri
kolibri/core/deviceadmin/tests/test_dbbackup.py
4
1661
from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import os import tempfile import pytest from django.core.management import call_command from mock import patch from kolibri.core.deviceadmin.tests.test_dbrestore import is_sqlite_settings from kolibri...
mit
cuongnv23/ansible
lib/ansible/modules/windows/win_file_version.py
46
2277
#!/usr/bin/env python # -*- coding: utf-8 -*- # Get DLL or EXE build version # Copyright © 2015 Sam Liu <sam.liu@activenetwork.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 # the Free Software Foundation, either versi...
gpl-3.0
V-Paranoiaque/Domoleaf
domoslave/usr/lib/domoleaf/InfoSys.py
2
4691
#!/usr/bin/python3 from subprocess import * import os import socket import sys sys.path.append('/usr/lib/domoleaf'); from DaemonConfigParser import *; SLAVE_CONF_FILE = '/etc/domoleaf/slave.conf'; ## Class representing the local system informations class InfoSys: ## Gets the serial of the mothe...
gpl-3.0
j0nathan33/CouchPotatoServer
libs/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...
gpl-3.0
SpaceKatt/CSPLN
apps/scaffolding/mac/web2py/web2py.app/Contents/Resources/lib/python2.7/numpy/oldnumeric/ma.py
81
75739
"""MA: a facility for dealing with missing observations MA is generally used as a numpy.array look-alike. by Paul F. Dubois. Copyright 1999, 2000, 2001 Regents of the University of California. Released for unlimited redistribution. Adapted for numpy_core 2005 by Travis Oliphant and (mainly) Paul Dubois. """ import ty...
gpl-3.0
ujuo/opencv
opencv-3.2.0/modules/ts/misc/chart.py
18
7956
#!/usr/bin/env python import testlog_parser, sys, os, xml, re from table_formatter import * from optparse import OptionParser cvsize_re = re.compile("^\d+x\d+$") cvtype_re = re.compile("^(CV_)(8U|8S|16U|16S|32S|32F|64F)(C\d{1,3})?$") def keyselector(a): if cvsize_re.match(a): size = [int(d) for d in a.sp...
gpl-3.0
fisle/django-haystack
test_haystack/test_indexes.py
13
26684
# encoding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals import datetime import time from threading import Thread from django.test import TestCase from django.utils.six.moves import queue from test_haystack.core.models import AFifthMockModel, AThirdMockModel, MockModel fr...
bsd-3-clause
zwChan/VATEC
~/eb-virt/Lib/site-packages/pymysql/tests/test_connection.py
20
24275
import datetime import sys import time import unittest2 import pymysql from pymysql.tests import base from pymysql._compat import text_type class TempUser: def __init__(self, c, user, db, auth=None, authdata=None, password=None): self._c = c self._user = user self._db = db create =...
apache-2.0
olokshyn/Parallel-Regulations
Regulation.py
1
3580
from copy import deepcopy from Graph import Graph class Regulation(object): def __init__(self, graph): self.graph = graph self.s_lower = None self.s_upper = None assert isinstance(self.graph, Graph), \ 'graph object must be of type Graph' if self.graph.is_cy...
mit
HydrelioxGitHub/home-assistant
tests/components/zha/test_config_flow.py
11
2304
"""Tests for ZHA config flow.""" from asynctest import patch from homeassistant.components.zha import config_flow from homeassistant.components.zha.const import DOMAIN from tests.common import MockConfigEntry async def test_user_flow(hass): """Test that config flow works.""" flow = config_flow.ZhaFlowHandler(...
apache-2.0
scode/pants
tests/python/pants_test/android/tasks/test_dx_compile.py
4
14596
# coding=utf-8 # Copyright 2015 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 os from colle...
apache-2.0
Teamxrtc/webrtc-streaming-node
third_party/webrtc/src/chromium/src/tools/gyp/test/compiler-override/gyptest-compiler-env-toolchain.py
100
2877
#!/usr/bin/env python # Copyright (c) 2012 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. """ Verifies that the user can override the compiler and linker using CC/CXX/NM/READELF environment variables. """ import TestGyp import os i...
mit
zstyblik/infernal-twin
build/reportlab/tests/test_graphics_barcode.py
13
2006
#Copyright ReportLab Europe Ltd. 2000-2013 #see license.txt for license details """ Tests for barcodes """ from reportlab.lib.testutils import setOutDir,makeSuiteForClasses, outputfile, printLocation setOutDir(__name__) import unittest, os, sys, glob class BarcodeWidgetTestCase(unittest.TestCase): "Test barcode cl...
gpl-3.0
olapaola/olapaola-android-scripting
python/src/Lib/lib-tk/Dialog.py
187
1567
# dialog.py -- Tkinter interface to the tk_dialog script. from Tkinter import * from Tkinter import _cnfmerge if TkVersion <= 3.6: DIALOG_ICON = 'warning' else: DIALOG_ICON = 'questhead' class Dialog(Widget): def __init__(self, master=None, cnf={}, **kw): cnf = _cnfmerge((cnf, kw)) self....
apache-2.0
kayone/Wox
PythonHome/Lib/site-packages/requests/packages/urllib3/contrib/ntlmpool.py
714
4741
# urllib3/contrib/ntlmpool.py # Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ NTLM authenticating pool, contributed by erikcederstran Issue #10, see: http://co...
mit
CastMi/warped2-models
deps/re2/re2/make_unicode_groups.py
121
2867
#!/usr/bin/python # Copyright 2008 The RE2 Authors. All Rights Reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. """Generate C++ tables for Unicode Script and Category groups.""" import sys import unicode _header = """ // GENERATED BY make_unicode_groups...
mit
Refefer/pylearn2
pylearn2/linear/cudnn2d.py
1
5194
""" A module for convolutions with cudnn. """ __author__ = "Nicolas Ballas" __license__ = "3-clause BSD" __credits__ = "Nicolas Ballas and Francesco Visin" __maintainer__ = "Lisa Lab" import functools import numpy as np from theano.sandbox.cuda.dnn import GpuDnnConv, GpuDnnConvDesc from theano.sandbox.cuda.basic_ops...
bsd-3-clause
initNirvana/Easyphotos
env/lib/python3.4/site-packages/setuptools/command/rotate.py
461
2038
from distutils.util import convert_path from distutils import log from distutils.errors import DistutilsOptionError import os from setuptools import Command from setuptools.compat import basestring class rotate(Command): """Delete older distributions""" description = "delete older distributions, keeping N n...
mit
leppa/home-assistant
homeassistant/components/sensor/__init__.py
8
1819
"""Component to interface with various sensors that can be monitored.""" from datetime import timedelta import logging import voluptuous as vol from homeassistant.const import ( DEVICE_CLASS_BATTERY, DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_ILLUMINANCE, DEVICE_CLASS_POWER, DEVICE_CLASS_PRESSURE, D...
apache-2.0
vFense/vFenseAgent-nix
agent/deps/rpm/Python-2.7.5/lib/python2.7/encodings/cp500.py
593
13377
""" Python Character Mapping Codec cp500 generated from 'MAPPINGS/VENDORS/MICSFT/EBCDIC/CP500.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input...
lgpl-3.0
alphafoobar/intellij-community
python/lib/Lib/uu.py
92
6588
#! /usr/bin/env python # Copyright 1994 by Lance Ellinghouse # Cathedral City, California Republic, United States of America. # All Rights Reserved # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provide...
apache-2.0
afaheem88/rally
rally/plugins/openstack/scenarios/murano/packages.py
14
6300
# Copyright 2015: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
lino-framework/lino
lino/core/auth/middleware.py
1
9560
# -*- coding: UTF-8 -*- # Copyright 2017-2021 Rumma & Ko Ltd # License: GNU Affero General Public License v3 (see file COPYING for details) # This started as a copy of Django 1.11 django.contrib.auth.middleware. import datetime from django.core import exceptions from django.utils import translation from django.utils....
bsd-2-clause
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.6/Lib/test/list_tests.py
3
16144
""" Tests common to list and UserList.UserList """ import sys import os from test import test_support, seq_tests class CommonTest(seq_tests.CommonTest): def test_init(self): # Iterable arg is optional self.assertEqual(self.type2test([]), self.type2test()) # Init clears previous values ...
mit
guncoin/guncoin
test/functional/example_test.py
9
8656
#!/usr/bin/env python3 # Copyright (c) 2017-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """An example functional test The module-level docstring should include a high-level description of what ...
mit
horance-liu/tensorflow
tensorflow/contrib/graph_editor/reroute.py
25
19494
# Copyright 2015 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
sugiany/blender_mmd_tools
mmd_tools/properties/root.py
1
7751
# -*- coding: utf-8 -*- """ MMDモデルパラメータ用Prop """ import bpy from bpy.types import PropertyGroup from bpy.props import BoolProperty, CollectionProperty, FloatProperty, IntProperty, StringProperty, EnumProperty import mmd_tools.core.model as mmd_model from mmd_tools.properties.morph import BoneMorph from mmd_tools.prope...
mit
evolutional/flatbuffers
conanfile.py
14
3075
#!/usr/bin/env python # -*- coding: utf-8 -*- """Conan recipe package for Google FlatBuffers """ import os import shutil from conans import ConanFile, CMake, tools class FlatbuffersConan(ConanFile): name = "flatbuffers" license = "Apache-2.0" url = "https://github.com/google/flatbuffers" homepage = "...
apache-2.0
willingc/oh-mainline
vendor/packages/html5lib/html5lib/utils.py
104
4959
try: frozenset except NameError: #Import from the sets module for python 2.3 from sets import Set as set from sets import ImmutableSet as frozenset class MethodDispatcher(dict): """Dict with 2 special properties: On initiation, keys that are lists, sets or tuples are converted to multiple ...
agpl-3.0
rynomster/django
django/contrib/messages/storage/session.py
478
1714
import json from django.contrib.messages.storage.base import BaseStorage from django.contrib.messages.storage.cookie import ( MessageDecoder, MessageEncoder, ) from django.utils import six class SessionStorage(BaseStorage): """ Stores messages in the session (that is, django.contrib.sessions). """ ...
bsd-3-clause
lache/RacingKingLee
monitor/engine.win64/2.74/python/lib/site-packages/requests/packages/chardet/eucjpprober.py
2919
3678
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org 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 Reserved. # # Con...
mit
DrkSephy/django-tutorial
app/views.py
1
1053
# views.py from django.shortcuts import render, HttpResponse import requests # Create your views here. def index(request): return HttpResponse('Hello World!') def test(request): return HttpResponse('My second view!') def profile(request): parsedData = [] if request.method == 'POST': userna...
mit
simongibbons/numpy
numpy/lib/npyio.py
3
87121
import sys import os import re import functools import itertools import warnings import weakref import contextlib from operator import itemgetter, index as opindex from collections.abc import Mapping import numpy as np from . import format from ._datasource import DataSource from numpy.core import overrides from numpy...
bsd-3-clause
dosiecki/NewsBlur
vendor/feedvalidator/xmlEncoding.py
16
10308
#!/usr/bin/python """ $Id: xmlEncoding.py 699 2006-09-25 02:01:18Z rubys $ This module deals with detecting XML encodings, using both BOMs and explicit declarations. """ __author__ = "Joseph Walton <http://www.kafsemo.org/>" __version__ = "$Revision: 699 $" __date__ = "$Date: 2006-09-25 02:01:18 +0000 (Mon, 25 Sep 20...
mit
zhanqxun/cv_fish
win32comext/shell/demos/browse_for_folder.py
4
1701
# A couple of samples using SHBrowseForFolder import sys, os from win32com.shell import shell, shellcon import win32gui # A callback procedure - called by SHBrowseForFolder def BrowseCallbackProc(hwnd, msg, lp, data): if msg== shellcon.BFFM_INITIALIZED: win32gui.SendMessage(hwnd, shellcon.BFFM_SE...
apache-2.0
gnott/elife-bot
activity/activity_ApprovePublication.py
2
5179
import base64 import json import activity import os import requests import boto.sqs from boto.sqs.message import Message from provider import eif """ ConvertJATS.py activity """ parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) os.sys.path.insert(0, parentdir) class activity_ApprovePublication(...
mit
Crop-R/django-mediagenerator
mediagenerator/generators/copyfiles.py
10
1943
from django.conf import settings from hashlib import sha1 from mediagenerator.base import Generator from mediagenerator.utils import get_media_dirs, find_file, prepare_patterns from mimetypes import guess_type import os import sys COPY_MEDIA_FILETYPES = getattr(settings, 'COPY_MEDIA_FILETYPES', ('gif', 'jpg', 'jpe...
bsd-3-clause
saadbinakhlaq/django-oscar
oscar/apps/offer/migrations/0001_initial.py
17
19312
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): depends_on = ( ('catalogue', '0001_initial'), ('order', '0001_initial'), ) def forwards(self, orm): # Adding model ...
bsd-3-clause
mgaertne/minqlx-plugin-tests
src/main/python/afk_auto_spec.py
1
1885
import minqlx class afk_auto_spec(minqlx.Plugin): """ Uses: * qlx_autoSpecWarmup (default: False) whether to spec players during warmup """ def __init__(self): super().__init__() self.add_hook("player_inactivity_kick_warning", self.handle_player_inactive_warning, ...
bsd-3-clause
ThomasMiconi/htmresearch
projects/sequence_prediction/continuous_sequence/run_tm_model.py
3
16639
## ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013-2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This ...
agpl-3.0
geerlingguy/ansible
lib/ansible/modules/replace.py
7
10786
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2013, Evan Kaufman <evan@digitalflophouse.com # Copyright: (c) 2017, Ansible Project # 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__ = ...
gpl-3.0
habeanf/Open-Knesset
mks/tests.py
4
31351
import re from django.test import TestCase from django.test.client import Client from django.core.urlresolvers import reverse from django.contrib.auth.models import User, AnonymousUser from django.contrib.sites.models import Site from tastypie.test import ResourceTestCase from actstream import follow,action from actst...
bsd-3-clause
spxtr/test-infra
experiment/jenkins_to_prow.py
3
6199
#!/usr/bin/env python # Copyright 2016 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 appli...
apache-2.0
cgstudiomap/cgstudiomap
main/eggs/Mako-1.0.3-py2.7.egg/mako/ext/extract.py
76
4261
import re from mako import compat from mako import lexer from mako import parsetree class MessageExtractor(object): def process_file(self, fileobj): template_node = lexer.Lexer( fileobj.read(), input_encoding=self.config['encoding']).parse() for extracted in self.extract_n...
agpl-3.0
pipermerriam/django
tests/transactions/tests.py
239
19163
from __future__ import unicode_literals import sys import threading import time from unittest import skipIf, skipUnless from django.db import ( DatabaseError, Error, IntegrityError, OperationalError, connection, transaction, ) from django.test import ( TransactionTestCase, skipIfDBFeature, skipUnlessDBFea...
bsd-3-clause
akash1808/tempest
tempest/api/data_processing/test_data_sources.py
15
6523
# Copyright (c) 2014 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
ahmadiga/min_edx
lms/djangoapps/courseware/migrations/0003_done_grade_cache.py
194
8745
# 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): # NOTE (vshnayder): This constraint has the wrong field order, so it doesn't actually # do anything in sqlite. M...
agpl-3.0
fivejjs/ibis
ibis/config.py
16
20779
# This file has been adapted from pandas/core/config.py. pandas 3-clause BSD # license. See LICENSES/pandas # # Further modifications: # # Copyright 2014 Cloudera 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 ...
apache-2.0
Hybrid-Cloud/cinder
cinder/tests/unit/api/contrib/test_volume_unmanage.py
6
3858
# Copyright 2014 IBM Corp. # # 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...
apache-2.0
anandha2017/udacity
ud120 Intro to Machine Learning/tools/parse_out_email_text.py
15
1277
#!/usr/bin/python from nltk.stem.snowball import SnowballStemmer import string def parseOutText(f): """ given an opened email file f, parse out all text below the metadata block at the top (in Part 2, you will also add stemming capabilities) and return a string that contains all the words ...
mit
ramanajee/phantomjs
src/breakpad/src/tools/gyp/test/generator-output/gyptest-top-all.py
151
1371
#!/usr/bin/env python # Copyright (c) 2009 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. """ Verifies building a project hierarchy created when the --generator-output= option is used to put the build configuration files in a sepa...
bsd-3-clause
bloyl/mne-python
mne/forward/tests/test_make_forward.py
4
21811
from itertools import product import os import os.path as op import pytest import numpy as np from numpy.testing import assert_equal, assert_allclose, assert_array_equal from mne.channels import make_standard_montage from mne.datasets import testing from mne.io import read_raw_fif, read_raw_kit, read_raw_bti, read_in...
bsd-3-clause
JunctionAt/JunctionWWW
blueprints/auth/api/register.py
1
1590
from flask import request from flask_restful import Resource from flask_restful.reqparse import RequestParser from blueprints.api import require_api_key, register_api_access_token from blueprints.base import rest_api from blueprints.auth.util import check_authenticated_ip, add_authenticated_ip add_api_username_verifi...
agpl-3.0
bgris/ODL_bgris
examples/tomo/filtered_backprojection_parallel_3d.py
1
1863
"""Example using FBP in parallel 3D geometry using `fbp_op`. We use a rotated geometry to demonstrate that the FBP still works as expected. """ import numpy as np import odl # --- Set up geometry of the problem --- # # Reconstruction space: discretized functions on the cube # [-20, 20]^3 with 300 samples per dime...
gpl-3.0
zhangg/trove
trove/guestagent/datastore/experimental/percona/service.py
1
2878
# Copyright 2015 Tesora, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
apache-2.0
prune998/ansible
lib/ansible/modules/network/panos/panos_admpwd.py
78
5971
#!/usr/bin/python # -*- coding: utf-8 -*- # # Ansible module to manage PaloAltoNetworks Firewall # (c) 2016, techbizdev <techbizdev@paloaltonetworks.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 publish...
gpl-3.0
zyantific/continuum
continuum/index.py
1
8142
""" This file is part of the continuum IDA PRO plugin (see zyantific.com). The MIT License (MIT) Copyright (c) 2016 Joel Hoener <athre0z@zyantific.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software")...
mit
heeraj123/oh-mainline
vendor/packages/gdata/src/atom/mock_http.py
278
4474
#!/usr/bin/python # # Copyright (C) 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 ...
agpl-3.0
skrueger111/zazzie
src/sassie/calculate/old_sascalc/hypred_library/run_sassie/predict.py
2
4664
#!/Library/Frameworks/Python.framework/Versions/7.1/bin/python import prdf import numpy #from sassie.sasmol import sasmol #from sassie.simulate.rigid_body.two_body_grid.construct import construct_lmn import sasmol.sasmol as sasmol from construct import construct_lmn import pprint def Error(msg, error=[]): print(msg)...
gpl-3.0
mancoast/CPythonPyc_test
cpython/250_test_getargs2.py
19
9633
import unittest from test import test_support import sys import warnings, re warnings.filterwarnings("ignore", category=DeprecationWarning, message=".*integer argument expected, got float", module=__name__) warnings.filterwarnings("ignore", ...
gpl-3.0
deepmind/open_spiel
open_spiel/python/algorithms/psro_v2/psro_v2.py
1
19909
# Copyright 2019 DeepMind Technologies Ltd. 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 appl...
apache-2.0
sunghan-chang/TizenRT
external/iotivity/iotivity_1.2-rel/build_common/tools/UnpackAll.py
30
25780
# -*- coding: utf-8 -*- # -- Dual Licence ---------------------------------------------------------- ############################################################################ # GPL License # # ...
apache-2.0
reyoung/Paddle
python/paddle/v2/dataset/uci_housing.py
7
4064
# Copyright (c) 2016 PaddlePaddle 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 applic...
apache-2.0
vaginessa/pyload
module/plugins/accounts/MegaRapidoNet.py
6
2200
# -*- coding: utf-8 -*- import re import time from module.plugins.internal.Account import Account class MegaRapidoNet(Account): __name__ = "MegaRapidoNet" __type__ = "account" __version__ = "0.04" __status__ = "testing" __description__ = """MegaRapido.net account plugin""" __license_...
gpl-3.0
phunghv/stardict-3
tools/src/stardict_images.py
41
7885
#!/usr/bin/env python # -*- coding: utf-8 -*- from gimpfu import * import os def prepare_image(image, visibleLayers, size, numColors = None): """prepare custom image image - image object to change size - size of the image in pixels visibleLayers - a list of layers that must be visible """ for layer in imag...
gpl-3.0
thaim/ansible
lib/ansible/plugins/callback/oneline.py
41
3532
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' ...
mit
zingale/pyro2
simulation_null.py
2
6966
import h5py import importlib import mesh.boundary as bnd import mesh.patch as patch from util import msg, profile def grid_setup(rp, ng=1): nx = rp.get_param("mesh.nx") ny = rp.get_param("mesh.ny") try: xmin = rp.get_param("mesh.xmin") except KeyError: xmin = 0.0 msg.warning("...
bsd-3-clause
kaedroho/django
tests/delete_regress/models.py
81
3396
from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from django.db import models class Award(models.Model): name = models.CharField(max_length=25) object_id = models.PositiveIntegerField() content_type = mode...
bsd-3-clause
endorphinl/horizon
openstack_dashboard/contrib/sahara/content/data_processing/cluster_templates/urls.py
21
2039
# 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
anandology/tornado
tornado/autoreload.py
40
12542
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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
projetoquixique/quixique
node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py
2779
1665
# Copyright (c) 2011 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. """gypsh output module gypsh is a GYP shell. It's not really a generator per se. All it does is fire up an interactive Python session with a few local variables...
gpl-3.0
david-barbion/linconnect-server
LinConnectServer/main/linconnect_server.py
1
14144
''' LinConnect: Mirror Android notifications on Linux Desktop Copyright (C) 2013 Will Hauck 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 ...
gpl-3.0
dfenglei/backupassistant
app/api_1_0/users.py
27
1786
from flask import jsonify, request, current_app, url_for from . import api from ..models import User, Post @api.route('/users/<int:id>') def get_user(id): user = User.query.get_or_404(id) return jsonify(user.to_json()) @api.route('/users/<int:id>/posts/') def get_user_posts(id): user = User.query.get_or...
mit
40123148/2015cdb_40123148
static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/colordict.py
621
24077
## pygame - Python Game Library ## Copyright (C) 2000-2003 Pete Shinners ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public ## License as published by the Free Software Foundation; either ## version 2 of the License, or (...
gpl-3.0
brokenjacobs/ansible
test/units/modules/network/vyos/test_vyos_facts.py
121
3084
# (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is dis...
gpl-3.0
jfpla/odoo
addons/membership/__init__.py
441
1101
# -*- 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...
agpl-3.0
SnappleCap/oh-mainline
vendor/packages/scrapy/scrapy/tests/test_utils_pqueue.py
24
5717
from twisted.trial import unittest from scrapy.utils.pqueue import PriorityQueue from scrapy.utils.queue import FifoMemoryQueue, LifoMemoryQueue, FifoDiskQueue, LifoDiskQueue def track_closed(cls): """Wraps a queue class to track down if close() method was called""" class TrackingClosed(cls): def _...
agpl-3.0
bhargavvader/gensim
gensim/test/test_direct_confirmation.py
17
1922
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2011 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Automated tests for direct confirmation measures in the direct_confirmation_measure module. """ import logging import unittest fro...
lgpl-2.1
loli/sklearn-ensembletrees
sklearn/linear_model/stochastic_gradient.py
2
42996
# Authors: Peter Prettenhofer <peter.prettenhofer@gmail.com> (main author) # Mathieu Blondel (partial_fit support) # # License: BSD 3 clause """Classification and regression using Stochastic Gradient Descent (SGD).""" import numpy as np import scipy.sparse as sp from abc import ABCMeta, abstractmethod import...
bsd-3-clause
vaginessa/pyload
module/plugins/hooks/LinkdecrypterComHook.py
13
1246
# -*- coding: utf-8 -*- import re from module.plugins.internal.MultiHook import MultiHook class LinkdecrypterComHook(MultiHook): __name__ = "LinkdecrypterComHook" __type__ = "hook" __version__ = "1.07" __status__ = "testing" __config__ = [("activated" , "bool" , "Activa...
gpl-3.0
mmeslab/linux-nctusde
tools/perf/scripts/python/sctop.py
11180
1924
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
lzac/pycon8-drf
polls/urls.py
1
1622
from django.conf.urls import url from rest_framework.urlpatterns import format_suffix_patterns from web.urls import router from polls.views.api.v0_fbv import question_list, question_detail from polls.views.api.v1_cbv import QuestionBaseListView, QuestionBaseDetailView from polls.views.api.v2_cbv_mixins import Questi...
gpl-3.0
XiaosongWei/chromium-crosswalk
tools/perf/measurements/timeline_controller.py
7
3828
# 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. from telemetry.page import action_runner from telemetry.page import page_test from telemetry.timeline.model import TimelineModel from telemetry.timeline impo...
bsd-3-clause
NukeAOSP/external_chromium
testing/gtest/scripts/upload.py
2511
51024
#!/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...
bsd-3-clause
resmo/ansible
lib/ansible/modules/cloud/openstack/os_volume.py
28
7876
#!/usr/bin/python # Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # 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
oihane/odoomrp-wip
machine_manager_preventive/models/preventive_operation.py
5
5887
# -*- coding: utf-8 -*- # (c) 2015 Daniel Campos <danielcampos@avanzosc.es> - Avanzosc S.L. # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html## from openerp import models, fields, api, exceptions, _ class PreventiveOperationtype(models.Model): _name = 'preventive.operation.type' _description =...
agpl-3.0
Sodki/ansible
lib/ansible/modules/web_infrastructure/jboss.py
48
5112
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Jeroen Hoekx <jeroen.hoekx@dsquare.be> # # 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 th...
gpl-3.0
Patreon/cartographer
example/generic_social_network/tests/controllers/follows_controller_tests.py
1
6264
import json from .controller_test_case import ControllerTestCase class FollowsControllerTestCase(ControllerTestCase): def make_a_user(self, id_='myuserid'): user_json = { 'data': { 'type': 'user', 'id': id_, 'attributes': { 'n...
apache-2.0
pedro2d10/SickRage-FR
lib/github/InputGitTreeElement.py
72
3059
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
gpl-3.0
babyliynfg/cross
tools/project-creator/create_project.py
1
7696
# define global variables context = { "language" : "undefined", "src_project_name" : "undefined", "src_package_name" : "undefined", "dst_project_name" : "undeifned", "dst_package_name" : "undefined", "src_project_path" : "undefined", "dst_project_path" : "undefined", "script_dir" : "undefined", }...
mit
dls-controls/pymalcolm
malcolm/modules/pandablocks/parts/pandatablepart.py
1
6066
import numpy as np from malcolm.compat import OrderedDict from malcolm.core import ( Alarm, BooleanArrayMeta, ChoiceArrayMeta, NumberArrayMeta, TimeStamp, Widget, camel_to_title, snake_to_camel, ) from ..pandablocksclient import TableFieldData from .pandafieldpart import ABlockName, AC...
apache-2.0
harterj/moose
python/chigger/exodus/LabelExodusResult.py
15
1315
#pylint: disable=missing-docstring #* This file is part of the MOOSE framework #* https://www.mooseframework.org #* #* All rights reserved, see COPYRIGHT for full restrictions #* https://github.com/idaholab/moose/blob/master/COPYRIGHT #* #* Licensed under LGPL 2.1, please see LICENSE for details #* https://www.gnu.org/...
lgpl-2.1
lhelwerd/ardupilot
Tools/autotest/param_metadata/param_parse.py
126
5555
#!/usr/bin/env python import os, glob, re, sys from param import * from wikiemit import WikiEmit from xmlemit import XmlEmit from htmlemit import HtmlEmit from optparse import OptionParser parser = OptionParser("param_parse.py [options]") parser.add_option("-v", "--verbose", dest='verbose', action='store_true', defa...
gpl-3.0
kevinr/750book-web
750book-web-env/lib/python2.7/site-packages/distribute-0.6.10-py2.7.egg/setuptools/command/install_scripts.py
3
2011
from distutils.command.install_scripts import install_scripts \ as _install_scripts from pkg_resources import Distribution, PathMetadata, ensure_directory import os from distutils import log class install_scripts(_install_scripts): """Do normal script install, plus any egg_info wrapper scripts""" def ini...
mit