repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
gdgphilippines/boomerang
old/bower_components/jasmine/lib/jasmine-core/core.py
163
1481
import pkg_resources try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict class Core(object): @classmethod def js_package(cls): return __package__ @classmethod def css_package(cls): return __package__ @classmethod def image_...
mit
endlessm/chromium-browser
third_party/catapult/third_party/gsutil/gslib/tests/test_mb.py
4
4713
# -*- coding: utf-8 -*- # 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 require...
bsd-3-clause
quinot/ansible-modules-core
files/synchronize.py
43
14681
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012-2013, Timothy Appnel <tim@appnel.com> # # 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) an...
gpl-3.0
uni-peter-zheng/tp-qemu
qemu/tests/migration_with_reboot.py
13
1625
from autotest.client.shared import utils def run(test, params, env): """ KVM migration test: 1) Get a live VM and clone it. 2) Verify that the source VM supports migration. If it does, proceed with the test. 3) Reboot the VM 4) Send a migration command to the source VM and wait un...
gpl-2.0
jumpserver/jumpserver
apps/ops/models/adhoc.py
2
11654
# ~*~ coding: utf-8 ~*~ import uuid import os import time import datetime from celery import current_task from django.db import models from django.conf import settings from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from common.utils import get_logger, lazyproperty from comm...
gpl-2.0
vincepandolfo/django
tests/flatpages_tests/test_sitemaps.py
380
1326
from __future__ import unicode_literals from django.apps import apps from django.contrib.sites.models import Site from django.test import TestCase from django.test.utils import modify_settings, override_settings @override_settings( ROOT_URLCONF='flatpages_tests.urls', SITE_ID=1, ) @modify_settings( INSTA...
bsd-3-clause
horance-liu/tensorflow
tensorflow/python/grappler/cost_analyzer_tool.py
47
2685
# 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...
apache-2.0
hilaskis/UAV_MissionPlanner
Lib/mimetypes.py
111
20609
"""Guess the MIME type of a file. This module defines two useful functions: guess_type(url, strict=1) -- guess the MIME type and encoding of a URL. guess_extension(type, strict=1) -- guess the extension for a given MIME type. It also contains the following, for tuning the behavior: Data: knownfiles -- list of fil...
gpl-2.0
ttfseiko/openerp-trunk
openerp/addons/base/tests/test_fields.py
41
10819
# # test cases for fields access, etc. # from openerp.osv import fields from openerp.tests import common class TestRelatedField(common.TransactionCase): def setUp(self): super(TestRelatedField, self).setUp() self.partner = self.registry('res.partner') self.company = self.registry('res.comp...
agpl-3.0
andela/troupon
troupon/accounts/tests/test_routes.py
1
5332
import time from django.contrib.auth.models import User from django.test import TestCase, Client, RequestFactory from accounts.models import UserProfile from accounts.views import TransactionsView from merchant.models import Merchant from payment.models import TransactionHistory class UserProfileMerchantTestCase(Te...
mit
craigem/MyAdventures
dice.py
1
2704
import mcpi.minecraft as minecraft import mcpi.block as block mc = minecraft.Minecraft.create() pos = mc.player.getTilePos() # Set out the dice dots mc.setBlock(pos.x + 3, pos.y, pos.z, block.STONE.id) mc.setBlock(pos.x + 3, pos.y + 2, pos.z, block.STONE.id) mc.setBlock(pos.x + 3, pos.y + 4, pos.z, block.STONE.id) m...
gpl-3.0
moksha11/xen-hv
tools/xm-test/tests/block-list/02_block-list_attachbd_pos.py
42
1170
#!/usr/bin/python # Copyright (C) International Business Machines Corp., 2005 # Author: Li Ge <lge@us.ibm.com) # Positive Test: create domain, attach block device, verify list from XmTestLib import * from XmTestLib.block_utils import block_attach if ENABLE_HVM_SUPPORT: SKIP("Block-list not supported for HVM do...
gpl-2.0
Jusedawg/SickRage
lib/unidecode/x024.py
98
3806
data = ( '', # 0x00 '', # 0x01 '', # 0x02 '', # 0x03 '', # 0x04 '', # 0x05 '', # 0x06 '', # 0x07 '', # 0x08 '', # 0x09 '', # 0x0a '', # 0x0b '', # 0x0c '', # 0x0d '', # 0x0e '', # 0x0f '', # 0x10 '', # 0x11 '', # 0x12 '', # 0x13 '', # 0x14 '', # 0x15 '',...
gpl-3.0
466152112/scikit-learn
examples/exercises/plot_cv_diabetes.py
231
2527
""" =============================================== Cross-validation on diabetes Dataset Exercise =============================================== A tutorial exercise which uses cross-validation with linear models. This exercise is used in the :ref:`cv_estimators_tut` part of the :ref:`model_selection_tut` section of ...
bsd-3-clause
CloudWareChile/OpenChile
openerp/addons/hr_evaluation/wizard/mail_compose_message.py
9
2629
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
gg/algorithms
mergesort.py
1
2177
# coding: utf-8 # Copyright (c) 2012 Gregg Gajic <gregg.gajic@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to u...
mit
coderbone/SickRage-alt
sickbeard/imdbPopular.py
1
4309
# coding=utf-8 from __future__ import absolute_import, print_function, unicode_literals # Stdlib Imports import os import posixpath import re from datetime import date # Third Party Imports from bs4 import BeautifulSoup # First Party Imports import sickbeard from sickchill.helper.encoding import ek # Local Folder ...
gpl-3.0
consulo/consulo-mercurial
src/test/resources/bin/hgext/convert/cvs.py
94
10274
# cvs.py: CVS conversion code inspired by hg-cvs-import and git-cvsimport # # Copyright 2005-2009 Matt Mackall <mpm@selenic.com> and others # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. import os, re, socket, errno from cString...
apache-2.0
zagfai/webtul
webtul/notice.py
1
5016
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Info&Warn Module, use to send email, receive email, send sms, and all other ways to send or receive info or warning messages. working with aio """ __author__ = 'Zagfai' __date__ = '2020-05' import re import traceback import asyncio import base64 import quopri import a...
mit
lintzc/gpdb
src/test/tinc/tincrepo/mpp/gpdb/tests/package/contrib/__init__.py
9
1449
""" Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 ...
apache-2.0
NordicSemiconductor/pyOCD
pyOCD/flash/flash_lpc11u24.py
1
2904
""" mbed CMSIS-DAP debugger Copyright (c) 2006-2013 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 ...
apache-2.0
maraoz/proofofexistence
babel/dates.py
14
43109
# -*- coding: utf-8 -*- """ babel.dates ~~~~~~~~~~~ Locale dependent formatting and parsing of dates and times. The default locale for the functions in this module is determined by the following environment variables, in that order: * ``LC_TIME``, * ``LC_ALL``, and * ``LANG`` ...
mit
clumsy/intellij-community
python/lib/Lib/site-packages/django/contrib/gis/tests/geo3d/tests.py
69
11306
import os import re from django.utils.unittest import TestCase from django.contrib.gis.db.models import Union, Extent3D from django.contrib.gis.geos import GEOSGeometry, Point, Polygon from django.contrib.gis.utils import LayerMapping, LayerMapError from models import City3D, Interstate2D, Interstate3D, \ Intersta...
apache-2.0
danielreed/python-hpOneView
tests/unit/resources/networking/test_fabrics.py
2
2336
# -*- coding: utf-8 -*- ### # (C) Copyright (2012-2016) Hewlett Packard Enterprise Development LP # # 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 limi...
mit
Luise-li/haroopad
node_modules/grunt-contrib-compress/node_modules/grunt-lib-contrib/node_modules/gzip-js/node_modules/deflate-js/test/runner.py
177
1688
#!/usr/bin/env python import argparse import deflate import inflate from colorama import Fore testDir = 'test-files' outDir = 'test-outs' allPassed = True parser = argparse.ArgumentParser(description='Process command-line arguments') parser.add_argument('--test', metavar='path/to/file', type=str, default='both', na...
gpl-3.0
Affix/fas
plugins/fas-plugin-show/show/versions/003_change_owner_to_id.py
11
2287
# -*- coding: utf-8 -*- # # Copyright © 2008 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hope that it # will be useful, but WITH...
gpl-2.0
karthik-sethuraman/Snowmass-ONFOpenTransport
RI/flask_server/tapi_server/models/tapi_photonic_media_service_interface_point_augmentation1.py
4
3121
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from tapi_server.models.base_model_ import Model from tapi_server.models.tapi_photonic_media_media_channel_service_interface_point_spec import TapiPhotonicMediaMediaCha...
apache-2.0
mitar/django
django/middleware/http.py
105
1643
from django.utils.http import http_date, parse_http_date_safe class ConditionalGetMiddleware(object): """ Handles conditional GET operations. If the response has a ETag or Last-Modified header, and the request has If-None-Match or If-Modified-Since, the response is replaced by an HttpNotModified. ...
bsd-3-clause
klmitch/nova
doc/source/conf.py
1
8713
# 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 ...
apache-2.0
emonty/git-upstream
git_upstream/lib/pygitcompat.py
2
3387
# # Copyright (c) 2012, 2013, 2014 Hewlett-Packard Development Company, L.P. # # 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
rhelmer/socorro-lib
scripts/startFtpScraper.py
11
1894
#! /usr/bin/env python # 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/. """ startFtpScraper.py is used to get the primary nightly builds from ftp.mozilla.org, record the...
mpl-2.0
diogocs1/comps
web/addons/purchase_requisition/wizard/__init__.py
376
1112
# -*- 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...
apache-2.0
mewtaylor/django
tests/force_insert_update/tests.py
381
2213
from __future__ import unicode_literals from django.db import DatabaseError, IntegrityError, transaction from django.test import TestCase from .models import ( Counter, InheritedCounter, ProxyCounter, SubCounter, WithCustomPK, ) class ForceTests(TestCase): def test_force_update(self): c = Counter.ob...
bsd-3-clause
papouso/odoo
addons/email_template/__openerp__.py
260
3068
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009 Sharoon Thomas # Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it ...
agpl-3.0
fatboystring/csv_generator
csv_generator/admin.py
1
5508
""" Admin for the csv_generator app """ from csv_generator.forms import CsvGeneratorForm, CsvGeneratorColumnForm from csv_generator.forms import CsvGeneratorColumnFormSet from csv_generator.models import CsvGenerator, CsvGeneratorColumn from csv_generator.views import CsvExportView from django.contrib import admin from...
mit
cschlessinger/dbc-civichack-artistnonprofit
Backend/test.py
1
4925
import urllib from pprint import pprint import json import xml.etree.ElementTree as ET import datetime from flask import Flask, request, redirect, session, url_for, current_app import os import re app = Flask(__name__) # print(json.dumps(returnDirections)) @app.route("/") def getGoogle(): return "Potato" # cL...
mit
buildhappy/ice
java/test/src/main/java/test/Ice/interceptor/run.py
3
1141
#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # *************************************...
gpl-2.0
donkirkby/django
django/conf/locale/id/formats.py
504
2135
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j N Y' DATETIME_FORMAT = "j N Y, ...
bsd-3-clause
tedsunnyday/SE-Server
server/lib/requests/packages/charade/compat.py
2943
1157
######################## BEGIN LICENSE BLOCK ######################## # Contributor(s): # Ian Cordasco - port to Python # # 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 # versio...
apache-2.0
rossella/neutron
quantum/plugins/cisco/db/l2network_models.py
3
4834
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011, Cisco Systems, 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-...
apache-2.0
jcpowermac/ansible
lib/ansible/modules/cloud/ovirt/ovirt_networks.py
51
10464
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (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 #...
gpl-3.0
bak1an/django
django/template/utils.py
53
3665
import functools import os from collections import Counter, OrderedDict from django.apps import apps from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.functional import cached_property from django.utils.module_loading import import_string class InvalidTemplate...
bsd-3-clause
tinkerinestudio/Tinkerine-Suite
TinkerineSuite/pypy/lib_pypy/numpypy/core/numeric.py
2
13368
from _numpypy import array, ndarray, int_, float_, bool_ #, complex_# , longlong from _numpypy import concatenate import math import sys import _numpypy as multiarray # ARGH from numpypy.core.arrayprint import array2string newaxis = None def asanyarray(a, dtype=None, order=None, maskna=None, ownmaskna=False): ""...
agpl-3.0
manishdwibedy/SCaller
vendor/mockery/mockery/docs/conf.py
468
8442
# -*- coding: utf-8 -*- # # Mockery Docs documentation build configuration file, created by # sphinx-quickstart on Mon Mar 3 14:04:26 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. ...
mit
HackatONG-ProgramAR/resoluciones-unc
process/person.py
1
1321
# -*- coding: utf-8 *-* import codecs from iepy.models import Entity, EntityOccurrence from process.regexp_ner import RegExpNERRunner, options_re, options_file_re,\ upperletters_re, lowerletters_re, tokenized_re class PersonNERRunner(RegExpNERRunner): def __init__(self, override=False): # TODO: wri...
bsd-3-clause
cglewis/vcontrol
vcontrol/rest/commands/build.py
2
2472
from ..helpers import get_allowed from ..helpers import json_yield import subprocess import uuid import web class BuildCommandR: """ This endpoint is building Docker images on an machine. """ allow_origin, rest_url = get_allowed.get_allowed() INDEX_HTML = """ <html> <head> <script src...
apache-2.0
sergeykolychev/mxnet
example/image-classification/symbols/resnext.py
57
9928
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
magfest/ubersystem
uber/site_sections/merch_admin.py
1
13423
import cherrypy from pockets import listify from six import string_types from uber.config import c from uber.decorators import ajax, all_renderable, credit_card, public from uber.errors import HTTPRedirect from uber.models import ArbitraryCharge, Attendee, MerchDiscount, MerchPickup, \ MPointsForCash, NoShirt, Old...
agpl-3.0
alshedivat/tensorflow
tensorflow/python/client/events_writer_test.py
156
2713
# 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...
apache-2.0
dslomov/intellij-community
python/lib/Lib/htmllib.py
104
12740
"""HTML 2.0 parser. See the HTML 2.0 specification: http://www.w3.org/hypertext/WWW/MarkUp/html-spec/html-spec_toc.html """ import sgmllib from formatter import AS_IS __all__ = ["HTMLParser", "HTMLParseError"] class HTMLParseError(sgmllib.SGMLParseError): """Error raised when an HTML document can't be parsed....
apache-2.0
DayGitH/Python-Challenges
DailyProgrammer/20120224B_2.py
1
4705
""" A 30x30 grid of squares contains 900 fleas, initially one flea per square. When a bell is rung, each flea jumps to an adjacent square at random (usually 4 possibilities, except for fleas on the edge of the grid or at the corners). What is the expected number of unoccupied squares after 50 rings of the bell? Give y...
mit
apocalypsebg/odoo
addons/stock/report/product_stock.py
376
4868
# -*- 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
Phil-LiDAR2-Geonode/pl2-geonode
geonode/documents/search_indexes.py
25
4335
from agon_ratings.models import OverallRating from dialogos.models import Comment from django.contrib.contenttypes.models import ContentType from django.db.models import Avg from haystack import indexes from geonode.documents.models import Document class DocumentIndex(indexes.SearchIndex, indexes.Indexable): id =...
gpl-3.0
RenaudParis/servo
tests/wpt/web-platform-tests/tools/pywebsocket/src/test/test_handshake_hybi00.py
466
17345
#!/usr/bin/env python # # Copyright 2011, 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...
mpl-2.0
TheTacoScott/tacozmq
cherrypy/lib/encoding.py
39
15354
import struct import time import cherrypy from cherrypy._cpcompat import basestring, BytesIO, ntob, set, unicodestr from cherrypy.lib import file_generator from cherrypy.lib import set_vary_header def decode(encoding=None, default_encoding='utf-8'): """Replace or extend the list of charsets used to decode a requ...
mit
morenopc/edx-platform
common/lib/xmodule/xmodule/tests/test_capa_module.py
3
72135
# -*- coding: utf-8 -*- """ Tests of the Capa XModule """ # pylint: disable=C0111 # pylint: disable=R0904 # pylint: disable=C0103 # pylint: disable=C0302 import datetime import json import random import os import textwrap import unittest from mock import Mock, patch import webob from webob.multidict import MultiDict ...
agpl-3.0
ivan-fedorov/intellij-community
python/lib/Lib/site-packages/django/contrib/messages/tests/base.py
73
17612
import warnings from django import http from django.test import TestCase from django.conf import settings from django.utils.translation import ugettext_lazy from django.utils.unittest import skipIf from django.contrib.messages import constants, utils, get_level, set_level from django.contrib.messages.api import Messag...
apache-2.0
Southpaw-TACTIC/TACTIC
src/pyasm/prod/web/prod_input_wdg.py
1
18111
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
epl-1.0
mahabs/nitro
nssrc/com/citrix/netscaler/nitro/resource/config/system/systemglobal_authenticationldappolicy_binding.py
1
6849
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
apache-2.0
KilroggD/Zend2-Basement-PHP
vendor/doctrine/mongodb-odm/docs/en/_exts/configurationblock.py
2577
3506
#Copyright (c) 2010 Fabien Potencier # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, modify, merge, publish, distrib...
gpl-3.0
alexandrul-ci/robotframework
utest/running/test_userlibrary.py
4
4877
import unittest import os from robot.running import userkeyword from robot.running.model import ResourceFile, UserKeyword from robot.running.userkeyword import UserLibrary from robot.errors import DataError from robot.utils.asserts import (assert_equal, assert_none, assert_raises_with_...
apache-2.0
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/pandas/tests/formats/test_format.py
7
165663
# -*- coding: utf-8 -*- # TODO(wesm): lots of issues making flake8 hard # flake8: noqa from __future__ import print_function from distutils.version import LooseVersion import re from pandas.compat import (range, zip, lrange, StringIO, PY3, u, lzip, is_platform_windows, ...
gpl-3.0
daavery/audacity
lib-src/portaudio-v19/test/patest_suggested_vs_streaminfo_latency.py
30
5504
#!/usr/bin/env python """ Run and graph the results of patest_suggested_vs_streaminfo_latency.c Requires matplotlib for plotting: http://matplotlib.sourceforge.net/ """ import os from pylab import * import numpy from matplotlib.backends.backend_pdf import PdfPages testExeName = "PATest.exe" # rename to...
gpl-2.0
ptchankue/youtube-dl
youtube_dl/extractor/karaoketv.py
105
1241
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_urllib_parse_unquote_plus from ..utils import ( js_to_json, ) class KaraoketvIE(InfoExtractor): _VALID_URL = r'http://karaoketv\.co\.il/\?container=songs&id=(?P<id>[0-9]+)' _TEST = { ...
unlicense
Alberto-Beralix/Beralix
i386-squashfs-root/usr/lib/python2.7/encodings/iso2022_kr.py
816
1053
# # iso2022_kr.py: Python Unicode Codec for ISO2022_KR # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_iso2022, codecs import _multibytecodec as mbc codec = _codecs_iso2022.getcodec('iso2022_kr') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncod...
gpl-3.0
dvliman/jaikuengine
.google_appengine/google/appengine/_internal/django/utils/simplejson/decoder.py
23
11975
"""Implementation of JSONDecoder """ import re import sys import struct from google.appengine._internal.django.utils.simplejson.scanner import make_scanner c_scanstring = None __all__ = ['JSONDecoder'] FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL def _floatconstants(): _BYTES = '7FF80000000000007FF000000000000...
apache-2.0
mapennell/ansible
v1/ansible/utils/vault.py
112
18771
# (c) 2014, James Tanner <tanner.jc@gmail.com> # # 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 i...
gpl-3.0
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/social/backends/odnoklassniki.py
61
7050
""" Odnoklassniki OAuth2 and Iframe Application backends, docs at: http://psa.matiasaguirre.net/docs/backends/odnoklassnikiru.html """ from hashlib import md5 from social.p3 import unquote from social.backends.base import BaseAuth from social.backends.oauth import BaseOAuth2 from social.exceptions import AuthFaile...
agpl-3.0
jabber-at/hp
hp/blog/middleware.py
1
2222
# -*- coding: utf-8 -*- # # This file is part of the jabber.at homepage (https://github.com/jabber-at/hp). # # This project 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...
gpl-3.0
Lh4cKg/sl4a
python/src/Lib/email/test/test_email_codecs.py
140
2849
# Copyright (C) 2002-2006 Python Software Foundation # Contact: email-sig@python.org # email package unit tests for (optional) Asian codecs import unittest from test.test_support import TestSkipped, run_unittest from email.test.test_email import TestEmailBase from email.Charset import Charset from email.Header import...
apache-2.0
CallaJun/hackprince
indico/skimage/measure/_polygon.py
44
5358
import numpy as np from scipy import signal def approximate_polygon(coords, tolerance): """Approximate a polygonal chain with the specified tolerance. It is based on the Douglas-Peucker algorithm. Note that the approximated polygon is always within the convex hull of the original polygon. Param...
lgpl-3.0
boooka/GeoPowerOff
venv/lib/python2.7/site-packages/setuptools/tests/__init__.py
41
12531
"""Tests for the 'setuptools' package""" import sys import os import unittest import doctest import distutils.core import distutils.cmd from distutils.errors import DistutilsOptionError, DistutilsPlatformError from distutils.errors import DistutilsSetupError from distutils.core import Extension from distutils.version i...
apache-2.0
brainstorm/bcbio-nextgen
bcbio/structural/annotate.py
1
3941
"""Annotate structural variant calls with associated genes. """ import os from bcbio import utils from bcbio.bam import ref from bcbio.distributed.transaction import file_transaction from bcbio.pipeline import datadict as dd from bcbio.provenance import do from bcbio.structural import regions from bcbio.variation impo...
mit
Meriipu/quodlibet
tests/test_qltk_cbes.py
4
4487
# 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. from tests import TestCase, mkstemp import os from quodlibet.qltk.cbe...
gpl-2.0
jyh0082007/sigTaint
tools/perf/scripts/python/net_dropmonitor.py
2669
1738
# Monitor the system for dropped packets and proudce a report of drop locations and counts import os import sys sys.path.append(os.environ['PERF_EXEC_PATH'] + \ '/scripts/python/Perf-Trace-Util/lib/Perf/Trace') from perf_trace_context import * from Core import * from Util import * drop_log = {} kallsyms = [] def...
gpl-2.0
Molecular-Image-Recognition/Molecular-Image-Recognition
code/rmgpy/test_data/testing_database/solvation/libraries/solvent.py
3
2444
#!/usr/bin/env python # encoding: utf-8 name = "Solvent Descriptors" shortDesc = u"" longDesc = u""" """ entry( index = 1, label = "water", molecule = "O", solvent = SolventData( s_g = 2.743, b_g = 4.814, e_g = 0.822, l_g = -0.213, a_g = 3.904, c_g = -1....
mit
mottosso/mindbender-setup
bin/windows/python36/Lib/ctypes/test/test_structures.py
2
16396
import unittest from ctypes import * from ctypes.test import need_symbol from struct import calcsize import _testcapi import _ctypes_test class SubclassesTest(unittest.TestCase): def test_subclass(self): class X(Structure): _fields_ = [("a", c_int)] class Y(X): _fields_ = [...
mit
odoo-turkiye/odoo
addons/l10n_fr/wizard/fr_report_bilan.py
374
2337
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential #...
agpl-3.0
BitWriters/Zenith_project
zango/lib/python3.5/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
tobinsarah/tenshi
smartsensor_fw/deploy/ss_type.py
10
4141
#!/usr/bin/env python from array import array gameModeChannel = { "description": "The game mode channel.", "type": 0xFE, "additional": array('B', []) } allDescriptors = { "digital-in": { "description": "This is a digital sensor. It can be used to get the " + \ "state o...
apache-2.0
shanestafford/moose
python/TestHarness/testers/CSVDiff.py
25
1733
from RunApp import RunApp from CSVDiffer import CSVDiffer class CSVDiff(RunApp): @staticmethod def validParams(): params = RunApp.validParams() params.addRequiredParam('csvdiff', [], "A list of files to run CSVDiff on.") params.addParam('gold_dir', 'gold', "The directory where the \"golden stan...
lgpl-2.1
bmya/odoo-support
adhoc_modules_server/octohub/utils.py
1
1257
# Copyright (c) 2013 Alon Swartz <alon@turnkeylinux.org> # # This file is part of OctoHub. # # OctoHub 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 l...
lgpl-3.0
kosgroup/odoo
odoo/addons/test_mimetypes/tests/test_guess_mimetypes.py
35
1870
# -*- coding: utf-8 -*- import os.path import unittest from odoo.tools.mimetypes import guess_mimetype def contents(extension): with open(os.path.join( os.path.dirname(__file__), 'testfiles', 'case.{}'.format(extension) ), 'rb') as f: return f.read() class TestMimeGuessing(uni...
gpl-3.0
chandrureddy/kimchi-wok-chandra
src/wok/i18n.py
1
2021
# # Project Kimchi # # Copyright IBM, Corp. 2014-2015 # # 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 your option) any later version. # # Thi...
lgpl-3.0
mlperf/training_results_v0.5
v0.5.0/nvidia/submission/code/translation/pytorch/cutlass/tools/external/googletest/googlemock/scripts/generator/cpp/utils.py
1158
1153
#!/usr/bin/env python # # Copyright 2007 Neal Norwitz # Portions Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
apache-2.0
libracore/erpnext
erpnext/utilities/__init__.py
11
1076
## temp utility from __future__ import print_function, unicode_literals import frappe from erpnext.utilities.activation import get_level from frappe.utils import cstr def update_doctypes(): for d in frappe.db.sql("""select df.parent, df.fieldname from tabDocField df, tabDocType dt where df.fieldname like "%descri...
gpl-3.0
opensourcechipspark/platform_external_chromium_org
tools/perf/benchmarks/sunspider.py
24
1752
# 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. import collections import json import os from telemetry import test from telemetry.core import util from telemetry.page import page_measurement from tele...
bsd-3-clause
alex-bauer/kelvin-power-challenge
src/baselines/mean_baseline.py
1
2777
""" Generates baseline solution using mean power per line """ import pandas as pd import sys sys.path.append("../") from config import * # Define the path to the unzipped data files path_to_data=config.data_folder #Function to convert the utc timestamp to datetime def convert_time(df): df['ut_ms'] = pd.to_date...
mit
gltn/stdm
stdm/third_party/sqlalchemy/testing/suite/test_select.py
1
24377
from .. import config from .. import fixtures from ..assertions import eq_ from ..assertions import in_ from ..schema import Column from ..schema import Table from ... import bindparam from ... import case from ... import Computed from ... import exists from ... import false from ... import func from ... import Integer...
gpl-2.0
hobu/laz-perf
cpp/test/gtest/gtest-10-06-21/googletest/test/gtest_xml_output_unittest.py
13
20597
#!/usr/bin/env python # # Copyright 2006, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
lgpl-2.1
matham/kivy
kivy/core/window/window_egl_rpi.py
5
2739
''' EGL Rpi Window: EGL Window provider, specialized for the Pi Inspired by: rpi_vid_core + JF002 rpi kivy repo ''' __all__ = ('WindowEglRpi', ) from kivy.logger import Logger from kivy.core.window import WindowBase from kivy.base import EventLoop, ExceptionManager, stopTouchApp from kivy.lib.vidcore_lite import bc...
mit
mlhim/tb
src/utils/data2ld.py
1
4220
# -*- coding: UTF-8 -*- """ This is a utility to generate JSON-LD from MLHIM XML instance data. Usage: $python data2ld.py This will process the demonstration data in the default location. This is a demonstration and educational tool. It is written for clarity not production. It will probably work fine with smaller ...
gpl-3.0
ssssam/rdflib
rdflib/query.py
21
8881
import os import shutil import tempfile import warnings import types from urlparse import urlparse try: from io import BytesIO assert BytesIO except: from StringIO import StringIO as BytesIO from . import py3compat __all__ = ['Processor', 'Result', 'ResultParser', 'ResultSerializer', 'ResultE...
bsd-3-clause
erichegt/askbot-devel
askbot/deps/django_authopenid/views.py
2
53509
# -*- coding: utf-8 -*- # Copyright (c) 2007, 2008, Benoît Chesneau # Copyright (c) 2007 Simon Willison, original work on django-openid # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # ...
gpl-3.0
openstack/manila
manila/api/v1/router.py
1
7367
# Copyright 2011 OpenStack LLC. # Copyright 2011 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
apache-2.0
mikeolteanu/livepythonconsole-app-engine
boilerplate/external/oauth2client/gce.py
224
3038
# Copyright (C) 2012 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 writ...
lgpl-3.0
napalm-automation/napalm-yang
napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/__init__.py
1
19090
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
apache-2.0
take114514/namazu-ui
test.py
1
1391
import sys import unittest sys.path.append('/home/travis/google-cloud-sdk/platform/google_appengine') from google.appengine.ext import testbed from google.appengine.ext import ndb import webapp2 import main class TestHandlers(unittest.TestCase): def setUp(self): self.testbed = testbed.Testbed() s...
mit
highco-groupe/odoo
addons/portal/__init__.py
382
1140
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2011 OpenERP S.A (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
modelorganism/xi-editor
python/xi_plugin/edit.py
2
2233
# Copyright 2017 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:#www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
apache-2.0