repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
nvoron23/hue
refs/heads/master
desktop/core/ext-py/Paste-1.7.2/tests/urlparser_data/python/sub/__init__.py
9480
#
m0tive/cug
refs/heads/master
scons/scons-local-1.3.0/SCons/Tool/sunf90.py
5
"""SCons.Tool.sunf90 Tool-specific initialization for sunf90, the Sun Studio F90 compiler. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 20...
Jonnymcc/ansible
refs/heads/devel
test/units/executor/test_task_result.py
104
# (c) 2016, James Cammarata <jimi@sngx.net> # # 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...
olemis/brython
refs/heads/master
www/src/Lib/test/test_filecmp.py
38
import os, filecmp, shutil, tempfile import unittest from test import support class FileCompareTestCase(unittest.TestCase): def setUp(self): self.name = support.TESTFN self.name_same = support.TESTFN + '-same' self.name_diff = support.TESTFN + '-diff' data = 'Contents of file go he...
luiseduardohdbackup/elasticsearch
refs/heads/master
dev-tools/build_release.py
27
# Licensed to Elasticsearch under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this file except...
maaku/scenariotest
refs/heads/master
xunit/__init__.py
1
# -*- coding: utf-8 -*- # Copyright © 2013 by its contributors. See AUTHORS for details. # Distributed under the MIT/X11 software license, see the accompanying # file LICENSE or http://www.opensource.org/licenses/mit-license.php. import unittest2 as unittest from scenariotest import * ## Unit of code to test ## def...
narekgharibyan/keyvi
refs/heads/master
pykeyvi/tests/completion/multiword_completion_test.py
3
# -*- coding: utf-8 -*- # Usage: py.test tests import pykeyvi import sys import os root = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(root, "../")) from test_tools import tmp_dictionary MULTIWORD_QUERY_SEPARATOR = '\x1b' def test_mw_completion(): c = pykeyvi.CompletionDictionaryCo...
tommyip/zulip
refs/heads/master
zilencer/management/__init__.py
12133432
ivanlyon/exercises
refs/heads/master
test/test_hexdec.py
1
import unittest from general import hexdec ############################################################################### class ValidInput(unittest.TestCase): pair = ( (1,'1'), (2,'2'), (3,'3'), (4,'4'), (5,'5'), (6,'6'), (7,'7'), ...
tempbottle/Firefly
refs/heads/master
gfirefly/management/commands/reloadmodule.py
16
#coding:utf8 ''' Created on 2013-8-12 @author: lan (www.9miao.com) ''' import urllib,sys def execute(*args): """ """ if not args: masterport =9998 else: masterport = int(args[0]) url = "http://localhost:%s/reloadmodule"%masterport try: response = urllib.urlopen(url) ...
RicardoJohann/um
refs/heads/master
erpnext/hr/doctype/appraisal/appraisal.py
35
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import flt, getdate from frappe import _ from frappe.model.mapper import get_mapped_doc from frappe.model.document ...
SiriusBizniss/evetowerthing
refs/heads/master
chardet/chardetect.py
1785
#!/usr/bin/env python """ Script which takes one or more file paths and reports on their detected encodings Example:: % chardetect somefile someotherfile somefile: windows-1252 with confidence 0.5 someotherfile: ascii with confidence 1.0 If no paths are provided, it takes its input from stdin. """ from...
yangacer/majordomo
refs/heads/master
majordomo/client.py
1
import zmq import functools from errno import ETIME, EPROTO from mdp import constants as consts from mdp import MDPError from stream import mdp_stream from utils import verbose class Client(object): socket = None def __init__(self, zmq_ctx, broker): self.zmq_ctx = zmq_ctx self.broker = broker...
geometalab/osmaxx
refs/heads/develop
osmaxx/contrib/auth/frontend_permissions.py
2
from django.contrib.auth.decorators import user_passes_test from django.core.urlresolvers import reverse_lazy from django.utils.decorators import method_decorator from rest_framework import permissions from osmaxx.profile.models import Profile def _may_user_access_this_excerpt(user, excerpt): return excerpt.is_p...
mvesper/invenio
refs/heads/master
modules/webalert/lib/alert_engine_config.py
16
# This file is part of Invenio. # Copyright (C) 2006, 2007, 2008, 2010, 2011 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later v...
taknevski/tensorflow-xsmm
refs/heads/master
tensorflow/python/kernel_tests/sparse_xent_op_test.py
103
# 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...
shivam1111/odoo
refs/heads/8.0
openerp/http.py
77
# -*- coding: utf-8 -*- #---------------------------------------------------------- # OpenERP HTTP layer #---------------------------------------------------------- import ast import collections import contextlib import datetime import errno import functools import getpass import inspect import logging import mimetypes...
zoeyangyy/event-extraction
refs/heads/master
tf_test/tf_rnn.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # @Time : 2017/10/1 下午4:15 # @Author : Zoe # @File : tf_rnn.py # @Description : https://www.bilibili.com/video/av10118932/#page=28 import tensorflow as tf import numpy as np from tensorflow.examples.tutorials.mnist import input_data mnist = input_data...
slswee/google_python_exercise
refs/heads/master
basic/solution/list2.py
207
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Additional basic list exercises # D. Given a list of numbers, return a list where # al...
simonwydooghe/ansible
refs/heads/devel
test/units/modules/network/check_point/test_cp_mgmt_dns_domain.py
19
# Ansible module to manage CheckPoint Firewall (c) 2019 # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is dist...
yongshengwang/hue
refs/heads/master
desktop/core/ext-py/boto-2.38.0/boto/ec2/image.py
92
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # 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 # w...
yasoob/PythonRSSReader
refs/heads/master
venv/lib/python2.7/dist-packages/twisted/test/stdio_test_producer.py
40
# -*- test-case-name: twisted.test.test_stdio.StandardInputOutputTestCase.test_producer -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Main program for the child process run by L{twisted.test.test_stdio.StandardInputOutputTestCase.test_producer} to test that process transports implemen...
phalax4/CarnotKE
refs/heads/master
jyhton/lib-python/2.7/markupbase.py
173
"""Shared support for scanning document type declarations in HTML and XHTML. This module is used as a foundation for the HTMLParser and sgmllib modules (indirectly, for htmllib as well). It has no documented public API and should not be used directly. """ import re _declname_match = re.compile(r'[a-zA-Z][-_.a-zA-Z...
maljac/odoomrp-wip
refs/heads/8.0
stock_lock_lot/__init__.py
240
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from . import models from . import wizard
exercism/xpython
refs/heads/master
exercises/rectangles/rectangles_test.py
1
import unittest from rectangles import rectangles # Tests adapted from `problem-specifications//canonical-data.json` class RectanglesTest(unittest.TestCase): def test_no_rows(self): self.assertEqual(rectangles([]), 0) def test_no_columns(self): self.assertEqual(rectangles([""]), 0) def...
LiveZenLK/CeygateERP
refs/heads/master
addons/mrp/wizard/__init__.py
47
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import mrp_product_produce import change_production_qty import stock_move
brianjgeiger/osf.io
refs/heads/develop
scripts/migration/migrate_share_registration_data.py
17
# TODO: Consider rewriting as management command import logging import sys import django from django.db import transaction django.setup() from osf.models import Registration from scripts import utils as script_utils from website import settings from website.app import init_app from website.project.tasks import update_...
markodolancic/selenium
refs/heads/master
py/selenium/webdriver/blackberry/__init__.py
2454
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
garyjyao1/ansible
refs/heads/devel
lib/ansible/modules/extras/database/vertica/vertica_configuration.py
148
#!/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. #...
mjs/juju
refs/heads/master
releasetests/build_package.py
1
#!/usr/bin/python """Script for building source and binary debian packages.""" from __future__ import print_function from argparse import ArgumentParser from collections import namedtuple import os import re import shutil import subprocess import sys __metaclass__ = type DEBS_NOT_FOUND = 3 # This constant defines...
DailyActie/Surrogate-Model
refs/heads/master
01-codes/numpy-master/numpy/ma/core.py
1
""" numpy.ma : a package to handle missing or invalid values. This package was initially written for numarray by Paul F. Dubois at Lawrence Livermore National Laboratory. In 2006, the package was completely rewritten by Pierre Gerard-Marchant (University of Georgia) to make the MaskedArray class a subclass of ndarray,...
nacl-webkit/chrome_deps
refs/heads/master
native_client_sdk/src/build_tools/manifest_util.py
2
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import copy import hashlib import json import string import sys import urllib2 MANIFEST_VERSION = 2 # Some commonly-used key names. ARCHIVES_KEY = 'arc...
alilotfi/django
refs/heads/master
tests/migrations/migrations_test_apps/lookuperror_a/migrations/0001_initial.py
381
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='A1', fields=[ ('id', models.AutoField(serialize...
byte-foundry/tornado-fontconverter
refs/heads/master
unittestfont.py
2
import unittest, mimetypes, os, sys import boto, boto.s3 from boto.s3.connection import S3Connection from upload import Upload from bucket import Bucket from delete import Delete EXT = ["woff", "ttf", "otf", "svg", "eot"] exts = '.woff', '.ttf', '.otf', '.svg', '.eot' def test_type(type): for ext in EXT: mimetypes...
jtiki/djangocms-cascade
refs/heads/master
cmsplugin_cascade/link/forms.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.contrib.sites.models import Site from django.apps import apps from django.forms import fields from django.forms.models import ModelForm from django.utils.module_loading import import_string from django.utils.tra...
gustavo94/UVaProblems
refs/heads/master
573-The snail.py
1
from sys import stdin from math import floor # exapmle input: ex_in = "6 3 1 10\n10 2 1 50\n50 5 3 14\n50 6 4 1\n50 6 3 1\n1 1 1 1\n97 56 3 10\n56 3 1 5\n0 0 0 0" def cal_limit_day(U,D,fatigue): limit_day = floor((U-D)/fatigue) if limit_day <= 0: limit_day = 1 return limit_day def total_down_by_fatigue(day, fat...
wbwseeker/spaCy
refs/heads/master
spacy/tests/tokenizer/test_tokens_from_list.py
5
from __future__ import unicode_literals import pytest def test1(en_tokenizer): words = ['JAPAN', 'GET', 'LUCKY'] tokens = en_tokenizer.tokens_from_list(words) assert len(tokens) == 3 assert tokens[0].orth_ == 'JAPAN'
elyezer/test-automation-examples
refs/heads/master
examples/unittest_example.py
1
import unittest import calculator class CalculatorTestCase(unittest.TestCase): def test_add(self): self.assertEqual(calculator.add(40, 2), 42) def test_sub(self): self.assertEqual(calculator.sub(40, 2), 38) def test_mul(self): self.assertEqual(calculator.mul(40, 2), 80) def ...
litecoin-project/Electrum-obsolete
refs/heads/master-ltc
gui/qt/network_dialog.py
8
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # 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...
Nebucatnetzer/tamagotchi
refs/heads/master
pygame/lib/python3.4/site-packages/pip/_vendor/colorama/win32.py
535
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. # from winbase.h STDOUT = -11 STDERR = -12 try: import ctypes from ctypes import LibraryLoader windll = LibraryLoader(ctypes.WinDLL) from ctypes import wintypes except (AttributeError, ImportError): windll = None SetCon...
loulich/Couchpotato
refs/heads/master
couchpotato/core/media/movie/providers/userscript/trakt.py
37
from couchpotato.core.media._base.providers.userscript.base import UserscriptBase autoload = 'Trakt' class Trakt(UserscriptBase): version = 2 includes = ['*://trakt.tv/movies/*', '*://*.trakt.tv/movies/*'] excludes = ['*://trakt.tv/movies/*/*', '*://*.trakt.tv/movies/*/*']
ocadotechnology/django-tastypie
refs/heads/master
tests/gis/api/resources.py
58
from django.contrib.auth.models import User from tastypie import fields from tastypie.resources import ALL from tastypie.contrib.gis.resources import ModelResource from tastypie.authorization import Authorization from gis.models import GeoNote class UserResource(ModelResource): class Meta: resource_name =...
cyberden/CouchPotatoServer
refs/heads/develop
libs/suds/bindings/binding.py
192
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser 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 hope that it will ...
ryfeus/lambda-packs
refs/heads/master
LightGBM_sklearn_scipy_numpy/source/sklearn/externals/joblib/_memory_helpers.py
52
try: # Available in Python 3 from tokenize import open as open_py_source except ImportError: # Copied from python3 tokenize from codecs import lookup, BOM_UTF8 import re from io import TextIOWrapper, open cookie_re = re.compile("coding[:=]\s*([-\w.]+)") def _get_normal_name(orig_enc): ...
sbidoul/buildbot
refs/heads/master
master/buildbot/test/unit/test_data_forceschedulers.py
8
# 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...
biomodels/MODEL1172940336
refs/heads/master
setup.py
1
from setuptools import setup, find_packages setup(name='MODEL1172940336', version=20140916, description='MODEL1172940336 from BioModels', url='http://www.ebi.ac.uk/biomodels-main/MODEL1172940336', maintainer='Stanley Gu', maintainer_url='stanleygu@gmail.com', packages=find_packages(...
MalloyPower/parsing-python
refs/heads/master
front-end/testsuite-python-lib/Python-2.6/Lib/test/test_slice.py
56
# tests for slice objects; in particular the indices method. import unittest from test import test_support from cPickle import loads, dumps import sys class SliceTest(unittest.TestCase): def test_constructor(self): self.assertRaises(TypeError, slice) self.assertRaises(TypeError, slice, 1, 2, 3, ...
steveb/heat
refs/heads/master
heat/common/cache.py
4
# # Copyright 2015 OpenStack Foundation # # 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...
madafoo/cjdns
refs/heads/master
node_build/dependencies/libuv/build/gyp/test/same-rule-output-file-name/src/touch.py
679
#!/usr/bin/env python # 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 sys f = open(sys.argv[1], 'w+') f.write('Hello from touch.py\n') f.close()
libracore/erpnext
refs/heads/v12
erpnext/setup/doctype/party_type/party_type.py
10
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class PartyType(Document): pass @frappe.whitelist() def get_party_type(doctype, txt, s...
Serag8/Bachelor
refs/heads/master
google_appengine/lib/webapp2-2.3/webapp2_extras/config.py
67
# -*- coding: utf-8 -*- """ webapp2_extras.config ===================== Configuration object for webapp2. This module is deprecated. See :class:`webapp2.WSGIApplication.config`. :copyright: 2011 by tipfy.org. :license: Apache Sotware License, see LICENSE for details. """ from __future__ impor...
MikeMcShaffry/gamecode3
refs/heads/master
Dev/Source/3rdParty/bullet-2.73/Extras/LibXML/check-xml-test-suite.py
347
#!/usr/bin/python import sys import time import os import string sys.path.insert(0, "python") import libxml2 test_nr = 0 test_succeed = 0 test_failed = 0 test_error = 0 # # the testsuite description # CONF="xml-test-suite/xmlconf/xmlconf.xml" LOG="check-xml-test-suite.log" log = open(LOG, "w") # # Error and warning...
jsoref/django
refs/heads/master
tests/forms_tests/tests/test_fields.py
64
# -*- coding: utf-8 -*- """ ########## # Fields # ########## Each Field class does some sort of validation. Each Field has a clean() method, which either raises django.forms.ValidationError or returns the "clean" data -- usually a Unicode object, but, in some rare cases, a list. Each Field's __init__() takes at least...
edisonlz/fruit
refs/heads/master
web_project/base/site-packages/django/utils/log.py
108
import logging import traceback from django.conf import settings from django.core import mail from django.core.mail import get_connection from django.views.debug import ExceptionReporter, get_exception_reporter_filter # Make sure a NullHandler is available # This was added in Python 2.7/3.2 try: from logging imp...
xpansa/sale-workflow
refs/heads/8.0
sale_quotation_sourcing/wizard/quotation_sourcing.py
35
# -*- coding: utf-8 -*- # # Author: Alexandre Fayolle # Copyright 2014 Camptocamp SA # # This program 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 version 3 of the # License,...
chugunovyar/factoryForBuild
refs/heads/master
env/lib/python2.7/site-packages/numpy/distutils/info.py
264
""" Enhanced distutils with Fortran compilers support and more. """ from __future__ import division, absolute_import, print_function postpone_import = True
henkhaus/wow
refs/heads/master
testing/multiprocess.py
1
from wowlib import wowapi, queries, log, mongoconnection, doctemplates import time import os import multiprocessing import pymongo from pymongo import MongoClient #/todo rewrite updatefunction to be a map function. Ie when mapped, all items in iterable can have this function applied to them logname = os.path.splitext(_...
nateknight/arducopter
refs/heads/Arducopter_Tri2
Tools/autotest/apm_unit_tests/dev/arducopter_climb_descend.py
250
import arducopter def unit_test(mavproxy, mav): '''A scripted flight plan''' if ( arducopter.calibrate_level(mavproxy, mav) and arducopter.arm_motors(mavproxy, mav) and arducopter.takeoff(mavproxy,mav, alt_min=30, takeoff_throttle=1510) and arducopter.change_alt(mavproxy, mav...
vertigo235/Sick-Beard-XEM
refs/heads/master
lib/bs4/__init__.py
417
"""Beautiful Soup Elixir and Tonic "The Screen-Scraper's Friend" http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup uses a pluggable XML or HTML parser to parse a (possibly invalid) document into a tree representation. Beautiful Soup provides provides methods and Pythonic idioms that make it easy to navigate...
tiagofrepereira2012/pre_annotation
refs/heads/master
bootstrap-buildout.py
172
############################################################################## # # Copyright (c) 2006 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
bdaroz/the-blue-alliance
refs/heads/master
tests/suggestions/test_media_url_parse.py
2
import json import unittest2 from google.appengine.ext import testbed from consts.media_type import MediaType from helpers.media_helper import MediaParser from helpers.webcast_helper import WebcastParser class TestMediaUrlParser(unittest2.TestCase): def setUp(cls): cls.testbed = testbed.Testbed() ...
cubieboard/openbox_external_chromium
refs/heads/openbox
net/tools/testserver/device_management.py
66
#!/usr/bin/python2.5 # Copyright (c) 2011 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 bare-bones test server for testing cloud policy support. This implements a simple cloud policy test server that can be used to...
lizardsystem/lizard-waterbalance
refs/heads/vss
lizard_waterbalance/models_tests.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- #****************************************************************************** # # This file is part of the lizard_waterbalance Django app. # # The lizard_waterbalance app is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public Li...
philsch/ansible
refs/heads/devel
lib/ansible/modules/windows/win_iis_virtualdirectory.py
78
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Henrik Wallström <henrik@wallstroms.nu> # # 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 t...
aospx-kitkat/platform_external_chromium_org
refs/heads/kitkat
build/android/avd.py
35
#!/usr/bin/env python # Copyright (c) 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. """Launches Android Virtual Devices with a set configuration for testing Chrome. The script will launch a specified number of Andr...
bramwalet/Subliminal.bundle
refs/heads/master
Contents/Libraries/Shared/chardet/cp949prober.py
2800
######################## 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...
lyynocs/magento-connector-v8
refs/heads/master
connector_ecommerce/unit/__init__.py
5
# -*- coding: utf-8 -*- from . import sale_order_onchange
fbradyirl/home-assistant
refs/heads/dev
tests/components/litejet/test_init.py
4
"""The tests for the litejet component.""" import logging import unittest from homeassistant.components import litejet from tests.common import get_test_home_assistant _LOGGER = logging.getLogger(__name__) class TestLiteJet(unittest.TestCase): """Test the litejet component.""" def setup_method(self, method...
robinvierich/SublimeTextGRLD
refs/heads/master
grld/session.py
1
import sublime import sys import threading import hashlib # Helper module try: from .helper import H except: from helper import H # Settings variables try: from . import settings as S except: import settings as S # DBGp protocol constants try: from . import dbgp except: import dbgp try: ...
zhangjiajie/tax_benchmark
refs/heads/master
script/ete2/_ph.py
2
# -*- coding: utf-8 -*- # #START_LICENSE########################################################### # # # This file is part of the Environment for Tree Exploration program # (ETE). http://ete.cgenomics.org # # ETE is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public ...
etherkit/OpenBeacon2
refs/heads/master
client/linux-x86/venv/lib/python3.8/site-packages/attr/__init__.py
3
from __future__ import absolute_import, division, print_function import sys from functools import partial from . import converters, exceptions, filters, setters, validators from ._config import get_run_validators, set_run_validators from ._funcs import asdict, assoc, astuple, evolve, has, resolve_types from ._make i...
arborh/tensorflow
refs/heads/master
tensorflow/python/tpu/tpu_config.py
27
# Copyright 2019 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 ...
mantidproject/mantid
refs/heads/master
Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/CorelliPowderCalibrationCreateTest.py
3
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + imp...
JasonGross/mozjs
refs/heads/master
python/mozbuild/mozpack/copier.py
2
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import os import stat from mozpack.errors import errors from mozpack.files import ( BaseFile, Dest, ) import mo...
fvant/ansible-modules-core
refs/heads/devel
cloud/openstack/quantum_router_gateway.py
99
#!/usr/bin/python #coding: utf-8 -*- # (c) 2013, Benno Joy <benno@ansible.com> # # 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 ...
golismero/golismero
refs/heads/master
thirdparty_libs/nltk/inference/prover9.py
12
# Natural Language Toolkit: Interface to the Prover9 Theorem Prover # # Copyright (C) 2001-2012 NLTK Project # Author: Dan Garrette <dhgarrette@gmail.com> # Ewan Klein <ewan@inf.ed.ac.uk> # # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT """ A theorem prover that makes use of the extern...
marckuz/django
refs/heads/master
tests/admin_checks/__init__.py
12133432
raoanirudh/rmtk
refs/heads/master
rmtk/vulnerability/vulnerability.py
12133432
KyoungRan/Django_React_ex
refs/heads/master
Django_React_Workshop-mbrochh/django/myvenv/lib/python3.4/site-packages/django/conf/locale/nb/__init__.py
12133432
gannetson/django
refs/heads/master
tests/bash_completion/management/__init__.py
12133432
wtrdrnkr/pyrecon
refs/heads/master
setup.py
2
try: from setuptools import setup except ImportError: from distutils.core import setup setup( name="PyRECONSTRUCT", version="2.2.0", author="Michael Musslewhite", author_email="mdmusslewhite@gmail.com", url="https://github.com/musslebot/pyrecon", packages=[ "classes", "t...
tecwebjoao/TecWeb-TF-2T-B-SI
refs/heads/master
venv/Lib/site-packages/setuptools/dep_util.py
316
from distutils.dep_util import newer_group # yes, this is was almost entirely copy-pasted from # 'newer_pairwise()', this is just another convenience # function. def newer_pairwise_group(sources_groups, targets): """Walk both arguments in parallel, testing if each source group is newer than its corresponding t...
cdellin/prpy
refs/heads/master
src/prpy/db.py
3
# Copyright (c) 2013, Carnegie Mellon University # All rights reserved. # Authors: Michael Koval <mkoval@cs.cmu.edu> # # 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 ...
Grogdor/CouchPotatoServer
refs/heads/master
libs/gntp/cli.py
122
# Copyright: 2013 Paul Traylor # These sources are released under the terms of the MIT license: see LICENSE import logging import os import sys from optparse import OptionParser, OptionGroup from gntp.notifier import GrowlNotifier from gntp.shim import RawConfigParser from gntp.version import __version__ DEFAULT_CON...
savoirfairelinux/partner-addons
refs/heads/10.0
partner_duplicate_mgmt/models/res_partner.py
1
# -*- coding: utf-8 -*- # © 2017 Savoir-faire Linux # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). import logging import re from odoo import _, api, fields, models from odoo.exceptions import UserError import unidecode _logger = logging.getLogger(__name__) class ResPartner(models.Model): _inh...
Big-B702/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/test/test_decimal.py
49
# Copyright (c) 2004 Python Software Foundation. # All rights reserved. # Written by Eric Price <eprice at tjhsst.edu> # and Facundo Batista <facundo at taniquetil.com.ar> # and Raymond Hettinger <python at rcn.com> # and Aahz (aahz at pobox.com) # and Tim Peters """ These are the test cases for the Decim...
hafeez3000/zulip
refs/heads/master
zerver/lib/test_helpers.py
114
from django.test import TestCase from zerver.lib.initial_password import initial_password from zerver.lib.db import TimeTrackingCursor from zerver.lib import cache from zerver.lib import event_queue from zerver.worker import queue_processors from zerver.lib.actions import ( check_send_message, create_stream_if_ne...
adviti/melange
refs/heads/master
thirdparty/google_appengine/google/appengine/_internal/django/core/serializers/base.py
23
""" Module for abstract serializer/unserializer base classes. """ from StringIO import StringIO from google.appengine._internal.django.db import models from google.appengine._internal.django.utils.encoding import smart_str, smart_unicode from google.appengine._internal.django.utils import datetime_safe class Seriali...
interlegis/sapl
refs/heads/3.1.x
sapl/protocoloadm/migrations/0030_auto_20200114_1121.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2020-01-14 14:21 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('protocoloadm', '0029_merge_20191209_1531'), ] operations = [ migrations.Al...
jinzekid/codehub
refs/heads/master
python/test_gui/TaskManager/MyWindow.py
1
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'MyWindow.ui' # # Created by: PyQt5 UI code generator 5.10.1 # # WARNING! All changes made in this file will be lost! import sys from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtGui import * from PyQt5.QtCore import QThread, pyqtSig...
wrouesnel/ansible
refs/heads/devel
test/sanity/code-smell/boilerplate.py
1
#!/usr/bin/env python import sys def main(): skip = set([ 'lib/ansible/compat/selectors/_selectors2.py', 'lib/ansible/module_utils/six/_six.py', 'setup.py', ]) prune = [ 'contrib/inventory/', 'contrib/vault/', 'docs/', 'examples/', 'hacking...
Endika/website-addons
refs/heads/8.0
website_sale_order/__openerp__.py
5
{ 'name' : 'Simplified website checkout', 'version' : '1.0.0', 'author' : 'IT-Projects LLC, Ivan Yelizariev', 'license': 'GPL-3', 'category' : 'Sale', 'website' : 'https://yelizariev.github.io', 'depends' : [ 'website_sale', ], 'data':[ 'website_sale_order_templates.x...
nnupurjoshii/scrapping_task
refs/heads/master
runner.py
1
import requests import redis import time import bs4 import json from constants import REDIS_KEY,JSON_URL # this code is the scrapper worker which is responsible for # getting the content and storing it in redis class Scrapper(object): def __init__(self, interval,url,scrapper,json=True): self.interval...
xuxiao19910803/edx
refs/heads/master
common/djangoapps/cache_toolbox/middleware.py
211
""" Cache-backed ``AuthenticationMiddleware`` ----------------------------------------- ``CacheBackedAuthenticationMiddleware`` is an ``django.contrib.auth.middleware.AuthenticationMiddleware`` replacement to avoid querying the database for a ``User`` instance in each request. Whilst the built-in ``AuthenticationMidd...
LeonardCohen/coding
refs/heads/master
py/4.2_Delegation_Iteration.py
1
class Node: def __init__(self, value): self._value = value self._children = [] def __repr__(self): return 'Node({!r})'.format(self._value) def add_child(self, node): self._children.append(node) def __iter__(self): return iter(self._children) if __name__ == '__m...
osh/gnuradio
refs/heads/master
gr-analog/python/analog/am_demod.py
58
# # Copyright 2006,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...
google-research/google-research
refs/heads/master
hyperbolic/models/__init__.py
1
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
asrashley/django-addressbook
refs/heads/master
demo/urls.py
1
from django.conf.urls.defaults import * from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Example: # (r'^intranet/', include('intranet.foo.urls')), (r'^$', 'views.index_view'), # login page url(r'^login/$', 'django.contrib.aut...
inyaka/floro
refs/heads/master
companies/tests.py
24123
from django.test import TestCase # Create your tests here.
sysadmin75/ansible
refs/heads/devel
lib/ansible/utils/unsafe_proxy.py
15
# PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 # -------------------------------------------- # # 1. This LICENSE AGREEMENT is between the Python Software Foundation # ("PSF"), and the Individual or Organization ("Licensee") accessing and # otherwise using this software ("Python") in source or binary form and # its ass...