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
wbyne/QGIS
python/plugins/processing/gui/BatchOutputSelectionPanel.py
2
6990
# -*- coding: utf-8 -*- """ *************************************************************************** BatchOutputSelectionPanel.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *************...
gpl-2.0
shoelzer/buildbot
master/buildbot/changes/svnpoller.py
6
17985
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
wuhengzhi/chromium-crosswalk
build/android/lighttpd_server.py
30
9449
#!/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. """Provides a convenient wrapper for spawning a test lighttpd instance. Usage: lighttpd_server PATH_TO_DOC_ROOT """ import co...
bsd-3-clause
mgax/aleph
aleph/manage.py
3
1527
from flask.ext.script import Manager from flask.ext.assets import ManageAssets from flask.ext.migrate import MigrateCommand from aleph.core import archive from aleph.model import db, CrawlState from aleph.views import app, assets from aleph.processing import make_pipeline, process_collection from aleph.crawlers import...
mit
markope/AutobahnPython
autobahn/wamp/protocol.py
1
57431
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # 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 with...
mit
cancan101/tensorflow
tensorflow/contrib/cudnn_rnn/__init__.py
27
1326
# 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
joyxu/autotest
setup.py
2
4417
import os try: import autotest.common as common except ImportError: import common # High level way of installing each autotest component import client.setup import frontend.setup import cli.setup import server.setup import scheduler.setup import database_legacy.setup import tko.setup import utils.setup import...
gpl-2.0
brokenjacobs/ansible
lib/ansible/modules/cloud/amazon/iam_cert.py
5
12176
#!/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
g19-hs/personfinder
tests/test_send_mail.py
16
2145
#!/usr/bin/python2.7 # Copyright 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
bunnyitvn/webptn
build/lib.linux-i686-2.7/django/contrib/admin/views/main.py
85
16606
import operator from functools import reduce from django.core.exceptions import SuspiciousOperation, ImproperlyConfigured from django.core.paginator import InvalidPage from django.core.urlresolvers import reverse from django.db import models from django.db.models.fields import FieldDoesNotExist from django.utils.datas...
bsd-3-clause
Statistica/676-candidates
candidates_by_party_greater_100k.py
1
1686
# -*- coding: utf-8 -*- # Written by Jonathan Saewitz, released May 24th, 2016 for Statisti.ca # Released under the MIT License (https://opensource.org/licenses/MIT) import csv, plotly.plotly as plotly, plotly.graph_objs as go, requests from collections import Counter from bs4 import BeautifulSoup #the following cand...
mit
teltek/edx-platform
lms/djangoapps/certificates/management/commands/ungenerated_certs.py
16
6600
""" Management command to find all students that need certificates for courses that have finished, and put their cert requests on the queue. """ from __future__ import print_function import datetime import logging from django.contrib.auth.models import User from django.core.management.base import BaseCommand from opaq...
agpl-3.0
bat-serjo/vivisect
vivisect/qt/main.py
1
19470
import os import sys import vstruct.qt as vs_qt import envi.expression as e_expr import envi.qt.config as e_q_config import vqt.main as vq_main import vqt.colors as vq_colors import vqt.qpython as vq_python import vqt.application as vq_app import vivisect.cli as viv_cli import vivisect.base as viv_base import vivise...
apache-2.0
tashaxe/Red-DiscordBot
lib/websockets/http.py
8
2888
""" The :mod:`websockets.http` module provides HTTP parsing functions. They're merely adequate for the WebSocket handshake messages. These functions cannot be imported from :mod:`websockets`; they must be imported from :mod:`websockets.http`. """ import asyncio import email.parser import io import sys from .version...
gpl-3.0
zacharyvoase/logbook
logbook/_fallback.py
11
4596
# -*- coding: utf-8 -*- """ logbook._fallback ~~~~~~~~~~~~~~~~~ Fallback implementations in case speedups is not around. :copyright: (c) 2010 by Armin Ronacher, Georg Brandl. :license: BSD, see LICENSE for more details. """ import threading from itertools import count from thread import get_ident ...
bsd-3-clause
Belxjander/Kirito
Python-3.5.0-main/Tools/i18n/msgfmt.py
59
7033
#! /usr/bin/env python3 # Written by Martin v. Löwis <loewis@informatik.hu-berlin.de> """Generate binary message catalog from textual translation description. This program converts a textual Uniforum-style message catalog (.po file) into a binary GNU catalog (.mo file). This is essentially the same function as the G...
gpl-3.0
roxyboy/bokeh
bokeh/models/markers.py
33
5595
""" Glyph renderer models for displaying simple scatter-type markers on Bokeh plots. """ from __future__ import absolute_import from .glyphs import Glyph from ..enums import enumeration from ..mixins import FillProps, LineProps from ..properties import DistanceSpec, Enum, Include, NumberSpec, ScreenDistanceSpec clas...
bsd-3-clause
GoogleCloudPlatform/training-data-analyst
self-paced-labs/cloud-hero/sessions/main.py
2
2257
# Copyright 2019 Google LLC 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
antechrestos/cf-python-client
integration/test_navigation.py
1
3323
import logging import unittest from config_test import build_client_from_configuration _logger = logging.getLogger(__name__) class TestNavigation(unittest.TestCase): def test_all(self): client = build_client_from_configuration() for organization in client.v2.organizations: if organiz...
apache-2.0
jymannob/CouchPotatoServer
libs/pyasn1/type/tagmap.py
200
1772
from pyasn1 import error class TagMap: def __init__(self, posMap={}, negMap={}, defType=None): self.__posMap = posMap.copy() self.__negMap = negMap.copy() self.__defType = defType def __contains__(self, tagSet): return tagSet in self.__posMap or \ self.__...
gpl-3.0
saurabh6790/med_lib_test
webnotes/modules/__init__.py
32
1699
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals """ Utilities for using modules """ import webnotes, os from webnotes import conf import webnotes.utils lower_case_files_for = ['DocType', 'Page', 'Report', "Workflow", 'M...
mit
Zac-HD/home-assistant
homeassistant/components/dweet.py
22
1948
""" A component which allows you to send data to Dweet.io. For more details about this component, please refer to the documentation at https://home-assistant.io/components/dweet/ """ import logging from datetime import timedelta import voluptuous as vol from homeassistant.const import ( CONF_NAME, CONF_WHITELIST...
apache-2.0
okwow123/djangol2
example/env/lib/python2.7/site-packages/allauth/socialaccount/providers/edmodo/tests.py
12
1147
from allauth.socialaccount.tests import OAuth2TestsMixin from allauth.tests import MockedResponse, TestCase from .provider import EdmodoProvider class EdmodoTests(OAuth2TestsMixin, TestCase): provider_id = EdmodoProvider.id def get_mocked_response(self): return MockedResponse(200, """ { "url": "ht...
mit
jirikuncar/invenio-deposit
invenio_deposit/fields/author.py
7
1479
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 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 (at your...
gpl-2.0
rusucosmin/courses
ubb/algebra/sort_partial.py
1
2185
import urllib2 import operator import os from bs4 import BeautifulSoup class Student: def __init__(self, name, grade): self._name = name self._grade = grade def __repr__(self): return self._name + " " + str(self._grade) if not os.path.exists('partial.html'): response = urllib2.urlopen('https://docs.google....
mit
PeterKietzmann/RIOT
boards/opencm904/dist/robotis-loader.py
30
4057
#!/usr/bin/env python ''' MIT License Copyright (c) 2014 Gregoire Passault 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, co...
lgpl-2.1
fernandezcuesta/ansible
lib/ansible/modules/cloud/ovirt/ovirt_storage_domains.py
29
18519
#!/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
t794104/ansible
test/units/module_utils/basic/test_dict_converters.py
166
1032
# -*- coding: utf-8 -*- # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2016 Toshio Kuratomi <tkuratomi@ansible.com> # (c) 2017 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 ...
gpl-3.0
iut-ibk/DynaMind-UrbanSim
3rdparty/opus/src/opus_core/samplers/weighted_sampler.py
2
14239
# Opus/UrbanSim urban simulation software. # Copyright (C) 2010-2011 University of California, Berkeley, 2005-2009 University of Washington # See opus_core/LICENSE from opus_core.resources import Resources from opus_core.session_configuration import SessionConfiguration from opus_core.datasets.dataset_pool imp...
gpl-2.0
ojengwa/talk
venv/lib/python2.7/site-packages/django/contrib/auth/decorators.py
38
3020
from functools import wraps from django.conf import settings from django.contrib.auth import REDIRECT_FIELD_NAME from django.core.exceptions import PermissionDenied from django.utils.decorators import available_attrs from django.utils.six.moves.urllib.parse import urlparse from django.shortcuts import resolve_url def...
mit
atiberghien/makerscience-server
makerscience_profile/migrations/0002_auto__add_field_makerscienceprofile_activity__add_field_makersciencepr.py
1
6258
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'MakerScienceProfile.activity' db.add_column(u'makerscienc...
agpl-3.0
inspirehep/invenio-beard
tests/test_matching.py
1
5408
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 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 (at your option) any later...
gpl-2.0
sharad/calibre
src/calibre/gui2/metadata/diff.py
1
22039
#!/usr/bin/env python # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>' import os from collections import OrderedDict, namedtuple from functools impo...
gpl-3.0
mapr/hue
desktop/core/ext-py/Pygments-1.3.1/pygments/styles/monokai.py
75
5080
# -*- coding: utf-8 -*- """ pygments.styles.monokai ~~~~~~~~~~~~~~~~~~~~~~~ Mimic the Monokai color scheme. Based on tango.py. http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/ :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details....
apache-2.0
rohitwaghchaure/GenieManager-erpnext
erpnext/shopping_cart/product.py
16
1688
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import cint, fmt_money, cstr from erpnext.shopping_cart.cart import _get_cart_quotation from urllib import unquote @fr...
agpl-3.0
kleskjr/scipy
tools/osx/build.py
27
2288
"""Python script to build the OSX universal binaries. This is a simple script, most of the heavy lifting is done in bdist_mpkg. To run this script: 'python build.py' Requires a svn version of scipy is installed, svn is used to revert file changes made to the docs for the end-user install. Installer is built using ...
bsd-3-clause
sljrobin/listodo
listodo.py
1
2521
#!/usr/bin/python # -*- coding: utf-8 -*- import collections import os import re import sys from colorama import init from colorama import Fore, Back, Style init() ########################################################################################## PATTERN_01 = r'# TODO' #####################################...
gpl-2.0
s0930342674/pyload
module/plugins/accounts/DebridItaliaCom.py
6
1384
# -*- coding: utf-8 -*- import re import time from module.plugins.internal.Account import Account class DebridItaliaCom(Account): __name__ = "DebridItaliaCom" __type__ = "account" __version__ = "0.16" __status__ = "testing" __description__ = """Debriditalia.com account plugin""" __li...
gpl-3.0
Alwnikrotikz/python-astm
docs/conf.py
15
7955
# -*- coding: utf-8 -*- # # astm documentation build configuration file, created by # sphinx-quickstart on Sat Sep 15 16:35:42 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All co...
bsd-3-clause
wichmann/PythonExamples
network/bot.py
1
1620
#!/usr/bin/env python3 #------------------------------------------------------------------------------- # Name: bot - simple example for a telegram bot # Usage: ./bot.py # Author: Christian Wichmann # Created: 13.06.2019 # Copyright: (c) Christian Wichmann 2019 # Licence: GNU GPL #--...
gpl-2.0
ddimensia/RaceCapture_App
autosportlabs/racecapture/views/configuration/rcp/scriptview.py
1
6939
import kivy kivy.require('1.9.1') from kivy.clock import Clock from kivy.uix.boxlayout import BoxLayout from kivy.uix.stacklayout import StackLayout from pygments.formatters.bbcode import BBCodeFormatter #explicit import to make pyinstaller work. do not remove from kivy.uix.codeinput import CodeInput from kivy.uix.text...
gpl-3.0
frewsxcv/keyczar
cpp/src/tools/scons/scons-local-1.2.0.d20090223/SCons/Tool/rpcgen.py
19
2876
"""SCons.Tool.rpcgen Tool-specific initialization for RPCGEN tools. Three normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation ...
apache-2.0
eviljeff/olympia
src/olympia/accounts/tasks.py
2
1958
import functools from datetime import datetime from waffle import switch_is_active import olympia.core.logger from olympia.amo.celery import task from olympia.amo.decorators import use_primary_db from olympia.users.models import UserProfile log = olympia.core.logger.getLogger('z.accounts') def user_profile_from_...
bsd-3-clause
matthewoliver/swift
test/unit/proxy/controllers/test_obj.py
2
211683
#!/usr/bin/env python # Copyright (c) 2010-2012 OpenStack Foundation # # 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 a...
apache-2.0
ProfessionalIT/professionalit-webiste
sdk/google_appengine/lib/django-1.4/django/contrib/localflavor/co/co_departments.py
90
1097
# -*- coding: utf-8 -*- """ A list of Colombian departaments as `choices` in a formfield. This exists in this standalone file so that it's only imported into memory when explicitly needed. """ DEPARTMENT_CHOICES = ( ('AMA', u'Amazonas'), ('ANT', u'Antioquia'), ('ARA', u'Arauca'), ('ATL', u'Atlántico')...
lgpl-3.0
ilovezy/three.js
utils/exporters/blender/addons/io_three/constants.py
124
6852
''' All constant data used in the package should be defined here. ''' from collections import OrderedDict as BASE_DICT BLENDING_TYPES = type('Blending', (), { 'NONE': 'NoBlending', 'NORMAL': 'NormalBlending', 'ADDITIVE': 'AdditiveBlending', 'SUBTRACTIVE': 'SubtractiveBlending', 'MULTIPLY': 'Multip...
mit
JFriel/honours_project
networkx/build/lib/networkx/convert_matrix.py
10
33329
"""Functions to convert NetworkX graphs to and from numpy/scipy matrices. The preferred way of converting data to a NetworkX graph is through the graph constuctor. The constructor calls the to_networkx_graph() function which attempts to guess the input type and convert it automatically. Examples -------- Create a 10...
gpl-3.0
Nu3001/external_chromium_org
chrome/common/extensions/docs/server2/test_object_store_test.py
153
1495
#!/usr/bin/env python # 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. from test_object_store import TestObjectStore import unittest class TestObjectStoreTest(unittest.TestCase): def testEmpty(self): ...
bsd-3-clause
firerszd/kbengine
kbe/src/lib/python/Lib/email/_encoded_words.py
85
7913
""" Routines for manipulating RFC2047 encoded words. This is currently a package-private API, but will be considered for promotion to a public API if there is demand. """ # An ecoded word looks like this: # # =?charset[*lang]?cte?encoded_string?= # # for more information about charset see the charset module. ...
lgpl-3.0
acshan/odoo
addons/website_membership/controllers/main.py
18
9437
# -*- coding: utf-8 -*- from openerp import SUPERUSER_ID from openerp.addons.web import http from openerp.addons.web.http import request from openerp.addons.website.models.website import unslug from openerp.tools import DEFAULT_SERVER_DATE_FORMAT from openerp.tools.translate import _ import time import werkzeug.urls ...
agpl-3.0
fibbo/DIRAC
Core/Utilities/Traced.py
17
3165
######################################################################## # $HeadURL $ # File: Traced.py # Author: Krzysztof.Ciba@NOSPAMgmail.com # Date: 2012/08/08 13:29:18 ######################################################################## """ :mod: Traced .. module: Traced :synopsis: watched mutable metacla...
gpl-3.0
shermanng10/superathletebuilder
env/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/introspection.py
119
10042
from __future__ import unicode_literals from collections import namedtuple from django.db.backends.base.introspection import ( BaseDatabaseIntrospection, FieldInfo, TableInfo, ) from django.utils.encoding import force_text FieldInfo = namedtuple('FieldInfo', FieldInfo._fields + ('default',)) class DatabaseIntr...
mit
bxcn/sublime_plugins
Packages/SublimeLinter/sublimelinter.py
10
15660
# # sublimelinter.py # Part of SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ryan Hileman and Aparajita Fishman # # Project: https://github.com/SublimeLinter/SublimeLinter3 # License: MIT # """This module provides the SublimeLinter plugin class and supporting methods.""" import os import...
mit
sanjuro/RCJK
vendor/epydoc/util.py
9
14055
# epydoc -- Utility functions # # Copyright (C) 2005 Edward Loper # Author: Edward Loper <edloper@loper.org> # URL: <http://epydoc.sf.net> # # $Id: util.py 1721 2008-02-15 01:02:30Z edloper $ """ Miscellaneous utility functions that are used by multiple modules. @group Python source types: is_module_file, is_package_...
apache-2.0
vks/servo
tests/wpt/web-platform-tests/tools/pywebsocket/src/test/mux_client_for_testing.py
457
25761
#!/usr/bin/env python # # Copyright 2012, 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...
mpl-2.0
shaistaansari/django
tests/inspectdb/tests.py
89
12808
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import re from unittest import skipUnless from django.core.management import call_command from django.db import connection from django.test import TestCase, skipUnlessDBFeature from django.utils.six import PY3, StringIO from .models import ColumnTypes...
bsd-3-clause
grantsewell/nzbToMedia
libs/unidecode/x099.py
252
4629
data = ( 'Hai ', # 0x00 'Ren ', # 0x01 'Tian ', # 0x02 'Jiao ', # 0x03 'Jia ', # 0x04 'Bing ', # 0x05 'Yao ', # 0x06 'Tong ', # 0x07 'Ci ', # 0x08 'Xiang ', # 0x09 'Yang ', # 0x0a 'Yang ', # 0x0b 'Er ', # 0x0c 'Yan ', # 0x0d 'Le ', # 0x0e 'Yi ', # 0x0f 'Can ', # 0x10 '...
gpl-3.0
OSSESAC/odoopubarquiluz
openerp/addons/base/res/res_lang.py
34
14785
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
oscarolar/odoo
openerp/addons/base/ir/ir_attachment.py
4
15096
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
RogueProeliator/IndigoPlugin-TiVo-Network-Remote
TiVo Network Remote.indigoPlugin/Contents/Server Plugin/plugin.py
1
10778
#! /usr/bin/env python # -*- coding: utf-8 -*- #///////////////////////////////////////////////////////////////////////////////////////// #///////////////////////////////////////////////////////////////////////////////////////// # TiVo Network Remote Control by RogueProeliator <rp@rogueproeliator.com> # Indigo plugin ...
mit
askinteractive/mezzanine-advanced-admin
test_mezzanine_advanced_admin/test_mezzanine_advanced_admin/settings.py
1
2566
""" Django settings for test_mezzanine_advanced_admin project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path....
apache-2.0
bhairavmehta95/flashcard-helper-alexa-skill
venv/lib/python2.7/site-packages/pip/_vendor/colorama/ansi.py
640
2524
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. ''' This module generates ANSI character codes to printing colors to terminals. See: http://en.wikipedia.org/wiki/ANSI_escape_code ''' CSI = '\033[' OSC = '\033]' BEL = '\007' def code_to_chars(code): return CSI + str(code) + 'm' def set...
mit
jjj117/airavata
airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/job/ttypes.py
2
8174
# # Autogenerated by Thrift Compiler (0.9.2) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from thrift.Thrift import TType, TMessageType, TException, TApplicationException import apache.airavata.model.status.ttypes from thrift.transport import TTransport from thrift.p...
apache-2.0
burakbayramli/dersblog
func_analysis/func_60_primdual/pdl.py
2
2494
import numpy as np from scipy.optimize import linprog from numpy.linalg import matrix_rank def solve(c, A, b, epsilon=0.0001): if matrix_rank(A) < min(A.shape[0], A.shape[1]): print('A is not full rank, dropping redundant rows') _, pivots = sympy.Matrix(A).T.rref() A = A[list(pivots)] ...
gpl-3.0
Kivvix/stage-LPC
trackSrc/density.py
1
4448
#!/usr/bin/env python # -*- coding: utf-8 -*- ## @package density # @author J. Massot # @date 2014-04-30 # # @brief Calculate density of pictures into strip 82 # # @details Search all coordinates of each `fits` file and count density from numpy import * import math # to manipulate fits files import pyfits impor...
mit
grengojbo/satchmo
satchmo/apps/satchmo_utils/unique_id.py
12
3376
""" Create a unique user id given a first and last name. First, we try simple concatenation of first and last name. If that doesn't work, we add random numbers to the name """ from django.contrib.auth.models import User from django.utils.encoding import smart_unicode from htmlentitydefs import name2codepoint from satc...
bsd-3-clause
Work4Labs/lettuce
tests/integration/lib/Django-1.3/django/utils/itercompat.py
294
1169
""" Providing iterator functions that are not in all version of Python we support. Where possible, we try to use the system-native version and only fall back to these implementations if necessary. """ import itertools # Fallback for Python 2.4, Python 2.5 def product(*args, **kwds): """ Taken from http://docs...
gpl-3.0
jeremycline/pulp
client_lib/pulp/client/commands/consumer/bind.py
17
8165
from gettext import gettext as _ from pulp.client.commands.options import DESC_ID, OPTION_CONSUMER_ID, OPTION_REPO_ID from pulp.client.commands.polling import PollingCommand from pulp.client.consumer_utils import load_consumer_id from pulp.client.extensions.extensions import PulpCliFlag, PulpCliOption from pulp.common...
gpl-2.0
bassijtsma/chatbot
yowsup/layers/axolotl/protocolentities/message_encrypted.py
36
2412
from yowsup.layers.protocol_messages.protocolentities import MessageProtocolEntity from yowsup.structs import ProtocolTreeNode import sys class EncryptedMessageProtocolEntity(MessageProtocolEntity): ''' <message retry="1" from="49xxxxxxxx@s.whatsapp.net" t="1418906418" offline="1" type="text" id="1418906377-1" ...
gpl-3.0
behanceops/moto
moto/ec2/responses/vpcs.py
12
2821
from __future__ import unicode_literals from moto.core.responses import BaseResponse from moto.ec2.utils import filters_from_querystring, vpc_ids_from_querystring class VPCs(BaseResponse): def create_vpc(self): cidr_block = self.querystring.get('CidrBlock')[0] vpc = self.ec2_backend.create_vpc(cid...
apache-2.0
Godiyos/python-for-android
python3-alpha/python3-src/Lib/encodings/cp863.py
272
34252
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP863.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_map) def decode(self,input,errors='strict'): ...
apache-2.0
yamcs/yamcs
docs/http-api/conf.py
3
3605
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config import os import sys from xml.etree import ElementTree as ET import pkg_res...
agpl-3.0
uni2u/neutron
neutron/common/rpc.py
2
8756
# Copyright (c) 2012 OpenStack Foundation. # Copyright (c) 2014 Red Hat, 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...
apache-2.0
DewarM/oppia
core/controllers/home_test.py
2
10750
# 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 required by applicable ...
apache-2.0
Cashiuus/metagoofil
pdfminer/pdftypes.py
26
7735
#!/usr/bin/env python2 import sys import zlib from lzw import lzwdecode from ascii85 import ascii85decode, asciihexdecode from runlength import rldecode from psparser import PSException, PSObject from psparser import LIT, KWD, STRICT LITERAL_CRYPT = LIT('Crypt') # Abbreviation of Filter names in PDF 4.8.6. "Inline Im...
gpl-2.0
pasv/Empire
lib/modules/persistence/userland/schtasks.py
13
9540
import os from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Invoke-Schtasks', 'Author': ['@mattifestation', '@harmj0y'], 'Description': ('Persist a stager (or script) using schtasks. This has a moderate detec...
bsd-3-clause
sklnet/opendroid-enigma2
lib/python/Components/Renderer/DMCHDCaids.py
11
2849
# # Caids - Renderer # # Coded by Dr.Best (c) 2010 # Support: www.dreambox-tools.info # # This plugin is licensed under the Creative Commons # Attribution-NonCommercial-ShareAlike 3.0 Unported # License. To view a copy of this license, visit # http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter ...
gpl-2.0
calebd/swift
utils/swift_build_support/swift_build_support/workspace.py
38
3857
# swift_build_support/workspace.py ------------------------------*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.tx...
apache-2.0
bdfoster/blumate
blumate/components/binary_sensor/rest.py
1
2622
""" Support for RESTful binary sensors. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/binary_sensor.rest/ """ import logging from blumate.components.binary_sensor import (BinarySensorDevice, SENSOR_CLASSES)...
mit
rbalda/neural_ocr
env/lib/python2.7/site-packages/pybrain/tests/unittests/test_capturegame_network.py
4
1378
""" Build a CaptureGameNetwork with LSTM cells >>> from pybrain.structure.networks.custom import CaptureGameNetwork >>> from pybrain import MDLSTMLayer >>> size = 2 >>> n = CaptureGameNetwork(size = size, componentclass = MDLSTMLayer, hsize = 1, peepholes = False) Check it's string representation ...
mit
BT-rmartin/odoo
addons/payment_sips/controllers/main.py
153
1864
# -*- coding: utf-8 -*- try: import simplejson as json except ImportError: import json import logging import werkzeug from openerp import http from openerp.http import request _logger = logging.getLogger(__name__) class SipsController(http.Controller): _notify_url = '/payment/sips/ipn/' _return_url...
agpl-3.0
mmnelemane/neutron
neutron/tests/api/test_flavors_extensions.py
23
6787
# Copyright 2015 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
apache-2.0
Berling/project-zombye-exporter
io_exporter_zombye/export_zmdl.py
1
8360
# The MIT License (MIT) # # Copyright (c) 2015 Georg Schäfer # # 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, mod...
mit
tempbottle/rust-packaging
package-rust.py
2
13929
#!/usr/bin/env python2.7 # Copyright 2015 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license ...
apache-2.0
jfmorcillo/mss
mss/agent/lib/utils.py
3
2996
# -*- coding: UTF-8 -*- # # (c) 2010-2012 Mandriva, http://www.mandriva.com/ # # This file is part of Mandriva Server Setup # # MSS 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 Licen...
gpl-3.0
dkodnik/arp
addons/web/tests/test_menu.py
34
5729
# -*- coding: utf-8 -*- import collections import mock import unittest2 from openerp.http import request as req from . import common from ..controllers import main class Placeholder(object): def __init__(self, **kwargs): for k, v in kwargs.iteritems(): setattr(self, k, v) class LoadTest(co...
agpl-3.0
edxnercel/edx-platform
cms/djangoapps/contentstore/views/tests/test_library.py
114
9392
""" Unit tests for contentstore.views.library More important high-level tests are in contentstore/tests/test_libraries.py """ from contentstore.tests.utils import AjaxEnabledTestClient, parse_json from contentstore.utils import reverse_course_url, reverse_library_url from contentstore.views.component import get_compon...
agpl-3.0
Som-Energia/intercoop
python/setup.py
1
1213
#!/usr/bin/env python from setuptools import setup, find_packages readme = open("README.rst").read() setup( name = "intercoop", version = "0.2.1", description = "Intercooperation library", author = "Som Energia SCCL", author_email = "info@somenergia.coop", url = 'https://github.com/Som-Energia/intercoop', lo...
agpl-3.0
jeremyjbowers/cfbreference_com
rankings/models.py
1
2698
from django.db import models from college.models import College, Player, Week, CollegeYear RANKINGTYPE_CHOICES = ( ('T', 'Team'), ('P', 'Player'), ) CURRENT_SEASON = 2011 class RankingType(models.Model): name = models.CharField(max_length=75) slug = models.SlugField(max_length=75) typename = mode...
apache-2.0
f-guichard/cf-sample-php-buildpack-custo
lib/yaml/composer.py
534
4921
__all__ = ['Composer', 'ComposerError'] from error import MarkedYAMLError from events import * from nodes import * class ComposerError(MarkedYAMLError): pass class Composer(object): def __init__(self): self.anchors = {} def check_node(self): # Drop the STREAM-START event. if se...
apache-2.0
martinburchell/econsensus
django/econsensus/publicweb/migrations/0020_auto__add_field_feedback_author.py
4
6315
# encoding: 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 'Feedback.author' db.add_column('publicweb_feedback', 'author', self.gf('django.db.models.f...
gpl-3.0
ionanrozenfeld/networkx
networkx/readwrite/json_graph/adjacency.py
17
4891
# Copyright (C) 2011-2013 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. from itertools import chain, count import networkx as nx __author__ = """Aric Hagberg <aric.hagberg@gmail.com>""" __all__ = ['adjacenc...
bsd-3-clause
40223144/2015cdafinal
static/Brython3.1.0-20150301-090019/Lib/site-packages/pygame/event.py
603
19086
#!/usr/bin/env python '''Pygame module for interacting with events and queues. Pygame handles all it's event messaging through an event queue. The routines in this module help you manage that event queue. The input queue is heavily dependent on the pygame display module. If the display has not been initialized and a ...
gpl-3.0
kartta-labs/mapwarper
lib/tilestache/TileStache-1.51.5/TileStache/Goodies/Providers/UtfGridCompositeOverlap.py
13
4055
import json import TileStache from TileStache.Core import KnownUnknown class Provider: def __init__(self, layer, stack, layer_id=None, wrapper=None): #Set up result storage self.resultGrid = [] self.gridKeys = [] self.gridData = {} self.layer = layer self.stack = stack self.layer_...
mit
JorgeCoock/django
django/db/backends/sqlite3/operations.py
180
9372
from __future__ import unicode_literals import datetime import uuid from django.conf import settings from django.core.exceptions import FieldError, ImproperlyConfigured from django.db import utils from django.db.backends import utils as backend_utils from django.db.backends.base.operations import BaseDatabaseOperatio...
bsd-3-clause
thomasrotter/sublimetext-cfml
cfml_plugin.py
1
3757
import sublime import sublime_plugin from HTML.html_completions import HtmlTagCompletions from .src import command_list, completions, events, utils, _plugin_loaded for command in command_list: globals()[command.__name__] = command def plugin_loaded(): _plugin_loaded() class CfmlEventListener(sublime_plugin...
mit
samklr/spark-testing-base
python/sparktestingbase/test/helloworld_test.py
8
1219
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
pilou-/ansible
lib/ansible/modules/network/restconf/restconf_get.py
47
3174
#!/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
yawnosnorous/python-for-android
python3-alpha/python3-src/Mac/IDLE/IDLE.app/Contents/Resources/idlemain.py
71
2786
""" Bootstrap script for IDLE as an application bundle. """ import sys, os # Change the current directory the user's home directory, that way we'll get # a more useful default location in the open/save dialogs. os.chdir(os.path.expanduser('~/Documents')) # Make sure sys.executable points to the python interpreter in...
apache-2.0
ianmcmahon/linuxcnc-mirror
src/emc/usr_intf/gscreen/mdi.py
36
13854
# Touchy is Copyright (c) 2009 Chris Radek <chris@timeguy.com> # # Touchy 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. # # Touchy i...
lgpl-2.1