repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
nishad89/newfies-dialer
newfies/dialer_contact/forms.py
1
7725
# # Newfies-Dialer License # http://www.newfies-dialer.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2014 Star2Billing S.L. # # The Initia...
mpl-2.0
jaredly/pyjamas
examples/mail/AboutDialog.py
7
2302
from pyjamas.ui.Button import Button from pyjamas.ui.DialogBox import DialogBox from pyjamas.ui.DockPanel import DockPanel from pyjamas.ui.HorizontalPanel import HorizontalPanel from pyjamas.ui.HTML import HTML from pyjamas.ui.Image import Image from pyjamas.ui import KeyboardListener from pyjamas.ui.Widget import Widg...
apache-2.0
suto/infernal-twin
build/pip/pip/_vendor/requests/packages/urllib3/connection.py
483
9011
import datetime import sys import socket from socket import timeout as SocketTimeout import warnings from .packages import six try: # Python 3 from http.client import HTTPConnection as _HTTPConnection, HTTPException except ImportError: from httplib import HTTPConnection as _HTTPConnection, HTTPException cla...
gpl-3.0
Zeromixis/ZexGameEngine
External/freetype/src/tools/docmaker/formatter.py
109
6000
# # formatter.py # # Convert parsed content blocks to a structured document (library file). # # Copyright 2002-2015 by # David Turner. # # This file is part of the FreeType project, and may only be used, # modified, and distributed under the terms of the FreeType project # license, LICENSE.TXT. By continuing ...
gpl-2.0
samuelmaudo/yepes
yepes/test/runner.py
1
1557
# -*- coding:utf-8 -*- from __future__ import unicode_literals import sys from unittest.runner import _WritelnDecorator as WriteLnDecorator from unittest.signals import registerResult from yepes.test.result import TestResult class TestRunner(object): """ A test result class that can print formatted text r...
bsd-3-clause
longnow/plexmark
plexmark.py
1
8758
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import pickle, os, time, asyncio, concurrent, functools, bisect, random, shutil from glob import glob from itertools import accumulate from collections import defaultdict import unicodedataplus as unicodedata import regex as re import config import cachetools import aiopg...
mit
ohsu-computational-biology/server
tests/unit/test_variant_annotations.py
2
3956
""" Unit tests for variant objects. This is used for all tests that can be performed in isolation from input data. """ from __future__ import division from __future__ import print_function from __future__ import unicode_literals import hashlib import unittest import ga4gh.protocol as protocol import ga4gh.datarepo as...
apache-2.0
dragondjf/QMarkdowner
qframer/ffloatwidget.py
1
6545
#!/usr/bin/python # -*- coding: utf-8 -*- from .qt.QtCore import * from .qt.QtGui import * from .fmoveablewidget import FMoveableWidget from .ftitlebar import BaseToolButton, baseHeight class FTitleBar(QFrame): settingMenuShowed = Signal() skinMenuShowed = Signal() modeed = Signal(bool) locked = Sig...
mit
QQuick/Transcrypt
transcrypt/development/manual_tests/module_logging/ajaxlogclient.py
1
1843
# File: ajaxlogclient.py # Author: Carl Allendorph # Date: 29NOV2016 # # Description: # This file contains the implementation of a logging client # to test the ajax logging handler import logging import logging.handlers as loghdlr class HTMLHandler(logging.Handler): """ This handler is used to pr...
apache-2.0
jayflo/scikit-learn
examples/linear_model/plot_sgd_weighted_samples.py
344
1458
""" ===================== SGD: Weighted samples ===================== Plot decision function of a weighted dataset, where the size of points is proportional to its weight. """ print(__doc__) import numpy as np import matplotlib.pyplot as plt from sklearn import linear_model # we create 20 points np.random.seed(0) X ...
bsd-3-clause
birdsarah/bokeh
examples/app/stock_applet/stock_data.py
49
2405
import os from six.moves import urllib import zipfile from bokeh.util.string import encode_utf8 def extract_hosted_zip(data_url, save_dir, exclude_term=None): """Downloads, then extracts a zip file.""" zip_name = os.path.join(save_dir, 'temp.zip') # get the zip file try: print('Downloading %...
bsd-3-clause
simbha/mAngE-Gin
lib/Django 1.7/django/db/migrations/optimizer.py
33
13947
from __future__ import unicode_literals from django.db import migrations from django.utils import six class MigrationOptimizer(object): """ Powers the optimization process, where you provide a list of Operations and you are returned a list of equal or shorter length - operations are merged into one i...
mit
promptworks/keystone
keystone/common/sql/migrate_repo/versions/050_fk_consistent_indexes.py
11
2112
# Copyright 2014 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 by applicable law ...
apache-2.0
MonamAgarwal/final
GTG/gtk/backends_dialog/parameters_ui/textui.py
4
3037
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Getting Things GNOME! - a personal organizer for the GNOME desktop # Copyright (c) 2008-2013 - Lionel Dricot & Bertrand Rousseau # # This program is free software: you can redistribute it and/or modify it under # t...
gpl-3.0
Azure/azure-sdk-for-python
sdk/search/azure-search-documents/azure/search/documents/indexes/_search_index_client.py
1
19262
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- from typin...
mit
tectronics/browserscope
test/test_result.py
9
5867
#!/usr/bin/python2.5 # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the 'License') # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
j00bar/ansible
lib/ansible/modules/network/panos/panos_admpwd.py
78
5971
#!/usr/bin/python # -*- coding: utf-8 -*- # # Ansible module to manage PaloAltoNetworks Firewall # (c) 2016, techbizdev <techbizdev@paloaltonetworks.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publish...
gpl-3.0
malderete/django-jsonvalidator
jsonvalidator/tests.py
1
5657
import json from django.http import HttpResponse from django.test import RequestFactory, TestCase from .decorators import json_validator JSON_SCHEMA = { "type" : "object", "required": [ 'status', 'card_type', 'request_type', 'products', 'payment_type', 'total_value', 'distributor_id', 'addre...
mit
rezoo/chainer
chainermn/communicators/hierarchical_communicator.py
3
2965
import chainer.cuda import math from chainermn.communicators import _communication_utility from chainermn.communicators import _memory_utility from chainermn.communicators import mpi_communicator_base from chainermn import nccl class HierarchicalCommunicator(mpi_communicator_base.MpiCommunicatorBase): def __ini...
mit
jagg81/translate-toolkit
build/lib.linux-x86_64-2.6/translate/lang/te.py
4
1091
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2008 Zuza Software Foundation # # This file is part of translate. # # translate 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 t...
gpl-2.0
opnsense/core
src/opnsense/scripts/netflow/lib/aggregate.py
1
4679
""" Copyright (c) 2016-2018 Ad Schellevis <ad@opnsense.org> 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 of source code must retain the above copyright notice, ...
bsd-2-clause
letouriste001/SmartForest_2.0
python3.4Smartforest/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/contrib/appengine.py
154
7938
from __future__ import absolute_import import logging import os import warnings from ..exceptions import ( HTTPError, HTTPWarning, MaxRetryError, ProtocolError, TimeoutError, SSLError ) from ..packages.six import BytesIO from ..request import RequestMethods from ..response import HTTPResponse ...
mit
s-hertel/ansible
test/lib/ansible_test/_internal/coverage/analyze/targets/combine.py
31
2393
"""Combine integration test target code coverage reports.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type from .... import types as t from . import ( CoverageAnalyzeTargetsConfig, get_target_index, make_report, read_report, write_report, ) if t.TYPE_CHEC...
gpl-3.0
kntem/webdeposit
modules/webjournal/lib/elements/bfe_webjournal_main_navigation.py
25
3935
# -*- coding: utf-8 -*- ## $Id: bfe_webjournal_CERNBulletinMainNavigation.py,v 1.10 2008/06/03 09:52:11 jerome Exp $ ## ## This file is part of Invenio. ## Copyright (C) 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 a...
gpl-2.0
dav1x/ansible
lib/ansible/modules/windows/win_nssm.py
26
5852
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Heyo # # 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) a...
gpl-3.0
nikolas/edx-platform
lms/djangoapps/django_comment_client/utils.py
43
28663
from collections import defaultdict from datetime import datetime import json import logging import pytz from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.db import connection from django.http import HttpResponse from django.utils.timezone import UTC import pystache_c...
agpl-3.0
cchurch/ansible
lib/ansible/modules/monitoring/circonus_annotation.py
47
7258
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2014-2015, Epic Games, Inc. # 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
ibinti/intellij-community
python/helpers/profiler/thriftpy/transport/buffered/__init__.py
25
1561
# -*- coding: utf-8 -*- from __future__ import absolute_import from io import BytesIO from thriftpy._compat import CYTHON from .. import TTransportBase class TBufferedTransport(TTransportBase): """Class that wraps another transport and buffers its I/O. The implementation uses a (configurable) fixed-size r...
apache-2.0
trondhindenes/ansible-modules-extras
monitoring/monit.py
53
6888
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Darryl Stoflet <stoflet@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 Li...
gpl-3.0
mancoast/CPythonPyc_test
cpython/212_test_unicodedata.py
15
3864
""" Test script for the unicodedata module. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" from test_support import verify, verbose import sha encoding = 'utf-8' def test_methods(): h = sha.sha() for i in range(65536): char = un...
gpl-3.0
mikelikespie/bazel
third_party/protobuf/3.0.0/python/google/protobuf/internal/_parameterized.py
88
15458
#! /usr/bin/env python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ...
apache-2.0
BlackPole/bp-dvbapp
Navigation.py
3
4881
from enigma import eServiceCenter, eServiceReference, eTimer, pNavigation, getBestPlayableServiceReference, iPlayableService from Components.ParentalControl import parentalControl from Tools.BoundFunction import boundFunction from Tools.DreamboxHardware import setFPWakeuptime, getFPWakeuptime, getFPWasTimerWakeup from ...
gpl-2.0
WarrenWeckesser/scikits-image
skimage/graph/tests/test_connect.py
40
2632
import skimage.graph.mcp as mcp # import stentseg.graph._mcp as mcp from numpy.testing import (assert_array_equal, assert_almost_equal, ) import numpy as np a = np.ones((8, 8), dtype=np.float32) count = 0 class MCP(mcp.MCP_Connect): ...
bsd-3-clause
analurandis/Tur
backend/venv/Lib/site-packages/sphinx/util/console.py
11
2430
# -*- coding: utf-8 -*- """ sphinx.util.console ~~~~~~~~~~~~~~~~~~~ Format colored console output. :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os import sys import re _ansi_re = re.compile('\x1b\\[(\\d\\d;){0,2}\\d\\dm') cod...
mit
scottmcmaster/catapult
tracing/third_party/tvcm/third_party/rjsmin/bench/main.py
12
7298
#!/usr/bin/env python # -*- coding: ascii -*- r""" ================================= Benchmark jsmin implementations ================================= Benchmark jsmin implementations. :Copyright: Copyright 2011 - 2014 Andr\xe9 Malo or his licensors, as applicable :License: Licensed under the Apache License, Ve...
bsd-3-clause
corywalker/selenium-crawler
seleniumcrawler/tests/test_all.py
2
1261
# Global modules import unittest # Local modules from seleniumcrawler.handle import handle_url class TestHandlers(unittest.TestCase): def test_forbes(self): r = handle_url('http://www.forbes.com/sites/abrambrown/2013/04/22/netflixs-profit-picture-clears-q1s-big-beat-surprises-wall-street/') self.a...
mit
adobecs5/urp2015
lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/eucjpprober.py
2919
3678
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
apache-2.0
mkolar/pyblish-ftrack
setup.py
2
1121
"""This setup script packages pyblish_ftrack""" import os import imp from setuptools import setup, find_packages version_file = os.path.abspath("pyblish_ftrack/version.py") version_mod = imp.load_source("version", version_file) version = version_mod.version classifiers = [ "Development Status :: 5 - Productio...
lgpl-3.0
schmidtc/pysal
pysal/esda/tests/test_gamma.py
14
2474
import unittest import numpy as np import pysal from pysal.esda.gamma import Gamma class Gamma_Tester(unittest.TestCase): """Unit test for Gamma Index""" def setUp(self): self.w = pysal.lat2W(4, 4) self.y = np.ones(16) self.y[0:8] = 0 def test_Gamma(self): """Test method""...
bsd-3-clause
hurricup/intellij-community
python/lib/Lib/site-packages/django/contrib/comments/signals.py
425
1079
""" Signals relating to comments. """ from django.dispatch import Signal # Sent just before a comment will be posted (after it's been approved and # moderated; this can be used to modify the comment (in place) with posting # details or other such actions. If any receiver returns False the comment will be # discarded a...
apache-2.0
erickt/pygments
pygments/scanner.py
5
3114
# -*- coding: utf-8 -*- """ pygments.scanner ~~~~~~~~~~~~~~~~ This library implements a regex based scanner. Some languages like Pascal are easy to parse but have some keywords that depend on the context. Because of this it's impossible to lex that just by using a regular expression lexer like ...
bsd-2-clause
wanderine/nipype
nipype/interfaces/fsl/tests/test_auto_AvScale.py
9
1188
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from nipype.testing import assert_equal from nipype.interfaces.fsl.utils import AvScale def test_AvScale_inputs(): input_map = dict(args=dict(argstr='%s', ), environ=dict(nohash=True, usedefault=True, ), ignore_exception=dict(nohash=True, ...
bsd-3-clause
pierce403/EmpirePanel
lib/modules/situational_awareness/network/powerview/get_domain_controller.py
1
3326
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Get-NetDomainController', 'Author': ['@harmj0y'], 'Description': ('Returns the domain controllers for the current domain or ' 'the...
bsd-3-clause
ffu/DSA-3.2.2
gr-radio-astronomy/src/python/local_calibrator.py
11
5595
#!/usr/bin/env python # # Copyright 2003,2004,2005 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 you...
gpl-3.0
FedoraScientific/salome-med
src/MEDOP/tut/medcoupling/testmed_gendata.py
1
13570
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- # Copyright (C) 2011-2014 CEA/DEN, EDF R&D # # 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.1 of the License, or (...
lgpl-2.1
guilhermebr/python-docx
features/steps/cell.py
6
1060
# encoding: utf-8 """ Step implementations for table cell-related features """ from __future__ import absolute_import, print_function, unicode_literals from behave import given, then, when from docx import Document # given =================================================== @given('a table cell') def given_a_tab...
mit
LEXmono/q
bot/commands/pugbomb.py
1
1868
from bot.command_map import command_map import logging import os import random import requests giphy_key = os.environ['GIPHY_API_KEY'] giphy_url = 'https://api.giphy.com/v1/gifs/search' logger = logging.getLogger() # Custom Giphy call to get multiple photos. @command_map.register_command() def pugbomb(*args, **kwarg...
apache-2.0
n-west/gnuradio
gr-analog/python/analog/qa_dpll.py
47
2019
#!/usr/bin/env python # # Copyright 2012,2013 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 optio...
gpl-3.0
adazey/Muzez
libs/youtube_dl/extractor/myspass.py
61
2728
from __future__ import unicode_literals import os.path from .common import InfoExtractor from ..compat import ( compat_urllib_parse_urlparse, ) from ..utils import ( ExtractorError, ) class MySpassIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?myspass\.de/.*' _TEST = { 'url': 'http://ww...
gpl-3.0
mollstam/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/cffi-1.1.2/cffi/recompiler.py
5
50042
import os, sys, io from . import ffiplatform, model from .cffi_opcode import * VERSION = "0x2601" try: int_type = (int, long) except NameError: # Python 3 int_type = int class GlobalExpr: def __init__(self, name, address, type_op, size=0, check_value=0): self.name = name self.address ...
mit
alexdglover/shill-isms
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/compat.py
2943
1157
######################## BEGIN LICENSE BLOCK ######################## # Contributor(s): # Ian Cordasco - port to Python # # 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 # versio...
mit
technologiescollege/Blockly-rduino-communication
scripts_XP/Lib/site-packages/pygments/lexers/nix.py
31
4031
# -*- coding: utf-8 -*- """ pygments.lexers.nix ~~~~~~~~~~~~~~~~~~~ Lexers for the NixOS Nix language. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include from pygments.token impor...
gpl-3.0
elsigh/browserscope
third_party/appengine_tools/devappserver2/admin/datastore_indexes_viewer.py
17
1605
#!/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
trnewman/VT-USRP-daughterboard-drivers_python
usrp/host/lib/legacy/check_data.py
12
1448
#!/usr/bin/env python # # Copyright 2003 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
dagwieers/ansible
lib/ansible/modules/remote_management/lxca/lxca_cmms.py
22
4442
#!/usr/bin/python # 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', 'supported_by': 'community', 'status': ['preview'] } ...
gpl-3.0
jonathonwalz/ansible
lib/ansible/modules/system/at.py
69
6626
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2014, Richard Isaacson <richard.c.isaacson@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 versi...
gpl-3.0
kustodian/ansible
test/units/modules/network/iosxr/test_iosxr_netconf.py
68
3448
# (c) 2017 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
GbalsaC/bitnamiP
opaque-keys/docs/conf.py
1
10247
# -*- coding: utf-8 -*- # # opaque_keys documentation build configuration file, created by # sphinx-quickstart on Mon Sep 29 22:54:25 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. #...
agpl-3.0
mancoast/CPythonPyc_test
fail/331_test_startfile.py
2
1100
# Ridiculously simple test of the os.startfile function for Windows. # # empty.vbs is an empty file (except for a comment), which does # nothing when run with cscript or wscript. # # A possible improvement would be to have empty.vbs do something that # we can detect here, to make sure that not only the os.startfile() #...
gpl-3.0
shlomif/PySolFC
pysollib/pysolgtk/tkconst.py
2
1547
#!/usr/bin/env python # -*- mode: python; coding: utf-8; -*- # ---------------------------------------------------------------------------## # # Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer # Copyright (C) 2003 Mt. Hood Playing Card Co. # Copyright (C) 2005-2009 Skomoroh # # This program is free softwa...
gpl-3.0
emanuelmetal/TFGCruzada
CruzadaSite/CruzadaSite/settings.py
1
2531
""" Django settings for CruzadaSite project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ......
gpl-2.0
h2oai/h2o-3
h2o-py/h2o/automl/_h2o_automl_output.py
2
1913
import h2o from h2o.automl._base import H2OAutoMLBaseMixin from h2o.base import Keyed class H2OAutoMLOutput(H2OAutoMLBaseMixin, Keyed): """ AutoML Output object containing the results of AutoML """ def __init__(self, state): self._project_name = state['project_name'] self._key = state...
apache-2.0
benjaminrigaud/django
django/views/defaults.py
46
2760
from django import http from django.template import (Context, RequestContext, loader, Template, TemplateDoesNotExist) from django.views.decorators.csrf import requires_csrf_token # This can be called when CsrfViewMiddleware.process_view has not run, # therefore need @requires_csrf_token i...
bsd-3-clause
jokem59/heroprotocol
protocol46446.py
25
26840
# Copyright (c) 2015 Blizzard Entertainment # # 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, modify, merge, publi...
mit
franciscofranco/Tuna_JB_pre1
tools/perf/scripts/python/netdev-times.py
11271
15048
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
gpl-2.0
USGSDenverPychron/pychron
pychron/extraction_line/tasks/extraction_line_pane.py
1
2734
# =============================================================================== # Copyright 2013 Jake Ross # # 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/licens...
apache-2.0
tlein/Ancona
Test/ExtLibs/gtest-1.7.0/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
windedge/odoo
openerp/addons/test_access_rights/tests/test_ir_rules.py
299
1220
import openerp.exceptions from openerp.tests.common import TransactionCase class TestRules(TransactionCase): def setUp(self): super(TestRules, self).setUp() self.id1 = self.env['test_access_right.some_obj']\ .create({'val': 1}).id self.id2 = self.env['test_access_right.some_obj...
agpl-3.0
mozilla/kitsune
wsgi/app.py
1
1084
""" WSGI config for kitsune project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ # newrelic import & initialization must come first # https://docs.newrelic.com/docs/agents/python-...
bsd-3-clause
fhaoquan/kbengine
kbe/res/scripts/common/Lib/test/test_wave.py
92
4023
from test.support import TESTFN import unittest from test import audiotests from audioop import byteswap import sys import wave class WaveTest(audiotests.AudioWriteTests, audiotests.AudioTestsWithSourceFile): module = wave class WavePCM8Test(WaveTest, unittest.TestCase): sndfilename = 'pluck-...
lgpl-3.0
Leibniz137/testinfra
testinfra/test/test_modules.py
1
12968
# coding: utf-8 # 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 # dist...
apache-2.0
nuggetbram/gammacoin
contrib/testgen/base58.py
2139
2818
''' Bitcoin base58 encoding and decoding. Based on https://bitcointalk.org/index.php?topic=1026.0 (public domain) ''' import hashlib # for compatibility with following code... class SHA256: new = hashlib.sha256 if str != bytes: # Python 3.x def ord(c): return c def chr(n): return byte...
mit
ryanbressler/ClassWar
sklrf.py
6
1280
import sys from sklearn.datasets import load_svmlight_file from sklearn.ensemble import RandomForestClassifier from time import time import numpy as np def dumptree(atree, fn): from sklearn import tree f = open(fn,"w") tree.export_graphviz(atree,out_file=f) f.close() # def main(): fn = sys.argv[1] X,Y = load_...
bsd-3-clause
nickpack/django-oscar
tests/unit/offer/condition_tests.py
35
1861
from django.test import TestCase from django.utils import six from oscar.apps.offer import custom, models from oscar.apps.basket.models import Basket from oscar.test import factories class TestConditionProxyModels(TestCase): def test_name_and_description(self): """ Tests that the condition proxy...
bsd-3-clause
janusnic/django-allauth
docs/conf.py
4
7798
# -*- coding: utf-8 -*- # # django-allauth documentation build configuration file, created by # sphinx-quickstart on Wed Jun 6 22:58:42 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. ...
mit
Snifer/BurpSuite-Plugins
burp-protobuf-decoder/Lib/google/protobuf/descriptor.py
228
26625
# 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: # # * Redistributions o...
gpl-2.0
marratj/ansible
lib/ansible/modules/network/cloudengine/ce_netstream_template.py
27
15967
#!/usr/bin/python # # 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 distribut...
gpl-3.0
ChawalitK/odoo
openerp/loglevels.py
50
3579
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import sys LOG_NOTSET = 'notset' LOG_DEBUG = 'debug' LOG_INFO = 'info' LOG_WARNING = 'warn' LOG_ERROR = 'error' LOG_CRITICAL = 'critical' # TODO get_encodings, ustr and exception_to_unicode were originally from tools.m...
gpl-3.0
IhToN/DAW1-PRG
Ejercicios/PrimTrim/Ejercicio37.py
1
3643
""" Crear utilidades matemáticas: a. Escribir una función a la que se le pasa un número y devuelve una tupla con sus divisores. b. Se define un número primo como aquel que no tiene más divisores que él mismo y la unidad. Escribir una función que nos devuelva un True en caso de que ser un número prim...
apache-2.0
bzero/statsmodels
statsmodels/sandbox/nonparametric/dgp_examples.py
37
6008
# -*- coding: utf-8 -*- """Examples of non-linear functions for non-parametric regression Created on Sat Jan 05 20:21:22 2013 Author: Josef Perktold """ import numpy as np ## Functions def fg1(x): '''Fan and Gijbels example function 1 ''' return x + 2 * np.exp(-16 * x**2) def fg1eu(x): '''Eubank ...
bsd-3-clause
randy-waterhouse/bitcoin
test/functional/feature_includeconf.py
4
3989
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Tests the includeconf argument Verify that: 1. adding includeconf to the configuration file causes the inc...
mit
aim16/shadowsocks0
shadowsocks/crypto/sodium.py
1032
3778
#!/usr/bin/env python # # Copyright 2015 clowwindy # # 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
jordiclariana/ansible
lib/ansible/plugins/connection/accelerate.py
39
13466
# (c) 2012, 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
dagwieers/ansible
test/units/modules/network/eos/test_eos_banner.py
55
3617
# This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that ...
gpl-3.0
etherkit/OpenBeacon2
client/win/venv/Lib/site-packages/pip/_vendor/colorama/winterm.py
83
6438
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. from . import win32 # from wincon.h class WinColor(object): BLACK = 0 BLUE = 1 GREEN = 2 CYAN = 3 RED = 4 MAGENTA = 5 YELLOW = 6 GREY = 7 # from wincon.h class WinStyle(object): NORMAL ...
gpl-3.0
martinling/imusim
imusim/tests/system/reality_test.py
2
6801
""" Test simulated outputs against real captured sensor data. """ # Copyright (C) 2009-2011 University of Edinburgh # # This file is part of IMUSim. # # IMUSim 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, e...
gpl-3.0
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/site-packages/tornado/wsgi.py
18
13430
#!/usr/bin/env python # # Copyright 2009 Facebook # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
gpl-3.0
bramalingam/openmicroscopy
components/tools/OmeroPy/src/omero_ext/tiltpicker/pyami/weakattr.py
16
1113
#!/usr/bin/env python # -*- coding: utf-8 -*- import weakref import threading keyobject = weakref.WeakValueDictionary() keyvalue = weakref.WeakKeyDictionary() keylookup = weakref.WeakValueDictionary() threadlock = threading.RLock() class Key(object): pass def key(obj, attrname): k = str(id(obj)) + attrname try: ...
gpl-2.0
jamesls/boto
boto/file/bucket.py
97
4075
# Copyright 2010 Google Inc. # Copyright (c) 2011, Nexenta Systems Inc. # # 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...
mit
SeNeReKo/textplot-tcf
textplot_tcf/text.py
1
4264
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os from collections import OrderedDict from textplot.text import Text as Text_ from tcflib.tcf import TextCorpus class Text(Text_): """ Implementation of `textplot.Text` that reads an annotated text in TCF format instead of processing plain text. ...
apache-2.0
mancoast/CPythonPyc_test
cpython/252_list_tests.py
7
15951
""" Tests common to list and UserList.UserList """ import sys import os import unittest from test import test_support, seq_tests class CommonTest(seq_tests.CommonTest): def test_init(self): # Iterable arg is optional self.assertEqual(self.type2test([]), self.type2test()) # Init clears p...
gpl-3.0
mahinthjoe/bedrock
py3env/lib/python3.4/site-packages/pip/_vendor/requests/utils.py
618
21334
# -*- coding: utf-8 -*- """ requests.utils ~~~~~~~~~~~~~~ This module provides utility functions that are used within Requests that are also useful for external consumption. """ import cgi import codecs import collections import io import os import platform import re import sys import socket import struct import wa...
mpl-2.0
nanditav/15712-TensorFlow
tensorflow/python/kernel_tests/tensor_array_ops_test.py
3
44035
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
mpurzynski/MozDef
alerts/geomodel/execution.py
3
2879
from datetime import datetime from typing import Callable, NamedTuple, Optional from mozdef_util.elasticsearch_client import ElasticsearchClient as ESClient from mozdef_util.query_models import SearchQuery, TermMatch from mozdef_util.utilities.toUTC import toUTC _TYPE_NAME = 'execution_state' class ExecutionState(...
mpl-2.0
CHBMB/LazyLibrarian
lib/apscheduler/threadpool.py
138
3982
""" Generic thread pool class. Modeled after Java's ThreadPoolExecutor. Please note that this ThreadPool does *not* fully implement the PEP 3148 ThreadPool! """ from threading import Thread, Lock, currentThread from weakref import ref import logging import atexit try: from queue import Queue, Empty except ImportE...
gpl-3.0
alex/django-debug-toolbar
debug_toolbar/panels/timer.py
1
3006
import time from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ from debug_toolbar.debug.timer import DebugTimer from debug_toolbar.panels import DebugPanel class TimerDebugPanel(DebugPanel): """ Panel that displays the time a response took in millisec...
bsd-3-clause
jontrulson/mraa
src/doxy2swig.py
12
15284
#!/usr/bin/env python2 """Doxygen XML to SWIG docstring converter. Usage: doxy2swig.py [options] input.xml output.i Converts Doxygen generated XML files into a file containing docstrings that can be used by SWIG-1.3.x. Note that you need to get SWIG version > 1.3.23 or use Robin Dunn's docstring patch to be able ...
mit
rocky/python2-trepan
trepan/lib/file.py
1
3972
# -*- coding: utf-8 -*- # Copyright (C) 2008-2009, 2013, 2015-2017 # Rocky Bernstein <rocky@gnu.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, ...
gpl-3.0
jmolina116/kaldi-yesno-tutorial
steps/diagnostic/analyze_phone_length_stats.py
3
12895
#!/usr/bin/env python # Copyright 2016 Johns Hopkins University (author: Daniel Povey) # Apache 2.0. from __future__ import print_function import argparse import sys, os from collections import defaultdict parser = argparse.ArgumentParser(description="This script reads stats created in analyze_alignments.sh " ...
apache-2.0
burzillibus/RobHome
venv/lib/python2.7/site-packages/zmq/sugar/poll.py
21
5324
"""0MQ polling related functions and classes.""" # Copyright (C) PyZMQ Developers # Distributed under the terms of the Modified BSD License. import zmq from zmq.backend import zmq_poll from .constants import POLLIN, POLLOUT, POLLERR #----------------------------------------------------------------------------- # Po...
mit