repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
aksaxena80/test
tensorflow/python/ops/array_ops.py
5
39065
"""## Casting TensorFlow provides several operations that you can use to cast tensor data types in your graph. @@string_to_number @@to_double @@to_float @@to_bfloat16 @@to_int32 @@to_int64 @@cast ## Shapes and Shaping TensorFlow provides several operations that you can use to determine the shape of a tensor and cha...
apache-2.0
myjang0507/updatesource
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
1927
# 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 system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
gpl-2.0
tempbottle/kosmosfs-1
scripts.solaris/kfsshell.py
18
2037
#!/usr/bin/python # # $Id: kfsshell.py 24 2007-09-27 07:17:06Z sriramsrao $ # # Copyright 2007 Kosmix Corp. # # This file is part of Kosmos File System (KFS). # # 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...
apache-2.0
marinho/geraldo
geraldo/generators/base.py
4
38749
import random, shelve, os from decimal import Decimal from geraldo.utils import get_attr_value, calculate_size, memoize from geraldo.widgets import Widget, Label, SystemField from geraldo.graphics import Graphic, RoundRect, Rect, Line, Circle, Arc,\ Ellipse, Image from geraldo.barcodes import BarCode from gera...
lgpl-3.0
hainm/open-forcefield-group
forcebalance/XMLConvert/sidechain/99sc-cnv.py
2
22220
#!/usr/bin/env python # The purpose of this script is to port LP's optimized intramolecular parameters for AMBER99SB # into the OpenMM XML format. # The strategy is to: # 1) Read the OpenMM XML file # 2) Read the GROMACS .itp file to figure out the interactions defined using atom classes # 3) Write the new OpenMM XML...
gpl-2.0
waseem18/oh-mainline
vendor/packages/Pygments/pygments/lexers/parsers.py
363
25835
# -*- coding: utf-8 -*- """ pygments.lexers.parsers ~~~~~~~~~~~~~~~~~~~~~~~ Lexers for parser generators. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, DelegatingLexer, \ include...
agpl-3.0
AleksanderGondek/GUT_Manycore_Architectures_MCTS
serial-implementation/source/gutserialmcts/mcts_test.py
1
2271
from gutserialmcts.games.nim import NimState from gutserialmcts.algorithm.utc import UTCSearch class MonteCarloGameHandler(object): """ This class is responsible for playing out a simple game between two players. Both of them are using UTC to determine their best moves, however they have different...
apache-2.0
tobinjt/Flexget
flexget/tests/test_movieparser.py
4
3580
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import pytest from flexget.components.parsing.parsers.parser_guessit import ParserGuessit from flexget.components.parsing.parsers.parser_internal import ParserInternal c...
mit
alejandrorosas/ardupilot
Tools/autotest/param_metadata/param_parse.py
43
5377
#!/usr/bin/env python import os, glob, re, sys from param import * from wikiemit import WikiEmit from xmlemit import XmlEmit from htmlemit import HtmlEmit from optparse import OptionParser parser = OptionParser("param_parse.py [options]") parser.add_option("-v", "--verbose", dest='verbose', action='store_true', defa...
gpl-3.0
nicolargo/intellij-community
python/lib/Lib/site-packages/django/views/generic/edit.py
73
7509
from django.forms import models as model_forms from django.core.exceptions import ImproperlyConfigured from django.http import HttpResponseRedirect from django.views.generic.base import TemplateResponseMixin, View from django.views.generic.detail import (SingleObjectMixin, SingleObjectTemplateRe...
apache-2.0
kangkot/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/win32/Demos/win32clipboardDemo.py
17
4452
# win32clipboardDemo.py # # Demo/test of the win32clipboard module. from win32clipboard import * import win32con import types if not __debug__: print "WARNING: The test code in this module uses assert" print "This instance of Python has asserts disabled, so many tests will be skipped" cf_names = {} # Build ma...
apache-2.0
lukeiwanski/tensorflow-opencl
tensorflow/contrib/grid_rnn/python/kernel_tests/grid_rnn_test.py
18
22279
# 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
FFMG/myoddweb.piger
monitor/api/python/Python-3.7.2/Lib/test/test_sys_setprofile.py
3
11695
import gc import pprint import sys import unittest class TestGetProfile(unittest.TestCase): def setUp(self): sys.setprofile(None) def tearDown(self): sys.setprofile(None) def test_empty(self): self.assertIsNone(sys.getprofile()) def test_setget(self): def fn(*args): ...
gpl-2.0
iCHAIT/Django-Delhi_Metro
mymtero/metro/forms.py
1
1612
from django import forms from django.db import connection from .models import dir from .models import info from .models import near1 from .models import near2 from .models import rev1 from .models import rev2 class dirForm(forms.Form): cursor = connection.cursor() cursor.execute("select sname,sname fro...
gpl-3.0
nphilipp/rolekit
config/roles/memcache/role.py
2
12347
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Red Hat, Inc. # # Authors: # Stephen Gallagher <sgallagh@redhat.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 Lice...
gpl-2.0
slavonic/cu-tex
hyphenation/specs.py
1
6324
''' Missed (weighted): 1463 (11.452%) False (weighted): 349 (2.732%) Missed (weighted): 1698 (12.634%) False (weighted): 722 (5.372%) Missed (weighted): 1869 (13.171%) False (weighted): 495 (3.488%) SPECS = [ { 'range': '1-2', 'selector': '1:5:30' }, { 'range': '1-2', 'selector': '1:2:5' }, { 'range': '1-3...
mit
DYWCn/mxonline
MXOnline/extra_apps/xadmin/views/form.py
6
5271
import copy from django import forms from django.contrib.contenttypes.models import ContentType from django.core.exceptions import PermissionDenied from django.db import models, transaction from django.forms.models import modelform_factory from django.http import Http404, HttpResponseRedirect from django.template.resp...
mit
ChameleonOS/android_kernel_amazon_bowser-common
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
avanov/django
tests/lookup/tests.py
153
37208
from __future__ import unicode_literals from datetime import datetime from operator import attrgetter from unittest import skipUnless from django.core.exceptions import FieldError from django.db import connection from django.test import TestCase, TransactionTestCase, skipUnlessDBFeature from .models import Article, ...
bsd-3-clause
ntt-sic/keystone
keystone/openstack/common/jsonutils.py
6
6083
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may #...
apache-2.0
arantebillywilson/python-snippets
microblog/flask/lib/python3.5/site-packages/coverage/html.py
9
15233
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """HTML reporting for coverage.py.""" import datetime import json import os import shutil import coverage from coverage import env from coverage.backward import i...
mit
coreboot/chrome-ec
util/ec3po/__init__.py
1
1163
# Copyright 2015 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """The EC console interpreter. EC-3PO is a console interpreter which migrates the rich debug console from the EC itself to the host. This allows for a r...
bsd-3-clause
binghongcha08/pyQMD
QMC/MC_exchange/permute4d/dissipation/1.5/en.py
15
1291
import numpy as np import pylab as plt import matplotlib.pyplot as plt import matplotlib as mpl #data = np.genfromtxt(fname='/home/bing/dissipation/energy.dat') data = np.genfromtxt(fname='energy.dat') fig, (ax1,ax2) = plt.subplots(ncols=1, nrows=2, sharex=True) #font = {'family' : 'ubuntu', # 'weight' : ...
gpl-3.0
Mixser/django
tests/model_inheritance_regress/tests.py
150
18806
""" Regression tests for Model inheritance behavior. """ from __future__ import unicode_literals import datetime from operator import attrgetter from unittest import expectedFailure from django import forms from django.test import TestCase from .models import ( ArticleWithAuthor, BachelorParty, BirthdayParty, Bu...
bsd-3-clause
tschaume/pymatgen
pymatgen/util/serialization.py
4
4016
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ Most features of this module has been moved to monty. Please refer to monty.json and monty.serialization documentation. """ import json import functools import pickle from pymatgen.core.periodic_table imp...
mit
antonyc/django-rest-framework
tests/test_validators.py
65
12626
import datetime from django.db import models from django.test import TestCase from rest_framework import serializers def dedent(blocktext): return '\n'.join([line[12:] for line in blocktext.splitlines()[1:-1]]) # Tests for `UniqueValidator` # --------------------------- class UniquenessModel(models.Model): ...
bsd-2-clause
cuboxi/android_external_chromium_org
ppapi/native_client/src/tools/srpcgen.py
79
15629
#!/usr/bin/env python # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Build "SRPC" interfaces from specifications. SRPC interfaces consist of one or more interface classes, typically defined i...
bsd-3-clause
mx3L/enigma2
lib/python/Components/Converter/StringList.py
132
1509
from Converter import Converter from enigma import eListboxPythonStringContent from Components.Element import cached class StringList(Converter): """Turns a simple python list into a list which can be used in a listbox.""" def __init__(self, type): Converter.__init__(self, type) self.content = None def changed...
gpl-2.0
giorgiop/scikit-learn
examples/cluster/plot_face_segmentation.py
71
2839
""" =================================================== Segmenting the picture of a raccoon face in regions =================================================== This example uses :ref:`spectral_clustering` on a graph created from voxel-to-voxel difference on an image to break this image into multiple partly-homogeneous...
bsd-3-clause
rafaeltg/pydl
examples/mlp.py
2
3190
import os import numpy as np from pydl.model_selection.scorer import r2_score, rmse from pydl.models.layers import Dense, Dropout from pydl.models import MLP, load_model, model_from_json from dataset import create_multivariate_data, train_test_split def run_mlp(): """ MLP example """ n_features ...
mit
dkodnik/paperbod
bot/bot_token.py
2
3244
#!/usr/bin/env python # -*- coding: utf-8 -*- #ver:2014.04.01-1 import diaspy.client as dsc import MySQLdb as mdb import hashlib from datetime import datetime, date, time import time as tm import sys def activBotTokenAPI(): try: con = mdb.connect('localhost', '**!**', '**!**', '**!**') except Except...
agpl-3.0
shuggiefisher/potato
django/contrib/gis/gdal/tests/test_driver.py
330
1207
import os, os.path, unittest from django.contrib.gis.gdal import Driver, OGRException valid_drivers = ('ESRI Shapefile', 'MapInfo File', 'TIGER', 'S57', 'DGN', 'Memory', 'CSV', 'GML', 'KML') invalid_drivers = ('Foo baz', 'clucka', 'ESRI Shp') aliases = {'eSrI' : 'ESRI Shapefile', 'TigER/l...
bsd-3-clause
Phonemetra/TurboCoin
test/functional/p2p_feefilter.py
1
3528
#!/usr/bin/env python3 # Copyright (c) 2016-2019 TurboCoin # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test processing of feefilter messages.""" from decimal import Decimal import time from test_framework.messages import m...
mit
Mhynlo/SickRage
lib/requests/packages/urllib3/fields.py
200
5872
from __future__ import absolute_import import email.utils import mimetypes from .packages import six def guess_content_type(filename, default='application/octet-stream'): """ Guess the "Content-Type" of a file. :param filename: The filename to guess the "Content-Type" of using :mod:`mimetypes`. ...
gpl-3.0
drawks/ansible
lib/ansible/modules/network/f5/bigip_gtm_topology_record.py
25
32848
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks 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
dcoredump/zynthian-recipe
zynthian-stage/bin/pedalpi.py
1
1514
#!/usr/bin/python3 from pluginsmanager.banks_manager import BanksManager from pluginsmanager.observer.mod_host.mod_host import ModHost from pluginsmanager.model.bank import Bank from pluginsmanager.model.pedalboard import Pedalboard from pluginsmanager.model.connection import Connection from pluginsmanager.model.lv2.l...
gpl-3.0
varunarya10/contrail-generateDS
java_api.py
3
14986
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import os import re from ifmap_global import CamelCase def getLinkInfoType(ident, link_info): xlink = ident.getLink(link_info) if xlink.getXsdType(): return xlink.getCType().getName() return 'ApiPropertyBase' class JavaApiG...
mit
fighterlyt/bite-project
deps/gdata-python-client/samples/apps/marketplace_sample/gdata/tlslite/utils/hmac.py
403
3286
"""HMAC (Keyed-Hashing for Message Authentication) Python module. Implements the HMAC algorithm as described by RFC 2104. (This file is modified from the standard library version to do faster copying) """ def _strxor(s1, s2): """Utility method. XOR the two strings s1 and s2 (must have same length). """ r...
apache-2.0
izelaciman/node_production
node_modules/meanio/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/ordered_dict.py
2354
10366
# Unmodified from http://code.activestate.com/recipes/576693/ # other than to add MIT license header (as specified on page, but not in code). # Linked from Python documentation here: # http://docs.python.org/2/library/collections.html#collections.OrderedDict # # This should be deleted once Py2.7 is available on all bot...
mit
ThomasMcVay/MediaApp
MediaAppKnobs/KnobElements/IntWidget.py
1
1799
#=============================================================================== # @Author: Madison Aster # @ModuleDescription: # @License: # MediaApp Library - Python Package framework for developing robust Media # Applications with Qt Library # Copyright (C) 2013 Madison Aster # ...
lgpl-2.1
cerrno/neurokernel
neurokernel/LPU/utils/visualizer.py
1
29782
#!/usr/bin/env python """ LPU output visualization. """ import collections from collections import OrderedDict import itertools import os import matplotlib from matplotlib import cm from matplotlib.colors import Normalize import matplotlib.pyplot as plt from matplotlib.animation import FFMpegFileWriter, AVConvFileWr...
bsd-3-clause
etuna-SBF-kog/Stadsparken
env/lib/python2.7/site-packages/django/contrib/gis/utils/wkt.py
419
1846
""" Utilities for manipulating Geometry WKT. """ def precision_wkt(geom, prec): """ Returns WKT text of the geometry according to the given precision (an integer or a string). If the precision is an integer, then the decimal places of coordinates WKT will be truncated to that number: >>> pnt =...
gpl-3.0
goshow-jp/Kraken
Python/kraken/core/objects/object_3d.py
1
33360
"""Kraken - objects.object_3d module. Classes: Object3D - Base Object3D Object. """ import re import logging from kraken.log import getLogger from kraken.core.configs.config import Config from kraken.core.objects.scene_item import SceneItem from kraken.core.maths.xfo import Xfo from kraken.core.maths.rotation_orde...
bsd-3-clause
1n5aN1aC/Octoprint-MQTT-Progress
setup.py
1
3941
# coding=utf-8 ######################################################################################################################## ### Do not forget to adjust the following variables to your own plugin. # The plugin's identifier, has to be unique plugin_identifier = "mqttprogress" # The plugin's python package,...
agpl-3.0
tswast/google-cloud-python
error_reporting/google/cloud/errorreporting_v1beta1/proto/error_stats_service_pb2.py
2
56991
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/devtools/clouderrorreporting_v1beta1/proto/error_stats_service.proto import sys _b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf.internal import enum_type_wrapper fr...
apache-2.0
aESeguridad/GERE
venv/lib/python2.7/site-packages/wtforms/ext/appengine/db.py
228
18588
""" Form generation utilities for App Engine's ``db.Model`` class. The goal of ``model_form()`` is to provide a clean, explicit and predictable way to create forms based on ``db.Model`` classes. No malabarism or black magic should be necessary to generate a form for models, and to add custom non-model related fields: ...
gpl-3.0
skyostil/tracy
src/analyzer/plugins/vg/__init__.py
1
1176
# Copyright (c) 2011 Nokia # # 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, publish, distribute, s...
mit
madmachinations/discordbot
plugins/stats/__init__.py
2
24166
#!/usr/bin/python import __main__ import json #=================================================================================================================== #PLUGIN CALLS async def help_menu(): help_info = {} help_info['title'] = 'Server statistics' help_info['description'] = 'Track channel activit...
gpl-3.0
JioCloud/nova
nova/virt/xenapi/client/objects.py
97
4588
# Copyright 2013 OpenStack Foundation # # 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
jawaid/django-organice
tests/utils.py
1
2663
""" Helper functions for tests """ from organice.management.settings import DjangoSettingsManager def probe_values_in_tuple(content, tuple_key, required_values): """ Test a tuple for required values, extracting the tuple beforehand. :param content: content string containing the tuple attribute (e.g. Djang...
apache-2.0
mcrowson/django
tests/generic_relations/tests.py
35
28530
from __future__ import unicode_literals from django import forms from django.contrib.contenttypes.forms import generic_inlineformset_factory from django.contrib.contenttypes.models import ContentType from django.core.exceptions import FieldError from django.db import IntegrityError from django.db.models import Q from ...
bsd-3-clause
rlindner81/pyload
module/PluginThread.py
40
21373
#!/usr/bin/env python # -*- coding: utf-8 -*- """ 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, or (at your option) any later version. This pro...
gpl-3.0
afloren/nipype
nipype/interfaces/nitime/analysis.py
14
10004
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Interfaces to functionality from nitime for time-series analysis of fmri data - nitime.analysis.CoherenceAnalyzer: Coherence/y - nitime.fmri.io: - nitime.viz.drawmatrix_channels """ import warnings ...
bsd-3-clause
mahak/keystone
keystone/tests/unit/test_app_config.py
2
6285
# encoding: utf-8 # # Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
apache-2.0
dan1/horizon-proto
openstack_dashboard/dashboards/admin/volumes/volumes/forms.py
6
9763
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
apache-2.0
40323250/bg9_cdw11
static/plugin/liquid_tags/soundcloud.py
273
1523
""" Soundcloud Tag -------------- This implements a Liquid-style soundcloud tag for Pelican. It asks the official Soundcloud-API for the widget html code. Syntax ------ `{% soundcloud track_url %}` Example ------- `{% soundcloud https://soundcloud.com/luftmentsh/hakotel %}` Output ------ `<iframe width="100%" heigh...
agpl-3.0
grepme/CMPUT410Lab01
virt_env/virt1/lib/python2.7/site-packages/Paste-1.7.5.1-py2.7.egg/paste/util/template.py
28
24295
""" A small templating language This implements a small templating language for use internally in Paste and Paste Script. This language implements if/elif/else, for/continue/break, expressions, and blocks of Python code. The syntax is:: {{any expression (function calls etc)}} {{any expression | filter}} {{for...
apache-2.0
maxwell-lv/MyQuant
vip.py
1
2247
from xlrd import open_workbook from xlwt import Workbook import pandas as pd import sys loan_file = 'd:\\projects\\vip\\vip_loan.xls' profit_file = 'd:\\projects\\vip\\vip_profit.xls' repay_file = 'd:\\projects\\vip\\vip_repay.xls' loan_book = open_workbook(loan_file) profit_book = open_workbook(profit_file) repay_bo...
gpl-3.0
tedelhourani/ansible
lib/ansible/modules/packaging/os/zypper_repository.py
29
13978
#!/usr/bin/python # encoding: utf-8 # (c) 2013, Matthias Vogelgesang <matthias.vogelgesang@gmail.com> # (c) 2014, Justin Lecher <jlec@gentoo.org> # # 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_...
gpl-3.0
abhiQmar/servo
tests/wpt/web-platform-tests/tools/manifest/XMLParser.py
97
4413
from os.path import dirname, join from collections import OrderedDict from xml.parsers import expat import xml.etree.ElementTree as etree _catalog = join(dirname(__file__), "catalog") def _wrap_error(e): err = etree.ParseError(e) err.code = e.code err.position = e.lineno, e.offset raise err _names ...
mpl-2.0
vijayendrabvs/hap
neutron/tests/unit/api/rpc/agentnotifiers/test_dhcp_rpc_agent_api.py
9
7125
# Copyright (c) 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 to in writ...
apache-2.0
wangcaihua/splearn
SPlearn/splearn/test/test_NGSLM.py
1
1035
from splearn import loadata, accmse, NGSLM NonGroupedLoss = ['squarederror', #regression 'huberloss', #regression 'logit', #classification 'modifiedhuberloss', #classification 'huberizedhinge', #classification 'squaredhinge' #classification ] NonGroupedRegu = ['lasso', ...
gpl-2.0
mujiansu/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/win32/lib/sspicon.py
21
16178
# Generated by h2py from c:\microsoft sdk\include\sspi.h ISSP_LEVEL = 32 ISSP_MODE = 1 ISSP_LEVEL = 32 ISSP_MODE = 0 ISSP_LEVEL = 32 ISSP_MODE = 1 def SEC_SUCCESS(Status): return ((Status) >= 0) SECPKG_FLAG_INTEGRITY = 1 SECPKG_FLAG_PRIVACY = 2 SECPKG_FLAG_TOKEN_ONLY = 4 SECPKG_FLAG_DATAGRAM = 8 SECPKG_FLAG_CONNECTION...
apache-2.0
drewtalati/talaticoin
qa/rpc-tests/rest.py
128
3258
#!/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 REST interface # from test_framework import BitcoinTestFramework from util import * import json try...
mit
mozilla/build-relengapi
relengapi/lib/aws.py
3
5194
# 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/. from __future__ import absolute_import import importlib import json import logging import threading import time import...
mpl-2.0
nmittler/grpc
src/python/interop/setup.py
1
2029
# Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
bsd-3-clause
JianyuWang/nova
nova/tests/functional/api_sample_tests/test_config_drive.py
21
3002
# 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...
apache-2.0
haya14busa/alc-etm-searcher
nltk-3.0a3/build/lib/nltk/corpus/reader/wordnet.py
2
69558
# Natural Language Toolkit: WordNet # # Copyright (C) 2001-2013 NLTK Project # Author: Steven Bethard <Steven.Bethard@colorado.edu> # Steven Bird <stevenbird1@gmail.com> # Edward Loper <edloper@gmail.com> # Nitin Madnani <nmadnani@ets.org> # URL: <http://nltk.org/> # For license information, see...
mit
avsd/django-allauth
allauth/socialaccount/providers/edmodo/tests.py
37
1168
from allauth.socialaccount.tests import create_oauth2_tests from allauth.tests import MockedResponse from allauth.socialaccount.providers import registry from .provider import EdmodoProvider class EdmodoTests(create_oauth2_tests(registry.by_id(EdmodoProvider.id))): def get_mocked_response(self): return M...
mit
jbloom/phyloExpCM
src/data/make_KOSI07_exchangeabilities.py
1
5415
"""Makes ``HYPHY`` include batch file with KOSI07 exchangeabilities. This script reads in the supplementary information file *ECMunrest.dat* from Kosiol, Holmes, and Goldman, "An empirical model for protein sequence evolution," Mol Biol Evol, 24:1464-1479 (2007) http://www.ncbi.nlm.nih.gov/pubmed/17400572 It convert...
gpl-3.0
unomena/tunobase
tunobase/poll/forms.py
1
2978
""" POLL APP This module provides an interface into the poll and answer forms. Classes: PollAnswerForm Functions: n/a Created on 26 Mar 2013 @author: michael """ from django import forms from django.contrib import messages from django.conf import settings class PollAnswerForm(forms.Form): """Form fo...
bsd-3-clause
jacksondebuhr/dashmm
trace/readtrace/scripts/utilization.py
1
3092
#!/usr/bin/python # so this is going to start as a fixed script, and once it works, will # be improved into a more general use thing. # Here are the possible parameters that will be made into arguments on the # command line. dbFile = 'trace.db' nBins = 100 outFile = 'test.txt' import sqlite3 # Create a connectio...
bsd-3-clause
spirrello/spirrello-pynet-work
applied_python/lib/python2.7/site-packages/pysnmp/entity/rfc3413/ntforg.py
4
16381
# # This file is part of pysnmp software. # # Copyright (c) 2005-2016, Ilya Etingof <ilya@glas.net> # License: http://pysnmp.sf.net/license.html # import sys from pyasn1.compat.octets import null from pysnmp.entity.rfc3413 import config from pysnmp.proto.proxy import rfc2576 from pysnmp.proto import rfc3411 from pysnmp...
gpl-3.0
lightcn/odoo
addons/account_bank_statement_extensions/wizard/confirm_statement_line.py
381
1490
# -*- 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 under ...
agpl-3.0
lck/SharpTAL
Docs/conf.py
1
6218
# -*- coding: utf-8 -*- # # 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. # # All configuration values have a default; values that are commented out # serve to show the default. import sys, os...
apache-2.0
numerigraphe/odoo
addons/anonymization/anonymization.py
77
28690
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
sv-dev1/odoo
addons/email_template/wizard/email_template_preview.py
377
3851
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009 Sharoon Thomas # Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it ...
agpl-3.0
andrescodas/casadi
docs/api/examples/SX/ssym.py
3
1508
# # This file is part of CasADi. # # CasADi -- A symbolic framework for dynamic optimization. # Copyright (C) 2010-2014 Joel Andersson, Joris Gillis, Moritz Diehl, # K.U. Leuven. All rights reserved. # Copyright (C) 2011-2014 Greg Horn # # CasADi is free software; you can...
lgpl-3.0
zhouye/shareit
registration/tests/urls.py
138
4645
""" URLs used in the unit tests for django-registration. You should not attempt to use these URLs in any sort of real or development environment; instead, use ``registration/backends/default/urls.py``. This URLconf includes those URLs, and also adds several additional URLs which serve no purpose other than to test tha...
mit
IRI-Research/django
django/contrib/messages/tests/test_api.py
114
1442
from django.test import TestCase, RequestFactory from django.contrib import messages class DummyStorage(object): """ dummy message-store to test the api methods """ def __init__(self): self.store = [] def add(self, level, message, extra_tags=''): self.store.append(message) cla...
bsd-3-clause
zstackorg/zstack-woodpecker
integrationtest/vm/simulator/test_change_vm_image_in_multihosts_env.py
2
2482
''' New Integration Test for changing vm image. @author: Xiaoshuang ''' import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.test_state as test_state import zstackwoodpecker.test_util as test_util import zstackwoodpecker.operations.vm_operations as vm_ops import zstackwoodpecker.operations.host_operat...
apache-2.0
ZerpaTechnology/AsenZor
static/js/brython/Lib/linecache.py
15
3998
"""Cache lines from files. This is intended to read lines from modules imported -- hence if a filename is not found, it will look down the module search path for a file by that name. """ import sys import os import tokenize __all__ = ["getline", "clearcache", "checkcache"] def getline(filename, lineno,...
lgpl-3.0
fzimmermann89/pyload
module/lib/jinja2/environment.py
62
43946
# -*- coding: utf-8 -*- """ jinja2.environment ~~~~~~~~~~~~~~~~~~ Provides a class that holds runtime and parsing time options. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import os import sys from jinja2 import nodes from jinja2.defaults import * from ...
gpl-3.0
blorenz/indie-film-rentals
indiefilmrentals/api/serial_api.py
1
14381
from indiefilmrentals.base.models import * from indiefilmrentals.products.models import * from indiefilmrentals.api.serial_views import HybridDetailView, HybridListView from session_csrf import anonymous_csrf_exempt from django.utils.decorators import method_decorator import json from haystack.query import SearchQue...
bsd-3-clause
NoahFlowa/glowing-spoon
venv/lib/python2.7/site-packages/sqlalchemy/dialects/firebird/kinterbasdb.py
33
6300
# firebird/kinterbasdb.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: firebird+kinterbasdb :name: kinterbasdb :dbapi: kin...
apache-2.0
CatsAndDogsbvba/odoo
addons/mail/mail_mail.py
1
18837
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
dsajkl/reqiop
common/lib/xmodule/xmodule/modulestore/draft_and_published.py
116
4797
""" This module provides an abstraction for Module Stores that support Draft and Published branches. """ import threading from abc import ABCMeta, abstractmethod from contextlib import contextmanager from . import ModuleStoreEnum # Things w/ these categories should never be marked as version=DRAFT DIRECT_ONLY_CATEGOR...
agpl-3.0
Teagan42/home-assistant
homeassistant/components/zha/config_flow.py
3
2521
"""Config flow for ZHA.""" import asyncio from collections import OrderedDict import os import voluptuous as vol from homeassistant import config_entries from .core.const import ( CONF_RADIO_TYPE, CONF_USB_PATH, CONTROLLER, DEFAULT_BAUDRATE, DEFAULT_DATABASE_NAME, DOMAIN, ZHA_GW_RADIO, ...
apache-2.0
PaddlePaddle/Paddle
python/paddle/fluid/tests/unittests/test_fleet_runtime.py
2
2562
# Copyright (c) 2020 PaddlePaddle 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 appli...
apache-2.0
CubicERP/geraldo
site/newsite/site-geraldo/django/contrib/localflavor/fr/fr_department.py
39
3391
# -*- coding: utf-8 -*- DEPARTMENT_ASCII_CHOICES = ( ('01', '01 - Ain'), ('02', '02 - Aisne'), ('03', '03 - Allier'), ('04', '04 - Alpes-de-Haute-Provence'), ('05', '05 - Hautes-Alpes'), ('06', '06 - Alpes-Maritimes'), ('07', '07 - Ardeche'), ('08', '08 - Ardennes'), ('09', '09 - Ar...
lgpl-3.0
mixxorz/wagtail
wagtail/tests/testapp/migrations/0018_multiselect_form_field.py
24
1833
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-09-28 22:15 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tests', '0017_alwaysshowinmenuspage'), ] operations = [ migrations.AlterField( model_name='formfield', ...
bsd-3-clause
breunigs/beets
beetsplug/embedart.py
3
6398
# This file is part of beets. # Copyright 2013, Adrian Sampson. # # 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, ...
mit
Endika/OpenUpgrade
addons/account_budget/account_budget.py
194
9368
# -*- 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
angr/angr
angr/exploration_techniques/oppologist.py
1
3597
from collections import defaultdict import claripy import functools import logging l = logging.getLogger(name=__name__) from ..errors import AngrError, SimError, SimUnsupportedError, SimCCallError from .. import sim_options from ..engines.successors import SimSuccessors exc_list = (AngrError, SimError, claripy.Clar...
bsd-2-clause
fwpz/WeiPython
mysite/wsgi.py
27
1134
""" WSGI config for mysite project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` s...
mit
xbmc/atv2
xbmc/lib/libPython/Python/Mac/Tools/IDE/Wkeys.py
4
1324
spacekey = ' ' returnkey = '\r' tabkey = '\t' enterkey = '\003' backspacekey = '\010' deletekey = '\177' clearkey = '\033' helpkey = '\005' leftarrowkey = '\034' rightarrowkey = '\035' uparrowkey = '\...
gpl-2.0
espenfjo/android_kernel_samsung_n8000
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
scottferg/web-console
django/contrib/admin/models.py
10
2189
from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User from django.contrib.admin.util import quote from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import smart_unicode from django.utils.safestring impor...
bsd-3-clause
wagnerand/amo-validator
tests/test_content_overlays.py
2
4049
from helper import MockXPI from validator.chromemanifest import ChromeManifest import validator.testcases.content as content from validator.errorbundler import ErrorBundle def test_marking_overlays(): """ Mark an overlay, then test that it marks the scripts within the overlay. """ err = ErrorBundle(...
bsd-3-clause
jimyx17/jimh
headphones/getXldProfile.py
2
8286
import os.path import plistlib import sys import xml.parsers.expat as expat import commands from headphones import logger def getXldProfile(xldProfile): xldProfileNotFound = xldProfile expandedPath = os.path.expanduser('~/Library/Preferences/jp.tmkk.XLD.plist') try: preferences = plistlib.Plist.fromF...
gpl-3.0