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
ahmadiga/min_edx
common/test/acceptance/tests/lms/test_lms_courseware.py
26
15868
# -*- coding: utf-8 -*- """ End-to-end tests for the LMS. """ import time from ..helpers import UniqueCourseTest from ...pages.studio.auto_auth import AutoAuthPage from ...pages.lms.create_mode import ModeCreationPage from ...pages.studio.overview import CourseOutlinePage from ...pages.lms.courseware import Courseware...
agpl-3.0
akhilari7/pa-dude
lib/python2.7/site-packages/chardet/mbcssm.py
1783
19590
######################## 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
subutai/nupic
src/nupic/algorithms/backtracking_tm_shim.py
6
9992
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, 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 progra...
agpl-3.0
Tranzystorek/servo
tests/wpt/css-tests/css-text-decor-3_dev/html/reference/support/generate-text-emphasis-line-height-tests.py
829
3431
#!/usr/bin/env python # - * - coding: UTF-8 - * - """ This script generates tests text-emphasis-line-height-001 ~ 004 except 001z. They test the line height expansion in different directions. This script outputs a list of all tests it generated in the format of Mozilla reftest.list to the stdout. """ from __future__ ...
mpl-2.0
ales-erjavec/orange-bio
orangecontrib/bio/chem.py
3
50948
"""A library for searching frequent molecular fragments (substructures) based on the Mining Molecular Fragments: Finding Relevant Substructures of Molecules Christian Borgelt and Michael R. Berthold. Classes (see their corresponding __doc__ strings for further detail): Fragment : Representation of the fragme...
gpl-3.0
DOE-NEPA/geonode_2.0_to_2.4_migration
migrate_actstream_follow_modified.py
1
1661
#!/usr/bin/python import os import psycopg2 import sys import django_content_type_mapping file = open("/home/" + os.getlogin() + "/.pgpass", "r") pgpasses = [] for line in file: pgpasses.append(line.rstrip("\n").split(":")) file.close() for pgpass in pgpasses: #print str(pgpass) if pgpass[0] == "54.236.235.110"...
gpl-2.0
DBeath/flask-feedrsub
feedrsub/utils/security.py
1
4868
import functools from flask import request, current_app as app, make_response from flask_security import Security, current_user from flask_security.decorators import _check_http_auth from flask_security.forms import ForgotPasswordForm, RegisterForm, SendConfirmationForm from flask_wtf import RecaptchaField from werkze...
mit
NJHale/chicken-scratch
python-coop-store/coop_routes.py
1
1571
# coop_routes.py import os from flask import Flask from flask import jsonify from flask import request from flask_pymongo import PyMongo app = Flask(__name__) # Get mongodb configurations app.config['MONGO_DBNAME'] = os.getenv('MONGO_DBNAME', 'coopdb') app.config['MONGO_URI'] = ('mongodb://%s:%s/restdb', ...
mit
noironetworks/heat
heat/engine/resources/signal_responder.py
1
15471
# # 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 # ...
apache-2.0
alexanderfefelov/nav
python/nav/web/geomap/coordinates.py
1
10124
# # Copyright (C) 2009, 2010 UNINETT AS # # This file is part of Network Administration Visualized (NAV). # # NAV 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 th...
gpl-2.0
jpshort/odoo
addons/membership/membership.py
11
27706
# -*- 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
kbrebanov/ansible
lib/ansible/modules/remote_management/manageiq/manageiq_policies.py
23
11922
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Daniel Korn <korndaniel1@gmail.com> # (c) 2017, Yaacov Zamir <yzamir@redhat.com> # 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 ANS...
gpl-3.0
timoschwarzer/blendworks
BlendWorks Server/python/Lib/site-packages/pip/_vendor/requests/packages/charade/charsetgroupprober.py
2929
3791
######################## 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 ...
gpl-2.0
tklaus/ansible
lib/ansible/errors/yaml_strings.py
264
3419
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
NullNoname/dolphin
Externals/scons-local/scons-local-2.0.1/SCons/Tool/rpm.py
61
4549
"""SCons.Tool.rpm Tool-specific initialization for rpm. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. The rpm tool calls the rpmbuild command. The first and only argument should a tar.gz consisting of the sourc...
gpl-2.0
madmax983/h2o-3
h2o-py/tests/testdir_munging/unop/pyunit_frame_reducers.py
1
1280
import sys sys.path.insert(1,"../../../") import h2o from tests import pyunit_utils import numpy as np import random def frame_reducers(): data = [[random.uniform(-10000,10000) for r in range(10)] for c in range(10)] h2o_data = h2o.H2OFrame(zip(*data)) np_data = np.array(data) h2o_val = h2o_data...
apache-2.0
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/kombu/exceptions.py
27
1860
""" kombu.exceptions ================ Exceptions. """ from __future__ import absolute_import import socket from amqp import ChannelError, ConnectionError, ResourceError __all__ = ['NotBoundError', 'MessageStateError', 'TimeoutError', 'LimitExceeded', 'ConnectionLimitExceeded', 'ChannelLimitEx...
agpl-3.0
patrikpettersson/rest-engine
lib/werkzeug/_internal.py
89
14082
# -*- coding: utf-8 -*- """ werkzeug._internal ~~~~~~~~~~~~~~~~~~ This module provides internally used helpers and constants. :copyright: (c) 2011 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import inspect from weakref import WeakKeyDictiona...
mit
lukeiwanski/tensorflow-opencl
tensorflow/contrib/distributions/python/ops/categorical.py
5
8801
# 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
andreamerello/linux-stm32
scripts/gdb/linux/dmesg.py
249
2059
# # gdb helper commands and functions for Linux kernel debugging # # kernel log buffer dump # # Copyright (c) Siemens AG, 2011, 2012 # # Authors: # Jan Kiszka <jan.kiszka@siemens.com> # # This work is licensed under the terms of the GNU GPL version 2. # import gdb from linux import utils class LxDmesg(gdb.Command...
gpl-2.0
inesaloulou21/arisgames
zxing-master/cpp/scons/scons-local-2.0.0.final.0/SCons/Tool/Subversion.py
34
2708
"""SCons.Tool.Subversion.py Tool-specific initialization for Subversion. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons F...
mit
jefffohl/nupic
external/linux32/lib/python2.6/site-packages/matplotlib/backend_bases.py
69
69740
""" Abstract base classes define the primitives that renderers and graphics contexts must implement to serve as a matplotlib backend :class:`RendererBase` An abstract base class to handle drawing/rendering operations. :class:`FigureCanvasBase` The abstraction layer that separates the :class:`matplotlib.fi...
gpl-3.0
songfj/calibre
src/calibre/ebooks/lrf/__init__.py
22
4485
__license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>' """ This package contains logic to read and write LRF files. The LRF file format is documented at U{http://www.sven.de/librie/Librie/LrfFormat}. """ from calibre.ebooks.lrf.pylrs.pylrs import Book as _Book from calibre.ebooks.lrf.py...
gpl-3.0
gltn/stdm
stdm/third_party/migrate/changeset/databases/postgres.py
140
1129
""" `PostgreSQL`_ database specific implementations of changeset classes. .. _`PostgreSQL`: http://www.postgresql.org/ """ from migrate.changeset import ansisql from sqlalchemy.databases import postgresql as sa_base PGSchemaGenerator = sa_base.PGDDLCompiler class PGColumnGenerator(PGSchemaGenerator, ansisql.A...
gpl-2.0
Numel2020/NUMEL-Transitions
node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py
1835
12124
# 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. """New implementation of Visual Studio project generation.""" import os import random import gyp.common # hashlib is supplied as of Python 2.5 as the replacemen...
mit
xiyuansun/linux
tools/perf/scripts/python/export-to-postgresql.py
617
16128
# export-to-postgresql.py: export perf data to a postgresql database # Copyright (c) 2014, Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # Thi...
gpl-2.0
Azulinho/ansible
test/units/modules/network/nxos/test_nxos_feature.py
4
2696
# (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
orione7/Italorione
servers/realvid.py
9
2427
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para realvid # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core impor...
gpl-3.0
yencarnacion/jaikuengine
.google_appengine/google/appengine/tools/devappserver2/admin/xmpp_request_handler_test.py
10
7646
#!/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
mhaberler/machinekit
src/emc/usr_intf/touchy/listing.py
35
3481
# Touchy is Copyright (c) 2009 Chris Radek <chris@timeguy.com> # # Touchy 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. # # Touchy i...
lgpl-2.1
inoshiro/symposion-demo
symposion_project/apps/symposion/sponsors_pro/views.py
5
4598
import itertools from functools import wraps from django.http import HttpResponse from django.shortcuts import render_to_response, redirect, get_object_or_404 from django.template import RequestContext from django.contrib import messages from django.contrib.admin.views.decorators import staff_member_required from dj...
mit
vbelakov/h2o
py/testdir_multi_jvm/notest_create_rebalance_2enum.py
9
5646
import unittest, random, sys, time sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_util, h2o_import as h2i REBALANCE_CHUNKS = 100 print "Keeping the # of rows > the number of chunks I ask for. Is that a requirement?" paramDict = { 'rows': [100,1000], 'cols': [1,10,100], # Number of data colu...
apache-2.0
Shaswat27/sympy
sympy/polys/agca/tests/test_modules.py
121
13526
"""Test modules.py code.""" from sympy.polys.agca.modules import FreeModule, ModuleOrder, FreeModulePolyRing from sympy.polys import CoercionFailed, QQ, lex, grlex, ilex, ZZ from sympy.abc import x, y, z from sympy.utilities.pytest import raises from sympy import S def test_FreeModuleElement(): M = QQ.old_poly_r...
bsd-3-clause
simonwydooghe/ansible
lib/ansible/modules/cloud/azure/azure_rm_resource_info.py
28
17641
#!/usr/bin/python # # Copyright (c) 2018 Zim Kalinowski, <zikalino@microsoft.com> # # 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
GenoaIO/ews-python-suds
src/suds/wsdl.py
197
31503
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser 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 that it will ...
bsd-2-clause
wsmith323/django
django/template/smartif.py
69
6197
""" Parser and utilities for the smart 'if' tag """ # Using a simple top down parser, as described here: # http://effbot.org/zone/simple-top-down-parsing.htm. # 'led' = left denotation # 'nud' = null denotation # 'bp' = binding power (left = lbp, right = rbp) class TokenBase(object): """ Base class for ope...
bsd-3-clause
RogueFrog/calculator
lexer_calc.py
1
1083
from types_calc import * class Lexer: def setLine(self, line): self.line = line + ' ' self.tokenizes = [] self.tokenNumber = '' def tokenize(self): for i in self.line: Lexer.tokenizeNumber(self, i) Lexer.tokenizeMath(self, i) ...
mit
rahul67/hue
desktop/core/ext-py/lxml/src/lxml/html/tests/transform_feedparser_data.py
28
2819
""" This takes the feedparser tests from here: http://feedparser.org/tests/wellformed/sanitize/ and rewrites them to be easier to handle (not using the internal model of feedparser). The input format is:: <!-- Description: {description} Expect: {expression} --> ... <content ...>{content}</content> ....
apache-2.0
NEricN/RobotCSimulator
Python/App/Lib/test/curses_tests.py
201
1241
#!/usr/bin/env python # # $Id: ncurses.py 36559 2004-07-18 05:56:09Z tim_one $ # # Interactive test suite for the curses module. # This script displays various things and the user should verify whether # they display correctly. # import curses from curses import textpad def test_textpad(stdscr, insert_mode=False): ...
apache-2.0
cgstudiomap/cgstudiomap
main/eggs/python_stdnum-1.2-py2.7.egg/stdnum/verhoeff.py
3
3161
# verhoeff.py - functions for performing the Verhoeff checksum # # Copyright (C) 2010, 2011, 2012, 2013 Arthur de Jong # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2...
agpl-3.0
pratikmallya/hue
desktop/core/ext-py/boto-2.38.0/boto/beanstalk/layer1.py
146
56259
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # 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...
apache-2.0
b1-systems/kiwi
test/unit/utils_rpm_test.py
1
3046
import io import os from .test_helper import patch_open from mock import ( patch, Mock, MagicMock, call ) from kiwi.utils.rpm import Rpm from kiwi.defaults import Defaults class TestRpm(object): def setup(self): self.rpm_host = Rpm() self.rpm_image = Rpm('root_dir') self.macro_file = ...
gpl-3.0
cemoody/chainer
chainer/links/caffe/caffe_pb2.py
27
209364
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: caffe.proto from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import...
mit
zenodo/invenio
invenio/legacy/webalert/htmlparser.py
11
6799
# This file is part of Invenio. # Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at ...
gpl-2.0
BFriedland/UserDataBase-Heroku
venv/Lib/encodings/hp_roman8.py
134
13447
""" 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 ...
mit
HuaweiSwitch/ansible
lib/ansible/plugins/connection/jail.py
35
8225
# Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # and chroot.py (c) 2013, Maykel Moya <mmoya@speedyrails.com> # (c) 2013, Michael Scherer <misc@zarb.org> # (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it...
gpl-3.0
crobinso/virt-manager
virtinst/devices/hostdev.py
2
4651
# # Copyright 2009, 2013 Red Hat, Inc. # # This work is licensed under the GNU GPLv2 or later. # See the COPYING file in the top-level directory. import re from ..logger import log from .device import Device from ..nodedev import NodeDevice from ..xmlbuilder import XMLProperty class DeviceHostdev(Device): XML_...
gpl-2.0
litong01/python-monasca
kiloeyes/openstack/common/eventlet_backdoor.py
1
4777
# Copyright (c) 2012 OpenStack Foundation. # Administrator of the National Aeronautics and Space Administration. # 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 a...
apache-2.0
chuan9/chromium-crosswalk
base/allocator/prep_libc.py
50
2407
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # # This script takes libcmt.lib for VS2013 and removes the allocation related # functions from it. # # Usage: prep_libc.py <VCLibD...
bsd-3-clause
felliott/osf.io
api_tests/providers/preprints/views/test_preprint_provider_request_list.py
15
2781
import pytest from api.base.settings.defaults import API_BASE from api_tests.requests.mixins import PreprintRequestTestMixin @pytest.mark.django_db class TestPreprintProviderWithdrawalRequstList(PreprintRequestTestMixin): def url(self, provider): return '/{}providers/preprints/{}/withdraw_requests/'.forma...
apache-2.0
southpaw94/MachineLearning
Perceptron/Iris.py
1
1993
import pandas as pd import numpy as np import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap from Perceptron import Perceptron def plotRawData(): plt.scatter(X[:50, 0], X[:50, 1], color='red', marker='o', label='setosa') plt.scatter(X[50:100, 0], X[50:100, 1], color='blue', marker='x', ...
gpl-2.0
srus/django-kickstartvenv
boot/ipython/ipython_config.py
3
19804
# Configuration file for ipython. c = get_config() #------------------------------------------------------------------------------ # InteractiveShellApp configuration #------------------------------------------------------------------------------ # A Mixin for applications that start InteractiveShell instances. # # ...
mit
Serag8/Bachelor
google_appengine/lib/django-1.2/django/contrib/gis/gdal/prototypes/ds.py
311
4244
""" This module houses the ctypes function prototypes for OGR DataSource related data structures. OGR_Dr_*, OGR_DS_*, OGR_L_*, OGR_F_*, OGR_Fld_* routines are relevant here. """ from ctypes import c_char_p, c_double, c_int, c_long, c_void_p, POINTER from django.contrib.gis.gdal.envelope import OGREnvelope from djan...
mit
peak6/st2
st2reactor/st2reactor/rules/datatransform.py
2
2532
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
apache-2.0
andela-bojengwa/pleft
plapp/views.py
6
13418
# Copyright 2009, 2010 Sander Dijkhuis <sander.dijkhuis@gmail.com> # # This file is part of Pleft. # # Pleft 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 optio...
gpl-3.0
fhartwig/adhocracy3.mercator
src/adhocracy_core/adhocracy_core/test_interfaces.py
4
2797
import unittest from adhocracy_core.interfaces import ISheet class SheetToSheetUnitTests(unittest.TestCase): def test_create_valid(self): from adhocracy_core.interfaces import SheetToSheet as Reference # substanced standard tagged values assert Reference.getTaggedValue('source_integrity'...
agpl-3.0
kangkot/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/distutils/tests/test_sdist.py
47
4905
"""Tests for distutils.command.sdist.""" import os import unittest import shutil import zipfile from os.path import join import sys from distutils.command.sdist import sdist from distutils.core import Distribution from distutils.tests.test_config import PyPIRCCommandTestCase from distutils.errors import DistutilsExecE...
apache-2.0
Shenmolu/rosalind
sample.py
1
3913
def LCSBACKTRACK(v, w,u): global score m=len(v)+1 n=len(w)+1 l=len(u)+1 Backtrack=[[[0 for x in range(l)]for y in range(m)]for z in range(n)] s=[[[0 for x in range(l)]for y in range(m)]for z in range(n)] for i in range(n): s[i][0][0]= -i Backtrack[i][0][0] = 0 for i in r...
gpl-3.0
lcostantino/healing-os
healing/openstack/common/db/sqlalchemy/test_migrations.py
1
11081
# Copyright 2010-2011 OpenStack Foundation # Copyright 2012-2013 IBM Corp. # 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/li...
apache-2.0
frouty/odoogoeen
addons/hr_holidays/report/holidays_summary_report.py
23
10494
# -*- 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
cocosli/antlr4
runtime/Python2/src/antlr4/atn/ATNDeserializationOptions.py
14
2185
#[The "BSD license"] # Copyright (c) 2013 Terence Parr # Copyright (c) 2013 Sam Harwell # Copyright (c) 2014 Eric Vergnaud # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions ...
bsd-3-clause
mahabs/nitro
nssrc/com/citrix/netscaler/nitro/resource/config/vpn/vpnvserver_authenticationldappolicy_binding.py
1
14377
# # Copyright (c) 2008-2015 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
apache-2.0
100Shapes/wagtail
wagtail/wagtailsearch/management/commands/update_index.py
2
2445
from django.core.management.base import BaseCommand from django.db import models from wagtail.wagtailsearch import Indexed, get_search_backend class Command(BaseCommand): def handle(self, **options): # Print info self.stdout.write("Getting object list") # Get list of indexed models ...
bsd-3-clause
purduesigbots/pros-cli
pros/common/ui/interactive/components/container.py
1
1157
from typing import * from pros.common.ui.interactive.parameters import BooleanParameter from .component import Component class Container(Component): """ A Container has multiple Components, possibly a title, and possibly a description """ def __init__(self, *elements: Component, tit...
mpl-2.0
Stanford-Online/edx-platform
common/djangoapps/course_modes/helpers.py
23
3214
""" Helper methods for CourseModes. """ from django.utils.translation import ugettext_lazy as _ from course_modes.models import CourseMode from student.helpers import VERIFY_STATUS_APPROVED, VERIFY_STATUS_NEED_TO_VERIFY, VERIFY_STATUS_SUBMITTED DISPLAY_VERIFIED = "verified" DISPLAY_HONOR = "honor" DISPLAY_AUDIT = "au...
agpl-3.0
Changaco/oh-mainline
vendor/packages/html5lib/html5lib/tests/test_tokenizer.py
72
6826
import sys import os import unittest import cStringIO import warnings import re try: import json except ImportError: import simplejson as json from support import html5lib_test_files from html5lib.tokenizer import HTMLTokenizer from html5lib import constants class TokenizerTestParser(object): def __init_...
agpl-3.0
NeovaHealth/odoo
addons/website_forum_doc/__openerp__.py
322
1508
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
jamielennox/keystone
keystone/contrib/federation/schema.py
14
2401
# 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 Li...
apache-2.0
apache/airflow
tests/providers/google/cloud/operators/test_mlengine_system.py
10
1883
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
yanheven/horizon
horizon/tabs/base.py
36
17272
# Copyright 2012 Nebula, 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 agree...
apache-2.0
TedaLIEz/sentry
src/sentry/migrations/0046_auto__add_teammember__add_unique_teammember_team_user__add_team__add_p.py
36
22165
# 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): # Adding model 'TeamMember' db.create_table('sentry_teammember', ( ('id', self.gf('sentry.db.models.fi...
bsd-3-clause
apache-spark-on-k8s/spark
examples/src/main/python/ml/bisecting_k_means_example.py
69
1777
# # 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
mmoya/ansible
lib/ansible/utils/display_functions.py
147
2184
# (c) 2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
gpl-3.0
Yangqing/caffe2
caffe2/experiments/python/funhash_op_test.py
4
2885
# Copyright (c) 2016-present, Facebook, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
apache-2.0
mzdaniel/oh-mainline
vendor/packages/twisted/twisted/internet/threads.py
25
3851
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Extended thread dispatching support. For basic support see reactor threading API docs. Maintainer: Itamar Shtull-Trauring """ import Queue from twisted.python import failure from twisted.internet import defer def deferToThreadPool(reacto...
agpl-3.0
michael-ball/sublime-text
sublime-text-3/Packages/Python PEP8 Autoformat/libs/py26/lib2to3/pgen2/grammar.py
119
5373
# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """This module defines the data structures used to represent a grammar. These are a bit arcane because they are derived from the data structures used by Python's 'pgen' parser generator. There's also ...
unlicense
mbayon/TFG-MachineLearning
venv/lib/python3.6/site-packages/numpy/polynomial/hermite.py
7
57744
""" Objects for dealing with Hermite series. This module provides a number of objects (mostly functions) useful for dealing with Hermite series, including a `Hermite` class that encapsulates the usual arithmetic operations. (General information on how this module represents and works with such polynomials is in the d...
mit
thefinn93/CouchPotatoServer
libs/requests/packages/chardet/big5freq.py
323
82588
######################## 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 ...
gpl-3.0
wzhfy/spark
examples/src/main/python/mllib/power_iteration_clustering_example.py
27
1753
# # 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
arnavgosain/msm8x27
tools/perf/util/setup.py
4998
1330
#!/usr/bin/python2 from distutils.core import setup, Extension from os import getenv from distutils.command.build_ext import build_ext as _build_ext from distutils.command.install_lib import install_lib as _install_lib class build_ext(_build_ext): def finalize_options(self): _build_ext.finalize_optio...
gpl-2.0
gablg1/PerfKitBenchmarker
perfkitbenchmarker/benchmarks/silo_benchmark.py
4
4840
# 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
sometallgit/AutoUploader
Python27/Lib/distutils/tests/test_dist.py
12
15852
# -*- coding: utf8 -*- """Tests for distutils.dist.""" import os import StringIO import sys import unittest import warnings import textwrap from distutils.dist import Distribution, fix_help_options from distutils.cmd import Command import distutils.dist from test.test_support import TESTFN, captured_stdout, run_unitt...
mit
alexsanjoseph/duolingo-save-streak
chardet/sjisprober.py
290
3774
######################## 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
farhi-naz/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/net/irc/ircbot.py
127
4228
# Copyright (c) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
bsmrstu-warriors/Moytri--The-Drone-Aider
Lib/site-packages/scipy/linalg/special_matrices.py
55
15621
import math import numpy as np #----------------------------------------------------------------------------- # matrix construction functions #----------------------------------------------------------------------------- def tri(N, M=None, k=0, dtype=None): """ Construct (N, M) matrix filled with ones at and...
gpl-3.0
gautamMalu/rootfs_xen_arndale
usr/lib/python3.4/heapq.py
208
17997
"""Heap queue algorithm (a.k.a. priority queue). Heaps are arrays for which a[k] <= a[2*k+1] and a[k] <= a[2*k+2] for all k, counting elements from 0. For the sake of comparison, non-existing elements are considered to be infinite. The interesting property of a heap is that a[0] is always its smallest element. Usag...
gpl-2.0
idncom/odoo
addons/base_iban/__openerp__.py
260
1724
# -*- 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
googlevr/tilt-brush-toolkit
tests/test_tilt.py
1
3871
# Copyright 2016 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
pirata-cat/agora-ciudadana
agora_site/misc/decorators.py
2
4661
from functools import wraps from django.db.models import Model, get_model from django.db.models.base import ModelBase from django.db.models.query import QuerySet from django.shortcuts import get_object_or_404 from django.http import Http404 from guardian.exceptions import GuardianError from tastypie import http from ...
agpl-3.0
iphoting/healthchecks
hc/accounts/migrations/0001_initial.py
2
1144
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL)] operations = [ migrations.CreateModel( ...
bsd-3-clause
hjjeon0608/mbed_for_W7500P
workspace_tools/host_tests/host_tests_plugins/__init__.py
30
2604
""" mbed SDK Copyright (c) 2011-2013 ARM Limited 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 wr...
apache-2.0
jbonofre/incubator-beam
sdks/python/apache_beam/examples/wordcount_debugging.py
6
6617
# # 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
project-generator/project_generator
tests/test_commands/test_list.py
6
2455
# Copyright 2015 0xc0170 # # 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, soft...
apache-2.0
JuliaLang/JuliaBox
engine/src/juliabox/plugins/usage_accounting/usage_accounting_tbl.py
3
5265
import datetime import pytz import json import random from boto.dynamodb2.fields import HashKey, RangeKey, AllIndex, IncludeIndex from boto.dynamodb2.types import NUMBER, STRING from juliabox.db import JBPluginDB from juliabox.db import JBoxDB class JBoxAccountingV2(JBPluginDB): provides = [JBPluginDB.JBP_TABLE...
mit
minhphung171093/OpenERP_V8
openerp/addons/mail/wizard/__init__.py
438
1075
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
n1nj4sec/memorpy
memorpy/utils.py
4
3335
# Author: Nicolas VERDIER # This file is part of memorpy. # # memorpy 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. # # memorpy is di...
gpl-3.0
sxjscience/tvm
python/tvm/auto_scheduler/cost_model/xgb_model.py
1
20288
# 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
Fusion-Rom/android_external_chromium_org
third_party/protobuf/python/google/protobuf/internal/descriptor_test.py
261
24195
#! /usr/bin/python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # ...
bsd-3-clause
Pablo126/SSBW
Tarea4/tarea4/lib/python3.5/site-packages/django/template/smartif.py
63
6389
""" Parser and utilities for the smart 'if' tag """ # Using a simple top down parser, as described here: # http://effbot.org/zone/simple-top-down-parsing.htm. # 'led' = left denotation # 'nud' = null denotation # 'bp' = binding power (left = lbp, right = rbp) class TokenBase(object): """ Base class for ope...
gpl-3.0
vganapath/rally
rally/common/fileutils.py
18
3855
# Copyright 2013: 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