repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
luistorresm/odoo
refs/heads/8.0
addons/stock_invoice_directly/stock_invoice_directly.py
337
# -*- 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...
nangia/django-allauth
refs/heads/master
allauth/socialaccount/providers/stackexchange/models.py
4209
# Create your models here.
uberamd/NGECore2
refs/heads/master
scripts/object/ship/hutt_transport_tier4.py
85615
import sys def setup(core, object): return
uberamd/NGECore2
refs/heads/master
scripts/object/building/player/construction/construction_player_guildhall_corellia_style_01.py
85615
import sys def setup(core, object): return
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/mobile/lifeday_monkey_lizard_2.py
85615
import sys def setup(core, object): return
wmvanvliet/mne-python
refs/heads/master
tutorials/io/plot_20_reading_eeg_data.py
4
# -*- coding: utf-8 -*- r""" .. _tut-imorting-eeg-data: =============================== Importing data from EEG devices =============================== MNE includes various functions and utilities for reading EEG data and electrode locations. .. _import-bv: BrainVision (.vhdr, .vmrk, .eeg) =========================...
jabesq/home-assistant
refs/heads/dev
homeassistant/components/openuv/sensor.py
7
"""Support for OpenUV sensors.""" import logging from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.util.dt import as_local, parse_datetime from . import ( DATA_OPENUV_CLIENT, DATA_UV, DOMAIN, SENSORS, TOPIC_UPDATE, TYPE_CURRENT_OZO...
benoitsteiner/tensorflow
refs/heads/master
tensorflow/contrib/framework/__init__.py
37
# 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...
cyberphox/MissionPlanner
refs/heads/master
Lib/site-packages/scipy/fftpack/setupscons.py
51
#!"C:\Users\hog\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\bin\Debug\ipy.exe" # Created by Pearu Peterson, August 2002 from os.path import join def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration from numpy.distutils.system_info import...
indictranstech/vestasi-erpnext
refs/heads/develop
erpnext/tasks.py
36
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.celery_app import celery_task, task_logger @celery_task() def send_newsletter(site, newsletter, event): # hack! pass event="bulk_long" to queue in l...
lindamar/ecclesi
refs/heads/master
env/lib/python2.7/site-packages/sqlalchemy/engine/base.py
11
# engine/base.py # Copyright (C) 2005-2016 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from __future__ import with_statement """Defines :class:`.Connection` and :class:`.En...
dzil123/minesweeper
refs/heads/master
minesweeper_ui.py
1
#!/usr/bin/python3 from minesweeper import * import minesweeper from tkinter import * #from enum import Enum #import random import threading import queue #class GameThread(threading.Thread, Player): class GameThread(Player): def __init__(self): #threading.Thread.__init__(self, args=a, kwargs=k) super().__init__(...
tpsatish95/Python-Workshop
refs/heads/master
Python Environment Setup/Alternate/1. Python/1. Installer/Python-3.4.0(Linux)/Tools/scripts/reindent.py
50
#! /usr/bin/env python3 # Released to the public domain, by Tim Peters, 03 October 2000. """reindent [-d][-r][-v] [ path ... ] -d (--dryrun) Dry run. Analyze, but don't make any changes to, files. -r (--recurse) Recurse. Search for all .py files in subdirectories too. -n (--nobackup) No backup. Does not make ...
Honzin/ccs
refs/heads/master
tests/testApi/testPublic/testBtccusd/testOrderbook.py
1
# -*- coding: utf8 -*- """ This file implements test cases for validation communication with REST endpoint on Btcc-spot. This endpoint offer informations about orderbook. """ __author__ = "Jan Seda" __copyright__ = "Copyright (C) Jan Seda" __credits__ = [] __license__ = "" __version__ = "0.1" __maintainer__ = "Jan Se...
sauli6692/ibc-server
refs/heads/master
rte/serializers/__init__.py
2
from .route import * # noqa from .collaborator import * # noqa from .harvest import * # noqa from .visit import * # noqa
indhub/mxnet
refs/heads/master
tests/python-pytest/onnx/import/test_cases.py
4
# 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...
greenlaw110/play-greenscript
refs/heads/master
commands.py
1
# GreenScript # ~~~~~~~~~~~~~~~~~~~~~~ [greenscript:cp] Copy tags or templates try: play_command except NameError: play_command = None if play_command is None: # ~~~~~~~~~~~~~~~~~~~~~ running on v1.1 import getopt from play.utils import * COMMANDS = ['greenscript:cp', 'greenscript:copy'] ...
jiaphuan/models
refs/heads/master
research/syntaxnet/dragnn/tools/conll_checkpoint_converter.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 a...
noplay/aiohttp
refs/heads/master
tests/test_client_functional.py
2
"""Http client functional tests.""" import binascii import gc import io import os.path import json import http.cookies import asyncio import unittest from unittest import mock import aiohttp from aiohttp import client from aiohttp import test_utils from aiohttp.multidict import MultiDict class HttpClientFunctionalT...
liumeixia/xiaworkspace
refs/heads/master
pythonProject/automate/crmtest/testexcle.py
1
#-*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.keys import Keys
Shaswat27/scipy
refs/heads/master
scipy/special/tests/test_lambertw.py
123
# # Tests for the lambertw function, # Adapted from the MPMath tests [1] by Yosef Meller, mellerf@netvision.net.il # Distributed under the same license as SciPy itself. # # [1] mpmath source code, Subversion revision 992 # http://code.google.com/p/mpmath/source/browse/trunk/mpmath/tests/test_functions2.py?spec=svn9...
campagnola/acq4
refs/heads/develop
acq4/analysis/scripts/pspFitTest.py
3
from __future__ import print_function import scipy.optimize as opt import scipy.weave import numpy as np import os, sys, user, time from six.moves import range path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'util')) sys.path.append(path) import acq4.pyqtgraph as pg import acq4.util.functio...
openstack/python-openstacksdk
refs/heads/master
openstack/tests/functional/baremetal/test_baremetal_port.py
2
# 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 # distributed under t...
shahbazn/neutron
refs/heads/master
neutron/extensions/securitygroup.py
17
# Copyright (c) 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 # # Unless...
pizzathief/scipy
refs/heads/master
scipy/sparse/tests/test_matrix_io.py
9
import os import numpy as np import tempfile from pytest import raises as assert_raises from numpy.testing import assert_equal, assert_ from scipy.sparse import (csc_matrix, csr_matrix, bsr_matrix, dia_matrix, coo_matrix, save_npz, load_npz, dok_matrix) DATA_DIR = os.path.join(os.path.dirn...
Microsoft/PTVS
refs/heads/master
Python/Product/Miniconda/Miniconda3-x64/Lib/idlelib/runscript.py
3
"""Execute code from an editor. Check module: do a full syntax check of the current module. Also run the tabnanny to catch any inconsistent tabs. Run module: also execute the module's code in the __main__ namespace. The window must have been saved previously. The module is added to sys.modules, and is also added to t...
cdgriffith/Reusables
refs/heads/master
reusables/shared_variables.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Part of the Reusables package. # # Copyright (c) 2014-2020 - Chris Griffith - MIT License from __future__ import absolute_import import re as _re import os as _os import sys as _sys import tempfile as _tempfile from reusables.namespace import Namespace python_version ...
mdworks2016/work_development
refs/heads/master
Python/20_Third_Certification/venv/lib/python3.7/site-packages/celery/bin/celery.py
1
# -*- coding: utf-8 -*- """The :program:`celery` umbrella command. .. program:: celery .. _preload-options: Preload Options --------------- These options are supported by all commands, and usually parsed before command-specific arguments. .. cmdoption:: -A, --app app instance to use (e.g., ``module.attr_name`...
noelbk/neutron-juniper
refs/heads/master
neutron/plugins/nicira/common/sync.py
1
# Copyright 2013 Nicira, 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 a...
openbermuda/karmapi
refs/heads/master
karmapi/noddy.py
1
""" Noddy ===== Something playful. A place to try something, see what happens. Keep it short, go back in time. """ import sys import argparse import pandas from karmapi import pigfarm, toy class Magic(pigfarm.MagicCarpet): async def tester(self, sleep=2): print('NUMBER OF TESTS', self.tests) ...
aragos/tichu-tournament
refs/heads/master
python/reportlab/pdfbase/_fontdata_widths_courierbold.py
224
widths = {'A': 600, 'AE': 600, 'Aacute': 600, 'Acircumflex': 600, 'Adieresis': 600, 'Agrave': 600, 'Aring': 600, 'Atilde': 600, 'B': 600, 'C': 600, 'Ccedilla': 600, 'D': 600, 'E': 600, 'Eacute': 600, 'Ecircumflex': 600, 'Edieresis': 600, 'Egrave': 600, 'Eth': 600, 'Euro': 600, 'F': 600, 'G': 600, '...
monikagrabowska/osf.io
refs/heads/develop
addons/dataverse/tests/test_serializer.py
32
# -*- coding: utf-8 -*- from nose.tools import * # noqa import mock import pytest from addons.base.tests.serializers import OAuthAddonSerializerTestSuiteMixin from addons.dataverse.tests.utils import create_mock_connection from addons.dataverse.models import DataverseProvider from addons.dataverse.tests.factories im...
wuhengzhi/chromium-crosswalk
refs/heads/master
third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/win.py
3
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
thiriel/maps
refs/heads/master
django/core/management/commands/syncdb.py
161
from optparse import make_option import sys from django.conf import settings from django.core.management.base import NoArgsCommand from django.core.management.color import no_style from django.core.management.sql import custom_sql_for_model, emit_post_sync_signal from django.db import connections, router, transaction,...
DazWorrall/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/ec2_key.py
12
#!/usr/bin/python # -*- coding: utf-8 -*- # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # ...
MQQiang/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/test/test_optparse.py
86
# # Test suite for Optik. Supplied by Johannes Gijsbers # (taradino@softhome.net) -- translated from the original Optik # test suite to this PyUnit-based version. # # $Id$ # import sys import os import re import copy import unittest from io import StringIO from test import support from optparse import make_option,...
nuuuboo/odoo
refs/heads/8.0
addons/note_pad/note_pad.py
441
# -*- 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...
greenfire27/Torque2D
refs/heads/master
engine/source/testing/googleTest/test/gtest_test_utils.py
397
#!/usr/bin/env python # # Copyright 2006, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
shuishoudage/CloudappCLI
refs/heads/master
env/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py
152
from __future__ import absolute_import from contextlib import contextmanager import zlib import io from socket import timeout as SocketTimeout from socket import error as SocketError from ._collections import HTTPHeaderDict from .exceptions import ( ProtocolError, DecodeError, ReadTimeoutError, ResponseNotChunked ...
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/mobile/boba_fett.py
2
import sys from resources.datatables import Options def setup(core, object): #object.setAttachment('radial_filename', 'object/conversation'); #object.setAttachment('conversationFile','junk_dealer') object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) object.setStfFilename('mob/creature_names') obj...
dimdung/boto
refs/heads/develop
tests/integration/configservice/test_configservice.py
93
# Copyright (c) 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights ...
qrkourier/ansible
refs/heads/devel
lib/ansible/modules/windows/win_power_plan.py
42
#!/usr/bin/python # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = ''' --- modul...
FredLoney/nipype
refs/heads/master
nipype/workflows/__init__.py
156
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et:
kawamon/hue
refs/heads/master
desktop/core/ext-py/repoze.who-2.3/repoze/who/plugins/tests/test_redirector.py
2
import unittest class TestRedirectorPlugin(unittest.TestCase): def _getTargetClass(self): from repoze.who.plugins.redirector import RedirectorPlugin return RedirectorPlugin def _makeOne(self, login_url='http://example.com/login.html', came_from_param=None, ...
DasIch/django
refs/heads/master
tests/apps/models.py
380
from __future__ import unicode_literals from django.apps.registry import Apps from django.db import models # We're testing app registry presence on load, so this is handy. new_apps = Apps(['apps']) class TotallyNormal(models.Model): name = models.CharField(max_length=255) class SoAlternative(models.Model): ...
jianjunz/online-judge-solutions
refs/heads/master
leetcode/1637-string-compression-ii.py
2
class Solution: def getLengthOfOptimalCompression(self, s: str, k: int) -> int: @lru_cache(maxsize=None) def compress(index, last, lastCount, left): if left<0: return sys.maxsize if index>=len(s): return 0 if s[index]==last:...
geoffkilpin/pombola
refs/heads/master
pombola/kenya/management/commands/kenya_hansard_speech_statistics.py
4
from collections import defaultdict import csv from dateutil import parser from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django.db.models import Count from pombola.core.models import Person from pombola.hansard.models import Entry, Venue class MultipleMembers...
mpalomer/micropython
refs/heads/master
tests/basics/string_format_modulo.py
47
print("%%" % ()) print("=%s=" % 1) print("=%s=%s=" % (1, 2)) print("=%s=" % (1,)) print("=%s=" % [1, 2]) print("=%s=" % "str") print("=%r=" % "str") try: print("=%s=%s=" % 1) except TypeError: print("TypeError") try: print("=%s=%s=%s=" % (1, 2)) except TypeError: print("TypeError") try: print("=...
SteveHNH/ansible
refs/heads/devel
contrib/inventory/ec2.py
12
#!/usr/bin/env python ''' EC2 external inventory script ================================= Generates inventory that Ansible can understand by making API request to AWS EC2 using the Boto library. NOTE: This script assumes Ansible is being executed where the environment variables needed for Boto have already been set:...
sprintingdev/CloudBot
refs/heads/master
cloudbot/util/database.py
28
""" database - contains variables set by cloudbot to be easily access """ # this is assigned in the CloudBot so that its recreated when the bot restarts metadata = None base = None
ttm/oscEmRede
refs/heads/master
venv/lib/python2.7/site-packages/requests/packages/chardet/mbcssm.py
982
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org 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 Reserved. # # Con...
giaosudau/caravel
refs/heads/master
caravel/ascii_art.py
8
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals error = ( "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM\n"+ "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM...
Datera/cinder
refs/heads/datera_queens_backport
cinder/zonemanager/drivers/brocade/brcd_fc_zone_driver.py
4
# (c) Copyright 2016 Brocade Communications Systems 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/LICEN...
sgraham/nope
refs/heads/master
tools/gyp/test/toolsets/gyptest-toolsets.py
262
#!/usr/bin/env python # Copyright (c) 2009 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. """ Verifies that toolsets are correctly applied """ import os import sys import TestGyp if sys.platform.startswith('linux'): test = Tes...
JPFrancoia/scikit-learn
refs/heads/master
sklearn/feature_selection/mutual_info_.py
25
# Author: Nikolay Mayorov <n59_ru@hotmail.com> # License: 3-clause BSD from __future__ import division import numpy as np from scipy.sparse import issparse from scipy.special import digamma from ..externals.six import moves from ..metrics.cluster.supervised import mutual_info_score from ..neighbors import NearestNeig...
jotes/moto
refs/heads/master
moto/ec2/responses/virtual_private_gateways.py
14
from __future__ import unicode_literals from moto.core.responses import BaseResponse from moto.ec2.utils import filters_from_querystring class VirtualPrivateGateways(BaseResponse): def attach_vpn_gateway(self): vpn_gateway_id = self.querystring.get('VpnGatewayId')[0] vpc_id = self.querystring.get(...
MarcJoan/django
refs/heads/master
tests/i18n/patterns/urls/default.py
384
from django.conf.urls import include, url from django.conf.urls.i18n import i18n_patterns from django.utils.translation import ugettext_lazy as _ from django.views.generic import TemplateView view = TemplateView.as_view(template_name='dummy.html') urlpatterns = [ url(r'^not-prefixed/$', view, name='not-prefixed')...
scottrice/Ice
refs/heads/master
ice/__init__.py
3
#!/usr/bin/env python # encoding: utf-8 """ __init__.py Created by Scott on 2012-12-26. Copyright (c) 2012 Scott Rice. All rights reserved. """
OnroerendErfgoed/skosprovider_getty
refs/heads/master
skosprovider_getty/providers.py
1
# -*- coding: utf-8 -*- ''' This module contains classes that implement :class:`skosprovider.providers.VocabularyProvider` against the LOD version of the Getty Vocabularies (AAT, TGN and ULAN). .. note:: | At initialisation, the Getty providers will search which gvp-classes of the gvp-ontology are a subclass of sk...
kevinpetersavage/BOUT-dev
refs/heads/master
tools/pylib/boutdata/collect.py
3
from __future__ import print_function from __future__ import division try: from builtins import str except: print("Warning: No str in builtins") try: from builtins import range except: print("Warning: No range in builtins") # Requires: # - boututils # - NumPy try: from boututils.datafile import...
rbiswas4/AnalyzeSN
refs/heads/master
analyzeSN/__init__.py
1
from __future__ import absolute_import import os from .version import __version__ try: from . import filters except: print('This requires a THROUGHPUTS directory to be setup as an env var\n') print('This may be achieved, for example, by setting up the LSST stack\n') print('or by cloning the throughputs ...
GbalsaC/bitnamiP
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/requests/adapters.py
205
# -*- coding: utf-8 -*- """ requests.adapters ~~~~~~~~~~~~~~~~~ This module contains the transport adapters that Requests uses to define and maintain connections. """ import socket from .models import Response from .packages.urllib3 import Retry from .packages.urllib3.poolmanager import PoolManager, proxy_from_url ...
legendmohe/LEHome
refs/heads/master
vendor/baidu_push/lib/ChannelException.py
4
#!/usr/bin/python class ChannelException(Exception): def __init__(self, error_msg, error_code): self.error_msg = error_msg self.error_code = error_code
kevin8909/xjerp
refs/heads/master
openerp/addons/l10n_ar/__init__.py
2120
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2011 Cubic ERP - Teradata SAC. (http://cubicerp.com). # # WARNING: This program as such is intended to be used by professional # programmers who take t...
deepchem/deepchem
refs/heads/master
examples/low_data/tox_rf_one_fold.py
9
""" Train low-data Tox21 models with random forests. Test last fold only. """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals import tempfile import numpy as np import deepchem as dc from datasets import load_tox21_ecfp from sklearn.ensemble import RandomFo...
Sorsly/subtle
refs/heads/master
google-cloud-sdk/platform/gsutil/third_party/boto/boto/cloudfront/logging.py
219
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # 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, modi...
migasfree/migasfree
refs/heads/master
migasfree/server/views/autocomplete.py
1
# -*- coding: utf-8 -*- from django.db.models import Q from django.contrib.auth.models import Group from django.conf import settings from dal import autocomplete from ..models import ( Computer, Attribute, UserProfile, Domain, Device, DeviceConnection, DeviceModel, DeviceLogical, ) class AutocompleteModelB...
h3biomed/ansible
refs/heads/h3
test/units/module_utils/xenserver/test_xenserverobject.py
14
# -*- coding: utf-8 -*- # # Copyright: (c) 2019, Bojan Vitnik <bvitnik@mainstream.rs> # 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 pytest from .FakeAnsibleModule import FakeAn...
smmribeiro/intellij-community
refs/heads/master
python/testData/override/classmethod_after.py
83
class A: @classmethod def foo(cls): cls.k = 3 class B(A): @classmethod def foo(cls): <selection>A.foo(cls)</selection>
stvstnfrd/edx-platform
refs/heads/master
cms/djangoapps/api/v1/serializers/course_runs.py
1
""" Course run serializers. """ import logging import time # pylint: disable=unused-import import six from django.contrib.auth import get_user_model from django.db import transaction from django.utils.translation import ugettext_lazy as _ from opaque_keys import InvalidKeyError from rest_framework import serializer...
TomFaulkner/SenseMe
refs/heads/master
senseme/lib/__init__.py
1
from .background_monitor import BackgroundLoop from .mwt import MWT __all__ = ["MWT", "BackgroundLoop"]
zlsun/XX-Net
refs/heads/master
code/default/gae_proxy/server/lib/google/appengine/ext/__init__.py
1333
#!/usr/bin/env python # # Copyright 2007 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
jswanljung/iris
refs/heads/master
lib/iris/tests/unit/analysis/maths/test_subtract.py
11
# (C) British Crown Copyright 2014 - 2015, Met Office # # This file is part of Iris. # # Iris 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, or # (at your option) any l...
Godiyos/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/lib2to3/fixes/__init__.py
2547
# Dummy file to make this directory a package.
natgolov/electron
refs/heads/master
tools/coffee2asar.py
150
#!/usr/bin/env python import os import shutil import subprocess import sys import tempfile SOURCE_ROOT = os.path.dirname(os.path.dirname(__file__)) def main(): archive = sys.argv[1] coffee_source_files = sys.argv[2:] output_dir = tempfile.mkdtemp() compile_coffee(coffee_source_files, output_dir) call_as...
asm-products/nested-communities-core
refs/heads/master
volunteering/migrations/0028_auto_20140807_0801.py
2
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('volunteering', '0027_auto_20140806_1906'), ] operations = [ migrations.AddField( model_name='sendable', ...
BeDjango/intef-openedx
refs/heads/master
lms/djangoapps/instructor/tests/test_services.py
39
""" Tests for the InstructorService """ import json from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory from courseware.models import StudentModule from instructor.access import allow_access from instructor.services import Instructo...
dhermes/google-cloud-python
refs/heads/master
dlp/google/cloud/dlp.py
2
# -*- coding: utf-8 -*- # # Copyright 2018 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
encukou/cython
refs/heads/master
Cython/Tempita/_looper.py
136
""" Helper for looping over sequences, particular in templates. Often in a loop in a template it's handy to know what's next up, previously up, if this is the first or last item in the sequence, etc. These can be awkward to manage in a normal Python loop, but using the looper you can get a better sense of the context....
GauravSahu/odoo
refs/heads/8.0
addons/hr_holidays/__openerp__.py
260
# -*- 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...
AcademicsToday/py-academicstoday
refs/heads/master
academicstoday_project/landpage/tests/test_txt.py
3
from django.core.urlresolvers import resolve from django.http import HttpRequest from django.http import QueryDict from django.test import TestCase from django.test import Client from django.contrib.auth.models import User from django.contrib.auth import authenticate, login, logout from landpage.views import txt import...
axinging/chromium-crosswalk
refs/heads/master
tools/perf/page_sets/polymer.py
33
# 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. from telemetry.page import page as page_module from telemetry.page import shared_page_state from telemetry import story class PolymerPage(page_module.Page):...
Ensembles/ert
refs/heads/master
python/python/ert_gui/tools/__init__.py
5
from .help_center import HelpCenter from .tool import Tool
damoti/pyjx-gwt
refs/heads/master
gwt/pyjamas/ui/BuilderWidget.py
7
""" Pyjamas UI BuilderWidget: takes a PyJsGlade builder spec and creates a widget. Copyright (C) 2010 Luke Kenneth Casson Leighton <lkcl@lkcl.net> Create a BuilderWidget as follows:: from pyjamas.builder.Builder import Builder from pyjamas.ui.BuilderWidget import BuilderWidget either:: class Applicatio...
denisenkom/django
refs/heads/master
django/conf/locale/te/formats.py
118
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F Y' TIME_FORMAT = 'g:i:s A' # ...
FCP-INDI/C-PAC
refs/heads/master
CPAC/image_utils/__init__.py
1
from .spatial_smoothing import * from .statistical_transforms import *
cathalmccabe/PYNQ
refs/heads/master
pynq/lib/arduino/arduino_grove_pir.py
4
# Copyright (c) 2016, Xilinx, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of ...
ozsolarwind/siren
refs/heads/master
getmap.py
1
#!/usr/bin/python3 # # Copyright (C) 2015-2020 Sustainable Energy Now Inc., Angus King # # getmap.py - This file is part of SIREN. # # SIREN is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either v...
GoogleCloudPlatform/training-data-analyst
refs/heads/master
courses/machine_learning/deepdive2/production_ml/labs/samples/contrib/versioned-pipeline-ci-samples/helloworld-ci-sample/pipeline.py
2
#!/usr/bin/env python3 # Copyright 2019 Google LLC # # 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...
Vvucinic/Wander
refs/heads/master
venv_2_7/lib/python2.7/site-packages/pip/status_codes.py
1002
from __future__ import absolute_import SUCCESS = 0 ERROR = 1 UNKNOWN_ERROR = 2 VIRTUALENV_NOT_FOUND = 3 PREVIOUS_BUILD_DIR_ERROR = 4 NO_MATCHES_FOUND = 23
happyleavesaoc/home-assistant
refs/heads/dev
tests/components/notify/test_html5.py
7
"""Test HTML5 notify platform.""" import asyncio import json from unittest.mock import patch, MagicMock, mock_open from homeassistant.components.notify import html5 from tests.common import mock_http_component_app SUBSCRIPTION_1 = { 'browser': 'chrome', 'subscription': { 'endpoint': 'https://google.c...
40223150/2015cd_midterm
refs/heads/master
static/Brython3.1.0-20150301-090019/Lib/imp.py
637
"""This module provides the components needed to build your own __import__ function. Undocumented functions are obsolete. In most cases it is preferred you consider using the importlib module's functionality over this module. """ # (Probably) need to stay in _imp from _imp import (lock_held, acquire_lock, release_lo...
nchammas/click
refs/heads/master
examples/repo/setup.py
32
from setuptools import setup setup( name='click-example-repo', version='0.1', py_modules=['repo'], include_package_data=True, install_requires=[ 'click', ], entry_points=''' [console_scripts] repo=repo:cli ''', )
roidy/service.skin.refresh
refs/heads/master
watchdog/utils/importlib2.py
33
# The MIT License (MIT) # Copyright (c) 2013 Peter M. Elias # 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, modi...
Ernesto99/odoo
refs/heads/8.0
openerp/addons/base/ir/ir_filters.py
237
# -*- 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...
cgstudiomap/cgstudiomap
refs/heads/develop
main/parts/odoo/addons/account_asset/wizard/account_asset_change_duration.py
258
# -*- encoding: 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 t...
BBN-Q/QGL
refs/heads/develop
QGL/BasicSequences/SPAM.py
1
from ..PulsePrimitives import * from ..Compiler import compile_to_hardware from ..PulseSequencePlotter import plot_pulse_files from itertools import chain from numpy import pi from typing import Iterable, Union def SPAM(qubit: Channels.LogicalChannel, angleSweep: Iterable[Union[int, float]], maxSpa...
pawaranand/phrerp
refs/heads/develop
erpnext/patches/v4_0/import_country_codes.py
39
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.country_info import get_all from erpnext.setup.install import import_country_and_currency def execute(): frappe.reload_doc("setup", "doctype", "coun...
webmasterraj/GaSiProMo
refs/heads/master
flask/lib/python2.7/site-packages/docutils/parsers/rst/directives/admonitions.py
126
# $Id: admonitions.py 7681 2013-07-12 07:52:27Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Admonition directives. """ __docformat__ = 'reStructuredText' from docutils.parsers.rst import Directive from docutils.parsers.rst import states, di...
TheTypoMaster/chromium-crosswalk
refs/heads/master
tools/auto_bisect/bisect_perf_regression.py
5
#!/usr/bin/env python # 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. """Chromium auto-bisect tool This script bisects a range of commits using binary search. It starts by getting reference values for the...