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
GodBlessPP/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/unittest/test/test_suite.py
791
12066
import unittest import sys from .support import LoggingResult, TestEquality ### Support code for Test_TestSuite ################################################################ class Test(object): class Foo(unittest.TestCase): def test_1(self): pass def test_2(self): pass def test_3(self...
gpl-3.0
daenamkim/ansible
lib/ansible/modules/cloud/amazon/elb_instance.py
19
13792
#!/usr/bin/python # Copyright: 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__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
anamhira47/Finesse-Coin
external/miniupnpc/testupnpigd.py
166
2364
#! /usr/bin/python # $Id: testupnpigd.py,v 1.4 2008/10/11 10:27:20 nanard Exp $ # MiniUPnP project # Author : Thomas Bernard # This Sample code is public domain. # website : http://miniupnp.tuxfamily.org/ # import the python miniupnpc module import miniupnpc import socket import BaseHTTPServer # function definition d...
mit
hejuna/bite-project
server/config/settings.py
17
1133
# Copyright 2010 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
ndchorley/scipy
scipy/linalg/decomp_cholesky.py
107
9601
"""Cholesky decomposition functions.""" from __future__ import division, print_function, absolute_import from numpy import asarray_chkfinite, asarray # Local imports from .misc import LinAlgError, _datacopied from .lapack import get_lapack_funcs __all__ = ['cholesky', 'cho_factor', 'cho_solve', 'cholesky_banded', ...
bsd-3-clause
40023255/-w16b_test
static/Brython3.1.1-20150328-091302/Lib/site-packages/turtle.py
619
105984
import math from javascript import console from browser import document, html import _svg _CFG = {"width" : 0.5, # Screen "height" : 0.75, "canvwidth" : 400, "canvheight": 300, "leftright": None, "topbottom": None, "mode": "standard", # TurtleScre...
agpl-3.0
glneo/gnuradio
gr-qtgui/examples/pyqt_freq_f.py
58
6076
#!/usr/bin/env python # # Copyright 2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # ...
gpl-3.0
cfossace/test
crits/services/analysis_result.py
22
4011
from django.conf import settings from mongoengine import Document, StringField, ListField, EmbeddedDocument from mongoengine import DynamicEmbeddedDocument, DynamicField, UUIDField from mongoengine import DictField, EmbeddedDocumentField, BooleanField from crits.core.crits_mongoengine import CritsDocument, CritsSchema...
mit
3v1n0/pywws
src/pywws/constants.py
3
1295
#!/usr/bin/env python # pywws - Python software for USB Wireless Weather Stations # http://github.com/jim-easterbrook/pywws # Copyright (C) 2008-15 pywws contributors # 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 Fr...
gpl-2.0
mibanescu/pulp
common/pulp/common/plugins/importer_constants.py
7
2810
# -*- coding: utf-8 -*- # Copyright (c) 2013 Red Hat, Inc. # # This software is licensed to you under the GNU General Public # License as published by the Free Software Foundation; either version # 2 of the License (GPLv2) or (at your option) any later version. # There is NO WARRANTY for this software, express or impli...
gpl-2.0
x303597316/hue
desktop/core/ext-py/guppy-0.1.10/guppy/heapy/test/test_menuleak.py
37
2942
from Tkinter import * import sys import gc class FixedMenu(Menu): # A fix for the .delete() method in Menu. # To delete commands defined in the menu items deleted. # Also changed the comment: INDEX2 is actually INCLUDED. def delete(self, index1, index2=None): """Delete menu items between INDEX1...
apache-2.0
aspidites/django
django/contrib/auth/handlers/modwsgi.py
537
1344
from django import db from django.contrib import auth from django.utils.encoding import force_bytes def check_password(environ, username, password): """ Authenticates against Django's auth database mod_wsgi docs specify None, True, False as return value depending on whether the user exists and authen...
bsd-3-clause
jose36/plugin.video.ProyectoLuzDigital1
servers/vidxden.py
35
5643
# -*- coding: iso-8859-1 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para vidxden # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core ...
gpl-2.0
manahl/arctic
tests/integration/store/test_pickle_store.py
1
4373
from datetime import datetime as dt, timedelta import bson import numpy as np from mock import patch from arctic._util import mongo_count from arctic.arctic import Arctic def test_save_read_bson(library): blob = {'foo': dt(2015, 1, 1), 'bar': ['a', 'b', ['x', 'y', 'z']]} library.write('BLOB', blob) save...
lgpl-2.1
egenerat/flight-manager
django/utils/_threading_local.py
13
6895
"""Thread-local objects (Note that this module provides a Python version of thread threading.local class. Depending on the version of Python you're using, there may be a faster one available. You should always import the local class from threading.) Thread-local objects support the management of thread-lo...
mit
theicfire/djangofun
dbindexer/base.py
73
1372
from django.conf import settings from django.utils.importlib import import_module class DatabaseOperations(object): dbindexer_compiler_module = __name__.rsplit('.', 1)[0] + '.compiler' def __init__(self): self._dbindexer_cache = {} def compiler(self, compiler_name): if compiler_name not i...
bsd-3-clause
SINGROUP/pycp2k
pycp2k/classes/_each134.py
1
1114
from pycp2k.inputsection import InputSection class _each134(InputSection): def __init__(self): InputSection.__init__(self) self.Just_energy = None self.Powell_opt = None self.Qs_scf = None self.Xas_scf = None self.Md = None self.Pint = None self.Meta...
lgpl-3.0
Tomographer/tomographer
test/pytest_t_mhrwtasks.py
1
6356
#!/usr/bin/env python from __future__ import print_function import re import numpy as np import numpy.testing as npt import logging logging.basicConfig(level=logging.DEBUG) import unittest # import the module import tomographer.mhrwtasks import tomographer class MHRWTasksStuff(unittest.TestCase): def test_...
mit
anchore/anchore
anchore/anchore-modules/gates/11_check_image.py
1
1615
#!/usr/bin/env python import sys import os import json import re import anchore from anchore import anchore_utils gate_name = "IMAGECHECK" triggers = { 'BASEOUTOFDATE': { 'description':'triggers if the image\'s base image has been updated since the image was built/analyzed', 'params':'None' ...
apache-2.0
erwilan/ansible
lib/ansible/modules/monitoring/zabbix_group.py
42
7600
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2013-2014, Epic Games, 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
bluven/eonboard
eoncloud_web/biz/account/views.py
1
12004
#-*-coding-utf-8-*- from datetime import datetime import logging from rest_framework import generics from rest_framework import status from rest_framework.response import Response from rest_framework.decorators import api_view from django.conf import settings from django.shortcuts import render_to_response from dja...
apache-2.0
ygol/odoo
addons/l10n_in_hr_payroll/report/report_payslip_details.py
374
1791
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP SA (<http://openerp.com>). All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under th...
agpl-3.0
pekeler/arangodb
3rdParty/V8-4.3.61/buildtools/checkdeps/builddeps.py
53
15226
#!/usr/bin/env python # 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. """Traverses the source tree, parses all found DEPS files, and constructs a dependency rule table to be used by subclasses. The format...
apache-2.0
DolphinDream/sverchok
nodes/pulga_physics/pulga_springs_force.py
2
3200
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
gpl-3.0
JakeLowey/HackRPI2
django/db/backends/postgresql_psycopg2/base.py
81
9415
""" PostgreSQL database backend for Django. Requires psycopg 2: http://initd.org/projects/psycopg2 """ import sys from django.db import utils from django.db.backends import * from django.db.backends.signals import connection_created from django.db.backends.postgresql_psycopg2.operations import DatabaseOperations from...
mit
fengzhyuan/scikit-learn
sklearn/neighbors/unsupervised.py
106
4461
"""Unsupervised nearest neighbors learner""" from .base import NeighborsBase from .base import KNeighborsMixin from .base import RadiusNeighborsMixin from .base import UnsupervisedMixin class NearestNeighbors(NeighborsBase, KNeighborsMixin, RadiusNeighborsMixin, UnsupervisedMixin): """Unsu...
bsd-3-clause
nikobockerman/rsnapshot-backup
rsnapshotbackup/argumentparser.py
1
1573
''' http://stackoverflow.com/a/5943381 ''' import argparse import sys class ArgParser(argparse.ArgumentParser): def __init__(self, *args, **kwargs): """Initialisation method for the parser class""" super(ArgParser, self).__init__(*args, **kwargs) #argparse.ArgumentParser.__init__(self, *...
bsd-2-clause
lcy-seso/models
ctr/train.py
4
3787
import argparse import gzip import reader import paddle.v2 as paddle from utils import logger, ModelType from network_conf import CTRmodel def parse_args(): parser = argparse.ArgumentParser(description="PaddlePaddle CTR example") parser.add_argument( '--train_data_path', type=str, req...
apache-2.0
soltanmm-google/grpc
src/python/grpcio_tests/tests/reflection/_reflection_servicer_test.py
2
7268
# Copyright 2016, 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
plamenbbn/XDATA
textstructure/utilities/langid/langid/train/tokenize.py
5
8379
#!/usr/bin/env python """ tokenize.py - Tokenizer for langid.py training system. This takes a list of files and tokenizes them in parallel. Marco Lui, January 2013 Copyright 2013 Marco Lui <saffsd@gmail.com>. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are p...
apache-2.0
marratj/ansible
lib/ansible/module_utils/openstack.py
76
4519
# 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
samsu/neutron
tests/unit/midonet/test_midonet_driver.py
11
1979
# Copyright (C) 2012 Midokura Japan K.K. # Copyright (C) 2013 Midokura PTE 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.or...
apache-2.0
Gabriel439/pants
contrib/go/tests/python/pants_test/contrib/go/tasks/test_go_binary_create.py
4
1948
# 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 pant...
apache-2.0
surculus12/py-hyphen
hyphen/knuth_liang.py
1
1704
""" Our implementation of knuth-liang """ from string import digits from collections import OrderedDict from .language_patterns import LanguagePatterns class KnuthLiang(object): """ This class implements knuth-liang """ __slots__ = ['language_patterns', 'limit_left', 'limit_right'] def __init__...
mit
deanydean/py-dns-filter
dnsfilter/resolvers.py
2
1483
#!/usr/bin/python # # Copyright 2016 Deany Dean # # 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 ...
apache-2.0
naousse/odoo
addons/account_budget/wizard/account_budget_report.py
375
2067
# -*- 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
andreiw/xen3-arm-tegra
tools/python/xen/web/protocol.py
52
1463
#============================================================================ # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope th...
gpl-2.0
pferreir/indico-backup
indico/MaKaC/webinterface/common/contribFilters.py
1
15606
# -*- coding: utf-8 -*- ## ## ## This file is part of Indico. ## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN). ## ## Indico 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; eith...
gpl-3.0
wuhengzhi/chromium-crosswalk
third_party/WebKit/Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py
4
18617
# Copyright (C) 2012 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
ybellavance/python-for-android
python-build/python-libs/gdata/build/lib/gdata/media/__init__.py
221
12093
# -*-*- encoding: utf-8 -*-*- # # This is gdata.photos.media, implementing parts of the MediaRSS spec in gdata structures # # $Id: __init__.py 81 2007-10-03 14:41:42Z havard.gulldahl $ # # Copyright 2007 Håvard Gulldahl # Portions copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "Lice...
apache-2.0
Lana-B/Pheno4T
madanalysis/install/install_fastjetcontrib.py
1
6885
################################################################################ # # Copyright (C) 2012-2013 Eric Conte, Benjamin Fuks # The MadAnalysis development team, email: <ma5team@iphc.cnrs.fr> # # This file is part of MadAnalysis 5. # Official website: <https://launchpad.net/madanalysis5> # # MadAnal...
gpl-3.0
vterron/montage-wrapper
setup.py
2
3500
#!/usr/bin/env python # Licensed under a 3-clause BSD style license - see LICENSE.rst import glob import os import sys import ah_bootstrap from setuptools import setup #A dirty hack to get around some early import/configurations ambiguities if sys.version_info[0] >= 3: import builtins else: import __builtin_...
bsd-3-clause
4doemaster/enigma2
lib/python/Components/Renderer/Listbox.py
20
3072
from Renderer import Renderer from enigma import eListbox # the listbox renderer is the listbox, but no listbox content. # the content will be provided by the source (or converter). # the source should emit the 'changed' signal whenever # it has a new listbox content. # the source needs to have the 'content' propert...
gpl-2.0
steynovich/ansible-modules-extras
cloud/cloudstack/cs_user.py
44
13000
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # # 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 Lice...
gpl-3.0
lz1988/django-web
build/lib/django/shortcuts/__init__.py
99
5754
""" This module collects helper functions and classes that "span" multiple levels of MVC. In other words, these functions/classes introduce controlled coupling for convenience's sake. """ import warnings from django.template import loader, RequestContext from django.http import HttpResponse, Http404 from django.http i...
apache-2.0
barbour-em/osf.io
tests/test_contributors_views.py
14
6367
# -*- coding: utf-8 -*- from nose.tools import * # noqa; PEP8 asserts from tests.factories import ProjectFactory, NodeFactory, AuthUserFactory from tests.base import OsfTestCase, fake from framework.auth.decorators import Auth from website.profile import utils class TestContributorUtils(OsfTestCase): def se...
apache-2.0
hojel/youtube-dl
youtube_dl/extractor/screencast.py
147
4200
# -*- coding: utf-8 -*- from __future__ import unicode_literals from .common import InfoExtractor from ..compat import ( compat_parse_qs, compat_urllib_request, ) from ..utils import ( ExtractorError, ) class ScreencastIE(InfoExtractor): _VALID_URL = r'https?://www\.screencast\.com/t/(?P<id>[a-zA-Z0-...
unlicense
ymca-ireland/hth
app/main.py
1
2477
#!/usr/bin/env kivy import kivy import uuid kivy.require('1.8.0') from kivy.app import App from kivy.properties import NumericProperty, ReferenceListProperty,ObjectProperty, StringProperty from kivy.uix.button import Button from kivy.uix.label import Label from kivy.uix.boxlayout import BoxLayout from kivy.uix.scre...
bsd-2-clause
totalretribution/Cura
cura/CuraApplication.py
2
40911
# Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from UM.Qt.QtApplication import QtApplication from UM.Scene.SceneNode import SceneNode from UM.Scene.Camera import Camera from UM.Math.Vector import Vector from UM.Math.Quaternion import Quaternion from UM.Math.AxisAlignedB...
agpl-3.0
mrosenbladt/yaml-cpp.old-api
test/gmock-1.7.0/gtest/test/gtest_throw_on_failure_test.py
2917
5766
#!/usr/bin/env python # # Copyright 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...
mit
coldmind/django
django/db/transaction.py
98
12277
from django.db import ( DEFAULT_DB_ALIAS, DatabaseError, Error, ProgrammingError, connections, ) from django.utils.decorators import ContextDecorator class TransactionManagementError(ProgrammingError): """ This exception is thrown when transaction management is used improperly. """ pass def get_...
bsd-3-clause
suncycheng/intellij-community
python/lib/Lib/site-packages/django/core/servers/fastcgi.py
289
6402
""" FastCGI (or SCGI, or AJP1.3 ...) server that implements the WSGI protocol. Uses the flup python package: http://www.saddi.com/software/flup/ This is a adaptation of the flup package to add FastCGI server support to run Django apps from Web servers that support the FastCGI protocol. This module can be run standalo...
apache-2.0
Khan/react-components
make_template.py
1
1966
#!/usr/bin/env python # TODO(colin): fix these lint errors (http://pep8.readthedocs.io/en/release-1.7.x/intro.html#error-codes) # pep8-disable:E128 import os.path import jinja2 from jinja2.ext import Extension class CodeExampleExtension(Extension): """Insert a code example. My plan for the docs is side-by-...
mit
cloudera/hue
desktop/core/ext-py/gunicorn-19.9.0/gunicorn/workers/gtornado.py
5
5044
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. import copy import os import sys try: import tornado except ImportError: raise RuntimeError("You need tornado installed to use this worker.") import tornado.web import tornado.httpser...
apache-2.0
testalt/electrum-ppc
setup-release.py
1
2894
""" py2app/py2exe build script for Electrum Litecoin Usage (Mac OS X): python setup.py py2app Usage (Windows): python setup.py py2exe """ from setuptools import setup import os import re import shutil import sys from lib.util import print_error from lib.version import ELECTRUM_VERSION as version name = ...
gpl-3.0
vjmac15/Lyilis
lib/youtube_dl/extractor/uplynk.py
65
2625
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( float_or_none, ExtractorError, ) class UplynkIE(InfoExtractor): IE_NAME = 'uplynk' _VALID_URL = r'https?://.*?\.uplynk\.com/(?P<path>ext/[0-9a-f]{32}/(?P<external_id>[^/?&]+)|(?P...
gpl-3.0
bikong2/django
tests/proxy_model_inheritance/tests.py
278
1764
from __future__ import absolute_import, unicode_literals import os from django.core.management import call_command from django.test import TestCase, TransactionTestCase from django.test.utils import extend_sys_path from django.utils._os import upath from .models import ( ConcreteModel, ConcreteModelSubclass, Con...
bsd-3-clause
Alphadelta14/ansible
lib/ansible/plugins/lookup/__init__.py
79
1905
# (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
valentin-krasontovitsch/ansible
lib/ansible/modules/storage/glusterfs/gluster_volume.py
33
18545
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2014, Taneli Leppä <taneli@crasman.fi> # 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': ...
gpl-3.0
slevenhagen/odoo-npg
addons/hr_recruitment/__init__.py
433
1145
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
wkschwartz/django
django/conf/locale/ka/formats.py
35
1897
# This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'l, j F, Y' TIME_FORMAT = 'h:i a' DATETIME_FORMAT = 'j F, Y h:i a' YEAR_MONTH_FORMAT = 'F, Y' MONTH_...
bsd-3-clause
thomasleese/obj2uncrz
ez_setup.py
18
10476
#!/usr/bin/env python """Bootstrap setuptools installation To use setuptools in your package's setup.py, include this file in the same directory and add this to the top of your setup.py:: from ez_setup import use_setuptools use_setuptools() To require a specific version of setuptools, set a download mirror, ...
mit
ddeepak6992/IITM-placement-Spyder
main.py
1
1142
# -*- coding: utf-8 -*- """ Created on Mon Nov 16 00:27:31 2015 @author: deep """ ##################################### USERNAME = '' PASSWORD = '' ##################################### import json from scraper import scraper import os import time def diff(A,B): if len(A.keys()) > len(B.keys()): A...
gpl-2.0
agentxan/nzbToMedia
libs/unidecode/x1d4.py
248
3839
data = ( 'A', # 0x00 'B', # 0x01 'C', # 0x02 'D', # 0x03 'E', # 0x04 'F', # 0x05 'G', # 0x06 'H', # 0x07 'I', # 0x08 'J', # 0x09 'K', # 0x0a 'L', # 0x0b 'M', # 0x0c 'N', # 0x0d 'O', # 0x0e 'P', # 0x0f 'Q', # 0x10 'R', # 0x11 'S', # 0x12 'T', # 0x13 'U', # 0...
gpl-3.0
rwatson/chromium-capsicum
testing/gmock/scripts/generator/cpp/keywords.py
1157
2004
#!/usr/bin/env python # # Copyright 2007 Neal Norwitz # Portions 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...
bsd-3-clause
cstipkovic/spidermonkey-research
python/bitstring/test/test_bitarray.py
4
8915
#!/usr/bin/env python """ Unit tests for the bitarray module. """ import unittest import sys sys.path.insert(0, '..') import bitstring from bitstring import BitArray class All(unittest.TestCase): def testCreationFromUint(self): s = BitArray(uint=15, length=6) self.assertEqual(s.bin, '001111') ...
mpl-2.0
SCOAP3/invenio
invenio/ext/restful/pagination.py
17
4908
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014 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 your option) any later...
gpl-2.0
dracos/QGIS
python/plugins/processing/algs/translations.py
1
53414
# -*- coding: utf-8 -*- """ Don't edit this file manually. Update it from QGIS console: from processing.tools.translation import updateTranslations updateTranslations() """ from PyQt4.QtCore import QCoreApplication def translationShadow(): """QGISAlgorithmProvider""" QCoreApplication.translate("SumLines", ...
gpl-2.0
mx3L/archivczsk
build/twisted/logger/_format.py
12
8176
# -*- test-case-name: twisted.logger.test.test_format -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tools for formatting logging events. """ from datetime import datetime as DateTime from twisted.python.compat import unicode from twisted.python.failure import Failure from twisted.py...
gpl-2.0
klonage/nlt-gcs
packages/IronPython.StdLib.2.7.4/content/Lib/atexit.py
73
1770
""" atexit.py - allow programmer to define multiple exit functions to be executed upon normal program termination. One public function, register, is defined. """ __all__ = ["register"] import sys _exithandlers = [] def _run_exitfuncs(): """run any registered exit functions _exithandlers is t...
gpl-3.0
abhinavp13/IITBX-edx-platform-dev
common/lib/xmodule/xmodule/contentstore/content.py
3
6519
XASSET_LOCATION_TAG = 'c4x' XASSET_SRCREF_PREFIX = 'xasset:' XASSET_THUMBNAIL_TAIL_NAME = '.jpg' import os import logging import StringIO from xmodule.modulestore import Location from .django import contentstore # to install PIL on MacOSX: 'easy_install http://dist.repoze.org/PIL-1.1.6.tar.gz' from PIL import Image ...
agpl-3.0
IE-NITK/NITK-Student-Council-Website
src/smriti/views.py
1
8079
from django.shortcuts import render, get_object_or_404, redirect from django.views import generic from django.contrib import auth, messages from django.http import HttpResponseRedirect from django.contrib.auth.decorators import login_required from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from...
mit
hcarvalhoalves/hy
hy/importer.py
1
6134
# Copyright (c) 2013 Paul Tagliamonte <paultag@debian.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, modif...
mit
AlexCatarino/Lean
Algorithm.Python/UniverseSelectionRegressionAlgorithm.py
3
3297
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect 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 Licen...
apache-2.0
egabancho/invenio
invenio/modules/formatter/models.py
1
4792
# -*- coding: utf-8 -*- # ## This file is part of Invenio. ## Copyright (C) 2013 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 your option) an...
gpl-2.0
mastizada/kuma
vendor/packages/sqlalchemy/examples/sharding/attribute_shard.py
7
9046
# step 1. imports from sqlalchemy import (create_engine, MetaData, Table, Column, Integer, String, ForeignKey, Float, DateTime) from sqlalchemy.orm import sessionmaker, mapper, relationship from sqlalchemy.ext.horizontal_shard import ShardedSession from sqlalchemy.sql import operators, visitors import datetime #...
mpl-2.0
viruxel/ansible-modules-extras
cloud/cloudstack/cs_facts.py
77
7103
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # # 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 Lice...
gpl-3.0
ahmetdaglarbas/e-commerce
oscar/apps/dashboard/nav.py
36
3615
import re from django.core.urlresolvers import reverse, resolve, NoReverseMatch from django.core.exceptions import ImproperlyConfigured from django.http import Http404 from oscar.core.loading import get_class, AppNotFoundError from oscar.views.decorators import check_permissions class Node(object): """ A node...
bsd-3-clause
srznew/heat
heat/cloudinit/loguserdata.py
4
3677
#!/usr/bin/env python # # 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
dlage/spotifykodiweb
spotifykodiweb/settings/defaults.py
1
2986
""" Django settings for spotifykodiweb project. Generated by 'django-admin startproject' using Django 1.8.5. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Bui...
mit
wichert/pyramid_jwt
tests/test_policy.py
1
9249
# vim: fileencoding=utf-8 import warnings from datetime import timedelta from webob import Request from zope.interface.verify import verifyObject from pyramid.security import forget from pyramid.security import remember from pyramid.testing import testConfig from pyramid.testing import DummyRequest from pyramid.testin...
bsd-2-clause
paolap/cwsl-ctools
utils/xml_to_nc.py
3
7024
#!/bin/env python """ Authors: David Kent, Tim Erwin, Tim Bedin, Damien Irving Copyright 2014 CSIRO 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...
apache-2.0
njase/numpy
numpy/linalg/__init__.py
84
2343
""" Core Linear Algebra Tools ========================= =============== ========================================================== Linear algebra basics ========================================================================== norm Vector or matrix norm inv Inverse of a square matrix solve ...
bsd-3-clause
biicode/common
edition/process.py
3
12406
from biicode.common.edition.blockprocessor import BlockProcessor from biicode.common.utils.bii_logging import logger from biicode.common.edition import changevalidator from collections import defaultdict from biicode.common.model.symbolic.reference import References from biicode.common.exception import BiiException, No...
mit
lukovnikov/teafacto
teafacto/blocks/lang/wordembed.py
1
3771
from teafacto.blocks.seq.rnn import SeqEncoder, MaskMode from teafacto.blocks.seq.rnu import GRU from teafacto.blocks.basic import IdxToOneHot, Embedder, VectorEmbed from teafacto.blocks.lang.wordvec import Glove from teafacto.core.base import * from teafacto.core.base import tensorops as T class WordEmbed(Embedder):...
mit
MeirKriheli/Open-Knesset
mks/migrations/0034_auto__add_partyseats__add_field_party_split_from.py
14
15728
# -*- coding: utf-8 -*- from south.utils import datetime_utils as 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 'PartySeats' db.create_table(u'mks_partyseats', ( ...
bsd-3-clause
CiscoSystems/neutron
neutron/plugins/nuage/extensions/netpartition.py
16
3256
# Copyright 2014 Alcatel-Lucent USA 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
jimcunderwood/MissionPlanner
Lib/site-packages/numpy/core/tests/test_multiarray.py
53
75481
import tempfile import warnings import sys import os import numpy as np from numpy.testing import * from numpy.core import * from numpy.compat import asbytes, getexception, strchar if sys.platform != 'cli': # TODO: Not yet ported to IronPython from numpy.core.multiarray_tests import test_neighborhood_iterator...
gpl-3.0
mbayon/TFG-MachineLearning
vbig/lib/python2.7/site-packages/numpy/core/tests/test_scalarmath.py
9
25033
from __future__ import division, absolute_import, print_function import sys import warnings import itertools import operator import numpy as np from numpy.testing.utils import _gen_alignment_data from numpy.testing import ( TestCase, run_module_suite, assert_, assert_equal, assert_raises, assert_almost_equal,...
mit
h2oai/h2o-2
bench/BMscripts/bigkmeansBench.py
11
3785
#KMeans bench import os, sys, time, csv sys.path.append('../py/') sys.path.extend(['.','..']) import h2o_cmd, h2o, h2o_hosts, h2o_browse as h2b, h2o_import as h2i, h2o_rf, h2o_jobs csv_header = ('h2o_build','nMachines','nJVMs','Xmx/JVM','dataset','nRows','nCols','parseWallTime','k','max_iter','init','kmeansBuildTime')...
apache-2.0
kuke/models
legacy/conv_seq2seq/train.py
4
8613
#coding=utf-8 import os import sys import time import argparse import distutils.util import gzip import numpy as np import paddle.v2 as paddle from model import conv_seq2seq import reader def parse_args(): parser = argparse.ArgumentParser( description="PaddlePaddle Convolutional Seq2Seq") parser.add...
apache-2.0
CiscoUcs/Ironic-UCS
ironic/tests/db/sqlalchemy/test_types.py
3
3513
# 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 # d...
apache-2.0
x1101/nikola
nikola/plugins/compile/rest/listing.py
3
7268
# -*- coding: utf-8 -*- # Copyright © 2012-2016 Roberto Alsina and others. # 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 t...
mit
williamdev/RatticWeb
cred/tests/test_ssh_key.py
7
2827
from django.test import TestCase from django.core.files import File from django.core.urlresolvers import reverse from django.test.utils import override_settings from ratticweb.tests.helper import TestData from cred.models import Cred, Group import os here = os.path.abspath(os.path.dirname(__file__)) ssh_keys = os.pa...
gpl-2.0
kvaps/vdsm
vdsm/virt/sampling.py
1
27239
# # Copyright 2008-2015 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed ...
gpl-2.0
ghickman/django
tests/forms_tests/tests/test_widgets.py
112
10410
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib.admin.tests import AdminSeleniumWebDriverTestCase from django.core.urlresolvers import reverse from django.forms import ( CheckboxSelectMultiple, ClearableFileInput, RadioSelect, TextInput, ) from django.forms.widgets import ( ...
bsd-3-clause
technomalogical/suds
suds/xsd/sxbuiltin.py
193
7297
# 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 ...
lgpl-3.0
40223211/2015cd_midterm-
static/Brython3.1.1-20150328-091302/Lib/_csv.py
639
21705
"""CSV parsing and writing. [Copied from PyPy https://bitbucket-assetroot.s3.amazonaws.com/pypy/pypy/1400171824.19/641/_csv.py?Signature=cc%2Bc8m06cBMbsxt2e15XXXUDACk%3D&Expires=1404136251&AWSAccessKeyId=0EMWEFSGA12Z1HF1TZ82 and adapted to Python 3 syntax for Brython] This module provides classes that assist in the ...
gpl-3.0
mspark93/VTK
ThirdParty/AutobahnPython/autobahn/wamp/auth.py
12
4839
############################################################################### ## ## Copyright (C) 2014 Tavendo GmbH ## ## 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:/...
bsd-3-clause
huguesv/PTVS
Python/Product/Miniconda/Miniconda3-x64/Lib/unittest/test/test_loader.py
15
63055
import functools import sys import types import warnings import unittest # Decorator used in the deprecation tests to reset the warning registry for # test isolation and reproducibility. def warningregistry(func): def wrapper(*args, **kws): missing = [] saved = getattr(warnings, '__warningregistry...
apache-2.0