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
adoosii/edx-platform
pavelib/acceptance_test.py
12
1983
""" Acceptance test tasks """ from paver.easy import task, cmdopts, needs from pavelib.utils.test.suites import AcceptanceTestSuite from optparse import make_option try: from pygments.console import colorize except ImportError: colorize = lambda color, text: text # pylint: disable=invalid-name __test__ = Fal...
agpl-3.0
khchine5/xl
lino_xl/lib/ledger/mixins.py
1
10913
# -*- coding: UTF-8 -*- # Copyright 2008-2017 Luc Saffre # License: BSD (see file COPYING for details) """Model mixins for `lino_xl.lib.ledger`. .. autosummary:: """ from __future__ import unicode_literals from builtins import str from django.db import models from lino.api import dd, rt, _ from lino.mixins impor...
bsd-2-clause
maartenq/ansible
lib/ansible/modules/network/nxos/nxos_vtp_domain.py
70
5923
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
anandpdoshi/frappe
frappe/core/page/data_import_tool/importer.py
1
8937
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, json import frappe.permissions import frappe.async from frappe import _ from frappe.utils.csvutils import getlink from frappe.utils.dateutils import parse_date ...
mit
tedelhourani/ansible
lib/ansible/modules/network/netscaler/netscaler_gslb_vserver.py
22
33857
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017 Citrix Systems # 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
ehashman/oh-mainline
vendor/packages/Django/django/utils/importlib.py
124
1228
# Taken from Python 2.7 with permission from/by the original author. import sys def _resolve_name(name, package, level): """Return the absolute name of the module to be imported.""" if not hasattr(package, 'rindex'): raise ValueError("'package' not set to a string") dot = len(package) for x in ...
agpl-3.0
philetus/geosolver
workbench/tree.py
1
7545
from includes import * from parameters import Settings class Tree: def __init__(self, root): self.settings = Settings() self.orientation = self.settings.dvData.treeAlignment self.maxDepth = 100 self.siblingSeperation = 5 self.subtreeSeperation = 5 self.levelSeperation = 40 self.maxLevelHeight = [] sel...
gpl-3.0
myang321/django
django/contrib/gis/gdal/prototypes/geom.py
450
4735
from ctypes import POINTER, c_char_p, c_double, c_int, c_void_p from django.contrib.gis.gdal.envelope import OGREnvelope from django.contrib.gis.gdal.libgdal import lgdal from django.contrib.gis.gdal.prototypes.errcheck import check_envelope from django.contrib.gis.gdal.prototypes.generation import ( const_string_...
bsd-3-clause
ronfung/incubator-airflow
airflow/utils/dates.py
28
8416
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
ReganBell/QReview
networkx/algorithms/connectivity/cuts.py
41
22905
# -*- coding: utf-8 -*- """ Flow based cut algorithms """ import itertools import networkx as nx # Define the default maximum flow function to use in all flow based # cut algorithms. from networkx.algorithms.flow import edmonds_karp, shortest_augmenting_path from networkx.algorithms.flow import build_residual_network ...
bsd-3-clause
Srisai85/scipy
scipy/linalg/lapack.py
46
5636
""" Low-level LAPACK functions ========================== This module contains low-level functions from the LAPACK library. .. versionadded:: 0.12.0 .. warning:: These functions do little to no error checking. It is possible to cause crashes by mis-using them, so prefer using the higher-level routines in `...
bsd-3-clause
maohongyuan/kbengine
kbe/src/lib/python/Lib/encodings/iso8859_4.py
272
13376
""" 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='...
lgpl-3.0
Belxjander/Kirito
Python-2.3.3-Amiga/Tools/pynche/ChipViewer.py
1
5028
"""Chip viewer and widget. In the lower left corner of the main Pynche window, you will see two ChipWidgets, one for the selected color and one for the nearest color. The selected color is the actual RGB value expressed as an X11 #COLOR name. The nearest color is the named color from the X11 database that is closest ...
gpl-3.0
wkoathp/glance
glance/search/plugins/metadefs.py
6
9241
# Copyright 2015 Intel Corporation # 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 require...
apache-2.0
dropbox/dropbox-sdk-dotnet
generator/csproj.py
1
15683
from __future__ import unicode_literals from StringIO import StringIO COMPILE_INCLUDES = [ "Stone\\Decoder.cs", "Stone\\Empty.cs", "Stone\\Encoder.cs", "Stone\\IEncoder.cs", "Stone\\IDecoder.cs", "Stone\\IJsonReader.cs", "Stone\\IJsonWriter.cs", "Stone\\ITransport.cs", "Stone\\Jso...
mit
npuichigo/ttsflow
third_party/tensorflow/tensorflow/contrib/slim/python/slim/data/tfexample_decoder_test.py
34
30604
# 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
ianawilson/kafka-python
kafka/common.py
15
6023
import inspect import sys from collections import namedtuple ############### # Structs # ############### # https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol#AGuideToTheKafkaProtocol-MetadataAPI MetadataRequest = namedtuple("MetadataRequest", ["topics"]) MetadataResponse = namedt...
apache-2.0
PaulWay/insights-core
insights/parsers/tests/test_rabbitmq_log.py
1
1163
from insights.parsers.rabbitmq_log import RabbitMQStartupLog from insights.parsers.rabbitmq_log import RabbitMQStartupErrLog from insights.tests import context_wrap STARTUP_LOG = """ starting file handle cache server ...done starting worker pool ...
apache-2.0
SCP-028/UGA
protein_pka/mcce/mcce.py
1
17127
#!python3 """ Predict protein pKa based on MCCE method. http://pka.engr.ccny.cuny.edu/ Require MCCE 3.0 to work: https://anaconda.org/SalahSalah/mcce/files """ import asyncio import glob import gzip import locale import logging import math import os import re import shutil import subprocess import sys...
apache-2.0
Einsteinish/PyTune3
utils/bootstrap_story_hash.py
1
1046
import time import pymongo from django.conf import settings from apps.rss_feeds.models import MStory, Feed db = settings.MONGODB batch = 0 start = 0 for f in xrange(start, Feed.objects.latest('pk').pk): if f < batch*100000: continue start = time.time() try: cp1 = time.time() - start # if fe...
mit
alvin319/CarnotKE
jyhton/lib-python/2.7/wsgiref/headers.py
229
5879
"""Manage HTTP Response Headers Much of this module is red-handedly pilfered from email.message in the stdlib, so portions are Copyright (C) 2001,2002 Python Software Foundation, and were written by Barry Warsaw. """ from types import ListType, TupleType # Regular expression that matches `special' characters in para...
apache-2.0
yannickcr/Sick-Beard
lib/subliminal/utils.py
167
2027
# -*- 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
pvizeli/hassio
hassio/core.py
1
5205
"""Main file for HassIO.""" import asyncio import logging import aiohttp import docker from .addons import AddonManager from .api import RestAPI from .host_control import HostControl from .const import ( SOCKET_DOCKER, RUN_UPDATE_INFO_TASKS, RUN_RELOAD_ADDONS_TASKS, RUN_UPDATE_SUPERVISOR_TASKS, RUN_WATCHDOG_H...
bsd-3-clause
yencarnacion/jaikuengine
.google_appengine/lib/yaml-3.10/yaml/reader.py
424
6746
# This module contains abstractions for the input stream. You don't have to # looks further, there are no pretty code. # # We define two classes here. # # Mark(source, line, column) # It's just a record and its only use is producing nice error messages. # Parser does not use it for any other purposes. # # Reader(so...
apache-2.0
vmg/hg-stable
hgext/keyword.py
92
27955
# keyword.py - $Keyword$ expansion for Mercurial # # Copyright 2007-2012 Christian Ebert <blacktrash@gmx.net> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. # # $Id$ # # Keyword expansion hack against the grain of a Distributed SC...
gpl-2.0
grimmjow8/ansible
lib/ansible/modules/cloud/amazon/rds_subnet_group.py
25
5369
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
gpl-3.0
Drahflow/lymph
lymph/cli/testing.py
10
5373
import collections from contextlib import contextmanager import sys import os import tempfile import textwrap from kazoo.client import KazooClient from kazoo.handlers.gevent import SequentialGeventHandler from pkg_resources import load_entry_point from six import StringIO, integer_types import yaml from lymph.discove...
apache-2.0
mzhaom/grpc
src/python/src/grpc/framework/face/future_invocation_asynchronous_event_service_test.py
12
1982
# 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
GeoCat/QGIS
python/plugins/processing/gui/menus.py
5
11535
import os from qgis.PyQt.QtCore import QCoreApplication from qgis.PyQt.QtWidgets import QAction, QMenu from qgis.PyQt.QtGui import QIcon from qgis.PyQt.QtWidgets import QApplication from processing.core.ProcessingConfig import ProcessingConfig, Setting from processing.gui.MessageDialog import MessageDialog from process...
gpl-2.0
steventimberman/masterDebater
env/lib/python2.7/site-packages/django/db/models/sql/constants.py
633
1039
""" Constants specific to the SQL storage portion of the ORM. """ import re # Valid query types (a set is used for speedy lookups). These are (currently) # considered SQL-specific; other storage systems may choose to use different # lookup types. QUERY_TERMS = { 'exact', 'iexact', 'contains', 'icontains', 'gt', '...
mit
thnee/ansible
test/units/modules/network/fortios/test_fortios_system_switch_interface.py
21
9741
# 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 License, or # (at your option) any later version. # # This program is distributed in the...
gpl-3.0
2014c2g1/c2g1
exts/w2/static/Brython2.0.0-20140209-164925/Lib/unittest/test/test_suite.py
791
12066
import unittest import sys from .support import LoggingResult, TestEquality ### Support code for Test_TestSuite ################################################################ class Test(object): class Foo(unittest.TestCase): def test_1(self): pass def test_2(self): pass def test_3(self...
gpl-2.0
WasatchPhotonics/Foreman
ControlPower.py
2
7442
# Based on PowerControl from the Griddle, including writing syslog events for # tracking the status of the phidget import unittest, logging, serial, sys, time #Phidget specific imports from Phidgets.PhidgetException import PhidgetException from Phidgets.Devices.InterfaceKit import InterfaceKit ZERO_RELAY = 0 O...
mit
dh4nav/lammps
tools/i-pi/ipi/inputs/cell.py
41
2337
"""Deals with creating the cell class. Copyright (C) 2013, Joshua More and Michele Ceriotti 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 l...
gpl-2.0
sencha/chromium-spacewalk
tools/cr/cr/commands/prepare.py
59
1781
# 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 module for the prepare command.""" import cr class PrepareCommand(cr.Command): """The implementation of the prepare command. The prepare command...
bsd-3-clause
xerxes2/gpodder
src/gpodder/sync.py
1
41915
# -*- coding: utf-8 -*- # # gPodder - A media aggregator and podcast client # Copyright (c) 2005-2011 Thomas Perl and the gPodder Team # # gPodder is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version...
gpl-3.0
rebost/django
tests/modeltests/signals/tests.py
40
5237
from __future__ import absolute_import from django.db.models import signals from django.dispatch import receiver from django.test import TestCase from .models import Person, Car # #8285: signals can be any callable class PostDeleteHandler(object): def __init__(self, data): self.data = data def __ca...
bsd-3-clause
abhijithch/MozDef
alerts/cloudtrail.py
12
1882
#!/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 http://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation # # Contributors: # Anthony Verez averez@mozilla.com fro...
mpl-2.0
kyrias/cjdns
node_build/dependencies/libuv/build/gyp/test/mac/gyptest-xcode-env-order.py
119
3284
#!/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 dependent Xcode settings are processed correctly. """ import TestGyp import TestMac import subprocess import sys if sys...
gpl-3.0
bdero/edx-platform
cms/djangoapps/contentstore/features/component_settings_editor_helpers.py
18
9372
# disable missing docstring # pylint: disable=C0111 from lettuce import world from nose.tools import assert_equal, assert_in # pylint: disable=E0611 from terrain.steps import reload_the_page from common import type_in_codemirror from selenium.webdriver.common.keys import Keys @world.absorb def create_component_inst...
agpl-3.0
arrabito/DIRAC
DataManagementSystem/scripts/dirac-dms-set-replica-status.py
9
2642
#!/usr/bin/env python ######################################################################## # $HeadURL$ ######################################################################## """ Set the status of the replicas of given files at the provided SE """ __RCSID__ = "$Id$" from DIRAC.Core.Base import Script Script.setU...
gpl-3.0
PaddlePaddle/Paddle
python/paddle/fluid/tests/unittests/test_rpn_target_assign_op.py
2
24786
# Copyright (c) 2018 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
pusnik/pyexchange
pyexchange/connection.py
1
4274
""" (c) 2013 LinkedIn Corp. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");?you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
apache-2.0
denny820909/builder
lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/trial/test/test_test_visitor.py
90
2282
from twisted.trial import unittest from twisted.trial.runner import TestSuite, suiteVisit pyunit = __import__('unittest') class MockVisitor(object): def __init__(self): self.calls = [] def __call__(self, testCase): self.calls.append(testCase) class TestTestVisitor(unittest.TestCase): ...
mit
abztrakt/django-badger
badger/migrations/0006_auto__add_field_nomination_rejecter__add_field_nomination_rejection_re.py
9
11582
# -*- 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 'Nomination.rejected_by' db.add_column('badger_nomination', 'rejected_by', ...
bsd-3-clause
smart-developerr/my-first-blog
Lib/site-packages/django/core/management/sql.py
108
1972
from __future__ import unicode_literals from django.apps import apps from django.db import models def sql_flush(style, connection, only_django=False, reset_sequences=True, allow_cascade=False): """ Returns a list of the SQL statements used to flush the database. If only_django is True, then only table n...
gpl-3.0
angela278/UPDream
lib/requests/packages/chardet/euckrfreq.py
3121
45978
######################## 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...
apache-2.0
stonegithubs/odoo
addons/board/__openerp__.py
261
1647
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
agpl-3.0
olivierdalang/QGIS
tests/src/python/test_qgsrasterlayer.py
4
63707
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsRasterLayer. .. note:: 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. """ fr...
gpl-2.0
aristotle-tek/cuny-bdif
AWS/ec2/lib/boto-2.34.0/boto/ec2/cloudwatch/metric.py
94
7491
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # 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 wi...
mit
jyundt/oval
app/main/views.py
1
16557
from collections import OrderedDict from itertools import groupby from operator import itemgetter, and_ import datetime from flask import render_template, redirect, request, url_for, current_app, flash from slackclient import SlackClient from sqlalchemy import extract, or_ from sqlalchemy import func from app import...
gpl-2.0
rec/echomesh
code/python/external/platform/darwin/numpy/distutils/environment.py
13
2280
import os from distutils.dist import Distribution __metaclass__ = type class EnvironmentConfig(object): def __init__(self, distutils_section='ALL', **kw): self._distutils_section = distutils_section self._conf_keys = kw self._conf = None self._hook_handler = None def dump_vari...
mit
zstyblik/infernal-twin
build/pillow/build/lib.linux-i686-2.7/PIL/MpegImagePlugin.py
26
1823
# # The Python Imaging Library. # $Id$ # # MPEG file handling # # History: # 95-09-09 fl Created # # Copyright (c) Secret Labs AB 1997. # Copyright (c) Fredrik Lundh 1995. # # See the README file for information on usage and redistribution. # __version__ = "0.1" from PIL import Image, ImageFile from PIL._bi...
gpl-3.0
fitzgen/servo
tests/wpt/css-tests/tools/pytest/testing/test_unittest.py
171
22302
from _pytest.main import EXIT_NOTESTSCOLLECTED import pytest def test_simple_unittest(testdir): testpath = testdir.makepyfile(""" import unittest class MyTestCase(unittest.TestCase): def testpassing(self): self.assertEquals('foo', 'foo') def test_failing(self...
mpl-2.0
napkindrawing/ansible
contrib/inventory/zone.py
196
1490
#!/usr/bin/env python # (c) 2015, Dagobert Michelsen <dam@baltic-online.de> # # 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
dpiers/coderang-meteor
public/jsrepl/extern/python/unclosured/lib/python2.7/UserList.py
327
3644
"""A more or less complete user-defined wrapper around list objects.""" import collections class UserList(collections.MutableSequence): def __init__(self, initlist=None): self.data = [] if initlist is not None: # XXX should this accept an arbitrary sequence? if type(initlis...
mit
efiring/numpy-work
numpy/f2py/common_rules.py
48
4630
#!/usr/bin/env python """ Build common block mechanism for f2py2e. Copyright 2000 Pearu Peterson all rights reserved, Pearu Peterson <pearu@ioc.ee> Permission to use, modify, and distribute this software is given under the terms of the NumPy License NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. $Date: ...
bsd-3-clause
Smart-Torvy/torvy-home-assistant
tests/components/lock/test_demo.py
23
1484
"""The tests for the Demo lock platform.""" import unittest from homeassistant.bootstrap import setup_component from homeassistant.components import lock from tests.common import get_test_home_assistant FRONT = 'lock.front_door' KITCHEN = 'lock.kitchen_door' class TestLockDemo(unittest.TestCase): """Test the ...
mit
ench0/external_chromium_org_third_party_skia
platform_tools/android/tests/makefile_writer_tests.py
65
7127
#!/usr/bin/python # Copyright 2014 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Test makefile_writer.py """ import argparse import os import shutil import sys import tempfile import test_variables import unittest import utils sys.path.append...
bsd-3-clause
ykaneko/quantum
quantum/scheduler/dhcp_agent_scheduler.py
2
4728
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2013 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www....
apache-2.0
dennis-sheil/commandergenius
project/jni/python/src/Lib/plat-mac/Carbon/QuickTime.py
81
129090
# Generated from 'Movies.h' def FOUR_CHAR_CODE(x): return x xmlIdentifierUnrecognized = -1 kControllerMinimum = -0xf777 notImplementedMusicOSErr = -2071 cantSendToSynthesizerOSErr = -2072 cantReceiveFromSynthesizerOSErr = -2073 illegalVoiceAllocationOSErr = -2074 illegalPartOSErr = -2075 illegal...
lgpl-2.1
dang03/son-cli
src/son/validate/util.py
5
4770
# Copyright (c) 2015 SONATA-NFV, UBIWHERE # 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
tobes/py3status
py3status/modules/gpmdp.py
2
2162
# -*- coding: utf-8 -*- """ Display song currently playing in Google Play Music Desktop Player. Configuration parameters: cache_timeout: refresh interval for this module (default 5) format: specify the items and ordering of the data in the status bar. These area 1:1 match to gpmdp-...
bsd-3-clause
UTDS16/collab-texter
ctxt/client/resources_rc.py
1
19028
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt5 (Qt v5.7.0) # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\x05\x88\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x10\x0...
mit
jmcarbo/openerp7
openerp/addons/mrp_byproduct/mrp_byproduct.py
29
8840
# -*- 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
google/grr
grr/server/grr_response_server/bin/config_updater_util.py
1
44739
#!/usr/bin/env python """Utilities for modifying the GRR server configuration.""" import argparse import getpass import os import re import shutil import socket import subprocess import sys import time from typing import Optional, Text, Generator from urllib import parse as urlparse import MySQLdb from MySQLdb.consta...
apache-2.0
ondra-novak/chromium.src
tools/telemetry/telemetry/core/platform/profiler/strace_profiler.py
43
7827
# 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 json import logging import re import signal import subprocess import sys import tempfile from telemetry.core.platform import profiler from telemetry....
bsd-3-clause
40223125/w17t2
static/Brython3.1.1-20150328-091302/Lib/stat.py
765
4304
"""Constants/functions for interpreting results of os.stat() and os.lstat(). Suggested usage: from stat import * """ # Indices for stat struct members in the tuple returned by os.stat() ST_MODE = 0 ST_INO = 1 ST_DEV = 2 ST_NLINK = 3 ST_UID = 4 ST_GID = 5 ST_SIZE = 6 ST_ATIME = 7 ST_MTIME = 8 ST_CTIME = 9 ...
gpl-3.0
Fafou/Sick-Beard
lib/requests/packages/chardet2/langhungarianmodel.py
63
12559
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
gpl-3.0
abhishek-ch/hue
desktop/core/ext-py/pycrypto-2.6.1/lib/Crypto/SelfTest/Random/test_random.py
117
7111
# -*- coding: utf-8 -*- # # SelfTest/Util/test_generic.py: Self-test for the Crypto.Random.new() function # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the ext...
apache-2.0
mindofmatthew/three.js
utils/converters/obj/convert_obj_three.py
160
48659
"""Convert Wavefront OBJ / MTL files into Three.js (JSON model version, to be used with ascii / binary loader) ------------------------- How to use this converter ------------------------- python convert_obj_three.py -i infile.obj -o outfile.js [-m "morphfiles*.obj"] [-c "morphcolors*.obj"] [-a center|centerxz|top|bo...
mit
InAnimaTe/CouchPotatoServer
libs/CodernityDB/indexcreator.py
81
25444
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2011-2013 Codernity (http://codernity.com) # # 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/L...
gpl-3.0
rahul003/mxnet
plugin/opencv/opencv.py
61
6214
# 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
openmv/micropython
tests/basics/string_format_error.py
62
1415
# tests for errors in {} format string try: '{0:0}'.format('zzz') except (ValueError): print('ValueError') try: '{1:}'.format(1) except IndexError: print('IndexError') try: '}'.format('zzzz') except ValueError: print('ValueError') # end of format parsing conversion specifier try: '{!'.fo...
mit
jezdez/kuma
vendor/packages/pygments/lexers/_lua_builtins.py
43
6965
# -*- coding: utf-8 -*- """ pygments.lexers._lua_builtins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This file contains the names and modules of lua functions It is able to re-generate itself, but for adding new functions you probably have to add some callbacks (see function module_callbacks). Do not edit ...
mpl-2.0
DukeOfHazard/crits
crits/core/views.py
7
83579
import datetime import json import logging from bson import json_util from dateutil.parser import parse from time import gmtime, strftime from django.conf import settings from django.contrib.auth.decorators import user_passes_test from django.core.urlresolvers import reverse from django.http import HttpResponse, Http...
mit
petemounce/ansible
lib/ansible/modules/cloud/openstack/os_port.py
11
12625
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any late...
gpl-3.0
nfallen/servo
tests/wpt/css-tests/css21_dev/xhtml1print/reference/support/fonts/makegsubfonts.py
820
14309
import os import textwrap from xml.etree import ElementTree from fontTools.ttLib import TTFont, newTable from fontTools.misc.psCharStrings import T2CharString from fontTools.ttLib.tables.otTables import GSUB,\ ScriptList, ScriptRecord, Script, DefaultLangSys,\ FeatureList, FeatureRecord, Feature,\ LookupLi...
mpl-2.0
mnahm5/django-estore
Lib/site-packages/boto/kinesis/__init__.py
145
1652
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # 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...
mit
yavuzovski/playground
python/django/RESTTest/.venv/lib/python3.4/site-packages/django/contrib/gis/geos/linestring.py
136
6019
from django.contrib.gis.geos import prototypes as capi from django.contrib.gis.geos.coordseq import GEOSCoordSeq from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.geometry import GEOSGeometry, LinearGeometryMixin from django.contrib.gis.geos.point import Point from django.contrib.gis....
gpl-3.0
Snyder005/StatisticalMethods
examples/XrayImage/cluster.py
10
5264
import astropy.io.fits as pyfits import numpy as np import os # ==================================================================== # Functions for realizing the model: def beta_model_profile(r, S0, rc, beta): ''' The fabled beta model, radial profile S(r) ''' return S0 * (1.0 + (r/rc)**2)**(-3.0*be...
gpl-2.0
beni55/django
tests/template_tests/filter_tests/test_unordered_list.py
14
6527
from django.template.defaultfilters import unordered_list from django.test import SimpleTestCase, ignore_warnings from django.utils.deprecation import RemovedInDjango20Warning from django.utils.encoding import python_2_unicode_compatible from django.utils.safestring import mark_safe from ..utils import setup class U...
bsd-3-clause
Veske/POL-POM-5
phoenicis-bash/src/main/python/BashBinder/CommandParser.py
3
9173
#!/usr/bin/env python # coding=utf-8 # Copyright (C) 2015 Pâris Quentin # 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...
gpl-3.0
Kaisuke5/chainer
chainer/functions/array/split_axis.py
13
3058
import collections import six from chainer import cuda from chainer import function from chainer.utils import type_check class SplitAxis(function.Function): """Function that splits multiple arrays towards the specified axis.""" def __init__(self, indices_or_sections, axis): if not isinstance(indic...
mit
abhishekgahlot/youtube-dl
youtube_dl/extractor/testtube.py
109
3295
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, qualities, ) class TestTubeIE(InfoExtractor): _VALID_URL = r'https?://testtube\.com/[^/?#]+/(?P<id>[^/?#]+)' _TESTS = [{ 'url': 'https://testtube.com/dnews/5-weird-ways-plants-can-eat-...
unlicense
OndrejIT/pyload
module/plugins/crypter/GoogledriveComDereferer.py
6
2747
# -*- coding: utf-8 -* from module.network.HTTPRequest import BadHeader from ..internal.Crypter import Crypter from ..internal.misc import json class GoogledriveComDereferer(Crypter): __name__ = "GoogledriveComDereferer" __type__ = "crypter" __version__ = "0.01" __status__ = "testing" __pattern...
gpl-3.0
phoebusliang/parallel-lettuce
tests/integration/lib/Django-1.2.5/django/core/xheaders.py
518
1157
""" Pages in Django can are served up with custom HTTP headers containing useful information about those pages -- namely, the content type and object ID. This module contains utility functions for retrieving and doing interesting things with these special "X-Headers" (so called because the HTTP spec demands that custo...
gpl-3.0
JPJPJPOPOP/zulip
scripts/nagios/cron_file_helper.py
52
1044
import time # Avoid requiring the typing module to be installed if False: from typing import Tuple def nagios_from_file(results_file): # type: (str) -> Tuple[int, str] """Returns a nagios-appropriate string and return code obtained by parsing the desired file on disk. The file on disk should be of for...
apache-2.0
hachreak/invenio-ext
invenio_ext/sqlalchemy/types/marshal_binary.py
5
1985
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2011, 2012, 2013, 2014, 2015 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (a...
gpl-2.0
CanalTP/navitia
source/jormungandr/tests/kirin_realtime_tests.py
1
155835
# Copyright (c) 2001-2015, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public tr...
agpl-3.0
ximenesuk/openmicroscopy
components/tools/OmeroWeb/omeroweb/webclient/controller/history.py
3
8170
#!/usr/bin/env python # -*- coding: utf-8 -*- # # # # Copyright (c) 2008-2011 University of Dundee. # # 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...
gpl-2.0
Shadow6363/Competitions
2015/Advent of Code/Day23.py
1
1537
# -*- coding: utf-8 -*- import sys class ChristmasComputer(object): def __init__(self, a=0, b=0): self.registers = { 'a': a, 'b': b, 'pc': 0 } def hlf(self, r): self.registers[r] /= 2 self.registers['pc'] += 1 def tpl(self, r): ...
unlicense
Nikoli/youtube-dl
youtube_dl/extractor/googlesearch.py
168
1699
from __future__ import unicode_literals import itertools import re from .common import SearchInfoExtractor from ..compat import ( compat_urllib_parse, ) class GoogleSearchIE(SearchInfoExtractor): IE_DESC = 'Google Video search' _MAX_RESULTS = 1000 IE_NAME = 'video.google:search' _SEARCH_KEY = 'g...
unlicense
HyperBaton/ansible
lib/ansible/modules/cloud/amazon/redshift_subnet_group.py
10
5994
#!/usr/bin/python # Copyright 2014 Jens Carl, Hothead Games 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', 'stat...
gpl-3.0
tinloaf/home-assistant
tests/components/test_mythicbeastsdns.py
12
2026
"""Test the Mythic Beasts DNS component.""" import logging import asynctest from homeassistant.setup import async_setup_component from homeassistant.components import mythicbeastsdns _LOGGER = logging.getLogger(__name__) async def mbddns_update_mock(domain, password, host, ttl=60, session=None): """Mock out myt...
apache-2.0
anryko/ansible
lib/ansible/modules/packaging/os/sorcery.py
52
20201
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015-2016, Vlad Glagolev <scm@vaygr.net> # # 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
ashrith/dpkt
dpkt/ssl.py
3
19686
# $Id: ssl.py 90 2014-04-02 22:06:23Z andrewflnr@gmail.com $ # Portion Copyright 2012 Google Inc. All rights reserved. """Secure Sockets Layer / Transport Layer Security.""" import dpkt import ssl_ciphersuites import struct import binascii import traceback import datetime # # Note from April 2011: cde...@gmail.com a...
bsd-3-clause
junhuac/MQUIC
src/build/rmdir_and_stamp.py
11
1412
#!/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. """Wipes out a directory recursively and then touches a stamp file. This odd pairing of operations is used to support build script...
mit
xarisd/honcho
honcho/test/unit/test_environ.py
3
8050
# coding=utf-8 import textwrap from ..helpers import TestCase from honcho import environ from honcho import compat ENVFILE_FIXTURES = [ [ """ FOO=bar """, {'FOO': 'bar'} ], [ """ FOO=bar BAZ=qux """, {'FOO': 'bar', 'BAZ': 'qux'} ...
mit
sebadiaz/rethinkdb
test/common/vcoptparse.py
32
9768
# Copyright 2010-2012 RethinkDB, all rights reserved. """ vcoptparse is short for Value-Centric Option Parser. It's a tiny argument parsing library. It has less features than optparse or argparse, but it kicks more ass. optparse and argparse allow the client to specify the flags that should be parsed, and as an aftert...
agpl-3.0