repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
kzhong1991/Flight-AR.Drone-2
src/3rdparty/Qt4.8.4/src/3rdparty/webkit/Source/ThirdParty/gtest/scripts/fuse_gtest_files.py
314
8813
#!/usr/bin/env python # # Copyright 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...
bsd-3-clause
tanmaykm/edx-platform
lms/djangoapps/notes/views.py
142
1741
""" Views to support the edX Notes feature. """ from django.conf import settings from django.contrib.auth.decorators import login_required from django.http import Http404 from edxmako.shortcuts import render_to_response from opaque_keys.edx.locations import SlashSeparatedCourseKey from courseware.courses import get_c...
agpl-3.0
r0k3/arctic
tests/integration/store/test_pickle_store.py
1
3584
import bson from datetime import datetime as dt, timedelta from mock import patch import numpy as np import re from arctic.arctic import Arctic def test_save_read_bson(library): blob = {'foo': dt(2015, 1, 1), 'bar': ['a', 'b', ['x', 'y', 'z']]} library.write('BLOB', blob) saved_blob = library.read('BLOB'...
lgpl-2.1
tensorflow/models
research/slim/nets/cifarnet.py
3
4629
# 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...
apache-2.0
kthordarson/youtube-dl-ruv
youtube_dl/extractor/sapo.py
178
4498
# encoding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( parse_duration, unified_strdate, ) class SapoIE(InfoExtractor): IE_DESC = 'SAPO Vídeos' _VALID_URL = r'https?://(?:(?:v2|www)\.)?videos\.sapo\.(?:pt|cv|ao|mz|tl)/(?P<id>[\da-zA...
unlicense
JacobJacob/volatility
volatility/plugins/iehistory.py
44
6520
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # Copyright (c) 2010, 2011, 2012 Michael Ligh <michael.ligh@mnin.org> # # This file is part of Volatility. # # Volatility is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free...
gpl-2.0
mjg/Impressive
src/osdfont.py
2
11590
##### OSD FONT RENDERER ######################################################## typesUnicodeType = type(u'unicode') typesStringType = type(b'bytestring') # force a string or sequence of ordinals into a unicode string def ForceUnicode(s, charset='iso8859-15'): if type(s) == typesUnicodeType: retur...
gpl-2.0
Barbarian1010/pychess
lib/pychess/Utils/lutils/TranspositionTable.py
20
4110
from pychess.Utils.const import hashfALPHA, hashfBETA, hashfEXACT, hashfBAD from pychess.Utils.lutils.ldata import MATE_VALUE, MAXPLY from ctypes import create_string_buffer, memset from struct import Struct, pack_into, unpack_from # Store hash entries in buckets of 4. An entry consists of: # key 32 bits deriv...
gpl-3.0
pinterest/kingpin
kingpin/logging_utils/__init__.py
1
6156
# Copyright 2016 Pinterest, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
apache-2.0
SaschaMester/delicium
build/android/pylib/perf/thermal_throttle.py
38
4529
# 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 logging from pylib import android_commands from pylib.device import device_utils class OmapThrottlingDetector(object): """Class to detect and trac...
bsd-3-clause
varuntiwari27/rally
todo-api/flask/lib/python2.7/site-packages/pip/_vendor/packaging/version.py
1151
11556
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import collections import itertools import re from ._structures import In...
apache-2.0
amisrs/angular-flask
angular_flask/lib/python2.7/site-packages/jinja2/testsuite/loader.py
411
8162
# -*- coding: utf-8 -*- """ jinja2.testsuite.loader ~~~~~~~~~~~~~~~~~~~~~~~ Test the loaders. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import os import sys import tempfile import shutil import unittest from jinja2.testsuite import JinjaTestCase, dic...
mit
jferreir/mbed
workspace_tools/export/simplicityv3.py
36
5565
""" mbed SDK Copyright (c) 2014 ARM Limited 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...
apache-2.0
Aleksei-Badyaev/rst2db
abstrys/cmd_rst2db.py
1
3650
#!/usr/bin/env python # -*- coding: utf-8 -*- # # rst2db.py # ========= # # A reStructuredText to DocBook conversion tool, using Python's docutils # library. # # by Eron Hennessey from argparse import ArgumentParser from argparse import RawDescriptionHelpFormatter import os import sys from abstrys.docutils_ext.docboo...
bsd-3-clause
Smelly-London/Smelly-London
NLTK_textmine/map.py
2
162511
mapping = {'b19956587': 'City of Westminster', 'b18047129': 'Kensington and Chelsea', 'b17999418': 'City of Westminster', 'b1823687x': 'Tower Hamlets', 'b19878230': 'Redbridge', 'b18238142': 'Hammersmith and Fulham', 'b19954724': 'Tower Hamlets', 'b19783747': 'Ealing', 'b19882804': 'Merton', 'b2027483x': 'Harrow', 'b19...
apache-2.0
rysson/filmkodi
plugin.video.fanfilm/resources/lib/resolvers/okru.py
2
2736
# -*- coding: utf-8 -*- ''' FanFilm Add-on Copyright (C) 2015 lambda 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 ...
apache-2.0
HybridF5/jacket
jacket/tests/storage/unit/test_api_urlmap.py
1
12850
# Copyright (c) 2013 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 required by applicab...
apache-2.0
wwj718/murp-edx
lms/djangoapps/dashboard/management/commands/tests/test_git_add_course.py
5
8686
""" Provide tests for git_add_course management command. """ import logging import os import shutil import StringIO import subprocess import unittest from django.conf import settings from django.core.management import call_command from django.core.management.base import CommandError from django.test.utils import over...
agpl-3.0
n3wb13/OpenNfrGui-5.0-1
lib/python/Screens/DVD.py
3
20223
import os from enigma import eTimer, iPlayableService, iServiceInformation, eServiceReference, iServiceKeys, getDesktop from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Screens.ChoiceBox import ChoiceBox from Screens.HelpMenu import HelpableScreen from Screens.InfoBarGenerics import Info...
gpl-2.0
siddhika1889/Pydev-Dependencies
pysrc/third_party/pep8/lib2to3/lib2to3/pygram.py
320
1118
# Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Export the Python grammar and symbols.""" # Python imports import os # Local imports from .pgen2 import token from .pgen2 import driver from . import pytree # The grammar file _GRAMMAR_FILE = os.path.join(os.path....
epl-1.0
PetrDlouhy/django
django/db/transaction.py
98
12277
from django.db import ( DEFAULT_DB_ALIAS, DatabaseError, Error, ProgrammingError, connections, ) from django.utils.decorators import ContextDecorator class TransactionManagementError(ProgrammingError): """ This exception is thrown when transaction management is used improperly. """ pass def get_...
bsd-3-clause
nliolios24/textrank
share/doc/networkx-1.9.1/examples/algorithms/blockmodel.py
32
3009
#!/usr/bin/env python # encoding: utf-8 """ Example of creating a block model using the blockmodel function in NX. Data used is the Hartford, CT drug users network: @article{, title = {Social Networks of Drug Users in {High-Risk} Sites: Finding the Connections}, volume = {6}, shorttitle = {Social Networks of Drug ...
mit
andriibekker/biddingsbase
django/utils/itercompat.py
294
1169
""" Providing iterator functions that are not in all version of Python we support. Where possible, we try to use the system-native version and only fall back to these implementations if necessary. """ import itertools # Fallback for Python 2.4, Python 2.5 def product(*args, **kwds): """ Taken from http://docs...
bsd-3-clause
kingvuplus/xrd-alliance
lib/python/Screens/About.py
1
9272
from Screen import Screen from Components.ActionMap import ActionMap from Components.Sources.StaticText import StaticText from Components.Harddisk import harddiskmanager from Components.NimManager import nimmanager from Components.About import about from Components.ScrollLabel import ScrollLabel from Components.Button ...
gpl-2.0
winndows/cinder
cinder/keymgr/key.py
156
2587
# Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory # 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/...
apache-2.0
maftieu/CouchPotatoServer
libs/rsa/__init__.py
111
1568
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # 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 # # Unl...
gpl-3.0
wrdsb/canvas-lms
vendor/bundle/ruby/1.9.1/gems/pygments.rb-0.5.2/vendor/pygments-main/pygments/styles/tango.py
363
7096
# -*- coding: utf-8 -*- """ pygments.styles.tango ~~~~~~~~~~~~~~~~~~~~~ The Crunchy default Style inspired from the color palette from the Tango Icon Theme Guidelines. http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines Butter: #fce94f #edd400 #c4a000 Orange: #fcaf3e ...
agpl-3.0
ggirelli/gpseq-img-py
pygpseq/anim/series.py
1
12252
# -*- coding: utf-8 -*- ''' @author: Gabriele Girelli @contact: gigi.ga90@gmail.com @description: contains Series wrapper, which in turn contains Nucleus. ''' # DEPENDENCIES ================================================================= import math import os import matplotlib.pyplot as plt import numpy as np fro...
mit
SlimRemix/android_external_chromium_org
third_party/protobuf/python/google/protobuf/internal/enum_type_wrapper.py
292
3541
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
bsd-3-clause
caphrim007/ansible
lib/ansible/modules/cloud/amazon/rds_instance.py
12
50632
#!/usr/bin/python # Copyright (c) 2018 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.1', 'status': ['preview'], '...
gpl-3.0
anshumang/lammps-analytics
tools/amber2lmp/amber2lammps.py
8
36873
#! /usr/bin/python # # This is amber2lammps, a program written by Keir E. Novik to convert # Amber files to Lammps files. # # Copyright 1999, 2000 Keir E. Novik; all rights reserved. # # Modified by Vikas Varshney, U Akron, 5 July 2005, as described in README # Bug Fixed :Third argument in Dihedral Coeffs se...
gpl-2.0
lawishere/googletest
test/gtest_color_test.py
3259
4911
#!/usr/bin/env python # # Copyright 2008, 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...
bsd-3-clause
thawatchai/mrkimontour
appengine-django/lib/django/db/migrations/loader.py
75
16471
from __future__ import unicode_literals import os import sys from importlib import import_module from django.apps import apps from django.conf import settings from django.db.migrations.graph import MigrationGraph from django.db.migrations.recorder import MigrationRecorder from django.utils import six from .exception...
gpl-2.0
Sarah-Alsinan/muypicky
lib/python3.6/site-packages/django/db/backends/oracle/base.py
18
24987
""" Oracle database backend for Django. Requires cx_Oracle: http://cx-oracle.sourceforge.net/ """ from __future__ import unicode_literals import datetime import decimal import os import platform import sys import warnings from django.conf import settings from django.core.exceptions import ImproperlyConfigured from d...
mit
HaydenFaulkner/phd
processing/image/img2vid.py
1
1058
from os import listdir, remove from os.path import isfile, join import numpy as np import cv2 from cv2 import __version__ cv_ver = __version__.split('.') NEW_OCV = True if int(cv_ver[0]) < 3: NEW_OCV = False import cv2.cv as cv mypath = '/media/hayden/UStorage/DATASETS/VIDEO/TENNIS/BBS/imgtest/' try: rem...
mit
voiperr/ACE3
tools/stringtablemerger.py
52
4379
#!/usr/bin/env python3 import os import sys import re from xml.dom import minidom # STRINGTABLE MERGER TOOL # Author: KoffeinFlummi # -------------------------- # Automatically merges all stringtable entries # in the given language from the given dir. def get_modules(projectpath): """ Get all the modules of the...
gpl-2.0
analyseuc3m/ANALYSE-v1
common/lib/xmodule/xmodule/videoannotation_module.py
19
6569
""" Module for Video annotations using annotator. """ from lxml import etree from pkg_resources import resource_string from xmodule.x_module import XModule from xmodule.raw_module import RawDescriptor from xblock.core import Scope, String from xmodule.annotator_mixin import get_instructions, get_extension from xmodule...
agpl-3.0
zaina/nova
tools/db/schema_diff.py
36
8433
#!/usr/bin/env python # Copyright 2012 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 requi...
apache-2.0
saurabh6790/OFF-RISLIB
core/doctype/profile/test_profile.py
34
3620
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt import webnotes, unittest from webnotes.model.utils import delete_doc, LinkExistsError class TestProfile(unittest.TestCase): def test_delete(self): self.assertRaises(LinkExistsError, delete_doc, "Role", "_Test R...
mit
pplatek/odoo
openerp/report/render/odt2odt/odt2odt.py
443
2265
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
ZerpaTechnology/AsenZor
static/js/brython/Lib/unittest/case.py
9
50087
"""Test case implementation""" import sys import functools import difflib import pprint import re import warnings import collections from . import result from .util import (strclass, safe_repr, _count_diff_all_purpose, _count_diff_hashable) __unittest = True DIFF_OMITTED = ('\nD...
lgpl-3.0
lino-framework/extjs6
lino_extjs6/setup_info.py
1
1673
# -*- coding: UTF-8 -*- # Copyright 2015-2021 Rumma & Ko Ltd # License: GNU Affero General Public License v3 (see file COPYING for details) SETUP_INFO = dict( name='lino_extjs6', version='17.10.0', install_requires=['lino', 'lino_noi'], tests_require=[], test_suite='tests', description="The Se...
bsd-2-clause
VladimirTyrin/letsencrypt
letsencrypt/proof_of_possession.py
37
3643
"""Proof of Possession Identifier Validation Challenge.""" import logging import os from cryptography import x509 from cryptography.hazmat.backends import default_backend import zope.component from acme import challenges from acme import jose from acme import other from letsencrypt import interfaces from letsencrypt...
apache-2.0
fujicoin/electrum-fjc
electrum/transaction.py
1
47135
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 Thomas Voegtlin # # 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...
mit
tudyzhb/yichui
django/utils/dateparse.py
96
2896
"""Functions to parse datetime objects.""" # We're using regular expressions rather than time.strptime because: # - They provide both validation and parsing. # - They're more flexible for datetimes. # - The date/datetime/time constructors produce friendlier error messages. import datetime import re from django.utils....
bsd-3-clause
DelazJ/QGIS
tests/src/python/test_qgsfieldmodel.py
31
19729
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsFieldModel .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. """ __au...
gpl-2.0
jscott413/maidsinharlem
flask/lib/python2.7/site-packages/pip/_vendor/ipaddress.py
339
80176
# Copyright 2007 Google Inc. # Licensed to PSF under a Contributor Agreement. """A fast, lightweight IPv4/IPv6 manipulation library in Python. This library is used to create/poke/manipulate IPv4 and IPv6 addresses and networks. """ from __future__ import unicode_literals import itertools import struct __version...
bsd-3-clause
mikeycattell/benefit-housing-rebuild
node_modules/grunt-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py
2736
6387
# 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. """Visual Studio project reader/writer.""" import gyp.common import gyp.easy_xml as easy_xml #-------------------------------------------------------------------...
mit
mazvv/travelcrm
travelcrm/views/transfers.py
1
7321
# -*-coding: utf-8-*- import logging from pyramid.view import view_config, view_defaults from pyramid.httpexceptions import HTTPFound from . import BaseView from ..models import DBSession from ..models.transfer import Transfer from ..lib.bl.subscriptions import subscribe_resource from ..lib.utils.common_utils import...
gpl-3.0
petrutlucian94/nova
nova/tests/unit/api/openstack/compute/contrib/test_evacuate.py
8
12071
# Copyright 2013 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 a...
apache-2.0
charleswhchan/ansible
lib/ansible/playbook/role/requirement.py
28
7970
# (c) 2014 Michael DeHaan, <michael@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ve...
gpl-3.0
CS-SI/QGIS
python/plugins/processing/preconfigured/PreconfiguredAlgorithmDialog.py
17
4528
# -*- coding: utf-8 -*- """ *************************************************************************** PreconfiguredAlgorithmDialog.py --------------------- Date : April 2016 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ***********...
gpl-2.0
1185/starwels
test/functional/wallet_hd.py
2
5199
#!/usr/bin/env python3 # Copyright (c) 2016-2019 The Starwels developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test Hierarchical Deterministic wallet function.""" from test_framework.test_framework import StarwelsTest...
mit
cinaljess/btools
type2_endcheck.py
1
3097
""" Module to check whether TypeIIs end-sites are compatible. Looks for 3bp homology then 2 basepair edge-homology for each input sequence given. Comparisons are made between each element in the list and to the reverse complement of each element. Repeat elements are also validated along with noncanonical basepairs. Ex...
mit
lmprice/ansible
lib/ansible/module_utils/network/junos/junos.py
19
13610
# # (c) 2017 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 ...
gpl-3.0
ketjow4/NOV
Lib/anydbm.py
253
2663
"""Generic interface to all dbm clones. Instead of import dbm d = dbm.open(file, 'w', 0666) use import anydbm d = anydbm.open(file, 'w') The returned object is a dbhash, gdbm, dbm or dumbdbm object, dependent on the type of database being opened (determined by whichdb module) in the...
gpl-3.0
scvalencia/ROBOCOL_desastres
Galileo/Python/venv/lib/python2.7/site-packages/pip/cmdoptions.py
361
9507
""" shared options and groups The principle here is to define options once, but *not* instantiate them globally. One reason being that options with action='append' can carry state between parses. pip parse's general options twice internally, and shouldn't pass on state. To be consistent, all options will follow this d...
mit
Tao-Ma/gpdb
gpMgmt/test/behave/mgmt_utils/steps/scripts/part_data.py
35
1093
#!/usr/bin/env python import sys import datetime if len(sys.argv) != 4: print "%s YEAR COPYYEAR NUMDAYS" % sys.argv[0] sys.exit(0) YEAR = int(sys.argv[1]) COPYYEAR = int(sys.argv[2]) DAY_COUNT = int(sys.argv[3]) description = """abcdefghijklmnopqrstuvwqyz.?{}-abcdefghijklmnopqrstuvwqyz.?{}abcdefghijklmnopqrs...
apache-2.0
Rogentos/legacy-anaconda
installclasses/awesome.py
1
2620
# # awesome.py # # Copyright (C) 2010 Fabio Erculiani # # 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...
gpl-2.0
tomkralidis/GeoHealthCheck
GeoHealthCheck/views.py
1
7335
# ================================================================= # # Authors: Tom Kralidis <tomkralidis@gmail.com> # # Copyright (c) 2014 Tom Kralidis # # 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 ...
mit
wonwon0/StrategyIA
RULEngine/Command/command.py
2
2515
# Under MIT License, see LICENSE.txt """ Ce module permet de créer des commandes pour faire agir les robots. Des fonctions utilitaire permettent de transformer une commande de Position (Pose) en une commande de vitesse. L'embarqué et le simulateur utilise un vecteur de vitesse (Pose) pour contrôler...
mit
GdZ/scriptfile
software/googleAppEngine/lib/django_1_3/tests/regressiontests/i18n/tests.py
47
48435
# -*- encoding: utf-8 -*- import datetime import decimal import os import sys import pickle from threading import local from django.conf import settings from django.template import Template, Context from django.utils.formats import (get_format, date_format, time_format, localize, localize_input, iter_format_module...
mit
mzdaniel/oh-mainline
vendor/packages/celery/celery/utils/mail.py
18
4826
# -*- coding: utf-8 -*- """ celery.utils.mail ~~~~~~~~~~~~~~~~~ How task error emails are formatted and sent. :copyright: (c) 2009 - 2011 by Ask Solem. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import sys import smtplib try: from email.mime.text...
agpl-3.0
eayunstack/nova
nova/tests/api/openstack/compute/contrib/test_server_password.py
12
3178
# Copyright 2012 Nebula, 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 ...
apache-2.0
openstack-infra/shade
shade/tests/functional/test_qos_dscp_marking_rule.py
1
2765
# Copyright 2017 OVH SAS # 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, softw...
apache-2.0
oihane/server-tools
base_field_serialized/tests/test_serialized.py
31
2214
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2014 Therp BV (<http://therp.nl>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
markflyhigh/incubator-beam
sdks/python/apache_beam/testing/benchmarks/chicago_taxi/process_tfma.py
1
6321
# Copyright 2019 Google LLC. 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
OpenSeizureDetector/OpenSeizureDetector
fitbit_version/galileo/tests/testUtils.py
3
3496
import unittest from galileo.utils import a2x, a2s, a2lsbi, a2msbi, i2lsba, s2a, x2a class testa2x(unittest.TestCase): def testSimple(self): self.assertEqual(a2x(range(10)), '00 01 02 03 04 05 06 07 08 09') def testNotShorten(self): self.assertEqual(a2x([0] * 5), '00 00 00 00 00') def t...
gpl-3.0
ibrahimsharaf/crashsimilarity
tests/test_model.py
1
11586
import unittest import multiprocessing import numpy as np from crashsimilarity.stacktrace import StackTraceProcessor from crashsimilarity.models import doc2vec, word2vec class CrashSimilarityTest(unittest.TestCase): # Train Model to be used in all tests @classmethod def setUpClass(self): self.pat...
mpl-2.0
yuxans/badgirl
src/hi.py
1
1145
#!/usr/bin/env python # Copyright (c) 2002 Brad Stewart # # 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 pro...
gpl-2.0
ESRF-BCU/emotion
tests/TestStates.py
1
2381
import unittest import sys import os sys.path.insert( 0, os.path.abspath( os.path.join( os.path.dirname(__file__), ".."))) from emotion.axis import AxisState class TestStates(unittest.TestCase): def setUp(self): pass def test_states(self): # empty st...
gpl-2.0
andris210296/andris-projeto
backend/venv/test/lib/python2.7/site-packages/unidecode/x0b7.py
253
4833
data = ( 'ddwim', # 0x00 'ddwib', # 0x01 'ddwibs', # 0x02 'ddwis', # 0x03 'ddwiss', # 0x04 'ddwing', # 0x05 'ddwij', # 0x06 'ddwic', # 0x07 'ddwik', # 0x08 'ddwit', # 0x09 'ddwip', # 0x0a 'ddwih', # 0x0b 'ddyu', # 0x0c 'ddyug', # 0x0d 'ddyugg', # 0x0e 'ddyugs', # 0x0f 'dd...
mit
Hacker-YHJ/betwixt
dt/cm/PRESUBMIT.py
148
2368
# Copyright (C) 2014 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 ...
mit
AndroidOpenDevelopment/android_external_chromium_org
tools/telemetry/telemetry/timeline/slice.py
8
2266
# 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. import telemetry.timeline.event as timeline_event class Slice(timeline_event.TimelineEvent): """A Slice represents an interval of time plus parameters ass...
bsd-3-clause
luistorresm/odoo
addons/account_chart/__openerp__.py
313
1451
# -*- 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...
agpl-3.0
dd00/commandergenius
project/jni/python/src/Lib/test/test_userlist.py
56
1767
# Check every path through every method of UserList from UserList import UserList from test import test_support, list_tests class UserListTest(list_tests.CommonTest): type2test = UserList def test_getslice(self): super(UserListTest, self).test_getslice() l = [0, 1, 2, 3, 4] u = self.t...
lgpl-2.1
65apps/omim
3party/protobuf/python/google/protobuf/internal/unknown_fields_test.py
73
9102
#! /usr/bin/python # -*- coding: utf-8 -*- # # 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 f...
apache-2.0
emanlove/robotframework-selenium2library
src/SeleniumLibrary/keywords/__init__.py
3
1444
# Copyright 2008-2011 Nokia Networks # Copyright 2011-2016 Ryan Tomac, Ed Manlove and contributors # Copyright 2016- Robot Framework 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 Licens...
apache-2.0
cschnei3/forseti-security
google/cloud/security/common/gcp_api/cloud_billing.py
1
1114
# Copyright 2017 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 or agreed to in writing, s...
apache-2.0
anthrotype/robofab
Lib/robofab/interface/all/dialogs_fontlab_legacy1.py
9
1782
""" Dialogs for FontLab < 5.1. This one should be loaded for various platforms, using dialogKit http://www.robofab.org/tools/dialogs.html """ from FL import * from dialogKit import ModalDialog, Button, TextBox, EditText __all__ = [ #"AskString", #"AskYesNoCancel", #"FindGlyph", ...
bsd-3-clause
outastracoin-project/outastracoin
qa/rpc-tests/txn_doublespend.py
152
4968
#!/usr/bin/env python2 # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test proper accounting with malleable transactions # from test_framework import BitcoinTestFramework from...
mit
CameronLonsdale/sec-tools
python2/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langhebrewmodel.py
2763
11318
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Simon Montagu # Portions created by the Initial Developer are Copyright (C) 2005 # the Initial Developer. All Rights Reserved...
mit
tonybaloney/st2
st2common/st2common/services/keyvalues.py
1
6723
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
apache-2.0
xbmc/xbmc-antiquated
xbmc/lib/libPython/Python/Tools/framer/framer/bases.py
48
6967
"""Provides the Module and Type base classes that user code inherits from.""" __all__ = ["Module", "Type", "member"] from framer import struct, template from framer.function import Function, Method from framer.member import member from framer.slots import * from framer.util import cstring, unindent from types import...
gpl-2.0
xingwu1/autorest
AutoRest/Generators/Python/Azure.Python.Tests/Expected/AcceptanceTests/AzureResource/autorestresourceflatteningtestservice/models/error.py
211
1286
# 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 ...
mit
YuMatsuzawa/HadoopEclipseProject
hadoop-0.20.2-cdh3u5/contrib/hod/hodlib/Schedulers/torque.py
182
5568
#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 use thi...
apache-2.0
dol-sen/portage
pym/portage/cvstree.py
5
9852
# cvstree.py -- cvs tree utilities # Copyright 1998-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from __future__ import print_function import io import re import stat import sys import time from portage import os from portage import _encodings from portage import _unicode...
gpl-2.0
lseyesl/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/steps/cleanworkingdirectory_unittest.py
124
3269
# 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 ...
bsd-3-clause
ashaycool/syncform
server.py
2
1351
# Import your application as: # from wsgi import application # Example: # If you are using the wsgi.py (standard Pyramid) #from wsgi import app # If using application.py (single page example): # from application import app from wsgi import application # Import CherryPy import cherrypy if __name__ == '__main__': ...
gpl-3.0
FireWRT/OpenWrt-Firefly-Libraries
staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python2.7/distutils/command/clean.py
251
2814
"""distutils.command.clean Implements the Distutils 'clean' command.""" # contributed by Bastian Kleineidam <calvin@cs.uni-sb.de>, added 2000-03-18 __revision__ = "$Id$" import os from distutils.core import Command from distutils.dir_util import remove_tree from distutils import log class clean(Command): desc...
gpl-2.0
txemi/ansible
lib/ansible/modules/network/nxos/nxos_rollback.py
21
5721
#!/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 distribut...
gpl-3.0
kerzhner/airflow
airflow/utils/asciiart.py
67
2298
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
scs/uclinux
user/python/python-2.4.4/Tools/scripts/diff.py
62
2002
""" Command line interface to difflib.py providing diffs in four formats: * ndiff: lists every line and highlights interline changes. * context: highlights clusters of changes in a before/after format. * unified: highlights clusters of changes in an inline format. * html: generates side by side comparison wit...
gpl-2.0
mlperf/training_results_v0.5
v0.5.0/google/cloud_v2.8/ssd-tpuv2-8/code/ssd/model/tpu/models/official/amoeba_net/network_utils_test.py
5
2161
# 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 applicable ...
apache-2.0
tedlaz/pyted
misthodosia/payroll/calc_example.py
1
1345
# -*- coding: utf-8 -*- """Module calc_example.py""" if __name__ == '__main__': import calc as c B105 = c.Erg(50, 45.66, 18.95, False) B101 = c.Erg(40, 40.06, 15.5, False) # ----------------------------------------------- # Nea pososta IKA # # Perigrafi ergazomenos Ergodotis Syno...
gpl-3.0
dcroc16/skunk_works
google_appengine/lib/django-1.5/tests/modeltests/model_package/tests.py
150
2612
from __future__ import absolute_import from django.contrib.sites.models import Site from django.db import models from django.test import TestCase from .models.publication import Publication from .models.article import Article class Advertisment(models.Model): customer = models.CharField(max_length=100) publ...
mit
brianlsharp/MissionPlanner
Lib/site-packages/scipy/ndimage/tests/test_filters.py
55
1118
''' Some tests for filters ''' import numpy as np from numpy.testing import assert_equal, assert_raises import scipy.ndimage as sndi def test_ticket_701(): # Test generic filter sizes arr = np.arange(4).reshape((2,2)) func = lambda x: np.min(x) res = sndi.generic_filter(arr, func, size=(1,1)) #...
gpl-3.0
bobthekingofegypt/bobswitch-python
bobswitch/bobswitch.py
1
9377
# -*- coding: utf-8 -*- """ BobSwitch ~~~~~~~~~~~~~~ Online HTML5 version of the backpackers card game switch, also known as crazy eights and a lot of different names. This version follows the rules that I know. :copyright: (c) Copyright 2013 by Bob :license: BSD, see LICENSE for more d...
bsd-2-clause
raincoatrun/ThinkStats2
code/thinkplot.py
75
18140
"""This file contains code for use with "Think Stats", by Allen B. Downey, available from greenteapress.com Copyright 2014 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function import math import matplotlib import matplotlib.pyplot as pyplot import numpy as...
gpl-3.0
twobob/buildroot-kindle
output/build/host-libglib2-2.30.3/gio/gdbus-2.0/codegen/parser.py
23
12599
# -*- Mode: Python -*- # GDBus - GLib D-Bus Library # # Copyright (C) 2008-2011 Red Hat, Inc. # # 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 of the License, or (at ...
gpl-2.0