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
alaski/nova
nova/compute/rpcapi.py
3
52286
# Copyright 2013 Red Hat, Inc. # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
apache-2.0
xiongjungit/kubernetes
third_party/htpasswd/htpasswd.py
897
5219
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2008-2013 Edgewall Software # Copyright (C) 2008 Eli Carter # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edge...
apache-2.0
billyhunt/osf.io
tests/framework_tests/test_routing.py
87
1317
# -*- coding: utf-8 -*- import unittest from nose.tools import * # noqa (PEP8 asserts) from flask import Flask from webtest_plus import TestApp from framework.exceptions import HTTPError from framework.routing import json_renderer, process_rules, Rule def error_view(): raise HTTPError(400) def error_with_msg()...
apache-2.0
hamiltont/CouchPotatoServer
libs/subliminal/subtitles.py
136
5252
# -*- coding: utf-8 -*- # Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com> # # This file is part of subliminal. # # subliminal 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 3 of...
gpl-3.0
paolodedios/tensorflow
tensorflow/lite/micro/examples/magic_wand/train/data_split_test.py
19
3122
# Lint as: python3 # Copyright 2019 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 ...
apache-2.0
marscher/mdtraj
MDTraj/tests/test_lh5.py
2
3824
############################################################################## # MDTraj: A Python Library for Loading, Saving, and Manipulating # Molecular Dynamics Trajectories. # Copyright 2012-2014 Stanford University and the Authors # # Authors: Robert McGibbon # Contributors: # # MDTraj is free software: y...
lgpl-2.1
kawasaki2013/python-for-android-x86
python-modules/twisted/twisted/words/protocols/jabber/xmlstream.py
49
35363
# -*- test-case-name: twisted.words.test.test_jabberxmlstream -*- # # Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ XMPP XML Streams Building blocks for setting up XML Streams, including helping classes for doing authentication on either client or server side, and working with XM...
apache-2.0
ytsapras/robonet_site
scripts/OBSOLETE_CODE/run_tap.py
1
5800
################################################################################# # Collection of routines to update the RoboNet database tables # Keywords match the class model fields in ../robonet_site/events/models.py # # Written by Yiannis Tsapras Oct 2016 # Last update: ###########################################...
gpl-2.0
yakky/django-cms
cms/tests/test_extensions.py
4
28741
from copy import deepcopy from cms.extensions.toolbar import ExtensionToolbar from cms.toolbar_pool import toolbar_pool from cms.utils.urlutils import admin_reverse from django.contrib.auth import get_user_model from django.contrib.auth.models import Permission from django.contrib.sites.models import Site from cms.api...
bsd-3-clause
rfugger/ripplesite
settings.py
2
4129
# Django settings for django project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ('Your Name', 'thomashartman1@gmail.com'), ) MANAGERS = ADMINS DATABASE_ENGINE = 'postgresql' DATABASE_NAME = 'ripplesite' DATABASE_USER = 'thartman' DATABASE_PASSWORD = '' # with po...
gpl-2.0
eric-haibin-lin/mxnet
example/rnn/large_word_lm/custom_module.py
14
7950
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
raymondnijssen/QGIS
tests/src/python/test_qgsmultiedittoolbutton.py
24
2428
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsMultiEditToolButton. .. note:: 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...
gpl-2.0
Simran-B/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/win32com/test/testGIT.py
17
4572
"""Testing pasing object between multiple COM threads Uses standard COM marshalling to pass objects between threads. Even though Python generally seems to work when you just pass COM objects between threads, it shouldnt. This shows the "correct" way to do it. It shows that although we create new threads to use the...
apache-2.0
olegpshenichniy/Booktype
lib/booktype/convert/pandoc/docx/converter.py
6
3100
import os import logging from unipath import Path from django.conf import settings from django.utils.translation import ugettext_lazy as _ from booktype.convert.image_editor_conversion import ImageEditorConversion from booktype.constants import EPUB_DOCUMENT_WIDTH from ...utils import run_command from ..base_pandoc_...
agpl-3.0
NickelMedia/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/watchlist/watchlistrule.py
132
2153
# Copyright (C) 2011 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
mrbox/django
tests/sitemaps_tests/base.py
380
1079
from django.apps import apps from django.contrib.sites.models import Site from django.core.cache import cache from django.test import TestCase, modify_settings, override_settings from .models import I18nTestModel, TestModel @modify_settings(INSTALLED_APPS={'append': 'django.contrib.sitemaps'}) @override_settings(ROO...
bsd-3-clause
llhe/tensorflow
tensorflow/contrib/tensor_forest/python/kernel_tests/grow_tree_op_test.py
56
4251
# 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
tensorflow/datasets
tensorflow_datasets/structured/genomics_ood_test.py
1
1468
# coding=utf-8 # Copyright 2021 The TensorFlow Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
apache-2.0
DazWorrall/ansible
lib/ansible/modules/packaging/os/layman.py
29
7605
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Jakub Jirutka <jakub@jirutka.cz> # # 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
econchick/ramlfications
ramlfications/loader.py
2
2260
# -*- coding: utf-8 -*- # Copyright (c) 2015 Spotify AB __all__ = ["RAMLLoader"] try: from collections import OrderedDict except ImportError: # pragma: no cover from ordereddict import OrderedDict import os import yaml from .errors import LoadRAMLError class RAMLLoader(object): """ Extends YAML ...
apache-2.0
drewandersonnz/openshift-tools
openshift/installer/vendored/openshift-ansible-3.11.28-1/roles/lib_utils/src/class/repoquery.py
23
6322
# pylint: skip-file # flake8: noqa class Repoquery(RepoqueryCLI): ''' Class to wrap the repoquery ''' # pylint: disable=too-many-arguments,too-many-instance-attributes def __init__(self, name, query_type, show_duplicates, match_version, ignore_excluders, verbose): ''' Construc...
apache-2.0
ArcherSys/ArcherSys
Lib/encodings/iso2022_jp.py
1
3299
<<<<<<< HEAD <<<<<<< HEAD # # iso2022_jp.py: Python Unicode Codec for ISO2022_JP # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_iso2022, codecs import _multibytecodec as mbc codec = _codecs_iso2022.getcodec('iso2022_jp') class Codec(codecs.Codec): encode = codec.encode decode = codec.deco...
mit
moskvax/TileStache
TileStache/Goodies/ExternalConfigServer.py
8
4760
""" ExternalConfigServer is a replacement for WSGITileServer that uses external configuration fetched via HTTP to service all config requests. Example usage, with gunicorn (http://gunicorn.org): gunicorn --bind localhost:8888 "TileStache.Goodies.ExternalConfigServer:WSGIServer(url)" """ from ...
bsd-3-clause
willcassella/SinGE
Tools/SinGED/types.py
1
12310
# types.py import bpy from bpy.types import PropertyGroup from bpy.props import BoolProperty, IntProperty, FloatProperty, StringProperty, PointerProperty, EnumProperty, FloatVectorProperty from functools import partial def get_unused_component_types(scene=None, context=None): # Unused arguments del scene, co...
mit
brokenjacobs/ansible
lib/ansible/modules/database/influxdb/influxdb_database.py
70
5583
#!/usr/bin/python # (c) 2016, Kamil Szczygiel <kamil.szczygiel () intel.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 # ...
gpl-3.0
spark8103/ops
xadmin/widgets.py
9
7745
""" Form Widget classes specific to the Django admin site. """ from itertools import chain from django import forms from django.forms.widgets import RadioFieldRenderer, RadioChoiceInput from django.utils.encoding import force_unicode from django.utils.safestring import mark_safe from django.utils.html import conditiona...
apache-2.0
massot/odoo
addons/product/wizard/__init__.py
452
1076
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
slozier/ironpython2
Src/StdLib/Lib/traceback.py
64
11285
"""Extract, format and print information about Python stack traces.""" import linecache import sys import types __all__ = ['extract_stack', 'extract_tb', 'format_exception', 'format_exception_only', 'format_list', 'format_stack', 'format_tb', 'print_exc', 'format_exc', 'print_exception', ...
apache-2.0
nithinelias/support
Historical PowerTrack/Python/CreateHistoricalJob.py
2
1384
#!/usr/bin/env python import urllib2 import base64 import json import sys def post(): UN = 'ENTER_USERNAME' PWD = 'ENTER_PASSWORD' account = 'ENTER_GNIP_CONSOLE_ACCOUNT_NAME' url = 'https://historical.gnip.com/accounts/' + account + '/jobs.json' publisher = "twitter" streamType = "track" dataFormat = "activi...
mit
heeraj123/oh-mainline
vendor/packages/Django/django/contrib/gis/geos/tests/test_io.py
106
4288
from __future__ import unicode_literals import binascii import unittest from django.contrib.gis import memoryview from django.contrib.gis.geos import GEOSGeometry, WKTReader, WKTWriter, WKBReader, WKBWriter, geos_version_info from django.utils import six class GEOSIOTest(unittest.TestCase): def test01_wktreade...
agpl-3.0
Semi-global/edx-platform
common/lib/xmodule/xmodule/video_module/bumper_utils.py
86
4238
""" Utils for video bumper """ import copy import json import pytz import logging from collections import OrderedDict from datetime import datetime, timedelta from django.conf import settings from .video_utils import set_query_parameter try: import edxval.api as edxval_api except ImportError: edxval_api = No...
agpl-3.0
Seattle-Meal-Maps/seattle-meal-maps-api
meal_api/meal_api/urls.py
1
1205
"""meal_api URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-ba...
mit
anna-effeindzourou/trunk
py/tests/clump.py
5
2461
''' Various computations affected by the periodic boundary conditions. ''' import unittest import random from yade.wrapper import * from yade._customConverters import * from yade import utils from yade import * from math import * from minieigen import * class TestSimpleClump(unittest.TestCase): "Test things on a si...
gpl-2.0
hpcugent/vsc-mympirun
test/pmi_utils.py
1
6270
# # Copyright 2019-2021 Ghent University # # This file is part of vsc-mympirun, # 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), # the Flemish Research Foundat...
gpl-2.0
kim135797531/opencog
opencog/python/utility/util.py
34
10037
import collections import cPickle as pickle def if_(cond, t, f): if cond: return t else: return f import operator def concat_lists(lists): return reduce(operator.concat, lists, []) def inplace_set_attributes(obj, **attr_values): obj.__dict__.update(attr_values) return obj imp...
agpl-3.0
LLNL/spack
var/spack/repos/builtin/packages/xtl/package.py
5
1067
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Xtl(CMakePackage): """QuantStack tools library""" homepage = "https://github.com/Quan...
lgpl-2.1
Alberto-Beralix/Beralix
i386-squashfs-root/usr/share/pyshared/twisted/manhole/telnet.py
37
3494
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """Telnet-based shell.""" # twisted imports from twisted.protocols import telnet from twisted.internet import protocol from twisted.python import log, failure # system imports import string, copy, sys from cStringIO import StringIO class Shel...
gpl-3.0
laperry1/android_external_chromium_org
third_party/closure_linter/closure_linter/scopeutil_test.py
84
6616
#!/usr/bin/env python # # Copyright 2012 The Closure Linter 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 # #...
bsd-3-clause
Fusion-Rom/external_chromium_org_third_party_skia
PRESUBMIT.py
20
9410
# Copyright (c) 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. """Top-level presubmit script for Skia. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmi...
bsd-3-clause
JerryLead/spark
python/pyspark/profiler.py
77
5678
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
gras/SensorWorkshop
python/07-DriveSquareUsingStartLight/movement.py
25
2062
# Making Sense of Sensors Workshop # Educators Edition 2015 # # 00-SampleIncludeFiles # movement.py ''' @author: Dead Robot Society ''' from time import sleep import kovan as link import constants as c ################################## # public routines ################################## ''' stops the create m...
mit
aliasmyers/wifidog-gateway
contrib/load-tester/common.py
13
1508
# -*- coding: utf-8 -*- import socket import fcntl import struct import argparse # http://stackoverflow.com/questions/159137/getting-mac-address def get_mac_address(ifname): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) info = fcntl.ioctl(s.fileno(), 0x8927, struct.pack('256s', ifname[:15])) retu...
gpl-2.0
zarboz/jet_442
scripts/tracing/draw_functrace.py
14676
3560
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
gpl-2.0
frreiss/tensorflow-fred
tensorflow/python/saved_model/signature_def_utils_impl.py
22
14351
# 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
pilou-/ansible
lib/ansible/modules/storage/netapp/_sf_snapshot_schedule_manager.py
52
13145
#!/usr/bin/python # (c) 2017, NetApp, 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', 'status': ['deprecated'], ...
gpl-3.0
ZeitOnline/z3c.celery
src/z3c/celery/session.py
1
1860
import threading import transaction import zope.interface import transaction.interfaces class CelerySession(threading.local): """Thread local session of data to be sent to Celery.""" def __init__(self): self.tasks = [] self._needs_to_join = True def add_call(self, method, *args, **kw): ...
bsd-3-clause
arvinsingla/CouchPotatoServer
libs/tornado/platform/select.py
79
2633
#!/usr/bin/env python # # Copyright 2012 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
a-doumoulakis/tensorflow
tensorflow/contrib/kernel_methods/__init__.py
86
1352
# 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
GdZ/scriptfile
software/googleAppEngine/lib/grizzled/grizzled/db/dbgadfly.py
19
5495
# $Id: f25618704b7ebe12c191cc1a51055c26db731b85 $ """ Gadfly extended database driver. """ __docformat__ = "restructuredtext en" # --------------------------------------------------------------------------- # Imports # --------------------------------------------------------------------------- import os import sys ...
mit
mabotech/maboss.py
maboss/webx/models/output/workstation_printer.py
2
1588
# -*- coding: utf-8 -*- from sqlalchemy import create_engine, func from sqlalchemy.orm import sessionmaker from sqlalchemy import Sequence from sqlalchemy import Column, DateTime, Integer, String, Unicode from datetime import datetime from mabolab.database.dbsession import Base from mabolab.database.model import...
mit
MeshCollider/Omnicoin
qa/rpc-tests/mempool_reorg.py
8
4725
#!/usr/bin/env python2 # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test re-org scenarios with a mempool that contains transactions # that spend (directly or indirectly) coin...
mit
bnoi/scikit-tracker
sktracker/tracker/cost_function/tests/test_abstract_cost_functions.py
1
1500
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function from nose.tools import assert_raises import sys import pandas as pd import numpy as np from sktracker.tracker.cost_function import AbstractCostF...
bsd-3-clause
arindampradhan/yaaHN
tests/test_item_model.py
1
1836
import httpretty import unittest from os import path import types import sys import requests from yaaHN.models import item from yaaHN import hn_client from yaaHN.helpers import item_parser, API_BASE from test_utils import get_content, PRESET_DIR class TestItem(unittest.TestCase): def setUp(self): httpret...
mit
VaneCloud/horizon
openstack_dashboard/dashboards/admin/aggregates/constants.py
54
1379
# 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
chubbymaggie/idalink
idalink/memory.py
1
10682
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2013- Yan Shoshitaishvili aka. zardus # Ruoyu Wang aka. fish # Andrew Dutcher aka. rhelmot # Kevin Borgolte aka. cao # # This program is free software; you can redistribute it and/or modify # it un...
gpl-3.0
SlimRoms/kernel_motorola_msm8960dt-common
scripts/rt-tester/rt-tester.py
11005
5307
#!/usr/bin/python # # rt-mutex tester # # (C) 2006 Thomas Gleixner <tglx@linutronix.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # import os import sys import getopt import sh...
gpl-2.0
ivandevp/django
tests/view_tests/generic_urls.py
329
1356
# -*- coding:utf-8 -*- from __future__ import unicode_literals from django.conf.urls import url from django.contrib.auth import views as auth_views from django.views.generic import RedirectView from . import views from .models import Article, DateArticle date_based_info_dict = { 'queryset': Article.objects.all()...
bsd-3-clause
arborh/tensorflow
tensorflow/lite/testing/op_tests/conv2d_transpose.py
4
3070
# Copyright 2019 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
saurabh6790/med_new_app
accounts/doctype/shipping_rule/shipping_rule.py
29
3571
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt # For license information, please see license.txt from __future__ import unicode_literals import webnotes from webnotes import _, msgprint from webnotes.utils import flt, fmt_money from we...
agpl-3.0
sdague/home-assistant
homeassistant/components/griddy/sensor.py
8
1430
"""Support for August sensors.""" from homeassistant.const import CURRENCY_CENT, ENERGY_KILO_WATT_HOUR from homeassistant.helpers.update_coordinator import CoordinatorEntity from .const import CONF_LOADZONE, DOMAIN async def async_setup_entry(hass, config_entry, async_add_entities): """Set up the August sensors....
apache-2.0
achals/servo
tests/wpt/css-tests/tools/html5lib/html5lib/tests/test_sanitizer.py
430
4645
from __future__ import absolute_import, division, unicode_literals try: import json except ImportError: import simplejson as json from html5lib import html5parser, sanitizer, constants, treebuilders def toxmlFactory(): tree = treebuilders.getTreeBuilder("etree") def toxml(element): # encode...
mpl-2.0
mydongistiny/external_chromium_org
tools/telemetry/telemetry/core/video_unittest.py
35
1397
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import os import unittest from telemetry import benchmark from telemetry.core import bitmap from telemetry.core import platform from telemetr...
bsd-3-clause
with-git/tensorflow
tensorflow/contrib/boosted_trees/python/kernel_tests/split_handler_ops_test.py
30
19467
# 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
OsirisSPS/osiris-sps
client/share/plugins/AF9A4C281070FDB0F34CF417CDB168AB38C8A388/lib/test/testcodec.py
252
1047
""" Test Codecs (used by test_charmapcodec) Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright 2000 Guido van Rossum. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def deco...
gpl-3.0
Sunsoo/incodom
lib/markdown/__main__.py
75
3349
""" COMMAND-LINE SPECIFIC STUFF ============================================================================= """ import markdown import sys import optparse import logging from logging import DEBUG, INFO, CRITICAL logger = logging.getLogger('MARKDOWN') def parse_options(): """ Define and parse `optparse` ...
gpl-3.0
pymo/pymo
symbian/PythonForS60_1.9.6/module-repo/standard-modules/logging/__init__.py
80
47156
# Copyright 2001-2007 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
mit
bukzor/sympy
examples/advanced/pyglet_plotting.py
92
7199
#!/usr/bin/env python """ Plotting Examples Suggested Usage: python -i plotting.py """ from sympy import symbols from sympy.plotting.pygletplot import PygletPlot from sympy import sin, cos, pi, sqrt, exp from sympy.core.compatibility import range from time import sleep, clock def main(): x, y, z = symbols...
bsd-3-clause
sdpp/python-keystoneclient
keystoneclient/tests/unit/v2_0/test_service_catalog.py
1
9165
# 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
jantman/biweeklybudget
biweeklybudget/interest.py
1
37651
""" The latest version of this package is available at: <http://github.com/jantman/biweeklybudget> ################################################################################ Copyright 2016 Jason Antman <jason@jasonantman.com> <http://www.jasonantman.com> This file is part of biweeklybudget, also known as bi...
agpl-3.0
j-griffith/cinder
cinder/scheduler/filters/instance_locality_filter.py
4
5120
# -*- coding: utf-8 -*- # Copyright 2014, Adrien Vergé <adrien.verge@numergy.com> # # 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 req...
apache-2.0
zombo/p2pool
SOAPpy/WSDL.py
294
5100
"""Parse web services description language to get SOAP methods. Rudimentary support.""" ident = '$Id: WSDL.py 1467 2008-05-16 23:32:51Z warnes $' from version import __version__ import wstools import xml from Errors import Error from Client import SOAPProxy, SOAPAddress from Config import Config import urllib class...
gpl-3.0
harshilasu/GraphicMelon
y/google-cloud-sdk/platform/gsutil/third_party/boto/boto/sts/__init__.py
14
2011
# Copyright (c) 2010-2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010-2011, Eucalyptus 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, includin...
gpl-3.0
rouge8/20questions
admin.py
1
2796
#!/usr/bin/env python # -*- coding: utf-8 -*- # ''' admin.py Andy Freeland and Dan Levy 5 June 2010 Provides administrative functions, such as retraining characters and deleting objects and characters. Accessed at the /admin url. Laughably insecure. ''' import web import config, model imp...
mit
CoDEmanX/ArangoDB
3rdParty/V8-4.3.61/third_party/python_26/Lib/test/test_queue.py
56
11774
# Some simple queue module tests, plus some failure conditions # to ensure the Queue locks remain stable. import Queue import sys import threading import time import unittest from test import test_support QUEUE_SIZE = 5 # A thread to run a function that unclogs a blocked Queue. class _TriggerThread(threading.Thread):...
apache-2.0
bgris/ODL_bgris
lib/python3.5/site-packages/zmq/tests/test_constants.py
12
4570
# Copyright (C) PyZMQ Developers # Distributed under the terms of the Modified BSD License. import json from unittest import TestCase import pytest import zmq from zmq.utils import constant_names from zmq.sugar import constants as sugar_constants from zmq.backend import constants as backend_constants all_set = set...
gpl-3.0
Basis/Diamond
src/collectors/websitemonitor/test/testwebsitemonitor.py
35
1887
#!/usr/bin/python # coding=utf-8 ######################################################################## from test import CollectorTestCase from test import get_collector_config from mock import patch from diamond.collector import Collector from websitemonitor import WebsiteMonitorCollector #######################...
mit
NeCTAR-RC/nova
nova/conf/vnc.py
10
7835
# Copyright (c) 2010 OpenStack Foundation # 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 ...
apache-2.0
gunny26/webstorage
bin/filename_to_checksum_dict.py
1
6212
#!/usr/bin/python3 # pylint: disable=line-too-long # disable=locally-disabled, multiple-statements, fixme, line-too-long """ command line program to create/restore/test WebStorageArchives """ import os import hashlib import datetime import dateutil.parser import time import sys import socket import argparse import stat...
gpl-2.0
ionux/bitforge
bitforge/utils/encoding.py
1
10832
# -*- coding: utf-8 -*- """ Various utilities useful for converting one Bitcoin format to another, including some the human-transcribable format hashed_base58. The MIT License (MIT) Copyright (c) 2013 by Richard Kiss Permission is hereby granted, free of charge, to any person obtaining a copy of this software and a...
mit
omnirom/android_external_chromium-org
components/policy/tools/generate_policy_source.py
27
36141
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. '''python %prog [options] platform chromium_os_flag template platform specifies which platform source is being generated for and...
bsd-3-clause
kidmaple/CoolWall
user/python/Lib/encodings/cp865.py
4
7076
""" Python Character Mapping Codec generated from 'CP865.TXT'. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(in...
gpl-2.0
DedMemez/ODS-August-2017
dna/DNAVisGroup.py
1
2344
# Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: toontown.dna.DNAVisGroup from panda3d.core import LVector3, LVector3f import DNAGroup import DNABattleCell import DNAUtil class DNAVisGroup(DNAGroup.DNAGroup): COMPONENT_CODE = 2 def __init__(self, name): DNAGroup.DNAGroup.__init__(s...
apache-2.0
TangCheng/hisi351x_linux-3.0.y
tools/perf/python/twatch.py
3213
1338
#! /usr/bin/python # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface # Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com> # # This application is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License...
gpl-2.0
DucQuang1/youtube-dl
youtube_dl/extractor/megavideoz.py
95
1840
# encoding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, float_or_none, xpath_text, ) class MegaVideozIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?megavideoz\.eu/video/(?P<id>[^/]+)(?:/(?P<display_id>[^/]+))?'...
unlicense
frib-high-level-controls/FLAME
python/flame/test/test_linear.py
2
8529
from __future__ import print_function import unittest, os import numpy from numpy import testing as NT from numpy.testing import assert_array_almost_equal as assert_aequal from .. import Machine class testBasic(unittest.TestCase): def setUp(self): self.M = Machine({ 'sim_type':'Vector', 'elements'...
mit
VasuAgrawal/tartanHacks2015
site/flask/lib/python2.7/site-packages/sqlalchemy/log.py
33
6712
# sqlalchemy/log.py # Copyright (C) 2006-2014 the SQLAlchemy authors and contributors # <see AUTHORS file> # Includes alterations by Vinay Sajip vinay_sajip@yahoo.co.uk # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Logging control a...
mit
resmo/ansible
lib/ansible/modules/network/fortios/fortios_system_pppoe_interface.py
13
13917
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, 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 3 of the Lic...
gpl-3.0
joelddiaz/openshift-tools
openshift/installer/vendored/openshift-ansible-3.10.0-0.29.0/roles/lib_openshift/src/class/oc_adm_ca_server_cert.py
13
6061
# pylint: skip-file # flake8: noqa class CAServerCertConfig(OpenShiftCLIConfig): ''' CAServerCertConfig is a DTO for the oc adm ca command ''' def __init__(self, kubeconfig, verbose, ca_options): super(CAServerCertConfig, self).__init__('ca', None, kubeconfig, ca_options) self.kubeconfig = kube...
apache-2.0
longman694/youtube-dl
youtube_dl/extractor/safari.py
20
6986
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, sanitized_Request, std_headers, urlencode_postdata, update_url_query, ) class SafariBaseIE(InfoExtractor): _LOGIN_URL = 'https://www.safaribooksonline.co...
unlicense
bobobox/ansible
test/units/module_utils/basic/test_run_command.py
32
8405
# -*- coding: utf-8 -*- # # 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
erykoff/redmapper
redmapper/__init__.py
1
1821
import os os.environ['MKL_NUM_THREADS'] = '1' os.environ['NUMEXPR_NUM_THREADS'] = '1' os.environ['OMP_NUM_THREADS'] = '1' from ._version import __version__, __version_info__ version = __version__ from . import calibration from . import pipeline from . import redmagic from .configuration import Configuration from ....
apache-2.0
tinkhaven-organization/odoo
addons/point_of_sale/wizard/pos_details.py
225
2386
# -*- 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
viisar/brew
brew/selection/dynamic/dsknn.py
3
3563
import numpy as np from brew.base import Ensemble from brew.metrics.diversity.paired import kuncheva_double_fault_measure from .base import DCS class DSKNN(DCS): """DS-KNN The DS-KNN selects an ensemble of classifiers based on their accuracy and diversity in the neighborhood of the test sample. ...
mit
eerwitt/tensorflow
tensorflow/contrib/learn/python/learn/__init__.py
80
2585
# 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
Bernator/smarthome
lib/plugin.py
3
3187
#!/usr/bin/env python3 # vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab ######################################################################### # Copyright 2011-2013 Marcus Popp marcus@popp.mx ######################################################################### # ...
gpl-3.0
GodBlessPP/w16b_test
static/Brython3.1.1-20150328-091302/Lib/ui/dialog.py
607
4994
from . import widget from browser import html, document class Dialog(widget.DraggableWidget): def __init__(self, id=None): self._div_shell=html.DIV( Class="ui-dialog ui-widget ui-widget-content ui-corner-all ui-front ui-draggable ui-resizable", style={'position': 'absolute', 'height': 'auto',...
agpl-3.0
Kongsea/tensorflow
tensorflow/contrib/timeseries/python/timeseries/state_space_models/state_space_model_test.py
20
31851
# 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
jeffery-do/Vizdoombot
doom/lib/python3.5/site-packages/skimage/viewer/canvastools/linetool.py
43
6911
import numpy as np from matplotlib import lines from ...viewer.canvastools.base import CanvasToolBase, ToolHandles __all__ = ['LineTool', 'ThickLineTool'] class LineTool(CanvasToolBase): """Widget for line selection in a plot. Parameters ---------- manager : Viewer or PlotPlugin. Skimage vi...
mit
KyleAMoore/KanjiNani
Android/.buildozer/android/platform/build/dists/KanjiNani/crystax_python/crystax_python/site-packages/kivy/input/providers/leapfinger.py
17
3232
''' Leap Motion - finger only ========================= ''' __all__ = ('LeapFingerEventProvider', 'LeapFingerEvent') from collections import deque from kivy.logger import Logger from kivy.input.provider import MotionEventProvider from kivy.input.factory import MotionEventFactory from kivy.input.motionevent import Mot...
gpl-3.0
guewen/OpenUpgrade
addons/l10n_fr_hr_payroll/report/fiche_paye.py
33
3174
#!/usr/bin/env python #-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # d$ # # This program is free software: you can redistribute it...
agpl-3.0