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
rrampage/rethinkdb
test/rql_test/connections/http_support/jinja2/_compat.py
638
4042
# -*- coding: utf-8 -*- """ jinja2._compat ~~~~~~~~~~~~~~ Some py2/py3 compatibility support based on a stripped down version of six so we don't have to depend on a specific version of it. :copyright: Copyright 2013 by the Jinja team, see AUTHORS. :license: BSD, see LICENSE for details. ""...
agpl-3.0
iam-TJ/node-gyp
gyp/test/win/gyptest-link-opt-icf.py
344
1319
#!/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. """ Make sure comdat folding optimization setting is extracted properly. """ import TestGyp import sys if sys.platform == 'win32': test...
mit
folpindo/git-repo
manifest_xml.py
48
21259
# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
apache-2.0
shot/hadoop-source-reading
src/contrib/hod/hodlib/Hod/hadoop.py
167
27677
#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
jaddison/ansible-modules-core
cloud/amazon/ec2_snapshot.py
67
10167
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
gpl-3.0
insidenothing/3D-Printing-Software
skein_engines/skeinforge-47/fabmetheus_utilities/xml_simple_reader.py
12
26047
""" The xml_simple_reader.py script is an xml parser that can parse a line separated xml text. This xml parser will read a line seperated xml text and produce a tree of the xml with a document element. Each element can have an attribute table, childNodes, a class name, parentNode, text and a link to the document elem...
gpl-2.0
telwertowski/Books-Mac-OS-X
Versions/Books_3.0b3/Bundled plugins/Amazon Importer.app/Contents/Resources/amazon.py
126
16017
"""Python wrapper for Amazon web APIs This module allows you to access Amazon's web APIs, to do things like search Amazon and get the results programmatically. Described here: http://www.amazon.com/webservices You need a Amazon-provided license key to use these services. Follow the link above to get one. These f...
mit
SodaCookie/anime
anime/demo/demo7.py
1
1660
import pygame import pygame.gfxdraw import anime from anime.math.bezier import CubicBezier, QuadraticBezier import random import math import os pygame.init() screen = pygame.display.set_mode((800, 600)) main_dir = os.path.split(os.path.abspath(__file__))[0] file = os.path.join(main_dir, 'images', 'image1.png') surf =...
mit
opps/opps
opps/containers/migrations/0004_auto__add_field_containerboxcontainers_url.py
5
19529
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from django.contrib.auth import get_user_model User = get_user_model() class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'ContainerBoxContainers.url' ...
mit
tortib/nzbToMedia
libs/mutagen/_constants.py
19
3368
"""Constants used by Mutagen.""" GENRES = [ u"Blues", u"Classic Rock", u"Country", u"Dance", u"Disco", u"Funk", u"Grunge", u"Hip-Hop", u"Jazz", u"Metal", u"New Age", u"Oldies", u"Other", u"Pop", u"R&B", u"Rap", u"Reggae", u"Rock", u"Techno", ...
gpl-3.0
Forage/Gramps
gramps/gen/utils/callman.py
1
12780
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2009 Benny Malengier # Copyright (C) 2011 Tim G L Lyons # # 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...
gpl-2.0
geosolutions-it/geonode
geonode/invitations/forms.py
4
3140
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2018 OSGeo # # 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 ver...
gpl-3.0
rhololkeolke/apo-website-devin
src/application/photos/views.py
2
7101
""" This module contains the views needed for the photo gallery features of the website """ from flaskext.flask_login import current_user, login_required from application import app from flask import render_template, flash, url_for, redirect, request, make_response, jsonify from flaskext import wtf import json, ur...
bsd-3-clause
caioserra/apiAdwords
examples/adspygoogle/dfp/v201308/line_item_service/get_line_items_by_statement.py
2
2405
#!/usr/bin/python # # Copyright 2013 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 b...
apache-2.0
jmakov/market_tia
tia/trad/sim.py
1
5372
import time import ujson as json import tia.trad.tools.ipc.naming_conventions as names import tia.trad.market.events as events import logging import tia.trad.tools.io.follow as io import tia.trad.market.filters as filters from tia.trad.tools.ipc.processLogger import PROCESS_NAME LOGGER_NAME = PROCESS_NAME + __file__.s...
mit
4honor/fail2ban
fail2ban/version.py
12
1122
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*- # vi: set ft=python sts=4 ts=4 sw=4 noet : # This file is part of Fail2Ban. # # Fail2Ban 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;...
gpl-2.0
shahar-stratoscale/nova
nova/tests/api/openstack/compute/contrib/test_admin_actions.py
1
25698
# Copyright 2011 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
SivilTaram/edx-platform
openedx/core/djangoapps/user_api/management/tests/test_email_opt_in_list.py
96
15088
# -*- coding: utf-8 -*- """Tests for the email opt-in list management command. """ import os.path import tempfile import shutil import csv from collections import defaultdict from unittest import skipUnless import ddt from django.conf import settings from django.core.management.base import CommandError from xmodule.m...
agpl-3.0
Ameriks/velo.lv
velo/velo/utils.py
1
4293
import importlib import os import requests import datetime import stat import csv def listdir(path): try: result = os.stat(path) except OSError: return [] if stat.S_ISDIR(result.st_mode): return sorted(os.listdir(path)) else: return [] def load_class(full_class_strin...
gpl-3.0
nextgis/NextGIS_QGIS_open
python/plugins/db_manager/db_plugins/spatialite/sql_dictionary.py
5
6245
# -*- coding: utf-8 -*- """ *************************************************************************** sql_dictionary.py --------------------- Date : April 2012 Copyright : (C) 2012 by Giuseppe Sucameli Email : brush dot tyler at gmail dot com ************...
gpl-2.0
webmull/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/port/mock_drt.py
118
12169
# Copyright (c) 2012 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
40223101/w16b_test
static/Brython3.1.3-20150514-095342/Lib/site-packages/pygame/SDL.py
603
1813
from browser import document SDL_INIT_VIDEO=0 SDL_GL_DOUBLEBUFFER=1 SDL_GL_DEPTH_SIZE=2 SDL_DOUBLEBUF=3 SDL_ANYFORMAT=4 SDL_ACTIVEEVENT=5 SDL_ALLEVENTS=5 SDL_KEYDOWN=6 SDL_KEYUP=7 SDL_MOUSEMOTION=8 SDL_MOUSEBUTTONDOWN=9 SDL_MOUSEBUTTONUP=10 SDL_JOYAXISMOTION=11 SDL_JOYBALLMOTION=12 SDL_JOYHATMOTION=13 SDL_JOYBUTTON...
agpl-3.0
jandecaluwe/myhdl
myhdl/test/bugs/test_bug_enum_toVHDL_2.py
4
1538
import myhdl from myhdl import * t_state = enum('WAIT_POSEDGE', 'WAIT_NEGEDGE', encoding='one_hot') def pcie_legacyint_next_state_logic(state_i, next_state_o, next_state_en_o, interrupt_pending_i, interrupt_assert_o): @always_comb def sm_output(): # state machine if state_i == t_sta...
lgpl-2.1
xificurk/keelsbot
libs/sleekxmpp/xmlstream/scheduler.py
1
7295
""" SleekXMPP: The Sleek XMPP Library Copyright (C) 2010 Nathanael C. Fritz This file is part of SleekXMPP. See the file LICENSE for copying permission. """ import time import threading import logging try: import queue except ImportError: import Queue as queue log = logging.getLogger(__name...
gpl-3.0
dongguangming/django-oscar
src/oscar/apps/dashboard/offers/views.py
23
13362
import datetime import json from django.views.generic import ListView, FormView, DeleteView from django.core.urlresolvers import reverse from django.contrib import messages from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.utils.translation import ugettext_lazy as ...
bsd-3-clause
qiuxs/ice-demos
python/Ice/optional/Server.py
1
2259
#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. # # ********************************************************************** import sys, traceback, Ice, threading Ice.loadSlice("Contact.ice") import Demo class C...
gpl-2.0
bverburg/CouchPotatoServer
libs/html5lib/constants.py
963
87346
from __future__ import absolute_import, division, unicode_literals import string import gettext _ = gettext.gettext EOF = None E = { "null-character": _("Null character in input stream, replaced with U+FFFD."), "invalid-codepoint": _("Invalid codepoint in stream."), "incorrectly-placed-so...
gpl-3.0
lizadaly/threepress
bookworm/settings.py
6
7805
import os import logging, logging.handlers # Live site settings (others should override in local.py) ROOT_PATH = os.path.dirname(__file__) DEBUG = False TEMPLATE_DEBUG = DEBUG TESTING = False # Override this in test_settings.py DATABASE_ENGINE = 'mysql' DATABASE_NAME = 'bookworm' DATABASE_USER = 'threepress' DAT...
bsd-3-clause
smart-developerr/my-first-blog
Lib/site-packages/pip/operations/check.py
342
1590
def check_requirements(installed_dists): missing_reqs_dict = {} incompatible_reqs_dict = {} for dist in installed_dists: key = '%s==%s' % (dist.project_name, dist.version) missing_reqs = list(get_missing_reqs(dist, installed_dists)) if missing_reqs: missing_reqs_dict[...
gpl-3.0
pku9104038/edx-platform
cms/djangoapps/contentstore/management/commands/tests/test_export_convert_format.py
65
2267
""" Test for export_convert_format. """ from unittest import TestCase from django.core.management import call_command, CommandError from tempfile import mkdtemp import shutil from path import path from contentstore.management.commands.export_convert_format import Command, extract_source from xmodule.tests.helpers impor...
agpl-3.0
facelessuser/subclrschm
subclrschm/lib/gui/subclrschm_app.py
1
29233
""" Sublime Text Color Scheme Editor. Licensed under MIT Copyright (c) 2013 Isaac Muse <isaacmuse@gmail.com> """ from __future__ import unicode_literals import sys import codecs import os import plistlib import threading import time import uuid import wx import traceback from .about_dialog import AboutDialog from .cu...
mit
Designist/sympy
sympy/physics/mechanics/body.py
45
5982
from sympy import Symbol from sympy.physics.mechanics import (RigidBody, Particle, ReferenceFrame, inertia) from sympy.physics.vector import Point, Vector __all__ = ['Body'] class Body(RigidBody, Particle): """ Body is a common representation of RigidBody or a Particle. ...
bsd-3-clause
mattseymour/django
tests/forms_tests/field_tests/test_durationfield.py
42
1455
import datetime from django.forms import DurationField from django.test import SimpleTestCase from django.utils.duration import duration_string from . import FormFieldAssertionsMixin class DurationFieldTest(FormFieldAssertionsMixin, SimpleTestCase): def test_durationfield_clean(self): f = DurationField...
bsd-3-clause
JoshDaly/footballdb
build/DancingPeasant/build/lib.linux-x86_64-2.7/dancingPeasant/baseFile.py
3
16020
#!/usr/bin/env python ############################################################################### # # # baseFile.py # # ...
gpl-2.0
rubenvb/skia
infra/bots/recipe_modules/build/pathkit.py
1
3760
# Copyright 2018 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. DOCKER_IMAGE = 'gcr.io/skia-public/emsdk-release:1.38.27_v1' INNER_BUILD_SCRIPT = '/SRC/skia/infra/pathkit/build_pathkit.sh' BUILD_PRODUCTS_ISOLATE_WHITELIS...
bsd-3-clause
andysim/psi4
psi4/share/psi4/databases/ACENES.py
3
162853
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2017 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This program is free software; you can redistribute it and/or modify # it under the terms of ...
gpl-2.0
Nivl/www.melvin.re
nivls_website/resume/migrations/0002_auto__chg_field_content_value_for_download.py
2
5122
# -*- 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): # Changing field 'Content.value_for_download' db.alter_column(u'resume_content', 'value_for_download', self...
gpl-3.0
yannikbehr/spectroscopy
src/spectroscopy/flux/wind.py
2
9855
#Copyright (C) Nial Peters 2015 # #This file is part of gns_flyspec. # #gns_flyspec 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. # #gns...
gpl-3.0
benschulz/servo
components/script/dom/bindings/codegen/parser/tests/test_attr.py
52
13561
import WebIDL def WebIDLTest(parser, harness): testData = [("::TestAttr%s::b", "b", "Byte%s", False), ("::TestAttr%s::rb", "rb", "Byte%s", True), ("::TestAttr%s::o", "o", "Octet%s", False), ("::TestAttr%s::ro", "ro", "Octet%s", True), ("::TestAttr%s::...
mpl-2.0
PMBio/limix
limix/core/test/test_gp_more.py
1
2719
import unittest from limix.core.mean import MeanKronSum from limix.core.covar import FreeFormCov from limix.core.covar import FixedCov from limix.core.covar import KronCov from limix.core.covar.combinators import SumCov from limix.core.gp.gp_base import GP from limix.core.gp import GP2KronSum from limix.utils.check_g...
apache-2.0
ADemonisis/mitmproxy
test/test_dump.py
11
6397
import os from cStringIO import StringIO from libmproxy import dump, flow from libmproxy.protocol import http from libmproxy.proxy.primitives import Log import tutils import mock def test_strfuncs(): t = tutils.tresp() t.is_replay = True dump.str_response(t) f = tutils.tflow() f.client_conn = Non...
mit
gnieboer/gnuradio
grc/gui/Preferences.py
5
3339
""" Copyright 2008 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion 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-3.0
thefinn93/CouchPotatoServer
couchpotato/core/providers/torrent/passthepopcorn/main.py
2
9326
from couchpotato.core.helpers.encoding import tryUrlencode from couchpotato.core.helpers.variable import getTitle, tryInt, mergeDicts from couchpotato.core.logger import CPLog from couchpotato.core.providers.torrent.base import TorrentProvider from dateutil.parser import parse import cookielib import htmlentitydefs imp...
gpl-3.0
codeborne/play-tests
commands.py
1
5410
import getopt import sys import os import os.path import subprocess from exceptions import ValueError MODULE = "play-tests" COMMANDS = ["tests", "clean-tests", "unit-tests", "pitest", "itests", "ui-tests", "ui-tests-with-coverage", "compile-check", "code-analysis"] HELP = { "tests": "Compile and run all tests", ...
gpl-3.0
sparkslabs/kamaelia_
Sketches/MPS/Experiments/360/Creator/PPostbox.py
3
11384
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License,...
apache-2.0
jhawkesworth/ansible-modules-extras
web_infrastructure/letsencrypt.py
8
32274
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016 Michael Gruener <michael.gruener@chaosmoon.net> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version...
gpl-3.0
byndcivilization/toy-infrastructure
flask-app/venv/lib/python3.6/site-packages/pip/_vendor/packaging/markers.py
324
8230
# 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 operator import os import platform import sys from pip._vendor.pyp...
gpl-3.0
rvalyi/geraldo
site/newsite/site-geraldo/django/utils/_os.py
27
1041
from os.path import join, normcase, abspath, sep def safe_join(base, *paths): """ Joins one or more path components to the base path component intelligently. Returns a normalized, absolute version of the final path. The final path must be located inside of the base path component (otherwise a Valu...
lgpl-3.0
jimmy54/zulip
zerver/lib/notifications.py
115
24217
from confirmation.models import Confirmation from django.conf import settings from django.core.mail import EmailMultiAlternatives from django.template import loader from zerver.decorator import statsd_increment, uses_mandrill from zerver.models import Recipient, ScheduledJob, UserMessage, \ Stream, get_display_reci...
apache-2.0
localu/metagoofil
hachoir_parser/file_system/ntfs.py
86
11594
""" New Technology File System (NTFS) file system parser. Sources: - The NTFS documentation http://www.linux-ntfs.org/ - NTFS-3G driver http://www.ntfs-3g.org/ Creation date: 3rd january 2007 Author: Victor Stinner """ SECTOR_SIZE = 512 from hachoir_parser import Parser from hachoir_core.field import (FieldSet,...
gpl-2.0
dawnpower/nova
nova/pci/whitelist.py
35
4103
# Copyright (c) 2013 Intel, Inc. # 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/li...
apache-2.0
ScatterHQ/eliot
eliot/tests/test_generators.py
2
8963
""" Tests for L{eliot._generators}. """ from __future__ import unicode_literals, absolute_import from pprint import pformat from unittest import TestCase from eliot import Message, start_action from ..testing import capture_logging, assertHasAction from .._generators import eliot_friendly_generator_function def a...
apache-2.0
uiri/pxqz
venv/lib/python2.7/site-packages/django/contrib/formtools/tests/wizard/wizardtests/forms.py
313
2203
import os import tempfile from django import forms from django.contrib.auth.models import User from django.core.files.storage import FileSystemStorage from django.forms.formsets import formset_factory from django.forms.models import modelformset_factory from django.http import HttpResponse from django.template import ...
gpl-3.0
vitkon/h5form
node_modules/grunt/node_modules/gzip-js/test/unzipTest.py
182
1840
import os from colorama import Fore from helpers import run_cmd outDirDefault = 'test-outs' testDirDefault = 'test-files' """ Run a single test @param tFile- required; the file to check against (uncompressed data) @param level- optional (default: all); the compression level [1-9] @return True if all tests passed; Fa...
mit
MiroK/emi-cylinders
gmsh_cad/tiling_test.py
1
2812
from dolfin import (File, HDF5File, mpi_comm_world, Mesh, UnitSquareMesh, Timer, info, SubsetIterator, CellVolume, dx, assemble, ds, dS, FacetArea, avg, SubsetIterator) from tiling import TileMesh, as_meshf, mvc_from_data def test(path, type='mf'): '''Evolve the tile in (n...
mit
guewen/OpenUpgrade
addons/account_bank_statement_extensions/__init__.py
442
1153
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it u...
agpl-3.0
SoreGums/bitcoinxt
qa/rpc-tests/txn_doublespendrelay.py
21
5901
#!/usr/bin/env python # # Test double-spend-relay and notification code # from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from decimal import Decimal class DoubleSpendRelay(BitcoinTestFramework): # # Create a 4-node network; roles for the nodes are: # [0]...
mit
kjagoo/wger_stark
wger/manager/views/schedule.py
2
10308
# -*- coding: utf-8 -*- # This file is part of wger Workout Manager. # # wger Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any ...
agpl-3.0
xiangel/hue
desktop/core/ext-py/Django-1.6.10/tests/delete_regress/models.py
108
2875
from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.db import models class Award(models.Model): name = models.CharField(max_length=25) object_id = models.PositiveIntegerField() content_type = models.ForeignKey(ContentType) content_objec...
apache-2.0
Architektor/PySnip
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/big5freq.py
3133
82594
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
gpl-3.0
DevHugo/zds-site
zds/search/models.py
1
3235
# coding: utf-8 from django.db import models class SearchIndexTag(models.Model): class Meta: verbose_name = 'Tag' verbose_name_plural = 'Tags' title = models.CharField('Titre', max_length=80) class SearchIndexAuthors(models.Model): class Meta: verbose_name = 'Author' ve...
gpl-3.0
Pikl/PiklBot
cogs/utils/chat_formatting.py
45
1963
def error(text): return "\N{NO ENTRY SIGN} {}".format(text) def warning(text): return "\N{WARNING SIGN} {}".format(text) def info(text): return "\N{INFORMATION SOURCE} {}".format(text) def question(text): return "\N{BLACK QUESTION MARK ORNAMENT} {}".format(text) def bold(text): return "**{}*...
gpl-3.0
Trult/youtube-dl
youtube_dl/extractor/trilulilu.py
109
2890
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ExtractorError class TriluliluIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?trilulilu\.ro/(?:video-[^/]+/)?(?P<id>[^/#\?]+)' _TEST = { 'url': 'http://www.trilulilu.ro/video-...
unlicense
Medium/phantomjs-1
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/config/ports.py
118
7831
# Copyright (C) 2009, Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the...
bsd-3-clause
Endika/project
sale_order_project/models/sale.py
19
2400
# -*- coding: utf-8 -*- ############################################################################### # # Module for OpenERP # Copyright (C) 2014 Akretion (http://www.akretion.com). # Copyright (C) 2010-2013 Akretion LDTA (<http://www.akretion.com>) # @author Sébastien BEAU <sebastien.beau@akretion.com> # @...
agpl-3.0
anirudhSK/chromium
tools/json_schema_compiler/cpp_type_generator.py
2
11667
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from code import Code from model import PropertyType import cpp_util from json_parse import OrderedDict import schema_util class _TypeDependency(object)...
bsd-3-clause
UGentPortaal/django-ldapdb
ldapdb/models/base.py
2
8650
# -*- coding: utf-8 -*- # # django-ldapdb # Copyright (c) 2009-2011, Bolloré telecom # All rights reserved. # # See AUTHORS file for a full list of contributors. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # ...
bsd-3-clause
nmearl/pyqtgraph
examples/hdf5.py
22
5188
# -*- coding: utf-8 -*- """ In this example we create a subclass of PlotCurveItem for displaying a very large data set from an HDF5 file that does not fit in memory. The basic approach is to override PlotCurveItem.viewRangeChanged such that it reads only the portion of the HDF5 data that is necessary to display the ...
mit
loopCM/chromium
chrome/test/chromedriver/run_java_tests.py
1
10860
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Runs the WebDriver Java acceptance tests. This script is called from chrome/test/chromedriver/run_all_tests.py and reports resu...
bsd-3-clause
sibsibsib/pressureNET-server
readings/migrations/0017_auto__add_field_readingsync_processing_time.py
2
4988
# -*- 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 field 'ReadingSync.processing_time' db.add_column('readings_readingsync', 'processing_time', ...
gpl-3.0
thejinx0r/pyamazonclouddrive
bin/acdget.py
10
5675
#!/usr/bin/env python # # Copyright (c) 2011 anatanokeitai.com(sakurai_youhei) # # 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 right...
mit
mmauroy/SickRage
lib/sqlalchemy/sql/annotation.py
79
6143
# sql/annotation.py # Copyright (C) 2005-2014 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 """The :class:`.Annotated` class and related routines; creates hash-equivalent copie...
gpl-3.0
geigerj/api-client-staging
generated/python/gapic-google-cloud-speech-v1beta1/setup.py
3
1531
"""A setup module for the GAPIC Speech library. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ from setuptools import setup, find_packages import sys install_requires = [ 'googleapis-common-protos>=1.3.5, <2.0.0dev', 'google-gax>=0.14.1, <0.15.0dev', ...
bsd-3-clause
wbc2010/django1.2.5
tests/modeltests/files/tests.py
38
3920
import shutil from django.core.cache import cache from django.core.files.base import ContentFile from django.core.files.uploadedfile import SimpleUploadedFile from django.test import TestCase from models import Storage, temp_storage, temp_storage_location class FileTests(TestCase): def tearDown(self): s...
bsd-3-clause
GyrosOfWar/servo
tests/wpt/harness/wptrunner/config.py
196
1851
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import ConfigParser import os import sys from collections import OrderedDict here = os.path.split(__file__)[0] class C...
mpl-2.0
Mekhantev/Interview
tests/test_cards.py
1
1888
from unittest.case import TestCase from oop.cards import * class TestCard(TestCase): def test_properties(self): deck = Deck(( Card(2, Suit.Club), Card(10, Suit.Diamond), Card(12, Suit.Spade), Card(5, Suit.Heart) )) self.assertEqual(deck._card...
mit
HalCanary/skia-hc
tools/calmbench/ab.py
10
12263
#!/usr/bin/python # encoding: utf-8 # Copyright 2017 Google Inc. # # Use of this source code is governed by a BSD-style license that can be found # in the LICENSE file. # # This is an A/B test utility script used by calmbench.py # # For each bench, we get a distribution of min_ms measurements from nanobench. # From th...
bsd-3-clause
campbe13/openhatch
vendor/packages/kombu/kombu/tests/test_entities.py
20
11746
from __future__ import absolute_import import pickle from kombu import Connection, Exchange, Producer, Queue, binding from kombu.exceptions import NotBoundError from .case import Case, Mock, call from .mocks import Transport def get_conn(): return Connection(transport=Transport) class test_binding(Case): ...
agpl-3.0
product-owner/2015scrum
static/Brython3.1.1-20150328-091302/Lib/_string.py
625
1112
"""string helper module""" import re class __loader__(object): pass def formatter_field_name_split(fieldname): """split the argument as a field name""" _list=[] for _name in fieldname: _parts = _name.split('.') for _item in _parts: is_attr=False #fix me if re....
gpl-3.0
danlrobertson/servo
tests/wpt/web-platform-tests/tools/third_party/py/setup.py
51
2222
import os import sys from setuptools import setup, find_packages def get_version(): p = os.path.join(os.path.dirname( os.path.abspath(__file__)), "py", "__init__.py") with open(p) as f: for line in f.readlines(): if "__version__" in line: return line.s...
mpl-2.0
HatsuneMiku0309/2014cdag10
wsgi/static/Brython2.1.0-20140419-113919/Lib/posix.py
96
20839
"""This module provides access to operating system functionality that is standardized by the C Standard and the POSIX standard (a thinly disguised Unix interface). Refer to the library manual and corresponding Unix manual entries for more information on calls.""" import datetime F_OK = 0 O_APPEND = 8 O_BINARY = 32...
gpl-2.0
jorik041/shadowsocks-1
shadowsocks/crypto/util.py
1032
4287
#!/usr/bin/env python # # Copyright 2015 clowwindy # # 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 ...
apache-2.0
benthomasson/ansible
lib/ansible/plugins/callback/foreman.py
39
7251
# -*- coding: utf-8 -*- # (C) 2015, 2016 Daniel Lobato <elobatocs@gmail.com> # 2016 Guido Günther <agx@sigxcpu.org> # # 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 Foundati...
gpl-3.0
JohnOrlando/gnuradio-bitshark
gr-wxgui/src/python/plotter/common.py
15
3876
# # Copyright 2009 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # #...
gpl-3.0
Ms2ger/presto-testo
wpt/websockets/autobahn/oberstet-Autobahn-643d2ee/lib/python/autobahn/case/case1_1_6.py
14
1336
############################################################################### ## ## Copyright 2011 Tavendo GmbH ## ## 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 ## ## ht...
bsd-3-clause
cbmoore/statsmodels
statsmodels/tsa/interp/denton.py
38
10769
import numpy as np from numpy import (dot, eye, diag_indices, zeros, column_stack, ones, diag, asarray, r_) from numpy.linalg import inv, solve #from scipy.linalg import block_diag from scipy import linalg #def denton(indicator, benchmark, freq="aq", **kwarg): # """ # Denton's method to convert low-freq...
bsd-3-clause
esrever10/doucoin
contrib/spendfrom/spendfrom.py
1
10055
#!/usr/bin/env python # # Use the raw transactions API to spend doucoins received on particular addresses, # and send any change back to that same address. # # Example usage: # spendfrom.py # Lists available funds # spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00 # # Assumes it will talk to a doucoind or Dou...
mit
manipopopo/tensorflow
tensorflow/contrib/distribute/python/combinations.py
1
14460
# Copyright 2018 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
koniiiik/django
tests/view_tests/tests/test_defaults.py
39
5815
from __future__ import unicode_literals 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 ( ...
bsd-3-clause
laperry1/android_external_chromium_org
tools/telemetry/third_party/pyserial/serial/sermsdos.py
159
5848
# sermsdos.py # # History: # # 3rd September 2002 Dave Haynes # 1. First defined # # Although this code should run under the latest versions of # Python, on DOS-based platforms such as Windows 95 and 98, # it has been specifically written to be compatible with # PyDOS, available at: # http://ww...
bsd-3-clause
adrienbrault/home-assistant
homeassistant/components/smarty/fan.py
6
3666
"""Platform to control a Salda Smarty XP/XV ventilation unit.""" import logging import math from homeassistant.components.fan import SUPPORT_SET_SPEED, FanEntity from homeassistant.core import callback from homeassistant.exceptions import HomeAssistantError from homeassistant.helpers.dispatcher import async_dispatche...
mit
fdvarela/odoo8
addons/hw_posbox_upgrade/__init__.py
1894
1075
# -*- 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...
agpl-3.0
sirinath/root
interpreter/llvm/src/tools/clang/bindings/python/clang/enumerations.py
307
1077
#===- enumerations.py - Python Enumerations ------------------*- python -*--===# # # The LLVM Compiler Infrastructure # # This file is distributed under the University of Illinois Open Source # License. See LICENSE.TXT for details. # #===--------------------------------------------------------------...
lgpl-2.1
nan86150/ImageFusion
ENV2.7/lib/python2.7/site-packages/pip/_vendor/html5lib/sanitizer.py
283
17660
from __future__ import absolute_import, division, unicode_literals import re from xml.sax.saxutils import escape, unescape from six.moves import urllib_parse as urlparse from .tokenizer import HTMLTokenizer from .constants import tokenTypes content_type_rgx = re.compile(r''' ^ ...
mit
ice-stuff/ice
ice/ec2_client.py
1
5462
"""EC2-like cloud related helper commands.""" from boto import ec2 from boto import exception as boto_exception class CfgEC2CloudAuth(object): """EC2 cloud authentication parameters""" def __init__(self, ec2_url, aws_access_key, aws_secret_key): """Create an EC2 auth object. :param ec2_url s...
mit
diorcety/intellij-community
python/lib/Lib/tempfile.py
86
15003
"""Temporary files. This module provides generic, low- and high-level interfaces for creating temporary files and directories. The interfaces listed as "safe" just below can be used without fear of race conditions. Those listed as "unsafe" cannot, and are provided for backward compatibility only. This module also pr...
apache-2.0
scorpilix/Golemtest
golem/core/hardware.py
1
3777
import multiprocessing import psutil from psutil import virtual_memory from golem.appconfig import logger,\ MIN_MEMORY_SIZE,\ MIN_DISK_SPACE,\ MIN_CPU_CORES,\ DEFAULT_HARDWARE_PRESET_NAME,\ CUSTOM_HARDWARE_PRESET_NAME from golem.core.fileshelper import free_partition_space from golem.model import ...
gpl-3.0
dymkowsk/mantid
scripts/SANS/sans/test_helper/test_director.py
3
10156
""" A Test director """ from __future__ import (absolute_import, division, print_function) from sans.state.state import get_state_builder from sans.state.data import get_data_builder from sans.state.move import get_move_builder from sans.state.reduction_mode import get_reduction_mode_builder from sans.state.slice_event...
gpl-3.0
Alecto3-D/testable-greeter
bb-master/sandbox/lib/python3.5/site-packages/buildbot/clients/sendchange.py
11
2635
# This file is part of Buildbot. Buildbot is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
mit
NiklasMM/coala
tests/bearlib/abstractions/SectionCreatableTest.py
31
2353
import unittest from coalib.bearlib.abstractions.SectionCreatable import SectionCreatable from coalib.settings.Section import Section, Setting class TestObject(SectionCreatable): def __init__(self, setting_one: int, raw_setting, setting_two: bool=False, ...
agpl-3.0