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
crs4/hl7apy
hl7apy/v2_8_2/__init__.py
1
3070
# -*- coding: utf-8 -*- # # Copyright (c) 2012-2018, CRS4 # # 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, modify...
mit
evanma92/routeh
flask/lib/python2.7/site-packages/whoosh/columns.py
30
46073
# Copyright 2012 Matt Chaput. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the...
bsd-3-clause
vjmac15/Lyilis
lib/youtube_dl/extractor/streamable.py
53
3891
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, float_or_none, int_or_none, ) class StreamableIE(InfoExtractor): _VALID_URL = r'https?://streamable\.com/(?:[es]/)?(?P<id>\w+)' _TESTS = [ { ...
gpl-3.0
DTL-FAIRData/ODEX4all-UseCases
EKP/tmp/NIZO2.py
1
5816
# Load the required packages import EKP import csv import os import datetime # Knowledge platform URL url = '' # User credentials: Please fill in! username = '' password = '' # Set the output directory os.chdir("NIZO input & Output/") # Get the user token, required for access t = EKP.getToken(username, password, ur...
mit
nitin-cherian/Webapps
TalkPython/P4E/blue_yellow_app/.env/lib/python3.5/site-packages/pyramid_handlers/tests.py
2
24192
import sys import unittest from pyramid import testing from pyramid.config import Configurator PY3 = sys.version_info[0] == 3 class Test_add_handler(unittest.TestCase): def _makeOne(self, autocommit=True): from pyramid.config import Configurator from pyramid_handlers import add_handler con...
mit
beacloudgenius/configuration
util/vpc-tools/abbey.py
6
28442
#!/usr/bin/env python -u import sys from argparse import ArgumentParser import time import json import yaml import os import requests try: import boto.ec2 import boto.sqs from boto.vpc import VPCConnection from boto.exception import NoAuthHandlerFound, EC2ResponseError from boto.sqs.message import R...
agpl-3.0
squadran2003/PYTHON-DIRECTORY-WATCHER
lib/python3.5/site-packages/pip/_vendor/requests/cookies.py
413
17191
# -*- coding: utf-8 -*- """ Compatibility code to be able to use `cookielib.CookieJar` with requests. requests.utils imports from here, so be careful with imports. """ import copy import time import collections from .compat import cookielib, urlparse, urlunparse, Morsel try: import threading # grr, pyflakes...
mit
Khurramjaved96/Recursive-CNNs
data_augmentor/augmentData.py
1
2668
import os import cv2 import numpy as np import utils def argsProcessor(): import argparse parser = argparse.ArgumentParser() parser.add_argument("-i", "--dataPath", help="DataPath") parser.add_argument("-o", "--outputFiles", help="outputFiles", default="bar") return parser.parse_args() args = a...
apache-2.0
infoxchange/django-localflavor
tests/test_gr.py
4
2746
from django.test import SimpleTestCase from localflavor.gr.forms import GRMobilePhoneNumberField, GRPhoneNumberField, GRPostalCodeField, GRTaxNumberCodeField class GRLocalFlavorTests(SimpleTestCase): def test_GRTaxNumberField(self): """ The valid tests are from greek tax numbers (AFMs) found on the inte...
bsd-3-clause
popazerty/bh1
lib/python/Tools/KeyBindings.py
2
3575
keyBindings = { } from keyids import KEYIDS from Components.config import config keyDescriptions = [{ KEYIDS["BTN_0"]: ("UP", "fp"), KEYIDS["BTN_1"]: ("DOWN", "fp"), KEYIDS["KEY_OK"]: ("OK", ""), KEYIDS["KEY_UP"]: ("UP",), KEYIDS["KEY_DOWN"]: ("DOWN",), KEYIDS["KEY_POWER"]: ("POWER",), KEYIDS["KEY_RED"...
gpl-2.0
sylarcp/anita
venv/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/dom.py
505
1421
from __future__ import absolute_import, division, unicode_literals from xml.dom import Node from . import _base class TreeWalker(_base.NonRecursiveTreeWalker): def getNodeDetails(self, node): if node.nodeType == Node.DOCUMENT_TYPE_NODE: return _base.DOCTYPE, node.name, node.publicId, node.sy...
mit
seeminglee/pyglet64
tests/window/WINDOW_SET_MIN_MAX_SIZE.py
30
1640
#!/usr/bin/env python '''Test that minimum and maximum window size can be set. Expected behaviour: One window will be opened. The window's dimensions will be printed to the terminal. Initially the window has no minimum or maximum size (besides any OS-enforced limit). - press "n" to set the minimum...
bsd-3-clause
HossainKhademian/XBMC
lib/gtest/test/gtest_list_tests_unittest.py
1068
5415
#!/usr/bin/env python # # Copyright 2006, 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...
gpl-2.0
Yannig/ansible
lib/ansible/modules/cloud/rackspace/rax_cbs.py
49
6825
#!/usr/bin/python # Copyright: Ansible Project # 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': ['preview'], ...
gpl-3.0
backmari/moose
python/calphad/free_energy.py
8
1541
#!/usr/bin/env python """ free_energy.py exports free energy expressions from a TDB thermodynamic databse to the MOOSE input file format. Usage: free_energy.py database.tdb [list of phases] If no list of phases is supplied all phases are exported. """ import sys from pycalphad import Database, Model from utils.fp...
lgpl-2.1
matburt/ansible
contrib/inventory/fleet.py
160
3073
#!/usr/bin/env python """ fleetctl base external inventory script. Automatically finds the IPs of the booted coreos instances and returns it under the host group 'coreos' """ # Copyright (C) 2014 Andrew Rothstein <andrew.rothstein at gmail.com> # # This program is free software: you can redistribute it and/or modify ...
gpl-3.0
ychen820/microblog
y/google-cloud-sdk/.install/.backup/lib/argcomplete/__init__.py
13
21593
# Copyright 2012-2013, Andrey Kislyuk and argcomplete contributors. # Licensed under the Apache License. See https://github.com/kislyuk/argcomplete for more info. from __future__ import print_function, unicode_literals import os, sys, argparse, contextlib, subprocess, locale, re from . import my_shlex as shlex USIN...
bsd-3-clause
ity/pants
tests/python/pants_test/python/test_interpreter_selection_integration.py
9
2514
# coding=utf-8 # Copyright 2014 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
vsemionov/npamp
npamp/output.py
1
11750
# Copyright (C) 2012 Victor Semionov # 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 ...
bsd-2-clause
erdincay/youtube-dl
youtube_dl/extractor/puls4.py
126
3103
# -*- coding: utf-8 -*- from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( ExtractorError, unified_strdate, int_or_none, ) class Puls4IE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?puls4\.com/video/[^/]+/play/(?P<id>[0-9]+)' _TESTS = [{ '...
unlicense
androidarmv6/android_external_chromium_org
tools/metrics/actions/extract_actions.py
23
24842
#!/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. """Extract UserMetrics "actions" strings from the Chrome source. This program generates the list of known actions we expect to s...
bsd-3-clause
simonwydooghe/ansible
test/units/modules/storage/netapp/test_na_ontap_igroup_initiator.py
21
7912
# (c) 2018, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ''' unit test template for ONTAP Ansible module ''' from __future__ import print_function import json import pytest from units.compat import unittest from units.compat.mock import patch, Mock from ans...
gpl-3.0
living180/vex
vex/remove.py
1
1329
import os import shutil from vex import exceptions def obviously_not_a_virtualenv(path): include = os.path.join(path, 'include') bin = os.path.join(path, 'bin') scripts = os.path.join(path, 'Scripts') if not os.path.exists(bin) and not os.path.exists(scripts): return True if os.path.exists...
mit
luca76/QGIS
python/plugins/processing/algs/gdal/gdaladdo.py
2
3925
# -*- coding: utf-8 -*- """ *************************************************************************** translate.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *****************************...
gpl-2.0
cginternals/glkernel
scripts/generate.py
1
19818
import posixpath # instead of os.path, to always use forward slashes import os import re # TODOs: # (more TODOs in code) standardTypes = { "bool", "char", "short", "int", "long", "long long", "unsigned char", "unsigned short", "unsigned int", "unsigned long", "unsigned lon...
mit
CodeCoinlxc/CodeCoin
share/qt/extract_strings_qt.py
2945
1844
#!/usr/bin/python ''' Extract _("...") strings for translation and convert to Qt4 stringdefs so that they can be picked up by Qt linguist. ''' from subprocess import Popen, PIPE import glob import operator OUT_CPP="src/qt/bitcoinstrings.cpp" EMPTY=['""'] def parse_po(text): """ Parse 'po' format produced by x...
mit
codecollision/DropboxToFlickr
django/contrib/admin/filterspecs.py
148
12383
""" FilterSpec encapsulates the logic for displaying filters in the Django admin. Filters are specified in models with the "list_filter" option. Each filter subclass knows how to display a filter for a field that passes a certain test -- e.g. being a DateField or ForeignKey. """ from django.db import models from djan...
bsd-3-clause
smmribeiro/intellij-community
python/helpers/py2only/docutils/utils/error_reporting.py
104
7765
#!/usr/bin/env python # -*- coding: utf-8 -*- # :Id: $Id: error_reporting.py 7668 2013-06-04 12:46:30Z milde $ # :Copyright: © 2011 Günter Milde. # :License: Released under the terms of the `2-Clause BSD license`_, in short: # # Copying and distribution of this file, with or without modification, # are permitted...
apache-2.0
dyyi/moneybook
venv/Lib/site-packages/django/contrib/gis/admin/widgets.py
449
4881
import logging from django.contrib.gis.gdal import GDALException from django.contrib.gis.geos import GEOSException, GEOSGeometry from django.forms.widgets import Textarea from django.template import loader from django.utils import six, translation # Creating a template context that contains Django settings # values n...
apache-2.0
Pablo126/SSBW
Tarea4/tarea4/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.py
384
6309
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type from lxml import etree from ..treebuilders.etree import tag_regexp from . import base from .. import _ihatexml def ensure_str(s): if s is None: return None elif isinstance(s, text_type): ...
gpl-3.0
alajara/servo
tests/wpt/web-platform-tests/tools/wptserve/wptserve/stash.py
125
5248
import base64 import json import os import uuid from multiprocessing.managers import BaseManager, DictProxy class ServerDictManager(BaseManager): shared_data = {} def _get_shared(): return ServerDictManager.shared_data ServerDictManager.register("get_dict", callable=_get_shared, ...
mpl-2.0
RockySteveJobs/python-for-android
python3-alpha/python3-src/Lib/test/test_abstract_numbers.py
57
1503
"""Unit tests for numbers.py.""" import math import operator import unittest from numbers import Complex, Real, Rational, Integral from test import support class TestNumbers(unittest.TestCase): def test_int(self): self.assertTrue(issubclass(int, Integral)) self.assertTrue(issubclass(int, Complex))...
apache-2.0
AutorestCI/azure-sdk-for-python
azure-mgmt-monitor/azure/mgmt/monitor/models/rule_action.py
1
1307
# 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
fenginx/django
tests/generic_views/test_dates.py
45
38053
import datetime from unittest import mock from django.core.exceptions import ImproperlyConfigured from django.test import TestCase, override_settings, skipUnlessDBFeature from django.test.utils import requires_tz_support from django.utils import timezone from .models import Artist, Author, Book, BookSigning, Page d...
bsd-3-clause
40223144/w16b_test
static/Brython3.1.3-20150514-095342/Lib/random.py
85
25841
"""Random variable generators. integers -------- uniform within range sequences --------- pick random element pick random sample generate random permutation distributions on the real line: ------------------------------ uniform ...
agpl-3.0
edx/edx-platform
common/lib/xmodule/xmodule/tests/test_course_module.py
4
19770
"""Tests the course modules and their functions""" import itertools import unittest from datetime import datetime, timedelta from unittest.mock import Mock, patch import pytest import ddt from dateutil import parser from django.conf import settings from django.test import override_settings from fs.memoryfs import Me...
agpl-3.0
darkwing/kuma
vendor/packages/translate/lang/ur.py
30
1239
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2008 Zuza Software Foundation # # This file is part of translate. # # translate 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 t...
mpl-2.0
chokribr/inveniotest
modules/websubmit/lib/websubmitadmin_engine.py
25
240715
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 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 ## ...
gpl-2.0
UManPychron/pychron
pychron/experiment/experimentor.py
1
11553
# =============================================================================== # Copyright 2013 Jake Ross # # 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...
apache-2.0
Chaffelson/whoville
whoville/cloudbreak/models/blueprint_input.py
1
4561
# coding: utf-8 """ Cloudbreak API Cloudbreak is a powerful left surf that breaks over a coral reef, a mile off southwest the island of Tavarua, Fiji. Cloudbreak is a cloud agnostic Hadoop as a Service API. Abstracts the provisioning and ease management and monitoring of on-demand clusters. SequenceIQ's Cloud...
apache-2.0
sanghinitin/golismero
thirdparty_libs/nltk/corpus/reader/semcor.py
17
9698
# Natural Language Toolkit: SemCor Corpus Reader # # Copyright (C) 2001-2012 NLTK Project # Author: Nathan Schneider <nschneid@cs.cmu.edu> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT """ Corpus reader for the SemCor Corpus. """ __docformat__ = 'epytext en' import re import xml.etree.Elem...
gpl-2.0
williamoverall/soundtomidi
soundtomidi/soundtomidi.py
1
48543
"""Audio Processor. Takes live audio and generates MIDI information from it. Here are the configuration options, and they go on and on. Some of them are optimistic that I'll come back later and add other options, but don't count on it. Probably the most important thing to wrap your head around is that you set a frame...
mit
bjvoth/oppia
core/domain/event_services.py
9
7854
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
apache-2.0
storpipfugl/airflow
airflow/example_dags/tutorial.py
37
1802
""" ### Tutorial Documentation Code that goes along with the Airflow located [here](http://pythonhosted.org/airflow/tutorial.html) """ from airflow import DAG from airflow.operators import BashOperator from datetime import datetime, timedelta seven_days_ago = datetime.combine(datetime.today() - timedelta(7), ...
apache-2.0
hojel/calibre
src/tinycss/media3.py
16
4646
#!/usr/bin/env python2 # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>' from tinycss.css21 import CSS21Parser from tinycss.parsing import remove_whi...
gpl-3.0
kmoocdev2/edx-platform
lms/djangoapps/course_goals/migrations/0001_initial.py
13
1139
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings from opaque_keys.edx.django.models import CourseKeyField class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MO...
agpl-3.0
lsaffie/hf
sites/all/modules/fckeditor/fckeditor/editor/filemanager/connectors/py/fckconnector.py
93
2686
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
gpl-2.0
ghelmling/hadoop-common
src/contrib/hod/testing/main.py
182
2928
#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
highco-groupe/odoo
addons/sale_mrp/__init__.py
445
1062
# -*- 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
berrange/nova
nova/tests/test_linuxscsi.py
25
5951
# Copyright 2010 OpenStack Foundation # (c) Copyright 2012-2013 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-2.0
kewisch/bedrock
bedrock/mozorg/tests/test_hierarchy.py
37
8343
# 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/. from mock import patch from nose.tools import eq_, ok_ from bedrock.mozorg.hierarchy import PageNode, PageRoot from bed...
mpl-2.0
DramaFever/calcifer
calcifer/tree.py
1
9183
""" `calcifer.tree` module This module implements a non-deterministic nested dictionary (tree). The tree comprises leaf nodes, dict nodes, and "unknown nodes" -- nodes which are known to exist but undefined beyond that. Ultimately, the policy tree contains *definitions*, a higher-level abstraction on "value": LeafPol...
mit
radicalbit/ambari
ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params.py
4
1057
#!/usr/bin/env python """ 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
huhongbo/dd-agent
checks.d/couchbase.py
12
8375
# stdlib import re # 3rd party import requests # project from checks import AgentCheck from util import headers # Constants COUCHBASE_STATS_PATH = '/pools/default' DEFAULT_TIMEOUT = 10 class Couchbase(AgentCheck): """Extracts stats from Couchbase via its REST API http://docs.couchbase.com/couchbase-manual-...
bsd-3-clause
crosswalk-project/chromium-crosswalk-efl
tools/telemetry/telemetry/core/backends/chrome/inspector_memory.py
33
1538
# 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 class InspectorMemoryException(Exception): pass class InspectorMemory(object): """Communicates with the remote inspector's Memory domain.""...
bsd-3-clause
haoyunfeix/crosswalk-test-suite
webapi/webapi-webrtc-w3c-tests/inst.apk.py
1996
3186
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess from optparse import OptionParser, make_option SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PARAMETERS = None ADB_CMD = "adb" def doCMD(cmd): # Do not need handle timeout in this short script, let tool...
bsd-3-clause
alejo8591/culttume2
venv/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/_base.py
169
6718
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type import gettext _ = gettext.gettext from ..constants import voidElements, spaceCharacters spaceCharacters = "".join(spaceCharacters) class TreeWalker(object): def __init__(self, tree): self.tree = tre...
mit
denis-pitul/django
django/contrib/gis/db/models/fields.py
20
14262
from django.contrib.gis import forms from django.contrib.gis.db.models.lookups import gis_lookups from django.contrib.gis.db.models.proxy import GeometryProxy from django.contrib.gis.geometry.backend import Geometry, GeometryException from django.db.models.expressions import Expression from django.db.models.fields impo...
bsd-3-clause
patcon/open-cabinet
venv/lib/python2.7/site-packages/pip/_vendor/cachecontrol/controller.py
317
10124
""" The httplib2 algorithms ported for use with requests. """ import re import calendar import time from email.utils import parsedate_tz from pip._vendor.requests.structures import CaseInsensitiveDict from .cache import DictCache from .serialize import Serializer URI = re.compile(r"^(([^:/?#]+):)?(//([^/?#]*))?([^?...
mit
amol9/fbstats
fbstats/main.py
1
2731
import sys import os from os.path import exists from mutils.system.scheduler import get_scheduler, PlatformError, FrequencyError from redcmd import subcmd, CommandLine, CommandLineError, CommandError from . import globals from .fb import FB from .action import Action @subcmd def job(): '''Run fbstats as a job.''' ...
mit
OptiPop/external_chromium_org
tools/telemetry/telemetry/benchmark.py
26
7232
# 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 logging import optparse import os import shutil import sys import zipfile from telemetry import decorators from telemetry.core import browser_finder ...
bsd-3-clause
awong1900/platformio
platformio/maintenance.py
1
7117
# Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. import re import struct from os import remove from os.path import isdir, isfile, join from shutil import rmtree from time import time import click from platformio import __version__, app, telemetry from platformio.commands.install import cli a...
mit
vivekananda/fbeats
django/db/models/related.py
102
3162
from django.utils.encoding import smart_unicode from django.db.models.fields import BLANK_CHOICE_DASH class BoundRelatedObject(object): def __init__(self, related_object, field_mapping, original): self.relation = related_object self.field_mappings = field_mapping[related_object.name] def templ...
bsd-3-clause
RPi-Distro/pgzero
pgzero/rect.py
1
15799
# -*- coding: utf-8 -*- import pygame.rect class Rect(pygame.rect.Rect): __slots__ = () # From Pygame docs VALID_ATTRIBUTES = """ x y top left bottom right topleft bottomleft topright bottomright midtop midleft midbottom midright center cente...
lgpl-3.0
tudyzhb/yichui
django/utils/feedgenerator.py
83
15375
""" Syndication feed generation library -- used for generating RSS, etc. Sample usage: >>> from django.utils import feedgenerator >>> feed = feedgenerator.Rss201rev2Feed( ... title=u"Poynter E-Media Tidbits", ... link=u"http://www.poynter.org/column.asp?id=31", ... description=u"A group Weblog by the shar...
bsd-3-clause
robert-budde/smarthome
doc/build_plugin_rst_files.py
2
17692
#!/usr/bin/env python3 # vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab ######################################################################### # Copyright 2017- Martin Sinn m.sinn@gmx.de ######################################################################### # ...
gpl-3.0
pombreda/pyfilesystem-4
fs/contrib/tahoelafs/util.py
22
4731
''' Created on 25.9.2010 @author: marekp ''' import sys import platform import stat as statinfo import fs.errors as errors from fs.path import pathsplit try: # For non-CPython or older CPython versions. # Simplejson also comes with C speedup module which # is not in standard CPython >=2.6 ...
bsd-3-clause
ofir123/CouchPotatoServer
libs/xmpp/debug.py
207
14069
## debug.py ## ## Copyright (C) 2003 Jacob Lundqvist ## ## This program 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 2, or (at your option) ## any later version. ## ## ...
gpl-3.0
red-hood/calendarserver
contrib/performance/report.py
1
1237
## # Copyright (c) 2010-2015 Apple 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 applicab...
apache-2.0
petrutlucian94/nova
nova/tests/unit/virt/hyperv/test_volumeops.py
43
13078
# Copyright 2014 Cloudbase Solutions Srl # # 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
Netflix-Skunkworks/cloudaux
cloudaux/orchestration/aws/sqs.py
1
2280
from cloudaux.aws.sqs import get_queue_url, get_queue_attributes, list_queue_tags, list_dead_letter_source_queues from cloudaux.decorators import modify_output from flagpole import FlagRegistry, Flags import logging from cloudaux.orchestration.aws import ARN logger = logging.getLogger('cloudaux') registry = FlagReg...
apache-2.0
MarkNenadov/YNABpy
YNABpy/BaseClasses.py
1
3510
""" BaseClasses.py INTRODUCTION YNABpy - A Python module for the YNAB (You Need A Budget) application. AUTHOR Mark J. Nenadov (2011) * Essex, Ontario * Email: <marknenadov@gmail.com> LICENSING This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public...
lgpl-3.0
sliz1/servo
tests/wpt/css-tests/tools/wptserve/tests/functional/test_cookies.py
299
1996
import os import unittest import urllib2 import json import wptserve from base import TestUsingServer, doc_root class TestResponseSetCookie(TestUsingServer): def test_name_value(self): @wptserve.handlers.handler def handler(request, response): response.set_cookie("name", "value") ...
mpl-2.0
zhuzhezhe/django_blog
mywebsite/settings.py
1
3965
#coding:utf-8 """ Django settings for mywebsite project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(B...
mit
Honry/crosswalk-test-suite
apptools/apptools-android-tests/apptools/create_version.py
15
2366
#!/usr/bin/env python # # 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 t...
bsd-3-clause
randomtask1155/gpdb
gpMgmt/bin/ext/yaml/dumper.py
131
2718
__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
endorphinl/horizon-fork
openstack_dashboard/enabled/_1835_data_processing_nodegroup_templates_panel.py
25
1036
# 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 # distributed under the...
apache-2.0
dudepare/django
tests/postgres_tests/migrations/0002_create_test_models.py
231
8070
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from ..fields import * # NOQA class Migration(migrations.Migration): dependencies = [ ('postgres_tests', '0001_setup_extensions'), ] operations = [ migrations.CreateModel( ...
bsd-3-clause
xodus7/tensorflow
tensorflow/contrib/distribute/python/single_loss_example.py
6
4385
# 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
panmari/tensorflow
tensorflow/tensorboard/scripts/generate_testdata.py
6
5008
# Copyright 2015 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 a...
apache-2.0
rickardholmberg/linux-sunxi
modules/wifi/ar6302/AR6K_SDK_ISC.build_3.1_RC.329/host/tools/athbtfilter/bluez/testscripts/bthmonoheadset.py
185
1768
#!/usr/bin/python import dbus import os import sys def printusage(): print 'bthmonoheadset.py <options>' print ' create - create a mono headset' print ' start - connect and play ' print ' stop - stop and disconnect' return headsetAddress = os.getenv("BTMONO_HEADSET") print 'BT Mono Headset Is : =>...
gpl-2.0
double12gzh/nova
nova/objects/floating_ip.py
11
9679
# Copyright 2014 Red Hat, 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 a...
apache-2.0
thandang/TComponent
TComponents/cpp/scons/scons-local-2.0.0.final.0/SCons/Tool/packaging/ipk.py
34
6313
"""SCons.Tool.Packaging.ipk """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation # # 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 r...
apache-2.0
julienvey/solum
solum/openstack/common/db/sqlalchemy/test_migrations.py
6
10842
# Copyright 2010-2011 OpenStack Foundation # Copyright 2012-2013 IBM 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/li...
apache-2.0
zero-ui/miniblink49
third_party/WebKit/Tools/Scripts/webkitpy/webgl/update_webgl_conformance_tests_unittest.py
48
4174
# Copyright (C) 2010 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 ...
gpl-3.0
strint/tensorflow
tensorflow/python/training/moving_averages_test.py
73
15366
# 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
tangyibin/goblin-core
llvm/3.4.2/llvm-3.4.2.src/test/tools/llvm-readobj/Inputs/relocs.py
20
33942
#!/usr/bin/env python # Generates ELF, COFF and MachO object files for different architectures # containing all relocations: # # ELF: i386, x86_64, ppc64, aarch64, arm, mips, mips64el # COFF: i386, x86_64 # MachO: i386, x86_64, arm # (see end of file for triples) # # To simplify generation, object files are generat...
bsd-3-clause
stephaniejn/stephaniejn.github.io
node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py
1835
12124
# 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. """New implementation of Visual Studio project generation.""" import os import random import gyp.common # hashlib is supplied as of Python 2.5 as the replacemen...
mit
SOKP/external_chromium_org
third_party/cython/src/Cython/Debugger/Tests/test_libcython_in_gdb.py
112
15787
""" Tests that run inside GDB. Note: debug information is already imported by the file generated by Cython.Debugger.Cygdb.make_command_file() """ import os import re import sys import trace import inspect import warnings import unittest import textwrap import tempfile import functools import traceback import itertool...
bsd-3-clause
lbishal/scikit-learn
sklearn/utils/sparsetools/_graph_validation.py
364
2407
from __future__ import division, print_function, absolute_import import numpy as np from scipy.sparse import csr_matrix, isspmatrix, isspmatrix_csc from ._graph_tools import csgraph_to_dense, csgraph_from_dense,\ csgraph_masked_from_dense, csgraph_from_masked DTYPE = np.float64 def validate_graph(csgraph, direc...
bsd-3-clause
SummerLW/Perf-Insight-Report
telemetry/telemetry/internal/browser/web_contents.py
8
11640
# Copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os from telemetry.core import exceptions from telemetry.core import util DEFAULT_WEB_CONTENTS_TIMEOUT = 90 # TODO(achuith, dtu, nduca): Add unit te...
bsd-3-clause
jburger424/MediaQueueHCI
m-q-env/lib/python3.4/site-packages/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...
mit
ifduyue/django
django/utils/translation/__init__.py
4
7499
""" Internationalization support. """ import re import warnings from contextlib import ContextDecorator from django.utils.deprecation import RemovedInDjango21Warning from django.utils.functional import lazy __all__ = [ 'activate', 'deactivate', 'override', 'deactivate_all', 'get_language', 'get_language_from_...
bsd-3-clause
gentooliano/nodemcu-firmware
tools/esptool.py
49
25564
#!/usr/bin/env python # # ESP8266 ROM Bootloader Utility # https://github.com/themadinventor/esptool # # Copyright (C) 2014 Fredrik Ahlberg # # 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; eith...
mit
Deepakkothandan/ansible
test/units/modules/network/nxos/test_nxos_feature.py
47
2591
# (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 # (at your option) any later version. # # Ansible is dis...
gpl-3.0
koyuawsmbrtn/eclock
windows/Python27/Lib/_MozillaCookieJar.py
191
5809
"""Mozilla / Netscape cookie loading / saving.""" import re, time from cookielib import (_warn_unhandled_exception, FileCookieJar, LoadError, Cookie, MISSING_FILENAME_TEXT) class MozillaCookieJar(FileCookieJar): """ WARNING: you may want to backup your browser's cookies file if you us...
gpl-2.0
gladk/trunk
examples/mill.py
8
3703
#!/usr/bin/python # -*- coding: utf-8 -*- """ Small showcase posted at http://www.youtube.com/watch?v=KUv26xlh89I, in response to pfc3d's http://www.youtube.com/watch?v=005rdDBoe4w. Physical correctness is not the focus, the geometry and similar look is. You can take this file as instruction on how to build parametric...
gpl-2.0
talishte/ctigre
env/lib/python2.7/site-packages/requests/status_codes.py
926
3200
# -*- coding: utf-8 -*- from .structures import LookupDict _codes = { # Informational. 100: ('continue',), 101: ('switching_protocols',), 102: ('processing',), 103: ('checkpoint',), 122: ('uri_too_long', 'request_uri_too_long'), 200: ('ok', 'okay', 'all_ok', 'all_okay', 'all_good', '\\o/'...
bsd-2-clause
deandunbar/bitwave
hackathon_version/venv/lib/python2.7/site-packages/django/utils/importlib.py
98
1547
# Taken from Python 2.7 with permission from/by the original author. import warnings import sys from django.utils import six from django.utils.deprecation import RemovedInDjango19Warning warnings.warn("django.utils.importlib will be removed in Django 1.9.", RemovedInDjango19Warning, stacklevel=2) def _resolve_...
mit
amite/ghostblog
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/styles/tango.py
363
7096
# -*- coding: utf-8 -*- """ pygments.styles.tango ~~~~~~~~~~~~~~~~~~~~~ The Crunchy default Style inspired from the color palette from the Tango Icon Theme Guidelines. http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines Butter: #fce94f #edd400 #c4a000 Orange: #fcaf3e ...
mit