repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
FUSED-Wind/fusedwind
refs/heads/develop
src/fusedwind/plant_flow/asym.py
2
from numpy import ndarray, array, loadtxt, log, zeros, cos, arccos, sin, nonzero, \ argsort, NaN, mean, ones, vstack, linspace, exp, arctan, arange, \ pi, sqrt, dot from numpy.linalg.linalg import norm from openmdao.lib.datatypes.api import VarTree, Float, Slot, Array, List, Int, Str, Dict, Enum from openmdao....
huor/incubator-hawq
refs/heads/master
tools/bin/pythonSrc/pexpect-4.2/pexpect/utils.py
17
import os import sys import stat import select import time import errno try: InterruptedError except NameError: # Alias Python2 exception to Python3 InterruptedError = select.error def is_executable_file(path): """Checks that path is an executable regular file, or a symlink towards one. This is ...
d40223223/2015cdbg6-40223223
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/unittest/test/test_loader.py
738
import sys import types import unittest class Test_TestLoader(unittest.TestCase): ### Tests for TestLoader.loadTestsFromTestCase ################################################################ # "Return a suite of all tests cases contained in the TestCase-derived # class testCaseClass" def te...
liwangdong/augmented-traffic-control
refs/heads/master
atc/atcd/atcd/AtcdThriftHandlerTask.py
13
#!/usr/bin/env python # # Copyright (c) 2014, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. # # ...
dmwelch/Py6S
refs/heads/master
Py6S/sixs_exceptions.py
3
# This file is part of Py6S. # # Copyright 2012 Robin Wilson and contributors listed in the CONTRIBUTORS file. # # Py6S 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 License, o...
rohitw1991/innoworth-lib
refs/heads/master
core/doctype/report/__init__.py
99
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. # MIT License. See license.txt from __future__ import unicode_literals
ruchee/vimrc
refs/heads/master
vimfiles/bundle/vim-python/submodules/pylint/tests/extensions/test_overlapping_exceptions.py
2
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html # For details: https://github.com/PyCQA/pylint/blob/master/LICENSE """Tests for the pylint checker in :mod:`pylint.extensions.overlapping_exceptions """ from os.path import dirname, join import pytest from pylint.extensions.overlapping...
IllusionRom-deprecated/android_platform_tools_idea
refs/heads/master
python/testData/inspections/PyTypeCheckerInspection/PropertyAndFactoryFunction.py
4
class C(object): @property def foo(self): return 'bar' def f(): return C() def test(): f().foo + <warning descr="Expected type 'str | unicode', got 'int' instead">1</warning>
andymckay/addons-server
refs/heads/master
src/olympia/devhub/tests/test_views.py
2
# -*- coding: utf-8 -*- import json import os import socket from datetime import datetime, timedelta from decimal import Decimal from django import http from django.conf import settings from django.core import mail from django.core.files.storage import default_storage as storage from django.core.files import temp fro...
JamesLiAndroid/django-blog-practice
refs/heads/master
blogproject/blog/admin.py
1
from django.contrib import admin # Register your models here. from .models import Post, Category, Tag class PostAdmin(admin.ModelAdmin): list_display = ['title', 'create_time', 'modified_time', 'category', 'author'] admin.site.register(Post, PostAdmin) # 将新增的PostAdmin添加进来! admin.site.register(Category) admin.si...
dkoes/qsar-tools
refs/heads/master
outputfingerprints.py
1
#!/usr/bin/env python3 '''Routines for creating count and binary fingerprints from molecules''' import sys,argparse,collections,re,gzip,io import numpy as np from rdkit.Chem import AllChem as Chem from rdkit.Chem import MACCSkeys try: import pybel except ImportError: print("Could not import pybel: FP2 fingerp...
remidomingues/ASTra
refs/heads/master
astra/trafficLights.py
1
#!/usr/bin/env python """ @file trafficLights.py @author Remi Domingues @date 24/06/2013 This script reads an input socket connected to the remote client and process an request when received. Requests must be sent on the port 180007, responses are sent on the port 18008. (0) Traffic lights COORDINATES request...
fpy171/django
refs/heads/master
tests/postgres_tests/test_functions.py
351
from datetime import datetime from time import sleep from django.contrib.postgres.functions import TransactionNow from . import PostgreSQLTestCase from .models import NowTestModel class TestTransactionNow(PostgreSQLTestCase): def test_transaction_now(self): """ The test case puts everything und...
linjeffrey/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/layout_tests/models/__init__.py
6014
# Required for Python to search this directory for module files
fnordahl/nova
refs/heads/master
nova/api/openstack/compute/legacy_v2/contrib/server_diagnostics.py
69
# 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.apache.org/licenses/LICENSE-2.0 # # Unless requ...
yars068/blueman
refs/heads/master
blueman/gui/Dialogs.py
1
# coding=utf-8 from __future__ import print_function from __future__ import division from __future__ import absolute_import from __future__ import unicode_literals import gi gi.require_version("Gtk", "3.0") from gi.repository import Gtk class NetworkErrorDialog(Gtk.MessageDialog): def __init__(self, excp, second...
lightcn/odoo
refs/heads/8.0
addons/website_forum_doc/controllers/__init__.py
4497
# -*- coding: utf-8 -*- import main
sbidoul/odoo
refs/heads/8.0
addons/website_report/report.py
257
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
ClearCorp-dev/odoo-clearcorp
refs/heads/9.0
TODO-7.0/sneldev_magento/wizard/sneldev_magento_sync_stop.py
4
# -*- 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...
specialunderwear/django-easymode
refs/heads/master
easymode/tests/testcases/testrelatedadmin.py
3
from django.core.urlresolvers import reverse from django.test import TestCase from django.utils.translation import get_language, activate from easymode.tests.testcases import initdb from easymode.utils.languagecode import fix_language_code ADD_BUTTON = """<a href="%s" class="add-another" onclick="return showAddAnoth...
MrFengShui/CS434
refs/heads/master
HW3/Code/Assignment_Three_Final.py
1
import numpy as np from numpy import genfromtxt import collections, math, operator from scipy.special import expit np.set_printoptions(precision=3,suppress=True) ## Part 1 DistanceFlagPair = collections.namedtuple('Distance', 'distance flag') class DataFormat(): def __init__(self, name): self.name = name...
William-Hai/volatility
refs/heads/master
volatility/plugins/linux/ifconfig.py
44
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility 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 o...
danielbair/aeneas
refs/heads/master
aeneas/tests/tool_test_execute_task.py
5
#!/usr/bin/env python # coding=utf-8 # aeneas is a Python/C library and a set of tools # to automagically synchronize audio and text (aka forced alignment) # # Copyright (C) 2012-2013, Alberto Pettarin (www.albertopettarin.it) # Copyright (C) 2013-2015, ReadBeyond Srl (www.readbeyond.it) # Copyright (C) 2015-2017, A...
opensourcechipspark/platform_external_chromium_org
refs/heads/master
build/android/pylib/gtest/test_package.py
50
# 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. """Base class representing GTest test packages.""" import logging class TestPackage(object): """A helper base class for both APK and stand-alone ex...
olafhauk/mne-python
refs/heads/master
mne/utils/tests/test_testing.py
6
import os.path as op import os import numpy as np import pytest from numpy.testing import assert_equal from mne.datasets import testing from mne.utils import (_TempDir, _url_to_local_path, run_tests_if_main, buggy_mkl_svd) def test_buggy_mkl(): """Test decorator for buggy MKL issues.""" ...
caesar2164/edx-platform
refs/heads/master
openedx/core/djangoapps/commerce/utils.py
12
""" Commerce API Service. """ from django.conf import settings from edx_rest_api_client.client import EdxRestApiClient from eventtracking import tracker from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers ECOMMERCE_DATE_FORMAT = "%Y-%m-%dT%H:%M:%SZ" def create_tracking_context(us...
enthought/pyside
refs/heads/master
tests/QtGui/bug_667.py
6
from PySide.QtCore import * from PySide.QtGui import * class Ball(QGraphicsEllipseItem): def __init__(self, d, parent=None): super(Ball, self).__init__(0, 0, d, d, parent) self.vel = QPointF(0,0) #commenting this out prevents the crash class Foo(QGraphicsView): def __init__(self): ...
qma/pants
refs/heads/master
tests/python/pants_test/util/test_fileutil.py
8
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import unittest fro...
cnbird1999/ava
refs/heads/master
ava/test_email/views.py
3
from django.views import generic from django.views.generic.edit import UpdateView, DeleteView from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from django.shortcuts import get_object_or_404 from django.core.exceptions import PermissionDenied from ava.core_identity.models import...
ClydeSpace-GroundStation/GroundStation
refs/heads/master
GNURadio/OOT_Modules/gr-channelcoding/docs/doxygen/doxyxml/base.py
333
# # Copyright 2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # #...
agconti/njode
refs/heads/master
env/lib/python2.7/site-packages/django/core/servers/fastcgi.py
170
""" FastCGI (or SCGI, or AJP1.3 ...) server that implements the WSGI protocol. Uses the flup python package: http://www.saddi.com/software/flup/ This is an adaptation of the flup package to add FastCGI server support to run Django apps from Web servers that support the FastCGI protocol. This module can be run standal...
2014c2g23/w16b_test
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/configparser.py
692
"""Configuration file parser. A configuration file consists of sections, lead by a "[section]" header, and followed by "name: value" entries, with continuations and such in the style of RFC 822. Intrinsic defaults can be specified by passing them into the ConfigParser constructor as a dictionary. class: ConfigParse...
TigorC/zulip
refs/heads/master
zerver/management/commands/create_user.py
7
from __future__ import absolute_import from __future__ import print_function from typing import Any import sys import argparse from django.core.management.base import BaseCommand, CommandError from django.core.exceptions import ValidationError from django.db.utils import IntegrityError from django.core import valida...
avihoo/samplemod
refs/heads/master
tests/context.py
35
# -*- coding: utf-8 -*- import sys import os sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) import sample
gitprouser/appengine-bottle-skeleton
refs/heads/master
lib/requests_toolbelt/threaded/thread.py
33
"""Module containing the SessionThread class.""" import threading import uuid import requests.exceptions as exc from .._compat import queue class SessionThread(object): def __init__(self, initialized_session, job_queue, response_queue, exception_queue): self._session = initialized_sessi...
Reat0ide/plugin.video.pelisalacarta
refs/heads/master
core/ClientCookie/_HeadersUtil.py
17
"""Utility functions for HTTP header value parsing and construction. Copyright 1997-1998, Gisle Aas Copyright 2002-2004, John J. Lee This code is free software; you can redistribute it and/or modify it under the terms of the BSD License (see the file COPYING included with the distribution). """ import re, string fr...
wangzitian0/BOJ-V4
refs/heads/master
bojv4/settings.py
1
import os from secret_settings import * PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) # PACKAGE_ROOT = os.path.abspath(os.path.join(PROJECT_ROOT, os.pardir)) PACKAGE_ROOT = PROJECT_ROOT BASE_DIR = PROJECT_ROOT # Build paths inside the project like this: os.path.join(BASE_DIR, .....
nicoddemus/guessit
refs/heads/master
guessit/quality.py
51
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2013 Rémi Alvergnat <toilal.dev@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the...
Nikola-K/django_reddit
refs/heads/master
submissions/views.py
6445
from django.shortcuts import render # Create your views here.
dp50mm/digital-food-one--hardware
refs/heads/master
ControllerPi/main.py
1
# Controls the rotating platform # # The servo rotates the platform through a friction wheel. # This wheel can slip when it is blocked in any way as a protection. # # A connected webcam looks down on the platform to control position. import datetime import requests import serial import time import sys ser = serial....
eadgarchen/tensorflow
refs/heads/master
tensorflow/contrib/slim/nets.py
191
# 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 applicable ...
jkonecki/autorest
refs/heads/master
AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/RequiredOptional/autorestrequiredoptionaltestservice/models/__init__.py
15
# 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 ...
uberamd/NGECore2
refs/heads/master
scripts/object/mobile/swirl_prong_hue.py
85615
import sys def setup(core, object): return
uberamd/NGECore2
refs/heads/master
scripts/object/tangible/loot/creature_loot/collections/luxum_shard_04.py
85615
import sys def setup(core, object): return
2014c2g6/c2g6
refs/heads/master
w2/static/Brython2.0.0-20140209-164925/Lib/xml/dom/domreg.py
841
"""Registration facilities for DOM. This module should not be used directly. Instead, the functions getDOMImplementation and registerDOMImplementation should be imported from xml.dom.""" # This is a list of well-known implementations. Well-known names # should be published by posting to xml-sig@python.org, and are # ...
habibmasuro/kivy
refs/heads/master
kivy/core/video/video_gi.py
46
''' Video GI ======== Implementation of VideoBase with using pygi / gstreamer. Pygi is both compatible with Python 2 and 3. ''' # # Important notes: you must take care of glib event + python. If you connect() # directly an event to a python object method, the object will be ref, and will # be never unref. # To preven...
nmaswood/tv_scraping
refs/heads/master
lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/poolmanager.py
678
import logging try: # Python 3 from urllib.parse import urljoin except ImportError: from urlparse import urljoin from ._collections import RecentlyUsedContainer from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool from .connectionpool import port_by_scheme from .exceptions import LocationValue...
icereval/modular-odm
refs/heads/develop
tests/backrefs/test_attribute_syntax.py
4
import unittest import six from modularodm import fields from modularodm.storedobject import ContextLogger from modularodm import StoredObject from modularodm.exceptions import ModularOdmException from tests.base import ( ModularOdmTestCase ) class OneToManyFieldTestCase(ModularOdmTestCase): def define_obj...
lmazuel/azure-sdk-for-python
refs/heads/master
azure-mgmt-network/azure/mgmt/network/v2016_09_01/models/vpn_client_configuration_py3.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 ...
GeobricksTravels/services
refs/heads/master
test/__init__.py
2
__package__ = 'test' __author__ = 'Barbaglia, Guido' __email__ = 'guido.barbaglia@gmail.com' __license__ = 'GPL2'
viniciusgama/blog_gae
refs/heads/master
django/contrib/admindocs/views.py
296
from django import template, templatetags from django.template import RequestContext from django.conf import settings from django.contrib.admin.views.decorators import staff_member_required from django.db import models from django.shortcuts import render_to_response from django.core.exceptions import ImproperlyConfigur...
vfulco/ansible
refs/heads/devel
v1/ansible/runner/shell_plugins/csh.py
127
# (c) 2014, Chris Church <chris@ninemoreminutes.com> # # This file is part of Ansible. # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
zenfone-legacy/android_kernel_asus_T00F
refs/heads/cm-14.1
tools/perf/scripts/python/syscall-counts.py
11181
# system call counts # (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 import sys sys.path.append(os.envir...
12thmantec/linux-3.5
refs/heads/master
tools/perf/scripts/python/syscall-counts.py
11181
# system call counts # (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 import sys sys.path.append(os.envir...
hansey/youtube-dl
refs/heads/master
youtube_dl/extractor/tenplay.py
114
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, float_or_none, ) class TenPlayIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?ten(play)?\.com\.au/.+' _TEST = { 'url': 'http://tenplay.com.au/ten-insider/extra/sea...
melmorabity/streamlink
refs/heads/master
src/streamlink/plugins/streamingvideoprovider.py
5
import re from time import time from streamlink.plugin import Plugin, PluginError from streamlink.plugin.api import validate from streamlink.stream import RTMPStream, HLSStream SWF_URL = "http://play.streamingvideoprovider.com/player2.swf" API_URL = "http://player.webvideocore.net/index.php" _url_re = re.compile( ...
OpusVL/odoo
refs/heads/master
addons/l10n_tr/__openerp__.py
1
# -*- 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...
sathieu/samba
refs/heads/master
third_party/waf/wafadmin/Tools/ccroot.py
20
#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2005-2008 (ita) "base for all c/c++ programs and libraries" import os, sys, re import TaskGen, Task, Utils, preproc, Logs, Build, Options from Logs import error, debug, warn from Utils import md5 from TaskGen import taskgen, after, before, feature from Constants ...
ianstalk/Flexget
refs/heads/develop
flexget/components/parsing/parsers/parser_internal.py
3
import time from loguru import logger from flexget import plugin from flexget.event import event from flexget.utils.log import log_once from flexget.utils.parsers.generic import ParseWarning from flexget.utils.parsers.movie import MovieParser from flexget.utils.parsers.series import SeriesParser from .parser_common ...
jtyr/ansible-modules-extras
refs/heads/devel
cloud/amazon/redshift_subnet_group.py
8
#!/usr/bin/python # Copyright 2014 Jens Carl, Hothead Games Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # ...
mou4e/zirconium
refs/heads/master
tools/cr/cr/base/buildtype.py
128
# 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. """A module for the basic build type support in cr.""" import cr class BuildType(cr.Plugin, cr.Plugin.Type): """Base class for implementing cr build typ...
diogocs1/comps
refs/heads/master
web/addons/l10n_et/__openerp__.py
387
#-*- coding:utf-8 -*- ############################################################################## # # Copyright (C) 2012 Michael Telahun Makonnen <mmakonnen@gmail.com>. # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero G...
FruitClover/OpenGLStuff
refs/heads/master
extern/glew-1.13.0/auto/bin/filter_spec.py
56
#!/usr/bin/python import re section = re.compile('^(Name|Name Strings?|Contact|Notice|Number|Dependencies|Overview|Issues|IP Status|Status|Version|New Procedures and Functions|New Tokens|Additions to .*|Changes to .*|Modifications to .*|Add new Section .*)\s*$') token = re.compile('^\s+(([A-Z0-9][A-Z0-9_x]*):?\s+((...
F1000Research/khmer
refs/heads/master
tests/test_countgraph.py
1
from __future__ import print_function from __future__ import absolute_import, unicode_literals # # This file is part of khmer, https://github.com/dib-lab/khmer/, and is # Copyright (C) Michigan State University, 2009-2015. It is licensed under # the three-clause BSD license; see LICENSE. # Contact: khmer-project@idyll....
greencoder/hopefullysunny-django
refs/heads/master
geocoder/models.py
1
from django.db import models class Zipcode(models.Model): country_code = models.CharField(max_length=10) postal_code = models.CharField(max_length=20) place_name = models.CharField(max_length=255) admin_name1 = models.CharField(max_length=100) admin_code1 = models.CharField(max_length=100) admi...
timm/timmnix
refs/heads/master
pypy3-v5.5.0-linux64/lib-python/3/tkinter/dialog.py
153
# dialog.py -- Tkinter interface to the tk_dialog script. from tkinter import * from tkinter import _cnfmerge if TkVersion <= 3.6: DIALOG_ICON = 'warning' else: DIALOG_ICON = 'questhead' class Dialog(Widget): def __init__(self, master=None, cnf={}, **kw): cnf = _cnfmerge((cnf, kw)) self....
jelugbo/hebs_repo
refs/heads/master
common/djangoapps/course_modes/tests/test_views.py
6
import unittest import decimal import ddt from django.conf import settings from django.test.utils import override_settings from django.core.urlresolvers import reverse from xmodule.modulestore.tests.django_utils import ( ModuleStoreTestCase, mixed_store_config ) from xmodule.modulestore.tests.factories import Cou...
ComputerNetworks-UFRGS/ManP2P-ng
refs/heads/master
old/plan/complexDistributedHealing.py
2
# -*- coding: utf-8 -*- from twisted.internet import defer from commandLineParser import CommandLineParser from extensionLoader import ExtensionLoader # The sensors that accompanies this manager sensorsList = [ #('143.54.12.86', 22, 'q1w2e3r4t5'), # Kashyyyk #('143.54.12.116', 22, 'q1w2e3r4t5'), # Dagobah #('143....
bigswitch/horizon
refs/heads/master
openstack_dashboard/dashboards/admin/routers/urls.py
8
# Copyright 2012, Nachi Ueno, NTT MCL, 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 applic...
edensparkles/FIRSTAID
refs/heads/master
FIRST_AID/venv/Lib/site-packages/pip/_vendor/cachecontrol/caches/__init__.py
962
from textwrap import dedent try: from .file_cache import FileCache except ImportError: notice = dedent(''' NOTE: In order to use the FileCache you must have lockfile installed. You can install it via pip: pip install lockfile ''') print(notice) try: import redis from .redis_cach...
cuilishen/cuilishenMissionPlanner
refs/heads/master
Lib/site-packages/numpy/lib/tests/test__datasource.py
54
import os import sys from tempfile import mkdtemp, mkstemp, NamedTemporaryFile from shutil import rmtree from urlparse import urlparse from urllib2 import URLError import urllib2 from numpy.testing import * from numpy.compat import asbytes import numpy.lib._datasource as datasource def urlopen_stub(url, data=None):...
chouseknecht/ansible
refs/heads/devel
test/units/modules/network/fortios/test_fortios_system_vxlan.py
21
# Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the...
kalxas/QGIS
refs/heads/master
tests/src/python/test_qgssettings.py
45
# -*- coding: utf-8 -*- """ Test the QgsSettings class Run with: ctest -V -R PyQgsSettings .. 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 opti...
bcorbet/SickRage
refs/heads/master
lib/github/tests/Issue216.py
39
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> # # ...
asedunov/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/db/models/__init__.py
83
from django.conf import settings from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured from django.db import connection from django.db.models.loading import get_apps, get_app, get_models, get_model, register_models from django.db.models.query import Q from django.db.models.expressions import F fro...
liangazhou/django-rdp
refs/heads/master
packages/PyDev/plugins/org.python.pydev_4.4.0.201510052309/pysrc/pydevd_constants.py
11
''' This module holds the constants used for specifying the states of the debugger. ''' from __future__ import nested_scopes STATE_RUN = 1 STATE_SUSPEND = 2 PYTHON_SUSPEND = 1 try: __setFalse = False except: import __builtin__ setattr(__builtin__, 'True', 1) setattr(__builtin__, 'False', 0) class De...
kamyu104/LeetCode
refs/heads/master
Python/multiply-strings.py
2
from __future__ import print_function # Time: O(m * n) # Space: O(m + n) # # Given two numbers represented as strings, return multiplication of the numbers as a string. # # Note: The numbers can be arbitrarily large and are non-negative. # class Solution(object): def multiply(self, num1, num2): """ ...
anushbmx/kitsune
refs/heads/master
kitsune/announcements/models.py
6
from datetime import datetime from django.contrib.auth.models import User, Group from django.db import models from django.db.models import Q from django.db.models.signals import post_save from kitsune.sumo.templatetags.jinja_helpers import wiki_to_html from kitsune.sumo.models import ModelBase from kitsune.wiki.model...
fos/fos
refs/heads/master
fos/data/__init__.py
1
import os def get_font( name ): return os.path.join(os.path.dirname(__file__), 'font', name + '.ttf')
agaurav/ansible
refs/heads/devel
v1/ansible/runner/lookup_plugins/flattened.py
122
# (c) 2013, Serge van Ginderachter <serge@vanginderachter.be> # # 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)...
redhat-openstack/sahara
refs/heads/master-patches
sahara/plugins/mapr/services/mysql/mysql.py
5
# Copyright (c) 2015, MapR Technologies # # 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...
GenericStudent/home-assistant
refs/heads/dev
homeassistant/components/raspihats/binary_sensor.py
21
"""Support for raspihats board binary sensors.""" import logging import voluptuous as vol from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorEntity from homeassistant.const import ( CONF_ADDRESS, CONF_DEVICE_CLASS, CONF_NAME, DEVICE_DEFAULT_NAME, ) import homeassistant.hel...
zparallax/amplitude_kernel_aosp_12.1
refs/heads/master
arch/ia64/scripts/unwcheck.py
13143
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
yg257/Pangea
refs/heads/master
lib/boto-2.34.0/tests/unit/ec2/test_instancestatus.py
114
#!/usr/bin/env python from tests.compat import mock, unittest from boto.ec2.connection import EC2Connection INSTANCE_STATUS_RESPONSE = br"""<?xml version="1.0" encoding="UTF-8"?> <DescribeInstanceStatusResponse xmlns="http://ec2.amazonaws.com/doc/2013-02-01/"> <requestId>3be1508e-c444-4fef-89cc-0b1223c4f02fEXAMP...
liangjiaxing/sympy
refs/heads/master
sympy/parsing/tests/test_sympy_parser.py
46
from sympy.core import Symbol, Function, Float, Rational, Integer, I, Mul, Pow from sympy.functions import exp, factorial, sin from sympy.logic import And from sympy.series import Limit from sympy.utilities.pytest import raises from sympy.parsing.sympy_parser import ( parse_expr, standard_transformations, rational...
openstack/watcher
refs/heads/master
watcher/tests/applier/actions/test_resize.py
2
# -*- encoding: 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, soft...
engla/kupfer
refs/heads/master
kupfer/plugin/session_gnome.py
2
__kupfer_name__ = _("GNOME Session Management") __kupfer_sources__ = ("GnomeItemsSource", ) __description__ = _("Special items and actions for GNOME environment") __version__ = "2012-10-16" __author__ = "Ulrik Sverdrup <ulrik.sverdrup@gmail.com>" """ Changes: 2012-10-16 Karol Będkowski: + support Gnome3; c...
willthames/ansible
refs/heads/devel
lib/ansible/modules/storage/netapp/netapp_e_volume_copy.py
69
#!/usr/bin/python # (c) 2016, NetApp, Inc # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version....
agry/NGECore2
refs/heads/master
scripts/mobiles/generic/faction/imperial/veteran_imperial_sandtrooper.py
2
import sys from services.spawn import MobileTemplate from services.spawn import WeaponTemplate from resources.datatables import WeaponType from resources.datatables import Difficulty from resources.datatables import Options from resources.datatables import FactionStatus from java.util import Vector def addTemplate(co...
cmshobe/landlab
refs/heads/master
landlab/components/drainage_density/__init__.py
3
from .drainage_density import DrainageDensity __all__ = ["DrainageDensity"]
hoosteeno/kuma
refs/heads/master
kuma/core/translations/search/filter/firefox/name.py
26
# -*- coding: utf-8 -*- from django.utils.translation import gettext gettext("""Firefox""")
darren-rogan/CouchPotatoServer
refs/heads/master
libs/pyutil/test/current/json_tests/test_indent.py
106
from unittest import TestCase from pyutil import jsonutil as json import textwrap class TestIndent(TestCase): def test_indent(self): h = [['blorpie'], ['whoops'], [], 'd-shtaeou', 'd-nthiouh', 'i-vhbjkhnth', {'nifty': 87}, {'field': 'yes', 'morefield': False} ] expect = textwrap.dede...
goose3/goose
refs/heads/master
goose3/extractors/tweets.py
2
# -*- coding: utf-8 -*- """\ This is a python port of "Goose" orignialy licensed to Gravity.com under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Python port was written by Xavier Grangier for Recrutae Gravity.co...
vicky2135/lucious
refs/heads/master
oscar/lib/python2.7/site-packages/pip/_vendor/cachecontrol/_cmd.py
488
import logging from pip._vendor import requests from pip._vendor.cachecontrol.adapter import CacheControlAdapter from pip._vendor.cachecontrol.cache import DictCache from pip._vendor.cachecontrol.controller import logger from argparse import ArgumentParser def setup_logging(): logger.setLevel(logging.DEBUG) ...
odejesush/tensorflow
refs/heads/master
tensorflow/tensorboard/lib/python/json_util.py
83
# 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...
EFerriss/HydrogenCpx
refs/heads/master
HydrogenCpx/all_cpx_spectra_and_peakfits_in_one_pdf.py
1
# -*- coding: utf-8 -*- """ Created on Thu May 12 16:31:48 2016 @author: Ferriss Create a pdf with plots showing all baselines and resolved peaks for all spectra used to determine site-specific hydrogen diffusivities in the paper 'Site-specific hydrogen diffusion during clinopyroxene dehyration' by Ferriss et al. 20...
batxes/4c2vhic
refs/heads/master
Six_zebra_models/Six_zebra_models_final_output_0.1_-0.1_13000/mtx1_models/Six_zebra_models6022.py
4
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
vicky2135/lucious
refs/heads/master
oscar/lib/python2.7/site-packages/whoosh/columns.py
22
# Copyright 2012 Matt Chaput. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the...
LePastis/pyload
refs/heads/stable
module/plugins/hoster/GoogledriveCom.py
6
# -*- coding: utf-8 -* # # Test links: # https://drive.google.com/file/d/0B6RNTe4ygItBQm15RnJiTmMyckU/view?pli=1 import re import urlparse from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo from module.utils import html_unescape class GoogledriveCom(SimpleHoster): __name__ = "Goo...
flotre/Sick-Beard
refs/heads/development
lib/requests/packages/oauthlib/oauth1/rfc5849/signature.py
74
# -*- coding: utf-8 -*- from __future__ import absolute_import """ oauthlib.oauth1.rfc5849.signature ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module represents a direct implementation of `section 3.4`_ of the spec. Terminology: * Client: software interfacing with an OAuth API * Server: the API provider * Resource Ow...