repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
codesparkle/youtube-dl
youtube_dl/extractor/hornbunny.py
4
1526
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, parse_duration, ) class HornBunnyIE(InfoExtractor): _VALID_URL = r'http?://(?:www\.)?hornbunny\.com/videos/(?P<title_dash>[a-z-]+)-(?P<id>\d+)\.html' _TEST = { 'url': '...
unlicense
asimshankar/tensorflow
tensorflow/python/estimator/canned/optimizers.py
41
1298
# 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
lukas-bednar/jenkins-job-builder
tests/cmd/subcommands/test_update.py
1
6946
# Joint copyright: # - Copyright 2015 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
apache-2.0
eldabbagh/gae-boilerplate
bp_includes/external/wtforms/fields/core.py
50
28554
from __future__ import unicode_literals import datetime import decimal import itertools import time from wtforms import widgets from wtforms.compat import text_type, izip from wtforms.validators import StopValidation __all__ = ( 'BooleanField', 'DecimalField', 'DateField', 'DateTimeField', 'FieldList', 'Flo...
lgpl-3.0
Spoken-tutorial/spoken-website
impersonate/decorators.py
1
1214
# -*- coding: utf-8 -*- import django from django.conf import settings from django.utils.http import urlquote from django.utils.encoding import force_str from django.shortcuts import redirect, resolve_url from django.contrib.auth import REDIRECT_FIELD_NAME from .helpers import get_redir_path, check_allow_impersonate, ...
gpl-3.0
piyush82/icclab-rcb
common/db_client.py
2
2743
# -*- coding: ascii -*- #-------------------------------------------------------------- #Created on Dec 2, 2013 # #@author: Piyush Harsh #@contact: piyush.harsh@zhaw.ch #@organization: ICCLab, Zurich University of Applied Sciences #@summary: module for database operations, supported DB - sqlite3, planned: mangodb, mysq...
apache-2.0
slarosa/QGIS
python/plugins/sextante/algs/MeanAndStdDevPlot.py
3
3304
# -*- coding: utf-8 -*- """ *************************************************************************** MeanAndStdDevPlot.py --------------------- Date : January 2013 Copyright : (C) 2013 by Victor Olaya Email : volayaf at gmail dot com ********************...
gpl-2.0
PinMeTo/big-zelda-kegerator
measuring/measur.py
1
5542
#!/usr/bin/python # -*- coding: UTF-8 -*- # Author: Andreas Älveborn # URL: https://github.com/aelveborn/Wii-Scale # # This file is part of Wii-Scale # Copyright (C) 2015 Andreas Älveborn # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
mit
shujaatak/UAV_MissionPlanner
Lib/site-packages/scipy/misc/tests/test_doccer.py
61
2281
''' Some tests for the documenting decorator and support functions ''' import numpy as np from numpy.testing import assert_equal, assert_raises from nose.tools import assert_true from scipy.misc import doccer docstring = \ """Docstring %(strtest1)s %(strtest2)s %(strtest3)s """ param_doc1 = \ """A...
gpl-2.0
rgayon/plaso
tests/parsers/syslog.py
1
8396
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the syslog parser.""" from __future__ import unicode_literals import unittest from plaso.parsers import syslog from tests.parsers import test_lib class SyslogParserTest(test_lib.ParserTestCase): """Tests for the syslog parser.""" def testParseRsyslo...
apache-2.0
Alwnikrotikz/secure-gappproxy
fetchserver/nonce.py
2
3071
#! /usr/bin/env python # coding=utf-8 #====================================================================== # SecureGAppProxy is a security-strengthened version of GAppProxy. # http://secure-gappproxy.googlecode.com # This file is a part of SecureGAppProxy. ...
gpl-3.0
webmasterraj/GaSiProMo
flask/lib/python2.7/site-packages/boto/s3/acl.py
13
5434
# Copyright (c) 2006,2007 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...
gpl-2.0
0x0all/ROOT
tutorials/pyroot/zdemo.py
28
8280
# This macro is an example of graphs in log scales with annotations. # # The begin_html <a href="gif/zdemo.gif" >presented results</a> end_html # are predictions of invariant cross-section of Direct Photons produced # at RHIC energies, based on the universality of scaling function H(z). # # Authors: Michael Tokar...
lgpl-2.1
jmachuca77/ardupilot
libraries/SITL/examples/Morse/rover_follow.py
35
1477
''' This is an example builder script that sets up a a set of rovers to be driven by ArduPilot for demonstrating follow mode The rover has the basic set of sensors that ArduPilot needs To start the simulation use this: morse run rover_follow.py ''' from morse.builder import * num_vehicles = 3 for i in range(num_...
gpl-3.0
gallandarakhneorg/autolatex
plugins/gedit3/autolatexeditor/utils/gedit_runner.py
1
4936
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # autolatex/utils/gedit_runner.py # Copyright (C) 2013-14 Stephane Galland <galland@arakhne.org> # # 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 Foundatio...
gpl-2.0
Q-Leap-Networks/pyside-segfault
wizard.py
1
3656
#!/usr/bin/python3 # -*- coding: utf-8 -*- import sys import argparse from Qt import QtGui, QtCore, loadUi from QtCore import Slot from HWWizard import HWWizard class Host: def __init__(self, name, autodetect): self.name = name self.autodetect = autodetect class Name: def __init__(self, nam...
gpl-2.0
Tatsh-ansible/ansible
lib/ansible/plugins/callback/profile_tasks.py
44
4664
# (C) 2016, Joel, http://github.com/jjshoe # (C) 2015, Tom Paine, <github@aioue.net> # (C) 2014, Jharrod LaFon, @JharrodLaFon # (C) 2012-2013, Michael DeHaan, <michael.dehaan@gmail.com> # # This file is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publis...
gpl-3.0
gymnasium/edx-platform
common/lib/xmodule/xmodule/modulestore/tests/factories.py
10
26160
""" Factories for use in tests of XBlocks. """ import datetime import functools import pymongo.message import pytz import threading import traceback from collections import defaultdict from contextlib import contextmanager from uuid import uuid4 from factory import Factory, Sequence, lazy_attribute_sequence, lazy_att...
agpl-3.0
Desarrollo-CeSPI/meran
dev-plugins/node64/lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/generator/ninja.py
38
49879
# 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. import copy import gyp import gyp.common import gyp.system_test import gyp.xcode_emulation import os.path import re import subprocess import sys import gyp.ninja_...
gpl-3.0
luoxufeiyan/python
zentst/0023/mysite/settings.py
38
5492
# Django settings for mysite project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'D:/work...
mit
AmrThabet/CouchPotatoServer
libs/suds/sax/parser.py
180
4461
# 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
guoxf/linux
tools/perf/scripts/python/futex-contention.py
1997
1508
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
gpl-2.0
annarev/tensorflow
tensorflow/python/framework/subscribe_test.py
14
13361
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
python-ivi/python-ivi
ivi/agilent/agilentMSOX4054A.py
2
1695
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2014-2017 Alex Forencich 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...
mit
apache-spark-on-k8s/spark
python/pyspark/mllib/recommendation.py
50
11714
# # 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
pvtodorov/indra
indra/sources/cwms/api.py
2
2665
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import logging from indra.sources.cwms.processor import CWMSProcessor from indra.sources.cwms.rdf_processor import CWMSRDFProcessor from indra.sources.trips import client logger = logging.getLogger(__name__) def p...
bsd-2-clause
bestwpw/letsencrypt
letsencrypt/tests/display/util_test.py
34
11787
"""Test :mod:`letsencrypt.display.util`.""" import os import unittest import mock from letsencrypt.display import util as display_util CHOICES = [("First", "Description1"), ("Second", "Description2")] TAGS = ["tag1", "tag2", "tag3"] TAGS_CHOICES = [("1", "tag1"), ("2", "tag2"), ("3", "tag3")] class NcursesDisplay...
apache-2.0
fle-internal/content-curation
contentcuration/contentcuration/utils/celery_signals.py
1
2657
import ast import logging import os import traceback from celery.signals import after_task_publish, task_failure, task_success from celery.utils.log import get_task_logger from django.core.exceptions import ObjectDoesNotExist from contentcuration.models import Task, User # because Celery connects signals upon import...
mit
vFense/vFenseAgent-nix
agent/deps/mac/Python-2.7.5/lib/python2.7/bsddb/test/test_db.py
72
5796
import unittest import os, glob from test_all import db, test_support, get_new_environment_path, \ get_new_database_path #---------------------------------------------------------------------- class DB(unittest.TestCase): def setUp(self): self.path = get_new_database_path() self.db = db.D...
lgpl-3.0
nkhuyu/SFrame
oss_src/python_packages/predictive_service_client/graphlab_service_client/test/test.py
10
4624
''' Copyright (C) 2015 Dato, Inc. All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. ''' import os from ConfigParser import ConfigParser import tempfile from unittest import TestCase import httpretty from predictive_client import Pr...
bsd-3-clause
koomik/CouchPotatoServer
libs/subliminal/language.py
107
54658
# -*- coding: utf-8 -*- # Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com> # # This file is part of subliminal. # # subliminal 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 3 of...
gpl-3.0
kbussell/django-docusign
setup.py
1
2412
#!/usr/bin/env python # -*- coding: utf-8 -*- """Python packaging.""" import os import sys from setuptools import setup #: Absolute path to directory containing setup.py file. here = os.path.abspath(os.path.dirname(__file__)) #: Boolean, ``True`` if environment is running Python version 2. IS_PYTHON2 = sys.version_i...
bsd-3-clause
katsikas/gnuradio
gr-uhd/examples/python/usrp_wxapt_rcv.py
8
10755
#!/usr/bin/env python # # Copyright 2005-2007,2011 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 ...
gpl-3.0
pastebt/yeast
testcase/test_acore.py
1
4379
import sys import unittest from StringIO import StringIO sys.path.append('../yeast') import ahttp import acore class FAKE_USER(acore.Acore): def read_all(self, arw, size=0, seps=()): for y in arw.aread(size, seps): yield y class FAKE(acore.ARW): def __init__(self, data): acore.A...
gpl-2.0
StrellaGroup/frappe
frappe/integrations/doctype/webhook/webhook.py
15
2261
# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe import json, requests from frappe import _ from frappe.model.document import Document from six.moves.urllib.parse import urlparse fr...
mit
tilde-lab/tilde
tests/apps/perovskite_tilting/tilt_data.py
1
4199
#!/usr/bin/env python # Euler tilting angles extraction test # Author: Evgeny Blokhin """ Data for this test are published in: [1] Surf.Sci.602, 3674 (2008), http://dx.doi.org/10.1016/j.susc.2008.10.002 [2] Evgeny Blokhin's MSc. thesis (in Russian), http://dx.doi.org/10.13140/RG.2.1.4276.2727 [3] PRB83, 134108 (2011),...
mit
iandev/HarvestMood
Requests/docs/_themes/flask_theme_support.py
2228
4875
# flasky extensions. flasky pygments style based on tango style from pygments.style import Style from pygments.token import Keyword, Name, Comment, String, Error, \ Number, Operator, Generic, Whitespace, Punctuation, Other, Literal class FlaskyStyle(Style): background_color = "#f8f8f8" default_style = "...
mit
xHeliotrope/injustice_dropper
env/lib/python3.4/site-packages/phonenumbers/data/region_UZ.py
11
3203
"""Auto-generated file, do not edit by hand. UZ metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_UZ = PhoneMetadata(id='UZ', country_code=998, international_prefix='810', general_desc=PhoneNumberDesc(national_number_pattern='[679]\\d{8}', possible_number_pattern='...
mit
hidext/oemedical
oemedical_socioeconomics/oemedical_socioeconomics/oemedical_socioeconomics.py
1
6182
# -*- coding: utf-8 -*- ############################################################################## # # Tech-Receptives Solutions Pvt. Ltd. # Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>) # Special Credit and Thanks to Thymbra Latinoamericana S.A. # # This program is free soft...
agpl-3.0
jkonecki/autorest
AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Validation/autorestvalidationtest/models/child_product.py
2
1073
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
nikolas/edx-platform
cms/djangoapps/contentstore/views/tests/test_preview.py
101
5240
""" Tests for contentstore.views.preview.py """ import re import ddt from mock import Mock from xblock.core import XBlock from django.test.client import RequestFactory from xblock.core import XBlockAside from student.tests.factories import UserFactory from xmodule.modulestore.tests.factories import CourseFactory, It...
agpl-3.0
flychen50/trunk
third_party/googletest-r108/test/gtest_xml_outfiles_test.py
15
5255
#!/usr/bin/env python # # Copyright 2008, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
bsd-3-clause
dyrock/trafficserver
tests/gold_tests/basic/basic-manager.test.py
8
1209
''' ''' # 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");...
apache-2.0
luckpizza/n8000-kernel-aufs
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
1927
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
gpl-2.0
heke123/chromium-crosswalk
tools/grit/grit/format/c_format.py
25
2777
#!/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. """Formats as a .C file for compilation. """ import os import re import types from grit import util def _FormatHeader(root, out...
bsd-3-clause
polypmer/freestuff-bot
freestuffs/docs/conf.py
2
9734
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # freestuffs documentation build configuration file, created by # sphinx-quickstart on Sat Jun 11 15:48:51 2016. # # 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 #...
mit
dann/python-hookable
docs/conf.py
1
9257
# -*- coding: utf-8 -*- # # hookable documentation build configuration file, created by # sphinx-quickstart on Wed Jan 4 21:12: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. # # Al...
bsd-3-clause
houzhenggang/hiwifi-openwrt-HC5661-HC5761
staging_dir/host/lib/python2.7/test/test_mailbox.py
19
82822
import os import sys import time import stat import socket import email import email.message import re import StringIO from test import test_support import unittest import mailbox import glob try: import fcntl except ImportError: pass # Silence Py3k warning rfc822 = test_support.import_module('rfc822', depreca...
gpl-2.0
joopert/nad_receiver
nad_receiver/__init__.py
1
11483
""" NAD has an RS232 interface to control the receiver. Not all receivers have all functions. Functions can be found on the NAD website: http://nadelectronics.com/software """ import codecs import socket from time import sleep from typing import Any, Dict, Iterable, Optional, Union from nad_receiver.nad_commands impo...
mit
kelle/astropy
astropy/vo/validator/tstquery.py
2
3390
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Temporary solution until `astropy.vo.validator.Conf.conesearch_master_list` includes ``<testQuery>`` fields. In case USVO service is unstable, it does the following: #. Try USVO production server. #. If fails, try USVO test server (has latest ...
bsd-3-clause
Tesora/tesora-python-troveclient
troveclient/tests/osc/v1/test_database_flavors.py
1
1636
# 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 # distrib...
apache-2.0
alanjw/GreenOpenERP-Win-X86
python/Lib/site-packages/unidecode/x098.py
252
4645
data = ( 'Hu ', # 0x00 'Ye ', # 0x01 'Ding ', # 0x02 'Qing ', # 0x03 'Pan ', # 0x04 'Xiang ', # 0x05 'Shun ', # 0x06 'Han ', # 0x07 'Xu ', # 0x08 'Yi ', # 0x09 'Xu ', # 0x0a 'Gu ', # 0x0b 'Song ', # 0x0c 'Kui ', # 0x0d 'Qi ', # 0x0e 'Hang ', # 0x0f 'Yu ', # 0x10 'Wan '...
agpl-3.0
beiko-lab/gengis
bin/Lib/site-packages/scipy/sparse/sparsetools/csc.py
6
48084
# This file was automatically generated by SWIG (http://www.swig.org). # Version 2.0.7 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2,6,0): def swig_import_helper(): from os.path import ...
gpl-3.0
saurabh6790/omnisys-lib
webnotes/model/doc.py
11
20444
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals """ Contains the Document class representing an object / record """ _toc = ["webnotes.model.doc.Document"] import webnotes import webnotes.model.meta from webnotes.utils im...
mit
erigones/esdc-ce
ans/roles/cluster/library/pcs_resource.py
1
15877
#!/usr/bin/python # Copyright: (c) 2018, Ondrej Famera <ondrej-xa2iel8u@famera.cz> # GNU General Public License v3.0+ (see LICENSE-GPLv3.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 (see LICENSE-APACHE2.txt or http://www.apache.org/licenses/LICENSE-2.0) from __future__ import absolute_import,...
apache-2.0
jolid/script.module.donnie
lib/donnie/hgtv.py
1
3410
import urllib2, urllib, sys, os, re, random, copy import urlresolver from BeautifulSoup import BeautifulSoup, Tag, NavigableString import xbmc,xbmcplugin,xbmcgui,xbmcaddon from t0mm0.common.net import Net from t0mm0.common.addon import Addon from scrapers import CommonScraper net = Net() ''' ########################...
gpl-2.0
factorybuild/stbgui
lib/python/Screens/InfoBarGenerics.py
1
119933
from ChannelSelection import ChannelSelection, BouquetSelector, SilentBouquetSelector from Components.ActionMap import ActionMap, HelpableActionMap from Components.ActionMap import NumberActionMap from Components.Harddisk import harddiskmanager from Components.Input import Input from Components.Label import Label from...
gpl-2.0
fargalaxy1/geonode-wagtail
geonode/services/migrations/0002_auto_20160821_1919.py
5
2311
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('services', '0001_initial'), ] operations = [ migrations.AlterField( model_name='serviceprofilerole', ...
gpl-3.0
sangwook236/sangwook-library
python/src/swl/machine_learning/imgaug_batch_manager.py
2
7654
import os import numpy as np import imgaug as ia from swl.machine_learning.batch_manager import BatchManager, FileBatchManager #-------------------------------------------------------------------- # ImgaugBatchManager. # Generates and augments batches using imgaug library in background processes. class ImgaugBatchMana...
gpl-2.0
hpcugent/easybuild-framework
easybuild/toolchains/pgi.py
1
1780
## # Copyright 2015 Bart Oldeman # # This file is triple-licensed under GPLv2 (see below), MIT, and # BSD three-clause licenses. # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish ...
gpl-2.0
mollstam/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Tools/i18n/msgfmt.py
32
6488
#! /usr/bin/env python # -*- coding: iso-8859-1 -*- # Written by Martin v. Löwis <loewis@informatik.hu-berlin.de> """Generate binary message catalog from textual translation description. This program converts a textual Uniforum-style message catalog (.po file) into a binary GNU catalog (.mo file). This is essentiall...
mit
ShinyROM/android_external_chromium_org
native_client_sdk/src/build_tools/update_sdktools.py
70
4004
#!/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. """Script that reads omahaproxy and gsutil to determine a version of the sdk_tools bundle to use. Please note the differences betw...
bsd-3-clause
Jaiz909/youtube-dl
youtube_dl/downloader/rtsp.py
119
1528
from __future__ import unicode_literals import os import subprocess from .common import FileDownloader from ..utils import ( check_executable, encodeFilename, ) class RtspFD(FileDownloader): def real_download(self, filename, info_dict): url = info_dict['url'] self.report_destination(file...
unlicense
webounty/mezzanine
mezzanine/template/__init__.py
40
4855
from __future__ import unicode_literals from functools import wraps from django import template from django.template.context import Context from django.template.loader import get_template, select_template from mezzanine.utils.device import templates_for_device class Library(template.Library): """ Extends `...
bsd-2-clause
agconti/njode
env/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/version.py
71
1517
""" Extracts the version of the PostgreSQL server. """ import re # This reg-exp is intentionally fairly flexible here. # Needs to be able to handle stuff like: # PostgreSQL 8.3.6 # EnterpriseDB 8.3 # PostgreSQL 8.3 beta4 # PostgreSQL 8.4beta1 VERSION_RE = re.compile(r'\S+ (\d+)\.(\d+)\.?(\d+)?') def _parse_...
bsd-3-clause
dreamapplehappy/myblog
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/pygments/__init__.py
269
2974
# -*- coding: utf-8 -*- """ Pygments ~~~~~~~~ Pygments is a syntax highlighting package written in Python. It is a generic syntax highlighter for general use in all kinds of software such as forum systems, wikis or other applications that need to prettify source code. Highlights are: * a ...
mit
ruriwo/ErgoThumb072_firmware
tmk_core/tool/mbed/mbed-sdk/workspace_tools/libraries.py
40
3646
""" mbed SDK Copyright (c) 2011-2013 ARM Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wr...
gpl-2.0
ity/pants
tests/python/pants_test/backend/jvm/tasks/test_binary_create_integration.py
12
6126
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import sub...
apache-2.0
gannetson/sportschooldeopenlucht
env/lib/python2.7/site-packages/django/core/exceptions.py
118
2799
""" Global Django exception and warning classes. """ from functools import reduce class DjangoRuntimeWarning(RuntimeWarning): pass class ObjectDoesNotExist(Exception): "The requested object does not exist" silent_variable_failure = True class MultipleObjectsReturned(Exception): "The query returned...
bsd-3-clause
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/numpy/f2py/rules.py
32
54543
#!/usr/bin/env python """ Rules for building C/API module with f2py2e. Here is a skeleton of a new wrapper function (13Dec2001): wrapper_function(args) declarations get_python_arguments, say, `a' and `b' get_a_from_python if (successful) { get_b_from_python if (successful) { callfortran ...
agpl-3.0
abhiQmar/servo
tests/wpt/css-tests/tools/wptserve/wptserve/handlers.py
87
13046
import cgi import json import os import traceback import urllib import urlparse from .constants import content_types from .pipes import Pipeline, template from .ranges import RangeParser from .request import Authentication from .response import MultipartContent from .utils import HTTPException __all__ = ["file_handle...
mpl-2.0
Kazade/NeHe-Website
google_appengine/lib/django-1.5/django/contrib/gis/geos/prototypes/io.py
103
8497
import threading from ctypes import byref, c_char_p, c_int, c_char, c_size_t, Structure, POINTER from django.contrib.gis import memoryview from django.contrib.gis.geos.base import GEOSBase from django.contrib.gis.geos.libgeos import GEOM_PTR from django.contrib.gis.geos.prototypes.errcheck import check_geom, check_stri...
bsd-3-clause
wbond/crlbuilder
dev/tests.py
7
2294
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function import unittest import re import sys import warnings from . import requires_oscrypto from ._import import _preload from tests import test_classes if sys.version_info < (3,): range = xrange # noqa from cString...
mit
JeNeSuisPasDave/hyde
hyde/tests/test_simple_copy.py
7
4366
# -*- coding: utf-8 -*- """ Tests the simple copy feature. In order to mark some files to simply be copied to the destination without any processing what so ever add this to the config (site.yaml for example): simple_copy: - media/css/*.css - media/js/*.js - **/*.js Matching is done with `fnmatch` module....
mit
nvoron23/socialite
jython/Lib/test/test_timeout.py
22
6675
"""Unit tests for socket timeout feature.""" import unittest from test import test_support # This requires the 'network' resource as given on the regrtest command line. skip_expected = not test_support.is_resource_enabled('network') import time import socket class CreationTestCase(unittest.TestCase): """Test c...
apache-2.0
luvit/gyp
test/win/gyptest-link-restat-importlib.py
115
1375
#!/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 we don't cause unnecessary builds due to import libs appearing to be out of date. """ import TestGyp import os import sys im...
bsd-3-clause
thebonzitree/django-guardian
guardian/admin.py
37
15993
from __future__ import unicode_literals from django import forms from django.conf import settings from guardian.compat import url, patterns from django.contrib import admin from django.contrib import messages from django.contrib.admin.widgets import FilteredSelectMultiple from django.core.urlresolvers import reverse f...
bsd-2-clause
s40523213/2016fallcp_hw
course/ggame/sysdeps.py
4
1983
def module_exists(module_name): try: __import__(module_name) except ImportError: return False else: return True if module_exists('browser') and module_exists('javascript'): from browser import window, document from javascript import JSObject, JSConstructor GFX...
agpl-3.0
mcrowson/django
tests/auth_tests/test_mixins.py
274
8335
from django.contrib.auth import models from django.contrib.auth.mixins import ( LoginRequiredMixin, PermissionRequiredMixin, UserPassesTestMixin, ) from django.contrib.auth.models import AnonymousUser from django.core.exceptions import PermissionDenied from django.http import HttpResponse from django.test import Re...
bsd-3-clause
zzicewind/nova
nova/tests/unit/compute/test_claims.py
8
14665
# Copyright (c) 2012 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 ...
apache-2.0
caphrim007/ansible
lib/ansible/modules/cloud/azure/azure_rm_publicipaddress_facts.py
14
5576
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.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 ANS...
gpl-3.0
ybroze/trading-with-python
cookbook/connectToTWS.py
77
2837
#! /usr/bin/env python # -*- coding: utf-8 -*- from ib.ext.Contract import Contract from ib.ext.ExecutionFilter import ExecutionFilter from ib.opt import ibConnection, message from time import sleep # print all messages from TWS def watcher(msg): print '[watcher]',msg def dummyHandler(msg): pass...
bsd-3-clause
AndrewGrossman/django
django/middleware/http.py
247
2129
from django.utils.http import http_date, parse_http_date_safe class ConditionalGetMiddleware(object): """ Handles conditional GET operations. If the response has an ETag or Last-Modified header, and the request has If-None-Match or If-Modified-Since, the response is replaced by an HttpNotModified. ...
bsd-3-clause
mitya57/django
django/contrib/gis/gdal/envelope.py
62
6973
""" The GDAL/OGR library uses an Envelope structure to hold the bounding box information for a geometry. The envelope (bounding box) contains two pairs of coordinates, one for the lower left coordinate and one for the upper right coordinate: +----------o Upper right; (max_x, max_y) ...
bsd-3-clause
Milad-Rakhsha/chrono
src/demos/python/irrlicht/demo_IRR_callbackNSC.py
3
6089
# ============================================================================= # PROJECT CHRONO - http:#projectchrono.org # # Copyright (c) 2014 projectchrono.org # All rights reserved. # # Use of this source code is governed by a BSD-style license that can be found # in the LICENSE file at the top level of the distri...
bsd-3-clause
40223249-1/2015cd_midterm2
static/Brython3.1.1-20150328-091302/Lib/collections/__init__.py
625
25849
#__all__ = ['deque', 'defaultdict', 'Counter'] from _collections import deque, defaultdict #from itertools import repeat as _repeat, chain as _chain, starmap as _starmap __all__ = ['deque', 'defaultdict', 'namedtuple', 'UserDict', 'UserList', 'UserString', 'Counter', 'OrderedDict'] # For bootstrapping re...
agpl-3.0
jbremer/monitor
src/capstone/bindings/python/test_xcore.py
3
2325
#!/usr/bin/env python # Capstone Python bindings, by Nguyen Anh Quynnh <aquynh@gmail.com> from __future__ import print_function from capstone import * from capstone.xcore import * from xprint import to_x, to_hex, to_x_32 XCORE_CODE = b"\xfe\x0f\xfe\x17\x13\x17\xc6\xfe\xec\x17\x97\xf8\xec\x4f\x1f\xfd\xec\x37\x07\xf2...
gpl-3.0
chewable/django
django/contrib/gis/sitemaps/views.py
15
4114
from django.http import HttpResponse, Http404 from django.template import loader from django.contrib.gis.db.backend import SpatialBackend from django.contrib.sites.models import Site from django.core import urlresolvers from django.core.paginator import EmptyPage, PageNotAnInteger from django.db.models import get_model...
bsd-3-clause
felixma/nova
nova/cells/weights/ram_by_instance_type.py
63
1971
# Copyright (c) 2012-2013 Rackspace Hosting # 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 # # Unles...
apache-2.0
MacHu-GWU/pyknackhq-project
setup.py
1
4034
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Frequent used classifiers List = [ "Development Status :: 1 - Planning", "Development Status :: 2 - Pre-Alpha", "Development Status :: 3 - Alpha", "Development Status :: 4 - Beta", "Development Status :: 5 - Production/Stable", "Development Stat...
mit
JesseLivezey/pylearn2
pylearn2/dataset_get/helper-scripts/make-archive.py
44
3085
#!/usr/bin/env python # -*- coding: utf-8 __authors__ = "Steven Pigeon" __copyright__ = "(c) 2012 Université de Montréal" __contact__ = "Steven Pigeon: pigeon@iro.umontreal.ca" __version__ = "make-archive 0.1" __licence__ = "BSD 3-Clause http://www.opensource.org/licenses/BSD-3-Clause " import logging import...
bsd-3-clause
svn2github/audacity
lib-src/lv2/lv2/waflib/Options.py
330
5458
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,tempfile,optparse,sys,re from waflib import Logs,Utils,Context cmds='distclean configure build install clean uninstall check dist distcheck'.split() options={} comma...
gpl-2.0
linktlh/Toontown-journey
toontown/speedchat/TTSCToontaskMenu.py
5
1507
from otp.speedchat.SCMenu import SCMenu from TTSCToontaskTerminal import TTSCToontaskTerminal from otp.speedchat.SCStaticTextTerminal import SCStaticTextTerminal from toontown.quest import Quests class TTSCToontaskMenu(SCMenu): def __init__(self): SCMenu.__init__(self) self.accept('questsChanged',...
apache-2.0
mne-tools/mne-tools.github.io
0.14/_downloads/plot_topo_compare_conditions.py
3
2175
""" ================================================= Compare evoked responses for different conditions ================================================= In this example, an Epochs object for visual and auditory responses is created. Both conditions are then accessed by their respective names to create a sensor layout...
bsd-3-clause
INFN-Catania/FedManager
fednodes/abstract_classes.py
1
2405
""" Copyright 2015 INFN (Italy) 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
KJin99/zulip
zerver/management/commands/set_default_streams.py
113
1657
from __future__ import absolute_import from django.core.management.base import BaseCommand from zerver.models import Realm from zerver.lib.actions import set_default_streams from optparse import make_option import sys class Command(BaseCommand): help = """Set default streams for a realm Users created under thi...
apache-2.0
borosnborea/SwordGO_app
example/kivymap/.buildozer/applibs/requests/packages/chardet/mbcsgroupprober.py
2769
1967
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
gpl-3.0
Nindaleth/ansible-modules-core
network/basics/slurp.py
15
2145
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of...
gpl-3.0
karllessard/tensorflow
tensorflow/python/keras/layers/preprocessing/benchmarks/category_encoding_benchmark.py
4
3162
# Copyright 2020 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
mayankcu/Django-social
venv/Lib/encodings/iso8859_4.py
593
13632
""" Python Character Mapping Codec iso8859_4 generated from 'MAPPINGS/ISO8859/8859-4.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors='...
bsd-3-clause