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
MER-GROUP/intellij-community
python/lib/Lib/site-packages/django/contrib/sessions/tests.py
71
13580
import base64 from datetime import datetime, timedelta import pickle import shutil import tempfile from django.conf import settings from django.contrib.sessions.backends.db import SessionStore as DatabaseSession from django.contrib.sessions.backends.cache import SessionStore as CacheSession from django.contrib.session...
apache-2.0
codervince/flashingredlight
env/lib/python2.7/site-packages/jinja2/_compat.py
638
4042
# -*- coding: utf-8 -*- """ jinja2._compat ~~~~~~~~~~~~~~ Some py2/py3 compatibility support based on a stripped down version of six so we don't have to depend on a specific version of it. :copyright: Copyright 2013 by the Jinja team, see AUTHORS. :license: BSD, see LICENSE for details. ""...
mit
OnePaaS/virtdc
virtdc_init/virtdc_init.py
2
1747
#!/usr/bin/env python import subprocess, sys #API - virtdc command line init tool #============================================================================== # Variables #============================================================================== # Some descriptive variables #name = "virtdc" #ve...
mit
xzturn/tensorflow
tensorflow/python/training/server_lib_test.py
11
22379
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
rickhurst/Django-non-rel-blog
django/template/defaulttags.py
151
47838
"""Default tags used by the template system, available to all templates.""" import sys import re from itertools import groupby, cycle as itertools_cycle from django.template.base import Node, NodeList, Template, Context, Variable from django.template.base import TemplateSyntaxError, VariableDoesNotExist, BLOCK_TAG_ST...
bsd-3-clause
apocquet/django
django/utils/baseconv.py
650
2982
# Copyright (c) 2010 Guilherme Gondim. All rights reserved. # Copyright (c) 2009 Simon Willison. All rights reserved. # Copyright (c) 2002 Drew Perttula. All rights reserved. # # License: # Python Software Foundation License version 2 # # See the file "LICENSE" for terms & conditions for usage, and a DISCLAIMER OF # ...
bsd-3-clause
eentzel/myeventbot
atom/core.py
13
20689
#!/usr/bin/env 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...
mit
awduda/awduda.github.io
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langcyrillicmodel.py
2762
17725
######################## 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...
mit
alirizakeles/zato
code/zato-web-admin/src/zato/admin/static/brython/_brython/Lib/site-packages/ui/widget.py
2
1852
import random from browser import document as doc, html def getMousePosition(e): if e is None: e=win.event if e.pageX or e.pageY: return {'x': e.pageX, 'y': e.pageY} if e.clientX or e.clientY: _posx=e.clientX + doc.body.scrollLeft + doc.documentElement.scrollLeft; ...
gpl-3.0
rcoup/traveldash
traveldash/gtfs/migrations/0007_auto__del_field_trip_inbound__del_field_trip_outbound__add_field_trip_.py
1
15202
# 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): # Deleting field 'Trip.inbound' db.delete_column('gtfs_trip', 'inbound') # Deleting field 'Trip.outbound...
bsd-3-clause
muatik/genderizer
genderizer/genderizer.py
2
3678
# -*- coding: utf-8 -*- from __future__ import division import math from naiveBayesClassifier import tokenizer from naiveBayesClassifier.trainer import Trainer from naiveBayesClassifier.classifier import Classifier from namesCollection import NamesCollection from cachedModel import CachedModel class Genderizer(obje...
mit
jscn/django
django/contrib/gis/utils/layermapping.py
137
27371
# LayerMapping -- A Django Model/OGR Layer Mapping Utility """ The LayerMapping class provides a way to map the contents of OGR vector files (e.g. SHP files) to Geographic-enabled Django models. For more information, please consult the GeoDjango documentation: https://docs.djangoproject.com/en/dev/ref/contrib/gi...
bsd-3-clause
hale36/SRTV
lib/requests/packages/chardet/euckrfreq.py
3121
45978
######################## 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
kevinlondon/sentry
tests/sentry/web/frontend/test_accept_organization_invite.py
26
3200
from __future__ import absolute_import from django.core.urlresolvers import reverse from sentry.models import ( AuditLogEntry, AuditLogEntryEvent, OrganizationMember, OrganizationMemberType ) from sentry.testutils import TestCase class AcceptInviteTest(TestCase): def setUp(self): super(AcceptInv...
bsd-3-clause
jshiv/turntable
test/lib/python2.7/site-packages/pip/_vendor/lockfile/pidlockfile.py
488
6221
# -*- coding: utf-8 -*- # pidlockfile.py # # Copyright © 2008–2009 Ben Finney <ben+python@benfinney.id.au> # # This is free software: you may copy, modify, and/or distribute this work # under the terms of the Python Software Foundation License, version 2 or # later as published by the Python Software Foundation. # No ...
mit
CiscoSystems/vespa
neutron/plugins/cisco/n1kv/n1kv_client.py
5
21231
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Cisco 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...
apache-2.0
achadwick/mypaint
gui/factoryaction.py
4
3718
# This file is part of MyPaint. # Copyright (C) 2013 by Andrew Chadwick <a.t.chadwick@gmail.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 version 2 of the License, or # (at your ...
gpl-2.0
levilucio/SyVOLT
UMLRT2Kiltera_MM/MT_post__Print.py
1
9133
""" __MT_post__Print.py_____________________________________________________ Automatically generated AToM3 syntactic object (DO NOT MODIFY DIRECTLY) Author: gehan Modified: Sun Feb 15 10:31:27 2015 ________________________________________________________________________ """ from ASGNode import * from ATOM3Type import...
mit
vbelakov/h2o
py/testdir_multi_jvm/test_elapsed_time.py
9
1664
import unittest, time, sys sys.path.extend(['.','..','../..','py']) import h2o_browse as h2b import h2o, h2o_util, h2o_log NODE_NUM = 3 class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_for_errors() @classmethod def setUpClass(cls): h2o.init(NODE_NUM) @classmethod...
apache-2.0
plotly/python-api
packages/python/plotly/plotly/graph_objs/scatter/marker/_colorbar.py
1
69628
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scatter.marker" _path_str = "scatter.marker.colorbar" _valid_props = { "bgcolor", ...
mit
caLew/sugartest
src/jarabe/journal/objectchooser.py
9
8642
# Copyright (C) 2007, One Laptop Per Child # # 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-2.0
incaser/odoo-odoo
addons/resource/faces/resource.py
433
25890
#@+leo-ver=4 #@+node:@file resource.py #@@language python #@<< Copyright >> #@+node:<< Copyright >> ############################################################################ # Copyright (C) 2005, 2006, 2007, 2008 by Reithinger GmbH # mreithinger@web.de # # This file is part of faces. # # faces is free softwa...
agpl-3.0
cloudbase/neutron-virtualbox
neutron/tests/unit/oneconvergence/test_security_group.py
12
4859
# Copyright 2014 OneConvergence, 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 requir...
apache-2.0
opsdroid/opsdroid
opsdroid/cli/logs.py
3
1061
"""The logs subcommand for opsdroid cli.""" import click import tailer from opsdroid.const import DEFAULT_LOG_FILENAME @click.group(invoke_without_command=True) @click.option("-f", "follow", is_flag=True, help="Print the logs in real time") @click.pass_context def logs(ctx, follow): """Print the content of the l...
apache-2.0
demarle/VTK
ThirdParty/AutobahnPython/autobahn/twisted/websocket.py
16
20656
############################################################################### ## ## Copyright (C) 2011-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 ## ## h...
bsd-3-clause
sivaprakashniet/push_pull
p2p/lib/python2.7/site-packages/kombu/tests/transport/test_amqplib.py
30
4704
from __future__ import absolute_import import sys from kombu import Connection from kombu.tests.case import Case, SkipTest, Mock, mask_modules class MockConnection(dict): def __setattr__(self, key, value): self[key] = value try: __import__('amqplib') except ImportError: amqplib = Channel = No...
bsd-3-clause
damonkohler/sl4a
python/src/Misc/Vim/syntax_test.py
82
1457
"""Test file for syntax highlighting of editors. Meant to cover a wide range of different types of statements and expressions. Not necessarily sensical or comprehensive (assume that if one exception is highlighted that all are, for instance). Extraneous trailing whitespace can't be tested because of svn pre-commit ho...
apache-2.0
turbokongen/home-assistant
homeassistant/components/influxdb/const.py
7
5208
"""Constants for InfluxDB integration.""" from datetime import timedelta import re import voluptuous as vol from homeassistant.const import ( CONF_API_VERSION, CONF_HOST, CONF_PASSWORD, CONF_PATH, CONF_PORT, CONF_SSL, CONF_TOKEN, CONF_USERNAME, CONF_VERIFY_SSL, ) import homeassista...
apache-2.0
antepsis/anteplahmacun
sympy/polys/tests/test_polyfuncs.py
42
3883
"""Tests for high-level polynomials manipulation functions. """ from sympy.polys.polyfuncs import ( symmetrize, horner, interpolate, rational_interpolate, viete, ) from sympy.polys.polyerrors import ( MultivariatePolynomialError, ) from sympy import symbols from sympy.utilities.pytest import raises from sym...
bsd-3-clause
DasIch/django
tests/admin_docs/models.py
244
1941
""" Models for testing various aspects of the djang.contrib.admindocs app """ from django.db import models class Company(models.Model): name = models.CharField(max_length=200) class Group(models.Model): name = models.CharField(max_length=200) class Family(models.Model): last_name = models.CharField(m...
bsd-3-clause
ericzundel/pants
src/python/pants/backend/python/tasks/python_task.py
3
8746
# coding=utf-8 # Copyright 2014 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 json import o...
apache-2.0
hip-odoo/odoo
addons/website/models/ir_actions.py
18
2743
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import urlparse from odoo import api, fields, models from odoo.http import request class ServerAction(models.Model): """ Add website option in server actions. """ _name = 'ir.actions.server' _inherit = 'i...
agpl-3.0
rtucker-mozilla/inventory
vendor-local/src/django-extensions/django_extensions/management/commands/validate_templates.py
16
2036
import os from optparse import make_option from django.core.management.base import BaseCommand from django.core.management.color import color_style from django.template import Template # # TODO: Render the template with fake request object ? # class Command(BaseCommand): args = '' help = "Validate templates o...
bsd-3-clause
nicosoftdroid/kernel_tegra3
tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
2058
# failed system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
gpl-2.0
FNST-OpenStack/horizon
openstack_dashboard/contrib/trove/content/databases/workflows/create_instance.py
12
16656
# Copyright 2013 Rackspace Hosting # # 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
sestrella/ansible
test/lib/ansible_test/_internal/sanity/sanity_docs.py
55
1790
"""Sanity test for documentation of sanity tests.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os from ..sanity import ( SanityVersionNeutral, SanityMessage, SanityFailure, SanitySuccess, sanity_get_tests, ) from ..config import ( SanityCon...
gpl-3.0
dominicmeroux/Reading-In-and-Analyzing-Calendar-Data-by-Interfacing-Between-MySQL-and-Python
Utilization-Report-MySQL.py
1
18653
from __future__ import print_function from icalendar import * from datetime import date, datetime, timedelta import mysql.connector from mysql.connector import errorcode import pickle import csv import pandas from pandas.io import sql import matplotlib.pyplot as plt import xlsxwriter import numpy as np import os import...
mit
encukou/freeipa
ipaclient/remote_plugins/2_114/pkinit.py
24
1198
# # Copyright (C) 2016 FreeIPA Contributors see COPYING for license # # pylint: disable=unused-import import six from . import Command, Method, Object from ipalib import api, parameters, output from ipalib.parameters import DefaultFrom from ipalib.plugable import Registry from ipalib.text import _ from ipapython.dn ...
gpl-3.0
levilucio/SyVOLT
UMLRT2Kiltera_MM/Properties/Syntactic/models/HInstProcDefParamspart1_Complete_MDL.py
1
36219
""" __HInstProcDefParamspart1_Complete_MDL.py_____________________________________________________ Automatically generated AToM3 Model File (Do not modify directly) Author: gehan Modified: Fri Mar 6 16:43:47 2015 ______________________________________________________________________________________________ """ from s...
mit
liucode/tempest-master
tempest/api/network/test_subnetpools_extensions.py
2
3105
# Copyright 2015 GlobalLogic. 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 agr...
apache-2.0
aburrell/ocbpy
ocbpy/ocb_time.py
1
10827
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2017, AGB & GC # Full license can be found in License.md # ---------------------------------------------------------------------------- """Routines to convert from different file timekeeping methods to datetime """ import datetime as dt import numpy as np ...
bsd-3-clause
JASONews/centinel
centinel/primitives/http_helper.py
2
3259
import pycurl import re from StringIO import StringIO class ICHTTPConnection: def __init__(self, host='127.0.0.1', port=None, timeout=10): self.headers = {} self.body = None self.reason = None self.status = 0 self.host = host self.port = port self.timeout =...
mit
mjirik/io3d
io3d/outputqt.py
1
3384
from loguru import logger from PyQt5.QtWidgets import ( QGridLayout, QLabel, QPushButton, QLineEdit, QCheckBox, QFileDialog, ) from PyQt5 import QtGui, QtWidgets import os.path as op class SelectOutputPathWidget(QtWidgets.QWidget): def __init__( self, path=None, wid...
mit
gviejo/ThalamusPhysio
python/main_pop_pca.py
1
15802
import numpy as np import pandas as pd # from matplotlib.pyplot import plot,show,draw import scipy.io from functions import * import _pickle as cPickle import time import os, sys import ipyparallel import neuroseries as nts data_directory = '/mnt/DataGuillaume/MergedData/' datasets = np.loadtxt(data_directory+'datas...
gpl-3.0
alexlo03/ansible
test/runner/lib/sanity/compile.py
49
3085
"""Sanity test for proper python syntax.""" from __future__ import absolute_import, print_function import os from lib.sanity import ( SanityMultipleVersion, SanityMessage, SanityFailure, SanitySuccess, SanitySkipped, ) from lib.util import ( SubprocessError, run_command, display, ...
gpl-3.0
cxx-hep/root-cern
interpreter/llvm/src/tools/clang/docs/tools/dump_ast_matchers.py
1
12937
#!/usr/bin/env python # A tool to parse ASTMatchers.h and update the documentation in # ../LibASTMatchersReference.html automatically. Run from the # directory in which this file is located to update the docs. import collections import re import urllib2 MATCHERS_FILE = '../../include/clang/ASTMatchers/ASTMatchers.h' ...
lgpl-2.1
ehartsuyker/securedrop
securedrop/manage.py
2
14536
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import datetime import logging import os import pwd import qrcode import subprocess import shutil import signal import sys import time import traceback from six.moves import input from contextlib import contextmanager from flask import current_app from sql...
agpl-3.0
mattgibb/visualisation
cxxtest/python/cxxtest/cxxtest_parser.py
1
7880
import re #import sys #import getopt #import glob import string from cxxtest_misc import * # Global variables suites = [] suite = None inBlock = 0 options=None def scanInputFiles(files, _options): '''Scan all input files for test suites''' global options options=_options for file in files: sca...
mit
Arzie/deluge
deluge/ui/gtkui/mainwindow.py
1
13546
# -*- coding: utf-8 -*- # # Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com> # # This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with # the additional special exception to link portions of this program with the OpenSSL library. # See LICENSE for more details. # i...
gpl-3.0
evinr/basis-scraper
poc.py
1
3931
import serial def setup(): ser = serial.Serial('/dev/ttyUSB0', timeout=2) ser.setRTS(True) ser.setRTS(False) if ser.isOpen(): ser.close() ser.open() ser.isOpen() print "USB connection established" def read(): rawString = ser.readline() print rawString return (str(rawString)) def write(string...
mit
boegel/easybuild-framework
test/framework/general.py
1
6823
## # Copyright 2015-2020 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
gpl-2.0
vaygr/ansible
lib/ansible/modules/network/aci/aci_bd_subnet.py
14
13342
#!/usr/bin/python # -*- coding: utf-8 -*- # 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
SellWellDesigns/orion
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/pygments/lexers/_lassobuiltins.py
293
130675
# -*- coding: utf-8 -*- """ pygments.lexers._lassobuiltins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Built-in Lasso types, traits, methods, and members. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ BUILTINS = { 'Types': [ 'null', ...
mit
rixrix/servo
tests/wpt/css-tests/tools/manifest/update.py
41
2762
#!/usr/bin/env python import argparse import imp import os import manifest import vcs from log import get_logger from tree import GitTree, NoVCSTree here = os.path.dirname(__file__) localpaths = imp.load_source("localpaths", os.path.abspath(os.path.join(here, os.pardir, "localpaths.py"))) def update(tests_root, url_...
mpl-2.0
palerdot/calibre
src/calibre/gui2/custom_column_widgets.py
1
38720
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai __license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' from functools import partial from PyQt4.Qt import (QComboBox, QLabel, QSpinBox, QDoubleSpinBox, QDateTimeEdit, QD...
gpl-3.0
prculley/gramps
gramps/gui/widgets/validatedmaskedentry.py
2
41727
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2007-2008 Zsolt Foldvari # Copyright (C) 2012 Benny Malengier # # 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 ...
gpl-2.0
gpapakyriakopoulos/PyFlask
pyflask/lib/python2.7/site-packages/werkzeug/contrib/iterio.py
318
10718
# -*- coding: utf-8 -*- r""" werkzeug.contrib.iterio ~~~~~~~~~~~~~~~~~~~~~~~ This module implements a :class:`IterIO` that converts an iterator into a stream object and the other way round. Converting streams into iterators requires the `greenlet`_ module. To convert an iterator into a stream...
gpl-3.0
jbzdak/edx-platform
lms/djangoapps/courseware/tests/test_i18n.py
109
7964
""" Tests i18n in courseware """ import re from nose.plugins.attrib import attr from django.conf import settings from django.contrib.auth.models import User from django.core.urlresolvers import reverse, NoReverseMatch from django.test import TestCase from django.test.client import Client from dark_lang.models import ...
agpl-3.0
twamarc/schemaorg
lib/rdflib/plugins/parsers/ntriples.py
15
8018
#!/usr/bin/env python __doc__ = """ N-Triples Parser License: GPL 2, W3C, BSD, or MIT Author: Sean B. Palmer, inamidst.com """ import re import codecs from rdflib.term import URIRef as URI from rdflib.term import BNode as bNode from rdflib.term import Literal from rdflib.py3compat import cast_bytes, decodeUnicodeEsc...
apache-2.0
icgc/icgc-get
icgcget/log_filters.py
1
1451
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 The Ontario Institute for Cancer Research. All rights reserved. # # This program and the accompanying materials are made available under the terms of the GNU Public License v3.0. # You should have received a copy of the GNU General Public License along wi...
gpl-3.0
hunter007/django
django/contrib/gis/geos/prepared.py
328
2445
from .base import GEOSBase from .error import GEOSException from .libgeos import geos_version_info from .prototypes import prepared as capi class PreparedGeometry(GEOSBase): """ A geometry that is prepared for performing certain operations. At the moment this includes the contains covers, and intersects ...
bsd-3-clause
pkoutsias/SickRage
lib/requests/packages/urllib3/_collections.py
67
10500
from collections import Mapping, MutableMapping try: from threading import RLock except ImportError: # Platform-specific: No threads available class RLock: def __enter__(self): pass def __exit__(self, exc_type, exc_value, traceback): pass try: # Python 2.7+ from ...
gpl-3.0
NoyaInRain/tornado
tornado/test/ioloop_test.py
4
25341
from concurrent.futures import ThreadPoolExecutor from concurrent import futures import contextlib import datetime import functools import socket import subprocess import sys import threading import time import types from unittest import mock import unittest from tornado.escape import native_str from tornado import ge...
apache-2.0
Robpol86/sphinxcontrib-disqus
sphinxcontrib/disqus.py
2
4866
"""Sphinx extension that embeds Disqus comments in documents. https://sphinxcontrib-disqus.readthedocs.org https://github.com/Robpol86/sphinxcontrib-disqus https://pypi.python.org/pypi/sphinxcontrib-disqus """ from __future__ import print_function import os import re from docutils import nodes from docutils.parsers...
mit
LUTAN/tensorflow
tensorflow/contrib/distributions/python/ops/bijectors/power_transform.py
85
1163
# 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
alanjw/GreenOpenERP-Win-X86
python/Lib/site-packages/gdata/tlslite/utils/Python_AES.py
359
2121
"""Pure-Python AES implementation.""" from cryptomath import * from AES import * from rijndael import rijndael def new(key, mode, IV): return Python_AES(key, mode, IV) class Python_AES(AES): def __init__(self, key, mode, IV): AES.__init__(self, key, mode, IV, "python") self.rijndael = rijnda...
agpl-3.0
rafael-chavez/WebDriverAgent
Inspector/node_modules/webpack-dev-server/node_modules/socket.io/node_modules/engine.io/node_modules/engine.io-parser/node_modules/utf8/tests/generate-test-data.py
1788
1435
#!/usr/bin/env python import re import json # https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae # http://stackoverflow.com/a/13436167/96656 def unisymbol(codePoint): if codePoint >= 0x0000 and codePoint <= 0xFFFF: return unichr(codePoint) elif codePoint >= 0x010000 and codePoint <= 0x10FFFF: ...
bsd-3-clause
rven/odoo
addons/mail/models/ir_model_fields.py
5
1193
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class IrModelField(models.Model): _inherit = 'ir.model.fields' tracking = fields.Integer( string="Enable Ordered Tracking", help="If set every modification done ...
agpl-3.0
RPGOne/Skynet
scikit-learn-c604ac39ad0e5b066d964df3e8f31ba7ebda1e0e/sklearn/utils/__init__.py
2
12026
""" The :mod:`sklearn.utils` module includes various utilities. """ from collections import Sequence import numpy as np from scipy.sparse import issparse import warnings from .murmurhash import murmurhash3_32 from .validation import (as_float_array, assert_all_finite, warn_if_not_float, ...
bsd-3-clause
jkandasa/integration_tests
cfme/tests/cli/test_evmserverd.py
1
1948
# -*- coding: utf-8 -*- """This module contains tests that exercise control of evmserverd service.""" import pytest from cfme.utils import version from cfme.utils.wait import wait_for_decorator @pytest.yield_fixture(scope="module") def start_evmserverd_after_module(appliance): appliance.start_evm_service() ap...
gpl-2.0
jrnz/hadoop
build/contrib/hod/testing/lib.py
182
3458
#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 use thi...
apache-2.0
basicthinker/THNVM
src/arch/x86/isa/insts/x87/compare_and_test/integer_compare.py
91
2159
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
bsd-3-clause
ovnicraft/geospatial
base_geoengine/geo_model.py
1
9109
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi # Copyright 2011-2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # ...
agpl-3.0
UniversalMasterEgg8679/ansible
lib/ansible/modules/packaging/os/dnf.py
4
16366
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2015 Cristian van Ee <cristian at cvee.org> # Copyright 2015 Igor Gnatenko <i.gnatenko.brain@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 pu...
gpl-3.0
log2timeline/l2tdevtools
l2tdevtools/dependency_writers/interface.py
2
4958
# -*- coding: utf-8 -*- """Helper for writing files that contain dependency information.""" import abc import io import string class DependencyFileWriter(object): """Base class for dependency file writers.""" def __init__( self, l2tdevtools_path, project_definition, dependency_helper): """Initializes ...
apache-2.0
svn2github/django
django/contrib/admin/templatetags/admin_list.py
79
15696
import datetime from django.contrib.admin.util import lookup_field, display_for_field, label_for_field from django.contrib.admin.views.main import (ALL_VAR, EMPTY_CHANGELIST_VALUE, ORDER_VAR, PAGE_VAR, SEARCH_VAR) from django.contrib.admin.templatetags.admin_static import static from django.core.exceptions import ...
bsd-3-clause
leansoft/edx-platform
lms/djangoapps/mobile_api/test_milestones.py
80
5550
""" Milestone related tests for the mobile_api """ from mock import patch from courseware.access_response import MilestoneError from courseware.tests.helpers import get_request_for_user from courseware.tests.test_entrance_exam import answer_entrance_exam_problem, add_entrance_exam_milestone from util.milestones_helper...
agpl-3.0
windskyer/nova
nova/tests/functional/api_sample_tests/test_consoles.py
17
2248
# Copyright 2012 Nebula, Inc. # Copyright 2013 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...
gpl-2.0
CodeMonkeyJan/hyperspy
hyperspy/tests/model/test_component.py
1
8311
import numpy as np from hyperspy.component import Component from hyperspy.axes import AxesManager from unittest import mock class TestMultidimensionalActive: def setup_method(self, method): self.c = Component(["parameter"]) self.c._axes_manager = AxesManager([{"size": 3, ...
gpl-3.0
quanvm009/codev7
openerp/addons_quan/lifestyle/model/purchase.py
1
4374
# -*- coding: utf-8 -*- # ##################################################################### # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP s.a. (<http://openerp.com>). # Copyright (C) 2013 INIT Tech Co., Ltd (http://init.vn). # This program is free software: you can redistribute it and/or...
agpl-3.0
sinbazhou/odoo
addons/account_bank_statement_extensions/__init__.py
442
1153
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it u...
agpl-3.0
DesolationStaging/kernel_motorola_msm8226
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
1935
# Util.py - Python extension for perf script, miscellaneous utility code # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. import errno, os FUTEX_WAIT = 0...
gpl-2.0
znoland3/zachdemo
venvdir/lib/python3.4/site-packages/sqlalchemy/testing/suite/test_dialect.py
143
1165
from .. import fixtures, config from ..config import requirements from sqlalchemy import exc from sqlalchemy import Integer, String from .. import assert_raises from ..schema import Table, Column class ExceptionTest(fixtures.TablesTest): """Test basic exception wrapping. DBAPIs vary a lot in exception behavi...
mit
tttor/csipb-jamu-prj
predictor/connectivity/classifier/selfblm/generateNegativeData.py
1
3174
import csv import sys import json import time import numpy as np sys.path.append('../../utility') import yamanishi_data_util as yam sys.path.append('../cluster/kmedoid') import kmedoid as kmed def main(): if len(sys.argv)!=6: print ("python blmniisvm_experiment.py [e|ic|gpcr|nr] [clustMethod] " ...
mit
pratikmallya/hue
desktop/core/ext-py/Django-1.6.10/django/db/models/base.py
92
45515
from __future__ import unicode_literals import copy import sys from functools import update_wrapper from django.utils.six.moves import zip import django.db.models.manager # Imported to register signal handler. from django.conf import settings from django.core.exceptions import (ObjectDoesNotExist, MultipleObject...
apache-2.0
KuroeKurose/gem5
src/arch/x86/isa/insts/general_purpose/control_transfer/call.py
13
3375
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
bsd-3-clause
leandrotoledo/python-telegram-bot
tests/test_inlinequeryresultvideo.py
2
6959
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2021 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
lgpl-3.0
cangencer/hazelcast-python-client
hazelcast/protocol/codec/condition_before_await_codec.py
2
1152
from hazelcast.serialization.bits import * from hazelcast.protocol.client_message import ClientMessage from hazelcast.protocol.custom_codec import * from hazelcast.util import ImmutableLazyDataList from hazelcast.protocol.codec.condition_message_type import * REQUEST_TYPE = CONDITION_BEFOREAWAIT RESPONSE_TYPE = 100 RE...
apache-2.0
manuel-zulian/accumunet
contrib/usernameCrawler.py
14
3318
#!/usr/bin/python # # This sample script is a username crawler: it will obtain all known usernames # from block chain and then try to download avatar and profiles for all of # them. The report is shown as an html file. # # Downloaded data is cached in a python pickle file, so it may be executed # again and it won't nee...
mit
xxshutong/openerp-7.0
openerp/tests/addons/test_impex/tests/test_load.py
49
44786
# -*- coding: utf-8 -*- import json import pkgutil import unittest2 import openerp.modules.registry import openerp from openerp.tests import common from openerp.tools.misc import mute_logger def message(msg, type='error', from_=0, to_=0, record=0, field='value', **kwargs): return dict(kwargs, typ...
agpl-3.0
ajohnson23/depot_tools
testing_support/coverage_utils.py
25
2322
# 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. import distutils.version import os import sys import textwrap import unittest ROOT_PATH = os.path.abspath(os.path.join( os.path.dirname(os.path.dirname(...
bsd-3-clause
eladelad/CyberGood4U
expression.py
3
11623
#!/usr/bin/env python2.5 # # Copyright 2010 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 l...
apache-2.0
rhymeswithcycle/openparliament
parliament/imports/hans_old/old.py
4
18279
"""This module parses the Hansards of the House from HTML There are two parsers, for two different HTML formats (1994-2006, 2006-). However, XML is now available for the 2006-present documents, and the (better) parser for that is in parl_document.py and the alpheus module. In other words, this module is historical a...
agpl-3.0
brigittebigi/proceed
proceed/src/TagPDF/name.py
1
3002
#! /usr/bin/env python # -*- coding: UTF-8 -*- # --------------------------------------------------------------------------- # ___ __ ___ ___ ____ ____ __ # | \ | \ | | / | | | \ Automatic # |__/ |__/ | | | |__ |__ | | Conference # | ...
gpl-3.0
SmoothKat/external_skia
bench/bench_compare.py
209
5880
#!/usr/bin/env python ''' Created on May 16, 2011 @author: bungeman ''' import sys import getopt import bench_util def usage(): """Prints simple usage information.""" print '-o <file> the old bench output file.' print '-n <file> the new bench output file.' print '-h causes headers to be output.' ...
bsd-3-clause
ampax/edx-platform-backup
lms/djangoapps/courseware/migrations/0008_add_xmodule_storage.py
114
13726
# -*- coding: 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 'XModuleStudentInfoField' db.create_table('courseware_xmodulestudentinfofield', ( ...
agpl-3.0
quinot/ansible
test/units/modules/network/nxos/test_nxos_bgp_af.py
18
4175
# (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
xtao/code
vilya/views/issues/tags.py
3
1530
# -*- coding: utf-8 -*- from __future__ import absolute_import from quixote.errors import TraversalError from vilya.models.tag import TagName class TagsUI(object): _q_exports = [] def __init__(self, target): self.target = target def __call__(self, request): return self._q_index(request)...
bsd-3-clause
atom/crashpad
util/mach/mig.py
1
4962
#!/usr/bin/env python # coding: utf-8 # Copyright 2014 The Crashpad 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/LICEN...
apache-2.0
torchbox/django-storages
storages/backends/sftpstorage.py
11
9658
from __future__ import print_function # SFTP storage backend for Django. # Author: Brent Tubbs <brent.tubbs@gmail.com> # License: MIT # # Modeled on the FTP storage by Rafal Jonca <jonca.rafal@gmail.com> # # Settings: # # SFTP_STORAGE_HOST - The hostname where you want the files to be saved. # # SFTP_STORAGE_ROOT - The...
bsd-3-clause