repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
Transkribus/TranskribusDU
TranskribusDU/tasks/DU_Table/rowDetection.py
1
90019
# -*- coding: utf-8 -*- """ Build Rows for a BIESO model H. Déjean copyright Xerox 2017, Naver 2017, 2018 READ project Developed for the EU project READ. The READ project has received funding from the European Union's Horizon 2020 research and innovation programme u...
bsd-3-clause
javert/tftpudGui
src/tftpudgui/qt4/TftpServer_rc.py
1
8206
# -*- coding: utf-8 -*- # Resource object code # # Created: Thu Jan 16 21:53:07 2014 # by: The Resource Compiler for PySide (Qt v4.8.0) # # WARNING! All changes made in this file will be lost! from PySide import QtCore qt_resource_data = "\x00\x00\x05\xda\x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\x00\x00\x...
mit
ericblau/ipf-xsede
ipf/log.py
1
9917
############################################################################### # Copyright 2012-2014 The University of Texas at Austin # # # # Licensed under the Apache License, Version 2.0 (the "License"); #...
apache-2.0
karstenw/nodebox-pyobjc
examples/Extended Application/matplotlib/examples/mplot3d/text3d.py
1
1226
''' ====================== Text annotations in 3D ====================== Demonstrates the placement of text annotations on a 3D plot. Functionality shown: - Using the text function with three types of 'zdir' values: None, an axis name (ex. 'x'), or a direction tuple (ex. (1, 1, 0)). - Using the text fu...
mit
befelix/GPy
GPy/plotting/matplot_dep/base_plots.py
5
8394
# #Copyright (c) 2012, GPy authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) from matplotlib import pyplot as plt import numpy as np def ax_default(fignum, ax): if ax is None: fig = plt.figure(fignum) ax = fig.add_subplot(111) else: fig = ax.figure ...
bsd-3-clause
TeamExodus/external_chromium_org
tools/traceline/traceline/scripts/crit_sec.py
179
1416
#!/usr/bin/env python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import os from syscalls import syscalls def parseEvents(z): crits = { } calls = { } for e in z: if (e['eve...
bsd-3-clause
knagra/farnsworth
legacy/models.py
1
3275
""" Project: Farnsworth Author: Karandeep Singh Nagra Legacy Kingman site data. """ from django.db import models class TeacherRequest(models.Model): """ A request from the previous Kingman website. """ request_type = models.CharField( max_length=15, null=True, blank=True, ...
bsd-2-clause
40223142/cda11
static/Brython3.1.0-20150301-090019/Lib/signal.py
743
1646
"""This module provides mechanisms to use signal handlers in Python. Functions: alarm() -- cause SIGALRM after a specified time [Unix only] setitimer() -- cause a signal (described below) after a specified float time and the timer may restart then [Unix only] getitimer() -- get current value of timer [...
gpl-3.0
riptano/cassandra-dtest
mixed_version_test.py
4
3218
from cassandra import ConsistencyLevel, OperationTimedOut, ReadTimeout from cassandra.query import SimpleStatement from dtest import Tester, debug from tools.decorators import since class TestSchemaChanges(Tester): @since('2.0') def test_friendly_unrecognized_table_handling(self): """ After ...
apache-2.0
wscullin/spack
var/spack/repos/builtin/packages/py-phonopy/package.py
3
1832
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
Deepakpatle/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/net/failuremap.py
134
4062
# 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
hollow/nepal
nepal/web/migrations/0005_phpini_add_vhost_ptr.py
1
9858
from south.db import db from django.db import models from nepal.web.models import * class Migration: def forwards(self, orm): # Adding field 'PHPIni.vhost' db.add_column('php_ini', 'vhost', orm['web.phpini:vhost']) def backwards(self, orm): # D...
bsd-3-clause
schriftgestalt/drawbot
drawBot/ui/drawView.py
4
3054
from Foundation import NSURL from AppKit import NSDragOperationNone, NSBezelBorder from Quartz import PDFView, PDFThumbnailView, PDFDocument from vanilla import Group epsPasteBoardType = "CorePasteboardFlavorType 0x41494342" class DrawBotPDFThumbnailView(PDFThumbnailView): def draggingUpdated_(self, draggingIn...
bsd-2-clause
bmotlaghFLT/FLT_PhantomJS
src/qt/qtwebkit/Tools/Scripts/webkitpy/port/server_process_unittest.py
121
5514
# Copyright (C) 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 of conditions and the f...
bsd-3-clause
simbha/mAngE-Gin
lib/django/utils/safestring.py
66
4366
""" Functions for working with "safe strings": strings that can be displayed safely without further escaping in HTML. Marking something as a "safe string" means that the producer of the string has already turned characters that should not be interpreted by the HTML engine (e.g. '<') into the appropriate entities. """ f...
mit
elrosti/mopidy-gmusic
tests/test_lru_cache.py
2
1297
import unittest from mopidy_gmusic.lru_cache import LruCache class ExtensionTest(unittest.TestCase): def test_init(self): c = LruCache() self.assertIsNotNone(c) self.assertTrue(c.get_max_size() > 0, 'Size should be greater then zero!') def test_init_size(self...
apache-2.0
augustozuniga/arisgames
zxing-master/cpp/scons/scons-local-2.0.0.final.0/SCons/Tool/dvi.py
34
2386
"""SCons.Tool.dvi Common DVI Builder definition for various other Tool modules that use it. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated document...
mit
ActiveState/code
recipes/Python/483742_Easy_Cross_Platform_Excel_Parsing/recipe-483742.py
1
7477
class readexcel(object): """ Simple OS Independent Class for Extracting Data from Excel Files the using xlrd module found at http://www.lexicon.net/sjmachin/xlrd.htm Versions of Excel supported: 2004, 2002, XP, 2000, 97, 95, 5, 4, 3 xlrd version tested: 0.5.2 Data ...
mit
jhoenicke/python-trezor
trezorlib/tests/device_tests/test_msg_lisk_getpublickey.py
3
1190
# This file is part of the Trezor project. # # Copyright (C) 2012-2018 SatoshiLabs and contributors # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License version 3 # as published by the Free Software Foundation. # # This library is distrib...
lgpl-3.0
synsun/robotframework
src/robot/output/console/highlighting.py
2
6055
# Copyright 2008-2015 Nokia Solutions and Networks # # 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
gitHubOffical/shadowsocks_analysis
shadowsocks/crypto/m2.py
21
3442
#!/usr/bin/env python # Copyright (c) 2014 clowwindy # # 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, me...
mit
HellerCommaA/flask-angular
lib/python2.7/site-packages/sqlalchemy/dialects/sqlite/base.py
6
34406
# sqlite/base.py # Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: sqlite :name: SQLite Date and Time Types ------------------- SQ...
mit
schleichdi2/OpenNfr_E2_Gui-6.0
lib/python/Components/FanControl.py
35
4097
import os from Components.config import config, ConfigSubList, ConfigSubsection, ConfigSlider from Tools.BoundFunction import boundFunction import NavigationInstance from enigma import iRecordableService, pNavigation from boxbranding import getBoxType class FanControl: # ATM there's only support for one fan def __...
gpl-2.0
jmptrader/rethinkdb
external/gtest_1.7.0/test/gtest_xml_outfiles_test.py
2526
5340
#!/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...
apache-2.0
stevenzhang18/Indeed-Flask
lib/flask/ctx.py
776
14266
# -*- coding: utf-8 -*- """ flask.ctx ~~~~~~~~~ Implements the objects required to keep the context. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import with_statement import sys from functools import update_wrapper from werkzeug.excep...
apache-2.0
henkhaus/wow
wowlib/wowapi.py
1
2529
import urllib.request, json, time #Variables apikey = "8sv23p3ruq39kfng2phrrau3nstevp4j" #realm = "Shadow-Council" #Build url for auction data requests def auctionurl (server): key = "8sv23p3ruq39kfng2phrrau3nstevp4j" realm = server base = "https://us.api.battle.net/wow/auction/data/" mid...
apache-2.0
denys-duchier/django
django/utils/formats.py
11
9088
import datetime import decimal import unicodedata from importlib import import_module from django.conf import settings from django.utils import dateformat, datetime_safe, numberformat from django.utils.functional import lazy from django.utils.safestring import mark_safe from django.utils.translation import ( check...
bsd-3-clause
devcline/mtasa-blue
vendor/google-breakpad/src/tools/gyp/test/additional-targets/gyptest-additional.py
139
1530
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies simple actions when using an explicit build target of 'all'. """ import TestGyp test = TestGyp.TestGyp() test.run_gyp('all.g...
gpl-3.0
yamila-moreno/django
tests/gis_tests/relatedapp/models.py
67
1844
from django.utils.encoding import python_2_unicode_compatible from ..models import models class SimpleModel(models.Model): objects = models.GeoManager() class Meta: abstract = True required_db_features = ['gis_enabled'] @python_2_unicode_compatible class Location(SimpleModel): point =...
bsd-3-clause
noslenfa/tdjangorest
uw/lib/python2.7/site-packages/paramiko/client.py
3
21652
# Copyright (C) 2006-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko 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 (a...
apache-2.0
fabiocerqueira/django-allauth
allauth/socialaccount/providers/foursquare/views.py
71
1366
import requests from allauth.socialaccount.providers.oauth2.views import (OAuth2Adapter, OAuth2LoginView, OAuth2CallbackView) from .provider import FoursquareProvider class FoursquareOAuth2Adapter(OAu...
mit
openstack/heat
heat/engine/resources/aws/ec2/network_interface.py
8
6159
# # 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
wmvanvliet/mne-python
mne/io/tag.py
4
17633
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Matti Hämäläinen <msh@nmr.mgh.harvard.edu> # # License: BSD (3-clause) from functools import partial import struct import numpy as np from .constants import (FIFF, _dig_kind_named, _dig_cardinal_named, _ch_kind_named, _ch_...
bsd-3-clause
arnavd96/Cinemiezer
myvenv/lib/python3.4/site-packages/pip/vcs/git.py
473
7898
import tempfile import re import os.path from pip.util import call_subprocess from pip.util import display_path, rmtree from pip.vcs import vcs, VersionControl from pip.log import logger from pip.backwardcompat import url2pathname, urlparse urlsplit = urlparse.urlsplit urlunsplit = urlparse.urlunsplit class Git(Versi...
mit
harisibrahimkv/django
tests/view_tests/tests/test_defaults.py
60
5068
import datetime from django.contrib.sites.models import Site from django.http import Http404 from django.template import TemplateDoesNotExist from django.test import RequestFactory, TestCase from django.test.utils import override_settings from django.views.defaults import ( bad_request, page_not_found, permission_...
bsd-3-clause
GaetanCambier/CouchPotatoServer
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/viddler.py
25
3298
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( float_or_none, int_or_none, ) class ViddlerIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?viddler\.com/(?:v|embed|player)/(?P<id>[a-z0-9]+)' _TEST = { "url": "http://www.viddler.com/v/4390378...
gpl-3.0
tejo-esperanto/pasportaservo
pasportaservo/settings/dev.py
1
1693
from .base import * # isort:skip import logging from django.contrib.messages import constants as message_level from debug_toolbar.settings import PANELS_DEFAULTS as DEBUG_PANEL_DEFAULTS ENVIRONMENT = 'DEV' SECRET_KEY = 'N0_s3kre7~k3Y' DEBUG = True MESSAGE_LEVEL = message_level.DEBUG ALLOWED_HOSTS = [ 'localho...
agpl-3.0
ARL-UTEP-OC/emubox
workshop-creator/python27-64bit-gtk3/Lib/site-packages/gi/overrides/Gtk.py
1
57878
# -*- Mode: Python; py-indent-offset: 4 -*- # vim: tabstop=4 shiftwidth=4 expandtab # # Copyright (C) 2009 Johan Dahlin <johan@gnome.org> # 2010 Simon van der Linden <svdlinden@src.gnome.org> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser Ge...
gpl-2.0
eueung/svg-edit-mirror
extras/topo.py
48
1292
import sys, json, codecs infile = json.load(codecs.open(sys.argv[1], "r", "utf-8")) outfile = codecs.open(sys.argv[1] + ".po", "w", "utf-8") out = [] out.append("""# LANGUAGE FILE FOR SVG-EDIT, AUTOGENERATED BY TOPO.PY msgid "" msgstr "" "Content-Type: text/plain; charset=utf-8\\n" "Content-Transfer-Encoding: 8bit\\n...
mit
rhinstaller/initial-setup
tests/pylint/intl.py
12
2668
# I18N-related pylint module # # Copyright (C) 2013 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, or (at your option) any later version. # This program is distribute...
gpl-2.0
Brocade-OpenSource/OpenStack-DNRM-Nova
nova/db/sqlalchemy/migrate_repo/versions/176_add_availability_zone_to_volume_usage_cache.py
16
2048
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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-...
apache-2.0
rainaashutosh/MyTestRekall
rekall-core/rekall/plugins/common/bovine.py
6
4865
# Rekall Memory Forensics # Copyright 2014 Google Inc. All Rights Reserved. # # 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 ver...
gpl-2.0
tersmitten/ansible
lib/ansible/modules/cloud/azure/azure_rm_availabilityset_facts.py
7
4695
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2016, Julien Stroheker <juliens@microsoft.com> # 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_ve...
gpl-3.0
xq262144/hue
desktop/core/ext-py/Django-1.6.10/tests/model_inheritance_regress/models.py
49
4981
from __future__ import unicode_literals import datetime from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Place(models.Model): name = models.CharField(max_length=50) address = models.CharField(max_length=80) class Meta: ...
apache-2.0
ckuethe/gnuradio
gr-blocks/python/blocks/qa_file_metadata.py
40
6783
#!/usr/bin/env python # # Copyright 2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your optio...
gpl-3.0
clips/pattern
pattern/vector/stemmer.py
1
12662
##### PATTERN | VECTOR | PORTER STEMMER ############################################################ # Copyright (c) 2010 University of Antwerp, Belgium # Author: Tom De Smedt <tom@organisms.be> # License: BSD (see LICENSE.txt for details). # http://www.clips.ua.ac.be/pages/pattern ####################################...
bsd-3-clause
Khilo84/PyQt4
examples/dbus/pingpong/ping.py
8
3136
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2011 Riverbank Computing Limited. ## Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENS...
gpl-2.0
mpetyx/palmdrop
venv/lib/python2.7/site-packages/south/management/commands/convert_to_south.py
129
3725
""" Quick conversion command module. """ from __future__ import print_function from optparse import make_option import sys from django.core.management.base import BaseCommand from django.core.management.color import no_style from django.conf import settings from django.db import models from django.core import manage...
apache-2.0
shyamalschandra/catkin
test/unit_tests/test_builder.py
9
3354
# -*- coding: utf-8 -*- import os import unittest try: import catkin.builder except ImportError as e: raise ImportError( 'Please adjust your pythonpath before running this test: %s' % str(e) ) class BuilderTest(unittest.TestCase): # TODO: Add tests for catkin_make and catkin_make_isolated ...
bsd-3-clause
lseyesl/phantomjs
src/breakpad/src/tools/gyp/pylib/gyp/input.py
137
84791
#!/usr/bin/python # Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from compiler.ast import Const from compiler.ast import Dict from compiler.ast import Discard from compiler.ast import List from compiler.ast im...
bsd-3-clause
auduny/home-assistant
tests/components/api/test_init.py
9
18834
"""The tests for the Home Assistant API component.""" # pylint: disable=protected-access import asyncio import json from unittest.mock import patch from aiohttp import web import pytest import voluptuous as vol from homeassistant import const from homeassistant.bootstrap import DATA_LOGGING import homeassistant.core ...
apache-2.0
philsong/p2pool
p2pool/data.py
63
38817
from __future__ import division import hashlib import os import random import sys import time from twisted.python import log import p2pool from p2pool.bitcoin import data as bitcoin_data, script, sha256 from p2pool.util import math, forest, pack # hashlink hash_link_type = pack.ComposedType([ ('state', pack.Fi...
gpl-3.0
freeflightsim/fg-flying-club
google_appengine/lib/yaml/lib/yaml/cyaml.py
125
3233
__all__ = ['CBaseLoader', 'CSafeLoader', 'CLoader', 'CBaseDumper', 'CSafeDumper', 'CDumper'] from _yaml import CParser, CEmitter from constructor import * from serializer import * from representer import * from resolver import * class CBaseLoader(CParser, BaseConstructor, BaseResolver): def __init__(...
gpl-2.0
0x90sled/catapult
third_party/Paste/paste/exceptions/formatter.py
49
19468
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php """ Formatters for the exception data that comes from ExceptionCollector. """ # @@: TODO: # Use this: http://www.zope.org/Members/tino/VisualTraceback...
bsd-3-clause
fitermay/intellij-community
python/lib/Lib/site-packages/django/db/models/expressions.py
229
4992
import datetime from django.utils import tree from django.utils.copycompat import deepcopy class ExpressionNode(tree.Node): """ Base class for all query expressions. """ # Arithmetic connectors ADD = '+' SUB = '-' MUL = '*' DIV = '/' MOD = '%%' # This is a quoted % operator - it i...
apache-2.0
holmes/intellij-community
python/helpers/profiler/thrift/protocol/TBase.py
208
2637
# # 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
dsarlis/SAD-Spring-2016-Project-Team4
ApacheCMDA-Backend/project/target/node-modules/webjars/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py
505
118664
# 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. """Xcode project file generator. This module is both an Xcode project file generator and a documentation of the Xcode project file format. Knowledge of the proje...
mit
2014cdag10/2014cdaGG
wsgi/static/Brython2.1.0-20140419-113919/Lib/xml/dom/xmlbuilder.py
873
12377
"""Implementation of the DOM Level 3 'LS-Load' feature.""" import copy import xml.dom from xml.dom.NodeFilter import NodeFilter __all__ = ["DOMBuilder", "DOMEntityResolver", "DOMInputSource"] class Options: """Features object that has variables set for each DOMBuilder feature. The DOMBuilder class uses a...
gpl-2.0
dternyak/React-Redux-Flask
tests/test_api.py
7
2804
from testing_config import BaseTestConfig from application.models import User import json from application.utils import auth class TestAPI(BaseTestConfig): some_user = { "email": "one@gmail.com", "password": "something1" } def test_get_spa_from_index(self): result = self.app.get("...
mit
skycucumber/restful
python/venv/lib/python2.7/site-packages/flask/config.py
781
6234
# -*- coding: utf-8 -*- """ flask.config ~~~~~~~~~~~~ Implements the configuration related objects. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import imp import os import errno from werkzeug.utils import import_string from ._compat import string_type...
gpl-2.0
lukecwik/incubator-beam
sdks/python/apache_beam/metrics/execution_test.py
1
4617
# # 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 us...
apache-2.0
arpitparmar5739/youtube-dl
youtube_dl/extractor/vh1.py
199
9798
from __future__ import unicode_literals from .mtv import MTVIE import re from ..utils import fix_xml_ampersands class VH1IE(MTVIE): IE_NAME = 'vh1.com' _FEED_URL = 'http://www.vh1.com/player/embed/AS3/fullepisode/rss/' _TESTS = [{ 'url': 'http://www.vh1.com/video/metal-evolution/full-episodes/pr...
unlicense
MattAllmendinger/coala
coalib/parsing/StringProcessing/Match.py
18
1536
from coalib.misc.Decorators import generate_ordering, generate_repr @generate_repr("match", "range") @generate_ordering("range", "match") class Match: """ Stores information about a single textual match. """ def __init__(self, match, position): """ Instantiates a new Match. :...
agpl-3.0
Srisai85/scipy
scipy/sparse/spfuncs.py
149
2823
""" Functions that operate on sparse matrices """ from __future__ import division, print_function, absolute_import __all__ = ['count_blocks','estimate_blocksize'] from .csr import isspmatrix_csr, csr_matrix from .csc import isspmatrix_csc from ._sparsetools import csr_count_blocks def extract_diagonal(A): rais...
bsd-3-clause
nirmeshk/oh-mainline
vendor/packages/gdata/src/gdata/Crypto/Util/RFC1751.py
228
20114
#!/usr/local/bin/python # rfc1751.py : Converts between 128-bit strings and a human-readable # sequence of words, as defined in RFC1751: "A Convention for # Human-Readable 128-bit Keys", by Daniel L. McDonald. __revision__ = "$Id: RFC1751.py,v 1.6 2003/04/04 15:15:10 akuchling Exp $" import string, binascii binary=...
agpl-3.0
nvoron23/arangodb
3rdParty/V8-4.3.61/tools/release/auto_push.py
22
3792
#!/usr/bin/env python # Copyright 2013 the V8 project authors. 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...
apache-2.0
kumar303/pto-planner
apps/commons/tests/test_migrations.py
10
2015
import re from os import listdir from os.path import join, dirname import test_utils import manage class MigrationTests(test_utils.TestCase): """Sanity checks for the SQL migration scripts.""" @staticmethod def _migrations_path(): """Return the absolute path to the migration script folder.""" ...
bsd-3-clause
ppwwyyxx/tensorflow
tensorflow/python/ops/weights_broadcast_ops.py
133
7197
# 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
srvg/ansible
test/units/plugins/shell/test_powershell.py
31
5419
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.plugins.shell.powershell import _parse_clixml, ShellModule def test_parse_clixml_empty(): empty = b'#< CLIXML\r\n<Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"></Objs>' expect...
gpl-3.0
flakey-bit/plugin.audio.spotify
resources/libs/cherrypy/lib/cpstats.py
10
23042
"""CPStats, a package for collecting and reporting on program statistics. Overview ======== Statistics about program operation are an invaluable monitoring and debugging tool. Unfortunately, the gathering and reporting of these critical values is usually ad-hoc. This package aims to add a centralized place for gather...
gpl-3.0
jralls/gramps
gramps/gui/widgets/fanchartdesc.py
3
28101
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2001-2007 Donald N. Allingham, Martin Hawlisch # Copyright (C) 2009 Douglas S. Blank # Copyright (C) 2012 Benny Malengier # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
gpl-2.0
0x00-0x00/shemutils
src/database.py
1
7610
import sqlite3 import gevent from copy import copy from gevent.event import Event from gevent.queue import Queue from shemutils.logger import Logger from shemutils.database_errors import InvalidInitializer, InvalidSize '# Define static variables for module' INTEGER = "INTEGER" TEXT = "TEXT" NULL = "NULL" class Contr...
mit
pombredanne/plumbum
docs/conf.py
9
8308
# -*- coding: utf-8 -*- # # Plumbum Shell Combinators documentation build configuration file, created by # sphinx-quickstart on Sun Apr 29 16:24:32 2012. # # 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 # autogener...
mit
amjoconn/django-zebra
docs/conf.py
4
7862
# -*- coding: utf-8 -*- # # django-zebra documentation build configuration file, created by # sphinx-quickstart on Thu Feb 16 22:57:53 2012. # # 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
lnls-sirius/dev-packages
siriuspy/siriuspy/pwrsupply/pructrl/prucparms.py
1
6133
"""PRU Controller Parameters. These parameters are used in PRUController class to interact with BSMP devices. """ from ..bsmp.constants import ConstPSBSMP as _const from ..psctrl.psmodel import PSModelFactory as _PSModelFactory class PRUCParmsFBP: """FBP-specific PRUC parameters.""" FREQ_SCAN = 5.0 # [Hz]...
gpl-3.0
daeseokyoun/youtube-dl
youtube_dl/extractor/vodlocker.py
19
2762
# -*- coding: utf-8 -*- from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( ExtractorError, NO_DEFAULT, sanitized_Request, urlencode_postdata, ) class VodlockerIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?vodlocker\.(?:com|city)/(?:embed-)?(?P<i...
unlicense
walimis/openembedded-gpib2410
contrib/source-checker/oe-checksums-sorter.py
5
1716
#!/usr/bin/env python # ex:ts=4:sw=4:sts=4:et # Copyright (C) 2007 OpenedHand # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope that it wil...
mit
dhiru1602/android_kernel_samsung_jf
tools/perf/scripts/python/net_dropmonitor.py
4235
1554
# 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
santosh-surya/pcb-cnc-machine
desktop-application/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py
713
115880
# 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. from compiler.ast import Const from compiler.ast import Dict from compiler.ast import Discard from compiler.ast import List from compiler.ast import Module from co...
gpl-3.0
dawnpower/nova
nova/tests/unit/objects/test_virt_cpu_topology.py
94
1397
# 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 # d...
apache-2.0
FurCode/RoboCop
core/reload.py
8
5196
import collections import glob import os import re import sys import traceback if 'mtimes' not in globals(): mtimes = {} if 'lastfiles' not in globals(): lastfiles = set() def make_signature(f): return f.func_code.co_filename, f.func_name, f.func_code.co_firstlineno def format_plug(plug, kind='', lpa...
gpl-3.0
qzane/you-get
src/you_get/extractors/mgtv.py
2
5914
#!/usr/bin/env python # -*- coding: utf-8 -*- from ..common import * from ..extractor import VideoExtractor from json import loads from urllib.parse import urlsplit from os.path import dirname import re class MGTV(VideoExtractor): name = "芒果 (MGTV)" # Last updated: 2016-11-13 stream_types = [ {'...
mit
meredith-digops/ansible
test/units/modules/cloud/amazon/test_cloudformation.py
89
3685
# (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 dis...
gpl-3.0
Lujeni/ansible
lib/ansible/modules/cloud/google/gcp_mlengine_version_info.py
13
10048
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
gpl-3.0
nharraud/b2share
invenio/modules/workflows/upgrades/workflows_2014_08_12_task_results_to_dict.py
15
3644
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later...
gpl-2.0
SKIRT/PTS
do/modeling/sfr_to_lum.py
1
12053
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
agpl-3.0
tsdmgz/ansible
lib/ansible/modules/messaging/rabbitmq_parameter.py
49
4553
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Chatham Financial <oss@chathamfinancial.com> # 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'...
gpl-3.0
pusnik/pyexchange
tests/exchange2010/test_create_event.py
1
10568
""" (c) 2013 LinkedIn Corp. 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 in writing...
apache-2.0
syphar/django
django/contrib/flatpages/models.py
115
1583
from __future__ import unicode_literals from django.contrib.sites.models import Site from django.db import models from django.urls import get_script_prefix from django.utils.encoding import iri_to_uri, python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ @python_2_unicode_compatible cl...
bsd-3-clause
wevote/WebAppPublic
apis_v1/documentation_source/facebook_sign_in_doc.py
1
2777
# apis_v1/documentation_source/facebook_sign_in_doc.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- def facebook_sign_in_doc_template_values(url_root): """ Show documentation about facebookSignIn """ required_query_parameter_list = [ { 'name': 'voter_device...
bsd-3-clause
nzlosh/st2
st2common/st2common/util/http.py
3
1728
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, 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 ...
apache-2.0
WhireCrow/openwrt-mt7620
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/multiprocessing/queues.py
103
12318
# # Module implementing queues # # multiprocessing/queues.py # # Copyright (c) 2006-2008, R Oudkerk # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must ret...
gpl-2.0
sonnyhu/scikit-learn
examples/cluster/plot_birch_vs_minibatchkmeans.py
333
3694
""" ================================= Compare BIRCH and MiniBatchKMeans ================================= This example compares the timing of Birch (with and without the global clustering step) and MiniBatchKMeans on a synthetic dataset having 100,000 samples and 2 features generated using make_blobs. If ``n_clusters...
bsd-3-clause
ojengwa/oh-mainline
vendor/packages/twisted/twisted/protocols/ftp.py
18
93459
# -*- test-case-name: twisted.test.test_ftp -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ An FTP protocol implementation @author: Itamar Shtull-Trauring @author: Jp Calderone @author: Andrew Bennetts """ # System Imports import os import time import re import operator import stat im...
agpl-3.0
martynovp/edx-platform
common/djangoapps/student/migrations/0038_auto__add_usersignupsource.py
114
13943
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'UserSignupSource' db.create_table('student_usersignupsource', ( ('id', self.gf('...
agpl-3.0
cindyyu/kuma
vendor/packages/pygments/lexers/_vim_builtins.py
75
57090
# -*- coding: utf-8 -*- """ pygments.lexers._vim_builtins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This file is autogenerated by scripts/get_vimkw.py :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ # Split up in multiple functions so it's import...
mpl-2.0
perkinslr/pypyjs
website/js/pypy.js-0.2.0/lib/modules/test/test_buffer.py
34
1455
"""Unit tests for buffer objects. For now, tests just new or changed functionality. """ import sys import unittest from test import test_support class BufferTests(unittest.TestCase): def test_extended_getslice(self): # Test extended slicing by comparing with list slicing. s = "".join(chr(c) for...
mit
michalliu/OpenWrt-Firefly-Libraries
staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python2.7/distutils/version.py
259
11433
# # distutils/version.py # # Implements multiple version numbering conventions for the # Python Module Distribution Utilities. # # $Id$ # """Provides classes to represent module version numbers (one class for each style of version numbering). There are currently two such classes implemented: StrictVersion and LooseVe...
gpl-2.0
54Pany/pupy
pupy/packages/windows/all/pupwinutils/shellcode.py
28
1191
import ctypes import threading def allocate_exe(shellcode): ptr = ctypes.windll.kernel32.VirtualAlloc(ctypes.c_int(0), ctypes.c_int(len(shellcode)), ctypes.c_int(0x3000), ctypes.c_int(0x40...
bsd-3-clause
0x46616c6b/ansible
lib/ansible/modules/cloud/openstack/os_networks_facts.py
15
4624
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any late...
gpl-3.0