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 |
|---|---|---|---|---|---|
xyficu/rts2 | scripts/gcal.py | 3 | 8246 | #!/usr/bin/python
#
# Copyright (C) 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 ... | gpl-2.0 |
Koulio/rietveld | codereview/patching.py | 23 | 8327 | # Copyright 2008 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 writing, ... | apache-2.0 |
unlimitedlabs/orchestra | orchestra/communication/tests/test_managers.py | 2 | 1766 | from orchestra.models import CommunicationPreference
from orchestra.tests.helpers import OrchestraTestCase
from orchestra.tests.helpers.fixtures import UserFactory
from orchestra.tests.helpers.fixtures import WorkerFactory
class ManagersTestCase(OrchestraTestCase):
def setUp(self):
self.user = UserFactor... | apache-2.0 |
bacher09/Gentoolkit | pym/gentoolkit/eshowkw/__init__.py | 1 | 5154 | # vim:fileencoding=utf-8
# Copyright 2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
__package__ = 'gentoolkit.eshowkw'
__version__ = 'svn'
__author__ = "Tomáš Chvátal <scarabeus@gentoo.org>"
import sys, os, fnmatch
import argparse
from portage import output as porto
from por... | gpl-2.0 |
itielshwartz/BackendApi | lib/simplejson/tool.py | 1 | 1138 | r"""Command-line tool to validate and pretty-print JSON
Usage::
$ echo '{"json":"obj"}' | python -m simplejson.tool
{
"json": "obj"
}
$ echo '{ 1.2:3.4}' | python -m simplejson.tool
Expecting property name: line 1 column 2 (char 2)
"""
from __future__ import with_statement
import sys
imp... | apache-2.0 |
Errantgod/azaharTEA | menubar/menus/filechoosers/savedialog.py | 1 | 2891 | """
savedialog
==========
**Module** : ``menubar.menus.filechoosers.savedialog.py``
Contains the class :py:class:`.SaveDialog`, used to show
a filechooser for saving.
"""
from kivy.uix.popup import Popup
from kivy.properties import ObjectProperty
import os
class SaveDialog(Popup):
"""A popup that shows a filec... | mit |
apawar2/php-buildpack | lib/yaml/dumper.py | 542 | 2719 |
__all__ = ['BaseDumper', 'SafeDumper', 'Dumper']
from emitter import *
from serializer import *
from representer import *
from resolver import *
class BaseDumper(Emitter, Serializer, BaseRepresenter, BaseResolver):
def __init__(self, stream,
default_style=None, default_flow_style=None,
c... | apache-2.0 |
mou4e/zirconium | tools/deep_memory_profiler/subcommands/policies.py | 64 | 14719 | # 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.
import datetime
import json
import logging
import sys
from lib.pageframe import PFNCounts
from lib.policy import PolicySet
from lib.subcommand import SubCom... | bsd-3-clause |
KaranToor/MA450 | google-cloud-sdk/.install/.backup/lib/surface/app/gen_repo_info_file.py | 3 | 4773 | # Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | apache-2.0 |
jhawkesworth/ansible | lib/ansible/module_utils/lxd.py | 79 | 6224 | # -*- coding: utf-8 -*-
# (c) 2016, Hiroaki Nakamura <hnakamur@gmail.com>
#
# This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to th... | gpl-3.0 |
kawamon/hue | desktop/core/ext-py/dnspython-1.15.0/tests/test_grange.py | 4 | 2916 | # Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED "... | apache-2.0 |
mozilla/verbatim | vendor/lib/python/django/contrib/gis/db/backends/oracle/operations.py | 52 | 12903 | """
This module contains the spatial lookup types, and the `get_geo_where_clause`
routine for Oracle Spatial.
Please note that WKT support is broken on the XE version, and thus
this backend will not work on such platforms. Specifically, XE lacks
support for an internal JVM, and Java libraries are required to use... | gpl-2.0 |
edry/edx-platform | cms/djangoapps/contentstore/features/video.py | 134 | 8674 | # pylint: disable=missing-docstring
from lettuce import world, step
from selenium.webdriver.common.keys import Keys
from xmodule.modulestore.django import modulestore
VIDEO_BUTTONS = {
'CC': '.hide-subtitles',
'volume': '.volume',
'play': '.video_control.play',
'pause': '.video_control.pause',
'ha... | agpl-3.0 |
jadecastro/LTLMoP | src/lib/handlers/motionControl/vectorController.py | 1 | 4527 | #!/usr/bin/env python
"""
=======================================================
vectorController.py - Vector Addition Motion Controller
=======================================================
Uses the vector field algorithm developed by Stephen R. Lindemann to calculate a global velocity vector to take the robot fro... | gpl-3.0 |
anhdiepmmk/yowsup | yowsup/common/http/waresponseparser.py | 67 | 4304 | import json, sys
from xml.dom import minidom
import plistlib
import logging
logger = logging.getLogger(__name__)
class ResponseParser(object):
def __init__(self):
self.meta = "*"
def parse(self, text, pvars):
return text
def getMeta(self):
return self.meta
... | gpl-3.0 |
gautamkrishnar/hatter | venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/cp949prober.py | 2801 | 1782 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org 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 Reserved.
#
# Con... | gpl-3.0 |
tysonholub/twilio-python | tests/integration/autopilot/v1/assistant/test_task.py | 1 | 11710 | # coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from tests import IntegrationTestCase
from tests.holodeck import Request
from twilio.base.exceptions import TwilioException
from twilio.http.response import Response
class TaskTestCase(IntegrationT... | mit |
leifdenby/numpy | numpy/core/records.py | 4 | 29381 | """
Record Arrays
=============
Record arrays expose the fields of structured arrays as properties.
Most commonly, ndarrays contain elements of a single type, e.g. floats,
integers, bools etc. However, it is possible for elements to be combinations
of these using structured types, such as::
>>> a = np.array([(1, 2... | bsd-3-clause |
lafayette/JBTT | framework/python/Lib/site-packages/win32/scripts/rasutil.py | 21 | 2417 | # A demo of using the RAS API from Python
import sys
import string
import win32ras
# The error raised if we can not
class ConnectionError(Exception):
pass
def Connect(rasEntryName, numRetries = 5):
"""Make a connection to the specified RAS entry.
Returns a tuple of (bool, handle) on success.
- bool is 1 if a n... | mit |
Graghav/surabi | ADMIN/venv/lib/python2.7/site-packages/pymongo/server_selectors.py | 5 | 4217 | # Copyright 2014-2015 MongoDB, 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 writi... | apache-2.0 |
spesmilo/electrum | electrum/keystore.py | 2 | 41263 | #!/usr/bin/env python2
# -*- mode: python -*-
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2016 The Electrum developers
#
# 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... | mit |
airbnb/airflow | tests/providers/apache/hive/transfers/test_hive_to_mysql.py | 7 | 7997 | #
# 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 |
suutari-ai/shoop | shuup_setup_utils/versions.py | 3 | 3002 | # This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import os
import subprocess
def get_version(version, root, version_file):
"""
Ge... | agpl-3.0 |
balanced/PyXB | tests/trac/trac-0184/check.py | 3 | 2523 | # -*- coding: utf-8 -*-
import logging
if __name__ == '__main__':
logging.basicConfig()
_log = logging.getLogger(__name__)
import pyxb.utils.domutils
import bindings.s0 as s0
import bindings.s1 as s1
pyxb.utils.domutils.BindingDOMSupport.DeclareNamespace(s0.Namespace, 's0')
pyxb.utils.domutils.BindingDOMSupport.D... | apache-2.0 |
tekapo/fabric | tests/Python26SocketServer.py | 13 | 21995 | """Generic socket server classes.
This module tries to capture the various aspects of defining a server:
For socket-based servers:
- address family:
- AF_INET{,6}: IP (Internet Protocol) sockets (default)
- AF_UNIX: Unix domain sockets
- others, e.g. AF_DECNET are conceivable (see <socket.h>
... | bsd-2-clause |
benbahrenburg/titanium_mobile | support/android/requireIndex.py | 33 | 1247 | #! /usr/bin/env python
#
# Appcelerator Titanium Mobile
# Copyright (c) 2011-2012 by Appcelerator, Inc. All Rights Reserved.
# Licensed under the terms of the Apache Public License
# Please see the LICENSE included with this distribution for details.
#
# Generates an index file used by require
# to test if a file exist... | apache-2.0 |
benbox69/pyload | module/plugins/crypter/HoerbuchIn.py | 15 | 2207 | # -*- coding: utf-8 -*-
import re
import BeautifulSoup
from module.plugins.internal.Crypter import Crypter
class HoerbuchIn(Crypter):
__name__ = "HoerbuchIn"
__type__ = "crypter"
__version__ = "0.62"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?hoerbuch\.in/(wp/horbucher/\d+/... | gpl-3.0 |
geminy/aidear | oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/build/android/pylib/chrome_test_server_spawner.py | 4 | 16476 | # 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.
"""A "Test Server Spawner" that handles killing/stopping per-test test servers.
It's used to accept requests from the device to spawn and kill instances of ... | gpl-3.0 |
wayward710/django-allauth | allauth/socialaccount/providers/windowslive/views.py | 65 | 1498 | from __future__ import unicode_literals
import requests
from allauth.socialaccount.providers.oauth2.views import (OAuth2Adapter,
OAuth2LoginView,
OAuth2CallbackView)
from .provider import WindowsLiveProv... | mit |
carlosb1/examples-python | example2/test_find_words.py | 1 | 2853 | import unittest
from find_words import WordFinder
import os
import string
def load_dictionary(filename):
import re
dictionary={}
with open(filename) as f:
content = f.readlines()
for word in content:
word = re.sub('[^a-zA-Z0-9-_*.]','',word)
if len(word) > 0:
dictionary[word]=word
return dictionary... | gpl-2.0 |
aminorex/icsisumm | icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk_contrib/toolbox/settings.py | 9 | 19550 | #!/usr/bin/env python
# -*- coding: utf8 -*-
# Natural Language Toolkit: Toolbox Settings Parser
#
# Copyright (C) 2001-2006 University of Pennsylvania
# Author: Greg Aumann <greg_aumann@sil.org>/Stuart Robinson <stuart@zapata.org>
# URL: <http://nltk.sf.net>
# For license information, see LICENSE.TXT
"""
This module... | gpl-3.0 |
MKTCloud/MKTCloud | openstack_dashboard/dashboards/project/images_and_snapshots/views.py | 1 | 3462 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
# Copyright 2012 OpenStack LLC
#
# Licensed under the Apache License, Version 2.0 (... | apache-2.0 |
sergio-incaser/odoo | addons/website_blog/__init__.py | 373 | 1036 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... | agpl-3.0 |
devops2014/djangosite | django/db/backends/mysql/validation.py | 98 | 1327 | from django.core import checks
from django.db.backends.base.validation import BaseDatabaseValidation
class DatabaseValidation(BaseDatabaseValidation):
def check_field(self, field, **kwargs):
"""
MySQL has the following field length restriction:
No character (varchar) fields can have a leng... | bsd-3-clause |
JulyKikuAkita/PythonPrac | cs15211/MinimizeMaxDistancetoGasStation.py | 1 | 4539 | __source__ = 'https://leetcode.com/problems/minimize-max-distance-to-gas-station/'
# Time: O()
# Space: O()
#
# Description: Leetcode # 774. Minimize Max Distance to Gas Station
#
# On a horizontal number line,
# we have gas stations at positions stations[0], stations[1], ..., stations[N-1], where N = stations.length.... | apache-2.0 |
chai2010/grpc-common | python/route_guide/route_guide_client.py | 16 | 4689 | # Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | bsd-3-clause |
vaginessa/android_kernel_samsung_golden-1 | tools/perf/scripts/python/sched-migration.py | 11215 | 11670 | #!/usr/bin/python
#
# Cpu task migration overview toy
#
# Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com>
#
# perf script event handlers have been generated by perf script -g python
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Fre... | gpl-2.0 |
luofei98/qgis | python/ext-libs/dateutil/rrule.py | 214 | 41036 | """
Copyright (c) 2003-2010 Gustavo Niemeyer <gustavo@niemeyer.net>
This module offers extensions to the standard Python
datetime module.
"""
__license__ = "Simplified BSD"
import itertools
import datetime
import calendar
try:
import _thread
except ImportError:
import thread as _thread
import sys
from six i... | gpl-2.0 |
franciscodominguezmateos/DeepLearningNanoDegree | image-classification/problem_unittests.py | 81 | 6927 | import os
import numpy as np
import tensorflow as tf
import random
from unittest.mock import MagicMock
def _print_success_message():
print('Tests Passed')
def test_folder_path(cifar10_dataset_folder_path):
assert cifar10_dataset_folder_path is not None,\
'Cifar-10 data folder not set.'
assert ci... | mit |
liuzheng712/jumpserver | apps/orgs/mixins.py | 1 | 6442 | # -*- coding: utf-8 -*-
#
from werkzeug.local import Local
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.shortcuts import redirect, get_object_or_404
from django.forms import ModelForm
from django.http.response import HttpResponseForbidden
from django.core.exceptions ... | gpl-2.0 |
bertucho/moviestalk2 | venv/Lib/encodings/gb18030.py | 816 | 1031 | #
# gb18030.py: Python Unicode Codec for GB18030
#
# Written by Hye-Shik Chang <perky@FreeBSD.org>
#
import _codecs_cn, codecs
import _multibytecodec as mbc
codec = _codecs_cn.getcodec('gb18030')
class Codec(codecs.Codec):
encode = codec.encode
decode = codec.decode
class IncrementalEncoder(mbc.MultibyteInc... | mit |
banmoy/ns3 | src/topology-read/bindings/modulegen__gcc_LP64.py | 38 | 183590 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... | gpl-2.0 |
edulramirez/nova | nova/api/openstack/compute/legacy_v2/contrib/quotas.py | 45 | 11615 | # 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 requ... | apache-2.0 |
devopservices/ansible | lib/ansible/runner/action_plugins/fetch.py | 110 | 7941 | # (c) 2012-2014, 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 the License, or
# (at your option) an... | gpl-3.0 |
kawula-openerp-indonesia/koi_base | koi_partner_manager/object_module/res_partner.py | 2 | 3336 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
#
# 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 Softw... | agpl-3.0 |
Adamtaranto/blast-besties | blastbesties/__init__.py | 1 | 4076 | #!/usr/bin/env python
#Contact, Adam Taranto, adam.taranto@anu.edu.au
# .-. .-') ('-. .-') .-') _ .-. .-') ('-. .-') .-') _ ('-. .-')
# \ ( OO ) ( OO ).-. ( OO ). ( OO) ) \ ( OO ) _( OO) ( OO ). ( OO) ) _( OO) ( OO ).
# ;... | mit |
Dangetsu/vnr | Frameworks/Sakura/py/apps/reader/managers/forumapi.py | 1 | 7178 | # coding: utf8
# forumapi.py
# 1/1/2015 jichi
import json
from sakurakit.skclass import memoized
from sakurakit.skdebug import dprint, dwarn
from mytr import my
import dataman, netman, growl
@memoized
def manager(): return ForumApi()
class ForumApi:
def __init__(self):
self.__d = _ForumApi()
def submitPost(... | gpl-3.0 |
google/nitroml | nitroml/automl/autodata/transform/executor.py | 1 | 2046 | # Copyright 2020 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 |
grap/OCB | addons/pad_project/__init__.py | 441 | 1066 | # -*- 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 |
BonexGu/Blik2D-SDK | Blik2D/addon/tensorflow-1.2.1_for_blik/tensorflow/contrib/keras/api/keras/applications/inception_v3/__init__.py | 57 | 1167 | # 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... | mit |
gonboy/sl4a | python/src/Lib/email/encoders.py | 152 | 2302 | # Copyright (C) 2001-2006 Python Software Foundation
# Author: Barry Warsaw
# Contact: email-sig@python.org
"""Encodings and related functions."""
__all__ = [
'encode_7or8bit',
'encode_base64',
'encode_noop',
'encode_quopri',
]
import base64
from quopri import encodestring as _encodestring
d... | apache-2.0 |
leki75/ansible | lib/ansible/modules/network/avi/avi_httppolicyset.py | 44 | 5240 | #!/usr/bin/python
#
# Created on Aug 25, 2016
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the te... | gpl-3.0 |
40223246/0622cdb-Final-TEST2-1 | static/Brython3.1.1-20150328-091302/Lib/_threading_local.py | 923 | 7410 | """Thread-local objects.
(Note that this module provides a Python version of the threading.local
class. Depending on the version of Python you're using, there may be a
faster one available. You should always import the `local` class from
`threading`.)
Thread-local objects support the management of thread-local d... | gpl-3.0 |
bsa11b/mtasa-blue | vendor/google-breakpad/src/tools/gyp/test/variables/commands/gyptest-commands.py | 311 | 1208 | #!/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.
"""
Test variable expansion of '<!()' syntax commands.
"""
import os
import TestGyp
test = TestGyp.TestGyp(format='gypd')
expect = test.... | gpl-3.0 |
krieger-od/nwjs_chromium.src | mojo/public/tools/bindings/pylib/mojom_tests/generate/data_unittest.py | 9 | 5344 | # 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.
import imp
import os.path
import sys
import unittest
def _GetDirAbove(dirname):
"""Returns the directory "above" this file containing |dirname| (which mus... | bsd-3-clause |
ebrelsford/growing_cities | growing_cities/buttons/migrations/0001_initial.py | 1 | 1261 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Button'
db.create_table(u'buttons_button', (
(u'id', self.gf('django.db.models.f... | gpl-3.0 |
programming086/omim | 3party/freetype/src/tools/docmaker/tohtml.py | 109 | 21251 | #
# tohtml.py
#
# A sub-class container of the `Formatter' class to produce HTML.
#
# Copyright 2002-2015 by
# David Turner.
#
# This file is part of the FreeType project, and may only be used,
# modified, and distributed under the terms of the FreeType project
# license, LICENSE.TXT. By continuing to use, mo... | apache-2.0 |
ibrahimkarahan/Flexget | tests/test_feed_control.py | 22 | 2148 | from __future__ import unicode_literals, division, absolute_import
from tests import FlexGetBase
class TestOnlytask(FlexGetBase):
"""
Test --task option
"""
__yaml__ = """
tasks:
test:
mock:
- {title: 'download', url: 'http://localhost/download'}
... | mit |
jonathanwcrane/boto | tests/unit/emr/test_instance_group_args.py | 112 | 2056 | #!/usr/bin/env python
# Author: Charlie Schluting <charlie@schluting.com>
#
# Test to ensure initalization of InstanceGroup object emits appropriate errors
# if bidprice is not specified, but allows float, int, Decimal.
from decimal import Decimal
from tests.compat import unittest
from boto.emr.instance_group import ... | mit |
adelomana/schema | sequenceAnalysis/varscan/script.py | 2 | 4683 | ### this script calls varscan based on the GATK mapping results
import os,sys
# 0. defining variables
tubes=['A2','B','D','E2','F','G','H2','I','J2','K','L','M']
path2Bam='/Volumes/WINDOW/ap/gatk/BY4741/tmp/150218_I1135_FCC634VACXX_L*'
genomePath='/Users/alomana/gDrive2/projects/ap/src/gatk/genome/BY4741_Toronto_2012.... | gpl-3.0 |
MoritzS/django | tests/template_tests/filter_tests/test_slugify.py | 132 | 1704 | from django.template.defaultfilters import slugify
from django.test import SimpleTestCase
from django.utils.functional import lazy
from django.utils.safestring import mark_safe
from ..utils import setup
class SlugifyTests(SimpleTestCase):
"""
Running slugify on a pre-escaped string leads to odd behavior,
... | bsd-3-clause |
40223233/2015cd_midterm | static/Brython3.1.1-20150328-091302/Lib/xml/dom/xmlbuilder.py | 873 | 12377 | """Implementation of the DOM Level 3 'LS-Load' feature."""
import copy
import xml.dom
from xml.dom.NodeFilter import NodeFilter
__all__ = ["DOMBuilder", "DOMEntityResolver", "DOMInputSource"]
class Options:
"""Features object that has variables set for each DOMBuilder feature.
The DOMBuilder class uses a... | gpl-2.0 |
kapilt/cloud-custodian | tools/c7n_mailer/c7n_mailer/cli.py | 2 | 9725 | from __future__ import absolute_import, division, print_function, unicode_literals
import argparse
import functools
import logging
from os import path
import boto3
import jsonschema
from c7n_mailer import deploy, utils
from c7n_mailer.azure_mailer.azure_queue_processor import MailerAzureQueueProcessor
from c7n_mailer... | apache-2.0 |
ssaeger/scikit-learn | examples/bicluster/plot_spectral_coclustering.py | 276 | 1736 | """
==============================================
A demo of the Spectral Co-Clustering algorithm
==============================================
This example demonstrates how to generate a dataset and bicluster it
using the the Spectral Co-Clustering algorithm.
The dataset is generated using the ``make_biclusters`` f... | bsd-3-clause |
handroissuazo/tensorflow | venv/lib/python2.7/site-packages/pip/_vendor/requests/adapters.py | 356 | 19740 | # -*- coding: utf-8 -*-
"""
requests.adapters
~~~~~~~~~~~~~~~~~
This module contains the transport adapters that Requests uses to define
and maintain connections.
"""
import os.path
import socket
from .models import Response
from .packages.urllib3.poolmanager import PoolManager, proxy_from_url
from .packages.urllib... | apache-2.0 |
xen0l/ansible | lib/ansible/modules/storage/netapp/_na_cdot_user.py | 20 | 10369 | #!/usr/bin/python
# (c) 2017, NetApp, Inc
# 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',
'status': ['deprecated'],
... | gpl-3.0 |
Fraunhofer-IIS/GNSS-DSP-tools | acquire-beidou-b1i.py | 1 | 2226 | #!/usr/bin/env python
import sys
import os
import numpy as np
import scipy.signal
import scipy.fftpack as fft
import gnsstools.beidou.b1i as b1i
import gnsstools.nco as nco
import gnsstools.io as io
#
# Acquisition search
#
def search(x,prn):
fs = 8192000.0
n = 8192 # 1 m... | mit |
rahul67/hue | desktop/core/ext-py/Django-1.6.10/tests/check/tests.py | 51 | 5087 | from django.core.checks.compatibility import base
from django.core.checks.compatibility import django_1_6_0
from django.core.management.commands import check
from django.core.management import call_command
from django.db.models.fields import NOT_PROVIDED
from django.test import TestCase
from .models import Book
class... | apache-2.0 |
eric-stanley/youtube-dl | youtube_dl/extractor/quickvid.py | 113 | 1719 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import (
compat_urlparse,
)
from ..utils import (
determine_ext,
int_or_none,
)
class QuickVidIE(InfoExtractor):
_VALID_URL = r'https?://(www\.)?quickvid\.org/watch\.php\?v=(?P<id>[a-zA-Z_0-9-]+)'
_... | unlicense |
ibelem/crosswalk-test-suite | wrt/wrt-packagemgt-windows-tests/pmwindows/Crosswalk_WebApp_Install.py | 14 | 1924 | #!/bin/bash
#Copyright (c) 2015 Intel Corporation.
#
#Redistribution and use in source and binary forms, with or without modification,
#are permitted provided that the following conditions are met:
#
#* Redistributions of works must retain the original copyright notice, this list
# of conditions and the following disc... | bsd-3-clause |
Juniper/contrail-sandesh | library/python/pysandesh/example/pysandesh_example/generator.py | 6 | 4239 | #
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
import gevent
from gevent import monkey; monkey.patch_all()
from pysandesh.sandesh_base import *
from gen_py.generator_msg.ttypes import *
from pysandesh_example.gen_py.vn.ttypes import *
from pysandesh_example.gen_py.vm.ttypes import *
import sandes... | apache-2.0 |
wwj718/OnlineJudge | utils/shortcuts.py | 3 | 2892 | # coding=utf-8
import hashlib
import time
import random
from django.shortcuts import render
from django.core.paginator import Paginator
from rest_framework.response import Response
def error_page(request, error_reason):
return render(request, "utils/error.html", {"error": error_reason})
def error_response(err... | mit |
beernarrd/gramps | gramps/plugins/quickview/ageondate.py | 10 | 3562 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2007-2008 Brian G. Matherly
# Copyright (C) 2009 Douglas S. Blank
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as p... | gpl-2.0 |
waseem18/oh-mainline | vendor/packages/twisted/twisted/test/test_text.py | 18 | 5440 |
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
from twisted.trial import unittest
from twisted.python import text
import string
from cStringIO import StringIO
sampleText = \
"""Every attempt to employ mathematical methods in the study of chemical
questions must be considered profoundly irr... | agpl-3.0 |
killkill/fabric-bolt | src/fabric_bolt/projects/migrations/0007_auto__add_field_deployment_started.py | 18 | 4087 | # -*- 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 'Deployment.started'
db.add_column(u'projects_deployment', 'started',
s... | mit |
gnieboer/tensorflow | tensorflow/contrib/legacy_seq2seq/python/ops/seq2seq.py | 24 | 56929 | # 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 |
pavdmyt/yaspin | yaspin/signal_handlers.py | 1 | 1065 | # :copyright: (c) 2021 by Pavlo Dmytrenko.
# :license: MIT, see LICENSE for more details.
"""
yaspin.signal_handlers
~~~~~~~~~~~~~~~~~~~~~~
Callback functions or "signal handlers", that are invoked
when the signal occurs.
"""
import sys
def default_handler(signum, frame, spinner): # pylint: disable=unused-argumen... | mit |
pozdnyakov/chromium-crosswalk | build/android/pylib/forwarder.py | 9 | 7922 | # 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 logging
import os
import re
import sys
import threading
import time
import android_commands
import cmd_helper
import constants
import ports
from... | bsd-3-clause |
thinkgen/thirdparty | script.module.urlresolver/lib/urlresolver/plugins/skyload.py | 3 | 3093 | """
urlresolver XBMC Addon
Copyright (C) 2011 t0mm0
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.
... | gpl-2.0 |
joshfriend/werkzeug | examples/plnt/sync.py | 44 | 3713 | # -*- coding: utf-8 -*-
"""
plnt.sync
~~~~~~~~~
Does the synchronization. Called by "manage-plnt.py sync"
:copyright: (c) 2009 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD.
"""
import sys
import feedparser
from time import time
from datetime import datetime
from werkzeug.util... | bsd-3-clause |
sandersnewmedia/django-fogbugz-gadget | django_fogbugz_gadget/utils.py | 1 | 3182 | from django.conf import settings
from django.core import exceptions
from django.core.cache import cache
from pyquery import PyQuery as pq
from urllib2 import HTTPError, URLError, Request, urlopen, quote
from urllib import urlencode
conf = {}
class GadgetError(Exception):
def __init__(self, msg):
self.msg... | mit |
Chilledheart/chromium | tools/telemetry/third_party/gsutilz/third_party/boto/tests/unit/emr/test_instance_group_args.py | 112 | 2056 | #!/usr/bin/env python
# Author: Charlie Schluting <charlie@schluting.com>
#
# Test to ensure initalization of InstanceGroup object emits appropriate errors
# if bidprice is not specified, but allows float, int, Decimal.
from decimal import Decimal
from tests.compat import unittest
from boto.emr.instance_group import ... | bsd-3-clause |
mapr/impala | tests/query_test/test_show_create_table.py | 3 | 9339 | #!/usr/bin/env python
# Copyright (c) 2013 Cloudera, 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 |
dpassante/ansible | lib/ansible/modules/shell.py | 7 | 6612 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# There is no actual shell module source, when you use 'shell' in ansible,
# it runs the 'command' module with special arguments and it behaves ... | gpl-3.0 |
2ndQuadrant/ansible | lib/ansible/modules/cloud/ovirt/ovirt_storage_domain_facts.py | 55 | 3673 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
#... | gpl-3.0 |
JackWink/sqlalchemy-utils | tests/types/test_numeric_range.py | 3 | 4070 | from decimal import Decimal
import pytest
import sqlalchemy as sa
from sqlalchemy_utils import NumericRangeType
intervals = None
inf = 0
try:
import intervals
from infinity import inf
except ImportError:
pass
@pytest.fixture
def create_car(session, Car):
def create_car(number_range):
car = ... | bsd-3-clause |
GaussDing/django | django/core/files/images.py | 144 | 2158 | """
Utility functions for handling images.
Requires Pillow as you might imagine.
"""
import zlib
from django.core.files import File
class ImageFile(File):
"""
A mixin for use alongside django.core.files.base.File, which provides
additional features for dealing with images.
"""
def _get_width(sel... | bsd-3-clause |
kvar/ansible | lib/ansible/modules/network/fortios/fortios_system_management_tunnel.py | 13 | 11162 | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# 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 Lic... | gpl-3.0 |
bnsgeyer/Copter3_4 | Tools/mavproxy_modules/lib/magcal_graph_ui.py | 108 | 8248 | # Copyright (C) 2016 Intel Corporation. All rights reserved.
#
# This file 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 fi... | gpl-3.0 |
ArcticaProject/vcxsrv | libxcb/src/c_client.py | 1 | 130637 | #!/usr/bin/env python
from __future__ import print_function
import getopt
import os
import sys
import errno
import re
# Jump to the bottom of this file for the main routine
# Some hacks to make the API more readable, and to keep backwards compability
_cname_re = re.compile('([A-Z0-9][a-z]+|[A-Z0-9]+(?![a-z])|[a-z]+)'... | gpl-3.0 |
hn8841182/2015cd_midterm | static/Brython3.1.0-20150301-090019/Lib/functools.py | 730 | 13596 | """functools.py - Tools for working with functions and callable objects
"""
# Python module wrapper for _functools C module
# to allow utilities written in Python to be added
# to the functools module.
# Written by Nick Coghlan <ncoghlan at gmail.com>
# and Raymond Hettinger <python at rcn.com>
# Copyright (C) 2006-2... | gpl-3.0 |
thedrow/django | tests/template_tests/syntax_tests/test_comment.py | 521 | 3667 | from django.test import SimpleTestCase
from ..utils import setup
class CommentSyntaxTests(SimpleTestCase):
@setup({'comment-syntax01': '{# this is hidden #}hello'})
def test_comment_syntax01(self):
output = self.engine.render_to_string('comment-syntax01')
self.assertEqual(output, 'hello')
... | bsd-3-clause |
damdam-s/OCB | addons/mrp/product.py | 180 | 4590 | # -*- 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 |
fchu/hadoop-0.20.205 | src/contrib/hod/testing/testHod.py | 182 | 14428 | #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 |
mpurzynski/MozDef | alerts/ldap_lockout.py | 3 | 1195 | #!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
# Copyright (c) 2014 Mozilla Corporation
from lib.alerttask import AlertTask
from mozdef_util.qu... | mpl-2.0 |
jamesblunt/edx-platform | openedx/core/djangoapps/credit/migrations/0001_initial.py | 85 | 8897 | # -*- 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 model 'CreditCourse'
db.create_table('credit_creditcourse', (
... | agpl-3.0 |
santoshsahoo/filesync-server | src/rpcdb/dal_backend.py | 6 | 16812 | # Copyright 2008-2015 Canonical
#
# 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
# License, or (at your option) any later version.
#
# This program is distributed... | agpl-3.0 |
PaddlePaddle/Paddle | python/paddle/fluid/device_worker.py | 1 | 18760 | # Copyright (c) 2019 PaddlePaddle 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 app... | apache-2.0 |
davgibbs/django | django/db/backends/base/base.py | 184 | 23050 | import copy
import time
import warnings
from collections import deque
from contextlib import contextmanager
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db import DEFAULT_DB_ALIAS
from django.db.backends import utils
from django.db.backends.signals import connect... | bsd-3-clause |
leeyingmu/melee | melee/webhttp/helpers.py | 1 | 3688 | # -*- coding: utf-8 -*-
import random
import hmac, hashlib, time
from melee.core import json
def format_ok_response(data=None):
from flask import jsonify
return jsonify(meta={'code': 200, 'message': 'ok'}, data=data) if data is not None else jsonify(meta={'code': 200, 'message': 'ok'})
def format_str_respons... | bsd-3-clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.