repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
Suninus/NewsBlur | refs/heads/master | vendor/opml/tests.py | 20 | ##############################################################################
#
# Copyright (c) 2006 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SO... |
mxOBS/deb-pkg_trusty_chromium-browser | refs/heads/master | third_party/webgl/src/specs/latest/1.0/extract-idl.py | 22 | #!/usr/bin/python
import sys
import html5lib
htmlfilename = sys.argv[1]
htmlfile = open(htmlfilename)
try:
doc = html5lib.parse(htmlfile, treebuilder="dom")
finally:
htmlfile.close()
def elementHasClass(el, classArg):
"""
Return true if and only if classArg is one of the classes of el
"""
cla... |
mgit-at/ansible | refs/heads/devel | lib/ansible/module_utils/network/eos/__init__.py | 12133432 | |
beiko-lab/gengis | refs/heads/master | bin/Lib/site-packages/win32/scripts/ce/pysynch.py | 8 | # Simple CE synchronisation utility with Python features.
import wincerapi
import win32api
import win32file
import getopt
import sys
import os
import string
import win32con
import fnmatch
class InvalidUsage(Exception): pass
def print_error(api_exc, msg):
hr, fn, errmsg = api_exc
print "%s - %... |
ltiao/networkx | refs/heads/master | networkx/algorithms/assortativity/tests/test_neighbor_degree.py | 99 | #!/usr/bin/env python
from nose.tools import *
import networkx as nx
class TestAverageNeighbor(object):
def test_degree_p4(self):
G=nx.path_graph(4)
answer={0:2,1:1.5,2:1.5,3:2}
nd = nx.average_neighbor_degree(G)
assert_equal(nd,answer)
D=G.to_directed()
nd... |
adalke/rdkit | refs/heads/master | Code/GraphMol/Descriptors/Wrap/test_list.py | 6 |
tests=[
("python","testMolDescriptors.py",{}),
]
longTests=[]
if __name__=='__main__':
import sys
from rdkit import TestRunner
failed,tests = TestRunner.RunScript('test_list.py',0,1)
sys.exit(len(failed))
|
photoboard/photoboard-django | refs/heads/master | pictures/migrations/0009_auto_20161219_1306.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-12-19 13:06
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('pictures', '0008_picturerequest'),
]
operations = ... |
jirikuncar/invenio-deposit | refs/heads/master | invenio_deposit/filter_utils.py | 7 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2013, 2014 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any... |
js0701/chromium-crosswalk | refs/heads/master | ppapi/generators/idl_diff.py | 180 | #!/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.
import glob
import os
import subprocess
import sys
from idl_option import GetOption, Option, ParseOptions
from idl_outfile import ... |
isralopez/geonode | refs/heads/master | geonode/social/templatetags/social_tags.py | 4 | from django import template
from django.utils.translation import ugettext as _
register = template.Library()
def get_data(action, key, default=None):
"""
Checks for a key in the action's JSON data field. Returns default if the key does not exist.
"""
if hasattr(action, 'data') and action.data:
... |
bsmr-eve/Pyfa | refs/heads/master | eos/effects/shipmissilekineticdamagecc.py | 2 | # shipMissileKineticDamageCC
#
# Used by:
# Ship: Cerberus
# Ship: Onyx
# Ship: Orthrus
type = "passive"
def handler(fit, ship, context):
fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Missile Launcher Operation"),
"kineticDamage", ship.getModifiedItemAtt... |
rallylee/gem5 | refs/heads/master | src/arch/x86/isa/insts/x87/compare_and_test/test.py | 91 | # Copyright (c) 2007 The Hewlett-Packard Development Company
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implemen... |
KohlsTechnology/ansible | refs/heads/devel | lib/ansible/modules/system/hostname.py | 34 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2013, Hiroaki Nakamura <hnakamur@gmail.com>
# 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_versi... |
salguarnieri/intellij-community | refs/heads/master | python/testData/completion/reCompileMatch.py | 83 | import re
p = re.compile('foo')
p.ma<caret>
|
ColorFuzzy/tornado | refs/heads/master | tornado/platform/twisted.py | 23 | # Author: Ovidiu Predescu
# Date: July 2011
#
# 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 ... |
eroicaleo/LearningPython | refs/heads/master | ch09/ex04_TupleAssignment.py | 1 | #!/usr/local/bin/python3.3
X = 'spam'
Y = 'eggs'
print(X, Y)
X, Y = Y, X
print(X, Y)
|
expectocode/Telethon | refs/heads/master | telethon/tl/custom/conversation.py | 1 | import asyncio
import itertools
import time
from .chatgetter import ChatGetter
from ... import helpers, utils, errors
# Sometimes the edits arrive very fast (within the same second).
# In that case we add a small delta so that the age is older, for
# comparision purposes. This value is enough for up to 1000 messages.... |
zozo123/buildbot | refs/heads/master | master/buildbot/test/util/endpoint.py | 1 | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... |
kntem/webdeposit | refs/heads/webdeposit-final | modules/bibencode/lib/bibencode_utils.py | 24 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2011, 2013 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your opt... |
georgeBoole/mindcontrol | refs/heads/master | datacollection/collect_data.py | 1 | from mindcontrol.userbrain import *
#from collections import defaultdict
import sys
DEFAULT_CONFIG_FILE = 'default.cfg'
INVOCATION_ERROR_MESSAGE = 'No configuration file supplied. Will get configuration from user.'
def getUserInput(text_field_names):
user_input = {}
for f in text_field_names:
user_input[f] = raw... |
qgis/QGIS | refs/heads/master | tests/src/python/test_qgslabelsettingswidget.py | 39 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsLabelSettingsWidget and subclasses.
.. 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) an... |
sorenk/ansible | refs/heads/devel | lib/ansible/plugins/action/fail.py | 31 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2012, Dag Wieers <dag@wieers.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 ... |
shubhamgupta123/erpnext | refs/heads/master | erpnext/healthcare/doctype/normal_test_template/normal_test_template.py | 30 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, ESS and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
from frappe.model.document import Document
class NormalTestTemplate(Document):
pass
|
MatthewWilkes/mw4068-packaging | refs/heads/master | src/melange/src/soc/modules/ghop/views/models/org_admin.py | 1 | #!/usr/bin/env python2.5
#
# Copyright 2009 the Melange 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 applic... |
mdhaber/scipy | refs/heads/master | scipy/fft/_pocketfft/realtransforms.py | 19 | import numpy as np
from . import pypocketfft as pfft
from .helper import (_asfarray, _init_nd_shape_and_axes, _datacopied,
_fix_shape, _fix_shape_1d, _normalization, _workers)
import functools
def _r2r(forward, transform, x, type=2, n=None, axis=-1, norm=None,
overwrite_x=False, workers=... |
quarkslab/irma | refs/heads/master | frontend/tests/api/files/test_controllers.py | 1 | import hashlib
from random import randint
from unittest import TestCase
from mock import MagicMock, patch
import api.files.controllers as api_files
from irma.common.base.exceptions import IrmaDatabaseResultNotFound
class TestFilesRoutes(TestCase):
def setUp(self):
self.db = MagicMock()
self.ses... |
pyparallel/numpy | refs/heads/master | benchmarks/benchmarks/bench_reduce.py | 29 | from __future__ import absolute_import, division, print_function
from .common import Benchmark, TYPES1, squares
import numpy as np
class AddReduce(Benchmark):
def time_axis_0(self):
[np.add.reduce(a, axis=0) for a in squares.values()]
def time_axis_1(self):
[np.add.reduce(a, axis=1) for a i... |
jtauber/cassidy | refs/heads/master | cassidy/__init__.py | 12133432 | |
kiriakosv/movie-recommendator | refs/heads/master | moviesite/mainp/__init__.py | 12133432 | |
antonve/s4-project-mooc | refs/heads/master | common/djangoapps/third_party_auth/tests/__init__.py | 12133432 | |
basicthinker/THNVM | refs/heads/master | src/arch/x86/isa/insts/system/segmentation.py | 59 | # Copyright (c) 2007 The Hewlett-Packard Development Company
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implemen... |
kiwicopple/MyMDb | refs/heads/master | venv/build/sphinx/sphinx/websupport/__init__.py | 11 | # -*- coding: utf-8 -*-
"""
sphinx.websupport
~~~~~~~~~~~~~~~~~
Base Module for web support functions.
:copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import sys
import cPickle as pickle
import posixpath
from os import path
from jinja2... |
jitendra29/servo | refs/heads/master | tests/wpt/web-platform-tests/XMLHttpRequest/resources/content.py | 227 | def main(request, response):
response_ctype = ''
if "response_charset_label" in request.GET:
response_ctype = ";charset=" + request.GET.first("response_charset_label")
headers = [("Content-type", "text/plain" + response_ctype),
("X-Request-Method", request.method),
("X-... |
cleesmith/sentdex_scikit_machine_learning_tutorial_for_investing | refs/heads/master | p09.py | 1 | import pandas as pd
import os
import time
from datetime import datetime
import re
from time import mktime
import matplotlib
import matplotlib.pyplot as plt
from matplotlib import style
style.use("dark_background")
# path = "X:/Backups/intraQuarter" # for Windows with X files :)
# if git clone'ed then use relative path... |
amenonsen/ansible | refs/heads/devel | lib/ansible/modules/remote_management/manageiq/manageiq_tenant.py | 22 | #!/usr/bin/python
#
# (c) 2018, Evert Mulder (base on manageiq_user.py by Daniel Korn <korndaniel1@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, eithe... |
kyle-long/pyshelf | refs/heads/master | shelf/artifact_manager.py | 2 | class ArtifactManager(object):
def __init__(self, container):
self.container = container
self.link_manager = self.container.link_manager
def get_artifact(self, path):
"""
Gets artifact or artifact list information.
Args:
path(string): path or nam... |
fzheng/codejam | refs/heads/master | lib/python2.7/site-packages/IPython/core/displaypub.py | 9 | """An interface for publishing rich data to frontends.
There are two components of the display system:
* Display formatters, which take a Python object and compute the
representation of the object in various formats (text, HTML, SVG, etc.).
* The display publisher that is used to send the representation data to the... |
gwpy/gwpy.github.io | refs/heads/master | docs/v0.3/timeseries/index-2.py | 4 | plot = data.plot()
plot.show() |
mpeters/ansible | refs/heads/devel | v2/ansible/errors/__init__.py | 1 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... |
guillemborrell/gtable | refs/heads/master | gtable/table.py | 1 | import numpy as np
import pandas as pd
from functools import partial
from gtable.column import Column
from gtable.lib import records, stack_table_inplace, add_column, \
merge_table, sort_table, filter_table, dropnan_table, first_record, \
last_record, fillna_column, from_chunks, required_columns, required_colu... |
robovm/robovm-studio | refs/heads/master | python/testData/copyPaste/SelectionOneLine.dst.py | 83 | class MyClass(object):
member1 = 1
<selection> member2 = 2
<caret></selection> member3 = 3 |
Nirvedh/CoarseCoherence | refs/heads/master | src/cpu/simple/TimingSimpleCPU.py | 69 | # Copyright (c) 2007 The Regents of The University of Michigan
# 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 ... |
Sklearn-HMM/scikit-learn-HMM | refs/heads/master | sklean-hmm/metrics/cluster/tests/test_unsupervised.py | 15 | import numpy as np
from scipy.sparse import csr_matrix
from .... import datasets
from ..unsupervised import silhouette_score
from ... import pairwise_distances
from nose.tools import assert_false, assert_almost_equal
def test_silhouette():
"""Tests the Silhouette Coefficient. """
dataset = datasets.load_iris... |
Rdbaker/Mealbound | refs/heads/master | migrations/versions/230cd53af17d_.py | 1 | """Adds meal.name and meal.description columns
Revision ID: 230cd53af17d
Revises: 20d2b40a57d9
Create Date: 2017-05-29 11:09:12.653161
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '230cd53af17d'
down_revision = '20d2b40a57d9'
branch_labels = None
depends_on =... |
jabesq/home-assistant | refs/heads/dev | homeassistant/components/ziggo_mediabox_xl/media_player.py | 7 | """Support for interface with a Ziggo Mediabox XL."""
import logging
import socket
import voluptuous as vol
from homeassistant.components.media_player import (
MediaPlayerDevice, PLATFORM_SCHEMA)
from homeassistant.components.media_player.const import (
SUPPORT_NEXT_TRACK, SUPPORT_PAUSE, SUPPORT_PLAY,
SUP... |
andrew-aladev/samba-talloc-debug | refs/heads/master | buildtools/wafadmin/Tools/flex.py | 16 | #!/usr/bin/env python
# encoding: utf-8
# John O'Meara, 2006
# Thomas Nagy, 2006-2008
"Flex processing"
import TaskGen
def decide_ext(self, node):
if 'cxx' in self.features: return '.lex.cc'
else: return '.lex.c'
TaskGen.declare_chain(
name = 'flex',
rule = '${FLEX} -o${TGT} ${FLEXFLAGS} ${SRC}',
ext_in = '.l'... |
gcd0318/django | refs/heads/master | tests/template_loader/__init__.py | 12133432 | |
ZuluPro/django-dbbackup | refs/heads/master | dbbackup/tests/testapp/management/__init__.py | 12133432 | |
danielhers/nerv | refs/heads/master | src/nerv/__init__.py | 12133432 | |
chrisndodge/edx-platform | refs/heads/master | openedx/core/djangoapps/programs/management/commands/__init__.py | 12133432 | |
fentas/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/Scripts/webkitpy/port/gtk_unittest.py | 117 | # 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 f... |
xiang12835/python_web | refs/heads/master | py2_web2py/web2py/gluon/packages/dal/pydal/adapters/mysql.py | 3 | import re
from .base import SQLAdapter
from . import adapters, with_connection
@adapters.register_for('mysql')
class MySQL(SQLAdapter):
dbengine = 'mysql'
drivers = ('MySQLdb', 'pymysql', 'mysqlconnector')
commit_on_alter_table = True
support_distributed_transaction = True
REGEX_URI = re.compile(... |
ran5515/DeepDecision | refs/heads/master | tensorflow/contrib/legacy_seq2seq/python/kernel_tests/seq2seq_test.py | 76 | # 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... |
Hellowlol/plexpy | refs/heads/master | plexpy/helpers.py | 1 | # This file is part of PlexPy.
#
# PlexPy 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.
#
# PlexPy is distributed in the hope ... |
slisson/intellij-community | refs/heads/master | python/testData/completion/importedModule.py | 83 | import root.nested_mod
roo<caret> |
dario61081/koalixcrm | refs/heads/master | koalixcrm/djangoUserExtension/models.py | 2 | # -*- coding: utf-8 -*-
from koalixcrm.djangoUserExtension.user_extension.document_template import *
from koalixcrm.djangoUserExtension.user_extension.template_set import *
from koalixcrm.djangoUserExtension.user_extension.user_extension import *
from koalixcrm.djangoUserExtension.user_extension.text_paragraph import ... |
robintw/scikit-image | refs/heads/master | skimage/morphology/tests/test_ccomp.py | 24 | import numpy as np
from numpy.testing import assert_array_equal, run_module_suite
from skimage.measure import label
import skimage.measure._ccomp as ccomp
from skimage._shared._warnings import expected_warnings
# The background label value
# is supposed to be changed to 0 soon
BG = -1
class TestConnectedComponents... |
richard-willowit/odoo | refs/heads/master | addons/phone_validation/tools/__init__.py | 42 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import phone_validation
|
hughbe/swift | refs/heads/master | utils/SwiftIntTypes.py | 56 | # ===--- SwiftIntTypes.py ----------------------------*- coding: utf-8 -*-===//
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.t... |
asandyz/oppia | refs/heads/develop | extensions/interactions/CodeRepl/CodeRepl.py | 5 | # coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... |
goodwinos/sos | refs/heads/master | sos/plugins/xinetd.py | 5 | # Copyright (C) 2007 Red Hat, Inc., Eugene Teo <eteo@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 License, or
# (at your option) any later version.
# Thi... |
dimacus/selenium | refs/heads/master | py/selenium/webdriver/safari/__init__.py | 2454 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... |
mbevila/cltk | refs/heads/master | cltk/corpus/telugu/corpora.py | 1 | TELUGU_CORPORA = [
{'name':'telugu_text_wikisource',
'location':'remote',
'type':'text'},
]
|
lucasdavila/web2py-appreport | refs/heads/master | modules/plugin_appreport/libs/appreport/libs/pisa/libs/html5lib/src/html5lib/filters/whitespace.py | 133 | try:
frozenset
except NameError:
# Import from the sets module for python 2.3
from sets import ImmutableSet as frozenset
import re
import _base
from html5lib.constants import rcdataElements, spaceCharacters
spaceCharacters = u"".join(spaceCharacters)
SPACES_REGEX = re.compile(u"[%s]+" % spaceCharacters)
... |
alphafoobar/intellij-community | refs/heads/master | python/testData/codeInsight/controlflow/manyifs.py | 83 | var = 1
if a == b:
var = 2
elif aa == bb:
bbb = same_changet_expression
if bbb:
var = 3 # <--- this highlight bug (unused variable)
else:
var = 4
return {'variable': var} |
spencerkclark/aospy | refs/heads/master | aospy/data_loader.py | 1 | """aospy DataLoader objects"""
import logging
import os
import pprint
import warnings
import numpy as np
import xarray as xr
from .internal_names import (
ETA_STR,
GRID_ATTRS,
TIME_STR,
TIME_BOUNDS_STR,
)
from .utils import times, io
def _preprocess_and_rename_grid_attrs(func, grid_attrs=None, **kwa... |
bjornt/PyGlow | refs/heads/master | PyGlow.py | 1 | #####
#
# PyGlow
#
#####
#
# Python module to control Pimoronis PiGlow
# [http://shop.pimoroni.com/products/piglow]
#
# For more information and documentation see:
# https://github.com/benleb/PYGlow
#
#####
#
# Author:
#
# Ben Lebherz (@ben_leb)
#
# Contributors:
#
# Austin Parker (@austinlparker)
# - pulse features
#... |
Azure/azure-sdk-for-python | refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_06_01/aio/operations/_load_balancer_backend_address_pools_operations.py | 1 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... |
blaxter/samba | refs/heads/master | third_party/waf/wafadmin/Tools/msvc.py | 12 | #!/usr/bin/env python
# encoding: utf-8
# Carlos Rafael Giani, 2006 (dv)
# Tamas Pal, 2007 (folti)
# Nicolas Mercier, 2009
# Microsoft Visual C++/Intel C++ compiler support - beta, needs more testing
# usage:
#
# conf.env['MSVC_VERSIONS'] = ['msvc 9.0', 'msvc 8.0', 'wsdk 7.0', 'intel 11', 'PocketPC 9.0', 'Smartphone 8... |
pyghassen/django-userena | refs/heads/master | demo/demo/settings_dotcloud.py | 19 | from settings import *
import json
DEBUG = False
TEMPLATE_DEBUG = DEBUG
with open('/home/dotcloud/environment.json') as f:
env = json.load(f)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'django_userena',
'USER': env['DOTCLO... |
mbertrand/OWSLib | refs/heads/master | examples/wps-usgs-script.py | 16 | # Example script that performs a set of (small) live requests versus the live USGS WPS service
from __future__ import absolute_import
from __future__ import print_function
from owslib.wps import WebProcessingService, WPSExecution, WFSFeatureCollection, WFSQuery, GMLMultiPolygonFeatureCollection, monitorExecution, prin... |
abaditsegay/arangodb | refs/heads/devel | 3rdParty/V8-4.3.61/third_party/python_26/Lib/test/test_logging.py | 48 | #!/usr/bin/env python
#
# Copyright 2001-2004 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 n... |
sergeykolychev/mxnet | refs/heads/master | python/mxnet/ndarray/sparse.py | 2 | # 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... |
kaichogami/scikit-learn | refs/heads/master | sklearn/gaussian_process/tests/test_kernels.py | 24 | """Testing for kernels for Gaussian processes."""
# Author: Jan Hendrik Metzen <jhm@informatik.uni-bremen.de>
# Licence: BSD 3 clause
from collections import Hashable
from sklearn.externals.funcsigs import signature
import numpy as np
from sklearn.gaussian_process.kernels import _approx_fprime
from sklearn.metrics... |
MDAnalysis/mdanalysis | refs/heads/develop | testsuite/MDAnalysisTests/topology/test_gms.py | 1 | # -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8
#
# MDAnalysis --- https://www.mdanalysis.org
# Copyright (c) 2006-2017 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#... |
neiltest/neil_appium | refs/heads/master | appium/android/all_tests.py | 2 | #!/usr/bin/env python
# coding: utf-8
"""
@Author: Well
@Date: 2015 - 05 - 20
"""
import unittest
from Public import HTMLTestRunner
import time
import os
case_path = ".\\TestCase\\"
result = ".\\Result\\"
def create_suite():
# 定义单元测试容器
test_unit = unittest.TestSuite()
# 定搜索用例文件的方法
discover = unitte... |
jdemon519/cfme_tests | refs/heads/master | cfme/tests/infrastructure/test_pxe.py | 5 | import pytest
from cfme.infrastructure import pxe
from utils.update import update
from utils.testgen import generate, pxe_servers
pytest_generate_tests = generate(gen_func=pxe_servers)
@pytest.fixture(scope='function')
def has_no_pxe_servers():
pxe.remove_all_pxe_servers()
@pytest.mark.tier(2)
@pytest.mark.u... |
joernhees/scikit-learn | refs/heads/master | examples/linear_model/plot_iris_logistic.py | 119 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
=========================================================
Logistic Regression 3-class Classifier
=========================================================
Show below is a logistic-regression classifiers decision boundaries on the
`iris <https://en.wikipedia.org/wiki/Iris_... |
boretom/pyload-apkg | refs/heads/master | source/py-mods-prebuilt-x86-64/site-packages/Crypto/SelfTest/Hash/test_MD2.py | 116 | # -*- coding: utf-8 -*-
#
# SelfTest/Hash/MD2.py: Self-test for the MD2 hash function
#
# Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net>
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication ... |
RaoUmer/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers | refs/heads/master | ExamplesFromChapters/Chapter2/ABtesting.py | 97 | """
This is an example of using Bayesian A/B testing
"""
import pymc as pm
# these two quantities are unknown to us.
true_p_A = 0.05
true_p_B = 0.04
# notice the unequal sample sizes -- no problem in Bayesian analysis.
N_A = 1500
N_B = 1000
# generate data
observations_A = pm.rbernoulli(true_p_A, N_A)
observations... |
asdofindia/kitsune | refs/heads/master | kitsune/postcrash/views.py | 22 | from django.contrib.sites.models import Site
from django.http import HttpResponse, HttpResponseBadRequest
from django.views.decorators.cache import cache_page
from kitsune.postcrash.models import Signature
@cache_page(60 * 60 * 24) # One day.
def api(request):
s = request.GET.get('s', None)
if not s:
... |
sk413025/twitter-sent-dnn | refs/heads/master | test_learning_rate.py | 4 | """
Comparing adagrad, adadelta and constant learning in gradient descent(the seddle point function y^2 - x^2)
Reference:
1. comparison on several learning rate update scheme: http://ml.memect.com/archive/2014-12-12/short.html#3786866375172817
2. Saddle point, http://en.wikipedia.org/wiki/Saddle_point
"""
import nump... |
icodedev7/customap | refs/heads/master | devkit/mingw/bin/lib/weakref.py | 187 | """Weak reference support for Python.
This module is an implementation of PEP 205:
http://www.python.org/dev/peps/pep-0205/
"""
# Naming convention: Variables named "wr" are weak reference objects;
# they are called this instead of "ref" to avoid name collisions with
# the module-global ref() function imported from ... |
vqw/frappe | refs/heads/develop | frappe/email/doctype/email_alert_recipient/email_alert_recipient.py | 65 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class EmailAlertRecipient(Document):
pass |
xsteadfastx/pelican-plugins | refs/heads/master | gallery/gallery.py | 32 | import os
from pelican import signals
def get_content_path(pelican):
return pelican.settings.get('PATH')
def get_gallery_path(pelican):
gallery_path = pelican.settings.get('GALLERY_PATH', 'images/gallery')
content_path = get_content_path(pelican)
return os.path.join(content_path, gallery_path)
de... |
KaranToor/MA450 | refs/heads/master | google-cloud-sdk/platform/gsutil/third_party/boto/tests/integration/glacier/test_cert_verification.py | 126 | # Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
# All rights reserved.
#
# 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 withou... |
ywcui1990/htmresearch | refs/heads/master | projects/sensorimotor/experiments/capacity/experiment.py | 8 | #!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2014-2015, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and condit... |
trhlikpa/thug-framework | refs/heads/master | worker/crawler/__init__.py | 12133432 | |
sonaht/ansible | refs/heads/devel | lib/ansible/modules/cloud/atomic/atomic_container.py | 42 | #!/usr/bin/python
# -*- 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.
#... |
akosyakov/intellij-community | refs/heads/master | python/lib/Lib/site-packages/django/core/serializers/json.py | 107 | """
Serialize data to/from JSON
"""
import datetime
import decimal
from StringIO import StringIO
from django.core.serializers.python import Serializer as PythonSerializer
from django.core.serializers.python import Deserializer as PythonDeserializer
from django.utils import datetime_safe
from django.utils import simpl... |
hantonov/ansible-modules-core | refs/heads/devel | system/ping.py | 59 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2016, Toshio Kuratomi <tkuratomi@ansible.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... |
lazaronixon/enigma2 | refs/heads/master | lib/python/Components/TunerInfo.py | 47 | from GUIComponent import GUIComponent
from enigma import eLabel, eSlider, iFrontendInformation
from math import log
class TunerInfo(GUIComponent):
SNR = 0
SNR_DB = 1
AGC = 2
BER = 3
SNR_PERCENTAGE = 0
AGC_PERCENTAGE = 2
BER_VALUE = 3
SNR_BAR = 4
AGC_BAR = 5
BER_BAR = 6
LOCK_STATE = 7
SYNC_STATE = 8
LOCK... |
aliyun/oss-ftp | refs/heads/master | python27/win32/Lib/site-packages/cryptography/hazmat/primitives/cmac.py | 61 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
from cryptography import utils
from cryptography.exceptions import (
... |
casep/Molido | refs/heads/master | ProcesaEstado.py | 1 | #!/usr/bin/python
import commands
import sys
estado = commands.getoutput('cat output.txt')
print estado[-1:]
if estado[-1:] == "1":
print "FOP OK: Respuesta 0.5 Seg | Respuesta FOP 0.5 Seg."
sys.exit(0)
else:
print "FOP CRITICAL: FOP No responde | FOP No responde"
sys.exit(2)
|
allotria/intellij-community | refs/heads/master | python/testData/completion/typedParameterStringPath/a.after.py | 10 | from typing import Any, overload, Union
from os import PathLike
def baz(akjlkgjdfsakglkd: PathLike) -> None:
pass
baz("foo")
def bar(akjlkgjdfsakglkd: Union[str, PathLike]) -> None:
pass
bar("foobar.txt")
@overload
def foo(akjlkgjdfsakglkd: str) -> None:
pass
@overload
def foo(akjlkgjdfsakglkd: Path... |
stitchfix/pybossa | refs/heads/master | pybossa/extensions.py | 2 | """
This module exports all the extensions used by PyBossa.
The objects are:
* sentinel: for caching data, ratelimiting, etc.
* signer: for signing emails, cookies, etc.
* mail: for sending emails,
* login_manager: to handle account sigin/signout
* facebook: for Facebook signin
* twitter: for T... |
marlengit/BitcoinUnlimited | refs/heads/master | qa/rpc-tests/reindex.py | 1 | #!/usr/bin/env python3
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Copyright (c) 2015-2016 The Bitcoin Unlimited developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test -reindex with CheckBlockIndex
#
from ... |
migasfree/migasfree-backend | refs/heads/master | migasfree/stats/routing.py | 1 | # -*- coding: utf-8 -*-
# Copyright (c) 2021 Jose Antonio Chavarría <jachavar@gmail.com>
# Copyright (c) 2021 Alberto Gacías <alberto@migasfree.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 Founda... |
will-Do/virt-test | refs/heads/master | virttest/element_path.py | 28 | #
# ElementTree
# $Id: ElementPath.py 1858 2004-06-17 21:31:41Z Fredrik $
#
# limited xpath support for element trees
#
# history:
# 2003-05-23 fl created
# 2003-05-28 fl added support for // etc
# 2003-08-27 fl fixed parsing of periods in element names
#
# Copyright (c) 2003-2004 by Fredrik Lundh. All rights re... |
ValFadeev/ansible-modules-core | refs/heads/devel | cloud/amazon/ec2_metric_alarm.py | 14 | #!/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 distributed... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.