repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
βŒ€
sahmed95/sympy
refs/heads/master
sympy/polys/domains/tests/test_polynomialring.py
99
"""Tests for the PolynomialRing classes. """ from sympy.polys.domains import QQ, ZZ from sympy.polys.polyerrors import ExactQuotientFailed, CoercionFailed, NotReversible from sympy.abc import x, y from sympy.utilities.pytest import raises def test_build_order(): R = QQ.old_poly_ring(x, y, order=(("lex", x), ("...
flipchan/LayerProx
refs/heads/master
marionette_tg/channel_test.py
10
import sys import time import threading from twisted.internet import reactor sys.path.append('.') import marionette_tg.channel as channel class ServerThread(threading.Thread): def run(self): print 'Starting server...' self.channel_ = None while True: ch = channel.accept_new_...
mdj2/django
refs/heads/master
tests/validation/models.py
2
from __future__ import unicode_literals from datetime import datetime from django.core.exceptions import ValidationError from django.db import models from django.utils.encoding import python_2_unicode_compatible def validate_answer_to_universe(value): if value != 42: raise ValidationError('This is not t...
ollie314/browserscope
refs/heads/master
static_mode/network_top.py
9
(dp0 S'total_runs' p1 L20703L sS'Chrome 4' p2 (dp3 S'summary_display' p4 S'11/14' p5 sS'total_runs' p6 L955L sS'summary_score' p7 I79 sS'results' p8 (dp9 S'parscriptiframe' p10 (dp11 S'score' p12 I1 sS'raw_score' p13 I0 sS'display' p14 S'no' p15 ssS'parscriptimage' p16 (dp17 g12 I100 sg13 I1 sg14 S'yes' p18 ssS'parcssj...
qingu/WRF-Libraries
refs/heads/master
src/mpich-3.0.1/src/pm/mpd/mpdcleanup.py
2
#!/usr/bin/env python # # (C) 2001 by Argonne National Laboratory. # See COPYRIGHT in top-level directory. # ## NOTE: we do NOT allow this pgm to run via mpdroot """ usage: mpdcleanup [-h] [-v] [-f <hostsfile>] [-r <rshcmd>] [-u <user>] [-c <cleancmd>] [-k 'killcmd'] [-n <num_from_hostsfile>] or: mpdcleanu...
hortonworks/hortonworks-sandbox
refs/heads/master
desktop/core/ext-py/simplejson/simplejson/tests/__init__.py
135
import unittest import doctest def additional_tests(): import simplejson import simplejson.encoder import simplejson.decoder suite = unittest.TestSuite() for mod in (simplejson, simplejson.encoder, simplejson.decoder): suite.addTest(doctest.DocTestSuite(mod)) suite.addTest(doctest.DocFi...
350dotorg/Django
refs/heads/master
django/contrib/gis/gdal/base.py
398
from ctypes import c_void_p from types import NoneType from django.contrib.gis.gdal.error import GDALException class GDALBase(object): """ Base object for GDAL objects that has a pointer access property that controls access to the underlying C pointer. """ # Initially the pointer is NULL. _ptr ...
cursesun/scrapy
refs/heads/master
scrapy/downloadermiddlewares/decompression.py
151
""" This module implements the DecompressionMiddleware which tries to recognise and extract the potentially compressed responses that may arrive. """ import bz2 import gzip import zipfile import tarfile import logging from tempfile import mktemp import six try: from cStringIO import StringIO as BytesIO except Im...
MilanMathew/Python-practice-book
refs/heads/master
Chapter2/2.21_wrap.py
1
import sys def wrap(f, w): fp = open(f, 'r') spos = 1 fr = fp.readlines() result = '' for i in range(len(fr)): for s in fr[i]: result = result + s if spos % (int(w)) == 0: result = result + '\n' spos += 1 spos = 1 fp.close() ...
ooblog/TSF1KEV
refs/heads/master
TSFpy/debug/sample_fizzbuzz.py
1
#! /usr/bin/env python # -*- coding: UTF-8 -*- from __future__ import division,print_function,absolute_import,unicode_literals import sys import os os.chdir(sys.path[0]) sys.path.append('/mnt/sda2/github/TSF1KEV/TSFpy') from TSF_io import * #from TSF_Forth import * from TSF_shuffle import * from TSF_match import * fro...
newswangerd/ansible
refs/heads/devel
test/integration/targets/module_utils/module_utils/sub/bam.py
298
#!/usr/bin/env python bam = "BAM FROM sub/bam.py"
chouseknecht/ansible
refs/heads/devel
test/units/module_utils/basic/test_log.py
120
# -*- coding: utf-8 -*- # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type import syslog from itertools...
wisaac407/shotgun
refs/heads/master
shotgun_manager/__init__.py
1
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
rven/odoo
refs/heads/14.0-fix-partner-merge-mail-activity
addons/l10n_it/__manifest__.py
4
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Italy - Accounting', 'version': '0.2', 'depends': [ 'account', 'base_iban', 'base_vat', ], 'author': 'OpenERP Italian Community', 'description': """ Piano dei co...
rspavel/spack
refs/heads/develop
var/spack/repos/builtin/packages/netdata/package.py
4
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Netdata(AutotoolsPackage): """Real-time performance monitoring, done right!""" homepa...
andrewsomething/libcloud
refs/heads/trunk
dist/hash.py
7
#!/usr/bin/env python3 """Writes SHA-256 and SHA-512 hashes of files passed as arguments""" import hashlib import sys for path in sys.argv[1:]: for ext, hash in [('sha256', hashlib.sha256), ('sha512', hashlib.sha512)]: written = '{}.{}'.format(path, ext) with open(path, 'rb') as fin, open(written,...
2014cdbg6/cdbg6
refs/heads/master
wsgi/static/Brython2.1.0-20140419-113919/Lib/unittest/test/test_assertions.py
738
import datetime import warnings import unittest from itertools import product class Test_Assertions(unittest.TestCase): def test_AlmostEqual(self): self.assertAlmostEqual(1.00000001, 1.0) self.assertNotAlmostEqual(1.0000001, 1.0) self.assertRaises(self.failureException, ...
hsluo/youtube-dl
refs/heads/master
youtube_dl/extractor/nfl.py
76
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse_urlparse, ) from ..utils import ( ExtractorError, int_or_none, remove_end, ) class NFLIE(InfoExtractor): IE_NAME = 'nfl.com' _VALID_URL = r'''(?x)htt...
romain-dartigues/ansible
refs/heads/devel
test/units/modules/network/nxos/test_nxos_evpn_global.py
68
# # (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
dgarros/ansible
refs/heads/devel
lib/ansible/module_utils/pycompat24.py
24
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
hynnet/openwrt-mt7620
refs/heads/master
staging_dir/host/lib/python2.7/encodings/utf_8.py
1475
""" Python 'utf-8' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs ### Codec APIs encode = codecs.utf_8_encode def decode(input, errors='strict'): return codecs.utf_8_decode(input, errors, True) class IncrementalEncoder(codecs.In...
BhallaLab/moose-full
refs/heads/master
dependencies/libsbml-5.9.0/examples/python/stripPackage.py
2
#!/usr/bin/env python ## ## @file stripPackage.py ## @brief Strips the given package from the given SBML file. ## @author Frank T. Bergmann ## ## ## This file is part of libSBML. Please visit http://sbml.org for more ## information about SBML, and the latest version of libSBML. import sys import os.path import...
andmos/ansible
refs/heads/devel
lib/ansible/modules/windows/win_file.py
14
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk> # 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': ['stableinterface'], ...
robocomp/robocomp
refs/heads/development
tools/rcportchecker/rcportchecker.py
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # ------------------------ # ----- rcportchecker ----- # ------------------------ # # Copyright (C) 2010 by RoboLab - University of Extremadura # # This file is part of RoboComp # # RoboComp is free software: you can redistribute it and/or modify # it und...
bpradipt/rethinkdb
refs/heads/ppc64le
test/common/parsePolyglot.py
13
#!/usr/bin/env python from __future__ import print_function import os, re, sys # == globals printDebug = False try: unicode except NameError: unicode = str # == class yamlValue(unicode): linenumber = None def __new__(cls, value, linenumber=None): if isinstance(value, unicode): ...
kilisimba/gluten-free-tax
refs/heads/master
dbref/views.py
6445
from django.shortcuts import render # Create your views here.
chirilo/mozillians
refs/heads/master
vendor-local/lib/python/south/utils/py3.py
53
""" Python 2 + 3 compatibility functions. This is a very small subset of six. """ import sys PY3 = sys.version_info[0] == 3 if PY3: string_types = str, text_type = str raw_input = input import io StringIO = io.StringIO else: string_types = basestring, text_type = unicode raw_input =...
numerigraphe/sale-workflow
refs/heads/8.0
sale_reason_to_export/models/sale_reason_to_export.py
33
# -*- encoding: utf-8 -*- ############################################################################## # # Odoo, Open Source Management Solution # This module copyright (C) 2015 JPJ # ( http://www.savoirfairelinux.com). # # This program is free software: you can redistribute it and/or modify # it under...
ayoubg/gem5-graphics
refs/heads/master
gem5/configs/ruby/MI_example.py
1
# Copyright (c) 2006-2007 The Regents of The University of Michigan # Copyright (c) 2009 Advanced Micro Devices, 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 co...
RapidApplicationDevelopment/tensorflow
refs/heads/master
tensorflow/contrib/framework/python/framework/tensor_util_test.py
9
# 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...
arpitn30/open-event-orga-server
refs/heads/development
app/settings/__init__.py
7
import stripe from flask import current_app from sqlalchemy import desc from app.models.fees import TicketFees from app.models.setting import Setting, Environment def get_settings(): """ Use this to get latest system settings """ if 'custom_settings' in current_app.config: return current_app....
razvanphp/arangodb
refs/heads/devel
3rdParty/V8-3.31.74.1/third_party/python_26/Lib/site-packages/win32comext/axscript/__init__.py
186
# See if we have a special directory for the binaries (for developers) import win32com win32com.__PackageSupportBuildPath__(__path__)
chudaol/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/tests/test_vertical.py
118
""" Tests for vertical module. """ from fs.memoryfs import MemoryFS from xmodule.tests import get_test_system from xmodule.tests.xml import XModuleXmlImportTest from xmodule.tests.xml import factories as xml from xmodule.x_module import STUDENT_VIEW, AUTHOR_VIEW class BaseVerticalBlockTest(XModuleXmlImportTest): ...
robbiet480/home-assistant
refs/heads/dev
homeassistant/components/uptimerobot/__init__.py
36
"""The uptimerobot component."""
tszym/ansible
refs/heads/devel
lib/ansible/modules/network/asa/asa_command.py
8
#!/usr/bin/python # # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.0', 'status': ['preview'],...
fentas/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py
121
# Copyright (C) 2009 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 f...
guorendong/iridium-browser-ubuntu
refs/heads/ubuntu/precise
tools/telemetry/telemetry/core/platform/mac_platform_backend.py
9
# 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. import ctypes import os import platform import sys import time from telemetry.core.platform import platform_backend from telemetry.core.platform import posi...
hgl888/chromium-crosswalk-efl
refs/heads/efl/crosswalk-10/39.0.2171.19
chrome/common/extensions/docs/server2/path_canonicalizer_test.py
95
#!/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. import posixpath import unittest from extensions_paths import PUBLIC_TEMPLATES, SERVER2 from local_file_system import LocalFileSystem ...
jefke-glider/gliding
refs/heads/master
ato/report_ia/migrations/0076_auto_20171116_1504.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2017-11-16 15:04 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('report_ia', '0075_auto_20171023_2022'), ] operatio...
jhuapl-marti/marti
refs/heads/master
env-crits/lib/python2.7/site-packages/pip/compat/__init__.py
84
"""Stuff that differs in different Python versions and platform distributions.""" from __future__ import absolute_import, division import os import imp import sys from pip._vendor.six import text_type try: from logging.config import dictConfig as logging_dictConfig except ImportError: from pip.compat.dictcon...
wgd3/fitgents
refs/heads/master
data/db_repository/versions/022_migration.py
1
from sqlalchemy import * from migrate import * from migrate.changeset import schema pre_meta = MetaData() post_meta = MetaData() users = Table('users', post_meta, Column('user_id', Integer, primary_key=True, nullable=False), Column('name', String(length=50)), Column('email', String(length=50)), Column...
RRZE-HPC/LMS
refs/heads/master
midware/influxdbrouter/influxdbrouter/influxdbmeasurement.py
1
import re, datetime from Queue import Queue class Measurement(object): def __init__(self, mstr): self.mstr = None self.meta = {} self.tags = {} self.fields = {} self.metric = "" self.timestamp = None self.names = ["measurement", "tags", "fields", "timesta...
aifil/odoo
refs/heads/8.0
addons/website_sale_options/controllers/__init__.py
2262
import main
EDUlib/edx-platform
refs/heads/master
openedx/core/djangoapps/content_libraries/migrations/0004_contentlibrary_license.py
5
# Generated by Django 2.2.16 on 2020-09-16 21:50 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('content_libraries', '0003_contentlibrary_type'), ] operations = [ migrations.AddField( model_name='contentlibrary', ...
Venturi/oldcms
refs/heads/master
env/lib/python2.7/site-packages/pip/_vendor/six.py
878
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2015 Benjamin Peterson # # 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 with...
alexander-lee/storm-alert
refs/heads/master
node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py
1835
#!/usr/bin/env python # Copyright (c) 2011 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. """These functions are executed via gyp-flock-tool when using the Makefile generator. Used on systems that don't have a built-in flock.""" ...
anselmobd/fo2
refs/heads/master
src/utils/router.py
1
from utils.middlewares import request_cfg class Router(object): """ A router to control all database operations on models. """ def systextil_conn(self): if hasattr(request_cfg, 'alter_db') and request_cfg.alter_db: return 'so' else: return 'sn' def db_for_...
pandeyadarsh/sympy
refs/heads/master
sympy/integrals/tests/test_integrals.py
16
from sympy import ( Abs, acos, acosh, Add, asin, asinh, atan, Ci, cos, sinh, cosh, tanh, Derivative, diff, DiracDelta, E, exp, erf, erfi, EulerGamma, factor, Function, I, Integral, integrate, Interval, Lambda, LambertW, log, Matrix, O, oo, pi, Piecewise, Poly, Rational, S, simplify, sin, tan, sqrt, ...
OpenWhere/scrapy
refs/heads/master
scrapy/contrib/loader/processor.py
144
import warnings from scrapy.exceptions import ScrapyDeprecationWarning warnings.warn("Module `scrapy.contrib.loader.processor` is deprecated, " "use `scrapy.loader.processors` instead", ScrapyDeprecationWarning, stacklevel=2) from scrapy.loader.processors import *
dingocuster/scikit-learn
refs/heads/master
sklearn/utils/sparsetools/setup.py
295
import numpy def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('sparsetools', parent_package, top_path) config.add_extension('_traversal', sources=['_traversal.c'], include_dir...
wisechengyi/pants
refs/heads/master
contrib/go/tests/python/pants_test/contrib/go/tasks/test_go_workspace_task.py
2
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import os import time from collections import defaultdict from itertools import chain from pants.build_graph.build_file_aliases import BuildFileAliases from pants.testutil.task_test_base ...
lydonchandra/omim
refs/heads/master
3party/protobuf/python/google/protobuf/internal/message_factory_python_test.py
74
#! /usr/bin/python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
PuZheng/generator-flask-skeleton
refs/heads/master
app/templates/setup.py
1
# -*- coding: UTF-8 -*- from distutils.core import setup from setuptools import find_packages from setuptools.command.test import test as TestCommand import sys import re NAME = u"<%= projectName %>" PACKAGE = u"<%= packageName %>" DESCRIPTION = "" AUTHOR = "" AUTHOR_EMAIL = "" URL = "" DOC = __import__(PACKAGE).__do...
dgarros/ansible
refs/heads/devel
lib/ansible/module_utils/ansible_tower.py
46
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
yatinag/selfcure
refs/heads/master
lib/werkzeug/debug/__init__.py
56
# -*- coding: utf-8 -*- """ werkzeug.debug ~~~~~~~~~~~~~~ WSGI application traceback debugger. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import os import sys import uuid import json import time import getpass import ha...
zaccoz/odoo
refs/heads/8.0
addons/report/models/abstract_report.py
249
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
gangadharkadam/johnerp
refs/heads/develop
erpnext/setup/doctype/target_detail/__init__.py
37694
from __future__ import unicode_literals
mbauskar/phrerp
refs/heads/develop
erpnext/stock/doctype/delivery_note_item/__init__.py
37694
from __future__ import unicode_literals
hrjn/scikit-learn
refs/heads/master
examples/semi_supervised/plot_label_propagation_versus_svm_iris.py
50
""" ===================================================================== Decision boundary of label propagation versus SVM on the Iris dataset ===================================================================== Comparison for decision boundary generated on iris dataset between Label Propagation and SVM. This demon...
hyperized/ansible
refs/heads/devel
lib/ansible/modules/network/iosxr/iosxr_netconf.py
21
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
johan--/python_koans
refs/heads/master
python3/koans/about_packages.py
66
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This is very different to AboutModules in Ruby Koans # Our AboutMultipleInheritance class is a little more comparable # from runner.koan import * # # Package hierarchy of Python Koans project: # # contemplate_koans.py # koans/ # __init__.py # about_asserts.py...
roadmapper/ansible
refs/heads/devel
test/units/modules/network/fortios/test_fortios_web_proxy_profile.py
20
# Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the...
qmagico/sampleappqm
refs/heads/master
src/django/contrib/auth/tests/management.py
83
from StringIO import StringIO from django.contrib.auth import models, management from django.contrib.auth.management.commands import changepassword from django.test import TestCase class GetDefaultUsernameTestCase(TestCase): def setUp(self): self._getpass_getuser = management.get_system_username de...
zofuthan/p2pool
refs/heads/master
SOAPpy/Parser.py
131
# SOAPpy modules from Config import Config from Types import * from NS import NS from Utilities import * import string import fpconst import xml.sax from wstools.XMLname import fromXMLname try: from M2Crypto import SSL except: pass ident = '$Id: Parser.py 1497 2010-03-08 06:06:52Z pooryorick $' from ve...
petosegan/scikit-learn
refs/heads/master
sklearn/tests/test_common.py
127
""" General tests for all estimators in sklearn. """ # Authors: Andreas Mueller <amueller@ais.uni-bonn.de> # Gael Varoquaux gael.varoquaux@normalesup.org # License: BSD 3 clause from __future__ import print_function import os import warnings import sys import pkgutil from sklearn.externals.six import PY3 fr...
j5shi/Thruster
refs/heads/master
pylibs/test/test_future4.py
13
from __future__ import unicode_literals import unittest from test import test_support class TestFuture(unittest.TestCase): def assertType(self, obj, typ): self.assertTrue(type(obj) is typ, "type(%r) is %r, not %r" % (obj, type(obj), typ)) def test_unicode_strings(self): ...
galtys/odoo
refs/heads/8.0
addons/mrp_operations/report/mrp_workorder_analysis.py
312
# -*- 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...
stankovski/AutoRest
refs/heads/master
AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/models/byte_wrapper.py
2
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
shashidhar22/bio-playground
refs/heads/master
kscalc/kscalc.py
2
import score_guess print score_guess from score_guess import score_guess import scipy.optimize as so import random import numpy as np a = """ATGTCGGGGCGCGGCAAGGGCGGCAAGGGGCTCGGCAAGGGCGGCGCGAAGAGGCATCGC AAGGTGCTCCGCGACAACATCCAGGGCATCACCAAGCCGGCGATCCGGAGGCTGGCGAGG AGGGGCGGCGTGAAGCGCATCTCCGGGCTGATCTACGAGGAGACCCGCGGCGTGC...
supermarkion/Life-Backup
refs/heads/master
Python/GroupAnagrams.py
1
''' Given an array of strings, group anagrams together. Link: https://leetcode.com/problems/anagrams/#/description Example: For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], Return: [ ["ate", "eat","tea"], ["nat","tan"], ["bat"] ...
zimmermant/dlvo_lammps
refs/heads/master
tools/moltemplate/src/ttree_matrix_stack.py
19
# Author: Andrew Jewett (jewett.aij@gmail.com) # http://www.chem.ucsb.edu/~sheagroup # License: 3-clause BSD License (See LICENSE.TXT) # Copyright (c) 2012, Regents of the University of California # All rights reserved. from collections import deque from array import array from ttree_lex import * #import sys ...
westial/restfulcomm
refs/heads/master
tests/testrabbitmq.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- """Test cases for rabbitmq server""" import unittest from restfulcomm.configurations.rabbitmqclientconfig import RabbitMqClientConfig from restfulcomm.configurations.rabbitmqserverconfig import RabbitMqServerConfig from restfulcomm.providers.clientprovider import ClientProv...
opencivicdata/scrapers-ca
refs/heads/master
disabled/ca_on_wilmot/__init__.py
1
from utils import CanadianJurisdiction class Wilmot(CanadianJurisdiction): classification = 'legislature' division_id = 'ocd-division/country:ca/csd:3530020' division_name = 'Wilmot' name = 'Wilmot Township Council' url = 'http://www.wilmot.ca'
rockfruit/bika.lims
refs/heads/master
bika/lims/content/clientfolder.py
1
# This file is part of Bika LIMS # # Copyright 2011-2016 by it's authors. # Some rights reserved. See LICENSE.txt, AUTHORS.txt. from bika.lims.utils import isActive """ClientFolder is a container for Client instances. """ from Products.ATContentTypes.content import schemata from Products.Archetypes import atapi from P...
delhivery/django
refs/heads/master
django/core/cache/backends/dummy.py
629
"Dummy cache backend" from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache class DummyCache(BaseCache): def __init__(self, host, *args, **kwargs): BaseCache.__init__(self, *args, **kwargs) def add(self, key, value, timeout=DEFAULT_TIMEOUT, version=None): key = self.make_key...
mkenne11/nogotofail
refs/heads/dev
nogotofail/mitm/connection/handlers/connection/__init__.py
5
r''' Copyright 2014 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 agreed to i...
Quaesar/android_kernel_hp_phobos
refs/heads/cm-12.1
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
11088
# Core.py - Python extension for perf script, core functions # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. from collections import defaultdict def aut...
kopach/git-cola
refs/heads/master
cola/main.py
2
"""Launcher and command line interface to git-cola""" from __future__ import absolute_import, division, unicode_literals import argparse import os import sys from . import app from . import cmds from . import compat from . import core def main(argv=None): if argv is None: argv = sys.argv[1:] # we're ...
sjsucohort6/openstack
refs/heads/master
python/venv/lib/python2.7/site-packages/tablib/packages/odf/script.py
100
# -*- coding: utf-8 -*- # Copyright (C) 2006-2007 SΓΈren Roug, European Environment Agency # # This library 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 you...
amith01994/intellij-community
refs/heads/master
python/testData/refactoring/move/moveNamespacePackage3/before/src/nspkg/nssubpkg/a.py
961
VAR = 42
Gaia3D/QGIS
refs/heads/master
python/plugins/processing/algs/gdal/extractprojection.py
3
# -*- coding: utf-8 -*- """ *************************************************************************** extractprojection.py --------------------- Date : September 2013 Copyright : (C) 2013 by Alexander Bruy Email : alexander dot bruy at gmail dot com *****...
dwiajik/codeforces
refs/heads/master
580A.py
1
n = input() a = input().split(" ") maxlength = 1 length = 1 prevai = None for ai in a: ai = int(ai) if (prevai == None or prevai > ai): length = 1 else: length = length + 1 if (length > maxlength): maxlength = length prevai = ai print(maxlength)
etzhou/edx-platform
refs/heads/master
openedx/core/djangoapps/user_api/accounts/tests/test_views.py
37
# -*- coding: utf-8 -*- import datetime from copy import deepcopy import ddt import hashlib import json from mock import patch from pytz import UTC import unittest from django.conf import settings from django.core.urlresolvers import reverse from django.test.testcases import TransactionTestCase from django.test.utils ...
ocefpaf/iris
refs/heads/master
lib/iris/symbols.py
5
# Copyright Iris contributors # # This file is part of Iris and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """ Contains symbol definitions for use with :func:`iris.plot.symbols`. """ import itertools import math from matplotlib.pat...
shikil/sympy
refs/heads/master
sympy/polys/domains/field.py
103
"""Implementation of :class:`Field` class. """ from __future__ import print_function, division from sympy.polys.domains.ring import Ring from sympy.polys.polyerrors import NotReversible, DomainError from sympy.utilities import public @public class Field(Ring): """Represents a field domain. """ has_Field = T...
40223110/2015cd_0505
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/importlib/abc.py
743
"""Abstract base classes related to import.""" from . import _bootstrap from . import machinery try: import _frozen_importlib except ImportError as exc: if exc.name != '_frozen_importlib': raise _frozen_importlib = None import abc import imp import marshal import sys import tokenize import warnings ...
jpmfribeiro/PyCharts
refs/heads/master
build/lib.linux-x86_64-2.7/pycharts/highcharts/fields/series_field.py
3
class SeriesField(object): def __init__(self): self.series = [] def add_serie(self, serie): self.series.append(serie) def to_javascript(self): jsc = "series: [" for s in self.series: jsc += s.to_javascript() + "," # the last comma is accepted by javascript...
3kakakhel/pygw2sim
refs/heads/master
thief.py
1
#!/usr/bin/env python # Import some libraries. import scipy, scipy.stats, math, random, time # Set the random number generator seed. randObj = random.Random(97324) # Define the thief class/profession class. class thief: def __init__(self): self.name = 'Test Char' self.profession = 'Thief' self.x = [600]*run...
manipopopo/tensorflow
refs/heads/master
tensorflow/contrib/data/python/kernel_tests/serialization/unique_dataset_serialization_test.py
14
# 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...
certik/pyjamas
refs/heads/master
library/pyjamas/gmaps/Interfaces.py
4
# Copyright (C) 2009 Daniel Carvalho <idnael@gmail.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
gppezzi/easybuild-framework
refs/heads/master
test/framework/module_generator.py
1
## # Copyright 2012-2019 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
extertioner/django-blog-zinnia
refs/heads/develop
zinnia/urls/shortlink.py
11
"""Urls for the Zinnia entries short link""" from django.conf.urls import url from zinnia.views.shortlink import EntryShortLink urlpatterns = [ url(r'^(?P<token>[\dA-Z]+)/$', EntryShortLink.as_view(), name='entry_shortlink'), ]
tellesnobrega/horizon
refs/heads/master
openstack_dashboard/dashboards/project/stacks/resource_types/tabs.py
60
# 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 the...
mozilla/stoneridge
refs/heads/master
python/src/Tools/scripts/ndiff.py
100
#! /usr/bin/env python # Module ndiff version 1.7.0 # Released to the public domain 08-Dec-2000, # by Tim Peters (tim.one@home.com). # Provided as-is; use at your own risk; no warranty; no promises; enjoy! # ndiff.py is now simply a front-end to the difflib.ndiff() function. # Originally, it contained the difflib.Se...
mattclay/ansible
refs/heads/devel
test/units/module_utils/facts/system/distribution/test_parse_distribution_file_ClearLinux.py
35
# -*- coding: utf-8 -*- # Copyright (c) 2019 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type import os import pytest from ansible.module_utils.facts.system.distribution i...
balek/agocontrol
refs/heads/master
devices/tellstick/agotellstick.py
2
#!/usr/bin/python AGO_TELLSTICK_VERSION = '0.0.9' ############################################ # # Tellstick Duo support for ago control # __author__ = "Joakim Lindbom" __copyright__ = "Copyright 2013, 2014, Joakim Lindbom" __date__ = "2013-12-24" __credits__ = ["Joakim Lindbom", "The ago control team"] _...
jaywink/federation
refs/heads/master
federation/tests/hostmeta/django/test_generators.py
2
import json from unittest.mock import patch, Mock from django.test import RequestFactory from federation.hostmeta.django import rfc7033_webfinger_view from federation.hostmeta.django.generators import nodeinfo2_view from federation.utils.django import get_function_from_config from federation.tests.fixtures.hostmeta i...
wamgoo/FPGA-Imaging-Library
refs/heads/Publish
LocalFilter/MeanFilter/HDLSimDataGen/WindowGenerator.py
44
""" Project FPGA-Imaging-Library Design WindowGenerator Function Generate window. Module Software simulation. Version 1.0 Modified 2015-05-17 Copyright (C) 2015 Tianyu Dai (dtysky) <dtysky@outlook.com> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser Gen...
awkspace/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/ec2_lc.py
16
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
reyha/zulip
refs/heads/master
zproject/dev_urls.py
16
from django.conf.urls import url from django.conf import settings import os.path from django.views.static import serve import zerver.views # These URLs are available only in the development environment use_prod_static = getattr(settings, 'PIPELINE_ENABLED', False) static_root = os.path.join(settings.DEPLOY_ROOT, 'pro...