repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
darcamo/pyphysim
refs/heads/master
pyphysim/extra/pgfplotshelper.py
1
#!/usr/bin/env python # pylint: disable-all """ This module contains useful functions to create pgfplots code (latex code using the pgfplots package) from python data. One example of tex code for a plot using pgfplots is show below .. code-block:: latex \\begin{tikzpicture} \\begin{axis}[axis options] ...
OpenGain/OpenGain
refs/heads/master
default_set/views.py
2
from importlib import import_module from django.contrib.auth import logout, login from django.contrib.auth.decorators import login_required from django.contrib.auth.forms import PasswordChangeForm from django.shortcuts import render, redirect, get_object_or_404 from default_set.forms import * from default_set.models im...
skg-net/ansible
refs/heads/devel
lib/ansible/modules/web_infrastructure/ansible_tower/tower_user.py
27
#!/usr/bin/python # coding: utf-8 -*- # (c) 2017, Wayne Witzel III <wayne@riotousliving.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1...
benchisell/photostream-bc
refs/heads/master
flask/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/_vendor/requests/packages/chardet/euckrprober.py
2930
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
stchris/untangle
refs/heads/master
setup.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- """ untangle -------- .. image:: https://secure.travis-ci.org/stchris/untangle.png?branch=master untangle parses an XML document and returns a Python object which makes it easy to access the data you want. Example: :: import untangle obj = untangle.parse('<root...
dropbox/bazel
refs/heads/master
tools/android/instrumentation_test_check.py
2
# pylint: disable=g-direct-third-party-import # Copyright 2017 The Bazel 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/LI...
bcgov/ckanext-bcgov
refs/heads/dev
ckanext/bcgov/logic/get.py
1
# encoding: utf-8 '''API functions for searching for and getting data from CKAN.''' import logging import sqlalchemy from paste.deploy.converters import asbool import ckan.logic as logic import ckan.lib.navl.dictization_functions import ckan.model as model from ckan.logic.action.get import ( _unpick_search ) log ...
ubccr/tacc_stats
refs/heads/master
pickler/summarize.py
1
#!/usr/bin/env python import datetime import job_stats import math import numpy import os import scipy import sys import json import traceback from scipy import stats from extra.catastrophe import Catastrophe from procdump import TaccProcDump import logging from timeseriessummary import TimeSeriesSummary SUMMARY_VER...
Bachaco-ve/odoo
refs/heads/8.0
openerp/report/interface.py
380
# -*- 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...
gangadhar-kadam/nassimapp
refs/heads/master
patches/december_2012/fix_default_print_format.py
30
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt import webnotes def execute(): webnotes.conn.sql("""update `tabDocType` set default_print_format=null where default_print_format='Standard'""")
emgee/formal
refs/heads/master
formal/widgets/richtextarea.py
1
""" Rich text area widget. """ from nevow import inevow, loaders, rend, tags as T, util from formal import iformal, widget, types from formal.util import render_cssid from zope.interface import Interface class RichTextArea(widget.TextArea): """ A large text entry area that can be used for different formats of...
wronk/mne-python
refs/heads/master
mne/realtime/client.py
13
from __future__ import print_function # Authors: Christoph Dinh <chdinh@nmr.mgh.harvard.edu> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # # License: BSD (3-clause) import socket import time from ..externals.six.moves import StringIO import threading im...
kirca/OpenUpgrade
refs/heads/8.0
addons/crm_partner_assign/report/crm_lead_report.py
309
# -*- 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...
mattpap/sympy-polys
refs/heads/master
sympy/mpmath/rational.py
1
import operator from libmp import int_types, mpf_hash, bitcount new = object.__new__ def create_reduced(p, q, _cache={}): key = p, q if key in _cache: return _cache[key] x, y = p, q while y: x, y = y, x % y if x != 1: p //= x q //= x v = new(mpq) v._mpq_ = p...
gsnbng/erpnext
refs/heads/develop
erpnext/patches/v5_0/update_item_and_description_again.py
11
# 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 cstr import re def execute(): item_details = frappe._dict() for d in frappe.db.sql("select name, description f...
grahesh/Stock-Market-Event-Analysis
refs/heads/master
Legacy/qstkoptimizers/curveFittingOptimizer.py
5
''' Created on Jul 27, 2010 @author: Shreyas Joshi ''' import DataAccess import numpy class Optimizer(object): def __init__(self, listOfStocks): self.listOfStocks= listOfStocks self.DAY=86400 dataItemsList=list() dataItemsList.append("alphaValue") self.alp...
lbk0116/cinda_cmdb
refs/heads/master
__init__.py
53
# -*- coding: utf-8 -*- from . import models from . import controllers
google-code-export/jaikuengine
refs/heads/master
install/__init__.py
1073
# Copyright 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
agry/NGECore2
refs/heads/master
scripts/object/draft_schematic/space/armor/mass_reduction_kit_mk2.py
85615
import sys def setup(core, object): return
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/mobile/ep3/ep3_village_guard_05.py
85615
import sys def setup(core, object): return
b-cube/thredds_catalog_crawler
refs/heads/master
tests/test_crawler.py
1
import unittest from thredds_crawler.crawl import Crawl class CrawlerTest(unittest.TestCase): def test_root_finder(self): urls = [ ('http://data.eol.ucar.edu/jedi/catalog/ucar.ncar.eol.dataset.106_224.thredds.xml', 'http://data.eol.ucar.edu/jedi/catalog/ucar.ncar.eol.thredds....
ipa-led/airbus_coop
refs/heads/master
airbus_plugins/airbus_ssm_plugin/src/airbus_ssm_plugin/ssm_introspection.py
1
#!/usr/bin/env python # # Copyright 2015 Airbus # Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA) # # 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 # # ...
pleaseproject/python-for-android
refs/heads/master
python-modules/twisted/twisted/conch/ssh/channel.py
61
# -*- test-case-name: twisted.conch.test.test_channel -*- # Copyright (c) 2001-2008 Twisted Matrix Laboratories. # See LICENSE for details. # """ The parent class for all the SSH Channels. Currently implemented channels are session. direct-tcp, and forwarded-tcp. Maintainer: Paul Swartz """ from twisted.python impo...
jendap/tensorflow
refs/heads/master
tensorflow/python/training/basic_loops.py
13
# 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...
Zhongqilong/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/test/test_bisect.py
101
import sys import unittest from test import support from collections import UserList py_bisect = support.import_fresh_module('bisect', blocked=['_bisect']) c_bisect = support.import_fresh_module('bisect', fresh=['_bisect']) class Range(object): """A trivial range()-like object that has an insert() method.""" ...
kernel-sanders/arsenic-mobile
refs/heads/master
Dependencies/Twisted-13.0.0/twisted/internet/test/test_filedescriptor.py
7
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Whitebox tests for L{twisted.internet.abstract.FileDescriptor}. """ from __future__ import division, absolute_import from zope.interface.verify import verifyClass from twisted.internet.abstract import FileDescriptor from twisted.internet.in...
Leila20/django
refs/heads/master
django/core/cache/__init__.py
230
""" Caching framework. This package defines set of cache backends that all conform to a simple API. In a nutshell, a cache is a set of values -- which can be any object that may be pickled -- identified by string keys. For the complete API, see the abstract BaseCache class in django.core.cache.backends.base. Client ...
gdw2/zim
refs/heads/master
tests/history.py
5
# -*- coding: utf-8 -*- # Copyright 2008-2013 Jaap Karssenberg <jaap.karssenberg@gmail.com> from __future__ import with_statement import tests import copy import zim.history from zim.history import History, HistoryPath, RecentPath from zim.notebook import Path from zim.config import INIConfigFile class VirtualF...
repotvsupertuga/repo
refs/heads/master
plugin.video.loganaddon/resources/lib/resolvers/allmyvideos.py
10
# -*- coding: utf-8 -*- ''' Specto Add-on Copyright (C) 2015 lambda 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...
jeffzhengye/pylearn
refs/heads/master
network/sendemail.py
1
import smtplib import string SUBJECT = "Test email from Python" TO = "yezh0716@gmail.com" FROM = "jeff.zheng.ye@gmail.com" text = "blah blah blah" BODY = string.join(( "From: %s" % FROM, "To: %s" % TO, "Subject: %s" % SUBJECT , "", text ), "\r\n") server = smtplib.SMTP(...
swvist/Ocrn
refs/heads/master
ocrn/feature.py
1
import Image as im import numpy as np class feature: #Return a 10X10 array from a monochrome BMP Image @staticmethod def getImageArray(imagepath): try: image = im.open(imagepath) imagearray=np.asarray(image.crop(image.getbbox()).resize((10,10))).astype(float) return imagearray except IOError: print ...
SpoKenSpoK/L3info_workspace
refs/heads/master
Maths/p9m4-v05/platforms.py
2
# Copyright (C) 2007 William McCune # # This file is part of the LADR Deduction Library. # # The LADR Deduction Library 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...
Codectivo/Incubu
refs/heads/master
usuarios/views.py
1
import json from django.contrib.auth.decorators import login_required from django.contrib.auth import login, authenticate, logout from django.contrib.auth.models import User from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import render from usuarios.forms import UserCreateForm, AddAccou...
jwren/intellij-community
refs/heads/master
python/helpers/py2only/docutils/nodes.py
104
# $Id: nodes.py 7595 2013-01-21 17:33:56Z milde $ # Author: David Goodger <goodger@python.org> # Maintainer: docutils-develop@lists.sourceforge.net # Copyright: This module has been placed in the public domain. """ Docutils document tree element class library. Classes in CamelCase are abstract base classes or auxilia...
tszym/ansible
refs/heads/devel
lib/ansible/modules/network/f5/bigip_config.py
18
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2017 F5 Networks 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 # ...
wuhengzhi/chromium-crosswalk
refs/heads/master
build/android/lighttpd_server.py
30
#!/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...
gonboy/sl4a
refs/heads/master
python/src/Lib/plat-irix5/AL.py
132
from warnings import warnpy3k warnpy3k("the AL module has been removed in Python 3.0", stacklevel=2) del warnpy3k RATE_48000 = 48000 RATE_44100 = 44100 RATE_32000 = 32000 RATE_22050 = 22050 RATE_16000 = 16000 RATE_11025 = 11025 RATE_8000 = 8000 SAMPFMT_TWOSCOMP= 1 SAMPFMT_FLOAT =...
farm3r/ardupilot
refs/heads/master
mk/PX4/Tools/genmsg/src/genmsg/deps.py
216
# Software License Agreement (BSD License) # # Copyright (c) 2011, Willow Garage, 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 ...
kvar/ansible
refs/heads/seas_master_2.9.5
test/units/modules/network/eos/test_eos_command.py
68
# (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...
aldryn/aldryn-news
refs/heads/master
aldryn_news/search_indexes.py
1
# -*- coding: utf-8 -*- from django.conf import settings from django.template import RequestContext from aldryn_search.utils import get_index_base, strip_tags from aldryn_news.models import News class NewsIndex(get_index_base()): haystack_use_for_indexing = getattr(settings, "ALDRYN_NEWS_SEARCH", True) IND...
miguelmota/find-me-burritos
refs/heads/master
node_modules/meanio/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py
531
# Copyright (c) 2013 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. """cmake output module This module is under development and should be considered experimental. This module produces cmake (2.8.8+) input as its output. One CMake...
thenetcircle/dino
refs/heads/master
test/api/test_api_users_in_room.py
1
#!/usr/bin/env python # 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 # d...
ShashaQin/erpnext
refs/heads/develop
erpnext/accounts/doctype/bank_reconciliation_detail/__init__.py
37694
from __future__ import unicode_literals
trabacus-softapps/openerp-8.0-cc
refs/heads/master
openerp/addons/account_budget/report/budget_report.py
57
# -*- 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...
nerdvegas/rez
refs/heads/master
src/rez/packages_.py
1
import warnings from rez.packages import * # noqa warnings.warn( "rez.packages_ is deprecated; import rez.packages instead", DeprecationWarning )
cburgmer/upsidedown
refs/heads/master
util.py
7
# -*- coding: utf-8 -*- import re LATIN_LIKE_SCRIPTS = ['Latin', 'Common', 'Cyrillic', 'Greek', 'Hebrew'] def readScriptRanges(scripts=None): """ Read script ranges from http://unicode.org/Public/UNIDATA/Scripts.txt file. """ scripts = scripts or LATIN_LIKE_SCRIPTS ranges = [] f = open('Scrip...
zeekay/port25
refs/heads/master
port25/submitter/connection.py
1
# Copyright 2009, NumbersUSA Action # Peter Halliday <peter@numbersusa.com> # This software may be freely redistributed under the terms of the GNU # general public license # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, In...
tbachman/python-group-based-policy-client
refs/heads/master
setup.py
608
#!/usr/bin/env python # Copyright (c) 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.org/licenses/LICENSE-2.0 # # Unle...
AndroPlus-org/kernel
refs/heads/aosp/AU_LINUX_ANDROID_LA.BF64.1.2.1_RB1.05.00.02.019.067
tools/perf/scripts/python/futex-contention.py
11261
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
dneg/cortex
refs/heads/master
test/IECoreGL/DeferredRenderer.py
12
########################################################################## # # Copyright (c) 2008, Image Engine Design 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: # # * Redistribu...
mjtamlyn/back2back
refs/heads/master
back2back/admin.py
1
from django.contrib import admin from .models import Entry, Score class EntryAdmin(admin.ModelAdmin): list_filter = ('category',) admin.site.register(Entry, EntryAdmin) admin.site.register(Score)
j3parker/servo
refs/heads/master
tests/wpt/css-tests/tools/html5lib/html5lib/treewalkers/lxmletree.py
618
from __future__ import absolute_import, division, unicode_literals from six import text_type from lxml import etree from ..treebuilders.etree import tag_regexp from gettext import gettext _ = gettext from . import _base from .. import ihatexml def ensure_str(s): if s is None: return None elif isin...
faun/django_test
refs/heads/master
build/lib/django/db/backends/__init__.py
3
import decimal from threading import local from django.db import DEFAULT_DB_ALIAS from django.db.backends import util from django.utils import datetime_safe from django.utils.importlib import import_module class BaseDatabaseWrapper(local): """ Represents a database connection. """ ops = None def ...
carlosadean/evgnet
refs/heads/master
src/evgnet/cadastro/migrations/0005_remove_evangelista_data_batismo_no_espirito_santo.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-09-06 10:33 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('cadastro', '0004_auto_20170906_0732'), ] operations = [ migrations.RemoveField( ...
longmen21/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/tests/test_imageannotation.py
83
# -*- coding: utf-8 -*- """Test for Image Annotation Xmodule functional logic.""" import unittest from mock import Mock from lxml import etree from xblock.field_data import DictFieldData from xblock.fields import ScopeIds from xmodule.imageannotation_module import ImageAnnotationModule from . import get_test_system...
robin-lai/scikit-learn
refs/heads/master
sklearn/linear_model/tests/test_coordinate_descent.py
114
# Authors: Olivier Grisel <olivier.grisel@ensta.org> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # License: BSD 3 clause from sys import version_info import numpy as np from scipy import interpolate, sparse from copy import deepcopy from sklearn.datasets import load_boston from sklearn.utils.testing ...
awalls-cx18/gnuradio
refs/heads/master
gr-uhd/python/uhd/qa_uhd.py
7
#!/usr/bin/env python # # Copyright 2005,2008,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your ...
dagwieers/ansible
refs/heads/devel
lib/ansible/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py
31
#!/usr/bin/python # Copyright: (c) 2018, Juergen Wiebe <wiebe@e-spirit.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version': '1.1', 'statu...
magsilva/scriptLattes
refs/heads/master
scriptLattes/charts/graficoDeProporcoes.py
3
#!/usr/bin/python # encoding: utf-8 # filename: graficoDeProporcoes.py # # scriptLattes V8 # Copyright 2005-2013: Jesús P. Mena-Chalco e Roberto M. Cesar-Jr. # http://scriptlattes.sourceforge.net/ # # # Este programa é um software livre; você pode redistribui-lo e/ou # modifica-lo dentro dos termos da Licença Púb...
plexinc/plex-home-theater-public
refs/heads/pht-frodo
tools/EventClients/lib/python/zeroconf.py
57
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2008-2009 Team XBMC http://www.xbmc.org # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, ...
nitzmahone/ansible
refs/heads/devel
lib/ansible/modules/packaging/os/zypper.py
27
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Patrick Callahan <pmc@patrickcallahan.com> # based on # openbsd_pkg # (c) 2013 # Patrik Lundin <patrik.lundin.swe@gmail.com> # # yum # (c) 2012, Red Hat, Inc # Written by Seth Vidal <skvidal at fedoraproject.org> # # GNU Gene...
Tatsh-ansible/ansible
refs/heads/devel
lib/ansible/modules/cloud/azure/azure_rm_storageblob.py
8
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANS...
jaydenkieran/smite-python
refs/heads/master
smite.py
1
""" smite-python (github.com/jaydenkieran/smite-python) Distributed under the MIT License by Jayden Bailey """ import hashlib import traceback import urllib from enum import Enum from urllib.request import urlopen import json import logging from datetime import datetime version = '1.0_rc2' # Initialise logg...
varunarya10/nova_test_latest
refs/heads/master
nova/tests/unit/scheduler/filters/test_ram_filters.py
38
# 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 # d...
googleapis/googleapis-gen
refs/heads/master
google/iam/admin/v1/iam-admin-v1-py/google/iam/admin_v1/services/iam/transports/__init__.py
1
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
craigmcdonald/mailin
refs/heads/master
python/dkim/dnsplug.py
9
# This software is provided 'as-is', without any express or implied # warranty. In no event will the author be held liable for any damages # arising from the use of this software. # # Permission is granted to anyone to use this software for any purpose, # including commercial applications, and to alter it and redistri...
leafjungle/luigi
refs/heads/master
test/create_packages_archive_root/package/submodule_without_imports.py
475
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
ojii/django-cms
refs/heads/develop
cms/plugins/googlemap/migrations/0009_routeplaner_title.py
121
# -*- coding: utf-8 -*- from south.db import db from django.db import models from cms.plugins.file.models import * class Migration: def forwards(self, orm): "Write your forwards migration here" def backwards(self, orm): "Write your backwards migration here" models = { 'cms.cmsplu...
bierminen/ninkasi
refs/heads/master
app/database.py
1
#!../env/bin/python #database.py # # Simply instantiates a SQLAlchemy object. # # Author: José Lopes de Oliveira Jr. <bierminen.com> # # 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 vers...
dreispt/department
refs/heads/master
__unported__/sale_department/__openerp__.py
1
# -*- coding: utf-8 -*- ############################################################################## # # Author: Joël Grand-guillaume (Camptocamp) # Copyright 2011 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
puneetgkaur/sugar
refs/heads/master
src/jarabe/desktop/favoriteslayout.py
12
# Copyright (C) 2008 One Laptop Per Child # Copyright (C) 2010 Sugar Labs # # 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 versi...
jmschrei/pomegranate
refs/heads/master
tests/test_custom_distributions.py
1
from __future__ import (division) from pomegranate import * from nose.tools import with_setup from nose.tools import assert_almost_equal from nose.tools import assert_equal from nose.tools import assert_not_equal from nose.tools import assert_less_equal from nose.tools import assert_raises from nose.tools import asser...
facepalm/personal-space
refs/heads/master
src/job.py
1
import random import math import util joblist = { 'CookJob':{'Inputs':{'Food':9.92, 'CookJob': 1.0},'Outputs':{'Meals':9.92,'SanitationJob':0.1}}, #fresh food, dirty kitchen 'SanitationJob':{'Inputs':{'General Consumables':0.55, 'SanitationJob': 1.0},'Outputs':{'Solid Waste':0.55}}, ...
tjsavage/sfcsdatabase
refs/heads/master
sfcs/django/contrib/flatpages/templatetags/flatpages.py
246
from django import template from django.conf import settings from django.contrib.flatpages.models import FlatPage register = template.Library() class FlatpageNode(template.Node): def __init__(self, context_name, starts_with=None, user=None): self.context_name = context_name if starts_with: ...
palfrey/infoqmedia
refs/heads/master
infoqlisting.py
1
#! /usr/bin/env python # -*- coding: utf-8 -*- """ infoqlisting.py Copyright (c) 2012, Clément MATHIEU 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 a...
tangentlabs/wagtail
refs/heads/master
wagtail/wagtailcore/migrations/0003_add_uniqueness_constraint_on_group_page_permission.py
30
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0002_initial_data'), ] operations = [ migrations.AlterField( model_name='grouppagepermission', ...
Endika/c2c-rd-addons
refs/heads/8.0
chricar_budget_create/wizard/budget_create.py
4
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2012 ChriCar Beteiligungs- und Beratungs- GmbH (<http://www.camptocamp.at>) # # Thi...
mwhudson/binutils
refs/heads/reverse-arm64
gdb/python/lib/gdb/command/prompt.py
68
# Extended prompt. # Copyright (C) 2011-2015 Free Software Foundation, 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 vers...
sde1000/quicktill
refs/heads/master
quicktill/plugins.py
1
# Very simple plugin attachment system class ClassPluginMount(type): def __init__(cls, name, bases, attrs): if not hasattr(cls, 'plugins'): cls.plugins = [] else: cls.plugins.append(cls) class InstancePluginMount(type): def __init__(cls, name, bases, attrs): if ...
google/graphicsfuzz
refs/heads/master
python/src/main/python/test_scripts/inspect_compute_results_test.py
1
#!/usr/bin/env python3 # Copyright 2019 The GraphicsFuzz Project Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
towerjoo/mindsbook
refs/heads/master
django/conf/locale/sr/formats.py
136
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # DATE_FORMAT = 'j. F Y.' TIME_FORMAT = 'H:i' DATETIME_FORMAT = 'j. F Y. H:i' YEAR_MONTH_FORMAT = 'F Y.' MONTH_DAY_FORMAT = 'j. F' SHORT_DATE_FORMAT = 'j.m.Y.' SHORT_DATETIME_FORMAT = 'j.m.Y. H:i' FIRST_DAY_OF_WEEK = 1 D...
pjliddy/bwarealty
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py
2698
#!/usr/bin/env python # Copyright (c) 2011 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. """ Unit tests for the easy_xml.py file. """ import gyp.easy_xml as easy_xml import unittest import StringIO class TestSequenceFunctions(...
pratikmallya/hue
refs/heads/master
desktop/core/ext-py/MarkupSafe-0.9.3/setup.py
38
import os import sys from setuptools import setup, Extension, Feature from distutils.command.build_ext import build_ext from distutils.errors import CCompilerError, DistutilsExecError, \ DistutilsPlatformError # fail safe compilation shamelessly stolen from the simplejson # setup.py file. Original author: Bob Ip...
DirtyUnicorns/android_external_chromium-org
refs/heads/kitkat
tools/json_schema_compiler/cpp_util_test.py
72
#!/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. import cpp_util import unittest class CppUtilTest(unittest.TestCase): def testClassname(self): self.assertEquals('Permission...
marshall/pynaries
refs/heads/master
paramiko/ssh_exception.py
3
# Copyright (C) 2003-2007 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # # Paramiko 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.1 of the License, or (at your op...
ericsnowcurrently/micropython
refs/heads/master
tests/basics/subclass_native_buffer.py
97
# test when we subclass a type with the buffer protocol class my_bytes(bytes): pass b1 = my_bytes([0, 1]) b2 = my_bytes([2, 3]) b3 = bytes([4, 5]) # addition will use the buffer protocol on the RHS print(b1 + b2) print(b1 + b3) print(b3 + b1) # bytearray construction will use the buffer protocol print(bytearray...
ecoal95/servo
refs/heads/master
tests/wpt/web-platform-tests/common/security-features/subresource/image.py
16
import os, sys, array, math, StringIO sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) import subresource class Image: """This class partially implements the interface of the PIL.Image.Image. One day in the future WPT might support the PIL module or another imaging library, so this hack...
hhexiy/vowpal_wabbit
refs/heads/master
python/test_search_ldf.py
38
import sys import pyvw # wow! your data can be ANY type you want... does NOT have to be VW examples DET = 1 NOUN = 2 VERB = 3 ADJ = 4 my_dataset = [ [(DET , 'the'), (NOUN, 'monster'), (VERB, 'ate'), (DET , 'a'), (ADJ , 'big'), (NOUN, 'sa...
dgladkov/django-nose
refs/heads/master
django_nose/plugin.py
40
import sys from nose.plugins.base import Plugin from nose.suite import ContextSuite from django.test.testcases import TransactionTestCase, TestCase from django_nose.testcases import FastFixtureTestCase from django_nose.utils import process_tests, is_subclass_at_all class AlwaysOnPlugin(Plugin): """A plugin tha...
chushao/Gradesource-Uploader
refs/heads/master
requests/structures.py
57
# -*- coding: utf-8 -*- """ requests.structures ~~~~~~~~~~~~~~~~~~~ Data structures that power Requests. """ class CaseInsensitiveDict(dict): """Case-insensitive Dictionary For example, ``headers['content-encoding']`` will return the value of a ``'Content-Encoding'`` response header.""" @property...
hpk42/pytest
refs/heads/master
testing/python/setup_only.py
9
import pytest @pytest.fixture(params=['--setup-only', '--setup-plan', '--setup-show'], scope='module') def mode(request): return request.param def test_show_only_active_fixtures(testdir, mode): p = testdir.makepyfile(''' import pytest @pytest.fixture def _arg0(): ...
hsaputra/tensorflow
refs/heads/master
tensorflow/tools/docker/simple_console.py
603
# 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...
vmanoria/bluemix-hue-filebrowser
refs/heads/master
hue-3.8.1-bluemix/desktop/core/ext-py/guppy-0.1.10/guppy/heapy/test/test_heapyc.py
37
from guppy.heapy.test import support class TestCase(support.TestCase): def setUp(self): support.TestCase.setUp(self) self.sets = self.guppy.sets heapdefs = getattr(self.sets.setsc, '_NyHeapDefs_'), self.root = [] self.heapyc = self.guppy.heapy.heapyc self.hv = self.heapyc.HeapView(self.root, heapdefs) self....
noironetworks/heat
refs/heads/master
heat/api/aws/utils.py
2
# # 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 # ...
bopo/PopClip-Extensions
refs/heads/master
source/InstantTranslate/requests/packages/chardet/__init__.py
1777
######################## BEGIN LICENSE BLOCK ######################## # This library 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.1 of the License, or (at your option) any later ve...
jacksonwilliams/arsenalsuite
refs/heads/master
cpp/apps/burner/plugins/fusion.py
11
from blur.Stone import * from blur.Classes import * from blur.Burner import * from PyQt4.QtCore import * from PyQt4.QtSql import * import re, traceback class FusionBurner(JobBurner): def __init__(self,job,slave): JobBurner.__init__(self,job,slave) self.Job = job self.Slave = slave self.CurrentFrame = None s...
indictranstech/reciphergroup-frappe
refs/heads/master
frappe/patches/v4_0/set_user_gravatar.py
73
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe def execute(): for name in frappe.db.sql_list("select name from `tabUser` where ifnull(user_image, '')=''"): user = frappe.get_doc("User", name) user.update_gr...
nawawi/poedit
refs/heads/stable
deps/boost/tools/build/test/project_root_rule.py
6
#!/usr/bin/python # Copyright (C) Vladimir Prus 2005. # Distributed under the Boost Software License, Version 1.0. (See # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) # Tests that we can declare a rule in Jamroot that will be can be called in # child Jamfile to declare a target...
jongiddy/balcazapy
refs/heads/master
examples/rest/web.py
1
# Copyright (c) 2013 Cardiff University # # 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, merge, publish, ...
rajul/tvb-library
refs/heads/trunk
tvb/datatypes/region_mapping_data.py
2
# -*- coding: utf-8 -*- # # # TheVirtualBrain-Framework Package. This package holds all Data Management, and # Web-UI helpful to run brain-simulations. To use it, you also need do download # TheVirtualBrain-Scientific Package (for simulators). See content of the # documentation-folder for more details. See also http:/...