repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
stonebig/winpython
refs/heads/master
winpython/_vendor/qtpy/tests/test_qtwebsockets.py
7
from __future__ import absolute_import import pytest from qtpy import PYQT5, PYSIDE2 @pytest.mark.skipif(not (PYQT5 or PYSIDE2), reason="Only available in Qt5 bindings") def test_qtwebsockets(): """Test the qtpy.QtWebSockets namespace""" from qtpy import QtWebSockets assert QtWebSockets.QMaskGenerator is...
eufarn7sp/egads-eufar
refs/heads/master
egads/thirdparty/quantities/constants/electron.py
4
# -*- coding: utf-8 -*- """ """ from __future__ import absolute_import from ._utils import _cd from ..unitquantity import UnitConstant e = elementary_charge = UnitConstant( 'elementary_charge', _cd('elementary charge'), symbol='e' ) elementary_charge_over_h = UnitConstant( 'elementary_charge_over_h',...
infobloxopen/infoblox-netmri
refs/heads/master
infoblox_netmri/api/broker/v2_7_0/adv_setting_option_broker.py
16
from ..broker import Broker class AdvSettingOptionBroker(Broker): controller = "adv_setting_options" def show(self, **kwargs): """Shows the details for the specified adv setting option. **Inputs** | ``api version min:`` None | ``api version max:`` None ...
balint256/gnuradio
refs/heads/master
gr-analog/python/analog/standard_squelch.py
58
# # Copyright 2005,2007,2012 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 ve...
ptoraskar/django
refs/heads/master
tests/auth_tests/test_auth_backends.py
200
from __future__ import unicode_literals from datetime import date from django.contrib.auth import ( BACKEND_SESSION_KEY, SESSION_KEY, authenticate, get_user, ) from django.contrib.auth.backends import ModelBackend from django.contrib.auth.hashers import MD5PasswordHasher from django.contrib.auth.models import Ano...
rodekruis/digidoc
refs/heads/master
node_modules/npm-check-updates/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py
526
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import filecmp import gyp.common import gyp.xcodeproj_file import errno import os import sys import posixpath import re import shutil import subprocess import temp...
Guneet-Dhillon/mxnet
refs/heads/master
python/mxnet/gluon/trainer.py
7
# 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...
msparapa/das
refs/heads/master
examples/Hypersonics/lazythings.py
1
from sympy.core import Symbol from sympy.functions import exp, sin, cos, tan from sympy.solvers import solve from das.legacy.Analytics.Mathematics import PoissonManifold from das.utils.keyboard import keyboard M = PoissonManifold(name='basic',coords=['h','theta','phi','v','gam','psi','lambda_h','lambda_theta','lambda...
zaolij/libaudioverse
refs/heads/master
bindings/python/examples/sim3d.py
1
#demonstrates how to use the 3d simulation. import libaudioverse import collections libaudioverse.initialize() sim = libaudioverse.Simulation() sim.set_output_device(-1) world = libaudioverse.EnvironmentNode(sim, "default") source = libaudioverse.SourceNode(sim, world) print "Enter a path to a sound file." filepath = ...
maleficarium/youtube-dl
refs/heads/master
youtube_dl/extractor/xtube.py
18
from __future__ import unicode_literals import itertools import re from .common import InfoExtractor from ..utils import ( int_or_none, orderedSet, parse_duration, sanitized_Request, str_to_int, ) class XTubeIE(InfoExtractor): _VALID_URL = r'''(?x) (?: ...
shoelzer/buildbot
refs/heads/master
master/buildbot/test/regressions/test_bad_change_properties_rows.py
10
# 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...
dorotan/pythontraining
refs/heads/master
env/Lib/site-packages/_pytest/doctest.py
19
""" discover and run doctests in modules and test files.""" from __future__ import absolute_import import traceback import pytest from _pytest._code.code import ExceptionInfo, ReprFileLocation, TerminalRepr from _pytest.fixtures import FixtureRequest DOCTEST_REPORT_CHOICE_NONE = 'none' DOCTEST_REPORT_CHOICE_CDIFF =...
CAES-Python/Coffee_maker
refs/heads/master
Keurig_K55/is_ready_to_brew.py
1
#!/usr/bin/python import RPi.GPIO as GPIO import time input = 2 GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) GPIO.setup(input, GPIO.IN, pull_up_down=GPIO.PUD_UP) # when the Keurig K55 is ready to brew is flashes # the brew button LEDs on and off each second # so read the LED state for 2 seconds to see # if it is ...
suda/micropython
refs/heads/master
tests/float/true_value.py
102
# Test true-ish value handling if not 0.0: print("float 0") if not 0+0j: print("complex 0")
ff94315/hiwifi-openwrt-HC5661-HC5761
refs/heads/master
staging_dir/host/lib/python2.7/lib-tk/Tkinter.py
18
"""Wrapper functions for Tcl/Tk. Tkinter provides classes which allow the display, positioning and control of widgets. Toplevel widgets are Tk and Toplevel. Other widgets are Frame, Label, Entry, Text, Canvas, Button, Radiobutton, Checkbutton, Scale, Listbox, Scrollbar, OptionMenu, Spinbox LabelFrame and PanedWindow. ...
lucafavatella/intellij-community
refs/heads/cli-wip
python/helpers/py3only/docutils/languages/__init__.py
170
# $Id: __init__.py 7648 2013-04-18 07:36:22Z milde $ # Author: David Goodger <[email protected]> # Copyright: This module has been placed in the public domain. # Internationalization details are documented in # <http://docutils.sf.net/docs/howto/i18n.html>. """ This package contains modules for language-dependent fe...
aioue/ansible
refs/heads/devel
lib/ansible/utils/listify.py
118
# (c) 2014 Michael DeHaan, <[email protected]> # # 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 ve...
JimCircadian/ansible
refs/heads/devel
lib/ansible/modules/network/aos/_aos_blueprint.py
55
#!/usr/bin/python # # (c) 2017 Apstra Inc, <[email protected]> # # 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 opt...
sarthakmeh03/django
refs/heads/master
tests/utils_tests/test_datastructures.py
7
""" Tests for stuff in django.utils.datastructures. """ import copy from django.test import SimpleTestCase from django.utils import six from django.utils.datastructures import ( DictWrapper, ImmutableList, MultiValueDict, MultiValueDictKeyError, OrderedSet, ) class OrderedSetTests(SimpleTestCase): def ...
cvegaj/ElectriCERT
refs/heads/master
venv3/lib/python3.6/site-packages/pkg_resources/_vendor/packaging/requirements.py
454
# 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 import string import re from pkg_resources.extern.pyparsing import string...
codebam/linux
refs/heads/master
scripts/analyze_suspend.py
171
#!/usr/bin/python # # Tool for analyzing suspend/resume timing # Copyright (c) 2013, Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # This prog...
Samuel789/MediPi
refs/heads/master
MedManagementWeb/env/lib/python3.5/site-packages/wheel/test/test_install.py
109
# Test wheel. # The file has the following contents: # hello.pyd # hello/hello.py # hello/__init__.py # test-1.0.data/data/hello.dat # test-1.0.data/headers/hello.dat # test-1.0.data/scripts/hello.sh # test-1.0.dist-info/WHEEL # test-1.0.dist-info/METADATA # test-1.0.dist-info/RECORD # The root is PLA...
SerialShadow/SickRage
refs/heads/master
lib/unrar2/unix.py
27
# Copyright (c) 2003-2005 Jimmy Retzlaff, 2008 Konstantin Yegupov # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy...
archf/ansible
refs/heads/devel
lib/ansible/plugins/connection/chroot.py
44
# Based on local.py (c) 2012, Michael DeHaan <[email protected]> # (c) 2013, Maykel Moya <[email protected]> # (c) 2015, Toshio Kuratomi <[email protected]> # # 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 ...
vibhorag/scikit-learn
refs/heads/master
examples/semi_supervised/plot_label_propagation_structure.py
247
""" ============================================== Label Propagation learning a complex structure ============================================== Example of LabelPropagation learning a complex internal structure to demonstrate "manifold learning". The outer circle should be labeled "red" and the inner circle "blue". Be...
circumstance/wimpy
refs/heads/master
wim.py
1
#!/usr/bin/python # This program 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 2.1 # of the License, or (at your option) any later version. # wim.py - gps / bluetooth listener communi...
openmv/micropython
refs/heads/master
tests/unicode/unicode_id.py
15
# test unicode in identifiers # comment # αβγδϵφζ # global identifiers α = 1 αβγ = 2 bβ = 3 βb = 4 print(α, αβγ, bβ, βb) # function, argument, local identifiers def α(β, γ): δ = β + γ print(β, γ, δ) α(1, 2) # class, method identifiers class φ: def __init__(self): pass def δ(self, ϵ): ...
egunnar/encrypt_backup
refs/heads/master
test.py
1
#!/usr/bin/python3 ''' Testing script for encrypt_backup.py ''' import unittest import os import subprocess import sys TMP_TESTING_DIR = None TMP_TESTING_SUB_DIR = None PASSWORD = 'testing123' DEBUG_MODE = False ENCRYPTED_FILE_EXT = '.gpg' class MyTest(unittest.TestCase): def setUp(self): rm_dir_tree(TM...
2bam/afe
refs/heads/master
machine_config.py
1
# Location specific import os import ctypes # NOTE: We use a false fullscreen because real fullscreen stays always-on-top, covering games faux_fullscreen = True if faux_fullscreen: window_size = dict(width=ctypes.windll.user32.GetSystemMetrics(0), height=ctypes.windll.user32.GetSystemMetrics(1)) #windows-only else...
yantrabuddhi/FreeCAD
refs/heads/master
src/Mod/PartDesign/InitGui.py
17
# PartDesign gui init module # (c) 2003 Juergen Riegel # # Gathering all the information to start FreeCAD # This is the second one of three init scripts, the third one # runs when the gui is up #*************************************************************************** #* (c) Juergen Riegel (juergen.riegel@...
xiandiancloud/edx-platform-Y
refs/heads/master
common/test/acceptance/pages/lms/matlab_problem.py
179
""" Matlab Problem Page. """ from bok_choy.page_object import PageObject class MatlabProblemPage(PageObject): """ View of matlab problem page. """ url = None def is_browser_on_page(self): return self.q(css='.ungraded-matlab-result').present @property def problem_name(self): ...
jayceyxc/hue
refs/heads/master
desktop/libs/dashboard/src/dashboard/models.py
1
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
dataxu/ansible
refs/heads/dx-stable-2.5
lib/ansible/utils/module_docs_fragments/dimensiondata.py
192
# -*- coding: utf-8 -*- # # Copyright (c) 2016 Dimension Data # # This module 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 ...
scapella/trimal
refs/heads/trimAl
scripts/get_sequence_representative_from_alignment.py
1
#!/usr/bin/python # # 'get_sequence_representative_from_alignment.py' # # Script implemented to work with trimAl to analyze gaps statistics and decide # which are the boundaries in a given alignment - columns inbetween these # boundaries will not be removed independently of the trimming strategy # selected. # ...
johnsonlau/multivimdriver-vmware-vio
refs/heads/master
vio/vio/pub/vim/drivers/vimsdk/image_v2.py
1
# Copyright (c) 2017 VMware, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
chafique-delli/OpenUpgrade
refs/heads/master
addons/sale/edi/__init__.py
454
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
sebastienc/kubernetes-py
refs/heads/master
kubernetes_py/models/v1/HostPathVolumeSource.py
3
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is subject to the terms and conditions defined in # file 'LICENSE.md', which is part of this source code package. # from kubernetes_py.utils import is_valid_string, filter_model class HostPathVolumeSource(object): """ http://kubernetes.io/docs/api-...
RanadeepPolavarapu/kuma
refs/heads/master
kuma/core/tests/logging_urls.py
10
from django.conf.urls import patterns, url def exception_raiser(request): raise Exception('Raising exception to test logging.') urlpatterns = patterns( '', url(r'^test_exception/$', exception_raiser, name='logging.exception_raiser'), )
jonfoster/pyxb1
refs/heads/master
pyxb/bundles/opengis/sos_1_0.py
6
from pyxb.bundles.opengis.raw.sos_1_0 import *
skg-net/ansible
refs/heads/devel
test/units/modules/network/f5/test_bigip_device_connectivity.py
22
# -*- coding: utf-8 -*- # # Copyright (c) 2017 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 import os import json import pytest import sys from nose.plugins.skip imp...
wujf/rethinkdb
refs/heads/next
test/interface/resources.py
29
#!/usr/bin/env python # Copyright 2010-2014 RethinkDB, all rights reserved. from __future__ import print_function import os, sys, time, urllib2 startTime = time.time() sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'common'))) import driver, scenario_common, utils, vcoptpars...
justinabrahms/django-gencal
refs/heads/master
example_project/bills/models.py
1
import datetime from django.db import models class Bill(models.Model): company = models.CharField(max_length=150) amount = models.DecimalField(decimal_places=2, max_digits=7) due_date = models.DateTimeField(default=datetime.datetime.now) def __unicode__(self): return "Owe $%d to %s on %s" % (s...
ducthien1490/youtube-dl
refs/heads/master
devscripts/prepare_manpage.py
105
from __future__ import unicode_literals import io import os.path import sys import re ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) README_FILE = os.path.join(ROOT_DIR, 'README.md') with io.open(README_FILE, encoding='utf-8') as f: readme = f.read() PREFIX = '''%YOUTUBE-DL(1) # NAME y...
cyanna/edx-platform
refs/heads/master
cms/djangoapps/contentstore/management/commands/clone_course.py
119
""" Script for cloning a course """ from django.core.management.base import BaseCommand, CommandError from xmodule.modulestore.django import modulestore from student.roles import CourseInstructorRole, CourseStaffRole from opaque_keys.edx.keys import CourseKey from opaque_keys import InvalidKeyError from opaque_keys.edx...
editrobot/new_editrobot
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py
899
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import collections import os import gyp import gyp.common import gyp.msvs_emulation import json import sys generator_supports_multiple_toolsets = True generator_...
ElDeveloper/qiime
refs/heads/master
scripts/sort_otu_table.py
15
#!/usr/bin/env python # File created on 15 Feb 2011 from __future__ import division __author__ = "Greg Caporaso" __copyright__ = "Copyright 2011, The QIIME Project" __credits__ = ["Greg Caporaso", "Daniel McDonald", "Emily TerAvest", "Yoshiki Vazquez Baeza"] __license__ = "GPL" __version__ = "1.9.1-dev"...
raschuetz/foundations-homework
refs/heads/master
07/data-analysis/lib/python3.5/site-packages/pip/_vendor/requests/models.py
148
# -*- coding: utf-8 -*- """ requests.models ~~~~~~~~~~~~~~~ This module contains the primary objects that power Requests. """ import collections import datetime from io import BytesIO, UnsupportedOperation from .hooks import default_hooks from .structures import CaseInsensitiveDict from .auth import HTTPBasicAuth ...
smallyear/linuxLearn
refs/heads/master
salt/salt/modules/linux_acl.py
1
# -*- coding: utf-8 -*- ''' Support for Linux File Access Control Lists ''' from __future__ import absolute_import # Import salt libs import salt.utils from salt.exceptions import CommandExecutionError # Define the module's virtual name __virtualname__ = 'acl' def __virtual__(): ''' Only load the module if ...
muccg/rdrf
refs/heads/next_release
rdrf/registry/genetic/migrations/0001_initial.py
1
# -*- coding: utf-8 -*- from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Gene', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_creat...
tblume/systemd-upstream
refs/heads/master
test/sysv-generator-test.py
9
#!/usr/bin/env python3 # SPDX-License-Identifier: LGPL-2.1+ # # systemd-sysv-generator integration test # # © 2015 Canonical Ltd. # Author: Martin Pitt <[email protected]> import collections import os import shutil import subprocess import sys import tempfile import unittest from configparser import RawConfigPar...
gnuhub/intellij-community
refs/heads/master
python/testData/copyPaste/singleLine/Indent23.dst.py
664
class C: def foo(self): <caret> y = 2
scality/cinder
refs/heads/master
cinder/openstack/common/scheduler/base_weight.py
18
# Copyright (c) 2011-2012 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 # # U...
luoxsbupt/ibus-pinyin
refs/heads/master
scripts/create_unique_index.py
4
import sqlite3 con2 = sqlite3.connect("py-new.db") con2.execute ("PRAGMA synchronous = NORMAL;") con2.execute ("PRAGMA temp_store = MEMORY;") con2.execute("CREATE UNIQUE INDEX IF NOT EXISTS index_0_0 ON py_phrase_0(s0, y0, phrase)") print "py_phrase_%d done" % 0 con2.execute("CREATE UNIQUE INDEX IF NOT EXISTS index...
melgor/melgor.github.io
refs/heads/master
node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/filters/__init__.py
196
# -*- coding: utf-8 -*- """ pygments.filters ~~~~~~~~~~~~~~~~ Module containing filter lookup functions and default filters. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.token import String, Comment, Ke...
GdZ/scriptfile
refs/heads/master
software/googleAppEngine/lib/PyAMF/pyamf/tests/adapters/test_django.py
25
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ PyAMF Django adapter tests. @since: 0.3.1 """ import unittest import sys import os import datetime import pyamf from pyamf.tests import util try: import django except ImportError: django = None if django and django.VERSION < (1, 0): ...
CoDEmanX/ArangoDB
refs/heads/devel
3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/win32comext/axscript/server/axsite.py
17
import string import win32com.axscript.axscript import winerror from win32com.axscript import axscript from win32com.server import exception, util import pythoncom class AXEngine: def __init__(self, site, engine): self.eScript = self.eParse = self.eSafety = None if type(engine) == type(''): engine = py...
Prasad9/incubator-mxnet
refs/heads/master
example/neural-style/find_mxnet.py
52
# 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...
Maccimo/intellij-community
refs/heads/master
python/testData/refactoring/move/baseClass/before/src/a.py
83
class B(object): def __init__(self): pass class C(B): def __init__(self): super(C, self).__init__()
alexandermendes/pybossa-gravatar
refs/heads/master
tests/test_plugin.py
1
# -*- coding: utf8 -*- import os import hashlib import pybossa_gravatar from mock import patch, MagicMock from factories import UserFactory from default import Test, with_context from helper import web class TestEventListener(Test): @with_context @patch('pybossa_gravatar.event_listeners.gravatar.set', retur...
gangadhar-kadam/latestchurcherp
refs/heads/v5.0
erpnext/manufacturing/doctype/bom/test_bom.py
5
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import unittest import frappe from frappe.utils import cstr test_records = frappe.get_test_records('BOM') class TestBOM(unittest.TestCase): def test...
m1ck/bookadoptions
refs/heads/master
django/contrib/staticfiles/storage.py
154
import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.files.storage import FileSystemStorage from django.utils.importlib import import_module from django.contrib.staticfiles import utils class StaticFilesStorage(FileSystemStorage): """ Standard fi...
zooba/PTVS
refs/heads/master
Python/Tests/TestData/Grammar/MatMulOperator.py
7
1 @ 2
CVML/scikit-learn
refs/heads/master
sklearn/cluster/tests/test_dbscan.py
114
""" Tests for DBSCAN clustering algorithm """ import pickle import numpy as np from scipy.spatial import distance from scipy import sparse from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_raises from sklearn.utils.testing im...
Zhongqilong/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/test/test_gzip.py
75
"""Test script for the gzip module. """ import unittest from test import support import os import io import struct gzip = support.import_module('gzip') data1 = b""" int length=DEFAULTALLOC, err = Z_OK; PyObject *RetVal; int flushmode = Z_FINISH; unsigned long start_total_out; """ data2 = b"""/* zlibmodule.c ...
lokeshjindal15/pd-gem5
refs/heads/master
configs/common/cpu2000.py
48
# Copyright (c) 2006-2008 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 ...
towerjoo/DjangoNotes
refs/heads/master
Django-1.5.1/tests/regressiontests/app_loading/not_installed/models.py
163
from django.db import models class NotInstalledModel(models.Model): pass class RelatedModel(models.Model): not_installed = models.ForeignKey(NotInstalledModel) class M2MRelatedModel(models.Model): not_installed = models.ManyToManyField(NotInstalledModel)
dsfsdgsbngfggb/odoo
refs/heads/8.0
addons/l10n_be_coda/wizard/account_coda_import.py
255
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2012 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under ...
agincel/AdamTestBot
refs/heads/master
requests/cookies.py
2
# -*- coding: utf-8 -*- """ Compatibility code to be able to use `cookielib.CookieJar` with requests. requests.utils imports from here, so be careful with imports. """ import copy import time import collections from .compat import cookielib, urlparse, urlunparse, Morsel try: import threading ...
MIPS/external-chromium_org
refs/heads/dev-mips-jb-kitkat
gpu/command_buffer/build_gles2_cmd_buffer.py
23
#!/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. """code generator for GLES2 command buffers.""" import itertools import os import os.path import sys import re from optparse impor...
evernym/plenum
refs/heads/master
plenum/test/replica/conftest.py
2
import pytest from orderedset._orderedset import OrderedSet from plenum.common.event_bus import InternalBus from plenum.common.messages.node_messages import PrePrepare from plenum.common.startable import Mode from plenum.common.constants import POOL_LEDGER_ID, DOMAIN_LEDGER_ID, CURRENT_PROTOCOL_VERSION, AUDIT_LEDGER_I...
nive/nive_cms
refs/heads/master
nive_cms/tests/test_app.py
1
# -*- coding: utf-8 -*- import unittest from nive.workflow import WorkflowNotAllowed from nive.security import Allow, Deny, Authenticated, Everyone, User from nive_cms.tests.db_app import * from nive_cms.tests import __local class ObjectTest_db(object): """ Actual test classes are subclassed for db system ...
rajkotecha/origin
refs/heads/master
rel-eng/lib/origin/tagger/__init__.py
36
""" Code for tagging Origin packages """ import os import re import rpm import shutil import subprocess import tempfile import textwrap import sys from tito.common import (get_latest_commit, run_command, get_latest_tagged_version, increase_version, increase_zstream, get_spec_version_and_release, tag_e...
gilestrolab/ethoscope
refs/heads/master
src/ethoscope/web_utils/helpers.py
1
import random import logging import traceback import datetime, time import os import re from uuid import uuid4 def pi_version(): """ Detect the version of the Raspberry Pi. https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md We used to use cat /proc/cpuinfo but ...
vorlock/ansible-modules-core
refs/heads/devel
network/basics/slurp.py
59
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <[email protected]> # # 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...
robwarm/gpaw-symm
refs/heads/master
gpaw/test/h2o_xas.py
1
import os import numpy as np from math import pi, cos, sin from ase import Atom, Atoms from ase.parallel import rank, barrier from gpaw import GPAW from gpaw.xas import XAS from gpaw.test import equal, gen # Generate setup for oxygen with half a core-hole: gen('O', name='hch1s', corehole=(1, 0, 0.5)) a = 5.0 d = 0.95...
MediaMath/Diamond
refs/heads/master
src/collectors/supervisord/supervisord.py
1
# coding=utf-8 """ Custom collector for supervisord process control system (github.com/Supervisor/supervisor) Supervisor runs an XML-RPC server, which this collector uses to gather a few basic stats on each registered process. #### Dependencies * xmlrpclib * supervisor * diamond #### Usage Configure supervisor...
mrtyler/ansible-role-influxdb
refs/heads/master
tests/test_default.py
2
from pytest import fixture import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( '.molecule/ansible_inventory').get_hosts('all') # Adapted from # http://www.axelspringerideas.de/blog/index.php/2016/08/16/continuously-delivering-infrastructure-part-1-ansible-molecu...
natanielruiz/android-yolo
refs/heads/master
jni-build/jni/include/tensorflow/python/client/timeline_test.py
20
# 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...
murrayrm/python-control
refs/heads/master
control/matlab/timeresp.py
2
""" Time response routines in the Matlab compatibility package Note that the return arguments are different than in the standard control package. """ __all__ = ['step', 'stepinfo', 'impulse', 'initial', 'lsim'] def step(sys, T=None, X0=0., input=0, output=None, return_x=False): ''' Step response of a linear ...
Gillu13/scipy
refs/heads/master
scipy/weave/inline_tools.py
97
# should re-write compiled functions to take a local and global dict # as input. from __future__ import absolute_import, print_function import sys import os from . import ext_tools from . import catalog from . import common_info from numpy.core.multiarray import _get_ndarray_c_version ndarray_api_version = '/* NDARRA...
iambibhas/django
refs/heads/master
tests/i18n/exclude/__init__.py
428
# This package is used to test the --exclude option of # the makemessages and compilemessages management commands. # The locale directory for this app is generated automatically # by the test cases. from django.utils.translation import ugettext as _ # Translators: This comment should be extracted dummy1 = _("This is ...
yongshengwang/builthue
refs/heads/master
desktop/core/ext-py/httplib2-0.8/python2/httplib2test_appengine.py
59
""" httplib2test_appengine A set of unit tests for httplib2.py on Google App Engine """ __author__ = "Joe Gregorio ([email protected])" __copyright__ = "Copyright 2011, Joe Gregorio" import os import sys import unittest # The test resources base uri base = 'http://bitworking.org/projects/httplib2/test/' #base = '...
snnn/tensorflow
refs/heads/master
tensorflow/python/training/coordinator.py
34
# 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...
kaiix/depot_tools
refs/heads/master
third_party/gsutil/gslib/project_id.py
51
# Copyright 2011 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 a...
patrickcurl/ztruck
refs/heads/master
dj/lib/python2.7/site-packages/django/contrib/gis/geos/polygon.py
450
from ctypes import byref, c_uint from django.contrib.gis.geos import prototypes as capi from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gis.geos.libgeos import GEOM_PTR, get_pointer_arr from django.contrib.gis.geos.linestring import LinearRing from django.utils import six from django.util...
Duroktar/Kuai
refs/heads/master
kuai/backends/__init__.py
1
import os from functools import partial from pluginbase import PluginBase from kuai.helpers import WeakCallback, Singleton, singleton_object here = os.path.abspath(os.path.dirname(__file__)) get_path = partial(os.path.join, here) plugin_base = PluginBase(package='kuai.plugins') # ----------------------------------...
lexor90/node-compiler
refs/heads/master
node/deps/v8/tools/testrunner/server/local_handler.py
123
# Copyright 2012 the V8 project authors. 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 conditi...
eptmp3/Sick-Beard
refs/heads/development
lib/requests/packages/chardet2/gb2312freq.py
323
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
icomms/rapidsms
refs/heads/master
apps/injector/app.py
8
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import rapidsms import re class App(rapidsms.app.App): """This app allows callers to send in messages on behalf of other callers - even across different backends. This is most useful when RapidSMS explodes, and drops important messages. Rather ...
mcflugen/topoflow
refs/heads/master
topoflow/components/erode_base.py
2
## Copyright (c) 2001-2013, Scott D. Peckham ## ## Jan 2013. Fixed bug in create_initial_DEM() (PLANE option) ## Jan 2009 (converted from IDL) ## September, October, November 2009 ## February 2010 (local time-stepping) ## August 2010 (updated to use new model_output, conventions, etc.) ## Sep to Nov 2011 (mi...
TeamTwisted/external_chromium_org
refs/heads/opti-5.1
build/android/pylib/utils/json_results_generator.py
36
# 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. # # Most of this file was ported over from Blink's # Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py # Tools/Scripts/webkitpy/co...
sdh100shaun/mongo-connector
refs/heads/master
tests/test_mongo_connector.py
1
# Copyright 2012 10gen, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, soft...
jonathan-besanceney/Transition
refs/heads/dev
docapp/appskell.py
1
# ------------------------------------------------------------------------------ # Name: app_skell # Purpose: Define a standard way to replace VBA in Excel Workbooks by an # external COM application launched by Transition Excel/COM Add-in. # # Author: Jonathan Besanceney <jonathan.besance...
raymondxyang/tensorflow
refs/heads/master
tensorflow/python/grappler/cost_analyzer_tool.py
47
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
smart-solution/odoo-accounting-80
refs/heads/master
account_multi_analytic/__init__.py
1
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today Acespritech Solutions Pvt Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
uclouvain/osis_louvain
refs/heads/master
attribution/migrations/0003_auto_20161215_1420.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-12-15 13:20 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): dependencies = [ ('base', '0083_auto_20161215_1414'), ('attri...
amith01994/intellij-community
refs/heads/master
python/testData/copyPaste/singleLine/Indent33.dst.py
664
class C: def foo(self): <caret> y = 2
leopardhs/ns3_sdn
refs/heads/master
.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Tools/asm.py
10
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file from waflib import Task import waflib.Task from waflib.Tools.ccroot import link_task,stlink_task from waflib.TaskGen import extension class asm(Task.Task): color='BLUE' run_str='${AS} ${ASFLAGS} ${...
skuda/client-python
refs/heads/master
kubernetes/test/test_v1_service_port.py
1
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.6.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys im...
chouseknecht/ansible
refs/heads/devel
lib/ansible/module_utils/parsing/convert_bool.py
118
# Copyright: 2017, Ansible Project # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause ) from ansible.module_utils.six import binary_type, text_type from ansible.module_utils._text import to_text BOOLEANS_TRUE = frozenset(('y', 'yes', 'on', '1', 'true', 't', 1, 1...