repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
chdecultot/erpnext
refs/heads/develop
erpnext/buying/doctype/supplier_scorecard/supplier_scorecard.py
23
# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import throw, _ from frappe.model.document import Document import time from datetime import timedelta from fra...
ychfan/tensorflow
refs/heads/master
tensorflow/python/keras/_impl/keras/utils/io_utils_test.py
34
# 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...
nsone/nsone-cli
refs/heads/develop
ns1cli/commands/cmd_monitor.py
3
import click from ns1cli.cli import cli from ns1cli.util import Formatter from nsone.rest.resource import ResourceException class MonitorFormatter(Formatter): def print_monitor(self, mdata): regions = mdata.pop('regions') status = mdata.pop('status') rules = mdata.pop('rules') se...
sorenh/cc
refs/heads/master
vendor/Twisted-10.0.0/twisted/__init__.py
13
# -*- test-case-name: twisted -*- # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """ Twisted: The Framework Of Your Internet. """ # Ensure the user is running the version of python we require. import sys if not hasattr(sys, "version_info") or sys.version_info < (2,3): raise Ru...
nexiles/odoo
refs/heads/8.0
addons/auth_oauth/auth_oauth.py
321
from openerp.osv import osv, fields class auth_oauth_provider(osv.osv): """Class defining the configuration values of an OAuth2 provider""" _name = 'auth.oauth.provider' _description = 'OAuth2 provider' _order = 'name' _columns = { 'name' : fields.char('Provider name', required=True), ...
ericlink/adms-server
refs/heads/master
playframework-dist/1.1-src/python/Lib/lib-tk/FileDialog.py
4
"""File selection dialog classes. Classes: - FileDialog - LoadFileDialog - SaveFileDialog """ from Tkinter import * from Dialog import Dialog import os import fnmatch dialogstates = {} class FileDialog: """Standard file selection dialog -- no checks on selected file. Usage: ...
jmschrei/scikit-learn
refs/heads/master
sklearn/datasets/tests/test_lfw.py
230
"""This test for the LFW require medium-size data dowloading and processing If the data has not been already downloaded by running the examples, the tests won't run (skipped). If the test are run, the first execution will be long (typically a bit more than a couple of minutes) but as the dataset loader is leveraging ...
xxd3vin/spp-sdk
refs/heads/master
opt/Python27/Lib/test/badsyntax_future8.py
202
"""This is a test""" from __future__ import * def f(x): def g(y): return x + y return g print f(2)(4)
flower-pot/xf-indicator
refs/heads/master
xf_indicator_lib/add_project_window.py
1
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- ### BEGIN LICENSE # Copyright (C) 2014 Frederic Branczyk fbranczyk@gmail.com # 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 ...
ianyh/heroku-buildpack-python-opencv
refs/heads/master
vendor/setuptools-2.1/setuptools/tests/test_dist_info.py
452
"""Test .dist-info style distributions. """ import os import shutil import tempfile import unittest import textwrap try: import ast except: pass import pkg_resources from setuptools.tests.py26compat import skipIf def DALS(s): "dedent and left-strip" return textwrap.dedent(s).lstrip() class TestDist...
OwnROM-Devices/OwnKernel-sprout
refs/heads/own-mm
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
# 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...
resmo/ansible
refs/heads/devel
lib/ansible/modules/network/onyx/onyx_ptp_global.py
59
#!/usr/bin/python # # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
pp-mo/iris
refs/heads/master
lib/iris/fileformats/_pp_lbproc_pairs.py
5
# Copyright Iris contributors # # This file is part of Iris and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. import itertools # LBPROC codes and their English equivalents LBPROC_PAIRS = ( (1, "Difference from another experiment")...
diamond-org/flask-diamond
refs/heads/master
setup.py
1
# -*- coding: utf-8 -*- # Flask-Diamond (c) Ian Dennis Miller import re import os import codecs from setuptools import setup, find_packages def read(*rnames): return codecs.open(os.path.join(os.path.dirname(__file__), *rnames), 'r', 'utf-8').read() def grep(attrname): pattern = r"{0}\W*=\W*'([^']+)'".forma...
pi19404/mbed
refs/heads/master
workspace_tools/host_tests/echo_flow_control.py
125
""" mbed SDK Copyright (c) 2011-2013 ARM Limited 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 wr...
dominicgs/GreatFET-experimental
refs/heads/master
host/greatfet/gnuradio/gladiolus.py
2
# # Gladiolus source/sink for Software Defined IR # import array import numpy as np from gnuradio import gr from greatfet import GreatFETSingleton from .block import GreatFETStreamingSource class GladiolusSource(GreatFETStreamingSource): def set_up_streaming(self, gain, dc_coupled): self.coupling = dc_...
beni55/sentry
refs/heads/master
src/sentry/plugins/bases/tag.py
2
""" sentry.plugins.bases.tag ~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from sentry.models import Group from sentry.plugins import Plugin class TagPlugin(Plugin): tag = None tag_label = None project...
googlei18n/ufo2ft
refs/heads/master
Lib/ufo2ft/featureWriters/baseFeatureWriter.py
2
from __future__ import ( print_function, division, absolute_import, unicode_literals, ) from fontTools.misc.py23 import SimpleNamespace from collections import OrderedDict import logging from ufo2ft.featureWriters import ast class BaseFeatureWriter(object): """Abstract features writer. The `...
seem-sky/kbengine
refs/heads/master
kbe/src/lib/python/Lib/idlelib/SearchDialog.py
70
from tkinter import * from idlelib import SearchEngine from idlelib.SearchDialogBase import SearchDialogBase def _setup(text): root = text._root() engine = SearchEngine.get(root) if not hasattr(engine, "_searchdialog"): engine._searchdialog = SearchDialog(root, engine) return engine._searchdia...
ProfessorX/Config
refs/heads/master
.PyCharm30/system/python_stubs/-1247971765/PyQt4/QtGui/QTextDocumentWriter.py
1
# encoding: utf-8 # module PyQt4.QtGui # from /usr/lib/python3/dist-packages/PyQt4/QtGui.cpython-34m-x86_64-linux-gnu.so # by generator 1.135 # no doc # imports import PyQt4.QtCore as __PyQt4_QtCore class QTextDocumentWriter(): # skipped bases: <class 'sip.simplewrapper'> """ QTextDocumentWriter() QTextD...
bsmith3541/rapcollab
refs/heads/master
venv/lib/python2.7/site-packages/flask/testsuite/test_apps/flaskext/oldext_simple.py
629
ext_id = 'oldext_simple'
DavidLP/home-assistant
refs/heads/dev
homeassistant/components/ihc/binary_sensor.py
7
"""Support for IHC binary sensors.""" from homeassistant.components.binary_sensor import BinarySensorDevice from homeassistant.const import CONF_TYPE from . import IHC_CONTROLLER, IHC_DATA, IHC_INFO from .const import CONF_INVERTING from .ihcdevice import IHCDevice def setup_platform(hass, config, add_entities, disc...
sdcooke/django
refs/heads/master
django/utils/archive.py
562
""" Based on "python-archive" -- http://pypi.python.org/pypi/python-archive/ Copyright (c) 2010 Gary Wilson Jr. <gary.wilson@gmail.com> and contributors. 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 So...
VitalPet/c2c-rd-addons
refs/heads/8.0
c2c_sequence_fy/account_move.py
4
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2012 ChriCar Beteiligungs- und Beratungs- GmbH (<http://www.camptocamp.at>) # # Thi...
mayankcu/Django-social
refs/heads/master
venv/Lib/site-packages/psycopg2/tests/__init__.py
9
#!/usr/bin/env python # psycopg2 test suite # # Copyright (C) 2007-2011 Federico Di Gregorio <fog@debian.org> # # psycopg2 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 the Licen...
adaur/SickRage
refs/heads/master
lib/dogpile/cache/compat.py
60
import sys py2k = sys.version_info < (3, 0) py3k = sys.version_info >= (3, 0) py32 = sys.version_info >= (3, 2) py27 = sys.version_info >= (2, 7) jython = sys.platform.startswith('java') win32 = sys.platform.startswith('win') try: import threading except ImportError: import dummy_threading as threading # noq...
consciousnesss/learn_theano
refs/heads/master
learn_theano/deeplearning_tutorials/test_5_rbm.py
1
#!/usr/bin/env python import theano import theano.tensor as T import numpy as np from learn_theano.utils.display_filters import tile_raster_images from learn_theano.utils.download_all_datasets import get_dataset from theano.tensor.shared_randomstreams import RandomStreams import pickle import time import cv2 def one...
axelkennedal/dissen
refs/heads/master
dissenEnv/lib/python3.5/site-packages/django/contrib/gis/db/models/sql/__init__.py
476
from django.contrib.gis.db.models.sql.conversion import ( AreaField, DistanceField, GeomField, GMLField, ) __all__ = [ 'AreaField', 'DistanceField', 'GeomField', 'GMLField' ]
jettisonjoe/openhtf
refs/heads/master
openhtf/plugs/device_wrapping.py
1
# Copyright 2017 Google Inc. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agre...
GrandmasterK/XScheduler
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py
762
import hashlib import os from pip._vendor.lockfile import LockFile from pip._vendor.lockfile.mkdirlockfile import MkdirLockFile from ..cache import BaseCache from ..controller import CacheController def _secure_open_write(filename, fmode): # We only want to write to this file, so open it in write only mode ...
modulexcite/catapult
refs/heads/master
tracing/PRESUBMIT.py
4
# Copyright 2015 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 sys def RunChecks(input_api, output_api): # pylint: disable=unused-argument results = [] from tracing_build import check_gypi err = check_gyp...
40123103/2015cd_40123103
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/encodings/aliases.py
726
""" Encoding Aliases Support This module is used by the encodings package search function to map encodings names to module names. Note that the search function normalizes the encoding names before doing the lookup, so the mapping will have to map normalized encoding names to module names. Con...
andreaso/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/lambda_facts.py
78
#!/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...
zulip/zulip
refs/heads/master
zerver/lib/notification_data.py
1
from dataclasses import dataclass from typing import Collection, Optional, Set @dataclass class UserMessageNotificationsData: user_id: int flags: Collection[str] mentioned: bool online_push_enabled: bool stream_push_notify: bool stream_email_notify: bool wildcard_mention_notify: bool s...
erdc-cm/air-water-vv
refs/heads/master
3d/Directional_Wave_Current_interaction/45DEG_R1/tank_batch.py
5
simFlagsList[0]['storeQuantities']= ["q:'phi_solid'","q:'velocity_solid'"] #simFlagsList[0]['storeQuantities']= ["q:velocity_solid"] start quit
catapult-project/catapult
refs/heads/master
third_party/html5lib-python/html5lib/tests/test_whitespace_filter.py
453
from __future__ import absolute_import, division, unicode_literals import unittest from html5lib.filters.whitespace import Filter from html5lib.constants import spaceCharacters spaceCharacters = "".join(spaceCharacters) try: unittest.TestCase.assertEqual except AttributeError: unittest.TestCase.assertEqual =...
jonathan-beard/edx-platform
refs/heads/master
lms/djangoapps/verify_student/migrations/0006_auto__add_skippedreverification__add_unique_skippedreverification_user.py
92
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'SkippedReverification' db.create_table('verify_student_sk...
tiredtyrant/CloudBot
refs/heads/gonzobot
tests/plugin_tests/test_optout.py
1
from plugins.core.optout import get_conn_optouts, optout_cache def test_conn_case(): conn_list = optout_cache['TestConnection'] assert get_conn_optouts('TestConnection') is conn_list assert get_conn_optouts('testconnection') is conn_list assert get_conn_optouts('testconnection1') is not conn_list ...
zer0yu/ZEROScan
refs/heads/master
thirdparty/requests/packages/chardet/sbcsgroupprober.py
206
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer....
yury-s/v8-inspector
refs/heads/master
Source/chrome/tools/telemetry/telemetry/value/histogram_util.py
12
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """This is a helper module to get and manipulate histogram data. The histogram data is the same data as is visible from "chrome://histograms". More informat...
HackerTool/pyelftools
refs/heads/master
elftools/elf/elffile.py
6
#------------------------------------------------------------------------------- # elftools: elf/elffile.py # # ELFFile - main class for accessing ELF files # # Eli Bendersky (eliben@gmail.com) # This code is in the public domain #------------------------------------------------------------------------------- from ..co...
mmaker/bridgedb
refs/heads/master
lib/bridgedb/test/test_HTTPServer.py
2
# -*- encoding: utf-8 -*- #_____________________________________________________________________________ # # This file is part of BridgeDB, a Tor bridge distribution system. # # :authors: Isis Lovecruft 0xA3ADB67A2CDB8B35 <isis@torproject.org> # :copyright: (c) 2014, Isis Lovecruft # (c) 2014, The Tor Proje...
demonshreder/pirate
refs/heads/master
user/migrations/0005_communities_code.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-03-27 14:11 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('user', '0004_friendrequests'), ] operations = [ migrations.AddField( ...
ahmetabdi/SickRage
refs/heads/master
lib/unidecode/x05b.py
252
data = ( 'Gui ', # 0x00 'Deng ', # 0x01 'Zhi ', # 0x02 'Xu ', # 0x03 'Yi ', # 0x04 'Hua ', # 0x05 'Xi ', # 0x06 'Hui ', # 0x07 'Rao ', # 0x08 'Xi ', # 0x09 'Yan ', # 0x0a 'Chan ', # 0x0b 'Jiao ', # 0x0c 'Mei ', # 0x0d 'Fan ', # 0x0e 'Fan ', # 0x0f 'Xian ', # 0x10 'Yi '...
ronaflx/cpp-utility
refs/heads/master
.ycm_extra_conf.py
1
# This file is NOT licensed under the GPLv3, which is the license for the rest # of YouCompleteMe. # # Here's the license text for this file: # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either...
sujeet4github/MyLangUtils
refs/heads/master
LangPython/oreilly-intro-to-flask-video/venv/lib/python3.6/site-packages/pip/_vendor/distlib/wheel.py
412
# -*- coding: utf-8 -*- # # Copyright (C) 2013-2016 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # from __future__ import unicode_literals import base64 import codecs import datetime import distutils.util from email import message_from...
nitzmahone/ansible
refs/heads/devel
lib/ansible/modules/network/aci/aci_bd.py
15
#!/usr/bin/python # -*- coding: utf-8 -*- # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
frouty/odoo_oph
refs/heads/dev_70
addons/stock/report/__init__.py
73
# -*- 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...
indictranstech/fbd_frappe
refs/heads/develop
frappe/email/doctype/email_alert/test_email_alert.py
37
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt from __future__ import unicode_literals import frappe, frappe.utils, frappe.utils.scheduler import unittest test_records = frappe.get_test_records('Email Alert') class TestEmailAlert(unittest.TestCase): def setUp(self): frappe....
ContinuumIO/chaco
refs/heads/master
examples/demo/basic/cmap_image_select.py
3
#!/usr/bin/env python """ Draws a colormapped image plot - Left-drag pans the plot. - Mousewheel up and down zooms the plot in and out. - Pressing "z" brings up the Zoom Box, and you can click-drag a rectangular region to zoom. If you use a sequence of zoom boxes, pressing alt-left-arrow and alt-right-arrow m...
xcyan/models
refs/heads/master
cognitive_mapping_and_planning/datasets/nav_env.py
14
# 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 applicab...
Fireblend/chromium-crosswalk
refs/heads/master
tools/usb_gadget/echo_gadget.py
48
# 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. """USB echo gadget module. This gadget has pairs of IN/OUT endpoints that echo packets back to the host. """ import math import struct import uuid import ...
NanaLich/shadowsocks
refs/heads/master
tests/coverage_server.py
1072
#!/usr/bin/env python # # Copyright 2015 clowwindy # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
helinwang/Paddle
refs/heads/develop
python/paddle/trainer_config_helpers/layers.py
3
# Copyright (c) 2016 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 applic...
opticron/asterisk-testsuite-temporary
refs/heads/master
tests/channels/pjsip/transfers/blind_transfer/callee_refer_only/transfer.py
2
#!/usr/bin/env python ''' Copyright (C) 2014, Digium, Inc. John Bigelow <jbigelow@digium.com> This program is free software, distributed under the terms of the GNU General Public License Version 2. ''' import logging import pjsua as pj from twisted.internet import reactor LOGGER = logging.getLogger(__name__) URI = [...
asadoughi/python-neutronclient
refs/heads/master
neutronclient/openstack/common/strutils.py
1
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 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.apac...
Turlough/keyczar
refs/heads/master
cpp/src/tools/scons/scons-local-1.2.0.d20090223/SCons/Tool/ifort.py
19
"""SCons.Tool.ifort Tool-specific initialization for newer versions of the Intel Fortran Compiler for Linux/Windows (and possibly Mac OS X). There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) ...
ParadropLabs/Paradrop
refs/heads/master
tests/paradrop/core/container/test_dockerfile.py
1
from paradrop.core.container.dockerfile import Dockerfile from paradrop.core.chute.service import Service def test_get_target_image(): from paradrop.core.container import dockerfile assert dockerfile.get_target_image("go").startswith("golang:") assert dockerfile.get_target_image("node").startswith("node:"...
Weicong-Lin/pymo-global
refs/heads/master
android/pgs4a-0.9.6/python-install/lib/python2.7/distutils/tests/test_build.py
141
"""Tests for distutils.command.build.""" import unittest import os import sys from test.test_support import run_unittest from distutils.command.build import build from distutils.tests import support from sysconfig import get_platform class BuildTestCase(support.TempdirManager, support.LoggingSilen...
atpohjal/or-tools
refs/heads/master
data/nonogram_regular/nonogram_gondola.py
74
# Copyright 2010 Hakan Kjellerstrand hakank@bonetmail.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 required by applica...
leo23/locust
refs/heads/master
locust/test/test_locust_class.py
32
import unittest from locust.core import HttpLocust, Locust, TaskSet, task, events from locust import ResponseError, InterruptTaskSet from locust.exception import CatchResponseError, RescheduleTask, RescheduleTaskImmediately, LocustError from testcases import LocustTestCase, WebserverTestCase class TestTaskSet(Locust...
hylje/Lyra
refs/heads/master
testproject/settings.py
1
# Django settings for testproject project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS from os import path PROJECT_ROOT = path.dirname(path.abspath(__file__)) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add ...
marscher/PyEMMA
refs/heads/devel
pyemma/__init__.py
1
# This file is part of PyEMMA. # # Copyright (c) 2015, 2014 Computational Molecular Biology Group, Freie Universitaet Berlin (GER) # # PyEMMA 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 vers...
webmasterraj/FogOrNot
refs/heads/master
flask/lib/python2.7/site-packages/numpy/core/machar.py
141
""" Machine arithmetics - determine the parameters of the floating-point arithmetic system Author: Pearu Peterson, September 2003 """ from __future__ import division, absolute_import, print_function __all__ = ['MachAr'] from numpy.core.fromnumeric import any from numpy.core.numeric import errstate # Need to speed ...
adrienbrault/home-assistant
refs/heads/dev
homeassistant/components/ring/config_flow.py
3
"""Config flow for Ring integration.""" import logging from oauthlib.oauth2 import AccessDeniedError, MissingTokenError from ring_doorbell import Auth import voluptuous as vol from homeassistant import config_entries, const, core, exceptions from . import DOMAIN _LOGGER = logging.getLogger(__name__) async def val...
kernel-sanders/arsenic-mobile
refs/heads/master
Dependencies/Twisted-13.0.0/twisted/internet/test/test_baseprocess.py
32
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.internet._baseprocess} which implements process-related functionality that is useful in all platforms supporting L{IReactorProcess}. """ __metaclass__ = type from twisted.python.deprecate import getWarningMethod, setWarni...
jacobrivers123/kernel-nk1-negalite-lt02ltespr
refs/heads/master
tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
# 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...
harwee/electrum-xvg-tor
refs/heads/master
lib/plugins.py
2
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2015 Thomas Voegtlin # # 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 y...
joshimio/blog
refs/heads/master
node_modules/pygmentize-bundled/vendor/pygments/pygments/styles/default.py
364
# -*- coding: utf-8 -*- """ pygments.styles.default ~~~~~~~~~~~~~~~~~~~~~~~ The default highlighting style. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Keyword, Name, Com...
Dev-Cloud-Platform/Dev-Cloud
refs/heads/master
dev_cloud/cc1/src/wi/urls/user/farm.py
1
# -*- coding: utf-8 -*- # @COPYRIGHT_begin # # Copyright [2010-2014] Institute of Nuclear Physics PAN, Krakow, Poland # # 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.apac...
pombredanne/pyjs
refs/heads/master
examples/uitest/libuitest/DOMTest.py
6
from pyjamas.ui.RootPanel import RootPanel from pyjamas import DOM from UnitTest import UnitTest1 from __pyjamas__ import doc #TODO: see issue 768 class DOMTest(UnitTest1): def testDivHTML(self): e = DOM.getElementById('tests') div = DOM.createElement('div') DOM.appendChild(e, div) ...
teleyinex/watchdog
refs/heads/master
src/watchdog/__init__.py
35
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2011 Yesudeep Mangalapilly <yesudeep@gmail.com> # Copyright 2012 Google, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ...
batrick/cctools
refs/heads/master
makeflow/test/linker/001/a.py
26
import sys from b import *
samarthmed/datajam
refs/heads/master
app/__init__.py
1
from flask import Flask from flask.ext.cors import CORS app = Flask("data-jam" , template_folder= "./app/templates", static_folder='./app/static') CORS(app, resources = {r"/listing/*" : {"origins" : "*"}}) # Entry point for all apps .... from dashboard import controllers
ZSeaPeng/python
refs/heads/master
kamen/0002/gene_200_keys.py
76
import uuid,pickle class gene_keys(): def __init__(self,num): self.num = num; self.list = []; def gene_list(self): for i in range(self.num): key=uuid.uuid1(); self.list.append(key) def return_list(self): return self.list; g=gene_keys(200); g.gene_l...
sliz1/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/py/py/_code/_assertionold.py
218
import py import sys, inspect from compiler import parse, ast, pycodegen from py._code.assertion import BuiltinAssertionError, _format_explanation passthroughex = py.builtin._sysex class Failure: def __init__(self, node): self.exc, self.value, self.tb = sys.exc_info() self.node = node class View(...
Ircam-Web/mezzanine-organization
refs/heads/master
organization/network/migrations/0093_auto_20170301_1544.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.9.11 on 2017-03-01 14:44 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('organization-network', '0092_auto_20170228_1317'), ] operations = [ migrations.Alte...
kshitizanand/authomatic
refs/heads/master
examples/pyramid/functional_test/__init__.py
14
__author__ = 'phudec'
Venturi/cms
refs/heads/master
env/lib/python2.7/site-packages/django/db/migrations/writer.py
16
from __future__ import unicode_literals import collections import datetime import decimal import math import os import re import sys import types from importlib import import_module from django.apps import apps from django.db import migrations, models from django.db.migrations.loader import MigrationLoader from djang...
SpiriLiao/linux
refs/heads/master
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
# 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...
Gimpneek/exclusive-raid-gym-tracker
refs/heads/master
app/tests/views/test_remove_tracked_gym.py
1
""" Test the /gym-management/remove/ view """ from django.urls import reverse_lazy from app.models.profile import Profile from app.tests.views.gym_item_common import GymViewCommonCase class TestRemoveTrackedGym(GymViewCommonCase): """ Remove Tracked Gym view tests """ def test_redirects_logged_out_user(self)...
kidmaple/CoolWall
refs/heads/nios2
user/python/Lib/distutils/unixccompiler.py
4
"""distutils.unixccompiler Contains the UnixCCompiler class, a subclass of CCompiler that handles the "typical" Unix-style command-line C compiler: * macros defined with -Dname[=value] * macros undefined with -Uname * include search directories specified with -Idir * libraries specified with -lllib * library...
romain-dartigues/ansible
refs/heads/devel
lib/ansible/modules/network/f5/bigip_cli_script.py
8
#!/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', ...
eckucukoglu/arm-linux-gnueabihf
refs/heads/master
arm-linux-gnueabihf/libc/usr/lib/python2.7/test/test_getopt.py
134
# test_getopt.py # David Goodger <dgoodger@bigfoot.com> 2000-08-19 from test.test_support import verbose, run_doctest, run_unittest, EnvironmentVarGuard import unittest import getopt sentinel = object() class GetoptTests(unittest.TestCase): def setUp(self): self.env = EnvironmentVarGuard() if "P...
mathspace/python-social-auth
refs/heads/master
social/backends/foursquare.py
83
""" Foursquare OAuth2 backend, docs at: http://psa.matiasaguirre.net/docs/backends/foursquare.html """ from social.backends.oauth import BaseOAuth2 class FoursquareOAuth2(BaseOAuth2): name = 'foursquare' AUTHORIZATION_URL = 'https://foursquare.com/oauth2/authenticate' ACCESS_TOKEN_URL = 'https://fours...
scotthartbti/android_external_chromium_org
refs/heads/kk44
chrome/common/extensions/docs/server2/url_constants.py
24
# 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. GITHUB_REPOS = 'https://api.github.com/repos' GITHUB_BASE = 'https://github.com/GoogleChrome/chrome-app-samples/tree/master' RAW_GITHUB_BASE = ('https://...
ressu/SickGear
refs/heads/master
lib/dateutil/zoneinfo/__init__.py
83
# -*- coding: utf-8 -*- """ Copyright (c) 2003-2005 Gustavo Niemeyer <gustavo@niemeyer.net> This module offers extensions to the standard Python datetime module. """ import logging import os from subprocess import call from tarfile import TarFile from dateutil.tz import tzfile __author__ = "Tomi Pieviläinen <tomi.p...
JosmanPS/scikit-learn
refs/heads/master
sklearn/feature_selection/rfe.py
137
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Vincent Michel <vincent.michel@inria.fr> # Gilles Louppe <g.louppe@gmail.com> # # License: BSD 3 clause """Recursive feature elimination for feature ranking""" import warnings import numpy as np from ..utils import check_X_y, safe_sqr fro...
paulmueller/ODTbrain
refs/heads/master
odtbrain/_prepare_sino.py
2
"""Sinogram preparation""" import numpy as np from scipy.stats import mode from skimage.restoration import unwrap_phase def align_unwrapped(sino): """Align an unwrapped phase array to zero-phase All operations are performed in-place. """ samples = [] if len(sino.shape) == 2: # 2D ...
zaina/nova
refs/heads/master
nova/hacking/checks.py
8
# Copyright (c) 2012, Cloudscaling # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
zack3241/incubator-airflow
refs/heads/master
airflow/operators/python_operator.py
7
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
Yubico/yubikey-piv-manager-dpkg
refs/heads/master
pivman/yubicommon/ctypes/libloader.py
3
# ---------------------------------------------------------------------------- # Copyright (c) 2008 David James # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are ...
mlorbetske/PTVS
refs/heads/master
Python/Tests/TestData/Xaml/EmptyXName.py
18
import wpf from System.Windows import Application, Window class MyWindow(Window): def __init__(self): wpf.LoadComponent(self, 'EmptyXName.xaml') if __name__ == '__main__': Application().Run(MyWindow())
jazkarta/edx-platform
refs/heads/master
lms/djangoapps/course_structure_api/v0/serializers.py
39
""" Django REST Framework Serializers """ from django.core.urlresolvers import reverse from rest_framework import serializers from courseware.courses import course_image_url class CourseSerializer(serializers.Serializer): """ Serializer for Courses """ id = serializers.CharField() # pylint: disable=invalid...
wxgeo/geophar
refs/heads/master
wxgeometrie/sympy/core/tests/test_args.py
1
"""Test whether all elements of cls.args are instances of Basic. """ # NOTE: keep tests sorted by (module, class name) key. If a class can't # be instantiated, add it here anyway with @SKIP("abstract class) (see # e.g. Function). import os import re import warnings import io from sympy import (Basic, S, symbols, sqr...
sclabs/sccms-nonrel
refs/heads/master
django/core/files/uploadhandler.py
136
""" Base file upload handler classes, and the built-in concrete subclasses """ try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.files.uploadedfile import TemporaryUplo...
Timonzimm/CS-401
refs/heads/master
project/api/api.py
1
import sqlite3 from scipy.stats import gaussian_kde from flask import Flask, g, jsonify from flask_cors import CORS app = Flask(__name__) CORS(app) DATABASE = 'data/database.sqlite' def get_db(): db = getattr(g, '_database', None) if db is None: db = g._database = sqlite3.connect(DATABASE) return ...
CyanogenMod/android_kernel_samsung_galaxytab-cdma
refs/heads/cm-10.2
scripts/rt-tester/rt-tester.py
1094
#!/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...
IntelPython/BlackScholes_bench
refs/heads/master
bs_erf_numba_jit_par.py
1
# Copyright (C) 2017-2018 Intel Corporation # # SPDX-License-Identifier: MIT import base_bs_erf import numba as nb from math import log, sqrt, exp, erf @nb.njit(error_model='numpy', fastmath=False, parallel=True) def black_scholes( nopt, price, strike, t, rate, vol, call, put): mr = -rate sig_sig_two = vol *...
TeamExodus/external_chromium_org
refs/heads/EXODUS-5.1
mojo/nacl/generator/generate_nacl_bindings.py
36
#!/usr/bin/python # 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. # pylint: disable=W0104,W0106,F0401,R0201 import optparse import os.path import sys import interface def _ScriptDir(): return os.path...