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 |
|---|---|---|---|---|---|
michaelkebe/pulseaudio-dlna | pulseaudio_dlna/utils/subprocess.py | 6 | 2828 | #!/usr/bin/python
# This file is part of pulseaudio-dlna.
# pulseaudio-dlna 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.
# pulsea... | gpl-3.0 |
GdZ/scriptfile | software/googleAppEngine/google/appengine/datastore/datastore_index.py | 2 | 24383 | #!/usr/bin/env python
#
# 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
#
# Unless required by applicable law o... | mit |
BigBrother1984/android_external_chromium_org | media/tools/layout_tests/test_expectations_history.py | 156 | 5156 | # 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.
"""A module for the history of the test expectation file."""
from datetime import datetime
from datetime import timedelta
import os
import re
import sy... | bsd-3-clause |
xyuanmu/XX-Net | python3.8.2/Lib/site-packages/pip/_vendor/requests/sessions.py | 70 | 29332 | # -*- coding: utf-8 -*-
"""
requests.session
~~~~~~~~~~~~~~~~
This module provides a Session object to manage and persist settings across
requests (cookies, auth, proxies).
"""
import os
import sys
import time
from datetime import timedelta
from .auth import _basic_auth_str
from .compat import cookielib, is_py3, Ord... | bsd-2-clause |
brianlorenz/COSMOS_IMACS_Redshifts | PlotCodes/Plotfits.py | 1 | 1041 | #Plot a .fits file
import numpy as np
import matplotlib.pyplot as plt
from astropy.io import ascii, fits
import sys, os, string
import pandas as pd
fitsfile = sys.argv[1]
data = fits.open(fitsfile)[0].data
head = fits.open(fitsfile)[0].header
d0 = data[0]
d1 = data[1]
d2 = data[2]
d3 = data[3]
d4 = data[4]
#d5 = d... | mit |
hwroitzsch/DayLikeTodayClone | venv/lib/python3.5/site-packages/wheel/pkginfo.py | 565 | 1225 | """Tools for reading and writing PKG-INFO / METADATA without caring
about the encoding."""
from email.parser import Parser
try:
unicode
_PY3 = False
except NameError:
_PY3 = True
if not _PY3:
from email.generator import Generator
def read_pkg_info_bytes(bytestr):
return Parser().pars... | mit |
smathot/Gnotero | pygnotero/libzotero.py | 1 | 9041 | """
This file is part of Gnotero.
Gnotero 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.
Gnotero is distributed in the hope that it will b... | gpl-3.0 |
jamdin/jdiner-mobile-byte3 | lib/numpy/lib/tests/test_recfunctions.py | 23 | 25445 | import sys
import numpy as np
import numpy.ma as ma
from numpy.ma.testutils import *
from numpy.ma.mrecords import MaskedRecords
from numpy.lib.recfunctions import *
get_names = np.lib.recfunctions.get_names
get_names_flat = np.lib.recfunctions.get_names_flat
zip_descr = np.lib.recfunctions.zip_descr
class TestRecF... | apache-2.0 |
thepaul/uftrace | tests/t152_read_proc_statm.py | 1 | 1437 | #!/usr/bin/env python
from runtest import TestBase
class TestCase(TestBase):
def __init__(self):
TestBase.__init__(self, 'abc', """
# DURATION TID FUNCTION
[32417] | main() {
[32417] | a() {
[32417] | b() {
[32417] | /* read:proc/statm (si... | gpl-2.0 |
MaxWayne/Beginning-Game-Development-with-Python-and-Pygame | Chapter 7/gameobjects/vector2-init.py | 6 | 1625 | import math
class Vector2:
def __init__(self, x=0, y=0):
self.x = x
self.y = y
if hasattr(x, "__getitem__"):
x, y = x
self._v = [float(x), float(y)]
else:
self._v = [float(x), float(y)]
def __str__(self):
return ... | mit |
shuizaiku7/shadowsocks | shadowsocks/udprelay.py | 924 | 11154 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# 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 b... | apache-2.0 |
rhertzog/django | django/db/migrations/optimizer.py | 127 | 2872 | from __future__ import unicode_literals
class MigrationOptimizer(object):
"""
Powers the optimization process, where you provide a list of Operations
and you are returned a list of equal or shorter length - operations
are merged into one if possible.
For example, a CreateModel and an AddField can... | bsd-3-clause |
joone/chromium-crosswalk | tools/telemetry/telemetry/internal/image_processing/_bitmap.py | 15 | 7855 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Bitmap is a basic wrapper for image pixels. It includes some basic processing
tools: crop, find bounding box of a color and compute histogram of color va... | bsd-3-clause |
BonaventureCS/Programming-Contest-Tracker | bower_components/bootstrap/test-infra/s3_cache.py | 1700 | 3523 | #!/usr/bin/env python2.7
from __future__ import absolute_import, unicode_literals, print_function, division
from sys import argv
from os import environ, stat, remove as _delete_file
from os.path import isfile, dirname, basename, abspath
from hashlib import sha256
from subprocess import check_call as run
from boto.s3.... | mit |
Matt-Deacalion/django | tests/template_tests/filter_tests/test_unordered_list.py | 204 | 8179 | from django.template.defaultfilters import unordered_list
from django.test import SimpleTestCase, ignore_warnings
from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.encoding import python_2_unicode_compatible
from django.utils.safestring import mark_safe
from ..utils import setup
class ... | bsd-3-clause |
tst-ccamp/earthenterprise | earth_enterprise/src/fusion/portableglobe/servers/portable_server_base.py | 5 | 5243 | #!/usr/bin/env python2.7
#
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | apache-2.0 |
divio/django-shop | shop/models/cart.py | 1 | 12269 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from six import with_metaclass
import warnings
from collections import OrderedDict
from django.core import checks
from django.db import models
from django.utils.translation import ugettext_lazy as _
from shop import deferred
from shop.models.fields import... | bsd-3-clause |
Himmele/git-repo | subcmds/status.py | 1 | 7748 | #
# 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 |
Kubuxu/cjdns | node_build/dependencies/libuv/build/gyp/test/mac/gyptest-rpath.py | 88 | 1303 | #!/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 that LD_DYLIB_INSTALL_NAME and DYLIB_INSTALL_NAME_BASE are handled
correctly.
"""
import TestGyp
import re
import subprocess
... | gpl-3.0 |
mindnervestech/mnrp | addons/website_mail/controllers/email_designer.py | 37 | 3093 | # -*- coding: utf-8 -*-
from urllib import urlencode
from openerp.addons.web import http
from openerp.addons.web.http import request
from openerp.tools.mail import html_sanitize
class WebsiteEmailDesigner(http.Controller):
@http.route('/website_mail/email_designer', type='http', auth="user", website=True)
... | agpl-3.0 |
Nick-Hall/gramps | gramps/gen/filters/rules/repository/_regexpidof.py | 5 | 1743 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2006 Donald N. Allingham
#
# 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 you... | gpl-2.0 |
alyakhtar/Katastrophe | katastrophe/latest.py | 1 | 22503 | import requests
from bs4 import BeautifulSoup
from tabulate import tabulate
from sys import platform
import subprocess
import os,time
from run import download
import getpass
try:
raw_input_ = raw_input
except NameError:
raw_input_ = input
try:
xrange_ = xrange
except NameError:
xrange... | mit |
mars-knowsnothing/amos-bot | src/Lib/encodings/charmap.py | 860 | 2084 | """ Generic Python Character Mapping Codec.
Use this codec directly rather than through the automatic
conversion mechanisms supplied by unicode() and .encode().
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""#"
import codecs
### Codec APIs
class... | gpl-3.0 |
samsu/neutron | openstack/common/lockutils.py | 11 | 9939 | # Copyright 2011 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | apache-2.0 |
neonsoftware/yard | old/apply/yard/static/bower_components/web-animations-js/test/update-testcases.py | 170 | 1754 | #!/usr/bin/python
import cStringIO as StringIO
from fnmatch import fnmatch
import difflib
import os
import sys
def get_name(filename):
return os.path.splitext(filename)[0]
def list_dir(dir_path, filter_func):
return sorted(filter(filter_func, os.listdir(dir_path)), key=get_name)
def main():
test_dir ... | mit |
dancingdan/tensorflow | tensorflow/python/eager/function.py | 2 | 82892 | # 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 |
kisom/pypcapfile | pcapfile/test/fixture.py | 3 | 14109 | """
Test fixtures for the pypcapfile test suite.
"""
TESTPCAP2 = b"""
UydceGQ0XHhjM1x4YjJceGExXHgwMlx4MDBceDA0XHgwMFx4MDBceDAwXHgwMFx4MDBceDAwXHgw
MFx4MDBceDAwXHgwMFx4MDFceDAwXHgwMFx4MDFceDAwXHgwMFx4MDB4XHhiM1x4MWFQXHg5MD5c
eDAwXHgwME5ceDAwXHgwMFx4MDBOXHgwMFx4MDBceDAwXHhjMD9ceDBlXHgxMVx4MWNceGMwXHgw
MCZceGIwXHhmNFx4Z... | isc |
markslwong/tensorflow | tensorflow/contrib/tensor_forest/python/tensor_forest.py | 46 | 40039 | # 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 |
plotly/plotly.py | packages/python/plotly/plotly/graph_objs/sunburst/_domain.py | 2 | 5773 | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Domain(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "sunburst"
_path_str = "sunburst.domain"
_valid_props = {"column", "row", "x", "y"}
# co... | mit |
CTSRD-SOAAP/chromium-42.0.2311.135 | tools/perf/benchmarks/thread_times.py | 3 | 2912 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from benchmarks import silk_flags
from measurements import thread_times
import page_sets
from telemetry import benchmark
class _ThreadTimes(benchmark.Benchm... | bsd-3-clause |
tlatzko/spmcluster | .tox/2.7-cover/lib/python2.7/site-packages/nose/util.py | 48 | 20310 | """Utility functions and classes used by nose internally.
"""
import inspect
import itertools
import logging
import stat
import os
import re
import sys
import types
import unittest
from nose.pyversion import ClassType, TypeType, isgenerator, ismethod
log = logging.getLogger('nose')
ident_re = re.compile(r'^[A-Za-z_]... | bsd-2-clause |
eevee/cocos2d-mirror | cocos/text.py | 1 | 9324 | # ----------------------------------------------------------------------------
# cocos2d
# Copyright (c) 2008-2011 Daniel Moisset, Ricardo Quesada, Rayentray Tappa,
# Lucio Torre
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the... | bsd-3-clause |
syci/domsense-agilebg-addons | account_followup_choose_payment/account_followup.py | 1 | 1243 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2011 Agile Business Group sagl (<http://www.agilebg.com>)
# Copyright (C) 2011 Domsense srl (<http://www.domsense.com>)
#
# This program is free software: you can redistribute it and/or ... | gpl-2.0 |
mrbox/django | django/contrib/sessions/backends/file.py | 40 | 7975 | import datetime
import errno
import logging
import os
import shutil
import tempfile
from django.conf import settings
from django.contrib.sessions.backends.base import (
VALID_KEY_CHARS, CreateError, SessionBase,
)
from django.contrib.sessions.exceptions import InvalidSessionKey
from django.core.exceptions import I... | bsd-3-clause |
pk-sam/crosswalk-test-suite | webapi/tct-animations-css3-tests/inst.xpk.py | 357 | 6759 | #!/usr/bin/env python
import os
import shutil
import glob
import time
import sys
import subprocess
import string
from optparse import OptionParser, make_option
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PKG_NAME = os.path.basename(SCRIPT_DIR)
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=... | bsd-3-clause |
erdincay/pyload | module/plugins/accounts/FilerNet.py | 6 | 2020 | # -*- coding: utf-8 -*-
import re
import time
from module.plugins.internal.Account import Account
class FilerNet(Account):
__name__ = "FilerNet"
__type__ = "account"
__version__ = "0.07"
__status__ = "testing"
__description__ = """Filer.net account plugin"""
__license__ = "GPLv3"... | gpl-3.0 |
maelnor/nova | nova/tests/api/ec2/test_api.py | 10 | 24106 | # Copyright 2010 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 License. You may obtain
# a ... | apache-2.0 |
backupManager/pyflag | src/pyflag/parser.py | 7 | 5299 | #!/usr/bin/env python
""" This is a parser for the table search widget. The parser
implements a simple language for structured queries depending on the
type of the columns presented.
"""
# Michael Cohen <scudette@users.sourceforge.net>
#
# ******************************************************
# Version: FLAG $Version... | gpl-2.0 |
dhongu/l10n-romania | currency_rate_update/services/update_service_MX_BdM.py | 1 | 2790 | # -*- coding: utf-8 -*-
# © 2009 Camptocamp
# © 2013-2014 Agustin Cruz openpyme.mx
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from .currency_getter_interface import CurrencyGetterInterface
import logging
_logger = logging.getLogger(__name__)
class MX_BdMGetter(CurrencyGetterInterface):
"""I... | agpl-3.0 |
russellb/nova | nova/tests/test_instance_types_extra_specs.py | 9 | 7223 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 University of Southern California
# 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/licens... | apache-2.0 |
lihui7115/ChromiumGStreamerBackend | build/ios/PRESUBMIT.py | 49 | 1358 | # 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.
import os
"""Chromium presubmit script for src/tools/ios.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details ... | bsd-3-clause |
taichatha/youtube-dl | youtube_dl/extractor/ultimedia.py | 106 | 3657 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import compat_urllib_parse_urlparse
from ..utils import (
ExtractorError,
qualities,
unified_strdate,
clean_html,
)
class UltimediaIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.... | unlicense |
sparkslabs/kamaelia | Code/Python/Kamaelia/Kamaelia/Visualisation/PhysicsGraph/ParticleDragger.py | 3 | 4104 | #!/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 |
qwcode/pip | pip/_vendor/requests/packages/charade/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... | mit |
ProfessionalIT/professionalit-webiste | sdk/google_appengine/lib/django-1.4/django/utils/dictconfig.py | 335 | 22939 | # This is a copy of the Python logging.config.dictconfig module,
# reproduced with permission. It is provided here for backwards
# compatibility for Python versions prior to 2.7.
#
# Copyright 2009-2010 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# docu... | lgpl-3.0 |
mancoast/CPythonPyc_test | fail/300_test_site.py | 3 | 9767 | """Tests for 'site'.
Tests assume the initial paths in sys.path once the interpreter has begun
executing have not been removed.
"""
import unittest
from test.support import TestSkipped, run_unittest, TESTFN
import builtins
import os
import sys
import encodings
import subprocess
# Need to make sure to not import 'site... | gpl-3.0 |
uclouvain/osis | cms/migrations/0004_auto_20170425_1548.py | 3 | 1236 | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-04-25 13:48
from __future__ import unicode_literals
import ckeditor.fields
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cms', '0003_auto_20170317_1033'),
]
... | agpl-3.0 |
Azure/azure-sdk-for-python | sdk/batch/azure-mgmt-batch/azure/mgmt/batch/_configuration.py | 1 | 3313 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit |
Vaibhav/Stock-Analysis | DEPRECATED/Scrapers/finviz.py | 1 | 3650 | import requests
from bs4 import BeautifulSoup
import csv
import pdb
import datetime
# pdb.set_trace() - python step by step debugger command
print(datetime.datetime.now())
print("Finviz Financial Start")
url = "http://www.finviz.com/screener.ashx?v=161&f=geo_usa"
## url = "http://www.finviz.com/screener.ashx?v... | mit |
splunk/splunk-ref-pas-code | spikes/googledrive_addon/bin/apiclient/discovery.py | 2 | 35848 | # Copyright (C) 2010 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... | apache-2.0 |
abhisg/scikit-learn | sklearn/tree/tree.py | 2 | 37683 | """
This module gathers tree-based methods, including decision, regression and
randomized trees. Single and multi-output problems are both handled.
"""
# Authors: Gilles Louppe <g.louppe@gmail.com>
# Peter Prettenhofer <peter.prettenhofer@gmail.com>
# Brian Holt <bdholt1@gmail.com>
# Noel Da... | bsd-3-clause |
couchand/petard | vendor/cxxtest-4.3/python/cxxtest/cxxtestgen.py | 7 | 23336 | #-------------------------------------------------------------------------
# CxxTest: A lightweight C++ unit testing library.
# Copyright (c) 2008 Sandia Corporation.
# This software is distributed under the LGPL License v3
# For more information, see the COPYING file in the top CxxTest directory.
# Under the terms of ... | mit |
tarawa/codejam-commandline | lib/google_login.py | 20 | 9663 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# Copyright 2011 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 re... | apache-2.0 |
kurrik/github-recs | src/rmn/logistic_test.py | 1 | 2137 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Arne Roomann-Kurrik <kurrik@gmail.com>'
import logistic
import numpy as np
from numpy import linalg
from itertools import combinations
class TestFeatures(object):
def __init__(self, labels):
self.__labels = labels
self.__length = len(labels) * 2 +... | apache-2.0 |
spektom/incubator-airflow | airflow/providers/slack/hooks/slack_webhook.py | 4 | 5545 | #
# 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... | apache-2.0 |
johankaito/fufuka | microblog/flask/venv/lib/python2.7/site-packages/scipy/_lib/tests/test__version.py | 107 | 2027 | from numpy.testing import assert_, run_module_suite, assert_raises
from scipy._lib._version import NumpyVersion
def test_main_versions():
assert_(NumpyVersion('1.8.0') == '1.8.0')
for ver in ['1.9.0', '2.0.0', '1.8.1']:
assert_(NumpyVersion('1.8.0') < ver)
for ver in ['1.7.0', '1.7.1', '0.9.9']:
... | apache-2.0 |
sirchia/CouchPotatoServer | libs/enzyme/riff.py | 179 | 20109 | # -*- coding: utf-8 -*-
# enzyme - Video metadata parser
# Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com>
# Copyright 2003-2006 Thomas Schueppel <stain@acm.org>
# Copyright 2003-2006 Dirk Meyer <dischi@freevo.org>
#
# This file is part of enzyme.
#
# enzyme is free software; you can redistribute it and/or mod... | gpl-3.0 |
bdunnette/djecks | migrations/0007_auto__add_field_deck_source__chg_field_deck_title__chg_field_deck_desc.py | 1 | 3848 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as 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 'Deck.source'
db.add_column(u'djecks_deck', 'source',
... | agpl-3.0 |
drewejohnson/drewtils | drewtils/__init__.py | 1 | 1629 | # THIS FILE IS PROVIDED AS IS UNDER THE CONDITIONS DETAILED IN LICENSE
# COPYRIGHT ANDREW JOHNSON, 2017-2020
import operator
from drewtils.parsers import KeywordParser, PatternReader
__versions__ = '0.2.0'
def dfSubset(data, where):
"""
Return a subset of the data given a series of conditions
.. versio... | mit |
yannickcr/CouchPotatoServer | couchpotato/core/notifications/twitter/__init__.py | 81 | 1547 | from .main import Twitter
def autoload():
return Twitter()
config = [{
'name': 'twitter',
'groups': [
{
'tab': 'notifications',
'list': 'notification_providers',
'name': 'twitter',
'options': [
{
'name': 'enabled'... | gpl-3.0 |
blacklin/kbengine | kbe/src/lib/python/Tools/unicode/comparecodecs.py | 52 | 1440 | #!/usr/bin/env python3
""" Compare the output of two codecs.
(c) Copyright 2005, Marc-Andre Lemburg (mal@lemburg.com).
Licensed to PSF under a Contributor Agreement.
"""
import sys
def compare_codecs(encoding1, encoding2):
print('Comparing encoding/decoding of %r and %r' % (encoding1, encoding2))
... | lgpl-3.0 |
Kiiv/CouchPotatoServer | libs/suds/mx/encoded.py | 211 | 4651 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | gpl-3.0 |
pradyunsg/Py2C | setup.py | 1 | 1554 | #!/usr/bin/python3
# pylint:disable=C0103
import sys
if sys.version_info[:2] < (3, 3):
print("[Py2C] Cannot run on Python versions before Python 3.3")
sys.exit(1)
try:
from setuptools import setup, find_packages
except ImportError:
print("[Py2C] Please install 'setuptools'..")
sys.exit(1)
# setu... | bsd-3-clause |
JioCloud/python-novaclient | novaclient/openstack/common/strutils.py | 5 | 8198 | # Copyright 2011 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | apache-2.0 |
osvalr/odoo | addons/project_issue/project_issue.py | 217 | 29319 | #-*- 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 |
jumpstarter-io/neutron | neutron/tests/unit/cisco/cfg_agent/test_routing_svc_helper.py | 5 | 29597 | # Copyright 2014 Cisco Systems, 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 requir... | apache-2.0 |
adlnet-archive/edx-platform | common/lib/xmodule/xmodule/tests/test_peer_grading.py | 33 | 16061 | import unittest
import json
import logging
from mock import Mock, patch
from webob.multidict import MultiDict
from xblock.field_data import DictFieldData
from xblock.fields import ScopeIds
from opaque_keys.edx.locations import Location, SlashSeparatedCourseKey
from xmodule.tests import get_test_system, get_test_descr... | agpl-3.0 |
ErnieAllen/qpid-dispatch | tests/system_tests_core_client.py | 2 | 8314 | #
# 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... | apache-2.0 |
tomasdubec/openstack-cinder | cinder/db/sqlalchemy/models.py | 1 | 15282 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Piston Cloud Computing, Inc.
# All Rights Reserved.
#
# Lic... | apache-2.0 |
malariagen/filterbank | filterbank/core.py | 1 | 2669 | import filterbank.accumulators as accumulators
import filterbank.encoders as encoders
from filterbank.tabfile import Reader
import copy
class BlockDigester:
def __init__(self, block_size, channel_config, output_location):
self.seen_rows = 0
#Accumulators bypassed if we are just doing single values
... | mit |
yancharkin/games_nebula_goglib_scripts | corsairs_gold/settings.py | 1 | 3457 | import sys, os
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gdk
import gettext
import imp
try:
from ConfigParser import ConfigParser as ConfigParser
except:
from configparser import ConfigParser as ConfigParser
nebula_dir = os.getenv('NEBULA_DIR')
modules_dir = nebula_dir + '/mod... | gpl-3.0 |
jermainewang/mxnet | example/rcnn/rcnn/symbol/symbol_resnet.py | 18 | 13105 | # 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 |
dongjoon-hyun/spark | python/pyspark/sql/context.py | 15 | 23877 | #
# 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 |
2014c2g3/w16b_test | static/Brython3.1.3-20150514-095342/Lib/gc.py | 743 | 3548 | """This module provides access to the garbage collector for reference cycles.
enable() -- Enable automatic garbage collection.
disable() -- Disable automatic garbage collection.
isenabled() -- Returns true if automatic collection is enabled.
collect() -- Do a full collection right now.
get_count() -- Return the curren... | agpl-3.0 |
liupfskygre/qiime | qiime/adjust_seq_orientation.py | 15 | 1576 | #!/usr/bin/env python
# File created on 07 Oct 2009.
from __future__ import division
__author__ = "Greg Caporaso"
__copyright__ = "Copyright 2011, The QIIME Project"
__credits__ = ["Greg Caporaso", "Antonio Gonzalez Pena"]
__license__ = "GPL"
__version__ = "1.9.1-dev"
__maintainer__ = "Greg Caporaso"
__email__ = "greg... | gpl-2.0 |
yongshengwang/hue | build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/conf/locale/de_CH/formats.py | 118 | 1448 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
from __future__ import unicode_literals
DATE_FORMAT = 'j. F Y'
TIME_FORMAT = 'H:i:s'
DA... | apache-2.0 |
knowsis/django | django/utils/decorators.py | 119 | 4826 | "Functions that help with dynamically creating decorators for views."
from functools import wraps, update_wrapper, WRAPPER_ASSIGNMENTS
from django.utils import six
class classonlymethod(classmethod):
def __get__(self, instance, owner):
if instance is not None:
raise AttributeError("This meth... | bsd-3-clause |
jlspyaozhongkai/Uter | third_party_backup/Python-2.7.9/Lib/bsddb/test/test_fileid.py | 111 | 1830 | """TestCase for reseting File ID.
"""
import os
import shutil
import unittest
from test_all import db, test_support, get_new_environment_path, get_new_database_path
class FileidResetTestCase(unittest.TestCase):
def setUp(self):
self.db_path_1 = get_new_database_path()
self.db_path_2 = get_new_dat... | gpl-3.0 |
ojengwa/oh-mainline | mysite/profile/migrations/0021_raffi_remove_uniqueness_constraint_on_project_exp.py | 17 | 7400 | # This file is part of OpenHatch.
# Copyright (C) 2009 OpenHatch, Inc.
# Copyright (C) 2009 Matthew Ziegelbaum
#
# This program 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 Li... | agpl-3.0 |
yaniv14/OpenCommunity | src/shultze/test_functionality/test_plurality_at_large.py | 3 | 2860 | # Copyright (C) 2009, Brad Beattie
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in ... | bsd-3-clause |
snah/ezvalue | setup.py | 1 | 1142 | # pylint: disable=C0330
import os.path
import setuptools
ROOT_DIR = os.path.abspath(os.path.dirname(__file__))
README_PATH = os.path.join(ROOT_DIR, 'README')
with open(README_PATH, encoding='utf-8') as f:
LONG_DESCRIPTION = f.read()
setuptools.setup(
name='ezvalue',
version='0.1.3',
description='An ... | mit |
MoritzS/django | tests/user_commands/tests.py | 27 | 8160 | import os
from io import StringIO
from unittest import mock
from admin_scripts.tests import AdminScriptTestCase
from django.apps import apps
from django.core import management
from django.core.management import BaseCommand, CommandError, find_commands
from django.core.management.utils import find_command, popen_wrapp... | bsd-3-clause |
omaciel/mangonel | mangonel/changeset.py | 1 | 1633 | from common import *
import datetime
import json
import sys
import time
try:
from katello.client.api.task_status import TaskStatusAPI
from katello.client.api.changeset import ChangesetAPI
except ImportError, e:
print "Please install Katello CLI package."
sys.exit(-1)
class Changeset(ChangesetAPI):
... | gpl-2.0 |
kawamon/hue | desktop/core/ext-py/python-openid-2.2.5/openid/test/kvform.py | 75 | 5685 | from openid import kvform
from openid import oidutil
import unittest
class KVBaseTest(unittest.TestCase):
def shortDescription(self):
return '%s test for %r' % (self.__class__.__name__, self.kvform)
def log(self, message, unused_priority=None):
self.warnings.append(message)
def checkWarni... | apache-2.0 |
saideepchandg/oracle-r12-accounting | lib/django/contrib/admin/templatetags/admin_list.py | 46 | 17082 | from __future__ import unicode_literals
import datetime
from django.contrib.admin.templatetags.admin_static import static
from django.contrib.admin.templatetags.admin_urls import add_preserved_filters
from django.contrib.admin.utils import (
display_for_field, display_for_value, label_for_field, lookup_field,
)
f... | bsd-3-clause |
jamielennox/deluge | deluge/plugins/Scheduler/deluge/plugins/scheduler/__init__.py | 14 | 2250 | #
# __init__.py
#
# Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com>
#
# Basic plugin template created by:
# Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com>
# Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com>
#
# Deluge is free software.
#
# You may redistribute it and/or modify it under the t... | gpl-3.0 |
avoinsystems/odoo | openerp/report/render/simple.py | 324 | 3152 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... | agpl-3.0 |
yongshengwang/hue | desktop/core/ext-py/boto-2.38.0/boto/sqs/bigmessage.py | 170 | 4729 | # Copyright (c) 2013 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates.
#
# 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, includin... | apache-2.0 |
vishnugonela/boto | tests/integration/emr/__init__.py | 761 | 1104 | # Copyright (c) 2006-2011 Mitch Garnaat http://garnaat.org/
#
# 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, modi... | mit |
KnoMorales/shpescape | shapeft/views.py | 18 | 10361 | #!/usr/bin/env python
#
# Copyright 2010 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 ... | apache-2.0 |
janwuyts/empty_scripts | python.py | 1 | 1771 | #!/usr/bin/env python
"""Change this docstring of this empty script
- Run unittests if called with "test" as first and only argument
- Call main() if there are other command line arguments
"""
__author__ = "Jan Wuyts"
__copyright__ = "Copyright 2013"
__credits__ = ["Jan Wuyts", ]
__version__ = "0.0.1"
__maintainer__ =... | mit |
1995parham/OpenBridge | Dryu/src/ofctl-rest.py | 2 | 24385 | # In The Name Of God
# ========================================
# [] File Name : ofctl-rest.py
#
# [] Creation Date : 27-04-2015
#
# [] Created By : Parham Alvani (parham.alvani@gmail.com)
# =======================================
__author__ = 'Parham Alvani'
import logging
import json
import ast
from webob import Res... | gpl-2.0 |
rmtew/MediaTek-HelioX10-Kernel | alps/kernel-3.10/Documentation/networking/cxacru-cf.py | 14668 | 1626 | #!/usr/bin/env python
# Copyright 2009 Simon Arlott
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# This program i... | gpl-2.0 |
afaheem88/tempest | tempest/tests/test_list_tests.py | 34 | 1824 | # Copyright 2013 IBM Corp.
#
# 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 t... | apache-2.0 |
digitaleric-google/GCG-3.3 | tools/perf/util/setup.py | 97 | 1405 | #!/usr/bin/python2
from distutils.core import setup, Extension
from os import getenv
from distutils.command.build_ext import build_ext as _build_ext
from distutils.command.install_lib import install_lib as _install_lib
class build_ext(_build_ext):
def finalize_options(self):
_build_ext.finalize_optio... | gpl-2.0 |
thaumos/ansible | lib/ansible/modules/cloud/rackspace/rax_files_objects.py | 102 | 18489 | #!/usr/bin/python
# (c) 2013, Paul Durivage <paul.durivage@rackspace.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': '1.1',
... | gpl-3.0 |
d3banjan/polyamide | webdev/lib/python2.7/site-packages/django/core/handlers/wsgi.py | 82 | 9759 | from __future__ import unicode_literals
import cgi
import codecs
import logging
import sys
import warnings
from io import BytesIO
from threading import Lock
from django import http
from django.conf import settings
from django.core import signals
from django.core.handlers import base
from django.core.urlresolvers impo... | bsd-2-clause |
ovresko/erpnext | erpnext/regional/doctype/gst_settings/gst_settings.py | 19 | 3485 | # -*- coding: utf-8 -*-
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe, os
from frappe import _
from frappe.utils import get_url, nowdate, date_diff
from frappe.model.document import Document
f... | gpl-3.0 |
waseem18/oh-mainline | vendor/packages/python-openid/admin/builddiscover.py | 66 | 2207 | #!/usr/bin/env python
import os.path
import urlparse
from openid.test import discoverdata
manifest_header = """\
# This file contains test cases for doing YADIS identity URL and
# service discovery. For each case, there are three URLs. The first
# URL is the user input. The second is the identity URL and the third
# ... | agpl-3.0 |
pkkid/python-plexapi | plexapi/mixins.py | 1 | 20849 | # -*- coding: utf-8 -*-
from urllib.parse import quote_plus, urlencode
from plexapi import media, settings, utils
from plexapi.exceptions import BadRequest, NotFound
class AdvancedSettingsMixin(object):
""" Mixin for Plex objects that can have advanced settings. """
def preferences(self):
""" Return... | bsd-3-clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.